Encounters are special triggers which essentially spawn a group of creatures onto the map when stepped on.

They use the UTE filetype.

What Are Encounters in D&D?

Encounters in D&D are meant to provide some reasonable difficulty for a player to use resources (HP, spells, etc.) to overcome. In Neverwinter Nights these are generally hostile creatures.

Challenge Rating in 3.0E is defined as:

A monster's Challenge Rating (CR) tells you the level of the party for which that monster is a good challenge. A monster of CR5 is an appropriate challenge for a group of four 5th-Level characters.

So what does this mean in Neverwinter Nights terms? Well, a PC, plus their PC friends and some followers (who may be summons or henchmen) are added up and this allows a certain amount of CR to be spawned.

Encounter Placement

In the toolset find an encounter, draw a polygon on the ground. Simple as that - the area when entered will trigger the encounter (if the encounter is active).

The first point in the generated polygon is the location returned by GetLocation when used on the object. This also appears to be the "encounters default location" when trying to find a space to spawn creatures (if it fails it just uses this spot). You can find the initial point by using Focus On Object and zooming in - that is the point that is the encounters location/position.

You can copy and paste placed encounters (which copy any edits made); blueprints then can update every instance of them by selecting Update Instances under Advanced.

Spawn Points

The spawn point is optional (but highly recommended). If not placed it should "spawn them outside of LOS" according to the GFF info, but on further testing this seems to simply mean "I'm lazy and will spawn at GetLocation(oEncounter)". So please use encounter spawn points.

To place a related spawn point right click an encounter and select Add Spawn Point. Then place it down. This acts as an "anchor" for the spawn, although obviously one solo monster will spawn right on top of it. Note: There is no way to find these spawn points (or relate them to the parent encounter) since they are essentially just a "location" (they have no independent tag or anything).

