DICE PACKS BUNDLE
  1. #1
    RTFallen's Avatar
    Join Date
    Jun 2014
    Location
    Nebraska, USA
    Posts
    161
    Blog Entries
    5

    Making changes to manager_desktop.lua from an external script.

    I was wondering if it was possible to make changes to the variables in the manager_desktop.lua variables from an outside script.

    I've tried this:
    Code:
    local stackcolumns = 1;
    local stackiconsize = { 92, 50 };
    local stackspacing = { 0, 0 };
    local stackoffset = { 5, 0 };
    
    local stacktodockspacing = 0;
    
    local dockiconsize = { 92, 27 };
    local dockspacing = 2;
    local dockoffset = { 5, 0 };
    
    function onInit()
    	DesktopManager.stackcolumns = stackcolumns;
    	DesktopManager.stackiconsize = stackiconsize;
    	DesktopManager.stackspacing = stackspacing;
    	DesktopManager.stackoffset = stackoffset;
    
    	DesktopManager.stacktodockspacing = stacktodockspacing;
    
    	DesktopManager.dockiconsize = dockiconsize;
    	DesktopManager.dockspacing = dockspacing;
    	DesktopManager.dockoffset = dockoffset; 
    end
    But I'm thinking that since they are local variables to the manager_desktop.lua that they can't actually be changed from outside the script. I'm trying to create a theme that changes the dock and stack columns, but I'm not wanting to make changes to manager_desktop.lua unless I absolutely have to.

    Thanks in advance.

    Resire

    FG Con 5 – October 17-19th 2014 - register at www.fg-con.com for all the latest info.

    100
    My Projects

  2. #2
    Trenloe's Avatar
    Join Date
    May 2011
    Location
    Colorado, USA
    Posts
    33,402
    As you suspect, you can't access them externally because they are local to that script. You'll need to add some small functions to manager_desktop.lua to expose a function to allow you to change the local variables. Of course, this will mean that on each future version change of CoreRPG you'll have to see if manager_desktop.lua has changed since the previous versions and update accordingly.
    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
    RTFallen's Avatar
    Join Date
    Jun 2014
    Location
    Nebraska, USA
    Posts
    161
    Blog Entries
    5
    Quote Originally Posted by Trenloe View Post
    As you suspect, you can't access them externally because they are local to that script. You'll need to add some small functions to manager_desktop.lua to expose a function to allow you to change the local variables. Of course, this will mean that on each future version change of CoreRPG you'll have to see if manager_desktop.lua has changed since the previous versions and update accordingly.
    Thanks Trenloe. I think I'll just make my changes in the manager_desktop.lua. Thinking about trying to add a button to hide (or reduce the size) of the side column anyway, so will probably add the functions to the script as well.

    Resire

    FG Con 5 – October 17-19th 2014 - register at www.fg-con.com for all the latest info.

    100
    My Projects

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
  •  
5E Product Walkthrough Playlist

Log in

Log in