Thread: 5E - Advantage Display
-
May 5th, 2020, 18:15 #1
- Join Date
- May 2017
- Location
- Wisconsin, USA
- Posts
- 135
5E - Advantage Display
If you've ever wanted to know if you dropped the first roll or second roll from advantage or disadvantage this extension is for you.
This will change the "[DROPPED 15]" in the chat to "[DROPPED FIRST 15]" or "[DROPPED SECOND 15]" whichever is applicable, just so you can know how if the advantage or disadvantage actually made a difference in any given scenario.
Version 1.0: Adds FIRST or SECOND to the dropped modifier on roll messages.
Version 1.0.1: Bugfix for UnityLast edited by kentmccullough; September 9th, 2020 at 18:02.
-
June 7th, 2020, 23:30 #2
- Join Date
- Jul 2016
- Posts
- 314
-
June 8th, 2020, 13:13 #3
As fantasy grounds doesn't have a way to roll three dice by default, no it doesn't. If you use the Elven Accuracy extension then it'll tell you which one was dropped from the regular advantage, but it won't tell you what other dice it dropped. It looks like it could be, but I don't know enough programming to try.
-
June 9th, 2020, 13:31 #4
- Join Date
- May 2017
- Location
- Wisconsin, USA
- Posts
- 135
If you use the eleven accuracy extension you’ll know if it was that die because it doesn’t have anything stated. So that would be the third one.
-
July 18th, 2020, 20:31 #5
- Join Date
- May 2020
- Posts
- 72
FYI Kent, it seems bugged in Unity; it will say "dropped first 5" and then use the 5 in the calculation and you'll miss even if you rolled 20 for the second dice.
Am looking to see if there's something obvious there.
-
July 18th, 2020, 20:57 #6
- Join Date
- May 2020
- Posts
- 72
As a workaround, I modified the script:
Code:originalDecodeAdvantage = nil function onInit() originalDecodeAdvantage = ActionsManager2.decodeAdvantage ActionsManager2.decodeAdvantage = decodeAdvantage; end function decodeAdvantage(rRoll) local bADV = string.match(rRoll.sDesc, "%[ADV%]"); local bDIS = string.match(rRoll.sDesc, "%[DIS%]"); if (bADV and not bDIS) or (bDIS and not bADV) then if #(rRoll.aDice) > 1 then local nDecodeDie; if (bADV and not bDIS) then nDecodeDie = math.max(rRoll.aDice[1].result, rRoll.aDice[2].result); nDroppedDie = math.min(rRoll.aDice[1].result, rRoll.aDice[2].result); -- rRoll.aDice[1].type = "g" .. string.sub(rRoll.aDice[1].type, 2); else nDecodeDie = math.min(rRoll.aDice[1].result, rRoll.aDice[2].result); nDroppedDie = math.max(rRoll.aDice[1].result, rRoll.aDice[2].result); -- rRoll.aDice[1].type = "r" .. string.sub(rRoll.aDice[1].type, 2); end local whichDie = (nDecodeDie == rRoll.aDice[1].result) and "SECOND" or "FIRST"; -- rRoll.aDice[1].result = nDecodeDie; -- table.remove(rRoll.aDice, 2); -- if rRoll.aDice.expr then -- rRoll.aDice.expr = nil; -- end rRoll.sDesc = rRoll.sDesc .. " [" .. whichDie .. " WAS ".. nDroppedDie .. "]"; end end originalDecodeAdvantage(rRoll) end
It's not super ideal but it at least doesn't break the math now.
edit:
a better string is
Code:rRoll.sDesc = rRoll.sDesc .. " [" .. whichDie .. " DROPPED]";
Code:[FIRST DROPPED] [DROPPED 5]
Last edited by matjam; July 18th, 2020 at 21:17.
-
July 20th, 2020, 07:19 #7
- Join Date
- May 2020
- Posts
- 72
With Kent's approval, I've attached a "unity compatible" version of this extension with my modifications.
Does not work the same as what it does in Classic; this extension simply adds the text
Code:[FIRST DROPPED]
Code:[SECOND DROPPED]
Moderator: Attachment removed since no longer needed (also you could have done this yourself)Last edited by Zacchaeus; September 26th, 2020 at 19:31.
-
July 20th, 2020, 18:13 #8
- Join Date
- Mar 2020
- Posts
- 205
to be used as a substitute for automatic saveadvantage?
-
July 20th, 2020, 20:44 #9
- Join Date
- May 2020
- Posts
- 72
This extension displays which die was dropped in an advantage or disadvantage roll.
Useful when someone rolls for advantage or disadvantage accidentally and you want to take the first dice result.
-
July 20th, 2020, 20:51 #10
- Join Date
- Mar 2020
- Posts
- 205
Ok, is your extension complementar with Kent's one or is it a substitute?
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks