• Please note: In an effort to ensure that all of our users feel welcome on our forums, we’ve updated our forum rules. You can review the updated rules here: http://forums.wolflair.com/showthread.php?t=5528.

    If a fellow Community member is not following the forum rules, please report the post by clicking the Report button (the red yield sign on the left) located on every post. This will notify the moderators directly. If you have any questions about these new rules, please contact support@wolflair.com.

    - The Lone Wolf Development Team

Need Help: Adding Disadvantage

furby076

Well-known member
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
 
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.
 
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:
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.
 
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:
Back
Top