Lone Wolf Development Forums  

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

Notices

Reply
 
Thread Tools Display Modes
EightBitz
Senior Member
 
Join Date: May 2013
Posts: 1,458

Old September 27th, 2017, 08:49 PM
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>
The debug output for that portal is:
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
Notice that the movement skill, which is linked to the Agility attribute is showing up three times instead of just once. I am stumped again.
EightBitz is offline   #1 Reply With Quote
Duggan
Senior Member
Volunteer Data File Contributor
 
Join Date: Nov 2009
Posts: 1,502

Old September 28th, 2017, 03:45 AM
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?
Duggan is offline   #2 Reply With Quote
EightBitz
Senior Member
 
Join Date: May 2013
Posts: 1,458

Old September 28th, 2017, 05:16 AM
Quote:
Originally Posted by Duggan View Post
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?
Yep. And they're both set as unique.
EightBitz is offline   #3 Reply With Quote
ShadowChemosh
Senior Member
Volunteer Data File Contributor
 
Join Date: Jan 2010
Location: Chicago, IL (USA)
Posts: 10,729

Old September 28th, 2017, 12:01 PM
Quote:
Originally Posted by EightBitz View Post
Yep. And they're both set as unique.
I would add debug logic to confirm the thingid so you can be sure what your looking at.

Code:
debug eachpick.idstring
Honestly it looks like you have multiple Picks on the Hero. Once you get the Thing ID you can confirm if they are really the same Pick or different.

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.
ShadowChemosh is offline   #4 Reply With Quote
EightBitz
Senior Member
 
Join Date: May 2013
Posts: 1,458

Old September 28th, 2017, 12:22 PM
Quote:
Originally Posted by ShadowChemosh View Post
I would add debug logic to confirm the thingid so you can be sure what your looking at.

Code:
debug eachpick.idstring
Honestly it looks like you have multiple Picks on the Hero. Once you get the Thing ID you can confirm if they are really the same Pick or different.
It's the same idstring all three times.
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.
EightBitz is offline   #5 Reply With Quote
EightBitz
Senior Member
 
Join Date: May 2013
Posts: 1,458

Old September 28th, 2017, 12:23 PM
Quote:
Originally Posted by ShadowChemosh View Post
I would add debug logic to confirm the thingid so you can be sure what your looking at.

Code:
debug eachpick.idstring
Honestly it looks like you have multiple Picks on the Hero. Once you get the Thing ID you can confirm if they are really the same Pick or different.
Also, on the final output, it's only listed once. If it was actually duplicate picks on the hero, it would be listed multiple times, no?

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.
EightBitz is offline   #6 Reply With Quote
Duggan
Senior Member
Volunteer Data File Contributor
 
Join Date: Nov 2009
Posts: 1,502

Old September 28th, 2017, 01:16 PM
Movement is unique. Is Agility?
Duggan is offline   #7 Reply With Quote
EightBitz
Senior Member
 
Join Date: May 2013
Posts: 1,458

Old September 28th, 2017, 01:30 PM
Quote:
Originally Posted by Duggan View Post
Movement is unique. Is Agility?
Yep. Every attribute is unique, bootstrapped, and not user-selectable. Every skill is also unique, bootstrapped, and not user-selectable.
EightBitz is offline   #8 Reply With Quote
EightBitz
Senior Member
 
Join Date: May 2013
Posts: 1,458

Old September 28th, 2017, 01:41 PM
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.
EightBitz is offline   #9 Reply With Quote
Mathias
Senior Member
Lone Wolf Staff
 
Join Date: May 2005
Posts: 13,207

Old September 28th, 2017, 01:46 PM
Try adding a

Code:
debug "starting script"
at the very beginning, so that you can tell if the script has re-started - visual elements can end up being generated several times.
Mathias is online now   #10 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:51 AM.


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