MV Variables not working in events in pre-title script (HIME_PreTitleEvents.js)

Hiya, yep, another post. This one's short and sweet, I'd like to ask why only the NES version of my OST plays when I'm given the option to chose NES or SNES, I put in a dialogue asking which version of the OST the player would like to listen to, and even if SNES is chosen, the NES version of the song I want to play plays instead. "title theme v1 but calm, yay" is the NES version of "Tranquil Dreams". My filenames are messy, don't judge, but anyway, the game acts like the variables were never even set and plays the NES version no matter what the player chooses. Help?
Try using quotes.
Code:
◆Show Choices:NES, SNES (Window, Right, #1, #2)
:When NES 
  ◆Control Variables:#0005 OST = "NES"
  ◆
:When SNES 
  ◆Control Variables:#0005 OST = "SNES"
  ◆
:End
◆If:Script:$gameVariables.value(5) == "NES"
  ◆Text:None, Window, Bottom
  :Text:Selected NES
  ◆
:End
◆If:Script:$gameVariables.value(5) == "SNES"
  ◆Text:None, Window, Bottom
  :Text:Selected SNES
  ◆
:End
Moved to: Plugin Support

Normally variables don't exist before and while the title screen is playing. I assume the script you're using overcomes that, but I'm not sure how. If the above doesn't work for you, please give a link to the plugin and if you need to set up any parameters, show us a screenshot of that. Also hit F8 and go to the Console tab and make sure there are no error messages or warnings displayed.
I tested the thing out and it didn't work with quotes OR variables! Everything but sound related things work fine, I'm so lost... https://himeworks.com/2015/11/pre-title-events/ this is what I use for the pre-title events. As I said, I tried scripts AND variables but nothing worked somehow. I even tried replacing the "set variable to [thing]" with "script: thing" and only the text worked! HeLp MeEeEeEeEe-
no seriously I'm confused
I'm sorry...

Try it like this, in the "IF" select the option "Script", put in it:
Code:
$gameVariables.value(5) == "NES"

I edited the example in my previous post:
To my surprise, this time it completely skipped the "selected [choice]" dialogues, I did not remove those. Also, it played the NES one again. I chose SNES...

Shaz was right, I guess... but what about switches? Does this weird "exist or not" setup apply to switches too? I could make a switch called "SNES_OST" and switch it off when the game starts, and when the player chooses SNES I can turn it on... hmmmm.....
Sorry, but is that exactly what you did?
Code:
◆If:Script:$gameVariables.value(5) == "NES"
  ◆
:End
Yeah... but I do have good news! Switches work!!! SNES played when I told it to, with switches! Now my only other concern is that I think all switches are set to either on or off when new game or title screen hits, I can't remember, but I have a feeling all this research will add up to nothing after the title screen. Welp, there's only one way to test this.
I remade your system the way I explained before and it worked ...

Sorry for the question, why don't you use variables in a standard way with numeric values without any manual javascript input?

0 = Stop
1 = NES
2 = SNES
As Shaz explained, variables normally don't exist before and during the title screen, making it difficult to manage them. This logic does not apply to switches, and while switches are always set to OFF when a new game starts, I can always ask the player again which version of the OST they want to listen to. When you say you remade the system, did you test it in a pre-title map through the plugin or did you do it in a regular map that opens on "New Game"?
From the tests I did, I thought it could be the same mistake for not using quotes.

This part of saving something before the game title can be done by studying how to write and read the pre-game settings file:
Volume BGM, BGS, ME, SE and Dash

Over the weekend I will have more time to see this and try a solution.
use persistent switches =)
ON = NES, OFF = SNES (default)

while persistent switch can exist ouside game progress 🙂 but arent global either.
best way is to make the value when you do "start game" and start with a choice.

from there, you can set the settings they want for the entire game or only changeable
from a certain point (start or mid game or through items).
The NES part of the OST is what came first, and inspiration for the SNES version came from Vince94's SNES OST mod for Cave Story, and the fact that my team's graphics are in between NES and SNES, therefore not categorizing as either and staying in a kind of neutral/happy medium/middle state. I'll be using NES for OFF as the OST was originally going to be NES and I decided to add some fun by including SNES later on (aka now). So SNES will be staying as ON when NES is default, but I do like your idea. Maybe I'll add a super hard to find item that when used triggers the OST switch, and is reusable. LOL I've had some weird ideas for my game but the one you gave me with the item is even weirder (in a cool way).

Original thread: https://forums.rpgmakerweb.com/threads/variables-not-working-in-events-in-pre-title-script-hime_pretitleevents-js.134689/