Save window locations?
Moderator: Oberlus
Forum rules
Always mention the exact version of FreeOrion you are testing.
When reporting an issue regarding the AI, if possible provide the relevant AI log file and a save game file that demonstrates the issue.
Always mention the exact version of FreeOrion you are testing.
When reporting an issue regarding the AI, if possible provide the relevant AI log file and a save game file that demonstrates the issue.
Save window locations?
I have a certain way I like to setup/place the various windows in the game, i.e. the Message window, the SitRep window, and the Fleet window. After I place and resize these three windows at the start of a game in the latest version, they remember their place or each subsequent game I play using that version.
My issue is that each time I update FreeOrion to the latest release which can be as often as weekly, these windows return to their default location.
Is there an easy way to save the window location and reinstate it with each new release? Is there a single file somewhere that contains the info required that I could backup and simply copy back after I've done an upgrade?
This is no game breaking issue, but does get a bit annoying.
Appreciate any help.
My issue is that each time I update FreeOrion to the latest release which can be as often as weekly, these windows return to their default location.
Is there an easy way to save the window location and reinstate it with each new release? Is there a single file somewhere that contains the info required that I could backup and simply copy back after I've done an upgrade?
This is no game breaking issue, but does get a bit annoying.
Appreciate any help.
-
- Programmer
- Posts: 389
- Joined: Sun Feb 14, 2016 12:08 am
Re: Save window locations?
You can create a persistent config file, copying over your window settings.
Re: Save window locations?
That sounds like what I want. Where would I find the windows setting to copy over from?
Appreciate the help. Thanks
- Gene
Appreciate the help. Thanks
- Gene
-
- Programmer
- Posts: 389
- Joined: Sun Feb 14, 2016 12:08 am
Re: Save window locations?
e.g. Research control window:
Code: Select all
<?xml version="1.0"?>
<XMLDoc>
<UI>
<windows>
<research>
<tech-controls>
<height>1</height>
<height-windowed>736</height-windowed>
<left>-2147483648</left>
<left-windowed>1324</left-windowed>
<minimized>0</minimized>
<pinned>0</pinned>
<top>-2147483648</top>
<top-windowed>31</top-windowed>
<visible>0</visible>
<width>1</width>
<width-windowed>62</width-windowed>
</tech-controls>
</research>
</windows>
</UI>
</XMLDoc>
Any content posted should be considered licensed GNU GPL 2.0 and/or CC-BY-SA 3.0 as appropriate.
Re: Save window locations?
If you mean the file which contains the windows settings, it's in the config.xml file, located in C:\Users\User_Name\AppData\Roaming\FreeOrion (Windows 7)ghealy wrote:That sounds like what I want. Where would I find the windows setting to copy over from?
- Gene
Then open the file with Notepad++ or Notepad 2, search for <UI>, and select/copy everything that is between <UI> and </UI> tags.
Paste the whole selection in the persistent config file, like in dbenage-cx's example above.
Note: it will copy all your UI preferences (windows settings, but also font sizes, colors, etc.). If you want to only select your windows settings, copy everything that is between <windows> and </windows>.
I release every updated file under the CC-BY-SA 3.0 license.
Re: Save window locations?
Well, he'll need all the enclosing tags too, so it's probably easier to copy the entire <UI>...</UI> section and then delete everything besides the <windows>...</windows> subsection. Getting that right will require some basic understanding of XML...Ouaz wrote:If you want to only select your windows settings, copy everything that is between <windows> and </windows>.
Re: Save window locations?
First: Thanks to dbenage-cx, Ouaz and Vezzra for their help.
For an old Noob, they actually made sense
I do like Vezzra's suggestion of copying the entire <UI> ...</UI> section as I often change font sizes and the research window's menu bar location. So this should help not having to change them each time their is an update.
I am curious. How likely will there be changes to the UI that might make an install crash if I have this persistent config file? Guessing if it ever does become an issue, I could trouble shoot by renaming it to something else and try re-installing just to rule it out as the cause.
Again, Thank you guys, for your help.
I'm off to lose a couple more hours of my life as I get engrossed in this game.
- Gene
For an old Noob, they actually made sense
I do like Vezzra's suggestion of copying the entire <UI> ...</UI> section as I often change font sizes and the research window's menu bar location. So this should help not having to change them each time their is an update.
I am curious. How likely will there be changes to the UI that might make an install crash if I have this persistent config file? Guessing if it ever does become an issue, I could trouble shoot by renaming it to something else and try re-installing just to rule it out as the cause.
Again, Thank you guys, for your help.
I'm off to lose a couple more hours of my life as I get engrossed in this game.
- Gene
-
- Programmer
- Posts: 389
- Joined: Sun Feb 14, 2016 12:08 am
Re: Save window locations?
If you stick with only the window entries, you will probably be ok (never keep version-string).ghealy wrote:I am curious. How likely will there be changes to the UI that might make an install crash if I have this persistent config file? Guessing if it ever does become an issue, I could trouble shoot by renaming it to something else and try re-installing just to rule it out as the cause.
For troubleshooting: renaming/deleting the persistent_config and config files should be plenty. On launch the game will create a new config.xml file if needed (no need to re-install).
Re: Save window locations?
Thanks, dbenage-cx. Will give it a try later today.
- Gene
- Gene
- Bromstarzan
- Dyson Forest
- Posts: 206
- Joined: Sun Feb 28, 2016 9:56 pm
- Location: Sweden
Re: Save window locations?
I have tried the persistent_config.xml method without success.
Game reverts back to original small window and throws all the sub-windows around, even though I deleted the config and have a persistent config file with my preferred values.
Not sure what I'm doing wrong. Will investigate and try some more. And yes, I'm quite used to writing xml.
[EDIT]: It is the Borderless gaming application (SRWE) that destroys the persistent_config.xml? If I leave the SRWE out of the equation, the persistent_config.xml works. I guess I'll have to skip the fullscreen play and go back to windowed, which is a pitty. I really like the fullscreen across multiple monitors. I'll experiment a little bit more and see if I come up with a solution.
Game reverts back to original small window and throws all the sub-windows around, even though I deleted the config and have a persistent config file with my preferred values.
Not sure what I'm doing wrong. Will investigate and try some more. And yes, I'm quite used to writing xml.
[EDIT]: It is the Borderless gaming application (SRWE) that destroys the persistent_config.xml? If I leave the SRWE out of the equation, the persistent_config.xml works. I guess I'll have to skip the fullscreen play and go back to windowed, which is a pitty. I really like the fullscreen across multiple monitors. I'll experiment a little bit more and see if I come up with a solution.
| i7 7700K [email protected] | GTX 1080 Ti | RAM: 32GB | PSU: 750w | W10 x64 | 2xAcer1920x1080 |
-
- Programmer
- Posts: 389
- Joined: Sun Feb 14, 2016 12:08 am
Re: Save window locations?
Back to their default positions (e.g. with no config or persistent config files), or in different places?and throws all the sub-windows around
Is this the SRWE you mention?
I suspect the game believes your settings are invalid, since they wont fit in the designated monitor.
I haven't looked at SRWE much, if it defines a fake monitor ID you might be able to set that as the fullscreen monitor.
If it is not set, try the "fake resolution change" option as well.
Barring either of those, you probably need a toggle to skip the relevant config validation checks and maybe other constraints.
- Bromstarzan
- Dyson Forest
- Posts: 206
- Joined: Sun Feb 28, 2016 9:56 pm
- Location: Sweden
Re: Save window locations?
Back to default, yes, sorry for being non-specific.dbenage-cx wrote:Back to their default positions (e.g. with no config or persistent config files), or in different places?and throws all the sub-windows around
Yes, that's the one.Is this the SRWE you mention?
Yep, that is most likely the case.I suspect the game believes your settings are invalid, since they wont fit in the designated monitor.
Some good ideas here, thanks. I'll try.I haven't looked at SRWE much, if it defines a fake monitor ID you might be able to set that as the fullscreen monitor. If it is not set, try the "fake resolution change" option as well.
Barring either of those, you probably need a toggle to skip the relevant config validation checks and maybe other constraints.
[EDIT]: And now my config got messed up again? I can not understand why it is not persistent, even in windowed mode? Should I delete the config.xml once I have a persistent_config.xml (in same location). As I understand it, both should be there as persistent_config.xml only overrides the config whith the lines stated in the persistent file.
I'll probably go back to borderless gaming (SRWE) and just take the time to adjust all the windows everytime I do a session. After all, it only takes 3-4 minutes.
| i7 7700K [email protected] | GTX 1080 Ti | RAM: 32GB | PSU: 750w | W10 x64 | 2xAcer1920x1080 |
- Bromstarzan
- Dyson Forest
- Posts: 206
- Joined: Sun Feb 28, 2016 9:56 pm
- Location: Sweden
Re: Save window locations?
Just to let you know; I've got it all working now:
Really exiting to follow all the ideas and updates!
cheers,
Broms
- - Persistent windows, and
- SRWE (borderless gaming)
Really exiting to follow all the ideas and updates!
cheers,
Broms
| i7 7700K [email protected] | GTX 1080 Ti | RAM: 32GB | PSU: 750w | W10 x64 | 2xAcer1920x1080 |
-
- Programmer
- Posts: 389
- Joined: Sun Feb 14, 2016 12:08 am
Re: Save window locations?
Great to hear Bromstarzan. If you find the time (and remember them), some future reader might be interested in the setup details.
Yes, but if the config.xml is not there or for a different build it will be (re)created.As I understand it, both should be there as persistent_config.xml only overrides the config whith the lines stated in the persistent file.
- Bromstarzan
- Dyson Forest
- Posts: 206
- Joined: Sun Feb 28, 2016 9:56 pm
- Location: Sweden
Re: Save window locations?
Of course!dbenage-cx wrote:Great to hear Bromstarzan. If you find the time (and remember them), some future reader might be interested in the setup details.
Remember that the below details are specific for my personal hardware config and layout taste.
My 2 displays are 1680x1050 + 1280x1024, so it is not optimal but it turns out to work well.
1. I use Windowed mode in FO and drag FO main window across both displays to cover the entire desktop.
2. Start SRWE and choose application and window size + hit the "Remove borders" button.
3. Arrange all windows in FO!
4. Alt-Tab out and copy config.xml to persistent_config.xml (I think I played a couple of turns before this although I don't think that is necessary)
(C:\Users\xxxx\AppData\Roaming\FreeOrion)
5. Done!
So, everytime I start FO, I only start SRWE and load recent profile and hit "Remove borders". Done!
| i7 7700K [email protected] | GTX 1080 Ti | RAM: 32GB | PSU: 750w | W10 x64 | 2xAcer1920x1080 |