[HOWTO] (Re)Compile .U Files

Tutorials for the UnrealEd(itor) 2.5, which apply to LOTD, UT2003 and UT2004, and other games based on the same Engine.
User avatar Romania
Dragosvr92
Administrator
Administrator
Posts: 1128
Joined: 11 Sep 2009, 06:04
Name: Dragoș-Valentin Rădulescu
Location: Romania
Age: 32
Contact:

[HOWTO] (Re)Compile .U Files

Post by Dragosvr92 »

Here are the basics of Compiling and Decompiling .u files.
For this tutorial it will help if you have a basic knowledge of using the Command Prompt.

If you run lotd on Windows newer than WinXP, UCC.exe wont work. To fix it you can, Load game, Go to Settings/Audio Settings/Music Volume and set the Volume to 0 (zero). You can do the same thing by opening LOTD.ini, find Music volume, and set it to 0. Or you can use the Unrealed Patch for Vista7 which will replace the Core files. You have to open&close the Editor before using UCC. Otherwise, UCC.exe wont work.


Index of contents:
  1. Decompiling the .u files into .uc
  2. Compiling them back into .u files
  3. Bonus Tips

Decompiling the .u files into .uc :
To decompile an .u file you will have to open Notepad and copy/paste in the following command for example.

Code: Select all

UCC BatchExport DOTZCharacters.u class .uc C:\LOTD\Classes\DOTZCharacters
Now go to File/Save as and name the file BATCHExport.bat It can be any name. But it needs to have the .bat extenion. and save it to your LOTD System folder.

Oke, now you can Double-click the file you created. It will open a window for a second, and the .uc file contents of DOTZCharacters.u will be found inside C:\LOTD\Classes\DOTZCharacters. You can add PAUSE at the end of the line for the window not to automatically close after it finishes decompiling.

The .uc files you will see can be loaded and edited with Notepad. You will have to figure out how to do the scripting changes yourself.

Right click and Edit the BATCHExport.bat to change the name of the .u file you want decompiled and the path where you want it extracted at. You can add as many lines as you want, to decompile multiple .u files.
Compiling them back into .u files:
  1. After you modified your .uc files, you will want to compile them back into a new .u file.
    To do that, your .uc files will have to be placed like this LOTDROOT/NAME-OF-U-FILE/CLASSES/UC-FILES-HERE
    Example: C:\Program Files\Groove Games\Land Of The Dead\TKDOTZCharactersV1\Classes\*.uc

    You can just extract any .uc files directly into that path, so you wont have to move them later.
    Ok. We are done with this.
  2. Now you need to go to the System folder and load the UW.ini file in Notepad.
    Find the EditPackages=DOTZMenu line, and after that line, add a new one, for example EditPackages=TKDOTZCharactersV1
    Save and close the file.
  3. Now, for the very last step you will need to create a new .bat file with the following text inside:

    Code: Select all

    UCC MAKE
    PAUSE
    Save it in your System folder as UCCMAKE.batOr whatever name you wish to give it..
    Now double click the file to run it and it will compile your Project back into a new .u file.
The pause line is important because the window closes automatically and we dont have enough time to see the results.
For example if it compiled it successfully and if there were any errors. The text results in the Batch window can be seen in the UCC.log later.

BonusTips:
If you name all your mod files (ukx, usx, utx, etc) the same, all contents will be put into the one .u file. You should keep all files though, in case you ever want to recompile the .u file. If you didnt keep them, you can use Dragon Unpacker to extract the textures from the .u file, or export them via the editor.
If the .u file has many .uc files, but you just want to modify a single .uc file, in your new .u package you will just include that one package. But you will have to specify both files in your UW.ini file. The original .u file above the new one.

This will help in reducing space and time making your new file, and also avoid this error:

Code: Select all

Critical: appError called:
Critical: Can't find files matching ..\YOUR_U_FILE\Classes\*.uc
Exit: Executing UObject::StaticShutdownAfterError
Exit: UALAudioSubsystem::ShutdownAfterError
Critical: UMakeCommandlet::Main
Exit: Exiting.
  • The Batch files are the easiest way to mod for LOTD imho. But you can also run them via Command Prompt as follows.
  • Open CMD.
  • Type the path to your LOTD System folder, but with CD Change Directory in front of it.
    For Example: CD C:\Program Files\Groove Games\Land Of The Dead\System
  • Now you can run commands like UCC MAKE etc.

    If you have your game installed on a partition other than C:// you will have to type the letter of the partition and a collon. F.e, D:
    Now, you can type the path to your system folder.

Can read more about the ucc function over here: https://wiki.beyondunreal.com/Legacy:Compiling_With_UCC

I recommend you use Notepad++ instead of the simple Notepad that comes with Windows. It is better and used by many Programers.

PS: If you are going to modify someone's mod, please ask them for their permission first.
Usually i think all will agree to remake it, but it is nice asking for permission and letting them know their work was reshaped.
Also, please avoid releasing bugged files.


