Jun 16, 2025 10:49 am
Hi!
I wondered if someone could check my code and clarify a couple of quuestions
I have coded the Attribute Profile of my Custom Character Sheet and tested it and it seems to be working most of the ime.

However, I had to fudge the code slightly to get it to work, and I'm wondering if I missed a trick that would have made it simpler.
Most of the math is pretty simple:
- Add the Character Generated Attribute Value to the Advances Taken and calculate the Current Attribute Value.
The complication arosewith the Calculation of the 'Wounds' (W)
The actual calculation is SB+(2xTB)+WPB. Which is Strength Bonus + Double the Toughness Bonus + Willpower bonus but I don't think the code available is that flexible.
The Closest I could get was Wounds: =
Where I had to
1. Explicitly add all of the components individually because there was no way of referencing the totals in the CURRENT PROFILE row.
2. Add all the toughness values (T & AT) twice because +((T+AT)x2) didn't seem to work.
3. Although the sheet is working I notice that the Wounds Calculation is finicky. If any of the values for S, AS, T, AT WP or AWP, are blank it refuses to calculate because it claims there is a missing value. Even though the other calculations seem willing to accept a blank space as a zero.
4. Also the actual result ought to be based on the 'Bonus Value' of the attribute rather than the full value. The Bonus Value being the 'Ten Digit e.g. the SB of 34 = 3. but I couldn't imagine how to do that, so I tried dividing the output by 10, which I figured was close enough, but couldn't get it to work either.
The actual calculation for Wounds ought to be SB3 + TB12+WPB9 = 24
Just wondering if there is a better way of doing it or if I've missed a track somewhere.
I wondered if someone could check my code and clarify a couple of quuestions
I have coded the Attribute Profile of my Custom Character Sheet and tested it and it seems to be working most of the ime.

However, I had to fudge the code slightly to get it to work, and I'm wondering if I missed a trick that would have made it simpler.
Most of the math is pretty simple:
- Add the Character Generated Attribute Value to the Advances Taken and calculate the Current Attribute Value.
The complication arosewith the Calculation of the 'Wounds' (W)
The actual calculation is SB+(2xTB)+WPB. Which is Strength Bonus + Double the Toughness Bonus + Willpower bonus but I don't think the code available is that flexible.
The Closest I could get was Wounds: =
Where I had to
1. Explicitly add all of the components individually because there was no way of referencing the totals in the CURRENT PROFILE row.
2. Add all the toughness values (T & AT) twice because +((T+AT)x2) didn't seem to work.
3. Although the sheet is working I notice that the Wounds Calculation is finicky. If any of the values for S, AS, T, AT WP or AWP, are blank it refuses to calculate because it claims there is a missing value. Even though the other calculations seem willing to accept a blank space as a zero.
4. Also the actual result ought to be based on the 'Bonus Value' of the attribute rather than the full value. The Bonus Value being the 'Ten Digit e.g. the SB of 34 = 3. but I couldn't imagine how to do that, so I tried dividing the output by 10, which I figured was close enough, but couldn't get it to work either.
The actual calculation for Wounds ought to be SB3 + TB12+WPB9 = 24
Just wondering if there is a better way of doing it or if I've missed a track somewhere.
[ +- ] Attribute Profile Code
[f=h1]Attribute Profile[/f]
[url=https://wfrp1e.fandom.com/wiki/Profile]Creating your character's profile.[/url]
[table=ht grid compact]
Source|M|WS|BS|S|T|I|A|Dex|Ld|Int|Cl|WP|Fel|Size|W
Character Generation|[_M=]|[_WS=]|[_BS=]|[_S=]|[_T=]|[_I=]|[_A=]|[_Dex=]|[_Ld=]|[_Int=]|[_Cl=]|[_WP=]|[_Fel=]|[_Size=]|
Advances Taken|[_AM=]|[_AWS=]|[_ABS=]|[_AS=]|[_AT=]|[_AI=]|[_AA=]|[_ADex=]|[_ALd=]|[_AInt=]|[_ACl=]|[_AWP=]|[_AFel=]|N/A|
CURRENT PROFILE|[_$=M+AM]|[_$=WS+AWS]|[_$=BS+ABS]|[_$=S+AS]|[_$=T+AT]|[_$=I+AI]|[_$=A+AA]|[_$=Dex+ADex]|[_$=Ld+ALd]|[_$=Int+AInt]|[_$=Cl+ACl]|[_$=WP+AWP]|[_$=Fel+AFel]|[_$=Size]| [_$=S+AS+T+T+AT+AT+WP+AWP]
[/table]
Wounds: [_$=S+AS+T+T+AT+AT+WP+AWP]
Your characters' 'Current Profile' will be the sum of character generation and all advances.
Last edited June 16, 2025 4:13 pm