Hi all o/
just a quick idea : having a hotkey to hide/show the whole GUI. It would allow to simply walk through your base, enjoying its beauty/complexity/ingeniosity/whatever you want without the GUI. Many games have this option, and it also allows some content creators to produce "cinematic" content (but in Factorio, kinda hard tbh). Examples : overwatch, the witcher 3. (Ok, these are graphically big games, but still, Factorio has its own beauty) I haven't found a control for that in the settings.
Hide GUI
Moderator: ickputzdirwech
-
- Inserter
- Posts: 33
- Joined: Sun Oct 28, 2018 3:23 pm
- Contact:
Re: Hide GUI
[Koub] Moved to Ideas and suggestions.
I'm sure i've seen a similar suggestion recently, but couldn't find where.
I'm sure i've seen a similar suggestion recently, but couldn't find where.
Koub - Please consider English is not my native language.
- eradicator
- Smart Inserter
- Posts: 5206
- Joined: Tue Jul 12, 2016 9:03 am
- Contact:
Re: Hide GUI
Good news is that it's already trivial to mod. The problem with adding more and more vanilla hotkeys is just that it gets more and more difficult to chose a good default key :D.
Code: Select all
/c
local keys = {
'show_controller_gui', 'show_minimap', 'show_research_info', 'show_entity_info',
'show_alert_gui', 'update_entity_selection', 'show_rail_block_visualisation',
'show_side_menu', 'show_map_view_options', 'show_quickbar','show_shortcut_bar',
}
local x = not game.player.game_view_settings.show_controller_gui
for _,k in pairs(keys) do game.player.game_view_settings[k] = x end
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.
Mod support languages: 日本語, Deutsch, English
My code in the post above is dedicated to the public domain under CC0.
-
- Inserter
- Posts: 33
- Joined: Sun Oct 28, 2018 3:23 pm
- Contact:
Re: Hide GUI
Very nice!! I don't know much about coding, how can I play with this code as a mod?
And, for hotkeys, I think some already aren't bind by default, so this could be added without bind.
And, for hotkeys, I think some already aren't bind by default, so this could be added without bind.
eradicator wrote: ↑Wed Aug 26, 2020 3:12 pmGood news is that it's already trivial to mod. The problem with adding more and more vanilla hotkeys is just that it gets more and more difficult to chose a good default key .
Code: Select all
/c local keys = { 'show_controller_gui', 'show_minimap', 'show_research_info', 'show_entity_info', 'show_alert_gui', 'update_entity_selection', 'show_rail_block_visualisation', 'show_side_menu', 'show_map_view_options', 'show_quickbar','show_shortcut_bar', } local x = not game.player.game_view_settings.show_controller_gui for _,k in pairs(keys) do game.player.game_view_settings[k] = x end
- eradicator
- Smart Inserter
- Posts: 5206
- Joined: Tue Jul 12, 2016 9:03 am
- Contact:
Re: Hide GUI
You just need to define a custom-input ("hotkey") or a shortcut (those buttons right of the quickbar) in data stage and then listen for the corresponding event in control stage to call the function i posted.
Long time ago when hotkeys were new and shiny i made a tutorial mod to demonstrate how they work. I've been slacking off a bit on properly commenting all the changes each time i had to fix it up for a new factorio version but it should still be ok as a general guidline: https://mods.factorio.com/mod/HandCrankGenerator
If you want to make your own mod out of this you better make a new thread in modding-help.
Long time ago when hotkeys were new and shiny i made a tutorial mod to demonstrate how they work. I've been slacking off a bit on properly commenting all the changes each time i had to fix it up for a new factorio version but it should still be ok as a general guidline: https://mods.factorio.com/mod/HandCrankGenerator
If you want to make your own mod out of this you better make a new thread in modding-help.
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.
Mod support languages: 日本語, Deutsch, English
My code in the post above is dedicated to the public domain under CC0.