Difference between revisions of "Unreal II UCC"

From Oldunreal-Wiki
Jump to navigation Jump to search
(Finished)
Line 1: Line 1:
{{For | the commandlets present in ''Unreal'', ''Return to Na Pali'' and ''Unreal Tournament'' | Commandlet | the commandlets present in ''Unreal II'' }}
'''UCC''', the Unreal Code Compiler (or UnrealOS Execution Environment) that comes with '''Unreal II''', has some functionality not present in any other Unreal Engine games. This page lists the known functionality of it.
'''UCC''', the Unreal Code Compiler (or UnrealOS Execution Environment) that comes with '''Unreal II''', has some functionality not present in any other Unreal Engine games. This page lists the known functionality of it.



Revision as of 00:12, 6 April 2021

This article is about the commandlets present in Unreal II . If you're looking for the commandlets present in Unreal, Return to Na Pali and Unreal Tournament , you might want to check Commandlet .

UCC, the Unreal Code Compiler (or UnrealOS Execution Environment) that comes with Unreal II, has some functionality not present in any other Unreal Engine games. This page lists the known functionality of it.

UCC is a raw UnrealScript environment for executing commandlets. These commandlets are essentially small programs, usually written in UnrealScript. They are executed by running UCC from a terminal:

UCC <commandlet> [-option] [parameter=value]

There are a variety of commandlets included in Unreal II, each having different functionality, and some of the functionality differs from other Unreal Engine games.

Commandlets

AnalyzeContentCommandlet

Description

Analyses a map.

Usage:

ucc analyzecontent mapname

Parameters:

  • mapname - Path to a map file. Relative to the location of UCC.

Uses

Unfortunately, this commandlet is mostly broken. If you use it on a regular map, you get a General Protection Fault:

General protection fault!

History: UDXTConvertCommandlet::Main

Exiting due to error

It seems to relate to another commandlet that handles textures. The only time the AnalyzeContent commandlet seems to work is if the level contains only particular types of textures. If you try and analyse CS_Titles.un2, you get some statistics:

>ucc analyzecontent ..\Maps\CS_Titles.un2


Package CS_Titles.un2...


Texture Stats

   30  RGBA textures consuming        2290 KByte in video memory
   57  PAL8 textures consuming         911 KByte in video memory
    8  DXT1 textures consuming        1042 KByte in video memory
    5  DXT3 textures consuming        1600 KByte in video memory
   24  DXT5 textures consuming       14180 KByte in video memory

  124 total textures consuming       20023 KByte in video memory


StaticMesh Stats

    9 static meshes with a total of  35601 triangles
 3955 average triangles per mesh
    2 average sections per mesh


Sound Stats

   28 sounds consuming a total of     2677 KByte in memory
   95 average KByte per sound


Success - 0 error(s), 0 warnings

Maps that the AnalyzeContent commandlet can analyse include CS_Titles, Entry, PA_Acheron, PA_Hell, PA_Janus, PA_Sanctuary, PD_Acheron, PD_Avalon, PD_Hell, PD_NaKoja, PD_Sanctuary and PD_Sulferon. It seems that it's because these cinematic maps have hardly any real walls with textures applied to them.

ArrayTest

Description

Tests all of the features of dynamic arrays currently known. Also good if you're interested in how you can use dynamic arrays.

Usage:

ucc ArrayTest (no parameters)

Uses

This commandlet doesn't have the usual 'Commandlet' suffix, so in order to use it, you have to execute it using the full reference. It always outputs the same text:

>ucc core.arraytest
=======================================
ucc.exe: UnrealOS execution environment
Copyright 2001 Epic Games Inc
=======================================

