Spawn System (ALFA / ACR)

Ideas and suggestions for game mechanics and rules.
User avatar
AcadiusLost
Chosen of Forumamus, God of Forums
Posts: 5061
Joined: Tue Oct 19, 2004 8:38 am
Location: Montara, CA [GMT -8]
Contact:

Post by AcadiusLost »

Ronan wrote: While I had a few spawn WPs, they were outdated. I ment spawn groups:
http://alfa-bmf.svn.sourceforge.net/vie ... xample.nss
http://alfa-bmf.svn.sourceforge.net/vie ... omplex.nss
Ahh, I'd misunderstood. I actually haven't tested the spawn group options that use group configuration files (like NESS spawn groups), but all that code is still in, at it's 6/6/2006 state. Did you make additional changes/improvements to it after that? If so, I can roll those in as we go along- but I'd encourage testers to d/l and try the spawn group files, see if they work under the test system already.
Ronan wrote:You'll probably want to check to see if the object passed to ACR_OnNPCDeath() was actually spawned (ie, has a parent). Since its a "public" function, there is no telling with what error it could be called.
I actually have the scripts set a LocalObject pointer on each spawned child, which points back to it's parent waypoint- all the ACR_ReportSpawnDeath() actions are manipulations of that waypoint, so it should just come up empty if the creature was not brought into the game by a spawn waypoint. If we see any problems with it, I can handle that case specifically within the body of ACR_ReportSpawnDeath (if == OBJECT_INVALID, return;)
Ronan
Dungeon Master
Posts: 4611
Joined: Sun Feb 20, 2005 9:48 am

Post by Ronan »

AcadiusLost wrote:Ahh, I'd misunderstood. I actually haven't tested the spawn group options that use group configuration files (like NESS spawn groups), but all that code is still in, at it's 6/6/2006 state. Did you make additional changes/improvements to it after that?
Yeah, some stuff did change, mostly stuff dealing with placing spawned monsters in groups. Look at ACR_SpawnObjectAtLocation(), ACR_GetSpawnLocationFromDirection(), ACR_GetSpawnLocationFromDirectionAndFacing(), ACR_GetSpawnLocationFromVector(), and ACR_GetSpawnLocationFromVectorAndFacing(). Basically I changed the API to take locations, and gave tools to the spawn group creator to alter the (relative) spawn location. Its relative because the position randomizing features of the spawn system can move and rotate the spawn point, etc. ACR_GetSpawnLocation() seems to be in use in your version, so that should all work, I hope.

ACR_SpawnGroup() was changed to assume a prefix (which I think will really come in handy with organization).
AcadiusLost wrote:I actually have the scripts set a LocalObject pointer on each spawned child, which points back to it's parent waypoint- all the ACR_ReportSpawnDeath() actions are manipulations of that waypoint, so it should just come up empty if the creature was not brought into the game by a spawn waypoint. If we see any problems with it, I can handle that case specifically within the body of ACR_ReportSpawnDeath (if == OBJECT_INVALID, return;)
Yeah, I'd done the same thing. Looking at the function, I guess the only error that would actually occur is invalid debugging chatter in the DM channel, heh. I'd add a DeleteLocalObject(oObject, _SPAWN_PARENT_WP);", but I might be a bit too paranoid of mis-use and future OE bugs.
User avatar
AcadiusLost
Chosen of Forumamus, God of Forums
Posts: 5061
Joined: Tue Oct 19, 2004 8:38 am
Location: Montara, CA [GMT -8]
Contact:

Post by AcadiusLost »

The test module has been on the tech FTP for the better part of a week, any early feedback? I'm working on getting prespawning interfaced with the Seamless ATs, ABR doors, and other Area Transitions now, so it's a convenient enough time to fix other bugs that may have cropped up.

Indio, have you had a chance to play with it at all yet?

If there are others who are keen to test (and do not yet have access to the tech FTP), especially appointed Tech DMs for approved NWN2 servers, please contact me for details.

I may have a version with prespawning in by late tonight, depending- trying to work out the best way to handle a potential wrinkle in our defenses against ATing into a hostile spawn.
User avatar
Daeftan
Skeleton's Knuckle
Posts: 13
Joined: Tue Nov 21, 2006 5:15 am

Post by Daeftan »

Sorry for the long silence. I've been switching jobs/moving/etc but things have settled down now.

In response to Arc - I have not used any of the beta features of NWNx4 for script profiling, though there are a number of threads on this topic in the NWNx4 forum. I am sure we could get something started. PM me if you'd like to collaborate on this.

I will have my NWNx4/mySQL/NWN2 test platform set back up at my house. I will pick up where I left off, which is to start with a small logging insertable and test it here for some various features. Afterwards, I will need one of the module team leaders who is in Beta, or going to Beta, to volunteer to add the test set to their mod so we can see how it performs over the network with the remote database.
"Your young and got your health, what you want with a job?"

---- ALFA2 06-Moonsea Developer/Builder
User avatar
ç i p h é r
Retired
Posts: 2904
Joined: Fri Oct 21, 2005 4:12 pm
Location: US Central (GMT - 6)

Post by ç i p h é r »

Welcome back Daeftan. Thought we'd seen the last of you...but glad we haven't. :)

FYI, in case you are unaware, Zicada is now the new Infrastructure Admin.
User avatar
darrenhfx
Beholder
Posts: 1982
Joined: Fri Jul 30, 2004 5:35 pm
Location: Halifax, Canada GMT -4 (AST)

Post by darrenhfx »

