Author Topic: Need help scripting an undead training area  (Read 314 times)

Legacy_HipMaestro

  • Hero Member
  • *****
  • Posts: 2849
  • Karma: +0/-0
Need help scripting an undead training area
« on: October 11, 2012, 09:18:29 pm »


               Actually, I need more than help.  I probably need the script itself.  Lilac's generator doesn't seem to offer Turn Undead as a viable script option (at least, I couldn't find it anywahere) so I am pretty much dead in the water for a starting point.

Here is the scenario I would like to provide.  There are two parts:

First, OnPerception as soon as the NPC spots a party it begins to spam Turn Undead attempts until the entire party (or that portion that is undead) is turned or runs out of turn attempts.  I am assuming the AI will prevent the NPC from trying to turn anything that is NOT undead.

Secondly, (and I don't even know if this is viable), I would like to customize the summoned creatures for Turn Resistance to decide how strong (in HD and skin property) to make both the summoned party members and the turners.  I am assuming summoned creatures also use skin properties but no even sure about that.

TBH I've had no luck locating any of the resref blueprints for the summoned versions and have been led to believe they are different from the default palette versions.  Also, some like the Warrior Lord (supposed to be something like X2_S_MUMMYWARR IIRC), I cannot locate anywhere using just the toolset utility.  Maybe in a 2da someplace?

Apologies for the noobness of this request but I am attempting to lend a hand piecing together something for our mini LAN group.  I'm not building the module itself, just doing some housekeeping and conceptualization.

Even the Lexicon didn't seem to contain any information regarding scripting Turn Undead for use by an NPC so am lost now.  Any leadership would be appreciated. 

TIA,
Hip
               
               

               
            

Legacy_Lightfoot8

  • Hero Member
  • *****
  • Posts: 4797
  • Karma: +0/-0
Need help scripting an undead training area
« Reply #1 on: October 11, 2012, 10:10:41 pm »


               I do not have a lot of time right now. But perhaps a nudge will get you going in the right direction.

Turn Undead should be a feat. So to script its use you would use the ActionUseFeat function.

It also may be better to use a special AI script instead of the OnPerception.
               
               

               


                     Modifié par Lightfoot8, 11 octobre 2012 - 09:12 .
                     
                  


            

Legacy_HipMaestro

  • Hero Member
  • *****
  • Posts: 2849
  • Karma: +0/-0
Need help scripting an undead training area
« Reply #2 on: October 12, 2012, 01:56:13 am »


               Thanks for the nudge, Lightfoot. '<img'>  I'll check out the Lexicon and see if I can hash it out.  At least, it appears that Turn Undead is not treated as spellcasting action so that possibility has been eliminated.

The reason I've used OnPerception to activate NPC actions for testing is that I have no experience writing or modifying an AI.  None.  Zilch.  So if you could suggest a tutorial how to go about that, I'd give it a whirl.

edit: I had a bit of luck using the Lilac scripter.  Apparently Turn Undead IS treated as a spell, or at least a spell-like ability, so have found the action I needed to fire.  A custom AI would probably be better but without any experience designing one, well... it comes down to a quick and dirty OnPerception action for me.  Now the only crucial issue is how to customize the blueprints for summoned undead and that is not a scripting issue, at least I wouldn't think it would be.
               
               

               


                     Modifié par HipMaestro, 12 octobre 2012 - 11:57 .