PDA

View Full Version : Hit points stoping when at 0



Kelendros78
December 8th, 2014, 00:11
Hello,

I am curious if there is a way to make it so that damage applied to npc or pc will continue even though the max is met. I need these feature for the druid in my party...when his creature dies I need to know how much to carry over. preferably with out having to stop and do the math manually.

Something as simple as text in the chat window that says bear is hit for x damage y damage past current hp

Manchine
December 8th, 2014, 06:27
Why according to 5E when you hit 0 damage your suppose to stop. There is no negatives any more, its just zero. (page 196 PHB Hit Points)

Draca
December 8th, 2014, 12:26
Druids change back to their original form and all excess damage leftover from attack is applied to the caster.

So if he is using a separate token for bear form for example which is pulled from the par5ed Monster Manual, and no one remembers the exact number of hit points the bear had before the attack.
You can see this could be a problem.

The only other option i can think of is to create an effect for each form that increases the physical characteristics of the caster and applies the HP from the form as temporary HP.
To do this you would also have to make attacks for the caster as well that match the new forms statistics in the casters action tab.

Does anyone have a suggestion on how to handle the druids shape change, that is easy to manipulate ?
Although using the actual monster token is really nice for eye candy and simplicity.

Draca
December 10th, 2014, 02:12
So, i thought this over....

Create new NPC for each Form the druid takes.
Change the HP of the form to the druids actual HP.
Add Temporary HP = to the Animals HP.
Create powers for the form that the druid is capable of doing.
Any healing spells that the druid can use in the form on himself will have to be in the form of temporary HP.

The only drawback is that you need to know the max Temp HP, so the hit points don't go over the forms max.

anyone have any suggestions?

Griogre
December 10th, 2014, 03:35
This seems overly complicated to me. Don't bother with the other forms, just have the player change his portrait into what he changes into and add temp HP equal to the form's hps. Healing is still weird but the animal isn't that likely to get cured too often. Then when the player runs out of temps you know the animal died and it will automatically take off the overage from his real HP. Have the druid make some attacks on his sheet like Wolf bite, etc. Best of all the player can manage all this without bothering the DM. :)

Draca
December 10th, 2014, 04:51
Looks like an effect is the way to go for now Kelendros78.

Kelendros78
December 10th, 2014, 13:14
Honestly I am thinking that the way to go is to modify the ruleset to not stop counting when the max HP is reached. or to mod the damage out put in the chat box to tell how much damage carries over. can anyone point me in the right direction for way to modify the ruleset?

Trenloe
December 10th, 2014, 22:53
can anyone point me in the right direction for way to modify the ruleset?
Look in the 5E ruleset, scripts\manager_action_damage.lua. The messageDamage function outputs the damage information to the chat window. The data used comes from the previous (and fairly long) function applyDamage.

If you haven't looked into modifying a ruleset before, this thread might be of use (substitute 5E instead of 3.5E): https://www.fantasygrounds.com/forums/showthread.php?19033-Modifying-the-3-5e-PFRPG-ruleset

In the end you'd want to make this an extension, but that above thread should point you in the right direction to get you started with trying it out yourself.

Kelendros78
December 11th, 2014, 23:02
Now I have a great little project for the weekend. Thanks I really appreciate your time and for the tips

Kelendros78
December 13th, 2014, 04:04
Ok so I had a great time learning lua :D and I have modded my 5e ruleset to out put when there is damage carrying over...do I need to give this ruleset to the players of my game? I don't see a way to make this an extension honestly since it goes straight to the core of the ruleset

Trenloe
December 13th, 2014, 04:10
Ok so I had a great time learning lua :D and I have modded my 5e ruleset to out put when there is damage carrying over...do I need to give this ruleset to the players of my game? I don't see a way to make this an extension honestly since it goes straight to the core of the ruleset
You don't need to give it to the players, they download the modified ruleset and cache it locally in the campaign data when they connect to you.

You can easily make it an extension - the problem comes when the file/s you have modified get updated in a future version of the ruleset, you'll have to manually update your extension each time the file/s you modified change.

Which functions (and in which files) did you modify?

