DreamX

Veteran
Veteran
Joined
May 30, 2015
Messages
816
Reaction score
850
First Language
English
Primarily Uses
Features


Ability to use switches or variables as options


Ability to change resolution (requires restart)


Ability to change fullscreen persistently


Ability to optionally have a help window with text to help explain your options


Ability to change the size position of the options menu and help window


Ability to change the text for "ON" and "OFF" in the options menu


Ability to have switch and variable persistence for specified ones


Untitled.png


Resolution and help text options are defined in a json file. By default, it should be located in your data folder, but you can change the filename and location in the parameters. Here is a sample json file to help you that you can use and edit.


Future Updates

  • Add image options to help facilitate things like color blind accessibility



* ============================================================================
* Json Help - General
* ============================================================================
* The json file is used to customize extra things for this plugin.
* You can take a look at the sample provided by me to find out how to
* structure it. Take a close look at the names, values and commas. The commas
* are especially important because they can make a json file unusable if
* placed improperly. A comma needs to placed for every entry in a list
* aside from the last one. The last one must not have a comma.
*
* ============================================================================
* Json Help - Variables
* ============================================================================
* A "step" for the variable is the interval that is increased or decreased
* when changing the value.
*
* If a variable option's value is less than the mininimum, greater than the
* maximum or not a multiple of the step value, then it will get reinitialized
* to the minimum.
* ============================================================================
* Json Help - Locks
* ============================================================================
* You can use the json file to lock options. See the example json file.
*
* You will use the symbol (for example, "commandRemember" in the example
* json file). User-defined switches and variables use the same symbol style as
* in the HELP_TEXT section of the example json file.
*
* The "condition" attribute decides whether to lock the option or not.
* You will enter javascript there. If you need to use more than one line,
* I suggest putting a function call in there.
* If the condition evaluates as true, the option will be locked.
*
* "reset" decides whether to change the value of the option after resetting.
* You will enter javascript there. A simple true or false will probably
* suffice.
*
* "resetValue" only applies if the option is set to reset upon locking, so
* don't worry about this if you're not resetting the value. This attribute
* is what the value of the option is changed to upon resetting. In most cases,
* a number, true, or false will suffice.
*
* If you need to use quotes, make sure to escape them. For example, if you
* want to reset the resolution to 816 x 624, you would use
* "\"816 624\""
* as the reset value.
* ============================================================================
* Json Help - Help Text
* ============================================================================
* Use the symbol for the option in the help text section, to set help text.
* Switches will be switch_x with x as the id, variables will be variable_x
* with x as the id.
* You can do this with options from other plugins, too.
*
* For other plugins that add options, you should first ask the plugin author
* what the symbols for the options are. If this is convenient for you, you can
* search for "this.addCommand" (without quotes) In the plugin file. The one(s)
* you are looking for will probably be within the Window_Options class.
*
* For example, if I do that in Yanfly's Keyboard Config file, I'll find this
* in a function in the Window_Options class:
*
* this.addCommand(Yanfly.Param.KeyConfigName, 'keyConfig', true);
*
* So, the symbol is 'keyConfig'
* I will add an entry under HELP_TEXT in the json file using this symbol.
* For example, I would add this:
*
* "keyConfig": "This will allow you to configure the keys",
*
* You're going to do it the same way as the other help text examples, so make
* sure that if its the last entry, it does NOT have a comma at the end,
* otherwise it should.
* ============================================================================
* Switches Parameter Help
* ============================================================================
* Enter switch ids for the parameter Switches. You can include ranges.
* Example:
* 1-4 9 11-13
* Will include the numbers 1, 2, 3, 4, 9, 11, 12, 13
*
* In the options menu, the name you use for these switches will appear.
* ============================================================================
* Persistency Help
* ============================================================================
* Switches and variables made persistent will be the same for every
* playthrough of your game. If whenever a persistent switch/variable is
* changed in one playthrough, it will also be changed in another playthrough,
* including when loading saves.
*
* To reset this and the game options, delete config.rpgsave from the
* save folder. When sending your game to your players, don't send them this
* file, so they don't have your playthrough data and option choices
* affecting their playthrough.
* ============================================================================
* Tips & Tricks
* ============================================================================
* Resolution and fullscreen options require YEP Core Engine.
*
* Any option change meant to persist between all saves (like the always dash
* option) is only saved when you close out of the options menu, which is how
* the default program and most other games in general work.
*
* Make sure that your game's default resolution (whatever the resolution is
* when you haven't set any in-game options is put into the json file somewhere,
* before enabling the resolution option. The sample json are provide already
* includes the default 816 x 624 resolution that occurs in RPG Maker MV
* without any plugins.
*
* If you made a mistake with your options, you can delete the config.rpgsave
* file in the save folder to reset them.
*
* When choosing resolutions, you should generally use a width and height that
* is a multiple of the tile size you are using. Not doing so will result in
* black borders on the sides of the screen while on the map.
*
* If you find that your game is too blurry looking when changing resolution or
* becoming fullscreen, you can try adding
* <style type="text/css"> CANVAS{image-rendering: pixelated;}</style>
* within the html tags of index.html of your project.
*
* Note that depending on which resolution you chose and/or the sizes of the
* sprites, this make the game look quite pixelated. Experiment to choose
* what is best for your game.
*
* When writing help text, you can use \n to do a line break.
*
* To make a window the size of game window, use:
* Graphics.boxWidth for width
* Graphics.boxHeight for height
* You can also use those for calculations.
* ============================================================================
* Terms Of Use
* ============================================================================
* Free to use and modify for commercial and noncommercial games, with credit.
* ============================================================================
* Credits
* ============================================================================
* DreamX
* Thanks to Yanfly for resolution changing snippet from YEP Core Engine.


