FreeOrion

Forums for the FreeOrion project
It is currently Wed Dec 13, 2017 3:07 pm

All times are UTC


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.



Post new topic Reply to topic  [ 15 posts ] 
Author Message
 Post subject: Save window locations?
PostPosted: Wed Jul 20, 2016 12:57 am 
Offline
Space Kraken

Joined: Sat Jun 06, 2015 2:06 pm
Posts: 127
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.


Top
 Profile  
 
PostPosted: Wed Jul 20, 2016 2:30 am 
Offline
Programmer

Joined: Sun Feb 14, 2016 12:08 am
Posts: 359
You can create a persistent config file, copying over your window settings.


Top
 Profile  
 
PostPosted: Wed Jul 20, 2016 3:10 am 
Offline
Space Kraken

Joined: Sat Jun 06, 2015 2:06 pm
Posts: 127
That sounds like what I want. Where would I find the windows setting to copy over from?

Appreciate the help. Thanks

- Gene


Top
 Profile  
 
PostPosted: Wed Jul 20, 2016 12:43 pm 
Offline
Programmer

Joined: Sun Feb 14, 2016 12:08 am
Posts: 359
e.g. Research control window:
Code:
<?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.


Top
 Profile  
 
PostPosted: Thu Jul 21, 2016 4:35 pm 
Offline
Dyson Forest
User avatar

Joined: Wed Aug 13, 2014 7:21 pm
Posts: 213
Location: France
ghealy wrote:
That sounds like what I want. Where would I find the windows setting to copy over from?

- Gene


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)

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.


Top
 Profile  
 
PostPosted: Thu Jul 21, 2016 4:49 pm 
Offline
Release Manager, Design
User avatar

Joined: Wed Nov 16, 2011 12:56 pm
Posts: 4288
Location: Sol III
Ouaz wrote:
If you want to only select your windows settings, copy everything that is between <windows> and </windows>.
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... ;)


Top
 Profile  
 
PostPosted: Thu Jul 21, 2016 5:12 pm 
Offline
Space Kraken

Joined: Sat Jun 06, 2015 2:06 pm
Posts: 127
First: Thanks to dbenage-cx, Ouaz and Vezzra for their help.

For an old Noob, they actually made sense :D

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. :D :D :D

- Gene


Top
 Profile  
 
PostPosted: Thu Jul 21, 2016 5:43 pm 
Offline
Programmer

Joined: Sun Feb 14, 2016 12:08 am
Posts: 359
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.


If you stick with only the window entries, you will probably be ok (never keep version-string).

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).


Top
 Profile  
 
PostPosted: Thu Jul 21, 2016 5:51 pm 
Offline
Space Kraken

Joined: Sat Jun 06, 2015 2:06 pm
Posts: 127
Thanks, dbenage-cx. Will give it a try later today.

- Gene


Top
 Profile  
 
PostPosted: Thu Oct 27, 2016 4:01 pm 
Offline
Dyson Forest
User avatar

Joined: Sun Feb 28, 2016 9:56 pm
Posts: 202
Location: Sweden
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.

_________________
| i7 2600K quad@3.40Ghz | GTX 560 Ti | RAM: 16GB | PSU: 750w | W7 x64 | LG1680x1050+Acer 1280x1024 |


Top
 Profile  
 
PostPosted: Thu Oct 27, 2016 10:05 pm 
Offline
Programmer

Joined: Sun Feb 14, 2016 12:08 am
Posts: 359
Quote:
and throws all the sub-windows around

Back to their default positions (e.g. with no config or persistent config files), or in different places?

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.


Top
 Profile  
 
PostPosted: Fri Oct 28, 2016 7:45 pm 
Offline
Dyson Forest
User avatar

Joined: Sun Feb 28, 2016 9:56 pm
Posts: 202
Location: Sweden
dbenage-cx wrote:
Quote:
and throws all the sub-windows around

Back to their default positions (e.g. with no config or persistent config files), or in different places?

Back to default, yes, sorry for being non-specific.
Quote:
Is this the SRWE you mention?

Yes, that's the one.
Quote:
I suspect the game believes your settings are invalid, since they wont fit in the designated monitor.

Yep, that is most likely the case.
Quote:
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.

Some good ideas here, thanks. I'll try.

[EDIT]: And now my config got messed up again? I can not understand why it is not persistent, even in windowed mode? :lol: 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 2600K quad@3.40Ghz | GTX 560 Ti | RAM: 16GB | PSU: 750w | W7 x64 | LG1680x1050+Acer 1280x1024 |


Top
 Profile  
 
PostPosted: Sun Apr 09, 2017 8:21 am 
Offline
Dyson Forest
User avatar

Joined: Sun Feb 28, 2016 9:56 pm
Posts: 202
Location: Sweden
Just to let you know; I've got it all working now:
    - Persistent windows, and
    - SRWE (borderless gaming)
Free Orion shines in all its glory. Thanks for an awesome game and community!
Really exiting to follow all the ideas and updates!

cheers,
Broms

_________________
| i7 2600K quad@3.40Ghz | GTX 560 Ti | RAM: 16GB | PSU: 750w | W7 x64 | LG1680x1050+Acer 1280x1024 |


Top
 Profile  
 
PostPosted: Sun Apr 09, 2017 7:25 pm 
Offline
Programmer

Joined: Sun Feb 14, 2016 12:08 am
Posts: 359
Great to hear Bromstarzan. If you find the time (and remember them), some future reader might be interested in the setup details.

Quote:
As I understand it, both should be there as persistent_config.xml only overrides the config whith the lines stated in the persistent file.

Yes, but if the config.xml is not there or for a different build it will be (re)created.


Top
 Profile  
 
PostPosted: Fri Apr 14, 2017 9:33 am 
Offline
Dyson Forest
User avatar

Joined: Sun Feb 28, 2016 9:56 pm
Posts: 202
Location: Sweden
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.

Of course!
Remember that the below details are specific for my personal hardware config and layout taste. :D

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.
Image
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)
Image
(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!
Image

_________________
| i7 2600K quad@3.40Ghz | GTX 560 Ti | RAM: 16GB | PSU: 750w | W7 x64 | LG1680x1050+Acer 1280x1024 |


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 15 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group