Gaming
 

MapEditTutorial Lesson 3

From Supreme Commander Wiki

Contents

[edit] Making it playable

Once you have your map set out properly it's always a good idea to try it out and check that the scale is right. To start up a game you need to do the following (assuming you already have the tool window open):

[edit] Create start markers

First we create two markers which serve as the starting points where the ACU's will gate in.

  1. Open to the Markers Layer (or just press F6)
  2. Create two blank markers by dragging the "blank marker" icon out onto your map (they should appear in the markers tool window as "Blank Marker 00" and "Blank Marker 01")
  3. Rename "Blank Marker 00" to "ARMY_1" and "Blank Marker 01" to "ARMY_2" (by clicking on them twice slowly)

In case you're wondering, this is how a marker on the map looks like: Image:tutorial-marker.jpg

[edit] Create armies

Next we create armies. Defining an army is important for the game scripts, everything a player can control belongs to a specific army. So for a 2 player map, we need 2 armies.

  1. Open the armies layer (or just press F2)
  2. Create two armies (click the leftmost new army button)
  3. Open the games layer (or just press F1)
  4. Click on "add a configuration" and rename the configuration to "standard" (by clicking on it twice slowly)
  5. Click on "add a team"
  6. Drag the two armies ("ARMY_1" and "ARMY_2") into the teams box

Image:tutorial-12.jpg

What we want to do next is rename the team to FFA, however the editor doesn't work very well here so we have to do it manually:

  • Save your work and close the editor
  • Go to your "\Supreme Commander\Map\YourMapName" folder
  • Open the YourMapName_scenario.lua file with a text editor
  • At the end of the file you should see this:
   Configurations = {
       ['standard'] = {
           teams = {
               { name = 'New Team 1', armies = {'ARMY_2','ARMY_1',} },
           },
           customprops = {
           },
       },
   }}
  • Change the "New Team 1" bit to "FFA" so that it looks like this:
   Configurations = {
       ['standard'] = {
           teams = {
               { name = 'FFA', armies = {'ARMY_2','ARMY_1',} },
           },
           customprops = {
           },
       },
   }}
  • Save the YourMapName_scenario.lua file

[edit] Adding a startup script

We also need to add a lua script file to get the game running:

  • Create a file called "YourMapName_script.lua" in the same folder
  • Copy and paste the following in (a detailed explanation is in the scripts section)
   local ScenarioUtils = import('/lua/sim/ScenarioUtilities.lua')
   
   function OnPopulate()
   	ScenarioUtils.InitializeArmies()
   end
   
   function OnStart(self)
   end
   
  • Save the file and close the editor

Finished! You should now see the map in the Supreme commander maps list and you should be able to play it!

Lesson 4: Texturing