AddHitPoints Permanently. Is there a way?
Hillyan
Member Posts: 22
Hi, i have a pw from 12 years, i use prc/cep/cmp/cpp/ctp/bcm and many other haks without problems, with customized spells and prc spells.
I'm not a scripter but doing all alone, i've learned a lot.
I'm italian; my english could not be so correct.
Now i have a problem; i've searched on google and tried every workaround possible.
I use nwnx but not Leto. I don't use a myswl db;
is there a way to add permanently hitpoints to characters? I know how to identify control classes, how to script a legendary levels of my own creation, with a conversation. I never, NEVER achieve to add hit points via script.
I use nwnx to add and modify ability score, skill score, feats.
I can't add hit points. Do you know how to do this? I've opened hgll of funkyswerve. It's a great work; i've read several funky scripts but i don't use leto.
Is there another way? A function? a workaround?
Please, give me a tip.
I'm not a scripter but doing all alone, i've learned a lot.
I'm italian; my english could not be so correct.
Now i have a problem; i've searched on google and tried every workaround possible.
I use nwnx but not Leto. I don't use a myswl db;
is there a way to add permanently hitpoints to characters? I know how to identify control classes, how to script a legendary levels of my own creation, with a conversation. I never, NEVER achieve to add hit points via script.
I use nwnx to add and modify ability score, skill score, feats.
I can't add hit points. Do you know how to do this? I've opened hgll of funkyswerve. It's a great work; i've read several funky scripts but i don't use leto.
Is there another way? A function? a workaround?
Please, give me a tip.
1
Comments
// Gets the maximum hit points for creature for level. int NWNX_Creature_GetMaxHitPointsByLevel(object creature, int level); // Sets the maximum hit points for creature for level to nValue. void NWNX_Creature_SetMaxHitPointsByLevel(object creature, int level, int value);
I try to explain better
I would like to to add some X hitpoints to a player when he gains a legendary level (in conversation). I've done a script that after the eventual choice of ability/feat/skill, gets the current hitpoints, gets the hitpoints that the player should take on normal levelup (control class type + con mod + toughness feat) and gives me a total of hitpoints the player should have after leveling.
I need a function to add some X hitpoints or a function that sets the maximum hitpoints of the player to a value X.
In that function sherincall, there is the level int and i don't understand how to script it, because i made the legendary level system and i've a variable system, nothing more. If i put on int level the number 42 for example, i think it will not work
The level needs to be 1-40 for this work, and they need to have that level. So you can either modify it for level 1 (so they never lose it when losing levels) or for last level so they do.
Just note that if you have e.g. level 40 fighter with 400hp, and you want to set their HP to 600, doing this:
NWNX_Creature_SetMaxHitPointsByLevel(oPC, 1, 600);
will make them have 990hp - 600 at level 1, and 10 at each level 2-40. Instead you need to set that level's max HP to desired max minus current max.
If i want to add hit points at every level after 40(i use levels made by me from 41 to 100), so Leto is the only option available? There is no function in nwnx that Adds hit points permanently as it is for modify ability score function.
Someone can suggest me a way trhough Leto?
Basically creature/players max hitpoints are influenced by two local variables:
HP_BONUS int X
HP_% int X
Both variables can contain negative number, HP_BONUS simply adds value to the max hitpoints, HP_% will add X% of the max hp to the max hp, ie: if player has 100hp and HP_% = 20 then his hitpoints will be 120. The percentual variable is calculated after maxhitpoints were modified by HP_BONUS variable.
I even made new itemproperties to increase/decrease hitpoints that are using these variables but they are not part of the nwnx_patch plugin.
In which case you want to apply the bonus to some level 1-39. If you support losing levels, you need to keep track of bonuses separately, so you only remove part of it when a player loses level e.g. 66.
I've dowloaded the patch.
I've put the nwnx_patch.dll in my nwn main folder. How can i have in my toolset the new functions ?? (with the beautiful hp_bonus int). Is there something i have to do?
assuming you downloaded latest version it will work
the plugin has regular functions for use too but i forgot to add the nwscript files into last version so to get them you need to download this but do not replace nwnx_patch, as this is the latest version and contain bugs - use this one
Ok, thanks. Just a last question. Every player will have to download the nwncx? I've added the latest nwnx patch to my client and to remote hosting server and it works. Now i wandering what files players will have to download. (NOW WE CAN USE PRC CLASSES FROM THE FIRST LEVEL thanks to that patch)
I started experimenting with this myself due to your interest. It seems there is small drawback, probably unwanted. I made itemproperty bonus hitpoints and while it works, after unequipping, the current hitpoints stays unchanged, I think expected behavior is to reduce current hp to match max hp after unequip.
While this can be fixed via scripting (and there is a perfect function for that: NWNXPatch_SetCurrentHitPoints) I will try to fix this inside plugin.
If a player take levels after 40 in my system, they have a conversation, similar to the conversation scripted fy funkyswerve for Higher ground. I've scripter from zero by myself my system. Everytime they take a level, they have bonus similar to normal levels (before 40), bonus to BAB every x levels (tier 1, 2, 3 classes - fighters, half-casters and casters), bonus to HP (thanks to you) based on constitution modifier and hit dice of the classes (i use prc so 200 classes different hit dice, grouped in groups), a feat every x levels, and skill points, together with bonus to abilities, every x levels.
so i don't use your plugin with items. I use the function in a script in a conversation and it's a permanent modification.
It's perfect.
My problem now is that i would like to host a version of my mod also in NWN ee and this is a problem because now i use nwnx, nwnx patches, nwncx and i don't think that someone will ever port this for EE.
Or you can try that docker thingy, I didn't get into this myself but if I understand it correctly it should be a one-click-virtualmachine-linux server for windows. (But afaik this max hp modification isn't available on linux anyway)