That is about all i know about creating a mod.
I am looking forward to see what others may do with this information ! :)

Good luck.
Last edited by Dragosvr92 on 17 May 2016, 07:49, edited 1 time in total.
Formerly known as TheKiller
User avatar Canada
Puppy Wehtam
Server Admin
Server Admin
Posts: 218
Joined: 11 Mar 2011, 05:52
Location: On Easy Street
Age: 33

Re: [HOWTO] (Re)Compile .U Files

Post by Puppy Wehtam »

Thank you, this is awesome and I'm glad you did this. :)
Image
Mapper, Server Owner (Puppy's Zomdemic)
User avatar China
sjc26
Infected
Infected
Posts: 23
Joined: 16 Aug 2015, 03:45

Re: [HOWTO] (Re)Compile .U Files

Post by sjc26 »

Cool!
But when i run UCC,the cmd is open,and it just get stuck on my WIN7,i must close ucc.exe by task manager if i want end this program,you have any ideas that can solve this problem?
User avatar Mexico
Marcus Vázquez
LOTD Modder
LOTD Modder
Posts: 124
Joined: 25 Apr 2014, 17:13
Name: Marcus Vázquez
Location: México
Age: 27

Re: [HOWTO] (Re)Compile .U Files

Post by Marcus Vázquez »

sjc26 wrote:Cool!
But when i run UCC,the cmd is open,and it just get stuck on my WIN7,i must close ucc.exe by task manager if i want end this program,you have any ideas that can solve this problem?
You don't need to run the "UCC.exe"
It is there to make work the cmd, i don't know how to explain it in english because it is not my born leanguage so i don't know some words :l

But that is all you need to know, it is there to make work the cmd itself.
If you want to go fast, go alone. If you want to go far, go together.
User avatar China
sjc26
Infected
Infected
Posts: 23
Joined: 16 Aug 2015, 03:45

Re: [HOWTO] (Re)Compile .U Files

Post by sjc26 »

You don't need to run the "UCC.exe"
It is there to make work the cmd, i don't know how to explain it in english because it is not my born leanguage so i don't know some words :l

But that is all you need to know, it is there to make work the cmd itself.
But i want export .u to .uc,man.So i need CMD to run commands successfully...Now whatever it is "UCC" or "UCC BatchExport DOTZCharacters.u class .uc E:\SSDA\DOTZCharacters",it doesn't work. :((
User avatar China
sjc26
Infected
Infected
Posts: 23
Joined: 16 Aug 2015, 03:45

Re: [HOWTO] (Re)Compile .U Files

Post by sjc26 »

Onix_Marcus wrote:You don't need to run the "UCC.exe"
It is there to make work the cmd, i don't know how to explain it in english because it is not my born leanguage so i don't know some words :l

But that is all you need to know, it is there to make work the cmd itself.
WOW,i got it.Replace LOTD's core.dll with DOTZ's core.dll ...DOTZ always amazing! :))
Last edited by sjc26 on 17 May 2016, 04:02, edited 2 times in total.
User avatar Romania
Dragosvr92
Administrator
Administrator
Posts: 1128
Joined: 11 Sep 2009, 06:04
Name: Dragoș-Valentin Rădulescu
Location: Romania
Age: 32
Contact:

Re: [HOWTO] (Re)Compile .U Files

Post by Dragosvr92 »

Glad you figured it ! :)
You can just try DeepImpact's Export tool. It is easier to use. LOTD-UC-Exporter
Formerly known as TheKiller
User avatar China
sjc26
Infected
Infected
Posts: 23
Joined: 16 Aug 2015, 03:45

Re: [HOWTO] (Re)Compile .U Files

Post by sjc26 »

Thanks man!
User avatar Romania
Dragosvr92
Administrator
Administrator
Posts: 1128
Joined: 11 Sep 2009, 06:04
Name: Dragoș-Valentin Rădulescu
Location: Romania
Age: 32
Contact:

Re: [HOWTO] (Re)Compile .U Files

Post by Dragosvr92 »

You are welcome. You can also just turn the MusicVolume to zero, without needing the Core files. I made some edits about this in the main post. Thank you for alerting me about it. I didnt think to specify the UCC doesnt work in Windows versions higher than WinXP.
Formerly known as TheKiller
User avatar Mexico
Marcus Vázquez
LOTD Modder
LOTD Modder
Posts: 124
Joined: 25 Apr 2014, 17:13
Name: Marcus Vázquez
Location: México
Age: 27

Re: [HOWTO] (Re)Compile .U Files

Post by Marcus Vázquez »

Dragosvr92 wrote:You are welcome. You can also just turn the MusicVolume to zero, without needing the Core files. I made some edits about this in the main post. Thank you for alerting me about it. I didnt think to specify the UCC doesnt work in Windows versions higher than WinXP.
it works, i have your patch and it works, it helped me a lot with the servers that im running, as you said, the only issue is turn off the music.
If you want to go fast, go alone. If you want to go far, go together.
Post Reply