Senior Member
Join Date: Sep 2012
Location: Ottawa, Canada
Posts: 788
|
In the script below I am trying to add Proficiency, Expertise, and Advantage to all Artisan Tools the character is carrying. It is part of a set of 3 scripts on a major Ring artifact.
Everything works fine except I'm at a loss on how to add Expertise (double proficiency). Since the changes to Tools, it looks like Double Proficiency is done by adding the ProfTooDbl.? (where ? is the tag of the Tool - i.e.: gTooTinker for Tinker's Tools) directly to the hero. What I am trying to do is extract the tag from each set of Tools the hero is carrying and assign ProfTooDb.{Tool tag} to the hero from within a foreach loop. I'm at a loss on who to get the appropriate tag, append it to ProfTooDbl. and then assign it. Any help would be greatly appreciated. Quote:
Watch your back, Conserve your ammo, and NEVER cut a deal with a dragon! |
|
#1 |
Senior Member
Volunteer Data File Contributor
Join Date: Jan 2010
Location: Chicago, IL (USA)
Posts: 10,729
|
Please note I did this off the top of my head so misspelled/mistype words could happen.
Code:
doneif (field[gIsEquip].value = 0) doneif (field[gIsAttuned].value = 0) ~ Grant Proficient & Expertise to All Tools carried and Advantage to All ~ Tools the Bearer is Proficient with. foreach pick in hero from BaseEquip where "ToolCat.Artisan" perform eachpick.assign[Proficienc.Tool] perform eachpick.assign[Hide.Tool] ~ Pull the tags from the tool to our self. This is an easy way to build a list ~ of tags that we want to assign to the hero. perform eachpick.pulltags[ProfTooDbl.?] nexteach ~ Now push all the ProfTooDbl tags on our self to the hero perform hero.pushtags[ProfTooDbl.?] 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. |
#2 |
Senior Member
Join Date: Sep 2012
Location: Ottawa, Canada
Posts: 788
|
Many thanks Chemosh:
I'll give this s try tomorrow. Thx again. Watch your back, Conserve your ammo, and NEVER cut a deal with a dragon! |
#3 |
Senior Member
Join Date: May 2016
Posts: 608
|
I was working on a similar artifact, granting advantage to gaming toolsets. My code is pretty much a copy of what is here, but is there a way to have the * show up to show the advantage?
I tried: Code:
doneif (field[gIsAttuned].value = 0) foreach pick in hero from BaseEquip where "ToolCat.Gaming" perform eachpick.assign[Proficienc.Tool] perform eachpick.assign[Hide.Tool] perform eachpick.assign[Helper.Advantage] eachpick.field[DescAppend].text &= "Advantage to all gaming related rolls." perform eachpick.pulltags[ProfTooDbl.?] nexteach perform hero.pushtags[ProfTooDbl.?]]]> |
#4 |
Senior Member
Volunteer Data File Contributor
Join Date: Jan 2010
Location: Chicago, IL (USA)
Posts: 10,729
|
Based on what I have seen the tag does not provide the *. That * represents that you have added "situational" text to be displayed on the Pick.
Try this: Code:
doneif (field[gIsAttuned].value = 0) foreach pick in hero from BaseEquip where "ToolCat.Gaming" perform eachpick.assign[Proficienc.Tool] perform eachpick.assign[Hide.Tool] perform eachpick.assign[Helper.Advantage] #situational[eachpick, "Advantage to all gaming related rolls.",field[name].text] perform eachpick.pulltags[ProfTooDbl.?] nexteach perform hero.pushtags[ProfTooDbl.?] 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. |
#5 |
Senior Member
Join Date: May 2016
Posts: 608
|
Hmm, I tried your situation code and it doesn't work - I get the error:
Quote:
I'm not sure how to assign a matrix field and then add the text to it, although I'm reading the wiki and other threads now. I'm also not sure that assigning a SitList matrix to the tool would even work, since the proficiency gets derived from an equipment "thing" and the code from LW may not be there to see the SitList and generate an * during the output. But, thanks for the clarification - I thought the Helper.Advantage tag generated the *. I'll keep picking away at it. If I can't get it to work, I might put in a feature request. Last edited by dungeonguru; June 8th, 2017 at 02:35 PM. Reason: wrong word |
|
#6 |
Senior Member
Volunteer Data File Contributor
Join Date: Jan 2010
Location: Chicago, IL (USA)
Posts: 10,729
|
All those matrix/fields are part of the "Component" which we non-LW people do not have access too. I know Skills, Saves and ability scores get situational text but I guess not gear.
What you had before using the "DescAppend" is the best your going to get in this case. 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. |
#7 |
Thread Tools | |
Display Modes | |
|
|