Compiling With UCC
UCC is the UnrealScript compiler. This page explains how to compile with the ucc make command. As an alternative, you may want to consider using UMake, which makes the whole thing much simpler.
Compiling
So, you've spent some time lovingly crafting your mod using well laid out, commented, and maintainable Unreal Script. You have done the decent thing and placed your .uc class files in /UnrealTournament/YourModPackage/Classes. The big moment approaches - will it compile first time?
Well, there's only one way to find out, and that's to do it. At the very least you need to edit your Game Ini File and add your package name to the list of editable packages. Search the ini file for a list of lines starting with EditPackages. Add your package to the bottom of the list like so:
EditPackages=YourModPackage
Save the changes. You will now be able to compile your mod using the following command:
ucc make
By default this command examines all of the EditPackages lines searching for packages which have no corresponding .u (a compiled package file) files and attempts to compile them. If you have previously built YourModPackage and you have updated the code the build command will not recompile your package unless your first delete it. It's well worth creating a small batch file to do this for you, e.g.
cd C:\UnrealTournament\System del YourModPackage.u ucc make
One of the things that's really easy to forget is the INT file associated with your new package. This file defines the public classes in the package. Look in any of the INT files for examples of this. Remember to include the [Public] directive at the top of the file though or your mod won't be visible in the UT front end. It's worth keeping a copy of your INT file in the /UnrealTournament/YourModPackage directory so you don't lose it and always have an up to date version.
Tips
To reduce compile time, create the following:
- An ini file, named for example MyProject.ini. Copy UnrealTournament.ini or UT2003.ini and only include those EditPackages entries that your classes depend on.
- Make a batch file that reads:
ucc make ini=MyProject.ini
Note that to see output you'll still have to run it from the command prompt. (UMake does all that automatically for you and stores an .ini file called make.ini in your project directory.)
Batch File
When I still used UCC Make I made a batch file that looked like this:
COPY MyMod.U *.U_Backup DEL MyMod.U UCC MAKE PAUSE
This backs up your U file, deletes it, recomiles it, and then PAUSE, "press any key to continue". This combined with the INI said above here could make a very nice way to compile.
Related Topics
- Setting Up UnrealScript
- Compiler Errors
- UMake – convenient "ucc make" wrapper tool.
- Set Up Package Folders