Member
Join Date: Oct 2012
Posts: 37
|
Yeah, I just figured that out myself. I was reading the comment and that light bulb went off over my head.
Don't I feel sheepish! And works like a charm. |
#11 |
Member
Join Date: Oct 2012
Posts: 37
|
I've got all the races in and I've modified the point costs per attribute point and it works well except when changing the race. I can't seem to figure out what to trigger to make the creation points recalculate.
Any guidance here would be welcome, if I can work out where to stick the code, then I'll work out the code that I need. |
#12 |
Senior Member
Join Date: Nov 2007
Location: Des Moines, IA
Posts: 349
|
More than likely, it's a timing issue. Those always got me!
When do you calculate the race item? When do you calculate the points per attribute? I would start by checking those. |
#13 |
Member
Join Date: Oct 2012
Posts: 37
|
Okay, I figured out what's going. The minimums are changing and the CPs are being calculated correctly, but when I change races it's not resetting to the minimum so nothing is being recalculated.
So, it's all good it just didn't look that way to me. Thanks for the input, I learned a lot about timing as a result of this. |
#14 |
Member
Join Date: Oct 2012
Posts: 37
|
I have a derived trait that really needs to be displayed as text. I went back through the Savage Worlds files and looked at how they did it for Attributes, but I'm really having a difficult time trying to sort out the text label.
|
#15 |
Senior Member
Join Date: Nov 2007
Location: Des Moines, IA
Posts: 349
|
Okay, I'm glad it is working for you.
Do you have code on the text you need help with? |
#16 |
Member
Join Date: Oct 2012
Posts: 37
|
I don't because derived traits all use values, not text. I'm trying to figure out how to force a derived trait to use a text field instead of a value field when its displayed.
I've done the initial formula to set the derived trait. But the end result is a bonus die type to damage mod. The range of die types is -1d8 to +2d10+1d4. I'm setting the trtBonus value to a number, then I'll use if statements to make the conversion to text. I just need to figure out how to output the text instead of the number. |
#17 |
Senior Member
Join Date: Nov 2007
Location: Des Moines, IA
Posts: 349
|
I think Hero Lab will do that for you.
For example, I have: Code:
<portal id="ranks" style="lblNormal"> <label> <labeltext><![CDATA[ @text = "[" & field[sklRollO].value & " / " & field[sklRollG].value & " / " & field[sklRollA].value & "]" ]]></labeltext> </label> </portal> Is that what you need to do? Last edited by evildmguy; February 24th, 2013 at 05:08 PM. Reason: typo |
#18 |
Member
Join Date: Oct 2012
Posts: 37
|
The output looks like:
Damage Modifier: 1 but I want to render it instead as: Damage Modifier: -1D8 And I tried adding the <label></label> to the basics tab, under the baTrait portal and it did not like the label at all. |
#19 |
Senior Member
Join Date: Nov 2007
Location: Des Moines, IA
Posts: 349
|
Can you post your code? I have some vague ideas but seeing the code would help.
|
#20 |
|
|