Commandlet

From Oldunreal-Wiki
Jump to navigation Jump to search

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

In this page we're going to see what Commandlets are and what function each one performs.

Overview

According to the Unreal Engine documentation, "Commandlets are command line programs that run inside of the Unreal Engine environment. They are most often used to make bulk changes to content, iterate over content to get information about it, or as a unit testing mechanism. They are basically little applets that have the engine initialized but are mostly just confined to Windows console output. The engine automatically tries to see whether a command you passed on the commandline is a commandlet, and if it matches, executes the associated code."

Commandlets are executed from the ucc.exe command line utility, using the following syntax: ucc.exe package_name.commandlet_class_name [parm=value].... Each of these commandlets have their syntax and a brief explanation of what each option does. If a commandlet is ran and the exact typed isn't found, then ucc.exe appends the text "commandlet" to the name and tries again.

Commandlets can also be simplified, provided they're properly defined in Editor.int (or the respective language's version). This allows users to just type ucc server ... instead of ucc Engine.ServerCommandlet ... for example.

Availability table

The following table is a recollection of the commandlets as they appear on the different games.

Item Package Unreal v226* Unreal v227j UT v436 UT v469c UT2003 v2225 UT2004 v3369
AnalyzeBuild Editor - - - - Y Y
AnalyzeContent Editor - - - - Y Y
AudioPackage Editor - Y - - - -
BatchExport Editor Y Y Y Y Y Y
BatchImport Editor - - - - Y Y
BatchingSummary Editor - - - - - Y
BatchMeshExport Editor - Y - - - -
CheckEmitters Editor - - - - - Y
CheckSounds Editor - - - - - Y
CheckStaticMeshes Editor - - - - - Y
CheckSum Engine - - Y Y - -
ChecksumPackage Editor Y Y Y Y Y Y
CheckTextures Editor - - - - - Y
CheckUnicode Editor - Y Y Y Y Y
ClassFlag Editor - - - - - Y
CompareInt Editor - - - Y Y Y
Compress IpDrv - Y Y Y Y Y
CompressTextures Editor - - - - - Y
Conform Editor Y Y Y Y Y Y
ConvertMaterial Editor - - - - Y Y
CutdownContent Editor - - - - Y Y
DataRip Editor - Y Y Y Y Y
Decompress IpDrv - Y Y Y Y Y
DumpConfig Editor - - - - - Y
DumpFontInfo Editor - - - Y - -
DumpInt Editor - Y - Y Y Y
DumpMeshInfo Editor - Y - Y - -
DumpTextureInfo Editor - Y - - - -
DXTConvert Editor - - - - Y Y
Exec Editor - - - Y - -
ExportCache Engine - - - - - Y
ExportPackage Editor - - - Y - -
FontCompress Editor - Y - - - -
FontPageDiff Editor - Y - - - -
FullBatchExport Editor - Y - - - -
GroupRepair Editor - - - - Y Y
ListExports Editor - - - - - Y
LinkerUpdate Engine - Y - - - -
ListObjects Editor - Y - Y - -
LoadPackage Editor - - - - - Y
Make Editor Y Y Y Y Y Y
MapConvert Editor - - - - Y Y
MapKillZ Editor - - - - - Y
Master Editor Y Y Y Y Y Y
MasterMD5 Engine - - - - Y Y
MasterServer IpDrv Y Y Y Y - -
MD5 Editor - - - Y - -
MergeDXT Editor - - Y Y - -
MergeInt Editor - - - - Y Y
MusicPackages Editor - Y - - - -
ObjectRename Editor - - - - Y Y
PackageDump Editor - - - Y - -
PackageFlag Editor - Y Y Y Y Y
Pkg Editor - - - - Y -
ProdigiosumInParvo Editor - Y - - - -
PS2Convert Editor - Dis Y - Y Y
RearrangeInt Editor - - - - Y Y
Rebuild Editor - - - - Y Y
RebuildImports Editor - Y - - - -
ReduceTextures Editor - Y - - - -
ResRays Editor - - - Y - -
RipAndTear Editor - Y - - - -
SaveEmbedded Editor - Y - - - -
ScriptRays Editor - - - Y - -
Server Engine Y Y Y Y Y Y
SetNormalLOD Editor - - - - Y Y
SHAUpdate Engine - Y - - - -
SoundConvert Editor - - - - - Y
SoundLoc Editor - - - - Y Y
StaticMesh Editor - - - - - Y
Stream Engine - - - - - Y
StripSource Editor - Y - Y Y Y
SurfaceType Editor - - - - Y Y
TextureInfo Editor - - - - Y Y
TextureLOD Editor - - - - Y Y
TextureMerger Editor - Y - - - -
TextureStrip Editor - - - - Y Y
UMODUnpack Engine - - - - Y Y
UpdateServer IpDrv Y Y Y Y - -
UpdateUMOD Editor Y Y Y Y Y Y
xAdmin xAdmin - - - - Y Y
xWebAdmin xWebAdmin - - - - Y Y

