• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!

GameMaker Help Writing INI files?

T

TheTrophieStars

Guest
I'm beginning to work on a dialogue system in my game and I was wondering if there were any resources for how to properly write an ini file manually. Additionally, I know that Gamemaker reads files from sections, but is there a way to create subsections? I ask this mainly so I can have each section represent a different language.
Or should I just have separate Ini files for each language?
 
Y

Yvalson

Guest
I would suggest different ini files for different languages. this will ultimately be more overseeable as you can name the files accordingly while if you are writing in 1 you have to go to a particular section of your ini file which isn't really the best way to do it. it's possible and if you really want to do it that way I can give you advice but I wouldn't recommend doing it that way
 
T

TheTrophieStars

Guest
I would suggest different ini files for different languages. this will ultimately be more overseeable as you can name the files accordingly while if you are writing in 1 you have to go to a particular section of your ini file which isn't really the best way to do it. it's possible and if you really want to do it that way I can give you advice but I wouldn't recommend doing it that way
I think I will use separate files, but I'm still curious if sub-categorizing files is possible.
 
Y

Yvalson

Guest
ini_open("savedata.ini");
score = ini_read_real("save1", "score", 0);
ini_close();

this is directly from the gamemaker documentation

you can do it like this

ENG = ini_read_real("ENG", "TEXT", 0)

and if you wanna write

ini_write_real( 'ENG', 'TEXT', DIALOGUE );

something like that
 
Top