Lone Wolf Development Forums  

Go Back   Lone Wolf Development Forums > Hero Lab Forums > HL - Authoring Kit
Register FAQ Community Today's Posts Search

Notices

Reply
 
Thread Tools Display Modes
evildmguy
Senior Member
 
Join Date: Nov 2007
Location: Des Moines, IA
Posts: 349

Old March 7th, 2013, 10:14 AM
Okay.

Bound trtUser: Traits, 1000
Calc trtFinal: Traits, 3001
Calc trtFinal 2: Traits, 9000

baseCost is on component Trait and then defined on the things themselves. I haven't changed how that works, as far as I know! For example:

Code:
<thing
    id="skAdmin"
    name="Administration"
    compset="Skill"
	isunique="yes"
    description="Description goes here">
    <fieldval field="trtAbbrev" value="Admin"/>
	<fieldval field="baseCost" value="4"/>
	<fieldval field="skType" value="Broad"/>
	<tag group="explicit" tag="6000"/>
	<tag group="Skills" tag="Broad"/>
	<tag group="Profession" tag="Diplomat"/>
    <link linkage="attribute" thing="attrWil"/>
    </thing>
But I'm confused. What do those have to do with figuring out a tagcount dynamically? Or knowing those, are you going to suggest some other course of action? Are you thinking they overwrite each other and step on each other, such that I wouldn't need to do the tagcount?

Again, my thought for the trtBonus field was to count the number of advance tags for that skill. In the Administration skill above, it would be [IsAdvance.skAdmin]. I don't know how to dynamically create that to do a tagcount on it.

Thanks!

edg
evildmguy is offline   #111 Reply With Quote
Mathias
Senior Member
Lone Wolf Staff
 
Join Date: May 2005
Posts: 13,217

Old March 8th, 2013, 08:14 AM
Please re-read my post 102 in this thread. In that thread, I tried to explain how to set up a system that adds bonuses and calculates the costs at the same time. If I didn't explain well enough, please ask.

The mechanism I'm proposing has nothing to do with tagcounts.
Mathias is online now   #112 Reply With Quote
evildmguy
Senior Member
 
Join Date: Nov 2007
Location: Des Moines, IA
Posts: 349

Old March 8th, 2013, 09:37 AM
Quote:
Originally Posted by Mathias View Post
Please re-read my post 102 in this thread. In that thread, I tried to explain how to set up a system that adds bonuses and calculates the costs at the same time. If I didn't explain well enough, please ask.

The mechanism I'm proposing has nothing to do with tagcounts.
Okay, I will re-look at it.

Sorry. I have had a bad week for sleep and comprehension.

edg
evildmguy is offline   #113 Reply With Quote
evildmguy
Senior Member
 
Join Date: Nov 2007
Location: Des Moines, IA
Posts: 349

Old March 10th, 2013, 10:42 AM
Mathias, I think I will need more explanation on the how the advances work.

I am trying to increase a skill by increasing it's trtBonus field every time it is picked. (This is in advancement.core, under component CanAdvance.

Code:
<eval index="4" phase="Traits" priority="2000"><![CDATA[
      ~we only worry about this on actual advances - not traits added at creation
      doneif (tagis[Advance.Gizmo] = 0)

      
            ~increase and decrease advancements often need to look up the base value of the thing they're working with
        if (origin.parent.tagis[Advance.Increase] +  origin.parent.tagis[Advance.Decrease] +  origin.parent.tagis[Advance.AddNew] <> 0) then
            if (tagis[component.Skill] <> 0 ) then
                if (tagis[Skills.Specialty] <> 0) then
                    field[trtBonus].value += 1
                endif   
            endif
        endif
      
      ]]></eval>
But every time this runs, trtBonus gets reset to 0, so my skill never increases.

This is why I was wondering if I have to do a count on the number of times a specialty skill is increased and put that into trtBonus?

I thought it was timing, so I changed the above from 2000 to 3002 because calc trtFinal runs at 3001 and I even added <after name="Calc trtFinal"/> but that doesn't seem to work.

