UMOD/Source
Basic File Structure
To create the most basic UT2MOD file you only need two files:
- MyMod.ini
[Setup] Product=My Mod Version=1337 Archive=MyMod.ut2mod SrcPath=. MasterPath=.. Requires=UT2003Requirement Group=SetupGroup Group=MyModGroup [UT2003Requirement] Product=UT2003 Version=2107 [SetupGroup] Copy=(Src=System\Manifest.*,Flags=3) [MyModGroup] Copy=(Src=System\MyMod.u) Copy=(Src=System\MyMod.int) AddIni=UT2003.ini,Engine.GameEngine.ServerPackages=MyMod
- MyMod.int
[Setup] LocalProduct=The Super Uber Cool Mod ReadMe=Help\MyModReadme.txt SetupWindowTitle=My Mod - Installation AutoplayWindowTitle=My Mod ProductURL=http://mep.beyondunreal.com/mymod.html VersionURL=http://www.bobjoe.com/version.html Developer=Bob & Joe Productions DeveloperURL=http://www.bobjoe.com/about_us.html Logo=Help\InstallerLogo.bmp [UT2003Requirement] LocalProduct=UT2003 ProductURL=http://www.unrealtournament2003.com/ VersionURL=http://unreal.epicgames.com/ Developer=Epic Games, Inc. DeveloperURL=http://www.epicgames.com/
This simple example copies two files to the UT2003\System directory and adds a ServerPackages entry for the mod's package. It allows us to look at three different sections of a UMOD's ini file:
- the Setup section
- a requirement section
- a group section
We also get to see the corresponding INT file sections for two of those three INI sections:
- the Setup localization section
- a requirement localization section
Group sections can have localization sections too, but we'll see about them later.
The Setup Section
This section contains general information about the mod being installed.
Here's an overview of possible key/value pairs in the INI file's Setup section:
- Product
- The name of the mod as it should be listed in the game's Manifest.ini after the mod has been installed. This is not the name that will be displayed in the setup window.
Do not use the game's name here, i.e. "UT2003", "UnrealTournament", "Unreal", etc. - Version
- The version of the mod. This is a numeric value, e.g. 100, 436, 1337, 2107, etc.
- Archive
- The name of the UT2MOD file that will be created when compiling this INI file.
- SrcPath
- The created UMOD file will be saved to this directory.
- MasterPath
- The location of the files that will go into the UMOD file. Keep this set to ".." and use the individual group sections' MasterPath property to specify the source file locations instead.
- Requires
- Specifies a requirement section. You can add as many Requires keys as you need, each specifies exactly one requirement section.
- Group
- Specifies a group section. You can add as many Group keys as you need, each specifies exactly one group section.
- Visible
- Tree
- When set to True, you will be able to have selectable groups. (That's what group localization sectins are for, but as said before: more about that later.)
Possible key/value pairs in the INT file's Setup section:
- LocalProduct
- This is the displayed name of the mod in the setup window. You can use anything here, but sticking with the mod's real name is probably the best idea...
- ReadMe
- A link to the mod's manual. A button that opens this file will be displayed after the mod has been installed.
- AutoplayWindowTitle
- The title of the window that is displayed after the installation was completed.
- SetupWindowTitle
- The title of the setup window.
- Developer
- This is the name of the company or person responsible for creating the mod. This will be displayed on the button that leads to the developer website.
- ProductURL
- The URL of the mod's website. This site should contain general information about the mod.
- VersionURL
- The URL of this version's page. This page should contain information about this specific version of the mod.
- DeveloperURL
- The URL of the mod's developer.
- Logo
- A logo file for the setup window. This should be a BMP file with 256 colors for Unreal/UT or 16 million colors for UT2003. The image can have a maximum size of 343x82 pixels, that's the size of the original UT and UT2k3 setup logos.
The Requirement Section
Requirement sections prevent the mod from being installed if the required game or mod is not installed. If the requirement is a game an this game's directory is fond in the system registry, then the correct path to that game is automatically displayed, so the user doesn't have to enter it manually.
Each requirement section must be specified with Requires=section name in the Setup section.
INI keys for requirement sections:
- Product
- The game or mod required for this mod. This name must appear in the Manifest.ini of the already installed game or the installer will refuse to instal this mod.
- Version
- The minimum version required to use this mod. If the game or mod is installed, but has a lower version number, then the installer will refuse to instal this mod.
You can leave this blank if the mod works with any version of the required game or mod.
Common requirements:
Game | Product | Versions | Notes |
Unreal | Unreal | ??? | |
Return To NaPali | ??? | ??? | |
Unreal Tournament | UnrealTournament | 413, 436 | |
UT Bonuspack 4 | UTBonusPack4 | 100 | The other bonuspacks are part of UT GOTY edition and shouldn't be specified as a requirement. |
UT2003 | UT2003 | 2107, 2136, 2166, 2186 | |
UT2004 | UT2004 Bonus Pack | 7 | This is the ECE Bonus Pack. |
INT file keys for requirement sections:
- LocalProduct
- The displayed name of the required product.
- ProductURL
- A URL with information about the required product.
- VersionURL
- A URL with information about the required version of the product.
- Developer
- The displayed name of the required product's developer.
- DeveloperURL
- A URL with information about the developer.
URLs of some official products:
Product | URL |
Unreal | http://www.unreal.com/ |
Unreal Tournament | http://www.unrealtournament.com/ |
Unreal Tournament 2003 | http://www.unrealtournament2003.com/ |
Developer of these products is "Epic Games, Inc." (http://www.epicgames.com/) and the VersionURL is http://unreal.epicgames.com/
The Group Section
The groups are the most important part of a UMOD file. They tell the installer which files should be copied, which INI files should be changed in what way and other things.
Each group section must be specified with Group=section name in the Setup section.
The possible INI file keys of a group section:
- Copy
- This copies a file from the UMOD archive to the specified subdirectory of the directory specified by the user.
- Backup
- Advanced. Backs up a file. This file will probably be restored when the mod is uninstalled. (?)
- Delete
- Advanced. Deletes the specified file. Use with caution, users don't expect that an installer deletes files. The files should probably be backed up before deleting them.
- AddIni
- Adds a new line to the specified INI file. The line will always be added, unless it already exists with exactly the same key/value pair.
- Ini
- Modifies the value of a key in an INI file.
- RemoveIniValue
- ie: RemoveIniValue=mod\System\mod.ini,Core.System.MusicPath=../mod/Music
- RemoveIni
- ie: RemoveIni=mod\System\mod.ini,Core.System.Paths
- AddIni
- ie: AddIni=mod\System\mod.ini,Core.System.MusicPath=../mod/Music
- RemovePath
- ie: RemovePath=System\Default.ini,Paths=../KarmaData/*.ka
- WinRegistry
- Advanced. Creates or modifies a windows registry key.
- Folder
- Advanced. Created a subdirectory in the directory specified by the user. This isn't required because the Copy key will automatically create directories if neccesary.
- Shortcut
- Advanced. The name of a shortcut section. (see Advanced Techniques)
- MasterPath
- The location of the files belonging to this group.
- Visible
- Advanced. Whether this group is displayed. (see Advanced Techniques)
- Optional
- Advanced. Whether this group is selectable/deselectable. (see Advanced Techniques)
- Selected
- Advanced. Whether a group is initialy selected. (see Advanced Techniques)
Advanced Techniques
Still to cover:
- selectable groups
- backing up files
- compressed packages
- creating shortcuts
- registry changes
Related Topics
- /Creating UMOD or UT2MOD files
- UmodInstaller is a UDN document that also describes how to build a umod
Wormbo: This page seems to get quite long. Maybe the advanced UMOD stuff should go on its own page and this page should be renamed to UMOD/Basics or something?
Switch`: Lets rename this page to /MinimalSample? and move ref stuff to /Reference.