UnrealScript Development


03/07/02
I just customized the well known UT Reporter mod, fixing the color codes and making the output more useful. Get the original version here, and copy our version over it.

Here is the Chat Logger package, source and compiled .u. This script came from the Admin Page, and simply logs all player chats to the system logs. I compiled this using WINE under Linux.


11/12/01
Here is an example, with source, of subclassing the Damage Amplifier (UDamage), changing its properties, and using a mutator to insert this new class into a game.


How can I export/compile .uc class files using the Linux version of ucc?

A: Short answer: you can't. There's apparently a bug that was left in the Linux version of ucc, that causes it to fail with a bogus reason ("Cannot create directory" when the dir either doesn't exist or already exists). Now that Loki's dead, it's very unlikely that this bug will ever be fixed. (I'm all ears if you figure out a solution.)

If it worked, the proper command line would be the following:

$ ./ucc-bin batchexport de.u class uc . -nohomedir

where "de.u" is the compiled object you wish to extract data from, "class" is the type of data you wish to extract (you can also extract other types), "uc" is the extension that the extracted files should have, and "." is the directory you'd like the files to be extracted to.

However, if you have WINE on your system, the problem can be worked around by running the Windows version of ucc.

$ wine ./ucc.exe batchexport de.u class uc y:\\

where "y:\\" is your configured home directory under WINE. You must use both backslashes; the first one escapes the second one.

To compile a package, assuming it is in /ut/MyPackage:

$ wine ./ucc.exe make ini=build.ini

where build.ini is your custom ini with an "EditPackages=MyPackage" line. You should also probably comment out all the other EditPackages that you aren't recompiling and that your new build doesn't depend on.

Obviously, you will need write access to the UT directory to do this; and WINE won't run as root. So you'll have to mount the partition as a user, or copy all the Windows UT files over to your home directory.

Yeah, it's nasty, but it seems to work. Shrug. Live with it. At least you don't have to reboot to write 5 lines of code now.

Q: How can I use ucc to compress or decompress files in Linux?

A: It's sort of a pain. You must include the complete path name, and the '-nohomedir' option. From Abfackeln's FAQ:

Compression:

$ ./ucc compress /usr/games/ut-server/Maps/DM-Barricade.unr -nohomedir
Decompression:
$ ./ucc decompress /usr/games/ut-server/Maps/DM-Barricade.unr.uz -nohomedir
$ mv System/DM-Barricade.unr Maps

The basic problems are:

However, it works for the most part, so deal with the problems and write scripts to get around the rest.


Since the Linux version of UT includes a ucc program, in which the "extract" function is non-functional (and thus you cannot decompile UT progs), I extracted all of the sources for the base UT classes. You can download this file here.

I've provided an example build ini that you can download here: ut-mod-build.ini. This is the ini that I use to build all my custom packages.

Remember that you must DELETE the compiled object for any package that you wish to rebuild, or the compiler will skip right over it without an error!