FG Spreadshirt Swag
Page 3 of 4 First 1234 Last

Thread: 5E Save Overlay

  1. #21
    Quote Originally Posted by ColinBuckler View Post
    Fantastic - just what I need for my 5E games.

    Would have liked a command line option to clear the saves so I can function key it. So I added:

    Comm.registerSlashHandler("clearsaves", handleMessageDeleteAllSaveOverlays, "Clear Saves")

    This went in the scripts/save_overlay_manager.lua file at line 8. See below:

    Code:
    function onInit()
        UDG5ESaveOverlayHelper.verbose({"save_overlay_manager.lua:: onInit()"});
    
        originalApplySave = ActionSave.applySave
        ActionSave.applySave = applySave
    
        Comm.registerSlashHandler("clearsaves", handleMessageDeleteAllSaveOverlays, "Clear Saves")
    
        OOBManager.registerOOBMsgHandler(OOB_MSGTYPE_DELETE_ALL_SAVE_OVERLAYS, handleMessageDeleteAllSaveOverlays);
    end
    Cheers!
    Just keep in mind without any logic concerning the host or not, anyone can slap that command in the chat window and clear the saves. I've been back and forth about whether I want to add a slash command to both this and the wound overlay extension.

  2. #22
    Quote Originally Posted by daddyogreman View Post
    Cheers!
    Just keep in mind without any logic concerning the host or not, anyone can slap that command in the chat window and clear the saves. I've been back and forth about whether I want to add a slash command to both this and the wound overlay extension.
    A slash command would be awesome, but which chat message would clear? "clearsaves" or "Clear Saves"? Thank you.

  3. #23
    Quote Originally Posted by SmackDaddy View Post
    A slash command would be awesome, but which chat message would clear? "clearsaves" or "Clear Saves"? Thank you.
    In ColinBuckler's example, typing /clearsaves in the chat window will yield the same result as hitting the button.

  4. #24

    Join Date
    Mar 2014
    Location
    Staffordshire, UK
    Posts
    228
    Yup - its late here in the UK.....

    Code:
    	if User.isHost() then
    		Comm.registerSlashHandler("clearsaves", handleMessageDeleteAllSaveOverlays, "Clear Saves")
    	end
    Wrapped it for Host only, which gives:


    Code:
    function onInit()
        UDG5ESaveOverlayHelper.verbose({"save_overlay_manager.lua::onInit()"});
    
        originalApplySave = ActionSave.applySave
        ActionSave.applySave = applySave
    
        if User.isHost() then
            Comm.registerSlashHandler("clearsaves", handleMessageDeleteAllSaveOverlays, "Clear Saves")
        end
    
        OOBManager.registerOOBMsgHandler(OOB_MSGTYPE_DELETE_ALL_SAVE_OVERLAYS, handleMessageDeleteAllSaveOverlays);
    end
    Ultimate License
    UK Time Zone (GMT/BST)
    DM'ing since 1977 (Basic D&D)
    Currently Playing:
    Storm King's Thunder 5E Campaign
    Tales from the Yawning Portal 5E Campaign
    Rise of the Runelords Pathfinder 1e
    "Some are born to move the world, to live their fantasies
    But most of us just dream about the things we'd like to be."
    Rush - Losing It

    Currently DM'ing
    Princes of the Apocalypse 5E Campaign
    Waterdeep: Mad Mage 5E Campaign
    Ghosts of Saltmarsh 5E Campaign
    The Blight 5E Campaign

  5. #25
    Quote Originally Posted by daddyogreman View Post
    In ColinBuckler's example, typing /clearsaves in the chat window will yield the same result as hitting the button.
    Ah, ok, misunderstood - I would have to code that in myself to your extension if I wanted that.....I apologize for my confusion.

  6. #26
    Quote Originally Posted by SmackDaddy View Post
    Ah, ok, misunderstood - I would have to code that in myself to your extension if I wanted that.....I apologize for my confusion.
    Yup, ColinBuckler seems fond of tweaking my extensions ever so slightly.

    Though I think I convinced myself to add this for the Wound Overlay extension and this one. Just a bit of logic to work out with this one, as it's already been requested I make a toggle as to whether or not players can see the save overlays.
    If so, the chat command and button for players would clear it for those players, but not sure what I'd do for the GM - clear it for everyone? Add a second command/button for the GM to clear it for everyone? Got some things to think through.


    In the mean time, I just slapped ColinBuckler's code into a branch and you can download it with his change here until I revisit this officially.

  7. #27
    Personally, if it was an either/or rather than an option, I'd vote for the GM to only clear their own, and for the Player to utilise their own button or chat command for their end. And then if there was an automatic 'clear on moving to next combat tracker entry' option we'd be really 'belt and braces'!
    Last edited by Ludd_G; February 25th, 2021 at 00:46.

  8. #28
    @daddyogreman, I found my issue. I had Celestian’s Situational Awareness extension loaded and it has a couple of buttons on it that override yours. When I disabled it I can see your buttons (sort of). In my game, your “clear wounds” button is almost exactly on top of the “clear saves” button with just a sliver of exposure on the left. Not sure best how to handle button positioning.

    I love having a command line save clear, so great addition there. I am also whole heartedly on board for players seeing the save overlay. A toggle would be perfect for those DMs that only want to see it themselves. Your recent extensions have been a godsend, I’m using all three and happy to have them. Many thanks!

  9. #29

    Join Date
    Mar 2014
    Location
    Staffordshire, UK
    Posts
    228
    I have only just started looking at coding myself with FG and it has made me appreciate the amount of effort all extension writers put into their creations. There is a step learning curve to understand hooking into the existing routines as well as what routine does what as the code is not that well documented.

    There are a number of mods that offer similar functionality with regards saves and death visuals on tokens - it is obviously a very popular configuration request by the user base.

    With daddyogreman's 3 recent mods I have moved away from some of the older extensions that offer similar functionality which are in various states of flux - some of which are broken.

    So many thanks for providing these extensions..
    Ultimate License
    UK Time Zone (GMT/BST)
    DM'ing since 1977 (Basic D&D)
    Currently Playing:
    Storm King's Thunder 5E Campaign
    Tales from the Yawning Portal 5E Campaign
    Rise of the Runelords Pathfinder 1e
    "Some are born to move the world, to live their fantasies
    But most of us just dream about the things we'd like to be."
    Rush - Losing It

    Currently DM'ing
    Princes of the Apocalypse 5E Campaign
    Waterdeep: Mad Mage 5E Campaign
    Ghosts of Saltmarsh 5E Campaign
    The Blight 5E Campaign

  10. #30
    Now if we can just persuade you to have a look at the sadly languishing Roll For Initiative Addon... (hey, I can dream can't I?!?? )

    https://www.fantasygrounds.com/forum...ontested-skill

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
  •  
Fantasy Grounds Fridays Pre

Log in

Log in