• Please note: In an effort to ensure that all of our users feel welcome on our forums, we’ve updated our forum rules. You can review the updated rules here: http://forums.wolflair.com/showthread.php?t=5528.

    If a fellow Community member is not following the forum rules, please report the post by clicking the Report button (the red yield sign on the left) located on every post. This will notify the moderators directly. If you have any questions about these new rules, please contact support@wolflair.com.

    - The Lone Wolf Development Team

Authoring Example help

evildmguy

Well-known member
Greetings!

Okay, I'm finding the example for the authoring kit tough to follow. It seems as if there are steps that are missed. I have figured out some of them but several have still eluded me.

For example, right now, I'm trying to do the revise "Basics" tab of the hl_kit.pdf (pg 454) where it tries to prune the traits and move them over. I get what's it's trying to do but I can't follow where or which files it adds the Hide trait to so as not to show certain ones.

So, the code: <tag group="Hide" tag="Trait"/>

Where does that go and where does the <list> tag after it go?

Is there anyplace where this code is available to look at? I have tried to look at the Savage Worlds code but it seems to have been updated or changed from the examples as I can't find these lines in there.

I'm sure I will have more questions later!

Thanks!

edg
 
Working on a tutorial for just such an occasion

Here's the steps I've written out.

I'm in the process of editing the video, and hope to have it out early next week.



Steps in creating a new Game System in Hero Lab.

1. Open Hero Lab, choose any game system.
2. Click 'OK' at the Configure Your Hero screen.
3. Click 'Enable Data File Debugging' in the top Develop menu item if not already enabled.
4. Click 'Create New Game System...' from the top Develop menu.
5. Enter a directory name in the dialog box that pops up.
6. Enter a name for the game system (will probably add dialog on what are good directory naming schemes)
7. Go to Tools -> Explore Folders -> Program Data Folder
8. Double-click on the data folder, and then the folder that you created.
9. Go to File -> Switch Game System... and click on the game system you created.
10. Click Ok to close information screen.
11. Click View Manual on the Configure Your Character dialog, and browser should appear with generic XYZ User Manual displayed.
12. View files in folder that was opened, as we will be coming back to them to edit in a text editor.




BoomerET
 
I apologize that I was not more clear.

While I think a tutorial video is a great idea, I'm talking about the pdf that seems to contain the wiki, of which part of it is the Savage Worlds example. I have worked through about thirty pages of the PDF example.

So, on this page: http://hlkitwiki.wolflair.com/index.php5/Revise_"Basics"_Tab_(Savage)

I don't know where to put that second, or third, code set. The tag and list examples.

That's what I'm looking to figure out.

In general, it seems as if the example throughout the wiki, starts assuming more and more that the person doing the example knows exactly where to go and where to insert the code. That's why I was wondering if a version of the code made by following the example was out there so I could compare it to mine? I tried comparing it to the Savage Worlds code I have but that hasn't worked.

Thanks!

edg
 
Note:
The wiki link above will only work if you add a right parenthesis on the end.

For some reason that got cut off from the href.


BoomerET
 
Okay new question. I'm trying to set up ability points and skill points. Skill points are based on INT score. I'm trying to do this in thing_miscellaneous:

<thing id="resAtt"
name="Attribute Points"
compset="Resource">
<fieldval field="resObject" value="Attribute"/>
<fieldval field="resMax" value="60"/>
<tag group="Helper" tag="Bootstrap"/>
</thing>

<thing id="resSkill"
name="Skill Points"
compset="Resource">
<fieldval field="resObject" value="Skill"/>
<tag group="Helper" tag="Bootstrap"/>
<eval index="1" phase="Initialize" priority="1000"><![CDATA[
field[resMax].value = herofield[acSklPnts].value
]]></eval>
</thing>

The first one works and tracks it just fine. But when I try and set it via an eval, it doesn't work. I think the acSklPnts isn't set, as I have seen in the debug window, but when I check the values in the pick fields, acSklPnts is set fine. How do I do this at this point? Is it a timing issue? Or do I need to run the eval in a different file?

Or am I really wrong in how I'm trying to set it up? Should I not set these against the actor? Because, again, the top one in the quote above seems to work. Should I just set the skill points resmax later?

