Save window geometry upon exit / Remember window positions / Store window size/location between games

Post your ideas and suggestions how to improve the game.

Moderator: ickputzdirwech

Koub
Global Moderator
Global Moderator
Posts: 7784
Joined: Fri May 30, 2014 8:54 am
Contact:

Re: Remember position of inventory menu

Post by Koub »

[Koub] Merged into similar older topic.
Koub - Please consider English is not my native language.
gogeta110
Manual Inserter
Manual Inserter
Posts: 1
Joined: Sat Jan 25, 2020 3:52 pm
Contact:

Save location of inventory window

Post by gogeta110 »

Every time I open the inventory window, it opens in the center of my view. I can move it out of the way, but next time I open it, it comes back to the center.
Can we have a feature to save the location of that window, so it can be opened without obstructing the view of the character?
Koub
Global Moderator
Global Moderator
Posts: 7784
Joined: Fri May 30, 2014 8:54 am
Contact:

Re: Remember position of inventory menu

Post by Koub »

[Koub] Merged into similar older topic.
Koub - Please consider English is not my native language.
varundevan
Fast Inserter
Fast Inserter
Posts: 182
Joined: Mon Jan 20, 2020 4:41 am
Contact:

option to Dock the inventory dialogue box

Post by varundevan »

Hi,

Let there be an option to dock the inventory / crafting dialogue box, it always appear in the center and hides exactly where you want to see, where you want to place an item. You can drag it, but it again pops up in the center
(Super annoying).
Requesting to provide an option to dock it in the left.
Last edited by varundevan on Mon Jan 27, 2020 10:29 am, edited 1 time in total.
Koub
Global Moderator
Global Moderator
Posts: 7784
Joined: Fri May 30, 2014 8:54 am
Contact:

Re: option to Dock the dialogue box

Post by Koub »

When you say "Dialog box", do you refer to inventory/crafting window (the one opened with [E] by default) ?
Koub - Please consider English is not my native language.
varundevan
Fast Inserter
Fast Inserter
Posts: 182
Joined: Mon Jan 20, 2020 4:41 am
Contact:

Re: option to Dock the dialogue box

Post by varundevan »

Koub wrote: Mon Jan 27, 2020 10:01 am When you say "Dialog box", do you refer to inventory/crafting window (the one opened with [E] by default) ?
Yes, that is what i meant
sorry if i was not clear
Grantherum
Manual Inserter
Manual Inserter
Posts: 1
Joined: Sat Feb 20, 2021 5:55 am
Contact:

Re: Could Factorio window geometry be saved upon exit ?

Post by Grantherum »

I understand this is rezzing a dead post, but Why cant we just get windowed mode to open the size it was closed at? Just makes sense that it would be possible for this to happen.
User avatar
jodokus31
Smart Inserter
Smart Inserter
Posts: 1622
Joined: Sun Feb 26, 2017 4:13 pm
Contact:

Re: Could Factorio window geometry be saved upon exit ?

Post by jodokus31 »

I open factorio like that.
path/to/factorio --window-size "1800x1400"
jchardin64
Inserter
Inserter
Posts: 38
Joined: Mon Apr 30, 2018 6:00 pm
Contact:

In windowed mode, remember the window's previous position/size

Post by jchardin64 »

I know the technology exists, I've seen it in most other games I play. Sometimes I like to play in a window on one side of my large monitor while another window is open on the other side. But every time I launch the game the window is automatically maximized and I have to adjust it to fit.

This would also be especially useful for people developing mods, as there's often a lot of re-launching when testing a mod and I usually want one of my .lua files open on the side for making code adjustments.
User avatar
jodokus31
Smart Inserter
Smart Inserter
Posts: 1622
Joined: Sun Feb 26, 2017 4:13 pm
Contact:

Re: In windowed mode, remember the window's previous position/size

Post by jodokus31 »

+1

However you can call this to get the desired size:

Code: Select all

bin/x64/factorio --window-size "1800x1400"
A lot of people have a second monitor. I have my old 22" from 15 years ago :D
User avatar
eradicator
Smart Inserter
Smart Inserter
Posts: 5207
Joined: Tue Jul 12, 2016 9:03 am
Contact:

Re: In windowed mode, remember the window's previous position/size

Post by eradicator »

