Paladin henchman won't use Divine Might in combat. Can I do something?


I must have messed up at copying time, because now I used the right cornerside copy function and it compiled.

Thank you very much.

@kevL_s according to this post:

it seems like there might be a fix to apply to the NWN fixes modpack?


I don’t know what this NWN fixes modpack is, what I know is that there are two fixes for this: one is to change the category to 22 instead of **** in the feats.2da and use TonyK AI as suggested by Grymlorde and the other is to use the script made by NWSHacker.
The first solution is easier but the ai is a little dumb and sometimes use the buff when the enemy is almost dead or if uses at all. The second solution the ai is much smarter and if it detects a difficult enemy the henchmen uses DM right at the start of battle.

There’s a nwn2Fixes package in the Vault. nwn2 (stock) has a lot of bugs … but with the nwn2Fixes pack it has … less bugs.

although the nwn2 AI uses the nwn1 AI for some things we should probly take this to the fixes thread. Unfortunately I don’t have the time/inclination/nrg to look into this since it’s gonna be complicated (time-consuming) to setup and investigate … eg TonyAI or not, etc.

ofc anyone w/ nwn2 can start looking into it,

1 Like

It isn’t that smarter since it uses DM constantly but only if enemy isn’t a total wimp :sweat_smile: After all this was a demo rather than a complete package. It can be however easily modified to not use DM against seriously wounded enemies:

#include "nwsh_dcr"

// AI control constants - when to use DM
const int DIVINE_MIGHT_HD = 75;
const int DIVINE_MIGHT_HP = 25;

int NWSH_UseDivineMight(object oIntruder=OBJECT_INVALID)
    if( // enemy is actually a creature
        GetObjectType(oIntruder) == OBJECT_TYPE_CREATURE &&
        // I am not under DM influence already
        !GetHasFeatEffect(FEAT_DIVINE_MIGHT) &&
        // I have DM feat (obviously)
        GetHasFeat(FEAT_DIVINE_MIGHT) &&
        // I have turn undead to spend
        GetHasFeat(FEAT_TURN_UNDEAD) &&
        // enemy HD >= DIVINE_MIGHT_HD% of mine HD
        100 * GetHitDice(oIntruder) / GetHitDice(OBJECT_SELF) >= DIVINE_MIGHT_HD &&
        // enemy HP >= DIVINE_MIGHT_HP% of its max HP
        100 * GetCurrentHitPoints(oIntruder) / GetMaxHitPoints(oIntruder) >= DIVINE_MIGHT_HP)
        return TRUE;

    // not using DM
    return FALSE;

void main()
    object oIntruder;
    int iAction;


    oIntruder = NWSH_DetermineCombatRoundTarget();
    iAction = NWSH_UseDivineMight(oIntruder);

    NWSH_DetermineCombatRoundExit(oIntruder, iAction);

You can customize this further to make an actually smart paladin. Or make it aware of some other talents (the protocol is the same like with DM).

If there is enough market for this (by those who want more control over the vanilla AI). I may eventually turn the above DCR hack into a small project.

1 Like


I noticed that the the cleric’s healing ai in combat is not that hot, clerics may need a bit of a help in that regard.

That’s beyond the scope of this script. You’ll need a full (multi-event) AI system for that.

What you see here applies only to the “I was told to attack someone or find someone to attack” event.

EDIT: unless you want clerics to heal themselves better, then it may apply here.

By the way, I noticed that if you make a new PC and choose Power Attack as first feat, you can choose Divine Might at third level because at this level you get turn undead. But when I created a Paladin custom package, he won’t choose Divine Might at third level even when it’s the first in the priority of the 2da. What I had to do was to modify the cls_feat_pal.2da and change the Turn Undead to be gained at level Paladin level 2. Now the henchmen get Divine Might at level 3.
If someone knows a better way please let me know.

Thank you.

Oh I see. Thank you.

Turn Undead is required for Divine Might. Apparently when a creature is leveled up, the game checks which feats to choose from the package before applying cls_feat_pal.

In other words, when a feat has prerequisites, it can be taken at earliest one level after all those prerequisites have been met. Does not aplly to PCs, of course.

I ran into a problem like this on a Dragon Disciple Sorcerer build in NWN2. Something like: “the game builds the list of permitted feats before the player chooses their stat levelup”, so a build you could make in the real D&D doesn’t work in NWN2 because a feat pickup and a stat improvement happen at the same level. Is that a known issue?