Commandlet List

AudioPackage

Main article: Unreal II UCC.

  • Package: Editor
  • Syntax: audiopackage <input directory>
  • Availability: Unreal v227j.

Creates an audio package out of a directory. If you specify a directory with .wav files in it, this commandlet will build an .uax file with those Wave files imported. For instance, if you create a directory Unreal/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 Unreal/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.

BatchExport

  • Package: Editor
  • Syntax: batchexport package.ext classname export_ext [path]
  • Availability: Unreal v226* onwards, UT v436 onwards.

Exports resources from Unreal packages in bulk.

  • package.ext: Package whose objects you wish to export. Extension and directory are optional: (e.g. Botpack.u, ..\Maps\CTF-Face.unr or just CTF-Face)
  • classname: The type of objects to export from the package. It can be one of class, texture, sound, music, level, model, polys or textbuffer.
  • export_ext: Extension used for the exported files. The accepted file extensions per class are as follows:
  • class: uc, h.
  • texture: bmp, pcx.
  • sound: wav.
  • music: s3m, xm, it or any other tracker format.
  • level, model and polys: t3d. level exports the complete map with all actors and brushes; model exports all the brushes used in a map (with the red builder being Brush.t3d while the other brushes being Model##.t3d); and polys exports polygons (?) to files named Polys#.t3d.
  • textbuffer: txt. Exports all kinds of text sources in the package. Script code is exported as ScriptCode.txt for each class, so the files will instantly overwrite each other. Maps have an additional text buffer with camera settings for UnrealEd.
  • path: Path to export files to, like C:\MyPath.

BatchMeshExport

  • Package: Editor
  • Syntax: batchmeshexport <pkg> <format> <outpath>
  • Availability: Unreal v227j.

Batch exports meshes.

CheckSum

  • Package: Engine
  • Syntax: checksum packagename.u
  • Availability: UT v436 onwards

Calculates package checksum for stat logging.

  • packagename.u: Filename to calculate the checksum from.

ChecksumPackage

  • Package: Editor
  • Syntax: checksumpackage packagename
  • Availability: Unreal v226* onwards, UT v436 onwards.

Displays the checksum for the selected package file.

  • packagename: The name of the package to checksum.

CheckUnicode

  • Package: Editor
  • Syntax: checkunicode <filewildcard>
  • Availability: Unreal v227j, UT v436 onwards.

Checks if the contents of a text file contains Unicode characters.

  • <filewildcard>: The files to check for Unicode characters. Wildcards such as "?" and "*" are accepted.

CompareInt

Main article: Localization.

  • Package: Editor
  • Syntax: compareint packageint miscint
  • Availability: Unreal v227g-i; UT v469a onwards.

Compare 2 language files and delete/remove language entries that you compare with.

In Unreal, ever since v227j, this command has been fused with DumpInt, as that one generates the missing files and lines in all the languages.

  • packageint: Main language file.
  • miscint: Secondary language file (to edit).

Compress

Main article: Unreal v227 Manual/Server admin tools.

  • Package: IpDrv
  • Syntax: compress File1 [File2 [File3 ...]]
  • Availability: Unreal v227g, UT v413 onwards.

Compresses an Unreal package for autodownloading. A file with extension .uz will be created.

  • Files: The wildcard or file names to compress.

Examples of use:

ucc compress ..\maps\dk*.unr
ucc compress ..\textures\customskins1.utx ..\textures\customskins1.utx ..\maps\as-bridge.unr

Conform

  • Package: Editor
  • Syntax: conform existing_file.ext old_file.ext
  • Availability: Unreal v226 onwards, UT v436 onwards.

Generates conforming binary files. Used to make Unreal packages network-compatible.

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

DataRip

  • Package: Editor
  • Syntax: datarip srcpackage.ext dstpackage.ext
  • Availability: Unreal v227*, UT v436 onwards.

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

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

Decompress

  • Package: IpDrv
  • Syntax: decompress CompressedFile
  • Availability: Unreal v227g, UT v413 onwards.

Decompresses a file compressed with ucc compress. This commandlet doesn't support wildcards, so decompressing a complete folder can not be decompressed with something like ucc decompress *.uz. That can be very painful if you need to recover your files from a http redirect folder. For this specific task, you may need a batch or bash file.

  • CompressedFile: The .uz file to decompress.

DumpFontInfo

  • Package: Editor
  • Syntax: dumpfontinfo <pkg>
  • Availability: UT v469*.

Dumps information about fonts.

DumpInt

Main article: Localization.

  • Package: Editor
  • Syntax: dumpint packagename
  • Availability: Unreal v227f onwards; UT v469a onwards.

Dumps the language text contents out of a file.

In Unreal v227j, the command was changed. Now it prints an [ENG] string in any non-translated string of non-English localization files. This also removed the CompareInt commandlet.

  • packagename: The name of the package to dump language text of.

DumpMeshInfo

  • Package: Editor
  • Syntax: dumpmeshinfo <pkg>
  • Availability: Unreal v227j; UT v469*.

Dumps information about meshes.

DumpTextureInfo

  • Package: Editor
  • Syntax: dumptextureinfo <pkg>
  • Availability: Unreal v227j.

Prints out a detailed info about textures inside a package.

Exec

  • Package: Editor
  • Syntax: exec filename
  • Availability: UT v469*.

Executes a command file in a minimal editor environment.

ExportPackage

  • Package: Editor
  • Syntax: exportpackage packagename
  • Availability: UT v469*.

Simply exports a package contents to .uc files in prior directory.

  • packagename: The name of the package to export UC files of.

FontCompress

  • Package: Editor
  • Syntax:
  • Availability: Unreal v227j.

TO-DO: Add info.

FontPageDiff

  • Package: Editor
  • Syntax: fontpagediff <left font> <right font>
  • Availability: Unreal v227j.

Compares font pages.

FullBatchExport

  • Package: Editor
  • Syntax: fullbatchexport <pkg> <outpath>
  • Availability: Unreal v227j.

Extracts package with directory structure.

  • -DefaultFontExtension: Optional, to define export format.
  • -DefaultMusicExtension: Optional, to define export format.
  • -DefaultSoundExtension: Optional, to define export format.
  • -DefaultTextureExtension: Optional, to define export format.

LinkerUpdate

Main article: Unreal v227 Manual/Server admin tools.

  • Package: Engine
  • Syntax: linkerupdate <filename>
  • Availability: Unreal v227i onwards.

Adds all checksums of the files within the directory automatically to the file SHALinkerCache.ini. This way it should be very easy to secure and update the server also for custom packages such as textures. Note that this protection is limited to Unreal packages (no dll and exe files) and may not be able to detect newer cheats. 227i contains already the checksums of the older clients for 224,225,226b and 226f as well as some popular packages.

  • <filename>: The file to calculate the checksum for posterior storage.

ListObjects

  • Package: Editor
  • Syntax: listobjects [-switch1 [-switch2 [...]]] <package> [<baseclass>]
  • Availability: Unreal v227*; UT v469*.

Lists Objects in a package.

  • -switch1, -switch2...: Option switches, can be one or more of the following:
  • -cp: Prints pathname instead of name for Class.
  • -op: Prints pathname instead of name for Object.
  • -na: Do not align output.
  • -ni: Do not indent object hierarchy.
  • -nc: Do not display class.
  • -co: Just display Object Classes instead of each Object.
  • pkg: Package file.
  • baseclass: Optional base class of listed objects.

Make

  • Package: Editor
  • Syntax: make [-option...] [parm=value]...
  • Availability: Unreal v226 onwards, UT v436 onwards.

Rebuilds UnrealScript packages. Used to compile UnrealScript packages, mainly.

  • 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).