jchardin64 wrote: Wed Jun 23, 2021 4:40 am This would also be especially useful for people developing mods,
As a person who writes mods I use autohotkey to automatically resize the window and remove space-wasting window decorations.

Code: Select all

Loop, 50 {
	WinWait, ahk_exe factorio.exe
	WinGetPos, x, y, w, h, ahk_exe factorio.exe

	WIDTH = 1846
	HEIGHT = 772

	if (x = 0 and y = 0 and w = WIDTH and h = HEIGHT) {
		break
	} else {
		WinRestore, ahk_exe factorio.exe
		WinSet, Style, -0xC00000, ahk_exe factorio.exe ; Remove the title bar (WS_CAPTION).
		WinMove, ahk_exe factorio.exe,, 0,0,%WIDTH%,%HEIGHT%
		WinActivate, ahk_exe factorio.exe
		Sleep, 100	
	}
}
Author of: Belt Planner, Hand Crank Generator, Screenshot Maker, /sudo and more.
Mod support languages: 日本語, Deutsch, English
My code in the post above is dedicated to the public domain under CC0.
Amarula
Filter Inserter
Filter Inserter
Posts: 546
Joined: Fri Apr 27, 2018 1:29 pm
Contact:

Re: In windowed mode, remember the window's previous position/size

Post by Amarula »

Yes lots of us would like to see this: viewtopic.php?f=6&t=6882&hilit=window
My own personal Factorio super-power - running out of power.
Koub
Global Moderator
Global Moderator
Posts: 7784
Joined: Fri May 30, 2014 8:54 am
Contact:

Re: Could Factorio window geometry be saved upon exit ?

Post by Koub »

[Koub] Merged into older thread with same suggestion (god that brings back memories XD)
Koub - Please consider English is not my native language.
User avatar
ssilk
Global Moderator
Global Moderator
Posts: 12889
Joined: Tue Apr 16, 2013 10:35 pm
Contact:

Re: Could Factorio window geometry be saved upon exit ?

Post by ssilk »

Merged some other topics with existing thread about quite similar topic

See also
viewtopic.php?f=6&t=6996 Completly customizable GUI (with examples)
viewtopic.php?f=80&t=25782 Improvements of the Graphical User Interface (GUI)
Cool suggestion: Eatable MOUSE-pointers.
Have you used the Advanced Search today?
Need help, question? FAQ - Wiki - Forum help
I still like small signatures...
ever_Lord
Inserter
Inserter
Posts: 20
Joined: Thu Apr 02, 2020 7:20 pm
Contact:

[Editor]

Post by ever_Lord »

TL;DR
Save position of "Editor" window

What ?
Hello,
Maybe I'm not alone :)

When I type "/c editor", the editor GUI is always shown at position (0,0) = top left.
So it may overlap with other Guis (like gui.left or gui.top)
And this is a little annoying
So may be you could save position during a session (or even in a config file ?) so when we switch editor, it appears at the last place it was.
Why ?
I'm coding for Biter battles Championships and I use a lot the editor but it always cover other guis.

Thanks !
User avatar
ssilk
Global Moderator
Global Moderator
Posts: 12889
Joined: Tue Apr 16, 2013 10:35 pm
Contact:

Re: Save window geometry upon exit / Remember window positions / Store window size/location between games

Post by ssilk »

merged with existing thread
Cool suggestion: Eatable MOUSE-pointers.
Have you used the Advanced Search today?
Need help, question? FAQ - Wiki - Forum help
I still like small signatures...
nj0y
Manual Inserter
Manual Inserter
Posts: 2
Joined: Thu Sep 08, 2022 5:37 am
Contact:

Start maximized in Window mode or remember window position

Post by nj0y »

I have a setup with one 32:9 monitor but treat them in Windows as two separate monitors for easier multi-window positioning when working.
When playing Factorio, I turned off "full screen", but every time I start Factorio I have to move the borders manually to fit the whole screen except the task bar. And once again after updating the mods.
It would be nice to either start it taking the full desktop or just remember the last window position and size.
Koub
Global Moderator
Global Moderator
Posts: 7784
Joined: Fri May 30, 2014 8:54 am
Contact:

Re: Save window geometry upon exit / Remember window positions / Store window size/location between games

Post by Koub »

