STAR TREK 2d20
Page 1 of 2 12 Last

Thread: Modifier Field

  1. #1

    Modifier Field

    PFRPG1.0

    I want to remove the Modifier field from the dashboard. I tried looking in the CorRPG file and i'm seeing it reference in multiple files. Any idea on how I can remove this from the dashboard without breaking FGU? So far when I nullify the lines using <!-- --> i'm getting load errors.

    Modifier.png

  2. #2
    Trenloe's Avatar
    Join Date
    May 2011
    Location
    Colorado, USA
    Posts
    33,406
    I don't know if this will work, but try the following once the desktop has loaded:

    Code:
    local wModifier = Interface.findWindow("modifierstack", "");
    if wModifier then
    	wModifier.close();
    end
    Last edited by Trenloe; March 15th, 2024 at 18:29. Reason: Edit of findWindow code
    Private Messages: My inbox is forever filling up with PMs. Please don't send me PMs unless they are actually private/personal messages. General FG questions should be asked in the forums - don't be afraid, the FG community don't bite and you're giving everyone the chance to respond and learn!

  3. #3
    Looks good. Is that in the CoreRPG/desktop/desktop_classes.xml?

  4. #4
    Trenloe's Avatar
    Join Date
    May 2011
    Location
    Colorado, USA
    Posts
    33,406
    Quote Originally Posted by L4wful3vil View Post
    Looks good. Is that in the CoreRPG/desktop/desktop_classes.xml?
    That's where the widowclass definition is. The base panel is in desktop\desktop_panels.xml
    Private Messages: My inbox is forever filling up with PMs. Please don't send me PMs unless they are actually private/personal messages. General FG questions should be asked in the forums - don't be afraid, the FG community don't bite and you're giving everyone the chance to respond and learn!

  5. #5
    Oh I just caught what you said. "...once the desktop has loaded". Type that code in the chat then?

  6. #6
    Zacchaeus's Avatar
    Join Date
    Dec 2014
    Location
    Scotland
    Posts
    20,821
    Quote Originally Posted by L4wful3vil View Post
    Oh I just caught what you said. "...once the desktop has loaded". Type that code in the chat then?
    No, I think Trenloe means that the code must go into your extension in such a way that it runs once the desktop has loaded.
    If there is something that you would like to see in Fantasy Grounds that isn't currently part of the software or if there is something you think would improve a ruleset then add your idea here https://www.fantasygrounds.com/featu...rerequests.php

  7. #7
    Trenloe's Avatar
    Join Date
    May 2011
    Location
    Colorado, USA
    Posts
    33,406
    Quote Originally Posted by L4wful3vil View Post
    Oh I just caught what you said. "...once the desktop has loaded". Type that code in the chat then?
    This is base FG code, so you will need to write an extension with code to carry out the operation.

    Use Interface.onDesktopInit to assign a handler. For example:

    Code:
    function onInit()
    	Interface.onDesktopInit = closeModifierStack;
    end
    
    function closeModifierStack()
    	local wModifier = Interface.findWindow("modifierstack", "");
    	if wModifier then
    		wModifier.close();
    	end
    end
    Last edited by Trenloe; March 15th, 2024 at 18:30. Reason: findWindow code update
    Private Messages: My inbox is forever filling up with PMs. Please don't send me PMs unless they are actually private/personal messages. General FG questions should be asked in the forums - don't be afraid, the FG community don't bite and you're giving everyone the chance to respond and learn!

  8. #8
    I'm ok at looking through extensions and doing some minor editing and tweaking. I haven't taken on writing an extension yet. Anyway any of you all have the time to put one together?

  9. #9
    Trenloe's Avatar
    Join Date
    May 2011
    Location
    Colorado, USA
    Posts
    33,406
    Try the attached - it will appear as "Feature: Close modifier stack" in the extension list.
    Attached Files Attached Files
    Private Messages: My inbox is forever filling up with PMs. Please don't send me PMs unless they are actually private/personal messages. General FG questions should be asked in the forums - don't be afraid, the FG community don't bite and you're giving everyone the chance to respond and learn!

  10. #10
    Actually you can just use this now; no need to register an event handler.

    Code:
    function onTabletopInit()
    	closeModifierStack();
    end
    Regards,
    JPG

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
FG Spreadshirt Swag

Log in

Log in