clemty edited this page Sep 9, 2016 · 4 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

  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 for explicit interface implementation violations in all assemblies referenced by the specified mod.

  Check the sequence definitions for missing sprite files.

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

  Generate trait documentation in MarkDown format.

  Extract files from mod packages to the current directory

  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.

  Generate Lua API documentation in MarkDown format.

  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 SHPs to another palette

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

  Resize the map at the bottom corners.

  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
Clone this wiki locally
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Press h to open a hovercard with more details.