ACR Spawn System
Moderators: ALFA Administrators, Staff - Technical
- AcadiusLost
- Chosen of Forumamus, God of Forums
- Posts: 5061
- Joined: Tue Oct 19, 2004 8:38 am
- Location: Montara, CA [GMT -8]
- Contact:
ACR Spawn System
Allright, closing in on having this ready to "ship" to build teams.
I've integrated some of Ronan's code improvements now, and have prespawning (with and without seamless AT destination prediction) working. The only part that's still lacking is getting the file-based group spawning ironed out.
I'd also like to find a good way to pass debugging information to the DM channel selectively, so builders can work out why a given spawn point is or isn't working. I'll ask about that separately.
So far I've passed the early test mod to Indio, Thangorn, and Castano- any other volunteers for testing? I'd really like to catch any major errors before we do a proper release that gets imported to all the Beta mods. I should have an updated test mod in the next few days, hoping to hear from a few more TechDMs from ongoing NWN2 build teams.
I've integrated some of Ronan's code improvements now, and have prespawning (with and without seamless AT destination prediction) working. The only part that's still lacking is getting the file-based group spawning ironed out.
I'd also like to find a good way to pass debugging information to the DM channel selectively, so builders can work out why a given spawn point is or isn't working. I'll ask about that separately.
So far I've passed the early test mod to Indio, Thangorn, and Castano- any other volunteers for testing? I'd really like to catch any major errors before we do a proper release that gets imported to all the Beta mods. I should have an updated test mod in the next few days, hoping to hear from a few more TechDMs from ongoing NWN2 build teams.
- ç i p h é r
- Retired
- Posts: 2904
- Joined: Fri Oct 21, 2005 4:12 pm
- Location: US Central (GMT - 6)
- ç i p h é r
- Retired
- Posts: 2904
- Joined: Fri Oct 21, 2005 4:12 pm
- Location: US Central (GMT - 6)
the spawn system with the last ACR release doesnt appear to be working.. gave it a few tests, no joy..
I added all the module scripts and area scripts to the appropriate onevent triggers.
I laid waypoints just like your instructions said then, I compiled just like your instructions said. The spawn systems scripts would not compile properly either..
I added all the module scripts and area scripts to the appropriate onevent triggers.
I laid waypoints just like your instructions said then, I compiled just like your instructions said. The spawn systems scripts would not compile properly either..
On indefinite real life hiatus
[22:52] <Veilan> obviously something sinister must be afoot if a DM does not have his social security number in his avatar name!
[22:52] <Veilan> obviously something sinister must be afoot if a DM does not have his social security number in his avatar name!
- AcadiusLost
- Chosen of Forumamus, God of Forums
- Posts: 5061
- Joined: Tue Oct 19, 2004 8:38 am
- Location: Montara, CA [GMT -8]
- Contact:
Spotted this problem the other day:
I think it only really is a show-stopper for folks who hadn't compiled it in their modules before 1.06, as the old .ncs still would function in those cases. If you want to get adventurous, you could always try pulling acr_spawn_i.nss out of the hak, and fixing the extra underscore in line 1565- though all things being equal, it's reasonable to wait for the next ACR release, which will have a new hak that sorts the problem (and adds a fair big of functionality for other systems to boot).Patch 1.06 released thread wrote:Also noticed this weekend- they changed the name of the constant int for the "Protection from Chaos" spell, which used to have a doubled underscore in it somewhere. As a result- acr_spawn_i.nss will no longer allow things to compile properly (it's referenced in the "spawn buffed" function, line 1565).
the basic spawn functions work with your updated hak Acad, thanks muchly..
* Can spawn a child with no time with"ACR_SPAWN_RESNAME_1",
* Can spawn a sequential list of children as group with "ACR_SPAWN_RESNAME_XX" where XX is the child number.
however, several spawn characteristics are not working as per the instructions on the website.
* "ACR_SPAWN_RANDOM_RESNAME_XX" does not appear to be working
* "ACR_SPAWN_IN_HOUR" & "ACR_SPAWN_OUT_HOUR" seem to only spawn when the clock hits the required time. we probably need a day/night check of some description as well as this doesnt really work as well as it could IMO. Especially if we are using teh spawn system for NPCs like I've got in mind.
havent tested the other functions as yet but I'll give some feedback as soon as I can.
There's some other functions I'd like to discuss adding as well
* Can spawn a child with no time with"ACR_SPAWN_RESNAME_1",
* Can spawn a sequential list of children as group with "ACR_SPAWN_RESNAME_XX" where XX is the child number.
however, several spawn characteristics are not working as per the instructions on the website.
* "ACR_SPAWN_RANDOM_RESNAME_XX" does not appear to be working
* "ACR_SPAWN_IN_HOUR" & "ACR_SPAWN_OUT_HOUR" seem to only spawn when the clock hits the required time. we probably need a day/night check of some description as well as this doesnt really work as well as it could IMO. Especially if we are using teh spawn system for NPCs like I've got in mind.
havent tested the other functions as yet but I'll give some feedback as soon as I can.
There's some other functions I'd like to discuss adding as well
On indefinite real life hiatus
[22:52] <Veilan> obviously something sinister must be afoot if a DM does not have his social security number in his avatar name!
[22:52] <Veilan> obviously something sinister must be afoot if a DM does not have his social security number in his avatar name!
- AcadiusLost
- Chosen of Forumamus, God of Forums
- Posts: 5061
- Joined: Tue Oct 19, 2004 8:38 am
- Location: Montara, CA [GMT -8]
- Contact:
Possible there's a version mismatch or something subtle in the spawn point configurations that's off, I believe all those are still behaving in my hands. May also be confusing documentation. If you're still having trouble, maybe post the info you get on the DM channel with the spawn debugging on (default setting when in with a DM avatar).
I have all the basic functions working now..
the only bug I've found is that the variable(s) "ACR_SPAWN_SCRIPT_!" on the waypoint, according to the "acr_spawn_i" are supposed to return the spawn children when OBJECT_SELF is called in a script referenced by this variable. Instead it is calling the waypoint which is what "ACR_SPAWN_IN_SCRIPT" is designed to do (which works).
Any other method of running a script on the spawned children of the waypoint?
the only bug I've found is that the variable(s) "ACR_SPAWN_SCRIPT_!" on the waypoint, according to the "acr_spawn_i" are supposed to return the spawn children when OBJECT_SELF is called in a script referenced by this variable. Instead it is calling the waypoint which is what "ACR_SPAWN_IN_SCRIPT" is designed to do (which works).
Any other method of running a script on the spawned children of the waypoint?
On indefinite real life hiatus
[22:52] <Veilan> obviously something sinister must be afoot if a DM does not have his social security number in his avatar name!
[22:52] <Veilan> obviously something sinister must be afoot if a DM does not have his social security number in his avatar name!
- AcadiusLost
- Chosen of Forumamus, God of Forums
- Posts: 5061
- Joined: Tue Oct 19, 2004 8:38 am
- Location: Montara, CA [GMT -8]
- Contact:
Nicely caught, Thangorn. Found the offending line, 1707 in acr_spawn_i.nss, have an ExecuteScript(sScript, oWP) where we should have an ExecuteScript(sScript, oSpawned).
It'll be fixed in the ACR release, though if you need it ASAP I can pass along another temporary hak as before.
Your other option would be making a custom OnSpawn for the blueprint of your spawn- copy the existing acf one and rename, add an ExecuteScript call, or just add your code directly. If you only want to make it active when a particular WP calls it, you could probably use the creature's pointer back to it's parent spawn point to check the name/tag before firing:
Anything spawned by the ACR spawn system should have that LocalObject set, we use it for the death reporting functions.
It'll be fixed in the ACR release, though if you need it ASAP I can pass along another temporary hak as before.
Your other option would be making a custom OnSpawn for the blueprint of your spawn- copy the existing acf one and rename, add an ExecuteScript call, or just add your code directly. If you only want to make it active when a particular WP calls it, you could probably use the creature's pointer back to it's parent spawn point to check the name/tag before firing:
Code: Select all
object oParentWaypoint = GetLocalObject(oSpawn, "ACR_SPAWN_PARENT_WP")
- AcadiusLost
- Chosen of Forumamus, God of Forums
- Posts: 5061
- Joined: Tue Oct 19, 2004 8:38 am
- Location: Montara, CA [GMT -8]
- Contact:
Committed these changes to the repository, presuming Cipher's NWNx4 retrofit doesn't need to affect acr_spawn_i for now (if it does, I'll replicate them in his new version).
If any build teams are being held back by one or more of these bugs, I can email the same interim hak I sent Thangorn- just PM me for it. Modules that were compiled under 1.05 should still be functional for the basics of spawning, even though the scripts which include acr_spawn_i won't compile under 1.06 any more.
Otherwise, I'd recommend waiting till we've got the new ACR release with all it's goodies included (bleeding/dying system, gold drops, NWNx4, etc)
If any build teams are being held back by one or more of these bugs, I can email the same interim hak I sent Thangorn- just PM me for it. Modules that were compiled under 1.05 should still be functional for the basics of spawning, even though the scripts which include acr_spawn_i won't compile under 1.06 any more.
Otherwise, I'd recommend waiting till we've got the new ACR release with all it's goodies included (bleeding/dying system, gold drops, NWNx4, etc)
- AcadiusLost
- Chosen of Forumamus, God of Forums
- Posts: 5061
- Joined: Tue Oct 19, 2004 8:38 am
- Location: Montara, CA [GMT -8]
- Contact:
All right. I tried to spawn a placeable today in sight of a PC (in case the PC enters the module in the room with the placeable in it) with no success. I eventually backtested far enough to determine that none of my spawning functions are working at all. Placing the example waypoint out of sight of my entering PC does not spawn a corollax. (Whatever that is.) Nor does placing a waypoint in front of the start point, set to spawn a badger and altered to allow it to spawn in front of the PC. (Visual aid of latter herewith.
I have ACR imported and compiled correctly. I have the acf_area scripts associated with the area. I have the acr_mod scripts associated with the mod. What am I doing wrong?
<a href="http://imageshack.us"><img src="http://img505.imageshack.us/img505/4263 ... obscc9.jpg" border="0" alt="Image Hosted by ImageShack.us"></a><br><a href="http://g.imageshack.us/g.php?h=505&i=sp ... .jpg"><img src="http://img505.imageshack.us/img505/4263 ... b590f7.jpg" border="0"></a>
I have ACR imported and compiled correctly. I have the acf_area scripts associated with the area. I have the acr_mod scripts associated with the mod. What am I doing wrong?
<a href="http://imageshack.us"><img src="http://img505.imageshack.us/img505/4263 ... obscc9.jpg" border="0" alt="Image Hosted by ImageShack.us"></a><br><a href="http://g.imageshack.us/g.php?h=505&i=sp ... .jpg"><img src="http://img505.imageshack.us/img505/4263 ... b590f7.jpg" border="0"></a>
Enjoy the game