RicoRob

Veteran
Veteran
Joined
Apr 28, 2016
Messages
62
Reaction score
4
First Language
Portuguese (Br)
Primarily Uses
RMMV
(I'm sorry if such plugin already exists, I really couldn't find it. :frown:)

Would it be possible to have a plugin that turns predetermined Switches ON as soon as the game starts/loads/during playtest?
I know I can do that manually with an event, but what I mean is, turning a Switch ON automatically, without having to set up an event/variable/whatever.

Noob question: Would it be problematic (impact performance or something) to have a plugin like that running all the time, checking for those Switches non-stop, during all scenes?

Any help would be appreciated.
 

ShadowDragon

Realist
Veteran
Joined
Oct 8, 2018
Messages
4,430
Reaction score
1,690
First Language
Dutch
Primarily Uses
RMMV
to start the game with some switches ON or playtest doesn't require a plugin.

you simply make a autorun event and put the switches on you want to be on on the start (or starting map).
use a selfswitch to a blank page and thats basicly it.
 

Tai_MT

Veteran
Veteran
Joined
May 1, 2013
Messages
5,586
Reaction score
5,071
First Language
English
Primarily Uses
RMMV
I'd have to agree with @ShadowDragon here. It's just going to be far easier for you and less resource intensive to have an auto-run event flip all the switches the moment the first map loads in and then flip a page so the auto-run event doesn't keep activating.

It doesn't even take that long to set it up.

Then, all you need to do, is anytime you need to check if those switches are on or off is to have a conditional branch in an event (common event, or interactable event) that checks for the switches being on.

Also, yes, it lags the game to have the system checking constantly for something. If I remember correctly, the program itself will "check" if something is true about 30 times a second. That is to say, it would check if your switches are "on" 30 times each second of real time. It is often better to just have the program check at specific points. Like say, you activate an event by clicking on it. Or, some cutscene calls for the program to check it and check it just once.

You don't want to be checking for it constantly. It'll cause some problems.
 

caethyril

^_^
Global Mod
Joined
Feb 21, 2018
Messages
2,773
Reaction score
2,123
First Language
EN
Primarily Uses
RMMZ
Event page conditions are checked following a possible change in a page condition, i.e. whenever a switch is toggled, a variable changes value, an item is gained/lost, etc. Autorun/Parallel trigger events will attempt to start once per frame as long as they're not already running (which is why Wait commands are often highly recommended in those situations); RMMV runs at 60 fps by default.
 

bgillisp

Global Moderators
Global Mod
Joined
Jul 2, 2014
Messages
13,939
Reaction score
14,774
First Language
English
Primarily Uses
RMVXA
While a plug-in could be made, you will have to still set it up and tell it which switches to turn on, and honestly that will probably be as much work as the autorun event, if not more so as in a plug-in you can't see what you've named the switches so you;ll have to keep checking those too to make sure they are correct.
 

Dread_Nyanak

Veteran
Veteran
Joined
Feb 24, 2019
Messages
166
Reaction score
294
First Language
English
Primarily Uses
RMMV
I'm going to have to disagree with some of the posters above. While putting an autorun event on the start map works fine, when testing the game it's often convenient to move the player start location a bunch. But if you move the start location to a different map, your setup event never runs.
This is something I wanted too, so I decided to make it.
The plugin will set up two variables, one will only be set if you're in playtest. The gamestart switch can be used to trigger a common event and do the rest of your setup.
 

Attachments

  • dread_newgame_switches.js
    623 bytes · Views: 13

RicoRob

Veteran
Veteran
Joined
Apr 28, 2016
Messages
62
Reaction score
4
First Language
Portuguese (Br)
Primarily Uses
RMMV
I'd have to agree with @ShadowDragon here. It's just going to be far easier for you and less resource intensive to have an auto-run event flip all the switches the moment the first map loads in and then flip a page so the auto-run event doesn't keep activating.

It doesn't even take that long to set it up.

Then, all you need to do, is anytime you need to check if those switches are on or off is to have a conditional branch in an event (common event, or interactable event) that checks for the switches being on.

Also, yes, it lags the game to have the system checking constantly for something. If I remember correctly, the program itself will "check" if something is true about 30 times a second. That is to say, it would check if your switches are "on" 30 times each second of real time. It is often better to just have the program check at specific points. Like say, you activate an event by clicking on it. Or, some cutscene calls for the program to check it and check it just once.

You don't want to be checking for it constantly. It'll cause some problems.

:eek:... I see. I will keep the auto-run event then.

(I might use Nyanak's plugin for playtesting. It can be really useful.)

Thank you all so much! :wink:
 

Latest Threads

Latest Profile Posts

gotta love when a plugin you thought had nothing to do with why something else wasn't working winds up being the issue...
Doing RPG Maker News for 26th September 2021

Well... it's been a while since I was last here :kaoswt: I don't want to say I'm officially 'back' yet, but I've recently started working with RM again, so I might become active here again :kaohi:
Mmmm I love Coca Cola candy! :kaoluv:
aaaand my power is out. I sometimes think that I'm cursed.

Forum statistics

Threads
115,388
Messages
1,089,517
Members
150,123
Latest member
lauram22
Top