Page 1 of 1

Mod option to quit to main menu

Posted: Sun Mar 02, 2008 4:17 pm
by chuck_starchaser
One idea that keeps coming up repeatedly at the PU forum, and that everone, universally, seems to want, is that when you ESC-Q or ESC after death, the game will go to the main menu, rather than quit to the desktop.
Once in the main menu, we have a QUIT button with no questions asked, so it wouldn't extend the time to quit too much at all; and would save tons of file loading time when the intent is to just reload a mission, --as it often is. It's also more the way most games work.

How easy or difficult would it be to implement this?
Can it be done in Python?, or would it need engine work?

Posted: Sun Mar 02, 2008 7:11 pm
by bgaskey
From main_menu.mission it looks like you can just

Code: Select all

import Base
Base.LoadBaseInterface("main_menu")
I haven't had much time to parse the source code though so maybe wait for an answer from the devs 8)

Posted: Sun Mar 02, 2008 7:49 pm
by chuck_starchaser
Ah, good, thanks! I've no idea where to put that, though; I did global searches of py files for "death", "died", "quit", and nothing is turning up in terms of a place where user quitting is handled. Seems as if it were hard-coded in c++...

Posted: Sun Mar 02, 2008 7:51 pm
by bgaskey
I'm looking too. There is 1260 python files in vegastrike and data4.x :? . Working on it.

Posted: Sun Mar 02, 2008 8:21 pm
by bgaskey
There is no Base.py anywhere though and no python files contain "LoadBaseInterface" :? this has got me stumped.

Posted: Sun Mar 02, 2008 8:47 pm
by bgaskey
It may in fact be cpp code because the only place "Cockpit::Quit" from the config entry for esc appears is in config_xml.cpp

It seems odd that this is not moddable though :? . I'm done for today gotta write 5 more pages of term paper :(

Posted: Sun Mar 02, 2008 9:50 pm
by chuck_starchaser
Another idea's come up that we might be able to bind a key, like m, to have as an alternative "go to main menu".