DMsGuild Classic
Page 1 of 6 123 ... Last
  1. #1

    Join Date
    Apr 2007
    Location
    Mississippi, USA
    Posts
    624

    Window Saver Extension

    I'd like to let everyone know that this is a community extension and does not have official Fantasy Grounds support. All problems should be directed to this thread.

    Quote Originally Posted by Gkjsdll View Post
    After a good chunk of work and some back-and-forths with lokiare1, I've split off my changes into a separate extension, Window Saver X (with his OK on the name similarity)

    From what I can tell, it should work with every ruleset. If anyone finds any issues with it, know that I plan to actively support the extension for the forseeable future.
    I'm no longer supporting or updating this extension.

    Window Saver is a simple Fantasy Grounds extension that opens the windows you last had open when you closed Fantasy Grounds (with the extension enabled). (Version 3.3.2 saves desktop panel locations out of the box, so that feature has been removed).

    Version 0.5.1.

    Remembers and opens (tested in 5E, PFRPG, Savage Worlds, but should work in most rulesets):
    • Master Index
    • Characters
    • Notes
    • Images
    • Tables
    • Story
    • Quests
    • NPCs
    • Encounters
    • Items
    • Parcels
    • Feats
    • Classes
    • Backgrounds
    • Races
    • Spells
    • Party Sheet
    • Effects
    • CT
    • Modifiers


    Windows that don't open:
    • Unknown


    Known issues:
    • Some windows don't open, and may throw errors.


    Version History:
    V0.5.1
    • Removed desktop panel saving and loading code.

    V0.4.1
    • Changed the prompt frame to something that doesn't hurt the eyes.

    V0.4.0
    • Removed use on Client. Added custom Frames and classes so that it runs in any ruleset.

    V0.3.0
    • Added prompt to load windows from last time, which gives delay and removes masterindex bug.

    V0.2.0
    • Allows multiple windows of same class to open, saves position of desktop panels: chat, dice tower, modifier stack.

    V0.1.0
    • Initial Version


    Let me know if you get an error and what window class is listed right above the error in the console and I'll add it to the ignore list. Also remember this is Alpha test software, it may not work all the time and you may get errors using it.
    Attached Files Attached Files
    Last edited by lokiare; May 9th, 2018 at 14:15. Reason: Version Update
    For support post in the House of Healing or email [email protected]
    Have a suggestion for a feature? Go here http://fg2app.idea.informer.com/

  2. #2
    I'm glad to see this. One question that did raise when I saw this was that a few windows in FG always reopen in the center, on purpose. Moon said this was to ensure that the windows never get lost off the edges of the program window. I think the Characters window was one of them. What are your thoughts on this?
    I never claimed to be sane. Besides, it's more fun this way.

  3. #3

    Join Date
    Apr 2007
    Location
    Mississippi, USA
    Posts
    624
    Quote Originally Posted by Nickademus View Post
    I'm glad to see this. One question that did raise when I saw this was that a few windows in FG always reopen in the center, on purpose. Moon said this was to ensure that the windows never get lost off the edges of the program window. I think the Characters window was one of them. What are your thoughts on this?
    Fantasy Grounds saves the location of each window when its opened. This extension doesn't affect that at all. It simply re-opens the windows you had open previously.
    For support post in the House of Healing or email [email protected]
    Have a suggestion for a feature? Go here http://fg2app.idea.informer.com/

  4. #4
    Trenloe's Avatar
    Join Date
    May 2011
    Location
    Isle of Wight, UK (for a bit)
    Posts
    27,491
    Very cool. Great idea.

    One Issue I've seen - it only saves one type of window - you can't have two story windows saved. And if you have two masterindex window classes open - i.e. the base Story, NPCs, Images, etc. campaign data list windows opened from the desktop sidebar, you'll get an error on reload and the relevant windows will open completely empty, until you close them and restart the campaign.

    Error when reloading after having two campaign data lists open = Script Error: [string "common/scripts/windowtitlebar.lua"]:48: bad argument #1 to 'setText' (string expected, got nil)

    EDIT: I think these are both related to the two issues listed in post #1.

    One of the main issues is that the child entry in the database is created with createChild(class, "string"); which results in the child XML key being the class name - which is not unique, hence clashing with previous entries as the createChild command will fetch the previous entry - the API doc says: "Create, or if it already exists fetch, the specified child node under the current node."

    I'd suggest just using .createChild() (without any parameters) so that a unique id-XXXXX node is created - then store the class and db reference under that unique node.
    Last edited by Trenloe; May 20th, 2017 at 02:58.
    FG Con 16 Fantasy Grounds Online RPG Convention - Postponed New date To Be Confirmed.
    Register at www.fg-con.com for all the latest info.

    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

    Join Date
    Apr 2007
    Location
    Mississippi, USA
    Posts
    624
    Quote Originally Posted by Trenloe View Post
    Very cool. Great idea.

    One Issue I've seen - it only saves one type of window - you can't have two story windows saved. And if you have two masterindex window classes open - i.e. the base Story, NPCs, Images, etc. campaign data list windows opened from the desktop sidebar, you'll get an error on reload and the relevant windows will open completely empty, until you close them and restart the campaign.

    Error when reloading after having two campaign data lists open = Script Error: [string "common/scripts/windowtitlebar.lua"]:48: bad argument #1 to 'setText' (string expected, got nil)

    EDIT: I think these are both related to the two issues listed in post #1.

    One of the main issues is that the child entry in the database is created with createChild(class, "string"); which results in the child XML key being the class name - which is not unique, hence clashing with previous entries as the createChild command will fetch the previous entry - the API doc says: "Create, or if it already exists fetch, the specified child node under the current node."

    I'd suggest just using .createChild() (without any parameters) so that a unique id-XXXXX node is created - then store the class and db reference under that unique node.
    Thanks Trenloe, if I have time Sunday I'll definitely do that.
    For support post in the House of Healing or email [email protected]
    Have a suggestion for a feature? Go here http://fg2app.idea.informer.com/

  6. #6
    hey I have a question about this, may I request that it remembers chat window changes? for example i like to unlock my chat window, shrink its size down to a quarter of is original size, move it so it almost touches the modifiers and then relock it. When all is said and done, that isnt much effort to do, in fact this post takes more time and effort, but i would love it if it could be done.
    FGU Standard License Holder.

    Currently Running:

  7. #7

    Join Date
    Apr 2007
    Location
    Mississippi, USA
    Posts
    624
    Quote Originally Posted by Wookiee420 View Post
    hey I have a question about this, may I request that it remembers chat window changes? for example i like to unlock my chat window, shrink its size down to a quarter of is original size, move it so it almost touches the modifiers and then relock it. When all is said and done, that isnt much effort to do, in fact this post takes more time and effort, but i would love it if it could be done.
    I've updated the initial post with the new version which now saves the chat, dice tower, and modifier stack positions (and size for chat) for CoreRPG based rulesets.

    If you like this let your friends know. The more people that test this the better it will get.
    Last edited by lokiare; May 21st, 2017 at 23:25.
    For support post in the House of Healing or email [email protected]
    Have a suggestion for a feature? Go here http://fg2app.idea.informer.com/

  8. #8
    thank you!!
    FGU Standard License Holder.

    Currently Running:

  9. #9
    Trenloe's Avatar
    Join Date
    May 2011
    Location
    Isle of Wight, UK (for a bit)
    Posts
    27,491
    Quote Originally Posted by lokiare1 View Post
    I've updated the initial post with the new version which now saves the chat, dice tower, and modifier stack positions (and size for chat) for CoreRPG based rulesets.
    Nice one.

    A few issues:
    1) if the campaign doesn't already have the <windowsaverdesktop> node - i.e. it is the first time the extension has been loaded, then there's an error raised at line 78 with nWindowSaverDesktop being nil. This is because the code just does a DB.findNode for windowsaverdesktop in onDesktopInit() when the node is only created in onDesktopClose.
    2) The masterindex issues appears to be if it is a completely empty masterindex window, it generates an error in windowtitlebar.lua. If there are any records in the masterindex window then it doesn't appear to generate the error. Or if you try again after the first error then it works OK. It seems to be related to the state (empty? Not fully created?) of the base database node - e.g. <encounter> for story entries.
    3) Doesn't work for players, just GMs. This could be your next challenge! Writing some OOB functions that allow the player window positions to be saved as well.
    FG Con 16 Fantasy Grounds Online RPG Convention - Postponed New date To Be Confirmed.
    Register at www.fg-con.com for all the latest info.

    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

    Join Date
    Apr 2007
    Location
    Mississippi, USA
    Posts
    624
    Quote Originally Posted by Trenloe View Post
    Nice one.

    A few issues:
    1) if the campaign doesn't already have the <windowsaverdesktop> node - i.e. it is the first time the extension has been loaded, then there's an error raised at line 78 with nWindowSaverDesktop being nil. This is because the code just does a DB.findNode for windowsaverdesktop in onDesktopInit() when the node is only created in onDesktopClose.
    2) The masterindex issues appears to be if it is a completely empty masterindex window, it generates an error in windowtitlebar.lua. If there are any records in the masterindex window then it doesn't appear to generate the error. Or if you try again after the first error then it works OK. It seems to be related to the state (empty? Not fully created?) of the base database node - e.g. <encounter> for story entries.
    3) Doesn't work for players, just GMs. This could be your next challenge! Writing some OOB functions that allow the player window positions to be saved as well.
    Thanks. I've put these things on the list to update in the next version.

    Number 3 is caused by players not being able to change the DB nodes created by the GM. I might be able to do an if statement to create and store the client values in a separate part of the DB which the clients get ownership of.
    For support post in the House of Healing or email [email protected]
    Have a suggestion for a feature? Go here http://fg2app.idea.informer.com/

Thread Information

Users Browsing this Thread

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

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Starfinder Playlist

Log in

Log in