w00t! Daeftan is back! :)
User avatar
indio
Ancient Red Dragon
Posts: 2810
Joined: Sat Jan 03, 2004 10:40 am

Post by indio »

Yeah AL. I just posted in the other forum. New forum locations have me befuddled.

Well, I reckon the skinny on the ALFASRAL (ALFA Spawns Ronan Acadius Lost) is that we're on a winner. It's nice, tight coding. WHat that means is that I couldn't actually see any code. It's all tied up in the hak.

Thus the user-friendliness is apparent. Click on a spawn points properties and all modifiable options are there. Most of them defy comprehension without a readme, although common sense tells you what they do, if not how they do it.

But it's a system that doesn't noticeably lag the server. I haven't checked with say 50 spawned mobs yet, but that will happen soon.

Downsides....well, I'm still stuck on my whole criterion-based spawns. But that's not important.
Image
User avatar
AcadiusLost
Chosen of Forumamus, God of Forums
Posts: 5061
Joined: Tue Oct 19, 2004 8:38 am
Location: Montara, CA [GMT -8]
Contact:

Post by AcadiusLost »

Allright, I think I bridged the final gaps with file-based Group Spawning, and some of the exception handling for prespawning (and controls for interactions between the spawn system and the seamless AT system). I should have a revised test mod ready this weekend, and will work on getting things bundled up for a proper release to our beta server teams.
User avatar
indio
Ancient Red Dragon
Posts: 2810
Joined: Sat Jan 03, 2004 10:40 am

Post by indio »

Your timing could not be better.
Image
User avatar
AcadiusLost
Chosen of Forumamus, God of Forums
Posts: 5061
Joined: Tue Oct 19, 2004 8:38 am
Location: Montara, CA [GMT -8]
Contact:

Post by AcadiusLost »

Just a quick call for opinions:

NWN2 has 4 strings associalted with every blueprint, as opposed to the 3 we had with NWN1. They are:

-Localized Name (what players see)

-Tag (works like it did in NWN1)

-Template Resref

-Resource Name (must be unique)

As it turns out, nwscript uses Resource Name as the reference to the blueprints in the module pallete for CreateObject calls, rather than ResRef, which NWN1 used. Why does this matter, you might ask? Currently our spawn system waypoints are set up to take the following settings (to tell them which creatures/items/waypoints/merchants/placeables to spawn):

Code: Select all

ACR_SPAWN_RESREF_#
ACR_SPAWN_RANDOM_RESREF_#
ACR_SPAWN_RESREF_MIN
ACR_SPAWN_RESREF_MAX
However, you /actually/ have to use Resource Name, rather than template resref. So, the above could be potentially misleading. It would be trivial to change the system to take the following instead:

Code: Select all

ACR_SPAWN_RESNAME_#
ACR_SPAWN_RANDOM_RESNAME_#
ACR_SPAWN_RESNAMES_MIN
ACR_SPAWN_RESNAMES_MAX
The downside would be any spawn points already built would all need to be changed to reflect this. I'm not sure if anyone has started laying down waypoints yet, so I figured I'd ask before I make the change.

Good change?
User avatar
darrenhfx
Beholder
Posts: 1982
Joined: Fri Jul 30, 2004 5:35 pm
Location: Halifax, Canada GMT -4 (AST)

Post by darrenhfx »

Probably a good idea to have this new discovery added to the wiki for the section on building acr compatible creatures.
User avatar
indio
Ancient Red Dragon
Posts: 2810
Joined: Sat Jan 03, 2004 10:40 am

Post by indio »

I've got plenty of spawns laid down, but my Resource Name and Resref are identical, so changing won't be a big deal.
Image
User avatar
AcadiusLost
Chosen of Forumamus, God of Forums
Posts: 5061
Joined: Tue Oct 19, 2004 8:38 am
Location: Montara, CA [GMT -8]
Contact:

Post by AcadiusLost »

The pain won't be with the creatures, but with the spawn waypoints themselves- if you've already made them using the old variable names, you'll have to edit them to change the variable names:

ACR_SPAWN_RESREF_# to ACR_SPAWN_RESNAME_#

ACR_SPAWN_RANDOM_RESREF_# to ACR_SPAWN_RANDOM_RESNAME_#

ACR_SPAWN_RESREF_MIN to ACR_SPAWN_RESNAMES_MIN

ACR_SPAWN_RESREF_MAX to ACR_SPAWN_RESNAMES_MAX

Notably, any group spawns using the ACR_SPAWN_GROUP_# nomenclature are unaffected by the change.

I'm thinking we should lock in this change, I think it'll be far more intuitive for builders learning the spawn system in the future. Apologies for the extra work it may entail- if you've got a lot of old-style spawn points I can write a workaround code for you to put in your acf_mod_onmoduleload file that will make waypoints still using the "RESREF" variable names still work. Otherwise, I guess it's the price of being ahead of the development curve. I'm trying to lock down all the spawn point variables sooner rather than later, and before the official release of ACR material to Beta teams (which should be soon).
User avatar
indio
Ancient Red Dragon
Posts: 2810
Joined: Sat Jan 03, 2004 10:40 am

Post by indio »

Cool bananas.

Will take me 5 minutes to update. No drama.
Image
User avatar
ç i p h é r
Retired
Posts: 2904
Joined: Fri Oct 21, 2005 4:12 pm
Location: US Central (GMT - 6)

Post by ç i p h é r »

No objections here. As long as res ref = resource name though (which is the standard we've adopted) it doesn't really matter.
Locked