Skip to content
Generalcamo edited this page Feb 7, 2013 · 104 revisions

Warning: new versions can remove your maps, make backup somewhere safe.

OpenRA comes with a easy understandable map editor. With this tool you can create or edit maps that already exist. Though there is a limit of what you can do in this program, we'll try to cover the most things in this document. You may want to have a look at Pixelart or the [Modding Guide](Modding Guide) to dig deeper as OpenRA allows heavily modified maps with new units or new game modes.

Getting started

You will find the editor inside the OpenRA folder. You can start the editor by launching the link from the start menu. Double clicking the executable named 'OpenRA.Editor.exe' will not work. Note that you will need Microsoft .NET Framework installed to run the editor or the game.

Navigation

When you start up the editor you will find 3 major areas. The middle area is where the map is represented.

Create your first map

Open OpenRA.Editor, File -> New, Size 64-64, 16, 16 , 48, 48 (note: use the up and down button to keep the numbers valid, they have to stay dividable by 8) Start up (hold middle button(wheel) to scroll around and zoom in and out Put starting positions, click Map -> Setup Default Players, then Map -> Properties Start up2 Save map Start up3

File Format

Maps are created in a '.oramap' extension, these files basically work as a '.zip' archive. You can open these files with an archive program such as http://www.7-zip.org/. Each map contains a 'map.yaml' and 'map.bin'. The 'map.yaml' which contains basic information about the map. You can open the '.yaml' file with just a normal text editor as it only contains text. You can change the data in this file to your own liking. The maps are a little hard to find, in Windows Vista its in C:\Users\*username*\AppData\Local\VirtualStore\Program Files\OpenRA\mods\ra\maps. On Mac you have to Right click the openra icon -> Show package contents -> go Resources/mods/ra etc, and put maps where you find the other maps.
When you create a map, make sure it's <name>.oramap does not contain spaces. Spaces bring troubles while packaging or at content sites.

Advanced Editing

The .yaml file you unzipped can be open in any editor that does not mess up with tab indention. notepad++(note:Notepad++ will insert tabs as indent by default, making YAML not valid (it will mark the invalid line in red). If you use it as .yml editor you should setup "substitute with spaces" in preferences.) is suggested a lot better than wordpad It is in this map you can change more settings, have a look at it opened: yaml file as you can see there is now player-settings. And that needs to be set, along with other options. You should change map to Minigame, and also insert the settings for players

Under rules you decide how much credits the players start with: Player: PlayerResources: InitialCash: 4000 yaml file

Then save and compress the files into a .zip but rename the extension to .oramap

yaml file

yaml file

Copy it to the place you found it, and find it in OpenRA when you press create game. Other players without the map cannot join, so you need to send .oramap file to them.

This map can be downloaded here It's more fun if you start with some building. It's even possible to have neutral or civilian buildings

picture

The coordinates can you calculate, or look in editor in the corner picture

I also change the starting money to get less money in the start, to stop a rush in the start

picture

This map can be downloaded here

More advanced version of this game, with custom buildings, different sound, HackAI (change in AI production), natives can be found here as file, and here the source

Map.yaml Documentation

  • Selectable: if the map should be listed in-game (true/false)
  • MapFormat: current version is 5, if the editor detects a lower number it will try to upgrade it
  • Title: Name of the map shown in map selector.
  • PlayerCount: Number of players
  • Tileset: for RA it can be either TEMPERAT, INTERIOR, DESERT, or SNOW; CnC has TEMPERAT, DESERT, WINTER, or SNOW; D2K has ARRAKIS
  • MapSize: size of the map which has to be two integers dividable by eight separated by commas
  • TopLeft: where the map starts (type: 2D-location)
  • BottomRight: where the map ends (type: 2D-location)
  • UseAsShellmap: set to true if you want the map to appear in the main menu background of the game
  • Type: This organizes the map into a certain game mode in the map selection screen. Currently used are Conquest (default), King of the Hill (KotH), Minigame or Mission
  • RequiresMod: can be set to the mod string (optional)
Players:
	PlayerReference:
  • Name: internal name of the player (mostly for single player mission)
  • Palette: name of a palette to use -- see system.yaml for world-defined palettes.
  • OwnsWorld: Whether this player owns the world (trees, etc). This should be only set to true for the Neutral player.
  • NonCombatant: Whether this player should be considered for victory conditions, player listing (type: boolean)
  • Playable: set to true to make human players be able to choose in lobby
  • DefaultStartingUnits: if this player will start with a MCV or not (type: boolean)
  • AllowBots: Whether this player can be played by a bot, set to false on island maps to avoid massive lag because of the broken pathfinder and the AIs inability to use aircraft or ships.
  • LockRace: if the faction is locked for this player. (type: boolean)
  • Race: what faction that is default selected, e.g. allies or soviet for RA
  • LockColor: if the color for this player is locked or not. Useful for singleplayer missions (type: boolean)
  • ColorRamp: default color for this player. (type: integer; format: int,int,int,int = H,S,L,R)
  • InitialCash: starting cash for this player. (format: integer) default is 5000
  • Allies: list of player names the player is allied with (type: string)
  • Enemies: list of player names the player has to defeat (type: string)

More can be found at the [Trait Documentation](Trait Documentation). You can define new units and override all game rules. Some examples are collected below.

Oil setting

The Green Field settings from Hamb and DraLUSAD, all pasted here:
First of remove the buildings not wanted with - being a negation. The Prerequisites: adds a new dependency to the tech tree.

Rules:
	PROC:
		Buildable:
			-Owner:
	SILO:
		Buildable:
			-Owner:
	HARV:
		Buildable:
			-Owner:
	WEAP:
		Buildable:
			Prerequisites: Faction Center

This adds a new building to the tech tree:

	OILB:
		Buildable:
			Queue: Building
			BuildPaletteOrder: 10
			Owner: allies,soviet
			Prerequisites: anypower
			HotKey: e
		Valued:
			Cost: 1400
		Tooltip:
			Name: Oil Derrick
			Description: Supplies a steady income
			Icon: miss
		Building:
			Power: -30
		Sellable:
		RepairableBuilding:
		GivesBuildableArea:
		RevealsShroud:
			Range: 6
		IronCurtainable:
		CashTrickler:
			Period: 50
			Amount: 30
		ProvidesCustomPrerequisite:
			Prerequisite: Faction Center

But to balance you should also make so the AI builds them, and how much they should focus on building them.

	Player:
		PlayerResources:
			InitialCash: 5000
		HackyAI@EasyAI:
			Name: Easy AI
			BuildingFractions:
				oilb: 35%
		HackyAI@NormalAI:
			Name: Normal AI
			BuildingFractions:
				oilb: 35%
		HackyAI@HardAI:
			Name: Hard AI
			BuildingFractions:
				oilb: 35%

FCOM with super view

Adds the strange soviet building which can be only found in RA's single-player mission to the build menu and allows it to reveal the whole map.

	FCOM:
		Buildable:
			Queue: Building
			BuildPaletteOrder: 10
			Owner: soviet
			Prerequisites: anypower
			Hotkey: e
		Valued:
			Cost: 1500
		Tooltip:
			Name: Forward Command Post
			Description: Soviet Command Outpost: reveals the whole map
			Icon: fcom
		Building:
			Power: -50
		Sellable:
		RepairableBuilding:
		GivesBuildableArea:
		RevealsShroud:
			Range: 99999
		ProvidesCustomPrerequisite:
			Prerequisite: Faction Center

The icons/names can you find in the editor by holding the mouse over the actors you can set out

Building that gives you power

When ore stores in the refinery there, the radiation can give you some power

	PROC:
		Building:
			Power: 50

put -50 if it uses 50 power.

Change AI building order

		HackyAI@HardAI:
			BuildingFractions:
				proc: 10%
				ftur: 50%
				powr: 20%
				fcom: 10%
			Squadsize: 5

Remove crate drops from the map

World:
    -CrateDrop:

Increase value of gems and ore

World:
    ResourceType@ore:
        ValuePerUnit: 50
    ResourceType@gem:
        ValuePerUnit: 200
        Name: Crystals

Increase build speed of vehicles

World:
    Player:
        ClassicProductionQueue@Vehicle:
	    BuildSpeed: .1

Custom sounds

Open in Audacity and convert it to 16bit 22050 Hz .WAV files which you can convert using XCC AUD Writer (Winamp Plugin) or WAV2AUD (command line tool).

Insert something like this:

Rules:
	E1:
		Selectable:
			Voice: NewVoice
	MCV:
		Transforms:
			TransformSounds:filename.aud,build5.aud
	Player:
		ConquestVictoryConditions:
			WinNotification:filename1.aud
			LoseNotification:filename2.aud

Voices:
	NewVoice:
		Voices:
			Select: filename1,filename2,filename3
			Move: filename4,filename5,filename6
			Die: filename5,filename6,filename7

Remember to include the files and the filenames are case-sensitve on Linux.

Make custom units

Rules:
	TRUK:
		Inherits: ^Vehicle
		Buildable:
			Queue: Vehicle
			BuildPaletteOrder: 50
			Prerequisites: weap,barr
			Owner: soviet
		Valued:
			Cost: 500
		Tooltip:
			Name: Supply Truck
			Description: Light infantry transport.\n Weak vs Everything
		Health:
			HP: 200
		Armor:
			Type: Light
		Mobile:
			Speed: 12
		RevealsShroud:
			Range: 5
		RenderUnit:
		Cargo:
			Types: Infantry
			Passengers: 5
			UnloadFacing: 220

Sequences:
	truk:
		idle:
			Start: 0
			Facings: 32
		unload:
			Start: 0
			Facings: 32

Weapons:

Voices:

Tower game with a lot of settings

http://pastebin.com/SL2Vg6P9

Scripts

If you are interested to be able to script for you maps you want to check out https://github.com/Holloweye/Your-Freedom this mod gives you access to use LUA scripting language for your maps.

Singleplayer Missions

Have a look at https://github.com/OpenRA/OpenRA/blob/bleed/OpenRA.Mods.RA/Missions/Allies01Script.cs and https://github.com/OpenRA/OpenRA/blob/bleed/mods/ra/maps/allies-01.oramap to see how it's done. Requires coding so be sure to read Compiling (and maybe a book on programming or C#).

  • Waypoint is just a way to help the scripters find a spot
  • Coordinates is the first horizontal then vertical from upper left corner
  • More hints can be found in the system.yaml file

Inspiration / Ideas

Have a look at Mapping modding Ideas for 100+ ideas for mods and maps.

Updates

Since release-20121019, Copy/Paste selection tool is supported in Editor.

Questions

Feel free to ask us in IRC and the forums. Upload your maps to the http://content.open-ra.org for feedback!

Clone this wiki locally