The other piece of information is this. I have Gain a New Skill and Advance a skill. I have to use Gain a new Skill the first time to add the Broad skill and then the specialty skill. Those are then gone from the Gain a New Skill list, as they should be. And up until that point, it works. What I have for adding the broad skill and adding the specialty skill (as well as the cost but that's in a different eval) the first time work. The Broad skill is added and the specialty skill is added at rank one. All looks good. It's when I use Increase Skill that it doesn't work.

So, I'm stumped as to what I'm doing wrong.

Thanks!

edg

In case they are needed:

Gain a New Skill:
Code:
<thing
    id="advNSkill"
    name="Gain a New Skill"
    compset="Advance"
    description="Select a new skill to learn.">
    <fieldval field="advAction" value="New Skill"/>
    <fieldval field="advDynamic" value="component.Skill &amp; !FX.Psionics"/>
    <tag group="Advance" tag="AddNew"/>
    <!-- Modify tagexpr to deny abilities that have already been added to the character -->
    <eval index="1" phase="Render" priority="1000">
      <before name="Assign Dynamic Tagexpr"/><![CDATA[
      ~get the list of all abilities on the hero and assemble it as a list of precluded tags
      var tagexpr as string
      tagexpr = hero.tagids[Skill.?," & !"]
      ~if there are any tags to exclude, append them to the tagexpr appropriately
      field[advDynamic].text = splice(field[advDynamic].text,tagexpr," & !")
      ]]></eval>
      

    <!-- Attach the child entity for tracking the advance -->
    <child entity="Advance">
      <tag group="Advance" tag="MustChoose"/>
      </child>
    </thing>
Increase Skill:
Code:
<thing
    id="advSkill"
    name="Increase Skill"
    compset="Advance"
    description="Select a skill to increase by one.">
    <fieldval field="advAction" value="Increase Skill"/>
     <fieldval field="advDynamic" value="component.Skill &amp;  !Helper.Maximum &amp; !Hide.Skill &amp; !Skills.Broad"/>
    <tag group="Advance" tag="Increase"/>

    <!-- Attach the child entity for tracking the advance -->
    <child entity="Advance">
      <tag group="Advance" tag="MustChoose"/>
      </child>
    </thing>
evildmguy is offline   #114 Reply With Quote
Mathias
Senior Member
Lone Wolf Staff
 
Join Date: May 2005
Posts: 13,217

Old March 11th, 2013, 08:25 AM
linkage[basis].field[trtBonus].value
linkage[basis].tagis[component.Skill]
linkage[basis].tagis[Skills.Specialty]
Mathias is online now   #115 Reply With Quote
evildmguy
Senior Member
 
Join Date: Nov 2007
Location: Des Moines, IA
Posts: 349

Old March 11th, 2013, 08:56 AM
Okay, I see that it's the context.

But if I change the line:
Code:
field[trtBonus].value += 1
to:
Code:
linkage[basis].field[trtBonus].value += 1
then I get the error
Code:
Linkage pick 'basis' not located for current context
Location: 'eval' script for Component 'CanAdvance' (Eval Script '#4') near line 22
Thoughts on that?

Thanks!

edg
evildmguy is offline   #116 Reply With Quote
Mathias
Senior Member
Lone Wolf Staff
 
Join Date: May 2005
Posts: 13,217

Old March 11th, 2013, 09:01 AM
What type of advance are you testing this on? Only Advance.Increase and Advance.Decrease have a linkage[basis] - Advance.AddNew should not be adding to trtBonus - Advance.AddNew usually adds things at their default ratings, not their default + 1.
Mathias is online now   #117 Reply With Quote
Mathias
Senior Member
Lone Wolf Staff
 
Join Date: May 2005
Posts: 13,217

Old March 11th, 2013, 09:12 AM
If you do find that you need to use this script to make modifications to Advance.AddNew, you'll just alter the values directly;
field[trtBonus].value
tagis[component.Skill]
Mathias is online now   #118 Reply With Quote
evildmguy
Senior Member
 
Join Date: Nov 2007
Location: Des Moines, IA
Posts: 349

Old March 12th, 2013, 10:42 AM
Mathias, thanks! I have no idea what I was on or doing but that ended up being as simple as you had shown. I was really making it complex. But I got the advances working.

Of course, then something else comes up!

I have a Cybertech tab that is basically a specialized Gear tab at the moment. (I copied the Gear tab over to the Cybertech tab.) The automatic setting of the price doesn't work when a thing is picked as it does for gear. (So the "($XX if zero)" on the buy screen.) I have set the choosetemplate="grGrThing", the same as the gear one but that didn't do it.

What else needs to be set for that to work on the buy screen?

Thanks!

edg
evildmguy is offline   #119 Reply With Quote
Mathias
Senior Member
Lone Wolf Staff
 
Join Date: May 2005
Posts: 13,217

Old March 12th, 2013, 12:10 PM
This is from tab_gear.dat in the skeleton files.
Code:
 
 
<table_dynamic
  component="Gear"
  showtemplate="grGrPick"
  choosetemplate="grGrThing"
  buytemplate="BuyCash"
  selltemplate="SellCash">
It's the buytemplate and selltemplate options that tell Hero Lab that this item is purchased as gear.

This is from the Gear component in equipment.str
Code:
 
<component
  id="Gear"
  name="Gear"
  isgear="yes"
  autocompset="no"
  ispublic="no">
Make sure that your cybertech either includes the gear component in its compset, or that it has a component with isgear="yes" in its compset.
Mathias is online now   #120 Reply With Quote
Reply


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 05:23 PM.


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