Exporting Classes
There are several ways to export classes. This tutorial will explore the most common methods.
Ucc BatchExport
Exporting classes using Ucc is very simple. Open up a new DOS command window Start>Run>Type cmd in the Open drop down menu and click OK. Navigate to your UT2004\System folder. The Ucc command is "ucc batchexport <name and if needed, the location of the .u file> <type of file> <file extension> <export path>". So for example, if you wanted to export the ExplodeBunny.u file from the UT2004\System folder to the folder UT2004\ExplodeBunny\Classes the command would look like this:
If done correctly the window should display a list of the exported classes and a success message.
If the export path paramter is omitted then the .uc files will be exported to the UT2004\System folder by default.The Ucc BatchExport command can be used to export many resources. Animation related files (.psk, .psa, .3ds, vertmeshes, skeletalmeshes) cannot be exported. For a full list of what can be exported and a more in-depth explanation about the batchexport command read the BatchExportCommandlet page on the Unreal Wiki.
Unreal Editor Export
You can export classes through the editor. To do this you must first open the .u file in the Actor browser. Then select Export All Scripts from the Actor browser>File menu. This will also export all of the packages in your UT2004.ini file that are listed in the EditPackages section, under the [Editor.EditorEngine] heading and any packages they rely on.
Don't forget to open the package first, if it isn't in your edit packages list.
UT Package Tool
UTPT can also be used to view and decompile code. Simply open the desired .u file in UTPT. Right click the class in the class list and click Decompile. The decompiled class should appear on the right hand side. Simply click the Save button at the top to save the .uc file.
WOTgreal Package Tool
The WOTgreal Package Tool can be used to view and extract resources, including .uc files from packages. Open the desired package in WOTgreal. Make sure "Classes" button is selected to view any classes that might be in the package. Select all of the .uc files you wish to export/decompile. Then click the Export To .uc button or the Decompile To .uc file button. By default the Export Path should be the UT2004 base directory. The .uc files should be saved to a folder of the same name as the package. If the folder doesn't exist it will be created.
