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 20th, 2018, 07:35 AM
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!
Mergon is offline   #1 Reply With Quote
dungeonguru
Senior Member
 
Join Date: May 2016
Posts: 596

Old February 20th, 2018, 10:48 AM
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.?]
Yeah, I think I learned that from a convo between you and Shadow...

Last edited by dungeonguru; February 20th, 2018 at 10:51 AM. Reason: changed the doneif
dungeonguru is offline   #2 Reply With Quote
Mergon
Senior Member
 
Join Date: Sep 2012
Location: Ottawa, Canada
Posts: 788

Old February 20th, 2018, 10:50 AM
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!
Mergon is offline   #3 Reply With Quote
Mergon
Senior Member
 
Join Date: Sep 2012
Location: Ottawa, Canada
Posts: 788

Old February 21st, 2018, 07:41 AM
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!
Mergon is offline   #4 Reply With Quote
BobStumpp
Junior Member
 
Join Date: Oct 2017
Posts: 13

Old February 21st, 2018, 10:37 AM
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)
With a Restriction to "All Things", and I get a pull down of of Cold, Fire, Lightning, and Poison.

Hope this helps....

- Bob
BobStumpp is offline   #5 Reply With Quote
Mergon
Senior Member
 
Join Date: Sep 2012
Location: Ottawa, Canada
Posts: 788

Old February 21st, 2018, 10:48 AM
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:
component.DamageType & (DamageRes.dtAcid | DamageRes.dtCold | DamageRes.dtFire | DamageRes.dtLightnin | DamageRes.dtThunder)

Watch your back, Conserve your ammo,
and NEVER cut a deal with a dragon!
Mergon is offline   #6 Reply With Quote
dungeonguru
Senior Member
 
Join Date: May 2016
Posts: 596

Old February 21st, 2018, 04:13 PM
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.?]
I have another adjustment for immunity that is almost exactly the same, just uses the DamageImm.? and DamComImm.? tags.
dungeonguru is offline   #7 Reply With Quote
ShadowChemosh
Senior Member
Volunteer Data File Contributor
 
Join Date: Jan 2010
Location: Chicago, IL (USA)
Posts: 10,730

Old February 21st, 2018, 08:16 PM
@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.
ShadowChemosh is offline   #8 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 06:14 AM.


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