Script


Json File
 
Last edited by a moderator:

Harken_W

Veteran
Veteran
Joined
Oct 13, 2015
Messages
81
Reaction score
23
First Language
English
Primarily Uses
N/A
Ability to change resolution?! Thank you! :)  
 

Perr_

Veteran
Veteran
Joined
Mar 6, 2016
Messages
35
Reaction score
21
First Language
Korean
Primarily Uses
Ability to change resolution


Ability to optionally have a help window with text to help explain your options


Ability to change the size position of the options menu and help window


Great!! :D
 
Joined
Feb 18, 2015
Messages
630
Reaction score
352
First Language
English
Primarily Uses
RMMV
This plugin seems like it'd be really handy, but unfortunately I keep encountering this error:

Options Error.PNG
 

Zanfall

Villager
Member
Joined
Mar 13, 2012
Messages
23
Reaction score
23
First Language
English
Primarily Uses
RMMV
This plugin seems like it'd be really handy, but unfortunately I keep encountering this error:


View attachment 41995



Check your 'DreamX_Options.json' file for syntax errors. This exact error can happen if you have a extra comma after the final resolutions closing bracket for example.
 
Joined
Feb 18, 2015
Messages
630
Reaction score
352
First Language
English
Primarily Uses
RMMV
@Zanfall The only thing that's being flagged (I'm using Visual Studio Code) is the first bracket just under the Help Text section, the one right under the description for "switch1". When I hover over it, it says "Property expected".
 

DreamX

Veteran
Veteran
Joined
May 30, 2015
Messages
816
Reaction score
850
First Language
English
Primarily Uses
@Zanfall The only thing that's being flagged (I'm using Visual Studio Code) is the first bracket just under the Help Text section, the one right under the description for "switch1". When I hover over it, it says "Property expected".

Post your json code and I'll point out/fix your error.
 
Joined
Feb 18, 2015
Messages
630
Reaction score
352
First Language
English
Primarily Uses
RMMV
@DreamX


