PDA

View Full Version : Code reading problem



legacy-q03
07-13-2005, 02:35 PM
I am trying to make a gun for UT04 but don't know much about coding. I have found, downloaded, and installed several simmiler gun mods so I could study their codes to see how it is done.

My problem is that I can't figure out how to open the .u files to look at the codes. I have tried context but it only shows the squairs that text programs show when unknown characters are used in a file. I have tried looking for the files in UED but can't find anything other than the standerd items that came with the game.

Could someone help me figure out how read the code?

Edit: I almost forgot to mention that the files that I downloaded for the guns contained a .u file, 2 .ini files(which I can read but don't help with what I want to do), and a .uz2 file(contains the same jibberish as the .u when opened).

legacy-ghouck
07-13-2005, 03:26 PM
http://www.ataricommunity.com/forums/showthread.php?threadid=472725&highlight=extract

The search button is your friend

legacy-q03
07-13-2005, 03:38 PM
Ok. If the code is not in the .u or the .ini files it must be in the .uz2 file.

How do I open a .uz2 so that I can see the code?

The mods didn't come with a .ucc file that the other thread said to look in but they still work.

legacy-ghouck
07-13-2005, 05:25 PM
Also, re: exporting the stuff from a .U file, I really like WOTgreal Exporter, found at http://www.wotgreal.com/ under the Downloads section.

Hsoolien
07-13-2005, 10:37 PM
Originally posted by q03
Ok. If the code is not in the .u or the .ini files it must be in the .uz2 file.

How do I open a .uz2 so that I can see the code?

The mods didn't come with a .ucc file that the other thread said to look in but they still work.

UCC comes with Unreal (in the system folder) and can be used to uncompress .uz2 (UCC decompress *.uz2)

Then you use the UCC batchexport, or get wotGreal or UDE and use it's built in code extractor (not reccomended for extracting the main game code, get the latest code drop on http://udn.epicgames.com , search for ut2004 source files)

legacy-q03
07-14-2005, 01:47 AM
Now the UCC comments are starting to make some since! The way the other post were worded made it sound like the code for the mods was supposed to be in a .ucc file that came with the mods I could just read.

How do you use the UCC application to extract the code? I tried running it but it didn't do anything usefull. It opened a command prompt for a minute then shut down after generating a log file that didn't tell me anything I needed to know.

I tried useing the UDE program but it won't recognise my UT04 installation as being valid. I reinstalled but I still have the same error come up when I run it.

Hsoolien
07-14-2005, 10:49 AM
You reinstalled UT2004, or UDE? cause if you have regiistry issues, UDE doe snot work...

and UCC needs to be run int he command prompt, else it just runs and shuts itself down... ucc help is a good plce to start

legacy-S3Y3N
01-11-2006, 11:59 PM
Just as a helpful hint, since I had to figure it out myself thru long difficult searching, heres how to decompress the .uz2 files using UCC (ucc.exe):

1. start -> run -> cmd prompt (cmd.exe)
2. locate your system directory for ut2004 as such:
type "cd c:\ut2004\system" or wherever its located
3. now type correct syntax to decompress the file as such:
type "ucc decompress example.u.uz2"

Voila! Hope that helps. Helped me when I needed to play a demo, and perhaps saves some time for someone searching about this in the future.:up:

Xyx
01-12-2006, 01:02 PM
I use ConTEXT for reading .u files, and it works fine. You just need to scroll down a bit to where the code is (or Ctrl+F for " extends "). You won't see the defaultproperties, though.

legacy-Thisticstic
01-17-2006, 03:18 PM
Much better help go to http://wiki.beyondunreal.com/wiki/BatchExportCommandlet

So open cmd, go to the ut2004\system directory, run "ucc batchexport filename class uc ..\filename\classes" where filename is the name of the .U file without the .u extension for instance in the UnrealWiki example they use "ucc batchexport Engine class uc ..\Engine\Classes" .. this would unpack the Engine.U file (please note the Engine.u file is in the System directory, as should be the .u file you are trying to export which it will if you have 'installed' the mod) supplied with UT2004 into C:\Ut2004\Engine\Classes

This is so much simpler than all this other rubbish people are muttering about getting massive programs that do all this crap and probably end up using the same method with some pretty little graphical user interface. It is also much easier than scrolling through the .u file with a text editor trying to find the start of each class and not seeing defaultproperties.

Hope that helps. Good luck mate.

legacy-BalticSailor
01-18-2006, 10:09 AM
BTW, if you want to do things in UCC more often (and if you`re working with Uscript you just have to), make a batch file for fast navigation to your UT2004 folder.
To do so, open Notepad, type cmd cd %1, then save it as Something.bat in your UT2004/System folder (where the ucc is located). Then you can just run that file and it`ll open command prompt in the right folder.
Saves up a lot of typing...

legacy-modma
02-08-2006, 04:04 PM
uz2 unpacker for win32 (uz2unpack) for maps & mods of unreal tournament 2003/2004

i'm port this utility from linux to windows

have fun:

http://modma.iespana.es/modma/uz2unpack/uz2unpack_win32.htm

ModMa ;)