Lone Wolf Development Forums  

Go Back   Lone Wolf Development Forums > Hero Lab Forums > HL - Authoring Kit

Notices

Reply
 
Thread Tools Display Modes
AndrewD2
Senior Member
 
Join Date: Mar 2007
Location: Muskegon, MI
Posts: 2,975

Old July 20th, 2014, 01:26 PM
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 is offline   #1 Reply With Quote
AndrewD2
Senior Member
 
Join Date: Mar 2007
Location: Muskegon, MI
Posts: 2,975

Old 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 is offline   #2 Reply With Quote
AndrewD2
Senior Member
 
Join Date: Mar 2007
Location: Muskegon, MI
Posts: 2,975

Old 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?
AndrewD2 is offline   #3 Reply With Quote
Mathias
Senior Member
Lone Wolf Staff
 
Join Date: May 2005
Posts: 13,207

Old 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
Mathias is offline   #4 Reply With Quote
AndrewD2
Senior Member
 
Join Date: Mar 2007
Location: Muskegon, MI
Posts: 2,975

Old 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.
AndrewD2 is offline   #5 Reply With Quote
BoomerET
Senior Member
 
Join Date: Apr 2012
Location: Livermore, CA
Posts: 492
Send a message via ICQ to BoomerET Send a message via Yahoo to BoomerET Send a message via Skype™ to BoomerET

Old July 30th, 2014, 03:18 PM
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
BoomerET is offline   #6 Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -8. The time now is 01:51 AM.


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