Starfinder Playlist
Page 12 of 19 First ... 21011121314 ... Last

Thread: Hacking a Theme

  1. #111
    Quote Originally Posted by bmos View Post
    ...this will get rid of the extra button but doesn't include a replacement (so you have to get to starship combat tracker by opening regular combat tracker and clicking the starship).

    I used photoshop to change the "starships" button from blue to green and added it back in with the correct name, but it still doesn't show up (not sure why). At least it isn't floating over on the right anymore!
    I just tried this extension, and on my system (FGU,) the button is still there orphaned on the right-hand side!

    Updating to see if anything in the Ruleset, or otherwise, has changed.

    Update: Nope! Still there. (I've been battling this little guy for days now. It appears that there is a separate window(_class?) created for THIS particular Icon. I know that is inserted into the Stack special, because of THIS code in data_desktop_SFRPG.lua (using regsiterStackShortcut2 instead of registerStackShorcut.) However, I think this has NOTHING to do with the graphics.

    Code:
        if User.isHost() then 
            DesktopManager.registerStackShortcut2("button_shipct", "button_shipct_down", "sidebar_tooltip_shipct", "ct_ship_combat","combattracker");
        else
            DesktopManager.registerStackShortcut2("button_shipct", "button_shipct_down", "sidebar_tooltip_shipct", "shipcombattracker_client","combattracker");
        end

    Maybe superteddy57, you could enlighten us on any graphic changes (panels, frames, icons, windows) that you made to implement this button?
    Attached Images Attached Images
    Last edited by Tuleen Donai; September 29th, 2020 at 17:51.

  2. #112
    Quote Originally Posted by Tuleen Donai View Post
    I just tried this extension, and on my system (FGU,) the button is still there orphaned on the right-hand side!

    Updating to see if anything in the Ruleset, or otherwise, has changed.
    Yes, it does seem to ignore this workaround in Unity. That being said, the theme seems to have much bigger issues in Unity (the buttons are all in a jumble on top of each other).

  3. #113
    Only initially. If you click the "red" area, it will bring up the library, and then click on Create PC or something, and they straighten out decently.

    I think there is an initialization problem (or lack thereof) with this extension too. But, battling the Shipct button first.

  4. #114
    DesktopManager.registerStackShortcut2 is basically just that, a register to add the Ship CT button to the top stack when it runs through and creates those buttons under normal situations. There isn't any special code I used to get it added to the top stack. I used a function from the DesktopManager (something housed in CoreRPG) that helps create additional buttons. I'm not sure how this extension works, but what I would suggest is killing my register and then simply creating a new button with the parameters from the register to allow the button to work as any other sidebar button would work. This is how I would approach this fix, if I were the developer of the extension.
    Dominic Morta
    Ruleset Developer
    Smiteworks

    How to zip up your campaign if the Developers ask for it-How to zip up your campaign if the Developers ask for it

    How to provide an Unity Connection issue?-Connection Issues and What to Provide

    Unity Updater issue?-Updater Issues

    Classic and Unity Port Forwarding?-Fantasy Grounds Connections Explained

    Comcast or Cox ISP User?-Comcast XFinity and Cox Users

    Have a suggestion?-Feature Request

  5. #115
    Quote Originally Posted by superteddy57 View Post
    DesktopManager.registerStackShortcut2 is basically just that ....
    Hey! Thanks for the insight! I had started coming to that conclusion myself. I actually went into the SFRPG ruleset, and commented out this code, just to see how the system would react. The button disappeared as expected, and there was no longer an empty slot over in the stack attached to the chat window, however ...

    An interesting observation is that the original "window" for the Stack and Shortcut buttons IS STILL there! Albeit, resized to the width of the newly redefined buttons. I think that if I can eliminate that window all together, perhaps when I put back the ShipCt button (register,) it will magically show up where it's supposed to! A bit of a long shot, I know.

  6. #116
    Shouldn't this de-register it?

    Code:
            DesktopManager.removeStackShortcut("combattracker");
    It didn't have ANY affect?

  7. #117
    Code:
    function onInit()
    	for k,v in pairs(aDataModuleSet) do
    		for _,v2 in ipairs(v) do
    			Desktop.addDataModuleSet(k, v2);
    		end
    	end
    
    	CharacterListManager.registerDropHandler("shortcut", onShortcutDropOverride);
    end
    Create a new data_desktop.lua, set it up as a global script and just input that code to have it not use the register. It will override the ruleset code.
    Dominic Morta
    Ruleset Developer
    Smiteworks

    How to zip up your campaign if the Developers ask for it-How to zip up your campaign if the Developers ask for it

    How to provide an Unity Connection issue?-Connection Issues and What to Provide

    Unity Updater issue?-Updater Issues

    Classic and Unity Port Forwarding?-Fantasy Grounds Connections Explained

    Comcast or Cox ISP User?-Comcast XFinity and Cox Users

    Have a suggestion?-Feature Request

  8. #118
    OK. So, please help me to understand. In his extension, he has a script that defines - init_desktop.lua:

    Code:
    function onInit()
    
    		DesktopManager.showDockTitleText(false);
    		DesktopManager.setStackIconSizeAndSpacing(28, 28, 0, 0);
    		DesktopManager.setDockIconSizeAndSpacing(28, 28, 0, 0);
    		DesktopManager.setUpperDockOffset(0, 0, 0, 0);
    		DesktopManager.setStackOffset(0, 0, 0, 0);
    		DesktopManager.setLowerDockOffset(1, 0, 0, 0);
    		DesktopManager.setMaxDockColumns(1);
    
    end
    Does this onInit() override the one in SFRPG ruleset - data_desktop_SFRPG.lua?

    Code:
    function onInit()
    	for k,v in pairs(aDataModuleSet) do
    		for _,v2 in ipairs(v) do
    			Desktop.addDataModuleSet(k, v2);
    		end
    	end
    	CharacterListManager.onShortcutDrop = onShortcutDropOverride;
    	CharacterListManager.registerDropHandler("shortcut", onShortcutDropOverride);
    
        if User.isHost() then 
            DesktopManager.registerStackShortcut2("button_shipct", "button_shipct_down", "sidebar_tooltip_shipct", "ct_ship_combat","shipcombattracker", false);
       else
            DesktopManager.registerStackShortcut2("button_shipct", "button_shipct_down", "sidebar_tooltip_shipct", "shipcombattracker_client","shipcombattracker", false);
    	end
    
    end
    Because the behavior would suggest that it does not. Also, I tried adding the code you suggested to his init_desktop.lua's onInit(), and it throws an error. Something about an invalid pair or something. Probably, something not defined in those for loops.

    [9/30/2020 8:31:45 AM] [<color="red">ERROR</color>] Script execution error: [string "scripts/init_desktop.lua"]:13: bad argument #1 to 'pairs' (table expected, got nil)


    I've actually tried a number of things trying to affect the Desktop and it's definition, like Modifying the SFRPG ruleset - specifically the onInit() and removing the DesktopManager.registerStackShortcut2 calls. This definitely made the Shipct icon comepletely disappear, but it DID NOT make the frame/window over on the right side that used to contain the Dock and Stack disappear - it's still there.

    If I move the code to add Shipct to the Stack somewhere else (like into his extension in onInit() ), it just behaves EXACTLY the same way, and leaves the Shipct Icon over in the frame/window to the right.

    -- "Dug in like an Alabama tick!"


    So, my goal is to resolve these two things:

    * Eliminate that frame/window to the right
    * add in the Shipct button to the Stack, so that it moves with the other Stack Icons, like we'd expect.

    Last Goal:
    * Get the desktop to initialize properly, so that you DON'T have to go to the Library and click on a Stack selection to get the Icons to display correctly.
    Last edited by Tuleen Donai; September 30th, 2020 at 16:32.

  9. #119
    disregard, didn't work that well
    Last edited by bmos; September 30th, 2020 at 16:57.

  10. #120
    Quote Originally Posted by bmos View Post
    Have you changed the script name in extension.xml? If this isn't the same it will not override (not sure if this is the issue but it did get my icon to show up in Unity)
    Really?! That's not what I would have expected, but I'm not an expert on XML and LUA. I would have expected the override would happen on symbol names and not file names. The same file in SFRPG ruleset is named data_desktop_SFRPG.lua - rather unique.

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
  •  
DICE PACKS BUNDLE

Log in

Log in