Is it possible to increase the maximum number of variables?

Status
Not open for further replies.
Joined
Jan 11, 2016
Messages
9
Reaction score
1
First Language
German
Primarily Uses
I did hope that there will be more Variables in RPGMaker MV after it always was limited to 5000. But it seems to be 5000 again.


The problem is that i really need alot of variables in my education game for japanese kanji and alot vocabulary.


There are 2200 Kanji and i need 2 Variables for every Kanji. 1 Variable to count how often it was answered correct and 1 Variable who is counting the wrong answers.


(I really need this because i created a difficult system what is working with this informations to repeat the Kanji and vocabulary in a intelligent way)


So there are 4400 Variables used now for my Kanji and the rest is almost all used by the system.


I would really love to have like 2000 Variables more so i could add more vocabulary and usefull things. I tryed out alot of stuff by using items, characters and other stuff by conditional branches instead of using variables, but this is very complicated and slows down the game and isnt working fine with the system i created to handle vocabulary and kanji. I really love and need more Variables :3 just like 2000 more would be very fine.
 
Last edited by a moderator:

Seriel

Veteran
Veteran
Joined
Aug 16, 2014
Messages
3,013
Reaction score
504
First Language
English
Primarily Uses
Other
For Ace there was a limit breaker script.


I don't know if a limit breaker plugin was made for MV yet.
 

Rinobi

Veteran
Veteran
Joined
Mar 24, 2014
Messages
579
Reaction score
220
First Language
English
Primarily Uses
RMVXA
Ignoring the insanity of using over 5k variables, and assuming MV is similar to Ace, could you not simply create additional global variables with a script call?
In VX Ace it would have been:


$new_variable = value


I haven't started studying javascript yet, so I'm uncertain.


Honestly though. if you're using that many, you're doing something wrong...
 

ZServ

Veteran
Veteran
Joined
Jun 16, 2014
Messages
260
Reaction score
71
Primarily Uses
Ignoring the insanity of using over 5k variables, and assuming MV is similar to Ace, could you not simply create additional global variables with a script call?
In VX Ace it would have been:



$new_variable = value


I haven't started studying javascript yet, so I'm uncertain.


Honestly though. if you're using that many, you're doing something wrong...



I don't think it's that he's doing something wrong, he's just making an "education" based game, which inherently will deal with weird problems "normal" games won't. He does need to keep track of how many times it was answered correct vs incorrect, and there are a LOT of kanji, even for an elementary schoolers level of education. The simplest way, is, in fact, 2 variables for every kanji. But, due to the limit that won't work.


Arrays are a beautiful thing. Complicated as sin, and a pain in the ass sometimes, but beautiful.
 

xDGameStudios

Veteran
Veteran
Joined
Sep 15, 2012
Messages
102
Reaction score
60
First Language
Portuguese
You can use something like;

ScriptCall (use this as soon as possible when loading or creating your game):


$gameSystem.rightKanji = $gameSystem.rightKanji || [];
$gameSystem.wrongKanji = $gameSystem.wrongKanji || [];



ScriptCall (use this to increase the value of the right or wrong answers) X is the number of the kanjiVariable... just like the game variables value.:


if($gameSystem.rightKanji[x])
$gameSystem.rightKanji[x]++;
else
$gameSystem.rightKanji[x] = 1;


OR


if($gameSystem.wrongKanji[x])
$gameSystem.wrongKanji[x]++;
else
$gameSystem.wrongKanji[x] = 1;


PS: to decrease replace '++' with '--' and 1 with 0;

for easy manipulation, to read value and do operations in events use:


$gameVariables.setValue(Y, $gameSystem.rightKanji[X]);

OR

$gameVariables.setValue(Y, $gameSystem.wrongKanji[X]);


This will make it so Y game variable will have the number of right/wrong answers for the X kanji. and then you can use it normally on the event ;)  if you change the value don't forget to write it back to the array with the code:
 


$gameSystem.rightKanji[X] = $gameVariables.value(Y);

OR

$gameSystem.wrongKanji[X] = $gameVariables.value(Y);


This will make it so number of right/wrong answers of X kanji is equal to the value stored in Y variable.
With this you can access every kanji with just ONE game variables!!
Hope this helps!
 

Orsalak

The Blissfully Ignorant
Veteran
Joined
Jul 9, 2015
Messages
66
Reaction score
23
First Language
English
Primarily Uses
What are the || for in your code:   $gameSystem.rightKanji = $gameSystem.rightKanji || [];


I've seen that in scripts when instantiating objects and arrays but javascript sites show a different way to instantiate those.  I can't find || on any javascript sites outside of being used as an OR operator, which doesn't appear to be the case here.  Sorry for the dumb question.
 

Kaliya

// Caffeine Overload
Developer
Joined
Nov 1, 2015
Messages
506
Reaction score
567
First Language
English
Primarily Uses
RMMV
No, that is the case here. Its basically stating that "$gameSystem.rightKanji" is either itself if instantiated elsewhere, or already, OR it is a new array.
 

hidrax11

Villager
Member
Joined
Jan 18, 2020
Messages
8
Reaction score
3
First Language
turkey
Primarily Uses
RMMV
anybody breaking the limit
 

slimmmeiske2

Little Red Riding Hood
Global Mod
Joined
Sep 6, 2012
Messages
8,259
Reaction score
5,433
First Language
Dutch
Primarily Uses
RMXP

hidrax11, please refrain from necro-posting in a thread. Necro-posting is posting in a thread that has not had posting activity in over 30 days. You can review our forum rules here. Thank you.


You already have your answer in your own thread.
 
Status
Not open for further replies.

Latest Threads

Latest Posts

Latest Profile Posts

finally redesigned one of the major antagonist of my game, Pro... aka Prometheus.
Well, I've decided I'll take a break on making Forgotten Eclipse...and Make a mod for FNF
Trailer for my new game.
last one for a while

Forum statistics

Threads
110,314
Messages
1,052,266
Members
143,351
Latest member
TheWanderer1990
Top