-
Notifications
You must be signed in to change notification settings - Fork 1
Modding Guide
OpenRA is designed to be highly moddable. Both RA and C&C are implemented as mods on top of the core engine, and other mods can choose to use as much or as little of that functionality as they like. At the simplest, a mod may just contain some custom MiniYaml definitions. More complex mods may need to introduce some custom traits, which are written in a .NET language (we prefer C#) and compiled into a DLL. At the most complex end of the spectrum, it is possible to use the engine without any of the RA behavior, although this involves an incredible amount of work (reinventing combat, production, resource management etc).
By default, the game runs the mods listed in ~/OpenRA/settings.yaml
(or similar), under Game:InitialMods:. If this doesn't exist, the default is RA. You can override the settings and run with specific mods by listing them on the command line, or by changing the arguments in the launcher shortcuts.
Under Windows, you can do this by creating a new shortcut to C:\Program Files\OpenRA\OpenRA.Game.exe
.
Right click on the shortcut, select properties and go to the Shortcut tab.
Go to the target box and type a space at the end, then type: Game.Mods=
The target box should now read:
C:\Program Files\OpenRA\OpenRA.Game.exe Game.Mods=
After the Game.Mods=
you should declare which mod(s) you want to load, as explained below.
The Game.Mods argument lets you specify a list of mods to load. The order they are specified is important; they are loaded in order, so the ones later in the list override earlier items.
For example, to load the game with the ra_perf
mod, which adds some debugging maps to ra, you would use Game.Mods=ra,ra_perf
ra_perf simply adds maps to ra, it can not be run as a stand alone mod.
For example, the game will crash if you try to launch it with Game.Mods=ra_perf
On the other hand, some mods (like cnc) are standalone, and cannot be run with other standalone mods.
To run the cnc mod, you would use Game.Mods=cnc
but expect a crash if you tried Game.Mods=cnc,ra
Each mod has a directory inside the mods
directory in the game root. It is the name of this directory which is used when naming mods to load. Everything related to a particular mod is contained within this directory (with the possible exception of user maps, which can be loaded from other locations too.)
The only file which is absolutely required for a mod is mod.yaml
. This contains the manifest for the mod, which the engine will use to load all the other pieces you need. By convention, other things are placed in subdirectories of the mod directory:
-
packages
contains MIX archives required by the mod -
rules
contains MiniYaml files describing how to assemble actors (units/buildings/etc) -
maps
contains maps. -
tilesets
contains MiniYaml files describing the various tilesets -- temperate, snow, etc. -
chrome
contains MiniYaml files describing the UI chrome -
uibits
contains various textures used by the chrome -
bits
contains various loose in-game assets -- SHPs, etc.
Nothing forces you to lay out a mod this way, but it's easier if everything is consistent.
You need to modify following files:
- system.yaml
- voice.yaml
- chrome.yaml
The faction will now start out with the MCV only.
Have a look https://github.com/OpenRA/OpenRA/tree/bleed/mods/example to see a minimal mod that adds a truck that carries infantry to the soviets.
Voxels are not supported and the SHP files differ. http://openra-modding.tumblr.com/ has a tutorial how to import and adapt them.
- Each warhead block can define multipliers against specific armor types. If not specified, you get 100%. Same applies for armor e.g
Armor:Type:ChickenSuit
in unit definition, and then doWarhead:Versus:ChickenSuit:50%
in weapons.yaml - If You set the value to 0%, the weapon is not even considered for firing against that target.