Senior Member
Join Date: May 2013
Posts: 1,458
|
First of all, scratch my previous question about the labeltext script. I'm doing that whole thing a different way, which I think will still work out the way I want it, but I'm having another odd issue now.
I have the following portal: Code:
<portal id="skill" style="outNormal"> <output_label> <labeltext><![CDATA[ var attrname as string var skillname as string var linkname as string var debugstr as string attrname = field[name].text foreach pick in hero from Skill where "component.Skill & !Helper.Maximum & !Hide.Skill" skillname = eachpick.field[name].text linkname = eachpick.linkage[attribute].field[name].text if (compare(attrname,linkname) = 0) then debugstr = "attrname: " & attrname & ", skillname: " & sklname & ", linkname: " & linkname debug debugstr done endif nexteach ]]></labeltext> </output_label> </portal> Code:
********** Start Evaluation Cycle ********** attrname: Agility, sklname: Movement, linkname: Agility attrname: Agility, sklname: Movement, linkname: Agility attrname: Agility, sklname: Movement, linkname: Agility attrname: Strength, sklname: Prowess, linkname: Strength attrname: Stamina, sklname: Close Quarters Combat, linkname: Stamina attrname: Focus, sklname: Research, linkname: Focus attrname: Personality, sklname: Communication, linkname: Personality attrname: Willpower, sklname: Interview, linkname: Willpower attrname: Dexterity, sklname: Fieldcraft, linkname: Dexterity attrname: Perception, sklname: Investigation, linkname: Perception attrname: Reflexes, sklname: Ranged Weapons, linkname: Reflexes |
#1 |
Senior Member
Volunteer Data File Contributor
Join Date: Nov 2009
Posts: 1,502
|
Just covering the obvious, have you checked the debug output to be sure that you don't have Agility or Movement added multiple times to your hero?
|
#2 |
Senior Member
Join Date: May 2013
Posts: 1,458
|
|
#3 |
Senior Member
Volunteer Data File Contributor
Join Date: Jan 2010
Location: Chicago, IL (USA)
Posts: 10,729
|
I would add debug logic to confirm the thingid so you can be sure what your looking at.
Code:
debug eachpick.idstring Hero Lab Resources: Pathfinder - d20pfsrd and Pathfinder Pack Setup 3.5 D&D (d20) - Community Server Setup 5E D&D - Community Server Setup Hero Lab Help - Hero Lab FAQ, Editor Tutorials and Videos, Editor & Scripting Resources. Created by the community for the community - Realm Works kickstarter backer (Alpha Wolf) and Beta tester.- d20 HL package volunteer editor. |
#4 |
Senior Member
Join Date: May 2013
Posts: 1,458
|
Quote:
That is the only thing with a name of "Movement" Movement is defined as unique. All the skills are bootstrapped in bootstrap.1st, and since they're all unique, nothing is user selectable, so no skill can be added multiple times. |
|
#5 |
Senior Member
Join Date: May 2013
Posts: 1,458
|
Quote:
EDIT: No, scratch that. With this logic, it would only be listed once. But in the UI, it's listed on the skills table only once, and THAT should be an indication that it's only picked once. |
|
#6 |
Senior Member
Volunteer Data File Contributor
Join Date: Nov 2009
Posts: 1,502
|
Movement is unique. Is Agility?
|
#7 |
Senior Member
Join Date: May 2013
Posts: 1,458
|
|
#8 |
Senior Member
Join Date: May 2013
Posts: 1,458
|
Just to see what would happen, I removed "isunique='yes'" from the Movement skill, and I got an error that the linked trait must be unique. So I put it back, then removed it from Agility. I get an error that the compset requires it to be unique.
So, not only are both unique, but one is required to be unique by its compset, and the other is required to be unique by virtue of having a linkage. EDIT: Actually, I misread one of the error messages. For "Movement", it's the compset as well. For both skills and attributes, their compsets require them to be unique. Last edited by EightBitz; September 28th, 2017 at 01:44 PM. |
#9 |
Senior Member
Lone Wolf Staff
Join Date: May 2005
Posts: 13,215
|
Try adding a
Code:
debug "starting script" |
#10 |
|
|