Senior Member
Join Date: Sep 2012
Location: Ottawa, Canada
Posts: 788
|
I am pretty sure I've done this before, but for the life of me I can't remember how.
I am trying to set up an Adjustment that allows you to select a DamageRes from a drop down in an Adjustment, then use a perform hero.assign[DamageRes.xxx] where xxx is the chosen damage type. For the life of me I can't get a DamageRes or a DamageType to be selected from an Adjustment . . . Any ideas? Or am I wrong in thinking this is possible from an Adjustment? Watch your back, Conserve your ammo, and NEVER cut a deal with a dragon! |
#1 |
Senior Member
Join Date: May 2016
Posts: 608
|
You mean like on the adjustment menu you have your custom expression like
component.DamageType or component.DamageType & (DamageRes.dtCold|DamageRes.dtFire|DamageRes.dtLig htnin|DamageRes.dtPoison) and your script looks something like this first/100 Code:
~ If we're disabled, do nothing & doneif (field[pIsOn].value = 0) ~ If nothing chosen then get out now! doneif (field[pChosen].ischosen = 0) perform field[pChosen].chosen.pulltags[DamageRes.?] perform hero.pushtags[DamageRes.?] Last edited by dungeonguru; February 20th, 2018 at 10:51 AM. Reason: changed the doneif |
#2 |
Senior Member
Join Date: Sep 2012
Location: Ottawa, Canada
Posts: 788
|
I knew there was a way. For the life of me I couldn't remember it and I couldn't find where I had done it before.
Thanks. I'm just builing a bunch of spell adjastments for myself like mage Armor, Shield, Absorb Elements, etc. Watch your back, Conserve your ammo, and NEVER cut a deal with a dragon! |
#3 |
Senior Member
Join Date: Sep 2012
Location: Ottawa, Canada
Posts: 788
|
Well, I finally got around to trying out the scripting you presented and I have similar issues to what I was already having.
component.DamageType & (DamageRes.dtCold|DamageRes.dtFire|DamageRes.dtLig htnin|DamageRes.dtPoison) That gives my a list of everything, probably includign what I want if I could find it. component.DamageType This me no options at all. I also tried: component.DamageRes and got nothing. When you have a moment or two, could you try create an Adjustment and see what you get. Maybe my HL is messed up . . . Watch your back, Conserve your ammo, and NEVER cut a deal with a dragon! |
#4 |
Junior Member
Join Date: Oct 2017
Posts: 13
|
Interesting, I just tried putting together a quick adjustment with the Custom Expression of
Code:
component.DamageType & (DamageRes.dtCold|DamageRes.dtFire|DamageRes.dtLightnin|DamageRes.dtPoison) Hope this helps.... - Bob |
#5 |
Senior Member
Join Date: Sep 2012
Location: Ottawa, Canada
Posts: 788
|
Selecting all things from the drop down worked. LW must have made a change. I don't remember ever having to select that before . . .
I could be wrong though. I used the following for Absorb Elements: Quote:
Watch your back, Conserve your ammo, and NEVER cut a deal with a dragon! |
|
#6 |
Senior Member
Join Date: May 2016
Posts: 608
|
Anyone following this conversation, free tip, you can get the Combined Damage types (like bludgeoning, piercing or slashing from nonmagical weapons) via component.DamComType
and your push/pull tags are DamComRes.? for resistance DamComImm.? for immunity my personal catch-all damage resistance adjustment goes like this: Custom Expression: (component.DamageType | component.DamComType) Restrict First List to: All Things My code, which I run at first/100 but can be run anywhere early: Code:
~ If we're disabled, do nothing & doneif (field[pIsOn].value = 0) ~ If nothing chosen then get out now! doneif (field[pChosen].ischosen = 0) perform field[pChosen].chosen.pulltags[DamageRes.?] perform field[pChosen].chosen.pulltags[DamComRes.?] perform hero.pushtags[DamageRes.?] perform hero.pushtags[DamComRes.?] |
#7 |
Senior Member
Volunteer Data File Contributor
Join Date: Jan 2010
Location: Chicago, IL (USA)
Posts: 10,729
|
@dungeonguru good info!
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. |
#8 |
Thread Tools | |
Display Modes | |
|
|