FoamBats4All
Joined: 24 Jun 2009 Posts: 8
|
Posted: Wed Oct 12, 2011 4:47 Post subject: xp_ini - .ini file reading/writing |
|
|
Version: 1.0, 2011-10-11
Download: NWVault
= Description: =
This NWNX4 plugin allows NWScript to create, delete, open, save, close, read from, and write to .ini files located on the host machine.
= Features: =
File I/O
INIFileOpen: Opens a .ini file.
INIFileSave: Saves all changes to an .ini file.
INIFileClose: Closes a .ini file when it is no longer needed.
INIFileCreate: Create a .ini file that does not already exist.
INIFileDelete: Delete a pre-existing .ini file. WARNING: There is no checking for this. Make sure you don't delete something important!
INIFileIsOpen: Checks if a .ini file is already opened.
INIFileIsEmpty: Returns true if a .ini file is empty of content.
INIFileGetPath: Takes an ID of an .ini file and returns its location on the filesystem.
File Settings
INIGetIsUnicode: Returns true if the file is unicode.
INIGetIsMultikey: Returns true if the file supports multiple keys.
INIGetIsMultiline: Returns true if the file supports multiple lines per setting.
INIGetUseSpaces: Returns true if the saver inserts spaces between keys and values.
INISetIsUnicode: Sets/unsets unicode use.
INISetIsMultikey: Allows/disallows multiple keys.
INISetIsMultiline: Allows/disallows multiple lines per value.
INISetUseSpaces: Uses/disuses spaces between keys/values.
INI Reading
INIReadInt: Read an integer value from a section/key.
INIReadFloat: Read a float value from a section/key.
INIReadString: Read a raw (string) value from a section/key.
INI Writing
INIWriteInt: Write an integer to a specific section/key.
INIWriteFloat: Write a float to a specific section/key.
INIWriteString: Write a string (or raw value) to a specific section/key.
= Installation and Support: =
Import the .erf file into your module, and place the .dll file into your NWNX directory. If you need further help, please feel free to contact me, via the information found in my profile. Please report bugs here, or directly to me.
= Change Log: =
2011-10-11 : v1.0 : Initial release.
= Credit: =
Thanks as always to Skywing, for all the help he has provided me. While he didn't directly help with this project, it never would have been made without him.
Jellycan Code's SimpleIni library is the real backbone of this, and a lot of credit should be given to them.
= Screens: =
nwnx.ini dump
Demonstration of custom player file. |
|