PDA

View Full Version : 5E - Advantage Display



kentmccullough
May 5th, 2020, 18:15
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 Unity

Klandare
June 7th, 2020, 23:30
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.

Will it show THIRD if you have a feat like Elven Accuracy where you get to throw 3 dice if you have advantage? (if not, can it be added :))

ScriedRaven
June 8th, 2020, 13:13
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.

kentmccullough
June 9th, 2020, 13:31
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.

matjam
July 18th, 2020, 20:31
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.

matjam
July 18th, 2020, 20:57
As a workaround, I modified the script:



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


Gets you this now

https://i.imgur.com/Gh213hI.png

It's not super ideal but it at least doesn't break the math now.

edit:

a better string is



rRoll.sDesc = rRoll.sDesc .. " [" .. whichDie .. " DROPPED]";


Which gets you



[FIRST DROPPED] [DROPPED 5]


Which I think is more readable.

matjam
July 20th, 2020, 07:19
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



[FIRST DROPPED]

or



[SECOND DROPPED]


to the result text depending on which dice was dropped; and does not modify the calculations allowing the Unity 5e ruleset to do what ever it needs to do.

Moderator: Attachment removed since no longer needed (also you could have done this yourself)

eriktedesco
July 20th, 2020, 18:13
to be used as a substitute for automatic saveadvantage?

matjam
July 20th, 2020, 20:44
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.

eriktedesco
July 20th, 2020, 20:51
Ok, is your extension complementar with Kent's one or is it a substitute?

matjam
July 20th, 2020, 21:01
it's a replacement.

kentmccullough
July 20th, 2020, 21:03
His is a substitute version for unity, as there appears to currently be a bug. Until I have a chance to update the original one.

eriktedesco
July 21st, 2020, 18:03
Sorry I'm plain dumb...is 5e-Advantage Display the same as Automatic Save Advantage?

matjam
July 21st, 2020, 18:07
No, read the description in the first post


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.

Do you ever accidentally roll for advantage or disadvantage and then wonder which dice was dropped?

matjam
September 26th, 2020, 19:28
I've asked the mods to delete my post with the extension, people should now use Kent's version for Unity in the first post.

eporrini
May 29th, 2021, 04:02
All, I have noticed this extension no longer works with unity when combined with the elven accuracy extension. I caught onto in when I saw I had rolled a 15 with elven accuracy and a +10 attack bonus and only had an 18 on the total roll. After testing it seems to be that sometimes the extension uses one of the dropped dice to calculate the total even though the correct die is listed on the attack roll. It's an intermittent issue, but I was able to recreate it reliably with less than 10 rolls. Maybe the issue is happening when it drops the third die, as I never see it indicate a drop of that die when listing what's been dropped. Once I disable this extension, the issue goes away. I am using the latest version of FGU 5E campaign.

Stv
May 29th, 2021, 16:27
Update version of Elven Accuracy posted to the forum, which should now work alongside this extension in Unity.

Cheers, Steve.