Creating a Single Player Mission

Mission File Structure (5.2)

This section will explain all the files that are created when you save a map, as well as describe which text files you will need to create to begin scripting.

When you save a map, it creates the following files:

Next come the text files you need to create to get ready to script. There are two files that every mission looks for when it is loaded to see if there is a script to run. These two files provide "pointer" information for the mission. That is, they point to all the other configuration and script files the mission will be reading from. They are:

Create two empty text files ("strategic.cfg" and "types_mission.cfg") and place them in your mission folder. Now, exactly what these files point to will depend on the mission and what you are trying to do, so keep these two files opened on hand, as well be adding to them as we require more files to be accessed.

Next, we'll create the text files that will hold your actual script. From here on out, you can name your text files whatever you want, but we'll be roughly following the way it was done in AMRTS. The following is assuming there will be two teams, a player and an AI. Create three text files in your mission folder, name them "objective_start.cfg", "objective_ai.cfg", and "objective_player.cfg".

Now, we've added these files to the folder, but the game won't know they are there unless we include them in the pointer file, types_mission.cfg. You can do this by adding the following lines to said file:

#include "objective_start.cfg"
#include "objective_ai.cfg"
#include "objective_player.cfg"

Now save your changes to the file. The game will now know to look inside these files for scripts.