Lone Wolf Development Forums  

Go Back   Lone Wolf Development Forums > Hero Lab Forums > HL - D&D 5th Edition SRD

Notices

Reply
 
Thread Tools Display Modes
Mergon
Senior Member
 
Join Date: Sep 2012
Location: Ottawa, Canada
Posts: 788

Old February 28th, 2017, 11:35 AM
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:
doneif (field[gIsEquip].value = 0)
doneif (field[gIsAttuned].value = 0)

var sTag as string

~ 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]
~sTag = eachpick.tagids[ProfTooDbl.?]
~perform hero.assign[ProfTooDbl.sTag]
nexteach

Watch your back, Conserve your ammo,
and NEVER cut a deal with a dragon!
Mergon is offline   #1 Reply With Quote
ShadowChemosh
Senior Member
Volunteer Data File Contributor
 
Join Date: Jan 2010
Location: Chicago, IL (USA)
Posts: 10,729

Old February 28th, 2017, 02:13 PM
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.
ShadowChemosh is offline   #2 Reply With Quote
Mergon
Senior Member
 
Join Date: Sep 2012
Location: Ottawa, Canada
Posts: 788

Old February 28th, 2017, 10:49 PM
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!
Mergon is offline   #3 Reply With Quote
dungeonguru
Senior Member
 
Join Date: May 2016
Posts: 608

Old June 8th, 2017, 08:08 AM
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.?]]]>
I thought it was timing, but now I'm not so sure if the * is valid on tool picks.
dungeonguru is offline   #4 Reply With Quote
ShadowChemosh
Senior Member
Volunteer Data File Contributor
 
Join Date: Jan 2010
Location: Chicago, IL (USA)
Posts: 10,729

Old June 8th, 2017, 10:56 AM
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.?]
Note I am not near HL so didn't test this but pretty sure it will work.

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   #5 Reply With Quote
dungeonguru
Senior Member
 
Join Date: May 2016
Posts: 608

Old June 8th, 2017, 02:34 PM
Hmm, I tried your situation code and it doesn't work - I get the error:

Quote:
Attempt to access field 'SitList' that does not exist for thing 'gCardSet'
When I look at debug fields for the Playing Cards tool proficiency I don't see SitList. I do see that in the debug fields for a "native" skill like History - it shows SitList as a matrix.

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
dungeonguru is offline   #6 Reply With Quote
ShadowChemosh
Senior Member
Volunteer Data File Contributor
 
Join Date: Jan 2010
Location: Chicago, IL (USA)
Posts: 10,729

Old June 8th, 2017, 02:47 PM
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.
ShadowChemosh is offline   #7 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 08:47 AM.


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