RMMZ Add a Yes/No line (tied to a switch) with visustella Options core?

Indinera

Indie Dev
Veteran
Joined
Mar 13, 2012
Messages
2,010
Reaction score
852
First Language
French
Title says it all.

Question blablablabla: Yes/No

If Yes, switch X is ON, otherwise it's OFF.
How to do that?
 

caethyril

^_^
Veteran
Joined
Feb 21, 2018
Messages
2,419
Reaction score
1,830
First Language
EN
Primarily Uses
RMMZ
If you just want to reference an option in-game then you can do so via Conditional Branch > Script, e.g. to check if the alwaysDash setting is on:
JavaScript:
ConfigManager['alwaysDash']
You can set a value in a similar way, e.g.
JavaScript:
ConfigManager['alwaysDash'] = true;


Otherwise, note that by default all switches reset on game boot, New Game, and Continue, but in-game options do not (typically) reset like this. It sounds like you will need a plugin that lets specific switches keep their values through these transitions. VisuStella Save Core offers this in the form of "Global Switches":


If you still want to sync a persistent game switch with an in-game option, that'll require several edits in the parameters of Options Core. I think the easiest approach would be to show the option like normal but only ever reference/change the value of the persistent switch. Basically, you could make a copy of an existing on/off option, e.g. alwaysDash, then:
  • Swap all instances of this.setConfigValue(symbol, value) for:
    JavaScript:
    $gameSwitches.setValue(1, value)
  • Swap all instances of this.getConfigValue(symbol) for:
    JavaScript:
    $gameSwitches.value(1)
These examples reference game switch 1, change that as appropriate. You might also need to edit other lines, e.g. any direct ConfigManager[symbol] references.
 

Indinera

Indie Dev
Veteran
Joined
Mar 13, 2012
Messages
2,010
Reaction score
852
First Language
French
Maybe I'm wrong but... I'm not sure this answers my question.
What I'd like is add an extra (custom) line to Options core:

1618927424593.png

This line should have 2 options: Yes and No. Default position should be No but that doesn't really matter, if it's on Yes I can adapt. However what's important is that Yes should mean Switch X goes ON, and No mean same Switch X goes OFF.
 

Latest Threads

Latest Posts

Latest Profile Posts

TFW you discover how the script batching works in VNMaker... after you've had the program for almost 3 years.
hAx6iQ3.gif

Writes that the characters have to climb a mountain.

Realized that I have to draw six sets of models where characters are climbing.

At least I know how to draw something. :)
I'm currently scratching my head on how to design plains. What do I even put in plains? Some trees (but not too many or it turns into a forest)? Grass? A few bushes? That's a bit dull.
I'm looking for tutorials but Google didn't seem to find much (or maybe I have the wrong keywords). I don't know how to map plains and I don't know how to learn.
I should probably be dragged kicking and screaming away from Daz3D... I was playing with 8.1 models and came up with this. Thoughts?
and_remember_tomorrow_miranda_8_1.jpg

Forum statistics

Threads
111,403
Messages
1,060,852
Members
144,750
Latest member
corvid
Top