Introduction to Pluggy INI Files
The latest version of Pluggy supports the use of INI config files. This article gives a brief overview of INI files, and how to use them via Pluggy.
What is an INI?
The INI file is the most common type of file for storing configuration settings in the MS Windows environment. The basic elements of the INI file are as follows.
Sections
A section is denoted by a name in square brackets ([]). Sections are used primarily for the organization of data within the file, so that it is easier to find information when viewing an INI file in a text editor. For example, if I wanted to create an INI that stored detailed information about the player's character, I might want to some of these sections to keep the file organized:
[General] [Attributes] [Skills] [Spells] [Equipped Items]
Keys
The key is where the actual information is stored within the INI file. With the function available in Pluggy, we can read and store 4 types of data:
- Integers
- Floats
- References, stored as FormIDs
- Strings
Each key has a name, with an equals sign (=) seperating the key's name from the key's value. We can now expand our INI file about the player with actual data:
[General] Name=Sir Rupert the Lame Level=9 Gold=1489 [Attributes] Health=248.3 ... [Spells] Spell=000A97DF [Equipped Items] Weapon=00000C0D
Comments
Like in Oblivion Scripting, comments are denoted by a semicolon (;) at the start of the commented text. Expanding our INI file again with comments, we now have:
[General] ;Name is a string Name=Sir Rupert the Lame ;Lvl & gold are ints Level=9 Gold=1489 [Attributes] ;Health is a float Health=248.3 ... [Spells] ;StandardFireDamageTarget1Novice ("Fireball") Spell=000A97DF [Equipped Items] ;WeapIronShortSword ("Iron Shortsword") Weapon=00000C0D