Lone Wolf Development Forums  

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

Notices

Reply
 
Thread Tools Display Modes
Duggan
Senior Member
Volunteer Data File Contributor
 
Join Date: Nov 2009
Posts: 1,502

Old March 23rd, 2018, 10:51 AM
As I have covered before, I have a situation where Skills in my system (Planet Mercenary) can have Specialties added to them under certain circumstances (namely, specialties are particular to a given skill, most specialties are unique and can only be added once, and you can't have more specialties than you have ranks in the skill). At the time, it seemed the easiest way to do it was by borrowing some code from the Doctor Who implementation and setting up a Gizmo on the skills so that I could set up field that limited the Specialty choices to those that match up to the skill.

Code:
<portal
  id="prtSpec"
  style="tblNormal">
  <table_dynamic
    component="Specialty"
    showtemplate="SpecPick"
    choosetemplate="SpecPick2"
    scrollable="yes"
    alwaysupdate="yes"
    candidatepick="SpecHelp"
    candidatefield="SpecExpr"
    addpick="SpecHelp">
    
    <titlebar><![CDATA[
      @text = "Add a Specialty"
      ]]></titlebar>
    <!--headertitle><![CDATA[
      @text = "Specialty"
      ]]></headertitle-->
    <additem><![CDATA[
      @text = "Add Specialty"
      ]]>
      </additem>
    </table_dynamic>      
  </portal>
and set here:
Code:
<procedure id="SetSpcExpr" context="pick"><![CDATA[
  ~make sure there's a gizmo to travel to
  doneif (isgizmo = 0)
  
  ~set up our tag expression for selecting appropriate specialty
  var expr as string
  var myId as string

  expr = "component.Specialty & " & myId

  debug "expr: " & expr
  gizmo.childfound[SpecHelp].field[SpecExpr].text = expr
  ]]></procedure>
This results in the situation where the Specialty is added to the skill itself (or, I suppose to its Gizmo), and then shadowed onto the main Hero. The thing is, while this is the primary way for a user to add the Specialty, there are two other ways for it to happen. One, some backgrounds/command packages/sophont types give a bonus Specialty. Two, one of the options for Advancement is adding a Specialty. The second is not really a factor right now, but the former sort of is, in that any Specialty added via a background trait of some sort also shows up as a valid choice on the table, since it doesn't exist on the Skill in question.

TL;DR: Is there any way to set the "target" of the table to be the Hero instead of the Skill? Since skills are never deleted, there should never be a situation where it matters where the Specialty resides.

I can also provide more code. I'm trying to only quote the relevant bits.
Duggan is offline   #1 Reply With Quote
Mathias
Senior Member
Lone Wolf Staff
 
Join Date: May 2005
Posts: 13,207

Old March 23rd, 2018, 10:58 AM
This is why, for Shadowrun, we didn't use gizmos for its skill specialties - all the specialties are in the hero container, and use tags and careful control of the visual elements to set things up so that the user only ever sees them attached to the correct skill.

You can shadow things down to a lower-level container, but there's no way to reverse-shadow, and get them to appear up a container level.
Mathias is online now   #2 Reply With Quote
Duggan
Senior Member
Volunteer Data File Contributor
 
Join Date: Nov 2009
Posts: 1,502

Old March 23rd, 2018, 12:09 PM
{nods} So I might have to change where the items are stored... is there any way to at least keep the link so that the user selects Specialties for a given skill rather than from a grand list?
Duggan is offline   #3 Reply With Quote
Mathias
Senior Member
Lone Wolf Staff
 
Join Date: May 2005
Posts: 13,207

Old March 23rd, 2018, 12:32 PM
Never mind - I was totally mis-remembering things.

It's that the normal specialties for a skill are added as child picks in the skill's gizmo, but then for specialties added from outside, those live in the hero pick. They use a script to add their name to a text field on the skill, and for the final display of that skill's name, with the specialties included, that list of external specialties is combined with the list of specialties inside the gizmo, in a way that makes it look to the user like everything is together.

When you look at the customization form for a skill, since in Shadowrun, external specialties can only be added in advancement mode, not in creation mode, in advancement mode, the table for adding specialties is not shown - instead, a text portal displays the combined list of specialties.
Mathias is online now   #4 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 11:46 AM.


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