Executing Class Core.ArrayTest
ArrayTest Transient.ArrayTest0 (Function Core.ArrayTest.RegularTests:0090) Accessed array 'TestArray' out of bounds (5/2)
ArrayTest Transient.ArrayTest0 (Function Core.ArrayTest.RegularTests:00DF) Accessed array 'TestArray' out of bounds (6/6)
ArrayTest Transient.ArrayTest0 (Function Core.ArrayTest.InsertRemoveTests:00D5) Accessed array 'TestArray' out of bounds (3/3)
ArrayTest Transient.ArrayTest0 (Function Core.ArrayTest.InsertRemoveTests:0105) Attempt to remove elements 0 through 5 in an 5-element array
ArrayTest Transient.ArrayTest0 (Function Core.ArrayTest.InsertRemoveTests:011C) Attempt to remove element 0 in an 0-element array
ArrayTest Transient.ArrayTest0 (Function Core.ArrayTest.InsertRemoveTests:0152) Attempt to remove element 1 in an 0-element array
ArrayTest Transient.ArrayTest0 (Function Core.ArrayTest.NestedTests:000F) Accessed array 'OuterArray' out of bounds (0/0)
ArrayTest Transient.ArrayTest0 (Function Core.ArrayTest.NestedTests:000F) 0.623 Attempt to assign variable through None (line 0)
ArrayTest Transient.ArrayTest0 (Function Core.ArrayTest.NestedTests:002B) Accessed array 'OuterArray' out of bounds (0/0)

This is perfectly normal, if you view the script of this commandlet. It demonstrates a variety of ways to use dynamic arrays in Unreal Engine 2 (none of which are unique to Unreal II, it seems).

AssetCullingCommandlet

Uses

This commandlet doesn't have any help associated with it, but it seems to be automatic. It goes through all of the assets in the game - maps, sounds, static meshes etc. and saves them into directories with a New prefix. You need to create those directories manually first, or else the commandlet crashes. The newly generated assets seem to be smaller - it seems that the commandlet drops any unreferenced assets from the packages, reducing their size. For instance, the combined size of the static meshes decrease by 11 MiB after culling. So it appears to be a way to clean up packages of any unwanted elements, albeit in a somewhat destructive way.

Note that this commandlet is not part of the standard commandlets, therefore you need to specify the whole reference to it in order to run it:

>ucc editor.assetcullingcommandlet

AudioPackageCommandlet

Description

Syntax:

ucc editor.audiopackage sourcedirectory

The source directory is relative to the location of UCC.

Uses

Once again there is no help for this commandlet, and it is a non-standard commandlet. This one is rather useful, however - it's an automated sound package generator. If you specify a directory with .wav files in it, this commandlet will build an .uax file with those Wave file imported. For instance, if you create a directory Unreal2/MySounds, and put files SoundA.wav and SoundB.wav in it, then use this commandlet, you will get a MySounds.uax file generated in the Unreal2/Sounds directory, and it will contain your two files. If you want to place the sounds into different groups, you can place the .wav files in subdirectories, and they will be treated as groups. Here's an example of the output using this:

>ucc editor.audiopackagecommandlet ..\MySounds
Created group package GroupA
Imported ..\MySounds\GroupA\SoundA.wav as Sound MySounds.GroupA.SoundA
Created group package GroupB
Imported ..\MySounds\GroupB\SoundB.wav as Sound MySounds.GroupB.SoundB
Package file ..\Sounds\MySounds.uax saved successfully
Success - 0 error(s), 0 warnings

BatchExportCommandlet

Description

Export objects in bulk.

Usage:

ucc batchexport package.ext classname export_ext path

Parameters:

  • package.ext - Package whose objects you wish to export.
  • classname - Class of object to export.
  • export_ext - File extension to export to.
  • path - Path to export files to, like c:\MyPath.

Uses

This is the usual BatchExport commandlet, you can see more information about it on the Unreal Engine wiki. However, there are changes specific to Unreal II.

  • You can't export levels with it as OBJ or STL (there is no obj exporter, and the stl exporter produces invalid results). You can do that with the T3D exporter, though.
  • You can export LegendMeshes as T3D by passing the .ugx files to this commandlet. However, it's not of much use, since it only produces their names in the generated T3D files. The syntax is this:
>ucc batchexport ..\Meshes\GlmCharactersG.ugx LegendMesh t3d ..\ExportDirectory

ChecksumPackageCommandlet

Uses

This is another non-standard commandlet. It calculates a checksum for the input file. Despite the name, it works on any files, not necessarily Unreal packages. Here's an example:

>ucc editor.checksumpackagecommandlet ..\System\Unreal2.ini
..\System\Unreal2.ini checksum: b47888e6df6c8fd6170a48cb3a699f31

CheckUnicodeCommandlet

Uses

