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
Duggan
Senior Member
Volunteer Data File Contributor
 
Join Date: Nov 2009
Posts: 1,502

Old October 3rd, 2017, 07:01 AM
Another one of those things I just can't seem to wrap my head around despite looking at the examples. A given Race or Command Package can give the player a free skill Specialty. When I had skill Specialties be something that was on the hero itself, rather than a pick on the child entity attached to the Skill, so this was as simple as a bootstrap entry on the Race or Command Package, and an it_bootcustom in the editor entry. Well, that no longer works and I can't quite figure out how to make it work.

A given Specialty has a tag to indicate which skill it's matched up to, e.g.
Code:
<!-- Thermal Skill Specialty -->
<thing
  id="spPercThrm"
  name="Thermal"
  compset="Specialty"
  isunique="yes"
  description="Apply this specialty when using an organ or apparatus that senses temperature. If you can “see” in infrared, then your Sight specialty applies instead, and you should lord that up over lesser creatures by talking about how lovely everything looks.">
  <tag group="Skill" tag="skPercept"/>
</thing>
The specialty is attached via an entity (in traits.str)
Code:
<entity
  id="entSpec"
  form="frmSpec">
  <bootstrap thing="SpecHelp"/>
</entity>
SpecHelp and Specialty are, of course, defined earlier in the file:
Code:
<component
  id="Specialty"
  name="Specialization"
  autocompset="no"
  panellink="skills">
  
  <!-- Display Name for use on Specialties Tab -->
  <field
    id="spcTabName"
    name="Display Name (Tab)"
    type="static"
    maxlength="50"
    maxfinal="50">
    <finalize><![CDATA[
      ~Displays name
      @text = field[name].text & " (" & this.tagnames[Skill.?," "]  & ")"
      ]]></finalize>
    </field> 
  
  <identity group="Specialty"/>
  
  <tag group="SpecialTab" tag="Specialty"/>

  <!-- Track the ability on the actor -->
  <eval index="1" phase="Setup" priority="5000"><![CDATA[
    perform forward[Specialty.?]
    perform parent.assign[User.HasSpec]
    ]]></eval>
    
  <!-- Each specialty that is allocated by the user costs 2 CP -->
  <eval index="2" phase="Traits" priority="10000">
    <before name="Calc resLeft"/>
    <after name="Bound trtUser"/><![CDATA[
    ~if this speciality wasn't added by the user (as with a Background trait), skip it entirely
    doneif (isuser = 0)

    ~adjust the resource appropriately
    hero.child[resCP].field[resSpent].value += 2
  ]]></eval>
</component>    

<!-- Specialty Helper component
      Each Specialty Gizmo derives from this component
-->

<component
  id="SpecHelp"
  name="Specialty Helper">

  <!-- Selection Tag Expressions -->
  <field
    id="SpecExpr"
    name="Specialization Tag Expression"
    type="derived"
    maxlength="500">
    </field>

  </component>
It all works well enough from the UI, with users able to add and remove specialties, but I'm uncertain as to how to a) bootstrap it from the Thing that is the Command Package or the Race and b) how to add it to the editor so that a user can create a Command Package and pick what Specialties get automatically added.
Duggan 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 08:28 AM.


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