Eliaquim

Hakuen Studio
Veteran
Joined
May 22, 2018
Messages
1,841
Reaction score
1,266
First Language
Portuguese - Br
Primarily Uses
RMMZ
Author: Eliaquim
Introduction
There are many conditions that, by default, the event tabs do not have commands to check. As an example, if the game is being played on an android device, iPhone, computer or check the current weather (rain, storm, or snow).
Instead of having to resort to script calls ($gameScreen.weatherType() === 'rain'), this plugin facilitates this and other processes by automaticaly activating a switch of your choice based in a predefined condition in plugin parameters.

Features
• Automatically turns the specified switches on and off according to the
conditions below:
• Is in Test mode (Whether in battle, event, or normal).
• If the game is running on a mobile device.
• If the game is running from a Desktop.
• If the game is running on an android.
• If the game is running on an iPhone.
• If the player is in any vehicle.
• If the player is on an airship.
• If the player is in a boat.
• If the player is on a ship.
• If there is any change in the weather.
• If it is raining.
• If it is snowing.
• If it is raining heavily (storm).
• If the player is on a tile that inflicts damage.¹
• If the player is running.
• If the player is in a bush.¹
• If the player is on a ladder.¹
• If the player is in motion.
• If the message window is open.
• If the choice window is open.
• If the number entry window is open.
• If the item selection window is open (from the map).
• If the timer is active.²
¹ It is necessary to configure the tileset.
² When it reaches zero, the switch turns off.


How to Use
Plugin parameters:
• Setup mode> Choose whether you want to assign values to switches using
their Id or name.
• Plugin version > There are two ways for the plugin to work:
- "Update as needed" > The switches are turned on and off automatically only when something related to them happens. For example, when entering a vehicle the plugin will identify which vehicle it is and activate the switch for that vehicle. And when you leave it, the switch will turn off.
- "Always update" > At each time interval (frames) specified in the "Update interval" parameter, the plugin will check all switches and turn on or off each one depending on the condition of each one.
For example, regardless of whether the player enters or exits the vehicle, the plugin will be updating the corresponding switches for at each time interval.
If you happen to experience any incompatibility with other plugins, try switching between versions.

Screenshots
Ec1JTwf.png

IMpR8t1.png

k4pAkmB.png

Terms of Use

https://www.hakuenstudio.com/rpg-maker/terms-of-use

Download
Eli_DevSwitches.js

Credit and Thanks
@caethyril @Poryg that help me so much when I start to make this plugin a long time ago!
And SRDude Tutorials on Youtube.

Update Log
Version 1.6 - 08/22/2020
- Code restructuring.
Version 1.5 - 07/30/2020
- Add compatibility with Eli_FindIdByName.js
- Removed some unnecessary plugin parameters.
Version 1.4 - 06/16/2020
- Changed the plugin parameters.
- Add new conditions to be attached to switches' values.
Version 1.3 - 04/29/2020
- Add compatibility with Eli_SuperTimer.js
Version 1.2 - 11/27/2019
- Fixed a bug that prevents the game from loading a save file.
Version 1.1 - 11/01/2019
- Fixed a bug that prevents the test switch to be turned on in battleTest.
- Added a battle switch.
- Improvement in the code.
Version 1.0 - 10/31/2019
- Plugin release!
 
Last edited:

Poryg

Dark Lord of the Castle of Javascreeps
Veteran
Joined
Mar 23, 2017
Messages
4,125
Reaction score
10,646
First Language
Czech
Primarily Uses
RMMV
An interesting little utility! Nevertheless, I've noticed a bug just from reading the code.

Code:
if (Utils.isOptionValid('test') || Utils.isOptionValid('btest') || Utils.isOptionValid('etest')) {
        $gameSwitches.setValue(Eli.Param.DevSwitches.Playtest, true);
    }
The plugin has a playtest or battle test or event test switch condition, however, since you implemented it only on Scene_Map, it means it won't turn ON in battle test.

Also, I have some feedback about the code, but I'll send it in PM to not bloat the thread.
 

Eliaquim

Hakuen Studio
Veteran
Joined
May 22, 2018
Messages
1,841
Reaction score
1,266
First Language
Portuguese - Br
Primarily Uses
RMMZ
An interesting little utility! Nevertheless, I've noticed a bug just from reading the code.

Code:
if (Utils.isOptionValid('test') || Utils.isOptionValid('btest') || Utils.isOptionValid('etest')) {
        $gameSwitches.setValue(Eli.Param.DevSwitches.Playtest, true);
    }
The plugin has a playtest or battle test or event test switch condition, however, since you implemented it only on Scene_Map, it means it won't turn ON in battle test.

Also, I have some feedback about the code, but I'll send it in PM to not bloat the thread.
Thank you! I will wait for the PM!
 

Eliaquim

Hakuen Studio
Veteran
Joined
May 22, 2018
Messages
1,841
Reaction score
1,266
First Language
Portuguese - Br
Primarily Uses
RMMZ
Updated to version 1.1!
- Fixed a bug that prevents the test switch to be turned on in the battle test.
- Added a battle switch.
- Improvement in the code.
 

Eliaquim

Hakuen Studio
Veteran
Joined
May 22, 2018
Messages
1,841
Reaction score
1,266
First Language
Portuguese - Br
Primarily Uses
RMMZ
Updated to version 1.2!
- Fixed a bug that prevents the game from loading a save file.
 

Eliaquim

Hakuen Studio
Veteran
Joined
May 22, 2018
Messages
1,841
Reaction score
1,266
First Language
Portuguese - Br
Primarily Uses
RMMZ
Updated to version 1.4!
- Changed the plugin parameters.
- Add new conditions to be attached to switches' values.
 

Eliaquim

Hakuen Studio
Veteran
Joined
May 22, 2018
Messages
1,841
Reaction score
1,266
First Language
Portuguese - Br
Primarily Uses
RMMZ
Version 1.6 - 08/22/2020
- Code restructuring.
Version 1.5 - 07/30/2020
- Add compatibility with Eli_FindIdByName.js
- Removed some unnecessary plugin parameters.
 

Latest Threads

Latest Posts

Latest Profile Posts

I just lost an hour plus of time to trying to modify the _battlefield sprite... when in reality MZ calls it _battleField ;_;

Even when debugging for the "undefined value", it looked exactly the same to my 20/60 eyesight.

I really prefer this_naming_convention rather than thisNamingConvention !!
hmm... I just solved one of the more annoying sideview battler problems in MV.. Passive States and Visual States can make it so when your character is in crisis HP, they don't go back to normal walk/wait when it's their turn. they stay in the crisis motion... neat.
Apparently all of LGBT reddit hates me. I posted a simple question and only got hate mail. What's the deal? The doompost was literally 6 months ago and I've changed my views since then and apologized.
MOD NOTE: See second response before replying to this. - Wavelength
Amazing. Simply amazing...

JRPG Browser - Playlist:

Forum statistics

Threads
109,107
Messages
1,042,125
Members
141,593
Latest member
Padouch
Top