Here we go again with a "silly" thing I can't get: in the game properties I can register actions to execute at game starts, but I can't get how to execute actions BEFORE game ends.
Basically I want to hook into the "Quit game" event, no matter how it is triggered, to save an autosave file right before the user exits the game, but I can't get where to register such and action.
EDIT: I'd like to do the same to show a confirmation message, BTW, so I really hope there are options for this.
I'm not afraid coding Lua scripts, should it be the only way to achieve my goal; actually I enjoy it more than using native actions...

Ready to discover this can't be done...

but I have the best hopes for this.
Thanks in advance for any help guys!