Master

  • Package: Editor
  • Syntax: master [-option...] [parm=value]...
  • Availability: Unreal v226 onwards, UT v436 onwards.

Builds master installer files, also known as .umod files. These files allow you to install and uninstall Unreal/UT addons in a clean way without having to worry about paths.

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

MasterServer

  • Package: IpDrv
  • Syntax: masterserver [-option...] [parm=value]
  • Availability: Unreal v226 onwards, UT v436 onwards.

Maintains a master list of servers.

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

MD5

  • Package: Editor
  • Syntax: md5 [-option Filename|Wildcard]
  • Availability: UT v469*.

Manage the Packages.md5 checksums list.

  • -a Wildcard: Adds all files matching the wildcard to the Packages.md5 list.
  • -l [Filename]: Prints the current contents of the specified Packages.md5 file. If no Filename is given, Packages.md5 will be used.
  • -m Filename: Merges the contents of two Packages.md5 files. Filename should point to a valid Packages.md5 file.
  • -p Wildcard: Removes the checksum for the all files matching the wildcard from the Packages.md5 list.

MergeDXT

  • Package: Editor
  • Syntax: mergedxt srcpath oldpath destpath
  • Availability: UT v469*.

Merges DXT textures with standard textures.

  • srcpath: Path containing source files.
  • oldpath: Path containing old files.
  • destpath: Path for destination files.

