SWADE Playlist
Page 1 of 2 12 Last
  1. #1

    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 Unity
    Attached Files Attached Files
    Last edited by kentmccullough; September 9th, 2020 at 18:02.
    I'm always looking for ways to enhance the fantasy grounds experience, feel free to reach out to me with suggestions.
    For a list of all my extensions look here.

    The best way to contact me regarding any of my extensions is on Discord in the #kent-mccullough-stuff channel.

  2. #2
    Quote Originally Posted by kentmccullough View 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.

    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 )

  3. #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.

  4. #4
    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.
    I'm always looking for ways to enhance the fantasy grounds experience, feel free to reach out to me with suggestions.
    For a list of all my extensions look here.

    The best way to contact me regarding any of my extensions is on Discord in the #kent-mccullough-stuff channel.

  5. #5
    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.

  6. #6
    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
    Gets you this now



    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]";
    Which gets you

    Code:
    [FIRST DROPPED] [DROPPED 5]
    Which I think is more readable.
    Last edited by matjam; July 18th, 2020 at 21:17.

  7. #7
    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]
    or

    Code:
    [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)
    Last edited by Zacchaeus; September 26th, 2020 at 19:31.

  8. #8
    to be used as a substitute for automatic saveadvantage?

  9. #9
    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.

  10. #10
    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)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
5E Product Walkthrough Playlist

Log in

Log in