Thanks!

edg
 
What's the script that's setting herofield[acSklPnts].value? What phase & priority is it running at? Is that phase & priority before the Initialize/1000 you're using here?

Are skill points in your game always a fixed number? Or are they based on an attribute (or two)? Or are there multiple power levels, each offering a different number of skill points? Are there races/feats/qualities/merits/etc. that can change the number of skill points?

(You'll also want to answer those questions for attributes, in order to figure out if a fixed number is the correct solution in that case, too).
 
I knew I hadn't given enough information and probably hadn't set it up right.

And thanks for the quick answers!

What's the script that's setting herofield[acSklPnts].value? What phase & priority is it running at? Is that phase & priority before the Initialize/1000 you're using here?

Code:
<field
      id="acSklPnts"
      name="Skill Points"
      type="derived">
	  <calculate phase="Render" priority="1000"><![CDATA[
        ~make sure this value consists of the elements that could cause the summary to change
        @value = hero.child[attrInt].field[trtFinal].value * 5 - 5
        ]]></calculate>
      </field>

I'm not sure if that's correct. Still fumbling along. But this is where I set it. Hmm. As I type that, I assume that because I'm setting that in Render, that it is a timing problem? Okay then.

Are skill points in your game always a fixed number? Or are they based on an attribute (or two)? Or are there multiple power levels, each offering a different number of skill points? Are there races/feats/qualities/merits/etc. that can change the number of skill points?

(You'll also want to answer those questions for attributes, in order to figure out if a fixed number is the correct solution in that case, too).

I'm working on the Alternity system. Skill points in the RAW are a chart that ends up being (INT-1) *5. So, they are based on a single stat. Yes, there are races and qualities that could affect INT as well as skill points.

I have the equation working but I'm wondering if it was timing.

LOVE Hero Lab! Really enjoying myself trying to figure this out but decided that I don't need to figure out everything on my own. :)

Thanks!

edg
 
Comparing tags between different objects

Arg. Sorry to bother.

I really miss my Intellisense! This working in notepad++ is frustrating! :)

Anyway, I have skills and I tag the skills with a Profession.

Now what I want to do is compare the profession tag on the hero to the profession tag on the skill if they match, I want to give them a discount on the cost of that skill.

So, under my skill component, I have an eval. It seems with no other qualifiers, doing tagis[Profession.CombatSpec] seems to give me the tag on the skill. How do I then get the tag on the hero? hero.tagis[]? Not sure if that's working exactly as I need it to work.

Of course, the second part of this is how do I make it even more generic, so that I don't have to check each profession type but can generically compare profession.? on the skill and hero and if they match, give them the discount?

Thanks and again sorry to bother.

edg
 
Code:
if (hero.intersect[Profession,Profession] <> 0) then


In definition.def, scroll to the bottom of the file. There, you'll find where the phases are set up. I'd recommend reading the description for each phase.


Oh, and the other timing requirements that are imposed on that resource = (INT-1)*5:
In traits.str, find "Calc trtFinal" - this needs to be after that.
In miscellaneous.str, find "Calc resLeft" - this needs to be before that.

I'd use Traits/20000 to set the herofield, then Traits/25000 to look it up - well after Calc trtFinal, and well before Calc resLeft - lots of time to change both. Or, just set the resMax field on the resource directly by looking up the intelligence and delete that herofield.

Also, use @value += and/or field[resMax].value += in your scripts, rather than a simpe =. That way, you're adding the values to whatever's there, instead of overwriting them, meaning you don't need to be as careful about the phase & priority when race X adds +5 to that field - you don't care whether that script comes before or after your += (with an =, you'd have to make sure your race applied its effects AFTER the main calculation, or your main calculation would overwrite the change the race had made).
 
Thanks for the help! Those are working great for me and the articles are good as well!

Another question. I have my skill tab and within the skill tab, I have the table_dynamic and have set the showsortset as I need it. However, I also would like the popup dialog to sort based on the showsortset as well. Basically, to keep skill grouped in a meaningful way for my system. Is there any way to do that?

Thanks!

edg
 
I have things that I want to autoadd. But I want to add them via a race pick, which could change based on user input. I also see that I have to have autoadd in structural files.

So, how do I change the autoadded items from the old ones to the new ones when a new race is selected?

Also, is there a way to override the cost of an item when it's autoadded so it's free instead?

Thanks!

edg
 
Okay, I'm getting the "duplicate record encountered" and after reading on it, I'm not sure why.

I have skills in my system as a component. I then copied that within the traits.str file and created a Psionics component in my system. But it doesn't like the linkage line with attribute in it. I don't know why I couldn't link multiple components to attributes.

I have read up on linkage and several other things on components but am not sure what is happening.

Thoughts?

Thanks!

edg

Code:
 <!-- Skill component
        Each skill derives from this component
  -->
  <component
    id="Skill"
    name="Skill"
    autocompset="no"
	panellink="skills">

    <!-- Net final roll that includes the value of the linked attribute -->
    <field
      id="sklRoll"
      name="Net Skill Roll"
      type="derived">
      <calculate phase="Final" priority="5000">
        <after name="Calc trtFinal"/><![CDATA[
        ~only access the linkage if the skill is directly on the hero; if not, it is
        ~likely within an advancement gizmo and no linkage will exist there
        if (container.ishero <> 0) then
          @value = field[trtFinal].value + linkage[attribute].field[trtFinal].value
          endif
        ]]></calculate>
      </field>

    <!-- Each skill is associated with a specific attribute that must be identified -->
    <linkage linkage="attribute" optional="no"/>
	<linkage linkage="skill" optional="yes"/>

    <!-- Each skill needs its own identity tag so existing skills can be identified during advancement -->
    <identity group="Skill"/>

    <!-- Every skill is shown on the "Rolls" mouse-over on the Dashboard/TacCon -->
    <tag group="DashTacCon" tag="Rolls"/>

    <!-- Track the skill on the actor -->
    <eval index="1" phase="Setup" priority="5000"><![CDATA[
      perform forward[Skill.?]
      ]]></eval>

    <!-- Each skill point that is allocated by the user costs base cost * rank in skill points -->
    <eval index="2" phase="Traits" priority="10000">
      <before name="Calc resLeft"/>
      <after name="Bound trtUser"/><![CDATA[
      ~if this skill is not added directly to the hero (i.e. an advance), skip it entirely
      doneif (origin.ishero = 0)

      ~adjust the resource appropriately
	  if (tagis[Skills.Broad] = 1) then
		if (hero.intersect[Profession,Profession] <> 0) then
			hero.child[resSkill].field[resSpent].value += maximum(field[baseCost].value-1,0)
		else
			hero.child[resSkill].field[resSpent].value += maximum(field[baseCost].value,0)
		endif
	  else
	    if (hero.intersect[Profession,Profession] <> 0) then
			var listcostmo as number
			listcostmo = field[baseCost].value-1
			hero.child[resSkill].field[resSpent].value += maximum(field[trtUser].value * listcostmo + field[trtUser].value,0)
		else
			hero.child[resSkill].field[resSpent].value += maximum(field[trtUser].value * field[baseCost].value + field[trtUser].value,0)
			debug "values : " & field[trtUser].value & "  basecost : " & field[baseCost].value 
			var testnum as number
			testnum = field[trtUser].value * field[baseCost].value + field[trtUser].value
			debug "calc: " & field[trtUser].value & " * " & field[baseCost].value & " + " &  field[trtUser].value & " = " & testnum
		endif
	  endif
      ]]></eval>
	  
	<eval index="3" phase="Setup" priority="5000"><![CDATA[
	  ~pull the identity tag of the linked attribute into the skill
	  perform linkage[attribute].pullidentity[Attribute]
	  ]]>
	</eval>
	
    </component>

  <!-- Psionic component
	Each psionic skill derives from this component
  -->
  <component
    id="Psionics"
    name="Psionics"
    autocompset="no"
	panellink="Psionics">

    <!-- Net final roll that includes the value of the linked attribute -->
    <field
      id="sklPsiRoll"
      name="Net psionic Roll"
      type="derived">
      <calculate phase="Final" priority="5000">
        <after name="Calc trtFinal"/><![CDATA[
        ~only access the linkage if the psinoc is directly on the hero; if not, it is
        ~likely within an advancement gizmo and no linkage will exist there
        if (container.ishero <> 0) then
          @value = field[trtFinal].value + linkage[attribute].field[trtFinal].value
          endif
        ]]></calculate>
      </field>

    <!-- Each psionic is associated with a specific attribute that must be identified -->
    <linkage linkage="attribute" optional="no"/>         *****THIS IS THE LINE CAUSING THE PROBLEM*****
	<linkage linkage="psionic" optional="yes"/>

    <!-- Each psionic needs its own identity tag so existing skills can be identified during advancement -->
    <identity group="Psionics"/>

    <!-- Every Psionic is shown on the "Rolls" mouse-over on the Dashboard/TacCon -->
    <tag group="DashTacCon" tag="Rolls"/>

    <!-- Track the psionic on the actor -->
    <eval index="1" phase="Setup" priority="5000"><![CDATA[
      perform forward[Psionics.?]
      ]]></eval>

    <!-- Each psionic that is allocated by the user costs base cost * rank in skill points -->
    <eval index="2" phase="Traits" priority="10000">
      <before name="Calc resLeft"/>
      <after name="Bound trtUser"/><![CDATA[
      ~if this skill is not added directly to the hero (i.e. an advance), skip it entirely
      doneif (origin.ishero = 0)

      ~adjust the resource appropriately
	  if (tagis[Skills.Broad] = 1) then
		if (hero.intersect[Profession,Profession] <> 0) then
			hero.child[resSkill].field[resSpent].value += maximum(field[baseCost].value-1,0)
		else
			hero.child[resSkill].field[resSpent].value += maximum(field[baseCost].value,0)
		endif
	  else
	    if (hero.intersect[Profession,Profession] <> 0) then
			var listcostmo as number
			listcostmo = field[baseCost].value-1
			hero.child[resSkill].field[resSpent].value += maximum(field[trtUser].value * listcostmo + field[trtUser].value,0)
		else
			hero.child[resSkill].field[resSpent].value += maximum(field[trtUser].value * field[baseCost].value + field[trtUser].value,0)
			debug "values : " & field[trtUser].value & "  basecost : " & field[baseCost].value 
			var testnum as number
			testnum = field[trtUser].value * field[baseCost].value + field[trtUser].value
			debug "calc: " & field[trtUser].value & " * " & field[baseCost].value & " + " &  field[trtUser].value & " = " & testnum
		endif
	  endif
      ]]></eval>
	  
	<eval index="3" phase="Setup" priority="5000"><![CDATA[
	  ~pull the identity tag of the linked attribute into the psionic
	  perform linkage[attribute].pullidentity[Attribute]
	  ]]>
	</eval>
	
    </component>
 
All autoadds are performed as soon as you create a new character, so that a logical set of defaults is in place. There's no way for them to look at the character and decide whether they should be used or not.

You'll want to look in .dat files, rather than .str files for what's causing your duplicate record error. Did you copy some of the skills themselves in order to make your psionics, and forget to change their ids?
 
Okay, I partially got it.

I don't know if this can work but here is what I did. Because Psionics closely resemble skills, I had copied the skills component over and renamed it, and the other needed items in the component definition, to psionic. But then I was getting the duplicate record error and had it narrowed down to the line of code I referenced in my above post. I figured that the psionic component was too close to the skill component and that's why it treated the it as a duplicate? (I have not reversed the order of them in my file to see if it is the skill that gets the error when it's listed second.)

But then I realized that what I could do was merely define psionics as a different compset that is based on skills. So, that's what I did and it works again for the most part.

Now I'm seeing another error. I have a tab_psionics and tab_skills and within each, I have declared portals and layouts using either psionic or skill. (I have a tag to differentiate the Psionic skills from regular skills.) I can get the popup choose table not to show Psionic skills in regular skills and vice versa. But now what I'm seeing is that a pick from tab_skills shows up in the tab_psionics show table? And vice versa? I can only remove them from the table to which I added them but I don't understand with different names and layouts why they are showing the other picked skills, psionic or not, in the other tab's show table area?

Should I go back to making Psionic its own component? Any thoughts what I'm doing wrong?

Thanks for the answers!

edg
 
Back
Top