| Home Page | Recent Changes | Preferences

INI File

Unreal Engine based games make use of one or more INI files to hold configuration information for the classes used within the application running.

Some mods also use their own configuration file to avoid cluttering up the main program INI file and making their mod easier to install and uninstall. You can learn more about how this is done by reading about Config Vars And .Ini Files.

The INI file is broken into sections each with its own header. Each section within the INI file corresponds to the configuration of a class. The format of the section header is typically [package.classname] but not always.

An example INI file section showning the initialisation style of each variable type is shown below.

[MyPackage.MyMutator]
IntegerValue=1
bBooleanValue=False
FloatValue=0.350000
ClassName=UMenu.UMenuModMenu

MyStaticStringArray[0]=string element 0
MyStaticStringArray[1]=string element 1
MyStaticStringArray[2]=string element 0

MyDynamicIntArray=0
MyDynamicIntArray=1
MyDynamicIntArray=2
MyDynamicIntArray=3

UWindowKey=IK_None

The most important thing to note about the above example is the difference between the initialisation of the static and dynamic arrays.

When a static array is specified all elements in the array are saved to the INI file, even though they may be empty (or contain NULL values). Also, the index of the element is stored with the value.

When a dynamic array is specified then the element indexes are ommitted and the variable name of the dynamic array is used in multiple assignments. The EditPackages=... lines in the UnrealTournament.ini file are a real life example of the initialisation of a dynamic array.

Although you can comment an INI file using the ; symbol (and possibly #) all comments are lost as soon as the INI file is updated by a save of the configuration.

Related Topics


EntropicLqd: Well, that's all the information I wanted earlier this morning. I'd forgotten about the comments being lost until I wrote this page though. Bit of a bummer for what I wanted to do.

The Unreal Engine Documentation Site

Wiki Community

Topic Categories

Image Uploads

Random Page

Recent Changes

Offline Wiki

Unreal Engine

Console Commands

Terminology

Mapping Topics

Mapping Lessons

UnrealEd Interface

Questions&Answers

Scripting Topics

Scripting Lessons

Making Mods

Class Tree

Questions&Answers

Modeling Topics

Questions&Answers

Log In