Senior Member
Join Date: Mar 2007
Location: Muskegon, MI
Posts: 2,975
|
Hi I'm Andrew, I usually do work for Pathfinder and am learning Shadow Run 5, but I've also decided to take a dive into the Authoring Kit (after having it for about a year) and learn the inner workings of Hero Lab.
I've started working my way through the example code converting the skeleton files to Savage Worlds (while reading the unofficial documentation file when I'm away from the computer). I'm just early on in the first trait section. I've gone through adding the limits of 2-6 to the system and those are working fine, but when I go to change the display to dice it isn't changing. I've virtually copied the code from the wiki to the traits file and it just says as numbers. My code is: Code:
<eval index="4" phase="Render" priority="5000" name="Calc trtDisplay"> <after name="Calc trtFinal"/><![CDATA[ ~if this is a derived trait, let it determine its own value for display doneif (tagis[component.Derived] <> 0) ~bound our final value including in-play adjustments var final as number final = field[trtFinal].value if (final < 2) then final = 2 elseif (final > 6) then final = 6 endif ~convert final value for the trait to the proper die type for display var dietype as number var display as string dietype = final * 2 display = "d" & dietype ~put the final result in the proper field field[trtDisplay].text = display ]]></eval> Thanks for any help, Andrew |
#1 |
Senior Member
Join Date: Mar 2007
Location: Muskegon, MI
Posts: 2,975
|
Guess I should have gone a little farther because after changing the display stuff at the bottom of the page it updated in the Basics tab, although the sample says it should update after what I did.
|
#2 |
Senior Member
Join Date: Mar 2007
Location: Muskegon, MI
Posts: 2,975
|
Ok continuing my way through the tutorial and I'm in the section on Encumbrance and to the part where you add the identity tags to the attribute component.
I add the line Code:
<identity group="Attribute"/> Quote:
Code:
<component id="Attribute" name="Attribute" autocompset="no"> <!-- Attributes have a minimum trait value of 1 --> <eval index="1" phase="Initialize" priority="3000"><![CDATA[ field[trtMinimum].value = 1 ]]></eval> <!-- Each attribute point above one that is allocated by the user costs 7 CP --> <eval index="2" phase="Traits" priority="10000"> <before name="Calc resLeft"/> <after name="Bound trtUser"/><![CDATA[ hero.child[resCP].field[resSpent].value += (field[trtUser].value - 1) * 7 ]]></eval> <identity group="Attribute"/> </component> |
|
#3 |
Senior Member
Lone Wolf Staff
Join Date: May 2005
Posts: 13,207
|
In this list of what can go into a component, what's the relative order of identity and eval (which comes before which)?
What order do you have them in? http://hlkitwiki.wolflair.com/index....ent_%28Data%29 |
#4 |
Senior Member
Join Date: Mar 2007
Location: Muskegon, MI
Posts: 2,975
|
I see, thank you, I'm still in the Advanced Authoring Topics in my read through, I will remember this in the future.
|
#5 |
Senior Member
|
Yup, bitten me more than just a couple times as I'm developing the C&C plugin.
Castles & Crusades Ruleset for Hero Lab Hero Lab (5E D&D) -> Fantasy Grounds Character Converter |
#6 |
Thread Tools | |
Display Modes | |
|
|