Scripting AIs? ---> custom reaper
Posted: Fri Aug 17, 2007 2:01 am
I would like to add two new simple AI types. I am not sure if they should be hardcoded, or coded via JS.
Type 1: Archer/Mage ----> Enemy is FROZEN in place, does not move, but throws spells and/or missle weapons until the PC is in range, then Melees. As soon as magic points go to zero, the mage attacks the enemy like default NPCAI = 2.
Reason? Too many weak, yet magically powerful mages, go and attack the PCs and get killed fast. Same with archers. This way the GM can set up ambushes where mages and archers are in the rear and warriors charge attacking PCs. If an archer is set to this AI type and has no magical ability, he will remain frozen indefinetly because he will have no MP to use up.
Type 2: Ultima IV style Reaper -----> Ultima IV had reapers that would NOT move, but would act as difficult barriers to get past. Using a varient on the above "type 1" AI, an enemy set to this AI would NOT move at all in combat. Instead he would throw magic (if allowed) or shoot his missle weapons.
Unless the C++ code is hardcoded that an NPC MUST chase a PC in combat mode, I wouldn't think these AI codes would be too difficult to code. I am just unsure where to begin. If necessary, I could "force" a paralyze spell on the NPC until MP is used up, and then remove the spell effect. There may be an easier way.
Thanks!
Type 1: Archer/Mage ----> Enemy is FROZEN in place, does not move, but throws spells and/or missle weapons until the PC is in range, then Melees. As soon as magic points go to zero, the mage attacks the enemy like default NPCAI = 2.
Reason? Too many weak, yet magically powerful mages, go and attack the PCs and get killed fast. Same with archers. This way the GM can set up ambushes where mages and archers are in the rear and warriors charge attacking PCs. If an archer is set to this AI type and has no magical ability, he will remain frozen indefinetly because he will have no MP to use up.
Type 2: Ultima IV style Reaper -----> Ultima IV had reapers that would NOT move, but would act as difficult barriers to get past. Using a varient on the above "type 1" AI, an enemy set to this AI would NOT move at all in combat. Instead he would throw magic (if allowed) or shoot his missle weapons.
Unless the C++ code is hardcoded that an NPC MUST chase a PC in combat mode, I wouldn't think these AI codes would be too difficult to code. I am just unsure where to begin. If necessary, I could "force" a paralyze spell on the NPC until MP is used up, and then remove the spell effect. There may be an easier way.
Thanks!