The purpose of this system is to enable certain creatures to 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.
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:
Setting up a module and testing the system:
1. Open a module
2. Import this ERF into the module
3. Add several of the "Dire Spider, Jumping" to an area with a chasm.
4. Test the mod.
Creating additional jumping creatures:
1. Create a new creature
2. Edit Properties
a. Select the "Advanced" pane
b. Click the button marked "Variables"
c. Enter a new variable
name: X2_SPECIAL_COMBAT_AI_SCRIPT
type: string
value: _ai_jump_spec
d. Click "Add"
e. Click "OK" on the Variables window
f. 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.
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
A module which demonstrates jumping spiders and panthers. The panthers have a short range. You can experiment with increasing this range by adjusting the local float MOVE_JUMP_DISTANCE which is set on the Panther. This is how you set explicit distances for a particular creature.
Posted by The Thayan at 2012-10-15 21:04:06 Voted 10.00 on 10/15/12
Nice work. Very cool and a neat way to help monsters stay dangerous. _________________________ Thay - Realm of the Red Wizards A NWN persistent world found under the Roleplay section of Gamespy.
I'm glad to see some interest. If you see room for improvement, please let me know. _________________________ Vault Submissions | Arnheim | Beyond Vives
Posted by Daijin at 2012-07-02 12:22:48 Voted 10.00 on 07/02/12