audio volume variable

pasunna

Veteran
Veteran
Joined
Feb 3, 2019
Messages
289
Reaction score
69
First Language
thai
Primarily Uses
RMMV
I kind of use custom voice playing plugin(to fix some audio lag)
and editing it some way
but I notice that the main option of the game save the volume variable even if we close the game and not load any save?
how do I do that?
because the voice plugin use it owns volume method
I create some variable in plugin to change the volume option
but it will not carry on if not load the save that change
or maybe it is a system variable?
then what is this variable I can call for use
thank you
 

caethyril

^_^
Veteran
Joined
Feb 21, 2018
Messages
1,510
Reaction score
992
First Language
EN
Primarily Uses
RMMV
The options are handled by ConfigManager (see rpg_managers.js). They're saved to the config save file (index -1) via the StorageManager.

There are five volume properties defined on ConfigManager, value from 0~100. E.g. to get the master volume, you can use ConfigManager.masterVolume. A plugin might handle things differently, of course, but it will probably still go through the ConfigManager.
 

pasunna

Veteran
Veteran
Joined
Feb 3, 2019
Messages
289
Reaction score
69
First Language
thai
Primarily Uses
RMMV
The options are handled by ConfigManager (see rpg_managers.js). They're saved to the config save file (index -1) via the StorageManager.

There are five volume properties defined on ConfigManager, value from 0~100. E.g. to get the master volume, you can use ConfigManager.masterVolume. A plugin might handle things differently, of course, but it will probably still go through the ConfigManager.
thank you
you always be helpful
can I ask so if I make configManager.XXX
and change that xxx in game will it carry on without save load?
 

caethyril

^_^
Veteran
Joined
Feb 21, 2018
Messages
1,510
Reaction score
992
First Language
EN
Primarily Uses
RMMV
thank you
you always be helpful
can I ask so if I make configManager.XXX
and change that xxx in game will it carry on without save load?
Let's say the SE volume is set to 100%. If you do ConfigManager.seVolume = 50, that'll set the SE volume to 50% (effective immediately) but it won't save the change to file until the next ConfigManager.save() call, e.g. the next time the player closes the options window. If the game is closed before the options are saved, then the next time you start the game, the SE volume will be at 100%. Also, ConfigManager settings apply to the game as a whole, rather than to specific playthroughs.

You may need some kind of edit to the plugin you're using if you want to be able to change the volume mid-game without affecting the current options. E.g. maybe add a volume multiplier that gets saved per-playthrough. :)
 
Last edited:

pasunna

Veteran
Veteran
Joined
Feb 3, 2019
Messages
289
Reaction score
69
First Language
thai
Primarily Uses
RMMV
Let's say the SE volume is set to 100%. If you do ConfigManager.seVolume = 50, that'll set the SE volume to 50% (effective immediately) but it won't save the change to file until the next ConfigManager.save() call, e.g. the next time the player closes the options window. If the game is closed before the options are saved, then the next time you start the game, the SE volume will be at 100%. Also, ConfigManager settings apply to the game as a whole, rather than to specific playthroughs.

You may need some kind of edit to the plugin you're using if you want to be able to change the volume mid-game without affecting the current options. E.g. maybe add a volume multiplier that gets saved per-playthrough. :)
nope In fact I want to make my own option
so configManager.save is the way thank you!!
this bring up many option thing I can do with out the load save setting
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

Ami
4 days im not using my laptop to waiting someone to reinstall (sigh)
Stream will be live shortly with some Donkey Kong 64! Feel free to drop by!
Working on a test Boss for the new No Travel Game Jam
- Name Plugin by Moghunter -
Free RPG Maker Ready Charging Up Animation

Enjoy -No Credit Needed But Appreciated -
Download it at https://lvgames.itch.io/free-charging-up-pixel-animation-fx-rpg-maker-ready
:/ .... so, thought I’d go to the park to sit in the cool breeze and get out of the house a little. Nope, guess that’s quarantined too. Ok...

Forum statistics

Threads
95,489
Messages
929,543
Members
125,739
Latest member
dald
Top