Game Development Community

Enhanced StartMissionGui

by Drew Hitchcock · 04/24/2005 (6:53 pm) · 21 comments

Download Code File

To apply this patch, follow the instructions below:

1. Start with a relatively fresh copy of starter.fps

2. Back up the following files
- starter.fps/client/ui/startmissiongui.gui
- starter.fps/data/missions/stronghold.mis
- starter.fps/data/missions/stronghold.ter

3. Delete the following file, just to be safe
- starter.fps/client/ui/startmissiongui.gui.dso

4. Extract stronghold.mis and stronghold.png from this resource's .zip file, copy them to starter.fps/data/missions. (Overwrite the existing files)

5. Extract the startmissiongui.gui file from this resource's .zip file, copy it to starter.fps/client/ui. (Again, overwrite the existing file.)

6. Start up the engine and click "Start Mission..."

7. Be amazed by the awesome dialog box.

Note that you will not see any preview images for any missions that are not set up correctly!

Also note that this patch assumes your game's folder is named "starter.fps,"
if it is named something else, you will need to modify the .mis files accordingly (see below)


How to set up your missions:

The dialog gets the information that it needs from each mission's MissionInfo ScriptObject. This information can be edited from the in-game mission editor, but it's often easier just to open the .mis file with a text editor.

If you open up a standard new torque mission, you'll see something like this around the fifth line or so:

new ScriptObject(MissionInfo) {
         desc0 = "A simple new mission template.";
         name = "New Mission";
         descLines = "1";
   };

To specify an image to be used as the preview image for this mission, you need to add a "preview" field containing the image's path, like so:

new ScriptObject(MissionInfo) {
         desc0 = "A simple new mission template.";
         name = "New Mission";
         descLines = "1";
         preview = "starter.fps/data/missions/TheHills.png"
   };

The "descXXX" and "descLines" fields define the description of the mission that is displayed in the loading dialog and the startmissiongui. For missions with one line of description, the MissionInfo Should look something like this:

new ScriptObject(MissionInfo) {
         desc0 = "This is the description of the mission";
         name = "New Mission";
         descLines = "1";
         preview = "starter.fps/data/missions/TheHills.png"
   };

For missions that need more than one line of description, the MissionInfo will look like this (note the value of descLines determines the number of lines displayed):

new ScriptObject(MissionInfo) {
         desc0 = "This is the description of the mission";
         desc1 = "This is line 2";
         desc2 = "This is line 3";
         name = "New Mission";
         descLines = "3";
         preview = "starter.fps/data/missions/TheHills.png"
   };

Unfortunately, there's no automated way of taking screenshots that I know of, so you will need to manually take a screenshot for each mission and resize them in an image editing program.
Page«First 1 2 Next»
#21
08/07/2009 (2:09 pm)
thanks!, works like a charm, and fix console error: duplicate MissionInfo datablock in TGEA :D
Page«First 1 2 Next»