For the most part, all I've done is changed the resolutions listed (I put my default resolution first since I thought that might cause an error if I didn't) is changed a couple of the help texts, since I'm not using the Command Remember and I have a couple of other plugins that add new options to the options menu. Your plugin is below all of them.

{
    "VIDEO": {
        "930x734": {
            "w": "930",
            "h": "734"
        },
        "942x672": {
            "w": "942",
            "h": "672"
        },
        "816x624": {
            "w": "816",
            "h": "624"
        },
        "256x196": {
            "w": "256",
            "h": "196"
        }
    },
    "HELP_TEXT": {
        "alwaysDash": "If on, always dash even without holding dash button.",
        "synchFps": "Synch the game's FPS with your monitor's.",
        "keyConfig": "Configure the setup of the keyboard.",
        "gamepadConfig": "Configure the setup of the gamepad.",
        "bgmVolume": "This changes the volume of bgm.",
        "bgsVolume": "This changes the volume of bgs.",
        "meVolume": "This changes the volume of me sound effects.",
        "seVolume": "This changes the volume of sound effects.",
        "difficulty": "This changes the difficulty of the game.",
        "resolution": "Requires exit and restart.",
        "fullscreen": "Toggle Fullscreen.",
        "switch_1": "If on, does something really neat.",
    }
}
 

DreamX

Veteran
Veteran
Joined
May 30, 2015
Messages
816
Reaction score
850
First Language
English
Primarily Uses
@DreamX


For the most part, all I've done is changed the resolutions listed (I put my default resolution first since I thought that might cause an error if I didn't) is changed a couple of the help texts, since I'm not using the Command Remember and I have a couple of other plugins that add new options to the options menu. Your plugin is below all of them.

{
    "VIDEO": {
        "930x734": {
            "w": "930",
            "h": "734"
        },
        "942x672": {
            "w": "942",
            "h": "672"
        },
        "816x624": {
            "w": "816",
            "h": "624"
        },
        "256x196": {
            "w": "256",
            "h": "196"
        }
    },
    "HELP_TEXT": {
        "alwaysDash": "If on, always dash even without holding dash button.",
        "synchFps": "Synch the game's FPS with your monitor's.",
        "keyConfig": "Configure the setup of the keyboard.",
        "gamepadConfig": "Configure the setup of the gamepad.",
        "bgmVolume": "This changes the volume of bgm.",
        "bgsVolume": "This changes the volume of bgs.",
        "meVolume": "This changes the volume of me sound effects.",
        "seVolume": "This changes the volume of sound effects.",
        "difficulty": "This changes the difficulty of the game.",
        "resolution": "Requires exit and restart.",
        "fullscreen": "Toggle Fullscreen.",
        "switch_1": "If on, does something really neat.",
    }
}

Your error is the comma after switch_1. There should not be a comma for the last item in a list.


Fixed version:

Code:
{
    "VIDEO": {
        "930x734": {
            "w": "930",
            "h": "734"
        },
        "942x672": {
            "w": "942",
            "h": "672"
        },
        "816x624": {
            "w": "816",
            "h": "624"
        },
        "256x196": {
            "w": "256",
            "h": "196"
        }
    },
    "HELP_TEXT": {
        "alwaysDash": "If on, always dash even without holding dash button.",
        "synchFps": "Synch the game's FPS with your monitor's.",
        "keyConfig": "Configure the setup of the keyboard.",
        "gamepadConfig": "Configure the setup of the gamepad.",
        "bgmVolume": "This changes the volume of bgm.",
        "bgsVolume": "This changes the volume of bgs.",
        "meVolume": "This changes the volume of me sound effects.",
        "seVolume": "This changes the volume of sound effects.",
        "difficulty": "This changes the difficulty of the game.",
        "resolution": "Requires exit and restart.",
        "fullscreen": "Toggle Fullscreen.",
        "switch_1": "If on, does something really neat."
    }
}
 
