Spawn System (ALFA / ACR)
- AcadiusLost
- Chosen of Forumamus, God of Forums
- Posts: 5061
- Joined: Tue Oct 19, 2004 8:38 am
- Location: Montara, CA [GMT -8]
- Contact:
Code: Select all
location lLoc = _SPAWN_CHILD_COUNT(
240.0, // 240 degrees, put this one at 8 o'clock.
6.0, // Six meters out, so the radius of the circle is 6m.
60.0); // Turned 180 + 240 degrees, so it faces the center.
ACR_SpawnObjectAtLocation("c_chicken_acr", OBJECT_TYPE_CREATURE, lLoc);
I'm in the custom spawn script example and am just trying to work out if I need to spawn a chicken to spawn the orcs.

- AcadiusLost
- Chosen of Forumamus, God of Forums
- Posts: 5061
- Joined: Tue Oct 19, 2004 8:38 am
- Location: Montara, CA [GMT -8]
- Contact:
Hah! Had forgotten that was still in there.
In my original mod, I made two creature templates to demonstrate things with, just copies of the standard pallete ones that called acf_spawndeath in their on_death events (for respawn behaviour). They were c_badger_acr (in honor of the timeless spawn badgers), and c_chicken_acr (inspired by the death chicken of shadowdale).
Originally I tested the group-file spawns using chickens and badgers as well, then switched back to orcs and goblins so I could better see if the case switches were working. Looks like I left one chicken behind... Didn't notice because they'd eaten it by the time I got there to see.

In my original mod, I made two creature templates to demonstrate things with, just copies of the standard pallete ones that called acf_spawndeath in their on_death events (for respawn behaviour). They were c_badger_acr (in honor of the timeless spawn badgers), and c_chicken_acr (inspired by the death chicken of shadowdale).
Originally I tested the group-file spawns using chickens and badgers as well, then switched back to orcs and goblins so I could better see if the case switches were working. Looks like I left one chicken behind... Didn't notice because they'd eaten it by the time I got there to see.

lol
Ok...quick testing update.
I've got about 7 mob groups of 5 mobs each spawning into the opening area (24x24). Fow now each is an infinite respawn (until Live) with a Min Delay of 4 and Max Delay of 8. I've got 7 minutes/game hour set in Mod Props.
Your simple group script is real genius. It makes variety so incredibly easy, and it's as reliable as all get-go. Thanks for those templates.
There's no discernible lag or delay entering the area..no more than usually existed. Combat is not CPU intensive at all (admittedly with 1 player).
In other words, I've got about 50 mobs (including NPCs) and my server CPU, running SQLite and NWN2server, is sitting on 0%, barely fluctuating to 1% on the module heartbeat.
Very happy.
Ok...quick testing update.
I've got about 7 mob groups of 5 mobs each spawning into the opening area (24x24). Fow now each is an infinite respawn (until Live) with a Min Delay of 4 and Max Delay of 8. I've got 7 minutes/game hour set in Mod Props.
Your simple group script is real genius. It makes variety so incredibly easy, and it's as reliable as all get-go. Thanks for those templates.
There's no discernible lag or delay entering the area..no more than usually existed. Combat is not CPU intensive at all (admittedly with 1 player).
In other words, I've got about 50 mobs (including NPCs) and my server CPU, running SQLite and NWN2server, is sitting on 0%, barely fluctuating to 1% on the module heartbeat.
Very happy.

