Lone Wolf Development Forums  

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

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 March 3rd, 2018, 07:28 PM
Currently, for my Skill component, I have an eval statement like the following:
Code:
<!-- Display Name without values for use on Skills Tab -->
<field
  id="sklTabName"
  name="Display Name (Tab)"
  type="static"
  maxlength="50"
  maxfinal="50">
  <finalize><![CDATA[
    ~Displays name
    @text = field[name].text
    var numAoE as number
    var i as number
    
    var specText as string
    foreach pick in gizmo where "component.Specialty"
      i += 1
      if (i > 1) then
        specText &= ", "
        endif
      specText &= eachpick.field[name].text
      nexteach
          
    if (empty(specText) = 0) then
      @text &= " (" & specText &")"
      endif
    
    ]]></finalize>
  </field>
This is meant to display the skill name followed by a list of specializations on it. This works for specializations added via the button by the skill on that tab, but there are two other sources of specializations, one being the various backgrounds associated with the character (for example, being the Captain gets you the Military specialization for History) and another being gaining the Specialty through an Advance. All of the Specialties get Forwarded onto the Hero, but I'm at a loss to determine whether a given Specialty matches the skill that I'm evaluating.

I think that the solution will probably involve tagmatch, but I keep getting an "Invalid id specified for tag group" error with the following replacement, even though the "Skill" group exists as an Identity tag for the skills, and both the Specialty and the Skill have a corresponding tag:

Code:
foreach pick in hero where "component.Specialty"
  if (eachpick.tagmatch[Skill, Skill, initial] <> 0) then
    i += 1
    if (i > 1) then
      specText &= ", "
      endif
    specText &= eachpick.field[name].text
    endif
  nexteach
Duggan is offline   #1 Reply With Quote
 


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 03:16 AM.


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