As of now, this scripting package is designed for NWN:EE. This is because it is using the SetEventScript functionality. To make it work under 1.69 requires to add extra code into NPCs default OnDeath script so the encounter can trigger OnExhausted reliably. Also, scripts using NWN:EE functionality will probably cause issues when used under 1.69 therefore 1.69 is unsupported right now.
For those who doesn’t know, the vanilla encounter system is very limited. It does allow to specify multiple npcs inside it, however the encounter selects the npcs itself based on encounter difficulty you choose, npcs CR and entering player’s party power. This causes the encounter to spawn stronger or more enemies the stronger is player (and his party) which can be either annoying or even unwanted (for example, player moving through low lvl areas will spawn tough nps which can be used to grief other lowbie players in area or the opposite, high lvl player can spawn extreme amounts of weak npcs than would otherwise spawned for player of intended level to help other lowbie players with experience grinding). Even if it would be wanted, builder has almost no control over the result spawned group and it is extremely hard to test it properly so the encounter works same for all players. Also, the spawn points of vanilla encounter are hard to use because encounter will always choose the farthest spawn point from the position of the player triggering the spawn.
As for NESS, this spawn system is waypoint based. There is nothing wrong with this approach and NESS has lot of features over this package, however I always liked the ability to determine precisely spawn area and spawn points.
This spawn system works closely to the vanilla encounters but gives builders more control. At the beginning this was supposed to have an extra conditionals like NESS, such as spawn at day/night etc. but the methods used to do that were complicated and user unfriendly so I removed them. These conditionals can be added via scripting, but are not implemented inside the encounter scripts. This might be added later if this becomes popular and lot of users will demand it. Right now this spawn system only chooses random spawn group and random npcs.
The advantages against vanilla encounters are this:
1) Builder can specify multiple spawn groups:
Each group can consist up to 10 npcs, npcs doesn’t need to be unique, you can define one group as “zombie1,zombie1,zombie1,zombie1”. Likewise, npcs doesn’t need to be of similar CR, or even faction, you can put into same group 2 zombies and one balor, encounter will select the npcs semi-randomly. Number of groups is not limited and they can be completely different. You can have undeads in first group and animals in second group. Spawn will select one of the group randomly (after taking any conditions for groups set by builder into account).
2) Builder can specify Minimum and Maximum NPCs for spawn encounter itself, for each spawn group specified, and for each NPC in each group. This can be used to ensure the spawn will always spawn 2-4 goblins, 1-2 goblin shamans and 1 goblin chief and 0-1 goblin sapper etc. Unlike vanilla encounter, the numbers are random and aren’t influenced by NPCs CR or players power.
3) Builder can specify multiple spawn points for spawn encounter itself and specific spawn point for each NPC in each group. Normally, spawn encounter will select farthest spawn point from the position of the player triggering the spawn. This matches vanilla encounter, however in case this isn’t sufficient you can specify spawn point for each npc in group. This can be used to ensure that the goblin chief will always spawn at specific spawn point or that group1, the undeads, will spawn left side of the map and group2, the animals, if selected, will be spawn at right side of the map.
Also, builder can specify that a random spawn point is selected, instead of farthest. (for creatures that doesn’t have their own spawn point specified)
Note, that the spawnpoints doesn't have to be in same area (though using this doesn't work well with the default setting to use farthest spawn point from player, it should be used for specific spawn point or with random spawn point mode).
4) Builder can define maximum number of spawns for encounter itself or each group. This can be used to imitate vanilla encounter Single Shot mode but grants much higher control. You can make spawn encounter to spawn anything for any times you want not just once or infinite and you can also this specific to each group, thus you can make a spawn encounter which will spawn either zombies (group1) or animals (group2), but zombies can be spawned only three times, after three spawns of zombie group, only animals will ever be spawned.
5) Additional options:
possibility to specify time limit after which NPCs from spawn will despawn
possibility to specify spawn VFX effect that will be applied on all npcs spawned
possibility to specify experiences that will be granted to the party that kills last creature from the spawn encounter.
6) It can be also used from placeable or doors.
7) Builder can modify/influence the behavior of the spawn with custom scripting commands on the fly.
Respawning works same as for vanilla encounter, respawn countdown starts only after last NPC from encounter is killed or despawned, after the specified amount of time passes, spawn encounter is reactivated (unless it reached max limit of spawns...).
The only disadvantage this package has is inexistence of custom toolset GUI so all the settings must be specified using variables on trigger and spawn points needs to be painted as waypoints. This is shared problem to all custom script systems though.
Full readme here.
Attachment | Size |
---|---|
![]() | 14.79 KB |
This is some heavy duty stuff. Always like variable systems. Great work and thank-you for sharing.
FP!
This is very much what I've been looking for! Thanks!
This looks very promising. I will look into it when I have the time.
Did a look into this, 'cause I got a prob with NESS 8. I wanted to limit the activation from area to a trigger. This adaption should work with an AOE and activate only these spawns that where within this AOE :) Done some tests and got it to work, with a look into this, my work was smoothier ;)
Thank you for sharing!
GJ Shadoow,as always.
The documentation refers to a "Min" and "Max" that can be set on the trigger:
... but these don't appear to be used by the include script. Is that right, or did I miss something?
Hey Tsais, you are correct there seems to be some issues within documentation. I did not fix those since nobody mentioned it (which means that till now nobody used it). So I abandoned this project at least on vault. I am still using it for my own purposes and made some improvements/new features. Contact me on CPP discord if you are interested.
Ah, okay. I decided to write my own spawner, but thank you for offering to share!
Also, just a note for anyone trying this who might be confused by the documentation: if you set a local string var on your trigger like this:
... then the default settings will produce 1-2 creatures total, and the group will be composed of a mix of creature resrefs chosen from this group. It could be 2 skeletons, or 1 rat and 1 zombie, or 2 zombies, or any other combination. Use MAX_GROUP_1 and MIN_GROUP_1 to set upper and lower boundaries if you want something other than 1 or 2. "Min" and "Max", as previously mentioned, don't seem to be working when set as trigger variables.