Another non-standard commandlet, this one tries to find any characters in a file, then reports how many of them were found in total. It seems to be able to find characters in many different encodings, and even in binary files. Here's a usage example:

>ucc editor.checkunicode ..\System Unreal2.ini
Checking: ..\System\Unreal2.ini
<...>
Found Character: 10
Found Character: 13
Found Character: 10
0: 79
Total Characters: 79
Total Pages: 1
Success - 0 error(s), 0 warnings

You can also use wildcards in the filename.

CompressCommandlet

Description

Compress an Unreal package for auto-downloading. A file with extension .uz will be created.

Usage:

ucc compress File1 [File2 [File3 ...]]

Parameters:

  • Files - The wildcard or file names to compress.

Uses

This is the standard Compress commandlet, see more about it on the Unreal Engine wiki. Not very useful in Unreal II, since it has no networking support. Interestingly enough, it creates .uz, and not .uz2 files.

ConformCommandlet

Description

Generate conforming binary files.

Usage:

ucc conform existing_file.ext old_file.ext

Parameters:

  • existingfile.ext - Existing binary file to load, conform, and save.
  • oldfile.ext - Old file to make source file binary compatible with.

Uses

Another standard commandlet with not a lot of uses. It could solve some network compatibility problems, but Unreal II has no network support, so they are irrelevant.

ConvertMaterialCommandlet

Uses

A non-standard commandlet. It works very similarly to the AssetCulling commandlet, as it goes over all the assets, and then creates new packages in directories with the New prefix that has to be created beforehand. It also reduces the file size and removes unused parts. It is uncertain what differences there are between the two commandlets. Judging by the name of this commandlet, it should convert some materials, but it is uncertain what they could be.

Example usage:

>ucc editor.convertmaterialcommandlet

DataRipCommandlet

Description

Create a package with Texture, Music and Sound data ripped out.

Usage:

ucc datarip srcpackage.ext dstpackage.ext

Parameters:

  • srcpackage.ext - Source Package
  • dstpackage.ext - Destination Package

Uses

A standard commandlet. Of very limited use. See the Unreal Engine wiki for more details.

DecompressCommandlet

Description

Decompress a file compressed with ucc compress.

Usage:

ucc decompress CompressedFile

Parameters:

  • CompressedFile - The .uz file to decompress.

Uses

Another standard commandlet, does the opposite of UCC Compress. See the Unreal Engine wiki for more details.

DXTConvertCommandlet

Description

Convert DXT3/5 textures to DXT1/RGBA.

Usage:

ucc dxtconvert srcpath destpath

Parameters:

  • srcpath - Path containing source files
  • destpath - Path for destination files

Uses

Can be used for batch converting DXT5 and DXT3 textures to DXT1 textures. Useful for processing large amounts of data.

HelloWorldCommandlet

Sample 'hello world' commandlet.

Usage:

ucc HelloWorld (no parameters)

Parameters:

  • IntParm - An integer parameter
  • StrParm - A string parameter

Uses

An example commandlet. Prints Hello, world!, and, if you supplied any parameters, Command line parameters=<parameters>. Useful as an example when creating custom commandlets (as most of the builtin commandlets are not available through UnrealScript).

MakeCommandlet

Description

Rebuild UnrealScript packages.

Usage:

ucc make [-option...] [parm=value]...

Parameters:

  • Silent - No prompts; assume "yes" to all questions
  • NoBind - Don't force native functions to be bound to DLLs
  • All - Clean rebuild (otherwise rebuild is incremental)

Uses

This is probably the most often used commandlet in any Unreal Engine game, as it compiles the UnrealScript code from source to a code package. See more information about it on the Unreal Engine wiki.

This commandlet has received quite a few additions in Unreal II. First and foremost, it no longer functions only as an UnrealScript compiler, but also as a Golem compiler. Even without any options, the Make commandlet rebuilds all of the Golem assets (textures and meshes, outputs with a prefix "Glm" and suffix "T" or "G" respectively). Running this commandlet is required for any texture or mesh reference related changes in the Golem Editor to take effect.

