Lone Wolf Development Forums  

Go Back   Lone Wolf Development Forums > Hero Lab Forums > HL - D&D 5th Edition SRD
Register FAQ Community Today's Posts Search

Notices

Reply
 
Thread Tools Display Modes
furby076
Member
 
Join Date: Oct 2010
Posts: 74

Old August 7th, 2018, 04:58 PM
My paladin had his eye gouged out by toddler orcs in an orc den. DM said my character will suffer disadvantage on PErception and ranged attacks.

So, for now, I am creating a wondrous item to give these two disabilities, but not sure how to give disadvantage, only advantage.

Can someone help out?

if (field[abilActive].value <> 0) then
#situational[hero.child[skPerception], "Disadvantage on Perception", field[thingname].text]
endif
furby076 is offline   #1 Reply With Quote
daplunk
Senior Member
 
Join Date: Jan 2016
Location: Adelaide, Australia
Posts: 2,294

Old August 7th, 2018, 06:28 PM
I've never code this in. Just added a description somewhere.

Realm Works - Community Links
Realm Work and Hero Lab Videos
Ream Works Facebook User Group
CC3+ Facebook User Group

D&D 5e Community Pack - Contributor
General Hero Lab Support & Community Resources
D&D 5e Community Pack - Install Instructions / D&D 5e Community Pack - Log Fault / D&D 5e Community Pack - Editor Knowledge Base

Obsidian
Obsidian TTRPG Tutorials
daplunk is offline   #2 Reply With Quote
dungeonguru
Senior Member
 
Join Date: May 2016
Posts: 608

Old August 8th, 2018, 03:17 AM
I thought all that #situtational did was add the * to the character sheet next to what you're trying to show a modifier on, so it works for either Advantage or Disadvantage.

If you're asking how to code the ranged attack portion I don't know if you can add situational text to weapons beyond adding the text in the wAttackEff text field.
dungeonguru is offline   #3 Reply With Quote
furby076
Member
 
Join Date: Oct 2010
Posts: 74

Old August 8th, 2018, 04:10 PM
What would be the code for ranged weapons? I could do the * and description
furby076 is offline   #4 Reply With Quote
furby076
Member
 
Join Date: Oct 2010
Posts: 74

Old August 8th, 2018, 05:19 PM
I imagine something could be based on Berserker axe. Just not sure how to change it. The item this will get applied to is an "eye patch" (wondrous magic item). I trimmed the stuff about weapon naming. SO i think this is the area, just not sure how to get it to show on ranged weapons only. Basically, I would like text "disadvantage on ranged attacks" to appear on ranged weapons

----
So the below works to give longbow and shortbow disadvantage, but it doesn't work for dtRangeWep. THoughts on how to include this for all ranged weapons short of typing out every ranged weapon name?

Post Levels - Priority 10000 index 2

~curse giving disadvantage to ranged attack rolls
~foreach pick in hero from BaseWep
~foreach pick in hero from BaseWep where "IsWeapon.dtRangeWep"
foreach pick in hero from BaseWep where "IsWeapon.wLongbow | IsWeapon.wShortbow"
if (eachpick.uniqindex <> this.uniqindex) then
#situational[eachpick, "Disadvantage on attack rolls with ranged weapons", field[thingname].text]
endif
nexteach


Timing: Before Calc tCurrentHP


-----

Last edited by furby076; August 8th, 2018 at 06:28 PM.
furby076 is offline   #5 Reply With Quote
dungeonguru
Senior Member
 
Join Date: May 2016
Posts: 608

Old August 9th, 2018, 03:37 AM
I modified the script to be the following to pick up the ranged category weapons.

~curse giving disadvantage to ranged attack rolls
foreach pick in hero from BaseWep where "wCategory.RangeProj | wCategory.RangeThrow"
#situational[eachpick, "Disadvantage on attack rolls with ranged weapons", field[thingname].text]
nexteach

If you don't have the bonus hp scripting from the Berserker Axe, you don't need to worry about running it before Calc tCurrentHP

The script is adding the situational text to the weapon, but it doesn't show on the UI (no *) or the statblock. It DOES show on the printed sheet and on the mouseover. I don't think the UI has code to show the * for attacks. I even checked this by equipping and attuning a Berserker Axe - the * and info does not show up on the character sheet in the UI, although it does show up on the printed copy and on mouseovers.
dungeonguru is offline   #6 Reply With Quote
furby076
Member
 
Join Date: Oct 2010
Posts: 74

Old August 9th, 2018, 04:24 PM
You guys are great! This request can be closed

For those interested:
Scenario: A (N)PC has one eye. You are imposing disadvantage on Perception and Ranged attacks due to this one eye (major suck, but your fault for losing an eye).

Solution
  • Create Wondrous item
  • Powers Always Available

Script 1
  • Phase: Pre-Levels
  • Priority: 10000
  • Index 1

~Gives disadvantage to Perception. Shows up as an * next to the skill

#situational[hero.child[skPercep],"Disadvantage on Perception checks",field[thingname].text]

Script 2
  • Phase: Pre-Levels
  • Priority: 10000
  • Index: 2
~curse giving disadvantage to ranged attack rolls
foreach pick in hero from BaseWep where "wCategory.RangeProj | wCategory.RangeThrow"
#situational[eachpick, "Disadvantage on attack rolls with ranged weapons", field[thingname].text]
nexteach

Last edited by furby076; August 9th, 2018 at 04:27 PM.
furby076 is offline   #7 Reply With Quote
Reply


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 10:17 AM.


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