Guide:INI Syntax: Difference between revisions

From Step Mods | Change The Game
mNo edit summary
mNo edit summary
 
Line 1: Line 1:
[[Category:Configuration Settings]]
[[Category:Configuration Settings]]
== Introduction ==
== Introduction ==
{{fc|#ddd|INI}} files are used by all game engines to define various settings that may need to be different, depending on a set of circumstances the engine is run.
INI files are used by all game engines to define various game-specific settings. The most recognizable changes relate to the hardware on which the game is run. On first run of almost every game, the user will be presented with either a configuration menu or a message saying something like, "optimum settings are being detected". This is the game engine assigning INI values for that game.


The most easily recognized set of changes relate to the hardware on which the game is run.<br>With almost every game, the first time it is run, you will be presented with either a configuration menu or a message saying the "''optimum settings are being detected''". This is the game engine assigning values to the {{fc|#ddd|INI}} for that game.
Other INI settings may be set by the GUI to change '''difficulty''', '''screen size''', '''audio quality''' or many other options that are directly tied to INI parameters. The same result could be accomplished by editing the INI directly, which is why this guide exists: INI settings are often esoteric programming terms that have little meaning to the user, regardless of their experience with that game.
 
Other {{fc|#ddd|INI}} settings may be set by a GUI to change '''difficulty''', '''screen size''', '''audio quality''' or many other user desired options. These are simply setting the values in an {{fc|#ddd|INI}} file. The same result could be accomplished by editing it by hand. The problem with doing it by hand though is the reason why this guide is written: {{fc|#ddd|INI}} settings are often esoteric programming terms that have little meaning to the user, regardless of their experience with that game.


=== Naming Convention ===
=== Naming Convention ===
The terms listed below are in [https://en.wikipedia.org/wiki/Hungarian_notation Hungarian Notation]. ie. the name indicates the type of function the setting changes.
The terms listed below are in [https://en.wikipedia.org/wiki/Hungarian_notation Hungarian Notation]. I.e., the name indicates the type of function the setting changes.


Specifically the initial letter provides the indication of what is expected in the {{fc|#ddd|value}} part of the setting. ie. the part after the =
Specifically, the initial letter provides the indication of what is expected in the {{fc|#ddd|value}} part of the setting. ie. the part after the =


===== Common value types: =====
===== Common value types: =====
Line 24: Line 22:
* <code>uTicksToWait</code> The is an unsigned [https://en.wikipedia.org/wiki/Integer_(computer_science) integer], meaning it is an integer where the value can't be negative.
* <code>uTicksToWait</code> The is an unsigned [https://en.wikipedia.org/wiki/Integer_(computer_science) integer], meaning it is an integer where the value can't be negative.


To further ease the use of these settings the game reads each setting and applies these values based on their location. If a setting is placed in the wrong section the game engine SHOULD disregard it as not applicable.
If a setting is placed in the wrong section the game engine SHOULD disregard it, so always be mindful of the [Section Headings].

Latest revision as of 20:28, December 8, 2021

Introduction[edit | edit source]

INI files are used by all game engines to define various game-specific settings. The most recognizable changes relate to the hardware on which the game is run. On first run of almost every game, the user will be presented with either a configuration menu or a message saying something like, "optimum settings are being detected". This is the game engine assigning INI values for that game.

Other INI settings may be set by the GUI to change difficulty, screen size, audio quality or many other options that are directly tied to INI parameters. The same result could be accomplished by editing the INI directly, which is why this guide exists: INI settings are often esoteric programming terms that have little meaning to the user, regardless of their experience with that game.

Naming Convention[edit | edit source]

The terms listed below are in Hungarian Notation. I.e., the name indicates the type of function the setting changes.

Specifically, the initial letter provides the indication of what is expected in the value part of the setting. ie. the part after the =

Common value types:[edit | edit source]
  • iNumThreads This is an integer, which means any whole number within range (between -2147483648 and 2147483647 for the i32 bit storage typically used in games.)
  • bHavokDebug This is a boolean. The value can be only one of two options: on/off, yes/no, true/false or 1/0
  • fMaxTime This is a float value. The value can be a number with a precision of the first 3-7 significant digits (depending on storage). This is typically used to handle small precise numbers (e.g. 0.6125) or very large numbers (e.g. 800000). The file format accepts also floating point scientific with "e" as the denotation for the power of 10. For very large or very small values it may be preferable to use this. (e.g. 8.5e12 for 8.5 trillion or 4.25e-9 for 4.25 billionths). Most games use Half or Single precision floating point with FastMath type calculation optimizations (favoring speed over precision.) See the linked Wikipedia article for details.
  • sStartingCellY This denotes a string, a line of text that is read and interpreted as is. "Text that is shown in game" or a path, filename or extension recognized by the game
  • uTicksToWait The is an unsigned integer, meaning it is an integer where the value can't be negative.

If a setting is placed in the wrong section the game engine SHOULD disregard it, so always be mindful of the [Section Headings].