Author Topic: Make spellcasters actually use magic.  (Read 363 times)

Legacy_The Mostly Silent One

  • Newbie
  • *
  • Posts: 8
  • Karma: +0/-0
Make spellcasters actually use magic.
« on: March 23, 2011, 04:27:07 pm »


               I have a standard enemy spellcaster.  Level 5 sorcerer.  However, they apparently feel that running up and duking it out with the PC is a far better combat choice than blasting him, making them at best good for a laugh and not a challenge.  How can I fix this?
               
               

               
            

Legacy_Shadooow

  • Hero Member
  • *****
  • Posts: 7698
  • Karma: +0/-0
Make spellcasters actually use magic.
« Reply #1 on: March 23, 2011, 04:44:48 pm »


               1) give him combat casting
2) try setting a variable X2_L_BEH_MAGIC to 99999
3) if none of this work try Community Patch 1.70
               
               

               
            

Legacy_The Mostly Silent One

  • Newbie
  • *
  • Posts: 8
  • Karma: +0/-0
Make spellcasters actually use magic.
« Reply #2 on: March 23, 2011, 08:38:31 pm »


               1/2 didn't work.  I'll try the community patch.
               
               

               
            

Legacy_The Mostly Silent One

  • Newbie
  • *
  • Posts: 8
  • Karma: +0/-0
Make spellcasters actually use magic.
« Reply #3 on: March 23, 2011, 08:39:32 pm »


               3 didn't work either.
               
               

               
            

Legacy_420

  • Sr. Member
  • ****
  • Posts: 370
  • Karma: +0/-0
Make spellcasters actually use magic.
« Reply #4 on: March 23, 2011, 11:12:50 pm »


               According to the script "x2_inc_switches" the valid values for the local int X2_L_BEH_MAGIC (which must be set on the creature's blueprint) range from 0 to 100.(100 meaning 100% of the time and 0 for never).

Also keep in mind that your sorcerer needs charisma to cast spells.

-420
               
               

               
            

Legacy_Shadooow

  • Hero Member
  • *****
  • Posts: 7698
  • Karma: +0/-0
Make spellcasters actually use magic.
« Reply #5 on: March 23, 2011, 11:53:13 pm »


               

420 wrote...

According to the script "x2_inc_switches" the valid values for the local int X2_L_BEH_MAGIC (which must be set on the creature's blueprint) range from 0 to 100.(100 meaning 100% of the time and 0 for never).

Also keep in mind that your sorcerer needs charisma to cast spells.

-420

Good point with the blueprint, but if the creature is in placed manually into area, keep in mind that if he changes it in blueprint (or say palette) then he must drag the creature from blueprint again.

As for values:

x0_i0_generic.nss

    nMagic = nMagic + AdjustBehaviorVariable(nMagic, "X2_L_BEH_MAGIC");
    nOffense = nOffense + AdjustBehaviorVariable(nOffense, "X2_L_BEH_OFFENSE");
    nCompassion = nCompassion + AdjustBehaviorVariable(nCompassion, "X2_L_BEH_COMPASSION");

Also when doing community patch and trying to fix some AI issues I found out that value of 100 don't have to work because nOffense or nCompassion may contain values much higher than 100. Thats why I adviced 9999.

oh, yea charisma... creatures need sufficient caster ability score to cast spells unless you set the spells via special ability tab where they can cast without it

if neither charisma was the problem, send me that creature via some web service and I take a look
               
               

               


                     Modifié par ShaDoOoW, 23 mars 2011 - 11:55 .
                     
                  


            

Legacy_The Mostly Silent One

  • Newbie
  • *
  • Posts: 8
  • Karma: +0/-0
Make spellcasters actually use magic.
« Reply #6 on: March 24, 2011, 05:22:25 pm »


               I got it working.  The variable and raising the Charisma fixed the problem.  Thanks.