PDA

View Full Version : Window Saver X Extension



Gkjsdll
May 7th, 2018, 09:15
Download Latest Version (https://www.fantasygrounds.com/forums/attachment.php?attachmentid=23593&stc=1&d=1527381690)

Overview

Window Saver X allows you to create and edit multiple presets of your often-used windows, then deploy them quickly and easily at need.
- If you are used to saving links in stories to open up a bunch of windows when you start a new encounter, you should consider saving those windows as a preset!
- If you have a layout you like your windows in when you're in town, you should consider saving those windows as a preset!


This extension started off as a patch for Window Saver by lokiare1 (https://www.fantasygrounds.com/forums/showthread.php?38389-Window-Saver-Extension) to add client support, but has since split off into its own extension. I've tested primarily in 5e, but it probably works with most/every ruleset.

Instructions

/wsx clear [name] - Deletes the preset named [name]
/wsx close - Closes all open windows (reopen with /wsx restore)
/wsx help - Displays basic info on the other slash commands in your chat box
/wsx list [page number] - Lists your saved presets
/wsx load [name] - Closes all open windows, then opens windows in the preset [name]
/wsx open [name] - Opens windows in the preset [name] without closing windows
/wsx restore - Reopens all windows closed by the last time you quit the game or loaded a preset
/wsx save [name] - Saves a preset as [name]

GM Only:
/wsx share [name] - Opens windows in the preset for everyone, sharing windows as needed

Known Issues

Some windows aren't properly tracked on client.
There's a bug in FG (https://www.fantasygrounds.com/forums/showthread.php?43695-Interface-onWindowOpened-doesn-t-trigger-when-client-creates-new-window) that currently prevents windows created by the client from being tracked until you close & reopen them. This is pretty specific issue that will go away as soon as the bug is fixed.

Planned Features

A GUI that supports all of the same functionality as the slash commands.
While I love slash commands, I know that there are plenty of people who prefer a GUI. Not sure if GUI would be opened with a button somewhere in the interface or with the slash command /wsx.

Searching through presets rather than listing all of them. Waiting on GUI, maybe no slash command
Maybe /wsx search [query], where you get a list of all presets that start with your query.

Links for Maps which open a set of saved windows without closing windows Waiting on GUI
The idea for this one is that when your party enters a new room with separate notes, an encounter, a loot table, etc... You can open all relevant windows in 1 click in saved locations.

Create presets by drag-and-dropping open windows into GUI Waiting on GUI
This will use the location of the window at the time of drag-and-dropping, which can be updated by re-adding the window to a preset.

Notes

I like to use RTS-style grouping hotkeys, which you can add using hotbars. (e.g. CTRL+F1=/wsx save temp F1=/wsx load temp)

If you load a preset that has no windows in it, all open windows will be closed, which you may or may not find useful.

This extension uses semantic versioning (https://semver.org/), which means that the way I change the version number is changed as follows (vX.Y.Z):
X Changes when the new version breaks something that the extension did before. There's only planned feature that might lead to this, at the moment.
Y Changes when new functionality is added and nothing is broken by the update. Most version changes will hopefully change this number.
Z Changes when no new functionality is added, bug(s) are fixed, and nothing is broken by the update. If I were perfect, every version would end with ".0"

Recent Version History

v3.4.0

add /wsx share (thanks to seycyrus for the suggestion)


v3.3.0

Add /wsx open
Fix errors in client console


v3.2.1


Fix errors in client chat box



Full Version History (https://www.fantasygrounds.com/forums/entry.php?328-Window-Saver-X-Full-Version-History)

Thanks to lokiare1 for the original extension, and for fielding a bunch of questions from me as I was getting started.

Gkjsdll
May 8th, 2018, 07:58
v2.1.0 - Breaking changes see here for more details (https://www.fantasygrounds.com/forums/showthread.php?43706-Window-Saver-X-Extension&p=388747&viewfull=1#post388747)


Improved compatability with other extensions
Removed current_session and last_session from list of user presets
Added /wsx_restore
Now saves all windows closed when loading a preset (accessed with /wsx_restore)



Before upgrading to this version of the extension from the prior version, you should do the following if you want to preserve existing presets:


From your FG data directory, open campaigns>[your_campaign_name_here]>db.xml
For each user, under WindowSaverX>[username], move all presets other than current_session and last_session to be inside a new presets tag (WindowSaverX>[username]>presets>[presets__go_here])


If you don't care about your presets at the time of upgrade, there's little harm in skipping these steps. You'd just end up with a bit of extra data in your db.xml that you could always remove later.

Gkjsdll
May 9th, 2018, 12:41
v3.0.0 - Breaking changes see here for more details




Update /wsx_help text
Paginate /wsx_list to make it easier to manage large numbers of presets (20 presets per page)
Set final support for preset name permitted characters (letters, numbers, ampersands, at signs, colons, periods, hyphens, spaces)
Now filters out unpermitted characters rather than bugging out
Add quotes around preset names in chat for visual clarity



There were a number of bugs that were made possible by the fact that I was letting more symbols get saved in db.xml than I should have. In this process, I changed the way that certain things are converted so they can be stored properly as xml elements.

To persist your presets from before this version:

From your FG data directory open campaigns>[your campaign name here]>db.xml.
For each user, under WindowSaverX>[username], replace all instances of "__" with "__dot__", and all instances of "___" with "__at__".
For each user, under WindowSaverX>[username] change "current_session" to "_current_session", and prepend a "_" to each preset and window (not class, path, geometry, etc)


I know this is super sucky, but I won't make any other changes like this unless updates to FG necessitate it.

Gkjsdll
May 11th, 2018, 23:37
There aren't many who have downloaded this extension, and I don't know how many are using it, but I'd like to hear any ideas/requests for the GUI before I get too far into working on it.

Currently, I'm planning on having it contain a filterable list of all of your presets. Each preset will be able to be opened up and modified, including renaming presets.

There will be a link you can drag onto a map to open a preset's windows without closing open windows - useful for associating several windows with a pin.

At some point I'd want to have presets be groupable similar to stories, items, etc.

Is there some obvious functionality that I'm missing here, or does this seem like a complete feature set?

damned
May 12th, 2018, 02:24
There aren't many who have downloaded this extension, and I don't know how many are using it, but I'd like to hear any ideas/requests for the GUI before I get too far into working on it.

Currently, I'm planning on having it contain a filterable list of all of your presets. Each preset will be able to be opened up and modified, including renaming presets.

There will be a link you can drag onto a map to open a preset's windows without closing open windows - useful for associating several windows with a pin.

At some point I'd want to have presets be groupable similar to stories, items, etc.

Is there some obvious functionality that I'm missing here, or does this seem like a complete feature set?

Some extensions take time to gain traction... some never do. Give it a little longer and then if you havent the feedback you need - build it the way that works for you.

Gkjsdll
May 12th, 2018, 08:07
That makes sense. Since I've thought of what equates to binding multiple windows to a single pin, that has seemed like the most compelling use case. It might gain traction faster if it could be used in that way.

Either way, it's nice just to have someone reply to the thread for the first time :D

ShinigamiAzza
May 13th, 2018, 09:51
Hey, how do I download the extension?

Gkjsdll
May 13th, 2018, 09:52
The link's at the bottom of the first post, but here it is again (https://www.fantasygrounds.com/forums/attachment.php?attachmentid=23421&d=1525902550) (v3.1.0)

LordEntrails
May 13th, 2018, 16:16
Hey, how do I download the extension?
If you can not see the link on the first post (or elsewhere), it is usually caused because you are viewing the 'mobile' version of the website and not the full site. You also can try changing the forum theme, select FGResponsive from the pulldown in the bottom left corner of the page.

Gkjsdll
May 15th, 2018, 00:00
There wasn't an overwhelming majority either way for preferred methods of closing all windows with this extension, so you can now either load an empty preset you create yourself or use the new command /wsx close.

Updates with new features will be on hold until I've got enough of the GUI put toghether to make a beta version available for testing. I will then continue releasing beta builds until I'm confident in the functionality of the GUI, at which point further builds will no longer be beta. I'll probably end up posting some status updates before I add the first beta build, and I'll be extra receptive to design feedback during this time.

If anyone encounters any bugs, please let me know on this thread and I'll take a break from the GUI work to fix them.

MTS
May 17th, 2018, 17:17
Is there any way to make this extension silent for the clients? As soon as I added it, errors show up in the client every time I open/close a window in the GM's screen:

[ERROR] Unknown special message type received. (wsx_window_close)

Gkjsdll
May 17th, 2018, 17:40
Is there any way to make this extension silent for the clients? As soon as I added it, errors show up in the client every time I open/close a window in the GM's screen:

[ERROR] Unknown special message type received. (wsx_window_close)

Can't believe I missed that before releasing :/ Try v3.2.1

Valyar
May 25th, 2018, 11:37
Can the position of windows be saved without typing a name for the save state?

Gkjsdll
May 25th, 2018, 17:14
Can the position of windows be saved without typing a name for the save state?

Fantasy Grounds will already attempt to open windows in their last location & size.
If you want to re-open all windows after closing the program, you can use /wsx restore after opening the program again.

seycyrus
May 26th, 2018, 18:36
Thanks for the extension! I tested it with a player this morning, and he said it was something he was definitely going to use!

However, he was getting errors along the lines of, [ERROR] Unknown special message type received. (wsx_list).

He WAS able to save and load in stored window configurations, just not list them.

I have v 3.2.1.

When I test this with local host, local also sees an error message when I type /wsx list on the GM side (without any errors).

Gkjsdll
May 26th, 2018, 21:12
Thanks for letting me know seycyrus

v3.3.0 should fix that stuff

seycyrus
May 26th, 2018, 23:12
Thanks for letting me know seycyrus

v3.3.0 should fix that stuff

Great! Thanks for your effort! In one of your earlier posts you asked,


Is there some obvious functionality that I'm missing here, or does this seem like a complete feature set?


I'm wondering if it would be possible to for the GM to force share a bunch of windows at once to the players?

Gkjsdll
May 26th, 2018, 23:44
I'm wondering if it would be possible to for the GM to force share a bunch of windows at once to the players?

That's a great idea! It'll behave like how wsx open does, where it doesn't close other windows. I'll have a new version up lickety-split.

Gkjsdll
May 27th, 2018, 01:49
v3.4.0 adds preset sharing (/wsx share [name])

I spent a little less time testing this for bugs than I normally do, let me know if it ever doesn't behave properly.

seycyrus
May 27th, 2018, 02:28
Working Great! The error messages I mentioned earlier are now taken care of, thanks!

Valyar
May 30th, 2018, 18:05
Great stuff. Thanks for the update :)

This should be added to the list of CoreRPG extension.

Trenloe
May 30th, 2018, 18:39
This should be added to the list of CoreRPG extension.
'tis done.

DoubleHandsDan
June 13th, 2018, 10:30
I like this a lot. I'm trying to find a way to drag my presets onto the hot bar at the bottom of the page, is there a way to do that? My bad if its something obvious, I'm new to the program.

damned
June 13th, 2018, 10:40
Welcome DoubleHandsDan only certain data types (most of them) can be dragged to the Hot Keys.

Valyar
June 13th, 2018, 10:40
I like this a lot. I'm trying to find a way to drag my presets onto the hot bar at the bottom of the page, is there a way to do that? My bad if its something obvious, I'm new to the program.

If you want to have specific command in the shotcut bar, you can drag and drop the string from the chat box directly.

For example type "/wsx save my", drag it on 1-12 and then you can launch it with the key.

DoubleHandsDan
June 21st, 2018, 10:17
great, super simple. thanks for your help @valyar

bozo666999
July 13th, 2018, 13:52
Wow nice! Why is this not included?

Caels
January 17th, 2019, 09:07
I seem to have trouble with the layout about every other time I restart the program.

First issue I'm having is that it never manages to save the size/position of the chat window, and also does not return the Dice Tower icon to the location it last used.

The problem I seem to have every other restart or so is that some (but never all) of the windows lose parts of their position info. For instance, the character window will keep right top position, but it's left position will reset to something near to zero.

I should also point out that I'm brand new to FG, so perhaps there are some settings I've overlooked or something I'm doing wrong.

Zacchaeus
January 17th, 2019, 11:29
Hi Caels welcome to FG.

It is entirely possible that this extension no longer works with v3.3.7 (the latest) version of FG and that could be causing your issue. If what you are seeing doesn't happen in a new campaign without any extensions then that is likely the cause.

damned
January 17th, 2019, 12:37
Running on a Mac?
If you exit FG in a wineskin via the X then some data will not be saved.
This includes window position changes for that session and any data changes that happened within the last 0-5mins.
Use the right click radial menu to exit.

LordEntrails
January 17th, 2019, 16:39
I don't know about the Chat window, but I know core FG remembers the location of the Dice Tower without needing this extension (since I have mine moved and do not use this extension). I suggest trying it again without the extension and making sure you exit as damned suggests.

Zacchaeus
January 17th, 2019, 17:43
Since v3.3.7 elements such as dice tower and chat box revert to their default positions between sessions. This I believe is to accommodate the new background map options since such elements could get hidden under the map if they are not in their default locations. Hence my reasoning that this extension does not comply with 3.3.7 and indeed may now actually be redundant.

LordEntrails
January 17th, 2019, 18:17
Since v3.3.7 elements such as dice tower and chat box revert to their default positions between sessions. This I believe is to accommodate the new background map options since such elements could get hidden under the map if they are not in their default locations. Hence my reasoning that this extension does not comply with 3.3.7 and indeed may now actually be redundant.
Why does my dice tower stay in it's position over by the dice and chat box? I'm on 3.3.7.
25998
EDIT: image added, tower poorly placed because window hasn't been maximized yet)

Zacchaeus
January 17th, 2019, 18:31
I dunno. Mine certainly reverts to it's proper position when I tested.

Caels
January 17th, 2019, 20:25
Without the extension, it appears most of the windows do remember their positions, though some are still a bit off. But yes, the dice tower and chat always start in the default positions. So, perhaps the extension is no longer necessary.

Thank you all for the responses.

Trenloe
January 17th, 2019, 21:43
...though some are still a bit off.
The position will be based off the size of the whole FG desktop window when they windows were last closed (either by the user or when the application exits). If your FG desktop is not *exactly* the same size as the size the window was last closed, then you won't see the exact same window positioning.

Note: there are some key windows you can't save the size and position of - the character selection window, for example. The reasoning behind this is that it will always be available in the middle of the screen, no matter what the current size of your desktop.

cas206
January 24th, 2019, 19:16
I'm sold on the new map background. Can this extension be upgraded (or a new extension made) to remember the open map and load it in background?

Jiminimonka
January 24th, 2019, 23:28
Using this now - great idea! If I find any bugs I will report back - running under Linux (via Steam Proton).

scarymike23
February 9th, 2019, 15:44
Is it possible to put a command like /wsx load NameHere into a macro button?

mattekure
February 9th, 2019, 15:57
Yes, type it in the chat window, but dont hit enter. then drag it onto the shortcut bar into one of the open slots. then when you click it it will execute the chat command

waara
February 23rd, 2019, 09:01
Just started using this and it is great! Thanks!

Ckorik
March 1st, 2019, 17:42
is there a reason that I can't get my chat window to save where I put it?

LordEntrails
March 1st, 2019, 17:49
is there a reason that I can't get my chat window to save where I put it?
See discussion starting on post #29
https://www.fantasygrounds.com/forums/showthread.php?43706-Window-Saver-X-Extension&p=422682&viewfull=1#post422682

Ckorik
March 1st, 2019, 18:46
See discussion starting on post #29
https://www.fantasygrounds.com/forums/showthread.php?43706-Window-Saver-X-Extension&p=422682&viewfull=1#post422682

I still don't understand - something about maps?

LordEntrails
March 1st, 2019, 18:51
I still don't understand - something about maps?
The latest version of FG has new map/image functionality that might have broken this extension. Plus core FG now has a similar function.

In short, this extension might be obsolete since FG does most of what this extension once did, AND this extension may be broken with the latest FG version.

Have you tried a new campaign without this extension and see if FG does what you want?
Have you tried in a new campaign with only this extension loaded and does it work? If not, it's broken and would need someone to fix it.

Ckorik
March 1st, 2019, 19:03
The latest version of FG has new map/image functionality that might have broken this extension. Plus core FG now has a similar function.

In short, this extension might be obsolete since FG does most of what this extension once did, AND this extension may be broken with the latest FG version.
Ahh - got it


Have you tried a new campaign without this extension and see if FG does what you want?
Yes - windows seem to be sticky now and will reopen where they were - however the chat window still resizes to the default position and is a PITA to move around.


Have you tried in a new campaign with only this extension loaded and does it work? If not, it's broken and would need someone to fix it.
I guess that's where I am unsure - the chat window doesn't work with this - but I just started using it today - if it used to save the chat window position - then no it's not working.

*edit* to be clear I tried both - with and without this loaded - the only functionality that this seems to bring to the table now is 'open specific windows as a set' -

Torment
March 2nd, 2019, 09:29
Thanks a lot!

arcanjl
March 31st, 2019, 14:38
The latest version of FG has new map/image functionality that might have broken this extension. Plus core FG now has a similar function.

In short, this extension might be obsolete since FG does most of what this extension once did, AND this extension may be broken with the latest FG version.


I have not seen this, where is it? I just use yours, never seen it in FG Core

Zacchaeus
March 31st, 2019, 16:11
I have not seen this, where is it? I just use yours, never seen it in FG Core

I think you are misunderstanding what LE was saying. By Core FG he means that the FG client now saves window positions which it didn't do at one time.

mattekure
March 31st, 2019, 17:12
I would still argue that this extension is still very useful. Not for the window remembering capability which as has been stated, is now built into FG. But the ability to create presets of open windows and save it. Then being able to quickly load those presets. I love that capability as I can get my windows all set up exactly the way I want them. and have them all loaded and open with one command.

Jonathan_Stark
July 3rd, 2019, 14:44
Hi, as someone who has just started using FG to play D&D5e, once this exyension is downloaded how do I "run" it or does it need to be installed in a FG file directory to work?

Trenloe
July 3rd, 2019, 14:49
Hi, as someone who has just started using FG to play D&D5e, once this exyension is downloaded how do I "run" it or does it need to be installed in a FG file directory to work?
Welcome to the FG forums.

Information on installing an extension is available here: https://www.fantasygrounds.com/wiki/index.php/Data_Files_Overview#Extensions

Jonathan_Stark
July 3rd, 2019, 16:30
Nice one Trenloe, thanks for your help.
;)

MacDork
August 8th, 2019, 01:02
Is this crashing for anyone else? I just tried it for the first time

LordEntrails
August 8th, 2019, 01:09
Is this crashing for anyone else? I just tried it for the first time
What errors or indications are you getting? What other extensions are you running? What ruleset? Does it repeat in a new campaign?

MacDork
August 8th, 2019, 12:22
I'll do some more testing this evening (eastern time zone) -- I was starting up a session, so I didn't have much time to troubleshoot. Once I disabled it, I stopped having issues. For reference, I'm using 5E, and using the following extensions:

* 5E Advanced Effects
* Rob2E's Next Level XP Automation extension (created two weeks ago on his live stream)
* A custom button extension I created
* Quick Reference Desktop Decals
* Message of the Day
* CoreRPG Author
* CoreRPG ReadyCheck
* One Column Sidebar

I haven't tried it on a new campaign.

MacDork
August 8th, 2019, 12:27
Ok, I couldn't resist. I created a new 5E campaign w/ no extensions and loaded up the module I was using, and the errors have stopped. I'm testing it now, though I'm new to Window Saver X, so I'm still learning how to use it.

MacDork
December 9th, 2019, 20:54
Is this being updated for FGU? It doesn't seem to work

MacDork
February 10th, 2020, 14:43
Recent Version History

v3.4.0

add /wsx share (thanks to seycyrus for the suggestion)


v3.3.0

Add /wsx open
Fix errors in client console


v3.2.1


Fix errors in client chat box



Full Version History (https://www.fantasygrounds.com/forums/entry.php?328-Window-Saver-X-Full-Version-History)

Thanks to lokiare1 for the original extension, and for fielding a bunch of questions from me as I was getting started.

Any updates planned for FGU?

Zacchaeus
February 10th, 2020, 15:09
The author of this extension hasn't posted on the forums for over 18 months; so not sure if they are even still around.

MacDork
February 10th, 2020, 15:32
Oof. This is such a useful extension, too.

jaharmi
April 17th, 2020, 15:55
This does sound useful and I'm only running on FGU (since I'm using macOS 10.15).

Ludd_G
December 6th, 2020, 10:42
Hi, Just to let you know I'm happily running this extension (alongside loads of others - 40 to 50! Soooooooooo many extensions! :o) with no problems in Unity. I do only use the '/wsx restore' function for when I first open my campaign, so maybe the other options are more problematic?

Cheers, Simon

md0072
January 23rd, 2021, 02:10
Confirmed this is working nicely with FGU v4.0.6.

One change I've made, in Core.lua, change function openWindow to:
function openWindow(windowData)
windowData.path = windowData.path or "";
local window = Interface.openWindow(windowData.class, windowData.path);
window.setSize(windowData.width, windowData.height);
local sizeX, sizeY = Interface.findWindow("imagefullpanel","").getSize( );
local minx=math.min(sizeX-windowData.width,windowData.xPos);
local miny=math.min(sizeY-windowData.height,windowData.yPos);
window.setPosition(minx,miny);
end


This fixes a small problem where the GM has a wider screen layout (I use three screens!) than the clients, forcing the windows off the client visible screen.

cheers
md

Sabrosa
February 16th, 2021, 20:57
About 2 weeks ago I noticed that the command to restore my preset wasn't loading any of the windows. My group hasn't play since before then so I didn't think much of it, as I thought maybe I had typed the wrong preset name or saved an empty one. Today I tested this and /wsx save PresetName saved 7 windows. /wsx restore PresetName restored 0 windows right after saving. I'm assuming the update from about 2 weeks may have broken this?

Rino
February 20th, 2021, 16:57
I've tested the extension with FGU and it works. I've made an working EXT file with md0072's openWindow change above here:

Sabrosa
February 20th, 2021, 17:48
Sorry, I didn't mention I was using it in FGC. I just downloaded the file above and it's working in FGC now. Thanks!

Vigilance
March 13th, 2021, 18:14
getting the following errors.
44803

Arrix
June 10th, 2021, 15:44
getting the following errors.
44803

Dunno if this is still relevant, but I encountered the same error.

This is an error that comes up with the dropdown menu extension (https://www.fantasygrounds.com/forums/showthread.php?58226-Better-Menus-(CoreRPG-5E-etc)&highlight=Better+Menu). This error happens every the /wsx load commands are used if the user has set the option to use the regular sidebar.
Without the sidebar and instead using the dropdown menus it only sometimes happens, mostly when using the commands while the dropdown menus are on screen (which they are automatically after every load of a preset).

Raddu
September 27th, 2021, 02:01
When using Better Menus I'm getting the following error and the menus don't drop down.
49292

jharp
September 27th, 2021, 03:28
I have a forge version going up that corrects at least Raddu's issues. I have another forum thread for support at: https://www.fantasygrounds.com/forums/showthread.php?70711

jharp
September 27th, 2021, 13:44
I've tested the extension with FGU and it works. I've made an working EXT file with md0072's openWindow change above here:

I'll integrate this fix in 1.0.1 of X2

Jason

Noneya
November 28th, 2021, 18:00
I put this .ext in my extensions folder, but doesn't seem to be working for me... commands don't work, menus all disappear just like before, causing a complete resetup every time. What am i doing wrong?

Zacchaeus
November 28th, 2021, 18:10
Did you also select it when you started your campaign? Putting it in the extensions folder is only part of the required steps.

Noneya
November 28th, 2021, 18:11
Looking for it, but so far no...

update. duh, i see it now. thank you.

Noneya
November 28th, 2021, 18:18
absolutely awesome. This is already the best thing to happen to this game since we started. THANK YOU.

jharp
November 28th, 2021, 18:22
@Noneya - I would use the forge version as this one no longer gets updates. https://www.fantasygrounds.com/forums/showthread.php?70711

Jason