Neverwinter Nights

File information

Last updated

Original upload

Created by

Henesua

Uploaded by

henesua

Virus scan

Safe to use

About this mod

(NWN 1 - AI Scripts) The purpose of this system is to enable certain creatures to recognize and leap obstructions in the tileset, such as chasms, or complicated wok meshes.

Permissions and credits
AI - Jumping Creatures (NWN 1)
by Henesua


The purpose of this system is to enable certain creatures to recognize and leap obstructions in the tileset, such as chasms, or complicated wok meshes. This functionality is enabled through the X2_SPECIAL_COMBAT_AI_SCRIPT so it does not require any of the creature scripts to be adjusted. It does however require that DetermineCombatRound be called by the AI. Most AI's even custom AIs typically make use of this generic function.

At the start of each round of combat, the monster with this special AI will check to see if it is stuck (at the edge of a cliff perhaps) trying to attack or flee from an enemy. If it is stuck for more than one round, it will try to jump towards (or away from) its enemy.

Included:
This ERF includes one Special Combat AI Script, and an example creature that exhibits the jumping behavior. For the creature, see the "Dire Spider, Jumping" in the creature palette under Custom : Monsters : Insects : Spiders.

Possibilities for future development include adding flying creatures, and teleporting creatures. I've considered swimming, but am unsure how to discern watery obstructions from other kinds.

INSTRUCTIONS:
Installation in an existing module:
  • Open a module
  • Import this ERF into the module
  • Add several of the "Dire Spider, Jumping" to an area with a chasm.
  • Test the mod.


Creating additional jumping creatures:
  • Create a new creature
  • Select Edit Properties
  • Select the "Advanced" pane
  • Click the button marked "Variables"
  • Enter a new variable:
    name: X2_SPECIAL_COMBAT_AI_SCRIPT
    type: string
    value: _ai_jump_spec
  • Click "Add"
  • Click "OK" on the Variables window
  • Click "OK" on the Creature Properties window


Note:
Spiders are considered a special "jumper", and gain some benefits such as the ability to knockdown enemies that they jump on, as well as the ability to cross exceptional distances indoors (assuming that they climb on ceilings and walls to cross chasms/obstructions). To indicate that your creature is a spider, include "spid" in the creature's tag, and give it Race: Vermin.

More Reading: Bioware Social Thread

THANKS
Thanks to Lightfoot8 in the Bioware Social Forums for the idea of using the Special Combat AI Script to handle this behavior.

CHANGE LOG:
v1.1 - added explicit calls to attack after jumping
- flag set to skip normal combat ai after a successful move/jump