Member
Join Date: Oct 2010
Posts: 74
|
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 |
#1 |
Senior Member
Join Date: Jan 2016
Location: Adelaide, Australia
Posts: 2,294
|
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 |
#2 |
Senior Member
Join Date: May 2016
Posts: 608
|
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. |
#3 |
Member
Join Date: Oct 2010
Posts: 74
|
What would be the code for ranged weapons? I could do the * and description
|
#4 |
Member
Join Date: Oct 2010
Posts: 74
|
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. |
#5 |
Senior Member
Join Date: May 2016
Posts: 608
|
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. |
#6 |
Member
Join Date: Oct 2010
Posts: 74
|
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
Script 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
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. |
#7 |
|
|