Aller au contenu

Photo

Increase Hit Points in a Non-Temporary Way?


  • Veuillez vous connecter pour répondre
4 réponses à ce sujet

#1
MagicalMaster

MagicalMaster
  • Members
  • 2 003 messages
Is there a way to increase the max hit points of a character via scripting?  In other words, player puts on armor A and receives 5 extra max hit points.  If they take the armor off, they revert to their previous max hit points.

Obviously the HP per level of class can be changed.  And temporary HP can be added.  I also know HG and other servers using a modification of that system use something to increase the max HP...but is what they do that with able to be done when swapping gear (and if so, is it too expensive of an operation to be viable)?  And is it also easily revertable?

I'm also guessing that involves NWNX or something similar?

I realize constitution on gear or giving Epic Toughness feats on gear can sort of simulate this but I was hoping for a solution that could scale better.  I could also use temporary hit points, but my concern is that you can't see temporary hit points dropping very easily.

Modifié par MagicalMaster, 10 novembre 2012 - 01:04 .


#2
Aelis Eine

Aelis Eine
  • Members
  • 149 messages
You can modify HP with an NWNX plugin, nwnx_funcs I believe. Trying to bind it to gear is risky because HP is innately bound to character rather than gear, so you'll have to tally all gear and class HP that number on equip (I think con and toughness are hardcoded, so no need to worry about that). Level 1 should be a safe number to set HP. It probably won't work very well for in-combat equipment swaps - they might end up killing themselves, but it should work well enough.

AFAIK, nwnx_funcs is Linux-only. There might be a Windows version now.

#3
MagicalMaster

MagicalMaster
  • Members
  • 2 003 messages
Yeah, I expected to have to keep track of the total HP they're supposed to have using some scripting, that's how I'd have to do it with the temp HP anyway. Basically check their gear and talents, use those to determine what the HP bonus is supposed to be. If they wound up killing themselves with in-combat swaps that'd be apt punishment, as long as they don't get an advantage.

#4
leo_x

leo_x
  • Members
  • 223 messages
If you're going along the lines of NWNX on Linux and are familiar with C, there is another option.  In my old branch of nwnx_defenses I hooked and replaced the max hitpoints function: h_GetMaxHitpoints.c  You could port it back to the original plugin easy enough.  Might not worth it tho, unless you wanted to modify some of the other hardcoded behaviors.

The effects bit is specific to my PW and needs to be deleted (it served as an EffectPermanentHitpoints basically).

#5
MagicalMaster

MagicalMaster
  • Members
  • 2 003 messages
I've never used NWNX whatsoever and have pretty much no idea how it works, though I'm reasonably familiar with C.

This is all stuff I'll have to look into, just trying to find out if it's even possible first (and if so, if it's reasonable).

Modifié par MagicalMaster, 10 novembre 2012 - 07:45 .