These spawn points are invisible in the toolset unless an encounter is selected (since they're not true objects, only existing as part of the parent encounter info). The spawn points can be rotated only using the buttons on the bottom of the toolset (for some reason the only right click option is Delete). The rotation determines the rotation of the creatures that are spawned at that location.

If placed outside of walkable areas, it seems to default back to trying to spawn things as if no spawn point was used (ie; directly behind the player!).

Encounter Blueprint Creation

Basic

FieldValue TypeDefaultDescription
NameText
Human readable name of the encounter used in the pallet and DM in-game lists
TagText (32 characters)
Tag of the encounter (usually 32 characters maximum). How to get an object by GetObjectByTag.
DifficultyDropdown (encdifficulty.2da)Easy

An entry from encdifficulty.2da - see below. This alters the challenge of the creatures spawned. Can be get with GetEncounterDifficulty and set with SetEncounterDifficulty in a script.

Note all the Standard pallet encounters appear to use "Normal" (which adds 2). Very Easy is 0, Easy is 1, Normal is 2, Hard is 5 and Impossible is 8.

Maximum CreaturesNumber 1-88The absolute maximum amount of creatures to spawn.
Minimum CreaturesNumber 1-82The suggested minimum amount of creatures to spawn. Note the minimum may be decreased down to 1 if a suitable CR creature isn't found.
Spawn Option

Single Shot

Continuous

Single Shot

Single shot fires off once (unless re-enabled by a script).

Continuous will allow Advanced options to have the encounter respawn (needs further testing)

CategoryToolset Category
Category the blueprint lives in. Unavailable on placed triggers.

Creature List

This provides a GUI to add creatures from the pallets to the encounter. Each creature blueprint can only be in the encounter list once. You cannot for instance have both a "Unique" creature and a "Non-Unique" one of the same blueprint.

Note the faction of the creature is not listed, and in fact has no bearing on the encounter firing - so you can have a "Hostile" faction trigger create "Defender" creatures.

Scripts

The scripts fire as per any normal trigger scripts, and have OnEnter, OnExit, OnHeartbeat and OnUserDefined as usual, with an additional OnExhausted which is only available for encounters and fires when the encounter is done respawning monsters.

Note OnExhuasted may be a little buggy with save games.

Advanced

FieldValue TypeDefaultDescription
FactionFaction dropdown listHostileOne of the default or custom module-specific factions. It must be hostile to an entering creature to fire (even if the monsters spawned from it are not hostile).
ActiveTickboxTickedIf unticked it won't fire unless a script enables it using SetEncounterActive. Vice versa an already active encounter can be disabled with the same command later.
Encounter RespawnsTickboxUntickedOnly available if "Continuous" is selected for the Spawn Option. It allows a constantly repopulating encounter.
Respawn Time (Seconds)Integer 1 - 3200060In game seconds so pausing the game pauses this respawn timer. It is very likely to be affected by SetTime.
Number of Times To RespawnInteger 0 - 320000The number of times this encounter should respawn. You can get it in a script with GetEncounterSpawnsMax and set it in a script with SetEncounterSpawnsMax. You can also even get the current spawn counter with GetEncounterSpawnsCurrent and set it with  SetEncounterSpawnsCurrent.
Infinite RespawnTickboxUntickedIf ticked Number of Times To Respawn is greyed out. For some reason this isn't a findable property in a script - unknown how it affects the GetEncounterSpawnsMax function.
Player Triggered OnlyTickboxTicked

On by default. This means a player character (not DM) will trigger this only.

I don't think associates (eg; henchmen) would, but a possessed familiar might?

Bluerpint ResrefText (16 characters)
The filename of the blueprint. Only editable if doing Edit Copy of an original. You'd use this field in CreateObject if it worked with encounters.
Update Instances-
Unavailable outside of blueprint instances. This will update all the matching resrefs placed in the module, overriding any changes made to the placed ones (which create a duplicate copy of all the settings on an encounter). Handy if the blueprint one is authoritative.
Variables-
Encounters can have variables (int, string, float) placed on them as per any other object.

2da Relations

The encounter system has the encdifficulty.2da loaded which contains the contents:

2DA V2.0

          LABEL          STRREF      VALUE
0         VeryEasy       5543        0
1         Easy           5544        1
2         Normal         5545        2
3         Hard           5546        5
4         Impossible     5547        9

This 2da links the VALUE column. The GFF documentation states "Value to add to the game's calculated encounter level.". The calculated level is...?

Annoyingly this value is not shown in the toolset.

How Encounters Work

At their simplest (one trigger and one spawn point) a create that is hostile to the encounter will make the encounter spawn. EG: You can have a "Defender" encounter which is actually triggered by a walking "Hostile" creature. Generally most encounters are set to Hostile and are triggered purely by PCs (see setting Player Triggered Only in the Advanced panel).

Generation of What Spawns

You have an encounter with a variety of monster CR's, "Unique" flags and the like, so what actually spawns and why?

Calculating the "Party level" would be done (probably things in a certain distance) then it likely compares it to the monsters available and figures out a good fit for spawning with some randomness built in.

How many creatures spawn? Tellingly in the GFF document it has this note: "Recommended number of creatures. Maps to "Min Creatures" field in toolset, but is not a true minimum, because it is actually possible for the encounter system to spawn fewer than this number of creatures if it cannot find enough creatures to fit the level of the encounter."

Where do things spawn

The spawn points govern where things spawn and the furthest one from the triggering creature is chosen. If none exist the game will try to spawn creatures out of visible range. Expect very barmy results if this is used since "out of visible range" usually means "behind the player".

A note on the GFF says: "The SpawnPointList is only saved out if the encounter has spawnpoints defined for it in the toolset.Spawn points define a set of locations at which the game may spawn in creatures belonging to the Encounter. If an Encounter has no defined spawnpoints, then the game will try to spawn creatures out of visible range of the creatures that fired the Encounter."

Creature Creation

There are some special properties of creatures spawned from encounters. At the very least since encounters can potentially "respawn" the encounter is told whenever a creature dies/is destroyed so it can repopulate the encounter.

A few script commands can be used on encounters as detailed on the lexicon. Sadly a lot of the information that is stored in-game about encounters is unavailable to access or change (eg; when encounters are spawned, the state of the encounter spawn pool, etc.).

UTE Contents

The GFF contains a number of fields in the blueprint/copy in the area which are mostly exposed in the toolset itself.