Nwnx_funcs has this:
/* Set oCreature's current hit points */
int SetCurrentHitPoints (object oCreature, int nHP);
I'll have a wrapper that uses this if nwnx is available and does the other calculation and magical damage thing if not. Then the rest completion code does not have to know anything. Have not done it yet, the list is long...