Unreal Mods

28
06/08/22 1 Unreal Mods CIS 488/588 Bruce R. Maxim UM-Dearborn

description

Unreal Mods. CIS 488/588 Bruce R. Maxim UM-Dearborn. Based on notes by Rachel Cordone and Joe Wilcox. Mods. Unreal Tournament 2004 supports a flexible mod system You can replace the game types, menus, and splash screen - PowerPoint PPT Presentation

Transcript of Unreal Mods

Page 1: Unreal Mods

04/19/23 1

Unreal Mods

CIS 488/588

Bruce R. Maxim

UM-Dearborn

Page 2: Unreal Mods

04/19/23 2

Based on notes byRachel Cordone

and Joe Wilcox

Page 3: Unreal Mods

04/19/23 3

Mods

• Unreal Tournament 2004 supports a flexible mod system

• You can replace the game types, menus, and splash screen

• Total conversions have their own separate set of folders contained within the main mod folder

Page 4: Unreal Mods

04/19/23 4

Running Mods

Assuming MyMod is the (directory) name of your mod. // start the game:ut2004.exe -mod=MyMod// start the game with a different user ini:ut2004.exe -USERINI=MyUser.ini -mod=MyMod// join a server running your mod:ut2004.exe 1.2.3.4:7777 -mod=MyMod// start UnrealEd for your mod:unrealed.exe -mod=MyMod // running the UnrealScript compiler:ucc.exe make -mod=MyMod

Page 5: Unreal Mods

04/19/23 5

Directory Structure

Page 6: Unreal Mods

04/19/23 6

Mod Directory

• All your Unreal Script class folders are placed in the main mod folder and the source code is complied here as well

• The isolated directory of your mod should be created in the same root directory.

• Create a directory called MyMod in the root directory (a meaningful unique name is better)

• The name of this directory is important because that's the name you will have to use for the -mod= command-line switch.

Page 7: Unreal Mods

04/19/23 7

Mod Directory

• This directory will be the root directory of your mod that will contain your mod's content and scripts.

• How you further organise the content in the MyMod directory is up to you, with one exception: a sub-directory called System has to exist.

• The most important file is UT2k4Mod.ini (this name is not changeable)

• The contents are also fairly tightly specified

Page 8: Unreal Mods

04/19/23 8

UT2k4Mod.ini

Page 9: Unreal Mods

04/19/23 9

Contents UT2k4Mod.ini - 1

• ModTitle - The name of your mod. This can include spaces.

• ModLogo - A 512 x 128 texture, displayed when people select your mod in the UT2004 Community tab.

• ModDesc - A description of your mod that will also be displayed in the Community tab. Use pipes | for a carriage return.

Page 10: Unreal Mods

04/19/23 10

Contents UT2k4Mod.ini - 2

• ModCmdLine - Command lines passed to UT2004 besides the -mod=MyMod switch.

• ModURL - URL for your mod's website.

Page 11: Unreal Mods

04/19/23 11

Script Packages

• The UnrealScript packages you create should be set up just like you would do with a normal package for UT2004 except it should be within your mod directory.

• Your mod directory would look like this: MyMod MyModCode -- an UnrealScript package for your

mod Classes -- put you UnrealScript source code

here (.uc) MyModGUI -- another UnrealScript Package Classes

Page 12: Unreal Mods

04/19/23 12

Content Packages

• Content packages go in their respective folders... MyMod Animations -- Skeletal Mesh animation packages

(.ukx) Help -- Splash screen (.bmp) and ReadMe

(.txt) KaramaData -- Physics data (.ka) Maps -- Level packages (.ut2) Music -- Music files (.ogg) Sounds -- Sound packages (.uax) StaticMeshes -- Static meshe packages (.usx) Textures -- Texture packages (.utx) ...

Page 13: Unreal Mods

04/19/23 13

Help Folder

• Needs to contain a 600 x 400, 256 bit color bitmap file called MyModLogo.bmp

• You must name the .bmp file the same as your mod's root directory <ModName> Logo.bmp.

• This bitmap will be used as a the splash screen when the mod is starting up

Page 14: Unreal Mods

04/19/23 14

System Folder

Page 15: Unreal Mods

04/19/23 15

System Folder

• You do not need to create the actual MyMod.ini and MyModUser.ini files

