VARIABLES - USEFULL OR NOT-SO-MUCH?
Posts
EDIT: FAIL! OK, I forgot to mention, I'm using VX...
OK, so I will be the first one to come out of the closet and openly admit what a whole boat load of other RMN-ers are afraid to admit:
Variables are scary.
There, I said it, now can we move along? Are Variables really something that should be considered a basic necessity of any game developers? If so, then why??? Maybe it's just because I don't really understand them (and yes, I've been reading the tutorials), or maybe its just because I don't really see what they can honestly do in a game.
Can someone show me a game where Variables were heavily used? This might be a good way for someone to truly understand... Maybe someone can explain some basics that I 'could' see them used for - such as, lets say, a boss battle or a Battle Tutorial < now THAT one, I could understand.
But, how would you even do these sort of variables? I understand the basics, =Set the Variable, +Add or -Subtract from the Variables; this is great and all, but how do you really implement them in an event (and I'm not talking about adding them, I clearly understand that part)? What are the real pro's to these frightening little things and what are their limitations in the RPG Maker world?
OK, so I will be the first one to come out of the closet and openly admit what a whole boat load of other RMN-ers are afraid to admit:
Variables are scary.
There, I said it, now can we move along? Are Variables really something that should be considered a basic necessity of any game developers? If so, then why??? Maybe it's just because I don't really understand them (and yes, I've been reading the tutorials), or maybe its just because I don't really see what they can honestly do in a game.
Can someone show me a game where Variables were heavily used? This might be a good way for someone to truly understand... Maybe someone can explain some basics that I 'could' see them used for - such as, lets say, a boss battle or a Battle Tutorial < now THAT one, I could understand.
But, how would you even do these sort of variables? I understand the basics, =Set the Variable, +Add or -Subtract from the Variables; this is great and all, but how do you really implement them in an event (and I'm not talking about adding them, I clearly understand that part)? What are the real pro's to these frightening little things and what are their limitations in the RPG Maker world?
Variables, especially if you're using 2k or 2k3 are absolutely necessary in order to make what you might call "advanced" game features.
Variables open up the possibilities of what you can do immensely. Some things switches just can't handle.
The most common use of variables is actually when used with the "equal to" operator. So that goes like this:
Set Variable 0001 equal to Number of potions held on a parallel process common event.
Conditional branch - If variable 0001 = 100 then:
Display message - YOU HAVE ONE HUNDRED POTIONS.
Now that's a really, really simple example.
Variables are like, literally the only way to do certain things.
Also variables do a lot of behind the scenes work in making systems work. This is a clip of one of my projects which uses a lot of variables, nothing too scary or hard to understand.. But lots of them nonetheless (and would have been absolutely impossible to achieve without variables).
{/shameless self promo}
In short, understanding variables allow you to do like, 100 times what you could before.
Variables open up the possibilities of what you can do immensely. Some things switches just can't handle.
The most common use of variables is actually when used with the "equal to" operator. So that goes like this:
Set Variable 0001 equal to Number of potions held on a parallel process common event.
Conditional branch - If variable 0001 = 100 then:
Display message - YOU HAVE ONE HUNDRED POTIONS.
Now that's a really, really simple example.
Variables are like, literally the only way to do certain things.
Also variables do a lot of behind the scenes work in making systems work. This is a clip of one of my projects which uses a lot of variables, nothing too scary or hard to understand.. But lots of them nonetheless (and would have been absolutely impossible to achieve without variables).
{/shameless self promo}
In short, understanding variables allow you to do like, 100 times what you could before.
Variables aren't scary!
They're very useful and I would definitely consider them an important necessity. They have many, many, many potential uses, pretty much anywhere you would ever need to plug in a number.
Probably the most basic use of a variable is simply to keep track of a number. Maybe a door opens when you activate five switches. Each time you activate a switch, increase a variable by one. When it reaches five, the door opens! Simple!
There are many, many more uses for them besides this, but that's probably one of the most basic functions and a good starting point to understanding what they can do.
They're very useful and I would definitely consider them an important necessity. They have many, many, many potential uses, pretty much anywhere you would ever need to plug in a number.
Probably the most basic use of a variable is simply to keep track of a number. Maybe a door opens when you activate five switches. Each time you activate a switch, increase a variable by one. When it reaches five, the door opens! Simple!
There are many, many more uses for them besides this, but that's probably one of the most basic functions and a good starting point to understanding what they can do.
Variables are everything! Or you could just use switches- wait no those are just boolean variables...
They're used for calculations, storing information, making comparisons... and as far as RPG Maker goes, they're really simple.
Give me a second and I'll find you a tutorial, because once you get how to use them a little, the rest about them just kind of falls into place.
EDIT: Double ninja'd
They're used for calculations, storing information, making comparisons... and as far as RPG Maker goes, they're really simple.
Give me a second and I'll find you a tutorial, because once you get how to use them a little, the rest about them just kind of falls into place.
EDIT: Double ninja'd
I've never used VX but I'm pretty sure that a lot of scripts must contain a tonne of what amount to variables within them anyway. Also, being able to use scripts is no excuse not to use variables too! :D
Please don't get the impression I'm saying that variables are there to make up for a lack of script support (although they're often used that way by 2k/3-ers) - They're like, one of the most fundamental aspects of making something with some flexibility other than just very limiting "ON" and "OFF" conditions.
Also worth mentioning that being able to use variables and conditional branches together can significantly reduce the amount of switches you need to use to achieve certain things.
Please don't get the impression I'm saying that variables are there to make up for a lack of script support (although they're often used that way by 2k/3-ers) - They're like, one of the most fundamental aspects of making something with some flexibility other than just very limiting "ON" and "OFF" conditions.
Also worth mentioning that being able to use variables and conditional branches together can significantly reduce the amount of switches you need to use to achieve certain things.
I rarely use switches in RM2k3. For just about every questline I use variables; they are the easiest way to handle both linear and certain non-linear progressions. A single variable can do the work of hundreds of switches (ideally!).
Here's an easy way to get started with variables (In RM2k3, although the dialogue in RMXP is very similar if I recall):
In the first page of an event, you'll see:
Switch is ON
Switch is ON
Variable
Under variable, you have the "which variable" option, and the the list of options (greater than, equal to, blah blah) and a number. Let's say you're using a variable called 0005:Quest Variable.
Now, let's say you've got to talk to ten people in a certain order. Well, what better way to track that order than to use that handy variable we named 0005:Quest Variable earlier?
You can set each NPC you wish to talk to as having the precondition 0005:Quest Variable is equal to 0-10. So, the first NPC would have his precondition set to 0005:Quest Variable is equal to 0, and when his dialogue is finished, that variable would be set +1 (changing 0005:Quest Variable to equal 1). The second NPC would have his precondition set to 0005:Quest Variable is equal to 1 (which it now is, thanks to the first NPC!) and when his dialogue is done, he sets 0005:Quest Variable to be equal to 2. You can now speak with the NPC who has her precondition set to be 0005:Quest Variable is equal to 2 (and when she's done, she sets it to 3, continuing the cycle). You can apply this to EXTREMELY long quest chains, all contained within a single variable, without using any switches whatsoever.
I sure hope that made sense.
tl;dr: variables are intrinsically important for all projects, even simple ones. They are very daunting at first (I remember those days), but once you get the hang of them they are as simple as switches (but way, way more flexible). Practicing with them is the easiest way to get comfortable doing more and more complex things with them, which you'll do naturally after awhile.
Here's an easy way to get started with variables (In RM2k3, although the dialogue in RMXP is very similar if I recall):
In the first page of an event, you'll see:
Switch is ON
Switch is ON
Variable
Under variable, you have the "which variable" option, and the the list of options (greater than, equal to, blah blah) and a number. Let's say you're using a variable called 0005:Quest Variable.
Now, let's say you've got to talk to ten people in a certain order. Well, what better way to track that order than to use that handy variable we named 0005:Quest Variable earlier?
You can set each NPC you wish to talk to as having the precondition 0005:Quest Variable is equal to 0-10. So, the first NPC would have his precondition set to 0005:Quest Variable is equal to 0, and when his dialogue is finished, that variable would be set +1 (changing 0005:Quest Variable to equal 1). The second NPC would have his precondition set to 0005:Quest Variable is equal to 1 (which it now is, thanks to the first NPC!) and when his dialogue is done, he sets 0005:Quest Variable to be equal to 2. You can now speak with the NPC who has her precondition set to be 0005:Quest Variable is equal to 2 (and when she's done, she sets it to 3, continuing the cycle). You can apply this to EXTREMELY long quest chains, all contained within a single variable, without using any switches whatsoever.
I sure hope that made sense.
tl;dr: variables are intrinsically important for all projects, even simple ones. They are very daunting at first (I remember those days), but once you get the hang of them they are as simple as switches (but way, way more flexible). Practicing with them is the easiest way to get comfortable doing more and more complex things with them, which you'll do naturally after awhile.
Hell the Vanit person who is making that 2d remake of FF7 HAS to use Variables. Look it up on RRR or whatever it is and download the demo or see if he posted a video somewhere to see what I'm talking about.
Variables are great for making minigames and puzzles, or any extra add-on features, or tracking basically anything a player collects. Numbers are a huge part in an RPG. I, personally, rely on them for the first one-minigames. Things like setting enemy HP, number of bullets, etcetera!
Dude, even with VX, some things require you to have variables, and yes without
variables, I would have never used RPG2k3. They are a necessity.
variables, I would have never used RPG2k3. They are a necessity.
author=Pokemaniac
Variables are everything! Or you could just use switches- wait no those are just boolean variables...
I would say that this is an understatement but there's no other way to say that VARIABLES are everything, specially in programming (which is what you're "technically" doing in RM's Eventing) IT'S UNAVOIDABLE.
It depends on what you want to do, but a variable is just a container of values that you manipulate for your needs. For example, coordinates for pictures/sprites/windows/etc.
since switches are also variables, variables are a necessity for every single game. this is not debatable
I think that with variables, the TC only means the variables that the editor calls variables, not everything else that's also variables. Even with that definition though, I wonder what kind of game you can make without them.
As geodude said switches ARE variables. For the rest of this post, ignore that fact, however.
90% of the stuff I need to do, typically, I can handle with just switches (which, incidentally, are just variables that can only be set to 0 or 1 (booleans) and once you apprehend that it makes variables less scary) but for the remaining 10% variables are ABSOLUTELY ESSENTIAL.
For some people more involved in advanced picture manipulation, battle system customization by event, and so forth, the split might be more heavily in the favor of variables: 50/50 or more.
Variables themselves really aren't scary, though. They just store numerical values; how to use them is up to you. Now show picture, that, to me, after all these years, is still scary. It has always worked in a way I thought was deeply counterintuitive.
Browsing through other blokes' games in the editor, I've noticed a lot of people do this (I wouldn't say both). Using variables in this way instead of individual switches has its advantages and disadvantages; I've experimented with it.
90% of the stuff I need to do, typically, I can handle with just switches (which, incidentally, are just variables that can only be set to 0 or 1 (booleans) and once you apprehend that it makes variables less scary) but for the remaining 10% variables are ABSOLUTELY ESSENTIAL.
For some people more involved in advanced picture manipulation, battle system customization by event, and so forth, the split might be more heavily in the favor of variables: 50/50 or more.
Variables themselves really aren't scary, though. They just store numerical values; how to use them is up to you. Now show picture, that, to me, after all these years, is still scary. It has always worked in a way I thought was deeply counterintuitive.
I rarely use switches in RM2k3. For just about every questline I use variables; they are the easiest way to handle both linear and certain non-linear progressions. A single variable can do the work of hundreds of switches (ideally!).
Browsing through other blokes' games in the editor, I've noticed a lot of people do this (I wouldn't say both). Using variables in this way instead of individual switches has its advantages and disadvantages; I've experimented with it.
As the successor of RM95 you could put a stick through the middle of two round rocks and it would be a startling revelation
that would be an improvement, not an innovation. i don't think rpg maker 2000 pioneered the use of user-defined variables in home game engines!
oh god it's happening again
oh god it's happening again
I was using innovation in the context of the RPG Maker series, which is to say I was horribly butchering the meaning of the word innovation. Perhaps "RM2000's Greatest New Features" would be more apt























