Mod option to quit to main menu

For collaboration on developing the mod capabilities of VS; request new features, report bugs, or suggest improvements

Moderator: Mod Contributor

Post Reply
chuck_starchaser
Elite
Elite
Posts: 8014
Joined: Fri Sep 05, 2003 4:03 am
Location: Montreal
Contact:

Mod option to quit to main menu

Post 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?
bgaskey
Elite Venturer
Elite Venturer
Posts: 718
Joined: Wed Mar 07, 2007 9:05 pm
Location: Rimward of Eden

Post 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)
chuck_starchaser
Elite
Elite
Posts: 8014
Joined: Fri Sep 05, 2003 4:03 am
Location: Montreal
Contact:

Post 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++...
bgaskey
Elite Venturer
Elite Venturer
Posts: 718
Joined: Wed Mar 07, 2007 9:05 pm
Location: Rimward of Eden

Post by bgaskey »

I'm looking too. There is 1260 python files in vegastrike and data4.x :? . Working on it.
bgaskey
Elite Venturer
Elite Venturer
Posts: 718
Joined: Wed Mar 07, 2007 9:05 pm
Location: Rimward of Eden

Post by bgaskey »

There is no Base.py anywhere though and no python files contain "LoadBaseInterface" :? this has got me stumped.
bgaskey
Elite Venturer
Elite Venturer
Posts: 718
Joined: Wed Mar 07, 2007 9:05 pm
Location: Rimward of Eden

Post 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 :(
chuck_starchaser
Elite
Elite
Posts: 8014
Joined: Fri Sep 05, 2003 4:03 am
Location: Montreal
Contact:

Post 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".
Post Reply