[Koub] Merged into older thread with same (or close enough) suggestion.
Koub - Please consider English is not my native language.
JohnWittle
Burner Inserter
Burner Inserter
Posts: 5
Joined: Thu Aug 04, 2016 9:09 pm
Contact:

Re: Save window geometry upon exit / Remember window positions / Store window size/location between games

Post by JohnWittle »

It's kind of infuriating that the people merging this "idea and suggestion" don't notice that there are two completely different problems being complained about

The first, and most important, is that the factorio window *itself* does not remember its own geometry. When I start factorio.exe, the game opens a 1024x768 window every single time, and then I must manually resize it by dragging the corner, which is obviously ludicrous

Secondly, people are complaining that the UI elements inside Factorio, like the inventory window, do not retain their own geometry between sessions. This makes sense and it's perfectly reasonable for the developers to want to keep it this way.

This 1024x768 value is obviously getting stored somewhere since it is a different value for each complainant. But I cannot for the life of me find where. I have checked everywhere I know about factorio storing data, including its game directory, its appdata directories and its (seemingly unused) Documents / My Games directory, and there doesn't appear to be any configuration file where this value gets stored. I've even searched my entire harddrive for the value '768' and spent an hour looking through each result, hoping somewhere would be a config file named, like, factorio_startup_settings.rc with a line called "windows-resolution-h = 768" or something. I can only guess that it's stored as an undocumented environmental variable or registry key, because I could not find it.

This is a bug that needs to be fixed, period. Calling it a suggestion is obvious nonsense. Windows exposes a window manager API for exactly this reason and failing to use it is not a lifestyle choice, it's a mistake. If there is a place where users can tell Factorio how large they would like the Factorio game window to be (and I suspect there is, since each of us sufferers always get the same resolution on startup), it needs to be documented, and when people ask about it, moderators need to tell them where it is, instead of misunderstanding and telling them that that feature will not be added to the game...

Seeing moderators confuse these two issues, and merge threads talking about completely different things, makes me think the devs aren't even aware that people are having trouble with this.

Currently, I like having factorio taking up the topleft two-thirds of my screen, while the bottom has a text file with notes, and the right has a nice infographic showing common ratios. This means that every single time I boot up factorio, I have to spend half a minute resizing the window to be perfect. Every time I change a mod, or relaunch for any reason, I have to redo this window-resizing process.

Does that make the problem clear? We're not talking about in-game windows, we're talking about the factorio window itself.

I found a guide which claims to be able to force factorio to start with a specific resolution, on reddit. Spoilers, it doesn't involve using the --window-size startup flag; it involves installing two separate third party programs and spending an hour configuring special nvidia/ati profiles for use with factorio only. this is simply not reasonable.
Hornwitser
Fast Inserter
Fast Inserter
Posts: 214
Joined: Fri Oct 05, 2018 4:34 pm
Contact:

Re: Save window geometry upon exit / Remember window positions / Store window size/location between games

Post by Hornwitser »

JohnWittle wrote: Sat May 06, 2023 6:58 am The first, and most important, is that the factorio window *itself* does not remember its own geometry. When I start factorio.exe, the game opens a 1024x768 window every single time, and then I must manually resize it by dragging the corner, which is obviously ludicrous

...

This 1024x768 value is obviously getting stored somewhere since it is a different value for each complainant. But I cannot for the life of me find where.
Factorio opens by default in the centre of screen at a resolution of 1920x1080 scaled up by your UI size if it is greater than 1. For example I play on a UI scale of 150% which means the window ends up sized at 1920 * 1.5 = 2880 by 1080 * 1.5 = 1620 pixels. If the default monitor Factorio opens on is smaller than the default window size it wants to open at the size is clamped to fit on that monitor.
JohnWittle wrote: Sat May 06, 2023 6:58 am This is a bug that needs to be fixed, period. Calling it a suggestion is obvious nonsense. Windows exposes a window manager API for exactly this reason and failing to use it is not a lifestyle choice, it's a mistake. If there is a place where users can tell Factorio how large they would like the Factorio game window to be (and I suspect there is, since each of us sufferers always get the same resolution on startup), it needs to be documented, ...
If I add --window-size 1080x1080 to the launch options Factorio opens at 1080x1080 on my system. And it keeps that resolution after apply changes to the mod list. I'm unable to reproduce the bug you are referring to.
Post Reply

Return to “Ideas and Suggestions”