PDA

View Full Version : Adding New HP/Stats to the npc sheets



BobsUncleBob
July 31st, 2021, 20:14
I've been working on an extension for Fantasy Grounds with a friend for a custom game of 5e that she wants to run and we're trying to add another health pool to the creature sheets.
I've managed to add the extra pools, but I'm not sure how to format it so the number box and everything is between Hit Points and Speed. The box always end up being at the very bottom of the creature page. What can I do to get this to format properly?

I should probably mention that I have no experience with any programming languages whatsoever and the only experience I have is from fooling around with this code, so please dumb it down as simple as possible, thank you <3

LordEntrails
August 1st, 2021, 00:15
I don't know either, but I can suggest that you post the relevant code you have changed. I suspect any of the community devs who respond will want to know what they are starting with :)

BobsUncleBob
August 1st, 2021, 01:14
All I've changed in the code is in the record_npc.xml and basically what I did was copy the hp block there and pasted it below, renaming the values to something else as well as adding whatever I needed to the strings_5e.xml file for the textres (also adding a minimum value since it won't be going below 0). Here's a snippet from what I have:


<label_column name="example_label">
<static textres="char_tooltip_example" />
</label_column>
<number_column name="examplewounds">
<min value="0" />
</number_column>

I placed this between the hp and speed bits and I was hoping it would work, but every time I load up the session, it ends up at the bottom of the creature page time and time again.

I've also tried anchoring it to the HP to see if it would stay up there at all, but that didn't work either. Maybe I did it wrong though.

If I could get any help at all with this I would forever be grateful.

damned
August 1st, 2021, 02:38
Use insertbefore

https://www.fantasygrounds.com/wiki/index.php/Developer_Guide_-_Rulesets_-_Layering

BobsUncleBob
August 1st, 2021, 03:32
Use insertbefore

Alright, so now I've gotten the stuff where it needs to go.. Only issue is that they're merging into the speed value. How should I format to prevent this from happening?

damned
August 1st, 2021, 06:05
You need to also replace HP and Speed.
Redefine HP a little to the Left and Speed a little to the Right.