Page 1 of 1

Hidden hotkey to restart the game, for mod developers

Posted: Sun Apr 13, 2025 6:19 pm
by petrathekat
TL;DR
A key combination, unbound by default, that closes and restarts the game, like it does when you change your mod settings.

Either it could be in the super secret settings, or probably just unbound by default in the default controls menu.
Why?
I'm currently developing a mod and I spend an awful lot of time closing Factorio, then tabbing back over to Steam among my million windows and launching the game again. Having a shortcut for this would save me a lot of time overall. Hopefully it would be easy to implement (the game already has infrastructure to restart the game, like when you fiddle with mod settings). It's a small annoyance but it would be one rough corner of modding shaved off :)

Re: Hidden hotkey to restart the game, for mod developers

Posted: Mon Apr 14, 2025 7:17 am
by pioruns
If you are a developer, you can program this yourself in 5 minutes by creating sh file with killall command and another to relaunch Factorio. Give your shortcut a key combination to activate in your desktop environment settings, or place shortcut on the panel, to activate by single click.

Re: Hidden hotkey to restart the game, for mod developers

Posted: Mon Apr 14, 2025 4:42 pm
by petrathekat
Sure, but not everyone is a developer, and it'd be a lot jankier than official support.

Re: Hidden hotkey to restart the game, for mod developers

Posted: Mon Apr 14, 2025 7:52 pm
by pioruns
Official support for restarting a game from shortcut is not needed by gamers. Modders are already power users who know how to restart a system process. If you are a modder, why not writing 5 line script to kill and restart your steam game entry? Come on.

Re: Hidden hotkey to restart the game, for mod developers

Posted: Mon Apr 14, 2025 8:07 pm
by angramania
petrathekat wrote: Sun Apr 13, 2025 6:19 pm I spend an awful lot of time closing Factorio, then tabbing back over to Steam among my million windows and launching the game again. Having a shortcut for this would save me a lot of time overall. Hopefully it would be easy to implement (the game already has infrastructure to restart the game, like when you fiddle with mod settings). It's a small annoyance but it would be one rough corner of modding shaved off :)
Why spend time on mouse shaking? Standard Alt+F4 to close, custom shortcut to launch.
Also you may try https://mods.factorio.com/mod/ReloadModsRedux

Re: Hidden hotkey to restart the game, for mod developers

Posted: Mon Apr 14, 2025 9:28 pm
by pioruns
Alt+F4, exactly :D
Personally, I would create a two line script, killall factorio and ./factorio, and assign a shortcut for it. But OP, who is a modder, I am sure will figure it out, if it's on steam or not, it's not any more difficult than this.

Re: Hidden hotkey to restart the game, for mod developers

Posted: Tue Apr 15, 2025 6:01 pm
by Silari
petrathekat wrote: Sun Apr 13, 2025 6:19 pm I'm currently developing a mod and I spend an awful lot of time closing Factorio, then tabbing back over to Steam among my million windows and launching the game again. Having a shortcut for this would save me a lot of time overall. Hopefully it would be easy to implement (the game already has infrastructure to restart the game, like when you fiddle with mod settings). It's a small annoyance but it would be one rough corner of modding shaved off :)
I keep an empty mod in my mod folder - I toggle it on/off when I need to restart. It doesn't DO anything, just there to let me restart quicker.

Re: Hidden hotkey to restart the game, for mod developers

Posted: Tue Apr 15, 2025 8:39 pm
by petrathekat
angramania wrote: Mon Apr 14, 2025 8:07 pm Also you may try https://mods.factorio.com/mod/ReloadModsRedux
Oh huh I've never heard of that. How does it work? (It's Unlicense but there's no source code :( )

Re: Hidden hotkey to restart the game, for mod developers

Posted: Wed Apr 16, 2025 6:34 am
by sakuro
petrathekat wrote: Tue Apr 15, 2025 8:39 pm
angramania wrote: Mon Apr 14, 2025 8:07 pm Also you may try https://mods.factorio.com/mod/ReloadModsRedux
Oh huh I've never heard of that. How does it work? (It's Unlicense but there's no source code :( )
Download and unzip the mod:-) It just calls

Code: Select all

game.reload_mods
Modding API Reference

Re: Hidden hotkey to restart the game, for mod developers

Posted: Thu Apr 17, 2025 11:47 am
by Kyralessa
You can also install a .zip version of the game so you don't have to run through Steam at all.

Sample link:

https://factorio.com/get-download/2.0.4 ... n64-manual