• These will be created from the default versions the first time the player starts the game

Page 16: Unreal Mods

04/19/23 16

Shortcut

Page 17: Unreal Mods

04/19/23 17

Merging Configuration Files

• It's important to understand how merging files works.

• The files Default.ini and DefUser.ini have to exist in your mod's System directory.

• If UT2004.ini exists in the game's System directory, it will be merged with the mod's Default.ini;

• Otherwise it will use the game's Default.ini and merge it with the mod's Default.ini .

• The same goes for the user.ini files.

Page 18: Unreal Mods

04/19/23 18

default.ini• The most important

content are the Paths lines in the section [Core.System]

• Other sections can be added as game evolves.

• Be sure to delete MyMod.ini and MyModUser.ini any time you change default.ini

Page 19: Unreal Mods

04/19/23 19

default.ini - 2

• Note the + prefix in front of the Paths and EditPackages lines.

• There are two prefixes you can use: + for addition, and - for removal of entries.

• This is only usefull for dynamic array configuration entries (like Paths, EditPackages, ServerPackages, ServerActors, etc.).

Page 20: Unreal Mods

04/19/23 20

default.ini - 3

• For example, adding the following entry: -Paths=../Maps/*.ut2

• Will remove default path to the Maps directory from the generated configuration file.

• This way the maps for the normal game can't be accessed from your mod.

• If no prefix is used the line will simply set the values, old values will be overwritten.

Page 21: Unreal Mods

04/19/23 21

default.ini - 4

• Keys get processed in the order they appear, so the following is possible: -CacheRecordPath=../System/*.ucl+CacheRecordPath=../MyMod/System/*.ucl+CacheRecordPath=../System/*.ucl

• This basically inserts the reference to you mod's ucl files before looking in the default game location.

• Be careful with ordering of some of the entries the order often is important.

Page 22: Unreal Mods

04/19/23 22

Log Files

• When running with mod support, the main .log files will be placed in your mod's System directory by default and be called <ModName>.Log (i.e. MyMod.log).

• All other secondary log files (such as ucc.log) will still be created in the game's System directory.

Page 23: Unreal Mods

04/19/23 23

Localization Files

• Starting with the latest patch, UT2004 can correctly locate and use localized text (.int) files stored in your mod's System directory.

• This requires some work on your part. • DUMPINT will always create the new .int files

in the game's System directory. • This is an unfortunate outcome; but changing

it would have proven difficult at this time.

Page 24: Unreal Mods

04/19/23 24

Cache Record Files

• Starting with the latest patch, UT2004 can correctly locate and use cache record (.ucl) files stored in your mod's System directory (or in the case of cache record files, whichever directory is specified by the CacheRecordPath array).

• EXPORTCACHE will create the .ucl files in the first directory found in the CacheRecordPath array. Using the trick above, you can force it to use your directory, but that's unsupported.

• As a general rule, you will have to hand copy these files in to their proper place - from the game's System directory to your mod's System directory.

Page 25: Unreal Mods

04/19/23 25

Player Settings Files (.upl) - 1

• There is special logic built in to the latest patch to make UPL files mod friendly.

• When the Cache Manager searches for .UPL files, it traverses the Paths array in reverse (bottom to top)

• It checks each directory for .UPL files, adding any that it finds to the cache.

Page 26: Unreal Mods

04/19/23 26

Player Settings Files (.upl) - 2

• When it reaches the game's System directory, the following occurs: 1. If you are not running with a mod, it will scan the

directory as normal.

2. If you are running a mod, and no .upl files have been found already, it will scan the directory as normal.

3. If you are running a mod, and the game has already found even a single .upl file, it will skip the default System directory.

Page 27: Unreal Mods

04/19/23 27

Player Settings Files (.upl) - 3

• In a nutshell, this means that if you have a mod that uses both your own custom .upl files and you want to allow them to use the default characters, you will need to include a copy of the original .upl files with your mod.

Page 28: Unreal Mods

04/19/23 28

Optional Matinee Sequence

• This can be used to replace the default nVidia log sequence at the start of the game

• Create an empty black map containing the following:– Player start– Matinee sequence that starts at interpolation point– ScriptedTrigger that waits one second and then

triggers your menu (1 second delay essential)