Commandlet

From Oldunreal-Wiki
Jump to navigation Jump to search
Article stub
The following is an article stub. You can help us by expanding it.

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 does each one perform.

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.

Commandlets shared between Unreal v227* and UT v469*

BatchExport

  • Package: Editor
  • Syntax: batchexport package.ext classname export_ext [path]

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.

ChecksumPackage

  • Package: Editor
  • Syntax: checksumpackage packagename

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 v469a.

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 onwards; UT v469a onwards.

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

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

Compress

Main article: HTTP Redirect.

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

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

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

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

Decompress a file compressed with ucc compress.

  • CompressedFile: The .uz file to decompress.

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.

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

ExportPackage

  • Package: Editor
  • Syntax: exportpackage packagename

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

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

ListObjects

  • Package: Editor
  • Syntax: listobjects [-switch1 [-switch2 [...]]] <package> [<baseclass>]

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]...

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]...

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]

Maintains a master list of servers.

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

PackageFlag

  • Package: Editor
  • Syntax: packageflag src.ext [<+|->flag [<+|->flag] ...]

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.

Server

  • Package: Engine
  • Syntax: server map.unr[?game=gametype] [-option...] [parm=value]...

Starts a network game server.

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

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.

UpdateServer

  • Package: IpDrv
  • Syntax: updateserver [-option...] [parm=value]

Service Unreal Engine auto update requests.

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

UpdateUMOD

  • Package: Editor
  • Syntax: updateumod UmodFile Command [Filename]

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.

Commandlets exclusive to Unreal v227*

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.

DumpTextureInfo

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

Prints out a detailed info about textures inside a package.

FontPageDiff

  • Package: Editor
  • Syntax: fontpagediff <left font> <right font>

Compares font pages.

FullBatchExport

  • Package: Editor
  • Syntax: fullbatchexport <pkg> <outpath>

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: Integrity (Anticheat).

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

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.

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.

ProdigiosumInParvo

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

Batch exports all mip map levels.

PS2Convert

  • Package: Editor
  • Syntax:

RebuildImports

  • Package: Editor
  • Syntax: rebuildimports <pkg> [-upkg]

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.

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.

SHAUpdate

Main article: Integrity (Anticheat).

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

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.

TextureMerger

  • Package: Editor
  • Syntax: texturemerger <packagename>
  • Availability: Unreal v227j

Merges in textures from ../TextureMerge/<packagename>.utx folder to the target package.

  • <packagename>: The package where the textures will be saved to.

Commandlets exclusive to UT v469*

CheckSum

  • Package: Engine
  • Syntax: checksum packagename.u

Calculates package checksum for stat logging.

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

Exec

  • Package: Editor
  • Syntax: exec filename

Executes a command file in a minimal editor environment.

MD5

  • Package: Editor
  • Syntax: md5 [-option Filename|Wildcard]

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

Merges DXT textures with standard textures.

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

PackageDump

  • Package: Editor
  • Syntax: packagedump [Filename]

Dumps the structure of an Unreal Package to stdout.

ResRays

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

Rebuilds the import #EXEC statements for a given package.

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

ScriptRays

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

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.

External links and resources