Hey everyone! Today we're going to learn about giving OP2 important data it needs to run your level and create our first unit. We're going to use the Multiplayer "Skeleton" template (bare-bones needed to compile a working, but empty, level) rather than the Hooville template. Open the project file (OP2Script.dsp, unless you renamed it). You should be looking at some code. Hopefully, you'll see something like this near the top of the file:
char MapName[] = "on6_01.map"; // The .map file used for this level
char LevelDesc[] = "6 Player, LastOne, '<map name>' map";// Description appearing in the game list box
char TechtreeName[] = "MULTITEK.TXT"; // File to use for the tech tree
SDescBlock DescBlock = { MultiLastOneStanding, 6, 12, 0 }; // Important level details
This may look scary, but it's actually pretty self-explanatory. Regardless, I'm here to make sure you understand it all.
char MapName[] = "on6_01.map";
This just tells OP2 which map file to use. For example, on6_01.map is the map Pie Chart uses. For now, I want you to change this to "on4_01.map" (La Corrida's map). The map is just the terrain (hills, cliffs, plains, rocks, etc.) that your mission uses. Multiple missions can use the same map file. When I get the chance I'll provide a list of all default maps and their corresponding mission(s).
char LevelDesc[] = "6 Player, LastOne, '<map name>' map";
This is the name you give your map. It'd be best to stick to the naming conventions we have (for example: "6P, LoS, 'My First Map'" or "Colony Builder - Eden, Starship"). Pick something creative.
char TechtreeName[] = "MULTITEK.TXT";
This tells OP2 which techtree your mission will use. Techtrees specify what players can research, how long that research takes, which lab the research takes place in, etc. For extremely detailed info, check out
this post by Hooman.
Here's a list of default techtrees and a description:
multitek.txt: Standard techtree used by most (if not all) standard multiplayer missions and colony games. Has almost all techs available. The best choice for most projects.
edentek.txt: Techtree used by Eden campaign missions. Missing several Plymouth-only techs. Not recommended for multiplayer missions.
ply_tek.txt: Techtree used by Plymouth campaign missions. Missing several Eden-only techs. Not recommended for multiplayer missions.
tutortek.txt: Techtree used by the tutorials. Missing a lot of techs. Definitely not recommended for any mission.
basictek.txt: Modified version of multitek. Basic Lab available at start, Basic Lab techs must be researched before Standard Lab available.
SDescBlock DescBlock = { MultiLastOneStanding, 6, 12, 0 };
The DescBlock deals with a couple things. We'll go over them slowly. I'll list what each thing does and tell you what it is in the example DescBlock.
First option (MultiLastOneStanding): Gametype. This tells OP2 what kind of mission this is (colony game, tutorial, space race, etc.). Available options are:
Colony - Colony Game
AutoDemo - If you don't know what these are, open up OP2 and wait at the main menu for awhile. You won't be making these too often.
Tutorial - Tutorial mission. You won't make these often either.
MultiLandRush - Multiplayer land rush game.
MultiSpaceRace - Multiplayer space race game.
MultiResourceRace - Multiplayer waste of time... I mean, resource race game.
MultiMidas - Multiplayer lame Midas game.
MultiLastOneStanding - Multiplayer LoS game.
Note: Should you one day make a campaign mission, the gametype should be the mission number. Example: For Eden Mission #3, the gametype would be 3.
Second option (6): Number of players. One through six. No further explanation needed.
Third option (12): Maximum tech level. For the most part, this will probably be 12. Changing it is really only useful for campaigns, since you usually want people to be able to research the entire techtree in multiplayer/colony games.
Fourth option (0): Unit mission. You remember those missions where you just had a couple of units and no base? Set this to 1 to make a mission like that. Usually you'll leave it at 0 though.
I'm going to separate this into two posts, so stay tuned and we'll have you making your first unit!
Note: If you did not read the intro, you may not understand what I'm talking about. The intro, as well as a link to further instructions, can be found
here. Feel free to ask questions about SDK setup there.