Interestingly enough, a Makefile used by Legend Entertainment with the filename System.mak has been left in the System directory of the game. It is a more convenient way of using UCC Make, but more importantly, it shows a few undocumented parameters that can be passed into the Make commandlet:

  • -nogolem - Prevents UCC from rebuilding Golem packages.
  • -uccdebugcode - Enables UCC debug code. Unclear what this does in practise.
  • -noloadwarn - Presumably disables warnings about package loading.
  • -lineinfo - Shows information about which line the error occurred on.
  • -donesound - Plays a sound after UCC completes all its tasks.

MapConvertCommandlet

Description

Converts Maps from old format to new (no brush transforms).

Usage:

ucc mapconvert SrcFilename DstFilename

Parameters:

  • SrcFilename - The map filename to read from.
  • DstFilename - The map filename to write to.

Uses

It is unknown what maps are considered to be old format. The commandlet crashes if an Unreal map is passed to it.

MasterCommandlet

Description

Build master installer files.

Usage:

ucc master [-option...] [parm=value]...

Parameters:

  • MasterPath - Root directory to copy source files from
  • SrcPath - Root directory to copy source (release) files to
  • RefPath - Path for delta-compressed path reference

Uses

Can be used to build U2MOD installer files. See UDN UMOD Installer page for more information.

MasterServerCommandlet

Description

Maintain master list of servers.

Usage:

ucc masterserver [-option...] [parm=value]

Parameters:

  • ConfigFile - Configuration file to use. Default: MasterServer.ini

Uses

Unused, since Unreal II has no network support and no server browser.

PackageFlagCommandlet

Description

Set package flags in package files.

Usage:

ucc packageflag src.ext [dest.ext <+|->flag [<+|->flag] ...]

Parameters:

  • src.ext - Existing package file to load
  • dest.exe - Name of new package file with the new flag settings
  • flag - "+" to set a flag, or "-" to remove a flag, followed by one of:
    • AllowDownload
    • ClientOptional
    • ServerSideOnly
    • BrokenLinks
    • Unsecure

Uses

Once again related mostly to network support that Unreal II lacks.

PkgCommandlet

Description

Imports/Exports data to/from packages using directory structures.

Usage:

ucc pkg [import/export] [texture/sound] [packagename] [directory]

Parameters:

  • import/export - What you are attempting to do with the data
  • texture/sound - The type of package you are working with
  • packagename - The package you are creating/exporting from
  • directory - The directory to read from/write to

Uses

Seems to crash with Error saving 'Golem.u'; unrecoverable error - bombing out every time. Use BatchExportCommandlet and AudioPackageCommandlet instead.

PkgListCommandlet

Uses

Same as the PkgCommandlet above, crashes with the same error. This is a non-standard commandlet, however, and has to be invoked using the command ucc editor.pkglist.

ServerCommandlet

Description

Network game server.

Usage:

ucc server map.unr[?game=gametype] [-option...] [parm=value]...

Parameters:

  • Log - Specify the log file to generate.
  • AllAdmin - Give all players admin privileges.

For more info, see http://unreal.epicgames.com/servertips.htm

Uses

This commandlet crashes with the following error:

Critical: UObject::ProcessEvent
Critical: (EngineLevelListInfo <MapName>.EngineLevelListInfo0, Function Engine.Actor.PreBeginPlay)

That is mostly the cause of the lack of network support in Unreal II.

SimpleCommandlet

Uses

Much like the HelloWorldCommandlet, it is an example commandlet. It takes no parameters and is non-standard, yet available in UnrealScript. This is how you call it and its output:

>ucc core.simple
=======================================
ucc.exe: UnrealOS execution environment
Copyright 2001 Epic Games Inc
=======================================

Executing Class Core.SimpleCommandlet
Simple commandlet says hi.
Testing function calling.
Function call returned 666
Testing cast to int.
Temp is cast from 3.000000 to 3
Testing min()
Temp is min(32, 666): 32
3 is a woo
otherstring: alker

UpdateServerCommandlet

Description

Service Unreal Engine auto update requests.

Usage:

ucc updateserver [-option...] [parm=value]

Parameters:

  • ConfigFile - Configuration file to use. Default: UpdateServer.ini

Uses

Once again useless due to the lack of network support.

UpdateUMODCommandlet

Uses

Presumably updates an existing UMOD archive created with the MasterCommandlet. The usage should be identical, except that the first parameter is a reference to an existing UMOD file. Non-standard, so the usage is ucc editor.updateumod.