Status
Not open for further replies.

HornsterLG

Regular
Regular
Joined
Dec 19, 2021
Messages
91
Reaction score
26
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

Regular
Regular
Joined
Sep 29, 2021
Messages
582
Reaction score
508
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

Regular
Regular
Joined
Dec 19, 2021
Messages
91
Reaction score
26
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

Regular
Regular
Joined
Sep 29, 2021
Messages
582
Reaction score
508
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

Regular
Regular
Joined
Dec 19, 2021
Messages
91
Reaction score
26
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

Regular
Regular
Joined
Sep 29, 2021
Messages
582
Reaction score
508
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

Regular
Regular
Joined
Dec 19, 2021
Messages
91
Reaction score
26
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

Regular
Regular
Joined
Sep 29, 2021
Messages
582
Reaction score
508
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,506
Reaction score
6,670
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 Profile Posts

My shrink has me trying to limit 30 mins a day for each of my personal projects so I can have a healthier life. But lately the rpg making in particular has been hard to pull away from and I keep getting lost in it.
Everyone has a test project named like this...right?

1701263020760.png
Pardon my japanese but this is my honest reaction to yesterday's "tangent":
1701262223568.png
I know these are all simple things for experienced users, but working on this Game Jam I have officially learned how to:
  • Use my own title screen image
  • Use scrolling text
  • Fade in a picture
  • Use any image for the Face in a dialog box
Probably silly for many people, but observable progress for me!
So i was looking at Lufia The Legend Returns Mapping Style in GBC. the Players view is a 9x9 square. MV has a more modern pixel art. As long as the environment is comprehensible, this mapping style is still good.
1701251621214.png

Forum statistics

Threads
136,570
Messages
1,267,659
Members
180,250
Latest member
kregginzzzz
Top