INI settings


get_ini_section

sfall.h

array get_ini_section(string file, string sect)

Returns an associative array of keys and values for a given INI file and section.

This is a macro, you need to include sfall.h to use it.


get_ini_sections

sfall.h

array get_ini_sections(string file)

Returns an array of names of all sections in a given INI file.

This is a macro, you need to include sfall.h to use it.


get_ini_setting

int get_ini_setting(string setting)
  • Reads an integer value from an ini file in the fallout directory.
  • It only takes a single argument; seperate the file name, section and key with a “|” character; e.g. myvar:=get_ini_setting("myini.ini|mysec|var1") If the file or key cannot be found, -1 is returned.
  • The file name is limited to 63 chars, including the extension.
  • The section name is limited to 32 characters.
  • It can also be used to get sfall’s settings, by using ddraw.ini as the file name.

get_ini_string

string get_ini_string(string setting)

Reads a string value from an ini file in the fallout directory.


modified_ini

int modified_ini

Returns the value of ModifiedIni setting in [Main] section of the INI.


set_ini_setting

sfall.h

void set_ini_setting(string setting, int/string value)

Writes an integer or a string value to an ini file in the Fallout directory. If the ini file does not exist, it will be created The setting argument works in the same way as in get_ini_setting, seperate the file name, section and key with a “|” character. Note: the file name is limited to 63 chars (including the extension), the section name is limited to 32 characters.

This is a macro, you need to include sfall.h to use it.