Lone Wolf Development Forums

Lone Wolf Development Forums (http://forums.wolflair.com/index.php)
-   HL - Authoring Kit (http://forums.wolflair.com/forumdisplay.php?f=58)
-   -   Getting started with the Authoring Kit (http://forums.wolflair.com/showthread.php?t=50049)

AndrewD2 July 20th, 2014 01:26 PM

Getting started with the Authoring Kit
 
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>

Now I notice when I view the fields on one of the traits and see the trtDisplay field it is shown correct but it doesn't display correcly in the in the interface. Am I missing something or is there a step I'm not accounting for somewhere?

Thanks for any help,
Andrew

AndrewD2 July 20th, 2014 02:13 PM

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.

AndrewD2 July 30th, 2014 10:16 AM

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"/>
To the attribute component and I get the following error.

Quote:

Hero Lab was forced to stop compilation after the following errors were detected:

File: traits.str (line 197) - Encountered unknown element tag 'identity'
One or more timing errors were identified. Please review the timing report and correct the errors. You can access the report under the 'Develop' menu or by clicking this link.
my Attribute component looks like this

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>

Line 197 is the line where the tag was added. Am I missing something?

Mathias July 30th, 2014 10:33 AM

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

AndrewD2 July 30th, 2014 10:38 AM

I see, thank you, I'm still in the Advanced Authoring Topics in my read through, I will remember this in the future.

BoomerET July 30th, 2014 03:18 PM

Yup, bitten me more than just a couple times as I'm developing the C&C plugin.


All times are GMT -8. The time now is 05:06 AM.

Powered by vBulletin® - Copyright ©2000 - 2024, vBulletin Solutions, Inc.
wolflair.com copyright ©1998-2016 Lone Wolf Development, Inc. View our Privacy Policy here.