MV Read from a text file to define a variable?

My thread about the crash handler isn't exactly popular right now, so I thought I'd move on to another question.
This question is a bit self explanatory. I want to make the contents of a variable changeable by a text file so the game reads it on startup, and depending on what the text file says, the game does different things. I want to be able to manipulate such a thing to work with my game's soundtrack, since it has various styles (NES, SNES, Organya, GXSCC, and fakebit, but I call fakebit Pseudo-Bit). Say for example, OST.txt said NES, then the game would run Track A, which was made in FamiTracker. If OST.txt said Organya, it would run Track C, which was made in OrgMaker. You get the gist, right? Surely this kind of thing is easy, or I'm just stupid. I'm no programmer so I have no idea lol.

The reason why I'm doing this is to completely eliminate slowdown of game progression, as in asking "hey what style of music do you want to vibe to while you play", and just load it immediately by text.
Line 1: NES
Line 2: // Options: NES, SNES, ORG, GXSCC, PsB
in a way that is what the engine already does - json files are nothing but text files for storing data, and the entire game is stored in those files.

however no matter what, you need to be a programmer to do what you want - either because you need to understand the json files if you edit them with a text editor, or because you have to write a plugin to read any other text files for their data.

because without programming the engine will simply ignore basic text files.
I'm just curious about your intent here.

Do you think that players are going to want to edit this text file outside of the game to specify which soundtrack they want? (I know I would not 😛)

Since you will have to display instructions telling the players that this file exists, and how they can use it, I don't see how that takes less time or is less disruptive to starting a new game than simply popping up a choice dialogue.

Even aside from the part where you tell me how to do that and it takes up a screen I have to click through...opening a file in Windows explorer, selecting the existing option, typing over it, saving, and closing the file is more keystrokes than going into the in-game menu and changing the option.

What am I missing?
Now that I think about it, you're right, it actually is more time consuming to edit a file than just scroll through a multiple choice question. Late night brain back at it again :b
I wanted to do something similar but with the title screen, but I have no idea how I'd add an extra option in settings.
Now that I think about it, you're right, it actually is more time consuming to edit a file than just scroll through a multiple choice question. Late night brain back at it again :b
I wanted to do something similar but with the title screen, but I have no idea how I'd add an extra option in settings.
YEP Option Core 1) gives you a nice looking option menu, but 2) allows you to modify the option menu. It takes some work and know-how to add new options, but fortunately...I just bashed my head into the wall and wound up paying someone to fix it for me and published his fix publicly for folks:
You can read about it here.

In this case, you could set up a common event, depending on the variable set in the option menu will control which soundtrack is active. So the option menu is only controlling a global variable, while the game itself it deciding what to do with that variable.

I also thought I saw a plugin to add a "sound test" to the main menu the other day :LZSskeptic: I don't know if it would give you the ability to change soundtrack in game since obviously I am not using it, but could be worth looking into. Sorry I don't have a link.
Oh, I didn't know a plugin already existed for modding the title screen, other than the thing that changes the position of the little box. I'll take a look at it! ^-^
Update: Option Core is paid. I thought the article provided some sort of free material lol. Maybe it was just the config for the plugin and I still have to pay for the thing itself, which I can't because I'm 15 and broke. I tried I guess :b
idk how to delete posts (I think admins do that) but I accidentally double posted
selfreport.PNG

If you make a mistake, you can always use the self-report function to quickly inform mods of whatever action you need taken care of.


It is part of Yanfly's plugin collection, so it does cost. However, the full $30 package is definitely worth the cost, and there are so many valuable plugins that come in it, I recommend saving any allowance you earn (if you earn allowance) and put it toward purchasing the package. If you don't earn allowance, you could always consider trying to earn money through work; either doing work for your parents, family, or neighborhood, or if you have skills that you think might be valuable to the RPG Maker community, you could offer them in the classified's forum on this website.

Alternatively, you could try using a search engine and see if there are any existing plugins out there or alternative options to Option Core. There are a lot of plugins that exist that do similar things to each other, so it's not an impossibility that an "Option Core-like" plugin exists that is free.
Just use keywords such as "RPG Maker Option Menu Plugin" or "RPG Maker Change Option menu" or similar keywords.
I think I found something but I haven't tried it yet. I'll let you know if it works.
It works perfectly fine but only affects the in-game menu, not the title screen. That's okay, there's only one save file anyway.

Original thread: https://forums.rpgmakerweb.com/threads/read-from-a-text-file-to-define-a-variable.150016/