Status
Not open for further replies.

HornsterLG

Veteran
Veteran
Joined
Dec 19, 2021
Messages
87
Reaction score
22
First Language
german
Primarily Uses
RMMV
topic.
It probably has something to do with this:
Code:
ConfigManager.makeData = function() {
    var config = {};
    config.alwaysDash = this.alwaysDash;
    config.commandRemember = this.commandRemember;
    config.bgmVolume = this.bgmVolume;
    config.bgsVolume = this.bgsVolume;
    config.meVolume = this.meVolume;
    config.seVolume = this.seVolume;
    return config;
};

ConfigManager.applyData = function(config) {
    this.alwaysDash = this.readFlag(config, 'alwaysDash');
    this.commandRemember = this.readFlag(config, 'commandRemember');
    this.bgmVolume = this.readVolume(config, 'bgmVolume');
    this.bgsVolume = this.readVolume(config, 'bgsVolume');
    this.meVolume = this.readVolume(config, 'meVolume');
    this.seVolume = this.readVolume(config, 'seVolume');
};
 

eomereolsson

Veteran
Veteran
Joined
Sep 29, 2021
Messages
543
Reaction score
460
First Language
German
Primarily Uses
RMMV
Yes, that seems correct to me. What is your question exactly? You will need to alias both these functions to add your custom option to the config object and to read it upon loading.

You seem to have enough coding knowledge to find these functions, so I would appreciate a more detailed question with what exactly you need assistence.
 

HornsterLG

Veteran
Veteran
Joined
Dec 19, 2021
Messages
87
Reaction score
22
First Language
german
Primarily Uses
RMMV
I am using Yanfly Options core and I added an option with "cursor right code":

Graphics._requestFullScreen();

The problem is, when the player starts the game, this option is not applied.
So I am running a common event on launch that checks a gameswitch. If the switch is on, the common event does "Graphics._requestFullScreen();" and the game launches in fullscreen. I added to turn the switch on in the "cursor right code", BUT since the switches are saved with the gamesave-file, it does not work when the player accesses the option BEFORE launching a new game or loading an old game.

fullscreen option.png


I don't want to use the global switches plugin from Olivia, it is too inconsistent for me.

I guess a Plugin that adds stuff to the "ConfigManager.makeData = function() {" and the "ConfigManager.applyData = function(config) {" would be the best way to solve this problem. But I don't know how the game handles this option-loading stuff exactly.
 

eomereolsson

Veteran
Veteran
Joined
Sep 29, 2021
Messages
543
Reaction score
460
First Language
German
Primarily Uses
RMMV
I guess a Plugin that adds stuff to the "ConfigManager.makeData = function() {" and the "ConfigManager.applyData = function(config) {" would be the best way to solve this problem.
Well lucky for you, Yanfly's Options Core already seems to provide that ... option. Simply insert the following code after the default code into the Load Config Code parameter of your custom option:
JavaScript:
if(ConfigManager[symbol]) Graphics._requestFullScreen();

As an aside, the next time you ask for help with anything please do mention that you are using a plugin that completely alters how the aspect you are asking about functions and please do describe what actually is not working. Because if I look at the plugin the value you set to your option called "fullscreen" should be saved and loaded just fine - only the function call to actually enter fullscreen mode would not have been executed.
 

HornsterLG

Veteran
Veteran
Joined
Dec 19, 2021
Messages
87
Reaction score
22
First Language
german
Primarily Uses
RMMV
JavaScript:
if(ConfigManager[symbol]) Graphics._requestFullScreen();
It doesn't do anything. I also tried :
JavaScript:
if(ConfigManager[symbol]) {
 Graphics._requestFullScreen();
}
It also doesn't do anything if i put it in the common event script that runs on game launch.
Maybe it should look something like this?:
JavaScript:
if (ConfigManager[symbol] === 'AN') {
 Graphics._requestFullScreen();
}

I will look into the yanfly BattleAniSpeedOption plugin and look there how it recognizes the option setting. Edit: I am not able to understand what it does exactly.
 
Last edited:

eomereolsson

Veteran
Veteran
Joined
Sep 29, 2021
Messages
543
Reaction score
460
First Language
German
Primarily Uses
RMMV
JavaScript:
Code:
if(ConfigManager[symbol]) {
 Graphics._requestFullScreen();
}
This is the same code that I proposed. If you only have one statement following the if(...) you can leave out the curly brackets.
JavaScript:
Code:
if (ConfigManager[symbol] === 'AN') {
 Graphics._requestFullScreen();
}
This will not work as ConfigManager[symbol] is a boolean value (either true or false).

I just verified that my proposed method does work. So let's start with the standard troubleshooting:
- can you please share screenshots of how you configured this option in the plugin parameters?
- have you checked that your Yanfly plugins are in the correct order?
- have you checked that this method also doesn't work in a clean new test project?

You can also see what the value of ConfigManager[symbol] is by adding:
JavaScript:
console.log(ConfigManager[symbol]);
And then open the console by pressing F8.
 

HornsterLG

Veteran
Veteran
Joined
Dec 19, 2021
Messages
87
Reaction score
22
First Language
german
Primarily Uses
RMMV
I just verified that my proposed method does work.
It actually does work now. In Yanfly_optionsCore, in my fullscreen setting, I inserted "\i[55]" as the Symbol. But the Symbol section is not supposed to use icons. I entered the string "fullscreen" into the Symbol section and that fixed it! I am actually able to load other options now, too!

Thx a lot @eomereolsson! I will add you to my credits for troubleshooting! :)
 

eomereolsson

Veteran
Veteran
Joined
Sep 29, 2021
Messages
543
Reaction score
460
First Language
German
Primarily Uses
RMMV
Yes, "symbol" has nothing to do with any graphical icons that get displayed but rather means the unique identifier for that option.

Glad to hear it is working now :rhappy:
 

slimmmeiske2

Little Red Riding Hood
Global Mod
Joined
Sep 6, 2012
Messages
10,003
Reaction score
6,332
First Language
Dutch
Primarily Uses
RMXP

This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.

 
Status
Not open for further replies.

Latest Threads

Latest Posts

Latest Profile Posts

ScreenShot_11_27_2022_10_0_8.png
finally finished all the sprites for my friend's Comic book OC that I put in my game.
1669612924226.png
Added collectible trading cards to my current game, bio-Synthetica.
I plan to have a total of 20 different BATTLE-bot cards you can find & collect.
100 likes.jpg

I reached 100 followers on my new twitter! It's not much but it's honest work

Forum statistics

Threads
126,896
Messages
1,182,157
Members
166,694
Latest member
Roze_
Top