- AcadiusLost
- Chosen of Forumamus, God of Forums
- Posts: 5061
- Joined: Tue Oct 19, 2004 8:38 am
- Location: Montara, CA [GMT -8]
- Contact:
The spawn group templates are Ronan's, he was hoping they'd let people get particular about their spawning options without having to know all the internal machinations of the system. Glad to hear they're doing their job well.
Also quite gratifying to hear the system is performing so well, helps justify the time spent working out how all Ronan's optimizations worked to get them set to go.
Also quite gratifying to hear the system is performing so well, helps justify the time spent working out how all Ronan's optimizations worked to get them set to go.
- AcadiusLost
- Chosen of Forumamus, God of Forums
- Posts: 5061
- Joined: Tue Oct 19, 2004 8:38 am
- Location: Montara, CA [GMT -8]
- Contact:
That variable was renamed, as it's function was counter-intuitive and likely to cause confusion for most builders (confused me, at least).
The replacement variable, with its associated documentation are in the current wiki manual version, quoted here:
The other time I can imagine this setting might be used is for fast-respawning mobs- keeping them from repopulating while a PC is in the area makes them less obvious to a player looking for a lucrative area to linger in, waiting for the respawns.
I thought i'd removed all reference to the old "ACR_SPAWN_WITH_PC_IN_AREA " variable from the acrtest2.mod, so if you're still seeing it in any of the templates please let me know, so I can clear it out before we package the ACR up. I'm trying to make sure all of these are carved in stone before we release the ACR to the builders- there are few things more tedious than changing variable names across every spawn waypoint in a module.
The replacement variable, with its associated documentation are in the current wiki manual version, quoted here:
So, think of this variable as an additional control against respawns while a PC is in an area- say they kill off a group of orcs and make camp for several RL hours in the same area. Even if the respawn timer runs out (and the spawn point allows respawns), the spawn would not be repopulated until the PCs had left the area, if this were set to 1 (TRUE). The basic default of SPAWN_IN_SIGHT = 0 (FALSE) would protect the PC/party against the mob respawning right on top of them, but this setting would also keep the mob from respawning nearby in the same area (may be more important once we have the AI controls to make our mobs wander).ACR_SPAWN_ONLY_WHEN_NO_PC_IN_AREA (Local int)
If nonzero, this spawn will not respawn or activate at all if a PC is already in the area when it tries to do so. This is used to prevent creatures from re-appearing where they were after a PC just killed them, or something similar. (not tested, should work)
The other time I can imagine this setting might be used is for fast-respawning mobs- keeping them from repopulating while a PC is in the area makes them less obvious to a player looking for a lucrative area to linger in, waiting for the respawns.
I thought i'd removed all reference to the old "ACR_SPAWN_WITH_PC_IN_AREA " variable from the acrtest2.mod, so if you're still seeing it in any of the templates please let me know, so I can clear it out before we package the ACR up. I'm trying to make sure all of these are carved in stone before we release the ACR to the builders- there are few things more tedious than changing variable names across every spawn waypoint in a module.
Cool bananas.
Next question: ACR Random Resref Spawn
This is an example waypoint, but it contains the following variable: ACR_SPAWN_RESREF_1, and ACR_SPAWN_RESREF_MIN and ACR_SPAWN_RESREF_MAX
Should that be resname?
I'm about to test it and find out myself, but as I'd added about 40 treasure items, it's going to take me 15 minutes or so before I know for sure.
Next question: ACR Random Resref Spawn
This is an example waypoint, but it contains the following variable: ACR_SPAWN_RESREF_1, and ACR_SPAWN_RESREF_MIN and ACR_SPAWN_RESREF_MAX
Should that be resname?
I'm about to test it and find out myself, but as I'd added about 40 treasure items, it's going to take me 15 minutes or so before I know for sure.

- AcadiusLost
- Chosen of Forumamus, God of Forums
- Posts: 5061
- Joined: Tue Oct 19, 2004 8:38 am
- Location: Montara, CA [GMT -8]
- Contact:
Yeah, looks like I missed one when updating all 30+ waypoints in that module (blueprints and instances). All should use the currently documented ACR_SPAWN_RESNAME_xxxx format (figured it would be best to be consistent for the future, since the "Template Resref" is ignored by all the creation functions. I'll be over those example waypoints with a fine-toothed comb before they go into an ABR ERF.