UPDATE: made those adjusments and turn out pretty good except the fact that polymorphed creatures doesnt use the special abilities form polymorph - I debugged this and found out that the engine simply doesnt grants them to NPCs. So any special shape attacks would have to be faked which is another problem. Solvable but...
Grani wrote...
Well then, looks like polymorphing AI is totally broken.
Actually, I wouldn't mind that much if an NPC could cast spells without limits while pomymorphed.
I just had a thought, though. Would it be possible to add NPC polymorph options accessible via conversation, in a similar way to spells? This means that PC would need to tell the henchman before battle which shape to use, which is a disadvantage, but on the other hand, it would allow for flexibility, would remove the problem of henchman using shapes inappropriate to given situations and would (maybe, because I'm not sure if it would) allow for easier fix of constant shapeshifting problem, by disabling shapeshifting at all in the AI and only allowing it via conversation.
What do you think about it, Shadooow? Could this be done?
Well most of the polymorphing was removed from AI or made unusable by NPCs (see tenser spellscript). Seems that the problems with polymorphing was well known to Bioware but they didnt had a time to fix it. I think that those feats that are useable by AI are just leftovers...
Anyway. Would that be possible? Yes of course its possible, but its something I have no desire in such option (or to be precise - im trying to help you because it might be something I could add into my patch project, however new henchman convo options aren't possible for my project) so it would be quite a lot of work for nothing actually. I do help peoples but you want too much.
Might be great addition to the Tony K AI if someone ever tries to update it/improve it.
And turns out that adding the code I just done into CPP is not possible due to the fact that already existing creatures in already made modules would be suddenly polymorph which would change gameplay significally in an undesired way...
for anyone who wants to continue with this, there is the coding Ive done and that partially fixes the most problems of the AI polymorphing:
x0_i0_talent, add anywhere, new function
int TalentShapechange(object oIntruder = OBJECT_INVALID)
{
if(GetHasEffect(EFFECT_TYPE_POLYMORPH))
{
return FALSE;
}
if(GetHasFeat(FEAT_EPIC_WILD_SHAPE_DRAGON))
{
ActionUseFeat(FEAT_EPIC_WILD_SHAPE_DRAGON,OBJECT_SELF);
return TRUE;
}
else if(GetHasFeat(FEAT_EPIC_WILD_SHAPE_UNDEAD))
{
ActionUseFeat(FEAT_EPIC_WILD_SHAPE_UNDEAD,OBJECT_SELF);
return TRUE;
}
else if(GetHasFeat(FEAT_EPIC_OUTSIDER_SHAPE))
{
ActionUseFeat(FEAT_EPIC_OUTSIDER_SHAPE,OBJECT_SELF);
return TRUE;
}
else if(GetHasFeat(FEAT_EPIC_CONSTRUCT_SHAPE))
{
ActionUseFeat(FEAT_EPIC_CONSTRUCT_SHAPE,OBJECT_SELF);
return TRUE;
}
else if(GetHasFeat(FEAT_HUMANOID_SHAPE))
{
ActionUseFeat(FEAT_HUMANOID_SHAPE,OBJECT_SELF);
return TRUE;
}
else if(GetHasFeat(FEAT_EPIC_SHIFTER_INFINITE_WILDSHAPE_4))
{
ActionUseFeat(FEAT_EPIC_SHIFTER_INFINITE_WILDSHAPE_4,OBJECT_SELF);
return TRUE;
}
else if(GetHasFeat(FEAT_EPIC_SHIFTER_INFINITE_WILDSHAPE_3))
{
ActionUseFeat(FEAT_EPIC_SHIFTER_INFINITE_WILDSHAPE_3,OBJECT_SELF);
return TRUE;
}
else if(GetHasFeat(FEAT_EPIC_SHIFTER_INFINITE_WILDSHAPE_2))
{
ActionUseFeat(FEAT_EPIC_SHIFTER_INFINITE_WILDSHAPE_2,OBJECT_SELF);
return TRUE;
}
else if(GetHasFeat(FEAT_EPIC_SHIFTER_INFINITE_WILDSHAPE_1))
{
ActionUseFeat(FEAT_EPIC_SHIFTER_INFINITE_WILDSHAPE_1,OBJECT_SELF);
return TRUE;
}
else if(GetHasFeat(FEAT_ELEMENTAL_SHAPE))
{
ActionUseFeat(FEAT_ELEMENTAL_SHAPE,OBJECT_SELF);
return TRUE;
}
else if(GetHasFeat(FEAT_WILD_SHAPE))
{
ActionUseFeat(FEAT_ELEMENTAL_SHAPE,OBJECT_SELF);
return TRUE;
}
return FALSE;
}
nw_i0_generic
replace line:
if (GetHasFeatEffect(FEAT_BARBARIAN_RAGE) || GetShouldNotCastSpellsBecauseofArmor(OBJECT_SELF, nClass)
|| GetLocalInt(OBJECT_SELF, "X2_L_STOPCASTING") == 10 || GetHasFeatEffect(FEAT_MIGHTY_RAGE))
with
if (GetHasFeatEffect(FEAT_BARBARIAN_RAGE) || GetShouldNotCastSpellsBecauseofArmor(OBJECT_SELF, nClass)
|| GetLocalInt(OBJECT_SELF, "X2_L_STOPCASTING") == 10 || GetHasFeatEffect(FEAT_MIGHTY_RAGE) || GetHasEffect(EFFECT_TYPE_POLYMORPH))
nw_i0_generic
add between lines if (TalentDragonCombat(oIntruder) and if (TalentMeleeAttack(oIntruder)
if (TalentShapechange(oIntruder)) {return 99;}
and then open and edit all the nw_c2_* and nw_ch_* scripts and recompile all scripts in module.
Modifié par ShaDoOoW, 18 février 2014 - 05:30 .