Check out our discord at https://discord.gg/3u69jMa 

Ini Files: Difference between revisions

From SWRC Wiki
Jump to navigation Jump to search
No edit summary
No edit summary
Line 70: Line 70:
When a config file is written to disk, it will be written to the <code>Save</code> directory and all values that are the same as in the default config are commented out with <code>;</code>.
When a config file is written to disk, it will be written to the <code>Save</code> directory and all values that are the same as in the default config are commented out with <code>;</code>.


== Special Config Files ==


== Special Config Files ==
<code>System.ini</code> and <code>User.ini</code> are treated differently than other generic config files. They can be specified explicitly on the command-line with <code>-ini=FileName.ini</code> and <code>-user=FileName.ini</code> and will still be referenced by the Engine as <code>System</code> and <code>User</code> regardless of the actual name of the file.


System.ini and User.ini are treated differently than other generic config files. They can be specified explicitly on the command-line with -ini=FileName.ini and -user=FileName.ini and will still be referenced by the Engine as System and User regardless of the actual name of the file.
'''System.ini'''
System.ini


This config file contains all of the Engine's global settings and is always used by default if no specific file name was given.
This config file contains all of the Engine's global settings and is always used by default if no specific file name was given.
User.ini


As the name suggests, this file contains user-specific configuration data. Unlike all other configuration files it is not saved directly in the Save directory but to a subdirectory belonging to a user profile: Save/Profile_ProfileName/User.ini.
'''User.ini'''
 
As the name suggests, this file contains user-specific configuration data. Unlike all other configuration files it is not saved directly in the <code>Save</code> directory but to a subdirectory belonging to a user profile: <code>Save/Profile_ProfileName/User.ini</code>.

Revision as of 17:19, 17 May 2024

Republic Commando, like other Unreal games, stores its configuration options in ini files and config files with language specific extensions (e.g. int, det, est) which use the same format and rules. There are some differences to the standard Unreal config system which are described on this page.


Syntax

The config files have the usual key=value syntax and are divided into sections as indicated by the section name within square brackets. Lines that start with ; are considered comments and thus are ignored.

Unreal's config system allows for the same key to be assigned multiple times in an ini file using +=. This syntax is unique to SWRC and other Unreal games simply use =. Doing this in SWRC will only change the previous item in the list instead of appending a new one so make sure you use the correct syntax.


Here is an example section from System.ini that shows the syntax:

[Editor.EditorEngine]
UseSound=True
CacheSizeMegs=32
GridEnabled=True
SnapVertices=False
SnapDistance=10.000000
GridSize=(X=16.000000,Y=16.000000,Z=16.000000)
RotGridEnabled=True
RotGridSize=(Pitch=1024,Yaw=1024,Roll=1024)
GameCommandLine=-log
FovAngleDegrees=90.000000
GodMode=True
AutoSave=True
AutoSaveTimeMinutes=5
AutoSaveIndex=6
UseAxisIndicator=True
MatineeCurveDetail=0.1
EditPackages+=Core
EditPackages+=Engine
EditPackages+=Editor
EditPackages+=UWindow
EditPackages+=UnrealEd
EditPackages+=IpDrv
; FIXME_MERGE EditPackages+=UWeb
EditPackages+=UDebugMenu
EditPackages+=CTAudio
EditPackages+=GamePlay
EditPackages+=CTGame
EditPackages+=MPGame
EditPackages+=CTInventory
EditPackages+=CTCharacters
EditPackages+=CTMarkers
;EditPackages+=GUI
EditPackages+=XGame
EditPackages+=XInterface
EditPackages+=XInterfaceCommon
EditPackages+=XInterfaceLive
EditPackages+=XInterfaceMP
;EditPackages+=XInterfaceSettings
;EditPackages+=XInterfaceSP
EditPackages+=XInterfaceCTMenus
EditPackages+=XInterfaceGamespy

Config System

The game has two sets of configuration files in separate directories: One in System and one in Save.

A config file is read in two stages:

   1. The engine checks for a file with the given name in System. If it doesn't exist, all config options have their default values as specified in the code and the second stage is ignored.
   2. If there is a file in Save with the same name, it is read and all values that differ from the one in System are overridden.

So the config files in System contain default values that can optionally be overridden by the ones in Save. This is why it can happen that modifying a file from System will not actually change anything in the game because it's value is not used in the first place since it is overridden. It is a good idea to treat those files as read only and not make any changes to them since they contain the stock settings for the game which makes it easy to reset in case there are issues by simply deleting every ini file in Save. Any changes should be made to the files in the Save directory.


When a config file is written to disk, it will be written to the Save directory and all values that are the same as in the default config are commented out with ;.

Special Config Files

System.ini and User.ini are treated differently than other generic config files. They can be specified explicitly on the command-line with -ini=FileName.ini and -user=FileName.ini and will still be referenced by the Engine as System and User regardless of the actual name of the file.

System.ini

This config file contains all of the Engine's global settings and is always used by default if no specific file name was given.

User.ini

As the name suggests, this file contains user-specific configuration data. Unlike all other configuration files it is not saved directly in the Save directory but to a subdirectory belonging to a user profile: Save/Profile_ProfileName/User.ini.