Hello, I have fixed this. If you would like to fix it yourself, follow these steps exactly.
- open your mods folder (usually C:\Users\YOURNAME\AppData\Roaming\Factorio\mods)
- use 7z or similar and select the option "Extract to RPGsystem_2.0.5" NOT "Extract here"
- open the RPGsystem_2.0.5 folder and then open control.lua in a text editor, preferably something better than notepad (I use Notepad++)
You are going to make two changes to this code:
- First, ctrl+F for
player.gui.screen.add
- Make a new line directly below that ^ line, and then paste this:
player.opened = frame
- Now ctrl+F for
on_gui_opened
- In the EMPTY SPACE below the line you just ctrl+F'd to, paste this entire code block:
script.on_event(defines.events.on_gui_closed, function(event)
local player = game.players[event.player_index]
if event.gui_type == defines.gui_type.custom then
if player and event.element and event.element.name == "char-panel" then
close_char_panel(player)
end
end
end)
- save and close the text file
- Re-zip the folder back into
RPGsystem_2.0.5.zip
(very important the name is exact, and say yes if it asks to replace any files)
- Delete the unzipped folder (not necessary but good tidiness)
That's it. The window should now close when you press ESC.
Very minor downside: Previously, if the window was opened and then you pressed E to open inventory, it would close the window AND open inventory. Now, it only closes the window and you must press it a second time to open your inventory. Minor, but worth mentioning.