This article is intended for learning purposes, such as modifying mutators or reading default game packages.

NOTE: Recompiling default game packages such as DH_Engine, DH_Game, etc. will prevent you from joining a standard game server. You are welcome to decompile them but do not recompile them (basically do not delete their .u files from the System directories).

Decompiling a Package

This page will explain how to decompile a .u package using an example.

To decompile \DarkestHour\System\DH_MutatorExample.u, Using UCC, enter:

ucc batchexport ..\DarkestHour\System\DH_MutatorExample.u class uc ..\DarkestHour\DH_MutatorExample\Classes -mod=DarkestHour

You should now have a folder called DH_MutatorExample inside your DarkestHour directory, with a Classes folder inside that. The Classes folder will now contain all of the .uc files included in the .u package. The .uc files can be opened and modified with a text editor.

Compiling a Package

With the \DarkestHour\DH_MutatorExample\Classes\ folder created and containing ‘.uc’ files, the package can be re-compiled by the following process.

  1. Delete the original DH_MutatorExample.u file from the \DarkestHour\System\ directory (if it exists)
  2. Open the file \DarkestHour\System\DarkestHour.ini
  3. Search the file for EditPackages
  4. Add a line to the list, EditPackages=DH_MutatorExample

Then, Using UCC, enter:

ucc make -mod=DarkestHour

You will now see a new DH_MutatorExample.u in the \DarkestHour\System directory. This contains your modified code.

Creating the .ucl File

(Optional) The .ucl file contains text variables such as those necessary to add a Mutator the Mutator Menu. Using UCC, enter:

ucc exportcache DH_MutatorExample.u -mod=darkesthour

You will now see a new DH_MutatorExample.ucl in the \DarkestHour\System directory.

Creating the .int File

(Optional, Rarely Needed) The .int file contains setup data necessary for using a new Game Type. Using UCC, enter:

ucc dumpint DH_MutatorExample.u -mod=darkesthour

You will now see a new DH_MutatorExample.int in the \RedOrchestra\System directory. You will have to move this to your \DarkestHour\System\ directory.