Nwnx SetFeatRemainingUses

Anyone familiar with the NWNX_Creature_SetFeatRemainingUses function? Doesn’t seem to do anything when I use it, other than to break infinite use feats.

If you’re trying to set remaining uses greater than what the game determines to be the “total” uses, that probably won’t work. There are people on this forum with source access tho, so they’d know for sure.

If you’re wanting to increase the total number of feat uses then you ought to consider getting your hands dirty and hooking CNWSCreatureStats::GetFeatTotalUses yourself.

You’d likely be best off asking on the “nwnx” discord channel than here, because at least some of “nwnx”/unified is just exposing base game functions. There isn’t always some system / scriptset / holistic thinking behind what’s added to it.

I remember that this functions works stupidly in game engine and to make this function working correctly in NWScript I had to completely rework the engine code.

IIRC engine code does not store actual uses, but “used” uses which it then substracts from maximum. I rewrote the code completely so it stores actual uses. Should be still somewhere on github, if anyone cares.