Thread: Window Saver Extension
-
May 20th, 2017, 01:59 #1
Saint
- Join Date
- Apr 2007
- Location
- Mississippi, USA
- Posts
- 1,106
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.
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.Last edited by lokiare; May 9th, 2018 at 14:15. Reason: Version Update
Support:
https://support.fantasygrounds.com/
-
May 20th, 2017, 02:19 #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.
-
May 20th, 2017, 02:21 #3
Saint
- Join Date
- Apr 2007
- Location
- Mississippi, USA
- Posts
- 1,106
Support:
https://support.fantasygrounds.com/
-
May 20th, 2017, 02:49 #4
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.
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!
-
May 20th, 2017, 03:00 #5
Saint
- Join Date
- Apr 2007
- Location
- Mississippi, USA
- Posts
- 1,106
Support:
https://support.fantasygrounds.com/
-
May 20th, 2017, 07:29 #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:
-
May 21st, 2017, 22:23 #7
Saint
- Join Date
- Apr 2007
- Location
- Mississippi, USA
- Posts
- 1,106
Last edited by lokiare; May 21st, 2017 at 23:25.
Support:
https://support.fantasygrounds.com/
-
May 22nd, 2017, 00:26 #8
thank you!!
FGU Standard License Holder.
Currently Running:
-
May 22nd, 2017, 00:55 #9
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.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!
-
May 22nd, 2017, 20:14 #10
Saint
- Join Date
- Apr 2007
- Location
- Mississippi, USA
- Posts
- 1,106
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.Support:
https://support.fantasygrounds.com/
Thread Information
Users Browsing this Thread
There are currently 2 users browsing this thread. (0 members and 2 guests)
Bookmarks