[Script]Finding out which bardic inspiration is playing

Hoi chummers!

I can fetch the activated combat stance (like defensive casting, combert expertise etc) via GetActionMode(object oCreature, int nMode). Is there a similar (or any easy) way to find out which bardic inspiration a character is playing?

Regards

i poked around a bit,

It looks like the function

int FindEffectSpellId(int iEffectType, object oTarget = OBJECT_SELF);

in nwn2_inc_spells

returns the spellId (-1 if not found).

eg.

int spellId = FindEffectSpellId(EFFECT_TYPE_BARDSONG_SINGING);
if (spellId == 905) // courage
{}
else if (spellId == 906) // competence
{}
else if (spellId == 907) // defense
{}
else if (spellId == 908) // regeneration
{}
else if (spellId == 909) // toughness
{}
else if (spellId == 910) // slowing
{}
else if (spellId == 911) // jarring
{}
else // spellId == -1
{}

(tip: use a switch block instead of if/else)

note I haven’t tried this and am merely looking at the inspiration spellscripts …

1 Like

That did the trick, thanks kevL_s!

1 Like