Roll20 uses cookies to improve your experience on our site. Cookies enable you to enjoy certain features, social sharing functionality, and tailor message and display ads to your interests on our site and others. They also help us understand how our site is being used. By continuing to use our site, you consent to our use of cookies. Update your cookie preferences .
×
Create a free account

Tiebreaker for Initiative 5e

Hi!  In D&D it's possible to have advantage on initiative in certain instances.  I've been wondering how to implement this with a macro for an NPC using that version of the OGL sheet.  So far I have this, which works fine, but doesn't include the Dexterity tiebreaker: @{selected|token_name} /roll {2d20KH1} + @{selected|dexterity_mod} &{tracker} I'd love some help; either ideas where to look or coding suggestions! Thanks!
The Dex tiebreaker is included in the "initiative_bonus" property.  Just substitute that for "dexterity_mod" and make sure you have the "add dex tiebreaker to initiative" checked on the settings page (little gear) of the character sheet. Bill
Add an extra modifier in there of + @{selected|dexterity}/100
1594252551
Kraynic
Pro
Sheet Author
If the tie breaker is just the dex in decimal form, you could do something like this: @{selected|token_name} /roll {2d20KH1} + @{selected|dexterity_mod} + [[@{selected|dexterity_base}*.01]] &{tracker} One way to get an attribute for an npc is to bring up an npc sheet and put it in edit mode.  Put your cursor in with the stat you want the attribute for, right click on it, and select inspect element.  Doing that with dexterity on an npc brought up attr_dexterity_base.  Strip off the attr_ bit and you have what goes in the attribute call.
1594253015

Edited 1594253219
Oosh
Sheet Author
API Scripter
Here's one in a 5e template (assuming you're using the Roll20 sheet) with an advantage query. It also forces the template to output the token name, instead of using the default value, so you can see who rolled what if there's any double-rolls or other cock ups. @{selected|wtype}&{template:simple}{{rname=INITIATIVE ROLL}}{{mod=@{selected|initiative_bonus}}}{{r1= [[?{With advantage?|Normal, 1d20 | Advantage, 2d20kh1 | Disadvantage, 2d20kl1} + @{selected|initiative_bonus}@{selected|pbd_safe}[INIT] &{tracker} ]]}} {{normal=1}} {{charname=@{selected|token_name}}} As others have already pointed out, using @{initiative_bonus} instead of @{dexterity_mod} will include the tiebreaker if you have it turned on in the sheet. If you want to force tiebreaker regardless of sheet settings, replace the @{initiative_bonus} calls with Kraynic's math above.
Thanks everyone!