Question about MV engine limitations

Snarkyfork

Veteran
Veteran
Joined
Oct 29, 2015
Messages
308
Reaction score
30
First Language
English
Primarily Uses
I noticed the limit on switches and variables is 5000, I imagine you could make a very complex and fairly large game with that number. I am trying to wrap myself around just how much scope that gives devs in creating their games, how hard would it be to hit that cap?
 

Zerothedarklord

Veteran
Veteran
Joined
Jun 25, 2013
Messages
262
Reaction score
69
First Language
English
Primarily Uses
RMMV
I noticed the limit on switches and variables is 5000, I imagine you could make a very complex and fairly large game with that number. I am trying to wrap myself around just how much scope that gives devs in creating their games, how hard would it be to hit that cap?
Obviously not impossible, but I wouldn't worry about hitting that cap.
In VX years ago, I completed 2 15-20 hour full games, neither of which even surpassed 300. Mind you, they were rather basic games, but still. To even come close to 5000, you have to be REALLY trying.
 

MushroomCake28

KAMO Studio
Global Mod
Joined
Nov 18, 2015
Messages
3,701
Reaction score
4,659
First Language
English
Primarily Uses
RMMZ
I don't think you have to worry about hiting the cap for switches and variables. And even if you did, there are ways to bypass that limitation if you use script calls and/or create your own plugins.
 

Mewgles

Veteran
Veteran
Joined
Jul 24, 2020
Messages
85
Reaction score
89
First Language
German
Primarily Uses
RMMZ
You also have to keep in mind that you could probably recycle quite a few switches with proper planning. There really is nothing to worry about. Even without any planning at all it's highly unlikely you'll get even close to running out of switches.
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
31,244
Reaction score
7,623
First Language
German
Primarily Uses
RMMV
under any regular development it's impossible to get to that number.
However there have been cases where developers got into trouble with not having enough variables due to specific design decisions (bad decisions in my opinion, but that is beside the point).

For example there was one person who decided to use variables to get every actor assigned with new skill values and new parameter values, because with variable he could do whatever he wanted.
And then he ended up with twenty variables needed for each single actor, and tried to make a game that had twohundred different actors.
As far as I know he never got it anywhere near to finish, but that would have used up 4000 variables just for actor values, just because he planned it that way instead of using plugins and keeping to a reasonable number of actors...
 

Tiamat-86

old jrpg gamer
Veteran
Joined
Dec 5, 2017
Messages
540
Reaction score
219
First Language
english
Primarily Uses
RMMV
you can make 18hour game on handheld with 100switch/variable limit. so wouldnt worry about that to much. more likely to hit the 999 map limit but still only on very large projects.
but theres plugins to break all those limits.
wouldnt event think about a project that large until after done a few sample projects(2-5h) and 20hour projects
 

ScorchedGround

Blizzards most disappointed fan
Veteran
Joined
Apr 12, 2020
Messages
328
Reaction score
472
First Language
German
Primarily Uses
RMMV
If you really are scared to hit either of these caps, also keep in mind that you can use variables as
pseudo-switches.
Basically set a variable to 0 for "switch off" and to 1 for "switch on"

I say this because in my experience its more likely you would hit the switch limit first and so you can recycle variables to use them for switches.

But as others have said, it is very unlikely to hit that limit, even if you don't use switches and variables as efficiently as possible.

My game has about 4 hours of gametime now and I am not even close to being concerned about switch and variable limits.
 

akoniti

Veteran
Veteran
Joined
Mar 4, 2020
Messages
85
Reaction score
64
First Language
English
Primarily Uses
RMMV
If you really are scared to hit either of these caps, also keep in mind that you can use variables as
pseudo-switches.
Basically set a variable to 0 for "switch off" and to 1 for "switch on"

I say this because in my experience its more likely you would hit the switch limit first and so you can recycle variables to use them for switches.
Right out of the gate with MV I did just that by accident lol. Shortly after creating a pile of 0/1 variables, I discovered switches! Agreed, it typically takes more switches than variables to make a world work.

Ultimately I couldn't imagine ever hitting the 5K cap, and if I did I'd have to take a hard look at my design decisions as @Andar mentioned.
 

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

Latest Threads

Latest Posts

Latest Profile Posts

Oh no. That moment when you try to fix something you modified in your game, like, a year ago but didn't want to fix then, and you now have no idea what you even did. Me right now, trying to figure out why my gold window is over stretched?
LittlePIGGY wrote on atreyoray's profile.
Where are you TT^TT
We need ARP_InGameManual for MZ
Oh my gosh. Thank you, Macy's! Thank you so much! You have made me very happy!
Happy Thanksgiving everyone! What are you thankful for? I'm thankful that I no longer have PTSD, and that I get to enjoy a good meal with my mom and stepdad! It might not be the same as before COVID, but at least I still get to enjoy the holiday!

Forum statistics

Threads
105,549
Messages
1,014,561
Members
137,225
Latest member
Eryndor
Top