Lone Wolf Development Forums  

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

Notices

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
risner
Senior Member
Volunteer Data File Contributor
 
Join Date: Jun 2010
Posts: 623

Old June 28th, 2018, 12:27 PM
I'm creating a skill that is similar to Pathfinder's Craft skills. I've intentionally used many of the same Helper and identity tags as Pathfinder. Everything visually works (viewing skills, adding skills) but looping on pick in hero show duplicate records.

Code:
      foreach pick in hero from Skill where "Helper.ExtraSkill"
       debug "Extra: " & eachpick.idstring
       nexteach
This shows:
Extra: skJobacco
Extra: skJobacco
Extra: skJobacco
Extra: skJobatt
Extra: skJobatt
Extra: skJobsmu
Extra: skJobsmu

Why?

Sample skill:
Code:
  <thing
    id="skJobacc"
    name="Job (accountant)"
    compset="Skill"
    isunique="yes"
    uniqueness="useronce"
    description="Description goes here">
    <tag group="DashTacCon" tag="NonCombat"/>
    <tag group="Helper" tag="TrainOnly"/>
    <tag group="Helper" tag="ExtraSkill"/>
    <link linkage="skillabil" thing="attrCha"/>
    </thing>
Compset and Component:
Code:
  <component
    id="Skill"
    name="Skill"
    autocompset="no">
    <linkage linkage="skillabil" optional="no"/>
    <identity group="Skill"/>
    <identity group="SkillAdded"/>
    <eval index="1" phase="Setup" priority="5000"><![CDATA[
      if (tagis[Helper.ExtraSkill] <> 0) then
        if (isuser = 0) then
          if (tagis[thing.useronce] <> 0) then
            perform forward[SkillAdded.?]
            endif
          endif
      else
        perform delete[SkillAdded.?]
        endif
      if (container.ishero <> 0) then
        perform linkage[skillabil].pullidentity[SkillAbil]
        endif
</componet>
  <compset
    id="Skill">
    <compref component="Skill"/>
    <compref component="Derived"/>
    <compref component="Trait"/>
    </compset>
portal code:
Code:
  <portal
    id="baSkills"
    style="tblInvis">
    <table_dynamic
      component="Skill"
      showtemplate="baSklPick"
      showsortset="explicit"
      choosetemplate="SkillThing"
      scrollable="yes">
      <list>thing.user_added | !Helper.ExtraSkill</list>
      <candidate>SkillAdded.?</candidate>
      <headertitle><![CDATA[
        @text = "Skills"
        ]]></headertitle>
      <additem><![CDATA[
        @text = "Add a Skill"
        ]]></additem>
      </table_dynamic>
    </portal>
  <template
    id="baSklPick"
    name="Skill Pick"
    compset="Skill">
...
    </template>
  <template
    id="SkillThing"
    name="Skill Thing"
    compset="Skill"
    marginhorz="3"
    marginvert="5">
...
    </template>
Attached Images
File Type: png Jobs.png (206.0 KB, 3 views)
File Type: png Job2.png (333.2 KB, 1 views)
File Type: jpg Job3.jpg (296.6 KB, 1 views)
risner is offline   #1 Reply With Quote
 

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 02:55 AM.


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