Module Builders Henchman Kit || Spells & Animal Companions not working?

Any builders familiar with the below package?
https://neverwintervault.org/project/nwn1/hakpak/original-hakpak/module-builders-henchman-kit

  1. I used this package way back when my module Surviving Horror 2 was first released in 2006, but in NWN: EE, my henchmen doesn’t cast spells when asked to do so through conversations anymore. Nothing happens at all. Anyone knows how to fix this?

  2. For some reason, asking them to summon their animal companions doesn’t work either, but summoning their familiars works. Anyone knows how to fix this?

Thanks in advance, I’d really appreciate the help! :slight_smile:
/ Birger

It would be good to know, which conversation it is. Then one can look directly in SH2.

Sure!

  1. The henchmen stuff in question regarding spells is located in the “frogrin_henchman” conversation :slight_smile: Where the PC can ask him to cast spells on himself or others.
    EDIT: Now when I think about it: Jina also has some spells, and they are located in “jina_henchman” conversation.
    The potential class spells used in this module are: Paladin, Ranger, Cleric & Sorcerer for Jina and Wizard & Bard for Frogrin.

  2. The animal companion one that isn’t working
    (and that should be available to her when she’s leveled as a ranger) is located in the “jina_henchman” conversation. The familiar one that IS working, is located in “frogrin_henchman” conversation, in case you want to compare them.

Asking the hanchi for summoning his companion will execute the following script (which can/should be taken over directly into the on action script of the dialogue):

//Henchman summons Familiar/Animal Companion
//set variable string SummonCreature = TAG of Creature
//to be summoned on oHench
void HenchSummonCreature69(object oHench = OBJECT_SELF);
{
 int nLevel = GetHitDice(oHench) - 1;
 string sCreatureTAG = GetLocalString(oHench, "SummonCreature");
 string sCreatureResref = GetStringLowerCase(sCreatureTAG);
 location lLoc = GetAheadLocation(oHench);
 SetLocalInt(oHench, "HasCompanion", TRUE);
 SetLocalInt(oHench, "HadCompanion", TRUE);
 ActionCastFakeSpellAtLocation(SPELL_SUMMON_CREATURE_I, lLoc);
 if(sCreatureTAG != "")
 {
  ApplyEffectAtLocation(DURATION_TYPE_INSTANT, EffectSummonCreature(sCreatureResref, VFX_FNF_SUMMON_MONSTER_1), lLoc);
 }
 else
 {
  ApplyEffectAtLocation(DURATION_TYPE_INSTANT, EffectSummonCreature("raven", VFX_FNF_SUMMON_MONSTER_1), lLoc);
 }
 object oCreature = GetObjectByTag(sCreatureTAG); // this will fail if the variable isn't set
 DelayCommand(1.0, LevelHenchmanUpTo(oCreature, nLevel, GetLevelByPosition(2, oCreature), nLevel));
 DelayCommand(1.5, AssignCommand(oCreature, ActionMoveToObject(oHench)));
}

There must be somewhere a variable “SummonCreature” set on the henchi. Afaics there is no variable set on Gina. The script will not work with the default “raven”.

Btw. I see there is room for modification, i.e. somewhere should be tschecked if the companion is already there etc.

I feel this kind of scripting is WAY over my experience level and I’m also busy with all of the other changes I’m making to SH2, untfortunately. :confused:
I remember that I just imported these scripts back in the day, without knowing completely how they worked (I mean, it is 18+ years since its first release, after all) :sweat_smile:

If you feel up to it, you’re welcome to edit the scripts, and then send them to me when you’re done :slight_smile: I’ll add your name to the Special Thanks Credits, of course, in case you accept! :smile:

But here’s the tags that I think may be needed for the fixes:

  • Jina’s animal companion’s tag is Lisa, and her model is located under Paint Creatures/ Custom/ NPCs/ Others

  • Frogrin’s familiar’s tag is Apollo, and his model is located at the same place as Lisa’s

If there’s anything else you need to know, just ask, and I’ll do my best to help! :smiley:

I had a closer look on it. Nor Gina or Frogin are supposed to have a pet. Wrong class. Frogin has the Familiar Feat, Gina has nothing here. So the dialogue option to summon a pet doesn’t even show up.

After giving her the Feat Animal Companion and setting the variable (see above) to Lisa, it works as intended (at least for me in a sandbox test scenario).

So, now I need to return to my hairpulling and brain damaging 3D modelling …

Thank you, Mmat, your help is always appreciated! :blush::blue_heart:

Initially, Yeah, Jina starts with Paladin and Frogrin with Wizard, but the player can choose to give them new levels in other classes.

Glad to hear you managed to summon Lisa when Jina had the feat, so that means the animal companion script works! :slight_smile:

Jina can level in Ranger – which should give her the Summon Animal Companion feat, but I now see, thanks to the wiki; that she gets it on 6th level Ranger, but on 1st level for Druid (which I think she can level in, as well). I’ll test that, to see if it works.

Next, is the magic spells for Frogrin as a wizard not working. He doesn’t respond to any spell related conversation commands. Like asking him to “cast a group of buffing spells” or “cast Protection from Elements” and stuff like that. Neither casting on the pc, on “yourself” or anyone else works for some reason.

And Frogrin’s starting level is a wizard, and his spells works normally in combat.

Good luck with the 3D modelling :blush:

Glad to hear you managed to summon Lisa when Jina had the feat, so that means the animal companion script works! :slight_smile:

… if you set the according variable on BOTH NPCs … I guess we are talking about the NPCs under “Creatures\NPC\Human” or “~\halfling”, right?

Concerning the casting: I created again a little sandbox and asked Frogrin to cast light (since the starting area is damn dark!)

Scripting works well until it comes to this. Variables are properly set, and the dialogue-option to have him cast this spell wouldn’t appear, if it’s not memorized:

ClearAllActions();
ActionCastSpellAtObject(nSpell, oTarget);

This is a core function. If I recall correctly, then this one is not without quirks & quarks. I suggest some recherche or a separate treat. I’m no expert in this, sorry.

Ah, okay, thanks for the help so far, @Mmat ! :smile:

If anyone else knows how to fix these spell scripts, feel free to post below, and I’ll add your name to the special credits section of SH2. :blush:

The scripts can be viewable in the module via the following conversations:

  • frogrin_henchman
  • jina_henchman