MusicPackages

  • Package: Editor
  • Syntax: musicpackages <input directory> [<output directory>]
  • Availability: Unreal v227j.

Creates .umx music packages out of a directory full of music source files. If no output path is speficied in the settings, it defaults to Music.

PackageDump

  • Package: Editor
  • Syntax: packagedump [Filename]
  • Availability: UT v469*.

Dumps the structure of an Unreal Package to stdout.

PackageFlag

  • Package: Editor
  • Syntax: packageflag src.ext [<+|->flag [<+|->flag] ...]
  • Availability: Unreal v227*, UT v436 onwards.

Sets package flags in package files. Normally, clients connecting to a game server will download all the packages currently in use by the server. If you don't want that because it's unnecessary, you can set certain package flags to specify how the server should handle this package.

  • src.ext: Existing package file to load.
  • flag: + to set a flag, or - to remove a flag, followed by one of:
  • AllowDownload: Clients are allowed to download this package from the server.
  • ClientOptional: Clients can choose whether or not to download this package from server.
  • ServerSideOnly: The package has no network relevancy on a server.
  • BrokenLinks: Allows the package to load with missing links.
  • Unsecure: Unused.

ProdigiosumInParvo

  • Package: Editor
  • Syntax: prodigiosuminparvo <pkg> <format> <outpath>
  • Availability: Unreal v227j.

Batch exports all mip map levels.

PS2Convert

  • Package: Editor
  • Syntax:
  • Availability: Unreal v227* (disabled), UT v436.

Disabled in 227 (used to convert sounds into PS2 audio format).

RebuildImports

  • Package: Editor
  • Syntax: rebuildimports <pkg> [-upkg]
  • Availability: Unreal v227*.

Rebuilds import script for a package.

  • -upkg: Switches output to upkg format. Default is uc.

ReduceTextures

  • Package: Editor
  • Syntax: reducetextures <inpkg> <outpkg>
  • Availability: Unreal v227j.

Purges unneeded uncompressed mipmaps. Moves the compressed textures to the slot of the uncompressed ones, so you can have pure S3TC packages.

ResRays

  • Package: Editor
  • Syntax: resrays <package>
  • Availability: UT v469b onwards.

Rebuilds the import #EXEC statements for a given package.

  • <package>: The package from where the #EXEC statementes must be rebuilt.

RipAndTear

  • Package: Editor
  • Syntax: ripandtear <inputmap> <outputmap> <outputresources>
  • Availability: Unreal v227j.

