Skip to content

Trying to ensure a sorcerer NPC villain stays away from melee and only casts spells...

I have an encounter where oPC meets a villain and his thug minions. All begin the encounter as faction Commoner, so a conversation can take place. At the conclusion of the convo, a script changes them to adversaries, adjusts their faction dislike for oPC, and begin combat. The script calls the sorcerer to back away from oPC to a nearby waypoint so his henchmen can do the melee fighting, the intent being the sorc will then begin peppering the oPC with offensive and debuff spells from a safe distance.

The script is very simple and fires just fine, villain moves away and henchmen begin melee. But then villain rushes back and begins kicking and punching oPC! There are occasionally attempts to cast spells but they typically get interrupted by the combat. The sorc villain isnt even carrying a melee weapon.

I have many other encounters with low level spawned in bad guys and the spellcasters among them typically behave as you'd expect, they hang back and cast rather than attempt melee. I'm wondering what might be set wrong on this particular NPC. He's the "main bad guy" of the entire module so it's important to me that he be revealed as a coward who let's his thugs do his work for him. But he seems (suicidally) determined to throw close-quarters kung fu at the good guys.

Comments

  • TerrorbleTerrorble Member Posts: 185
    Does your caster have Combat Casting?
    What class levels do they have?
    What's their casting stat score?
    Are their spells setup in their spells list or as special abilities?
    Are they wearing armor or using a shield?

    Beyond that, you can set X2_L_BEH_MAGIC|Int|100 on the NPC and see what that does.


  • SarchimusSarchimus Member Posts: 3
    Pure Sorcerer(*), lvl 13.
    No armor(**) or shield.
    As sorcerer casting stat should be charisma right? and he has a 20.
    Spells were hand selected as spells. Note: as I mentioned, he WILL cast spells, but he rushes into melee first. This typically results in his spells being interupted (I could give him combat casting feat, but that solves a different problem than the one I'm having...).
    I actually have the X2_L_BEH_MAGIC variable on him, set to 100. I have not seen that have any effect. Is this variable called from a script I need to have running at the time? Or how else does the game know to govern his behavior according to the variable?

    (*) I do admit that he is built from a template I made for lots of generic human NPCs which had some other class levels as the default; I eliminated those and gave him sorc levels instead. I wonder based on your question whether there is now something hard coded on this creature since its creation for it to behave as a more aggressive fighter. I may just cook up a new sorcerer from scratch using the creature wizard to test this.

    (**) He is wearing custom "robes" I made, but now that you've asked that interesting question, I wonder if they are "robes" only because I'm using the "robes" appearance of what may have started out as light armor.

    I don't have access to my module at the moment but you've given me a few clues where to look.
  • SarchimusSarchimus Member Posts: 3
    Edit: SOLVED, I think. I was using ActionAttack, which is specifically an instruction to attack with a weapon. DetermineCombatRound appears to be the correct instruction and the NPC is choosing to cast spells.
Sign In or Register to comment.