Skip to content
clemty edited this page Sep 9, 2016 · 18 revisions

How to use OpenRA Utility

Linux users are normally familiar with the command line ("terminal" application), so they should simply add mono or mono --debug (additional information if something goes wrong) in front of all the following commands. Another note for Linux is that the files are normally found in /usr/share/openra. cd to there instead.

Windows users should run cmd.exe. Simply double-clicking OpenRA.Utility.exe will not work as it is not a GUI-capable application.

Navigate to your OpenRA directory: cd Program Files cd OpenRA Execute OpenRA.Utility.exe to see a help windows with it's syntax: OpenRA.Utility.exe ra

Run `OpenRA.Utility.exe [MOD]` to see a list of available commands.
The available mods are: cnc, d2k, modchooser, ra

  --argb2hex 
  Convert a,r,g,b legacy colors into hex colors

  --check-code-style DIRECTORY
  Check the *.cs source code files in a directory for code style violations.

  --check-explicit-interfaces 
  Check for explicit interface implementation violations in all assemblies referenced by the specified mod.

  --check-sequence-sprites 
  Check the sequence definitions for missing sprite files.

  --check-yaml [MAPFILE]
  Check a mod or map for certain yaml errors.

  --docs 
  Generate trait documentation in MarkDown format.

  --extract 
  Extract files from mod packages to the current directory

  --extract-language-strings 
  Extract translatable strings that are not yet localized and update chrome layout.

  --fix-classic-tilesets EXTENSIONS
  Fixes missing template tile definitions and adds filename extensions.

  --import-ra-map FILENAME
  Convert a legacy Red Alert INI/MPR map to the OpenRA format.

  --import-td-map FILENAME
  Convert a legacy Tiberian Dawn INI/MPR map to the OpenRA format.

  --lua-docs 
  Generate Lua API documentation in MarkDown format.

  --man-page 
  Create a man page in troff format.

  --map-hash MAPFILE
  Generate hash of specified oramap file.

  --map-rules MAPFILE
  Merge custom map rules into a form suitable for including in map.yaml.

  --png SPRITEFILE PALETTE [--noshadow] [--nopadding]
  Convert a shp/tmp/R8 to a series of PNGs, optionally removing shadow

  --remap SRCMOD:PAL DESTMOD:PAL SRCSHP DESTSHP
  Remap SHPs to another palette

  --replay-metadata REPLAYFILE
  Print the game metadata from a replay file.

  --resize-map MAPFILE WIDTH HEIGHT
  Resize the map at the bottom corners.

  --rgba2hex 
  Convert r,g,b[,a] triples/quads into hex colors

  --shp PNGFILE [PNGFILE ...]
  Combine a list of PNG images into a SHP

  --upgrade-map MAP CURRENTENGINE
  Upgrade map rules to the latest engine version.

  --upgrade-mod CURRENTENGINE
  Upgrade mod rules to the latest engine version.

How to convert an icon with OpenRA Utility

The procedure is not very complicated, though there are quirks due to the nature of the SHP format.

  1. Get the palette of the game, e.g. Red Alert: OpenRA.Utility ra --extract temperat.pal
  2. Extract the SHP file you want to edit or use as a template from the .MIX archives: OpenRA.Utility ra --extract ttnkicon.shp with ttnkicon.shp beeing the cameo for the tesla tank.
  3. Get a PNG file with the right palette settings by extracting it using the right palette setting: OpenRA.Utility ra --png ttnkicon.shp temperat.pal
  4. Use Photoshop, Paint.NET, GIMP (or any other program that uses the palette formats) to open the newly created ttnkicon.png and save the color table of the picture or edit the PNG file right here. If you want to start from scratch be sure convert your PNG format to 8bit/channel, using the custom palette saved before otherwise the in-game result will be pixel garbage.
  5. OpenRA.Utility ra --shp YourImage0000.png

Players ๐ŸŽฒ

Modders โœ๏ธ

Developers ๐Ÿ”ง

Clone this wiki locally