Kelendros78
December 13th, 2014, 04:19
After looking at my post more closely I realized that I liked the warning after the damage message not in the middle of it...lol 8270 I want to take a moment and thank everyone here in the community you guys are amazing, thanks for the help. This to me seems like a simple fix for the Wild Shape being dropped by excessive damage, and now I have a clear cut way to assign damage to my player without having to go back through and re-figure up HP on the fly.

Kelendros78
December 13th, 2014, 04:26
I modified manager_action_damage.lua made nRemainder global, then used it in a conditional on line 1113 if rTarget and nRmainder> 0 ...then just concatnated to the string that was pre-existing...that way if there is !nRemainder then it doesn't show.

Kelendros78
December 13th, 2014, 04:27
So can I just make an extension of manager_action_damage.lua? that way I overwrite the ruleset when it updates?

Trenloe
December 13th, 2014, 05:04
So can I just make an extension of manager_action_damage.lua? that way I overwrite the ruleset when it updates?
You can, but the problem is that new functionality, bug fixes, etc. can come in with a future release - other LUA scripts might rely on updated code in this file and if you don't update the extension to use the latest manager_action_damage.lua file you might well encounter issues.

The best you can do is minimise the changes made to the file and have those changes in a minimum of places within the code - clearly comment your changes so you can find them in future and copy them into the new file in a future version. I also include a vanilla version of the file in the extension as well - call it perhaps manager_action_damage_5E_v309.lua as it is the vanilla file from 5E v309. Then when there are future releases of 5E you can compare this file with the latest manager_action_damage.lua, if there aren't any differences then you don't need to update the extension, if there are then you'd need to update your code into the latest version of manager_action_damage.lua. It's a pain doing this each time there is a new version released, but that's what we have to do...

Kelendros78
December 13th, 2014, 15:23
One last question. I modded my file and can't seem to get it back into a 5e.pak file...each time I try it errors out saying that it can't find the base.xml when I try to run it... any tips?

Trenloe
December 13th, 2014, 15:39
One last question. I modded my file and can't seem to get it back into a 5e.pak file...each time I try it errors out saying that it can't find the base.xml when I try to run it... any tips?
Make sure you zip from within the 5E folder - i.e. select all of the files and sub-folders and zip them up as one zip file. Don't just highlight your modified 5E ruleset folder and zip from outside of the actual folder. It's case sensitive so use 5E not 5e. You'll then need to remove your 5E folder from the rulesets directory as a 5E folder will take priority over 5E.pak.

Finally, be careful with doing this - if 5E is updated in future ad you run "Update" your modified 5E.pak will be overwritten. Hence it is best to do your modifications as an extension - but keep in mind the possible need to modify it in future if a later version of 5E has updates to the file/s you've used in the extension. You can PM me the modified code (or post it here) and I'll give you guidelines on how to minimise this work in future by putting it in an extension.

All of the above is even more true if you're running in "dev" mode rather than live - there are frequent ruleset updates in "dev" mode that could either overwrite your 5E.pak file or cause errors with your modifications.

Kelendros78
December 13th, 2014, 20:50
-- MODDED to output extra Damage done past total Hitpoints

if rTarget and nRemainder > 0 then
msgShort.text = msgShort.text .. " [to " .. rTarget.sName .. "]";
msgLong.text = msgLong.text .. " [to " .. rTarget.sName .. "] This Creature has sustained "..nRemainder.." damage beyond it's max HP";
elseif rTarget then
msgShort.text = msgShort.text .. " [to " .. rTarget.sName .. "]";
msgLong.text = msgLong.text .. " [to " .. rTarget.sName .. "]";
end


This starts on line 1111 in my editor.
I removed the local constraint on line 986 from nRemainder

Trenloe
December 13th, 2014, 21:46
Give this extension a try - run it against an unmodified 5E ruleset (i.e. the base v3.0.9 5E ruleset currently live).

Note: as there were modifications in 2 functions, and one of the functions is very large, I didn't split these two functions off into a separate script file - I left them in the complete 5E manager_action_damage.lua file. This will make it easier to spot changes to these functions in future and keep this extensions up to date with version upgrades.