Better control over spawns
Moderator: Event DM
Better control over spawns
I'm trying to build an encounter where one of the creatures is mandatory and static and the rest should dynamically scale to the proper level. DOes anyone know how I might be able to do this in one encounter?
This will guarantee (you can set the CR of the mandatory one to 0.25 if you need to ) that the mandatory (unique flag) one will ALWAYS appear for any level character (and give no xp) and the rest of the critters (normal CRs) will scale to level depending on your parameters.
Last edited by Drakuul on Sat May 28, 2005 7:41 pm, edited 1 time in total.

- JollyOrc
- Elder Sage
- Posts: 3984
- Joined: Fri Jan 17, 2003 11:41 am
- Timezone: Europe, CE(S)T
- Location: Germany
- Contact:
Note though: Lowering the CR will affect XP given when this creature is killed (lower XP), and may also affect randomly generated loot.
What you could do instead (if this is worrying you), is to create two encounters: One with the creature you must have, and the rest.
Mucking with the CR is not bad in itself. But I know a couple of people who will complain. Either because the "examine" function gives misleading info (screw them. That's OOC info anyway), or because the uber badass Demon Lord they fought for dozens of combat rounds, quaffing Heal potions like water, gives XP equivalent to fire beetle (they might have a point there)
What you could do instead (if this is worrying you), is to create two encounters: One with the creature you must have, and the rest.
Mucking with the CR is not bad in itself. But I know a couple of people who will complain. Either because the "examine" function gives misleading info (screw them. That's OOC info anyway), or because the uber badass Demon Lord they fought for dozens of combat rounds, quaffing Heal potions like water, gives XP equivalent to fire beetle (they might have a point there)
- Jonezie
- Team Member; Retired with Honors
- Posts: 3905
- Joined: Wed Jun 09, 2004 7:05 am
- Location: Melbourne (GMT +10)
Or, you could use the encounter's OnEnter event to trigger the creation of the extra monster. Don't put it in the creature list, but write a script that creates one whenever the trigger is entered by a PC.
This takes some tweaking, however, because of the way GetEncounterActive() works, and is probably more trouble than it's worth, unless there's a specific reason you can't use any of the other options which have been sugested. I'd reccomend having the 2 encounters that JolyOrc suggested.
This takes some tweaking, however, because of the way GetEncounterActive() works, and is probably more trouble than it's worth, unless there's a specific reason you can't use any of the other options which have been sugested. I'd reccomend having the 2 encounters that JolyOrc suggested.
- Aloro
- Team Member; Retired with Honors
- Posts: 12805
- Joined: Sat Dec 28, 2002 5:11 am
- Location: Rainbow's End
- Contact:
NWN encounter system = teh suck. 
Jolly and Jonezie gave the two methods I'd consider in this case; the simpler option is laying two encounters. Watch your spawn points - when you nest encounters it's best to manually control where monsters appear, or NWN does some odd stuff.
- Aloro

Jolly and Jonezie gave the two methods I'd consider in this case; the simpler option is laying two encounters. Watch your spawn points - when you nest encounters it's best to manually control where monsters appear, or NWN does some odd stuff.
- Aloro
Aleksandr Solzhenitsyn wrote:The meaning of earthly existence lies, not as we have grown used to thinking, in prosperity, but in the development of the soul.
Hmm...the first idea doesn't seem to be working...I've run through it several times, and he isn't always spawning...
Jonezie's idea is interesting but there's some issues there with multiple PC's entering the trigger and spawning multiple instances? Plus it'll be a lot of code...
I suspect 2 stacked encounters will be best. Thanks again all.
Jonezie's idea is interesting but there's some issues there with multiple PC's entering the trigger and spawning multiple instances? Plus it'll be a lot of code...
I suspect 2 stacked encounters will be best. Thanks again all.
If that doesn't work you could always try having the script search for existing occurences of the creature in your area. Depending on the size and number of objects already there that option can be resource intensive - but if you're in a particuarly bare cave....
Personally, I've always gone with the dual encounters option and not had a problem. And I for one LOVE the Aurora engine.
Personally, I've always gone with the dual encounters option and not had a problem. And I for one LOVE the Aurora engine.

- Papainhell
- Sage
- Posts: 2138
- Joined: Wed Oct 01, 2003 1:09 am
- Timezone: Time?
- Location: Kodiak, Alaska (for now)
- Contact:
How about a spawn system that spawns creatures upon entering an area or generic trigger with the following catches:
~Creatures are spawned from a table stored in a DB table via NWNX and a controlling script..
~Creatures to be spawned will be created on WPs placed in the area.
~When creatures are killed they are placed in another DB table then spawned again according to a pre chosen time.
In the end you would have for the module a spawn table and a timer table to respawn any killed creatures / NPCs.
When the spawn script fires a creature is created at the location that it is tied to in the table, which could be one WP or over several WPs.
Upon killing a creature / NPC that creature is placed on the timer list for respawn.
I can expand on this as I have worked w/ another PW that uses this very spawn system and have the coding as well. This could be adapted for use in Avlis / CoPaP.
Another beauty of this spawn system is that you can make on the fly changes to spawns by amending the spawn table. NPCs / creatures can be added or removed as needed by those w/ access to the DB.
~Creatures are spawned from a table stored in a DB table via NWNX and a controlling script..
~Creatures to be spawned will be created on WPs placed in the area.
~When creatures are killed they are placed in another DB table then spawned again according to a pre chosen time.
In the end you would have for the module a spawn table and a timer table to respawn any killed creatures / NPCs.
When the spawn script fires a creature is created at the location that it is tied to in the table, which could be one WP or over several WPs.
Upon killing a creature / NPC that creature is placed on the timer list for respawn.
I can expand on this as I have worked w/ another PW that uses this very spawn system and have the coding as well. This could be adapted for use in Avlis / CoPaP.
Another beauty of this spawn system is that you can make on the fly changes to spawns by amending the spawn table. NPCs / creatures can be added or removed as needed by those w/ access to the DB.

Playing as:
Master Odel Helmsplitter
Odel Helmsplitter- Hammer Fist Stylist, monk of The Order of The Dragon.
- Papainhell
- Sage
- Posts: 2138
- Joined: Wed Oct 01, 2003 1:09 am
- Timezone: Time?
- Location: Kodiak, Alaska (for now)
- Contact:
Now if we could just add a way to scale spawned creatures CR based on party and single player levels I'd say that would be a kick ass spawn system.
Of course you'd want static spawns in the tougher spots of the world or just up the CR...
Of course you'd want static spawns in the tougher spots of the world or just up the CR...

Playing as:
Master Odel Helmsplitter
Odel Helmsplitter- Hammer Fist Stylist, monk of The Order of The Dragon.