Joined
Feb 18, 2015
Messages
630
Reaction score
352
First Language
English
Primarily Uses
RMMV
@DreamX Ah, shoot. Forgot to get rid of that when I took out the other switch option.


It's working now, thank you!
 

DreamX

Veteran
Veteran
Joined
May 30, 2015
Messages
816
Reaction score
850
First Language
English
Primarily Uses
1.2 adds variables functionality to the options menu. You can define the interval at which the variable is increased or decreased, and minimum and maximum values.


Check the updated json file to find out how to use.


Edit:


1.3 adds option to display a specific variable as a percent (see json) and adds ability to remove default options (check parameters).


Edit:


1.4 adds optional switch and variable persistence for the ones you choose.
 
Last edited by a moderator:
Joined
Feb 18, 2015
Messages
630
Reaction score
352
First Language
English
Primarily Uses
RMMV
I had this odd bug with 1.2, and it's still appearing in 1.4.


The first time I pause the game or access the debugging menu, it works as normal, with a picture of the map shown behind the window. But the second time I do either of those things, instead of there being a picture of the map, there's just a black screen. This is on all tabs of the menu.


Here's a picture of what I mean:

 

DreamX

Veteran
Veteran
Joined
May 30, 2015
Messages
816
Reaction score
850
First Language
English
Primarily Uses
I had this odd bug with 1.2, and it's still appearing in 1.4.


The first time I pause the game or access the debugging menu, it works as normal, with a picture of the map shown behind the window. But the second time I do either of those things, instead of there being a picture of the map, there's just a black screen. This is on all tabs of the menu.


Here's a picture of what I mean:


What debugging menu? This plugin doesn't add one.


Also that image doesn't load.
 
Joined
Feb 18, 2015
Messages
630
Reaction score
352
First Language
English
Primarily Uses
RMMV
I meant the f9 menu, where you can turn on/off switches and set up variable values. I thought it was called a debug menu?


Ah, sorry about the picture. Does this load?


options_bug_by_natalyabass-da98bwd.png
 

DreamX

Veteran
Veteran
Joined
May 30, 2015
Messages
816
Reaction score
850
First Language
English
Primarily Uses
The main menu and debug windows are not changed by this plugin. Turn this plugin off and check if the problem still occurs.
 
Joined
Feb 18, 2015
Messages
630
Reaction score
352
First Language
English
Primarily Uses
RMMV
That was the first thing I tried when I noticed the issue, and it doesn't do that when the plugin's turned off.
 

DreamX

Veteran
Veteran
Joined
May 30, 2015
Messages
816
Reaction score
850
First Language
English
Primarily Uses
Because I am not able to reproduce this error, start a new project and recreate the problem in as few steps as possible. Then, tell me the steps you took to cause the error.
 

Latest Threads

Latest Posts

Latest Profile Posts

Finally finished a little game for the one map challenge!
Game Link
IMG_6319.png
imgur sure is getting weird, one day I lose gradually all my images, the other I get them back randomly and then again they disappear again.
Despite OPT2 praise it still has some strange stories in it. Lady Mikka is trying to work herself to death because of guilt. Guilt over what? ¯\_(ツ)_/¯ So instead of finding a NPC to have a heart to heart with her they decide the cure is a new kimono. So when she drops dead she'll at least be well dressed. I haven't even got to the strange part yet.
Did so much work on the game today. I wish I could post it all in this status update but there is a character limit of course haha. I thought about making a topic for updates, though... maybe.
The most recent sign that I am old. I have done martial arts for over 4 decades. Never HAD to stretch out. Good, of course, but never required. Was doing some kicks in the kitchen because, why not, and I felt a pop in the back of my thigh. Now I am limping around. Gotta love getting old.

Forum statistics

Threads
131,691
Messages
1,222,271
Members
173,441
Latest member
Purple-H
Top