Splits MyLevel resources from a map and saves the map and its resources as separate packages.

  • <inputmap>: The map to read MyLevel resources from.
  • <outputmap>: The map to output the non-MyLevel'd map to.
  • <outputresources>: The class of output resources to take from the input map.

SaveEmbedded

  • Package: Editor
  • Syntax: saveembedded <pkg> <embpkg> <outfile>
  • Availability: Unreal v227j.

Extracts embedded objects from a package and saves them to separate files. As you can embed packages into other ones in scripts using some line, like #exec OBJ LOAD FILE=textures\FireEffect18.utx PACKAGE=UnrealShare.Effect18 which is mostly used for firetextures which you can't really export, this commandlet extracts the embedded Firetexture by using ucc saveembedded UnrealShare Effect18 FireEffects18.utx.

ScriptRays

  • Package: Editor
  • Syntax: scriptrays <pkg>[.<cls>] <out_d> [-disassemble|-mugshot]
  • Availability: UT v469*.

Rebuilds script source for a package or class.

  • pkg[.cls]: Package or class to rebuild.
  • out_d: Output directory.
  • -disassemble: Output disassembly instead of code.
  • -mugshot: Output declarations instead of code.

Server

  • Package: Engine
  • Syntax: server map.unr[?game=gametype] [-option...] [parm=value]...
  • Availability: Unreal v226 onwards, UT v436 onwards.

Starts a network game server.

  • Log: Specifies the log file to generate.
  • AllAdmin: Gives all players admin privileges.

SHAUpdate

Main article: Unreal v227 Manual/Server admin tools.

  • Package: Engine
  • Syntax: shaupdate <filename>
  • Availability: Unreal v227i onwards.

Adds all SHA256 checksums of the files within the directory automatically to the file SHALinkerCache.ini. These checksums are used to validate all files in use, including native .exe and .dll files (also applies to Linux .so and .bin files) and is way extensive than the checks possible on pre 227i clients.

  • <filename>: The file to calculate the SHA256 checksum for posterior storage.

StripSource

  • Package: Editor
  • Syntax: stripsource packagename
  • Availability: Unreal v227f onwards; UT v469a onwards.

Strips the script buffers from a package.

  • packagename: The name of the package to strip sources from.

TextureMerger

  • Package: Editor
  • Syntax: texturemerger [packagename].utx
  • Availability: Unreal v227j.

Merges .dds/.bmp textures from ..\TextureMerge\PackageName\Group\ folder into an existing texturepackage, replacing all textures found, but keeping the package (net) conform. Possible are base-, detail-, and macrotextures. TextureName_NORM.dds will be added as normalmap (bumpmap) texture into the package. TextureName_HEIGHT imports heightmaps (for parallax). Additionally adds various texture information (.upkg file): GlobalCompressionLevel (Value 1-7: TEXF_BC1 - TEXF_BC7, for .bmp, dds needs to be compressed), Footstepsounds and clampmode (UClampMode/VClampMode Clamp/Wrap f.e. for skybox). The .upkg needs to be in the root folder for the texture replacement and named like the package (f.e. TextureMerge\PlayrShp\PlayrShp.upkg). A sample file is in the TextureMerge directory (TextureMergerSample.upkg).

  • [packagename]: An optional parameter, it's the package where the textures will be saved to. If no PackageName is specified, the TextureMerge directory is used in order to locate the names of all subfolders in searching for corresponding packages.

UpdateServer

  • Package: IpDrv
  • Syntax: updateserver [-option...] [parm=value]
  • Availability: Unreal v226 onwards, UT v436 onwards.

Service Unreal Engine auto update requests.

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

UpdateUMOD

  • Package: Editor
  • Syntax: updateumod UmodFile Command [Filename]
  • Availability: Unreal v226 onwards, UT v436 onwards.

Adds, deletes, replaces or extracts files from an .umod file created with the master commandlet.

  • UmodFile: The umod file to change or view.
  • Command: Can be one of the following:
  • EXTRACT: File extraction
  • ADD: File addition
  • DELETE: File deletion
  • REPLACE: File replacement
  • LIST: File listing
  • Filename: The file where to perform EXTRACT, ADD, DELETE or REPLACE.

External links and resources