Creating An INI File

There are two ways of creating INI files for use in Game Maker, either through Windows Explorer or with GML code in Game Maker itself.

In Windows open up the folder you wish to create the INI file in. Right-click -> New -> Text Document, type in the name you want and make the file extension .ini. After pressing enter a confirmation box will appear saying ''If you change a file name extension, the file may become unusable. Are you sure you want to chagne it?  Click Yes''. If that confirmation box doesn't appear, make sure that in Tools -> Folder Options -> View and make sure hide extensions for known file types is unticked. You should see the icon for the file change slightly. You can now open the file type in any information you need.

In Game Maker you can use GML to create the file by using ini_open and then subsequentally either ini_write_string or ini_write_real which will create the file with the given name into the game directory and write the indicated section and key.

Giving a file the extension .ini doesn't actually change the file in any way, and any text file that can be opened with Notepad with any extension can be opened and used in Game Maker. However it makes organisational sense and is good practise to have your INI files named as such.

More about INI files: GML_Functions:_INI_Files