0
NESS Intro & Examples
Jaysyn904 edited this page 2022-02-11 17:35:52 +00:00
  • Introduction

NESS relies on waypoints to generate monsters instead of triggers and a script placed in the area's heartbeat event. You will not need to draw any encounter triggers. This has the advantage of allowing DMs to create and remove encounters on the fly. It manages to remain fairly efficient by spreading the work across multiple heartbeats instead of doing all of the processing each heartbeat.

DC's area heartbeat script will be dc_area_spawn_hb. You only need to use this script in areas that will have spawns of some kind.

Since it doesn't use triggers, by default, monsters are always spawned and don't wait for PCs to get close before appearing.

The type and number of monsters as well as other special behaviors (like respawn delay) are determined by each waypoint's name and tag.

The tag of a waypoint determines which monster, or predefined group of monsters, to spawn. The name of the waypoint is comprised of a list of flags that determine all the other spawn behaviors.

  • Basic Usage

This example is for generic NPCs that are meant to be in an area. Commoners, merchants, guards, that sort of thing.

  1. Create an NPC as a Creature blueprint. You'll have to do this for every NPC you want in the area. Make sure they have a separate tag.
  2. I've added a new Waypoint under the Empty category with the really bizarro name of SP10_PC02R_SF. You don't need to understand what all of those letters mean, but this is how you're going to spawn in NPCs!!!
  3. Put the Waypoint down where you want the NPC to be, and orient it to where you want the NPC to face. The NPC will spawn at the point where the white flag of the waypoint touches the ground.
  4. Set the Waypoint's tag to the tag of the NPC you want to spawn.
  • Modifying Waypoints for Different Spawn Behavior

The basic spawn point looks like this:

Waypoint tag: c_goblin (this is the standard goblin creature resref in NWN2) Waypoint name: SP Result: A single goblin is spawned at the waypoint. If he is killed, another is spawned at the next cycle (by default, a cycle is 1 heartbeat). If he is drawn away from the spawn point by combat or DM possession, he will return to the spawn point when he's done being distracted. NESS spawned creatures are a little bit better behaved that way.

If we want to spawn multiple creatures, we will probably want to use the SN (spawn number) flag. The SN specifies the number of creatures the spawn point will try to maintain. This is basically the maximum amount of creatures this spawn will ever have out there at once. Follow the flag immediately with a number to specify how many goblins.

Waypoint tag: c_goblin Waypoint name: SP_SN4 Result: This spawn point creates one goblin per cycle until there are 4 goblins. If a goblin gets killed, he's replaced at the next immediate cycle.

OK, so that's not very useful for monster spawns by itself. To spawn multiple creatures at once, we have to use the SA (Spawn All at once) flag.

Waypoint tag: c_goblin Waypoint name: SP_SN4_SA4 Result: Now the spawn will create up to 4 goblins all at once in a single cycle. There will still never be more than 4 out there at the same time.

I'm going to go into optional flags here to show how NESS can randomize encounters. In the documentation, you can see the SA flag has the optional flag 'Mn' which you can use by following the SA flag immediately with 'M' and a number (up to 2 digits, in this case).

Waypoint tag: c_goblin Waypoint name: SP_SN4_SA4M2 Result: This spawn functions like the above, except that it will attempt to create between 2 and 4 goblins per cycle, but only until there are 4 goblins out there.

In order to create a respawn delay so that all the goblins aren't being created one after another, we have to use the SD (Spawn Delay) flag. It has an optional flag that lets us randomize the respawn delay similarly.

Waypoint tag: c_goblin Waypoint name: SP_SN4_SA4M2_SD10M5 Result: Now our spawn is starting to look more like the ones we have in NWN, but just a bit more randomized. This one will spawn 2-4 goblins every 5-10 minutes, up to a maximum of 4 goblins out at once.

Now for some cool things that NWN encounters don't do or don't do well. DO and NO are the day only and night only flags. This spawn only creates creatures during certain periods. The option 'D' specifies that we should despawn creatures if there are any left at nightfall and daybreak respectively.

Waypoint tag: c_goblin Waypoint name: SP_SN4_SA4M2_SD10M5_DOD Result: Our goblins will now spawn only during the day. If there happen to be any alive when night falls, they are despawned.

The PC flag allows us to only spawn creatures when PCs are around and despawn them when PCs are not around.

Waypoint tag: c_goblin Waypoint name: SP_SN4_SA4M2_SD10M5_DOD_PC2 Result: Our goblins only spawn when PCs are around (during the day) and go away if there are no PCs in the area for 2 minutes or if night falls.

If we want to randomly spread our goblins out, we can use the SR (Spawn Radius) flag. It makes the goblins spawn anywhere in the circle centered at the spawn point with the radius specified.

Waypoint tag: c_goblin Waypoint name: SP_SN4_SA4M2_SD10M5_DOD_PC2_SR20 Result: Our goblins will spawn anywhere within 20 meters of the original spawn point and then proceed to wander around.

A cool option for the SR flag is the P flag. It makes the goblins always spawn near a random PC in the area instead of near the spawn point. These are good for truly random encounters since the monsters will always spawn near PCs no matter where they are in a dangerous area, making even resting a somewhat risky proposition. You'll have to be careful about putting too many spawn points in the same area with this flag, though, since a single PC entering the area could potentially be hit with all the spawns at once if you haven't set them up right.

Waypoint tag: c_goblin Waypoint name: SP_SN4_SA4M2_SD10M5_NOD_PC2_SR30M20P Result: Goblin ambush. 2-4 goblins appear 20-30 meters from the PCs every 5-10 minutes. For this one, they only spawn at night. Good for goblin caves or something.

The EE (Entrance/Exit) flag is damn cool. Instead of simply appearing at their spawn point, creatures will appear at an entrance waypoint and walk to their spawn point.

Waypoint 1 tag: c_goblin Waypoint 1 name: SP_SN4_SA4M2_SD10M5_NOD_PC2_SR20_EE00

Waypoint 2 tag: EE00 Waypoint 2 name: <doesn't matter>

Result: Our goblins will now spawn at the waypoint tagged EE00 and walk to some point within a 20 meter radius of the spawn point. I removed the RW flag since it shortcircuits the path walking, making the goblins start wandering around before they reach their destination. If you wanted to put another entrance point in the same area, you would use the flag EE01 for the other spawn point and create a waypoint with the tag EE01.

The NESS can actually create placeables too. This is cool because we can easily make chests that are locked, bashable, and randomly trapped. This will make rogues more important since treasure is locked up (and bashing the chest, of course, will cause some of the loot to be get trashed). Placeables are created with the PL flag.

Waypoint tag: dc_example_chest (whatever chest resref you use) Waypoint name: SP_SD10P_PL3P10_SF Result: Spawns the example chest every 10 minutes. If there is junk left in the chest, it refreshes, filling with new goodies. If the chest has been destroyed, it is recreated in 10 minutes. The SF flag is used to specify that the chest faces the same direction as the waypoint, so that it's not pointing in some wonky direciton...like facing a wall.