If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.
Announcement
Collapse
No announcement yet.
Hmm...Think I May Need Some Help Using Variables...
Re: Hmm...Think I May Need Some Help Using Variables...
Hmm...I think I understand it a bit more, though it still seems wonky...must because it's new to me.
Hrmm...for what I was trying to do, does that even take variables? Like another example would be, say, if you had your knight guy go and slay a dragon, would you use variables so that some townspeople acknowledge his victory, thus saying something different than they did in the first place?
Re: Hmm...Think I May Need Some Help Using Variables...
I would, but this RPGM is funky in that it does have conditions for NPCs. But there is a way to work around that.
They have one called "Val-Conditional Branch" which basically works like the multiple choice scripts, but instead of asking for yes and no it determines what part to say depending on the variable. So it's like conditions for events, but different. I don't know why they didn't give conditions for NPCs, but whatever.
Re: Hmm...Think I May Need Some Help Using Variables...
Another way to let the townsfolk know he beat the dragon would be to have the dragon drop an item and set events with a condition that the player has that item.
The only problem I foresee with this is if items can not be set as "can not drop/sell" (I think that happens when the item value=0... but have had limited time to play with this during my workweek).
I am sure there are ways around variables if they daunt you, but learning variables would enable you to create much better games.
Re: Hmm...Think I May Need Some Help Using Variables...
Variables are storage spaces for numbers, which can then be called on by the program either to determine the player's progress, or to perform calculations.
Let's say you have a game with 5 separate towns, each with a quest, each of which has to be completed in order. You have two different dialogues for each person in town, one for before the quest's completion, one after. In addition, there's something that prevents the party from moving on, which allows the party to proceed after the quest's completion.
Initially, the variable keeping track of the player's progress is 0. After completing each quest, the variable is increased by 1. Thus, in the event that marks each quest's completion, you put in a command to add 1 to the variable.
In the first town, you set each event to check the value of the variable. If the value is 0, it means the quest is incomplete, and everybody tells the player how terrible it is (The player weeps crocodile tears for the pixelated orphans and move on). If the value is > (greater than) 0, then they tell the player how great it is, and the obstruction is removed. The party can move on.
The second town has a similar setup, same weepy townfolk with some sort of problem. But this time the program is checking to see if the variable is < (Less than) 2, or > (Greater than) 1. Currently, the variable is 1, so the townsfolk beg for help, the player curses the programming gods, the player saves the town, the variable jumps from 1 to 2. Now the variable value tells the program that it's time for some ass kissing by the natives. The player moves on.
Another application of variables is as follows:
Let's say you have a scoring mechanism within your game, dependent on the number of optional sidequests completed and the number of secret items found. Whenever a secret item is discovered, or a sidequest is completed, you add a command to increase the score by a value (The value can be any number. So let's say you get 2 points for finding a fairly easy to find item, but you get 10 points for a gruelling, lengthy, and challenging sidequest). Let's say you grade this by precentage (A=81-100, B=61-80, C=41-60, D=21-40, F=0-20). At the end of the game, you set the program to check for the score, and compare it to those quidelines, Score>80 for A, Score>60 for B and so-on.
Unfortunately, I don't know much yet about all the ways in which variables can impact the game in RPGM3. I do believe that those two examples are possibilities for variables.
Re: Hmm...Think I May Need Some Help Using Variables...
All the examples here have been instructive, but hey, I'll throw in one more. Each character has their own internal variables (which means there are a basically unlimited number of variables.) For each playable character I'll have, their first variable will be the "joined" variable.
0=never met this character yet. Talking to them will add one.
1=have met them, haven't done whatever is needed to use them yet. they may give you a quest or tell you talk to the chief or come back later. When the player does whatever is needed, one will be added to the variable.
2=They may join you--but haven't. So if you talk to them when their first internal variable =2, they will give you the choice to take them with you (unless you have four people already, which is tracked by another variable) If you take them with you, one more will be added to the party.
3=they are in your party. (the game automatically removes the character from the map when they join you--so cutscenes w/PCS not active will need storyteller!) I will make an event somewhere that only activates if you have this variable at 3 and asks you if you want to remove the party member. If so, the variable gets -1.
Later on in the game, if there is an occurance you want a character to commment on, but don't know if the player will have that character in their party, you will do a "val conditional branch" that will display their dialogue only if their first variable is set to 3. You could do this for each character on one event mode, which is different than RPGM1, where each would have needed a separate page.
Hope that helps someone... I have a good understanding of variables from my days programming RPGS on my TI-82 calculator. Graphics sucked, but it wasn't limiting... lol.
Re: Hmm...Think I May Need Some Help Using Variables...
Noob question...
If you the game check for the variables.
Each time someone find a treseaure or get money reward, you have to change the variable to make sure its not collect more than 1 time right?
Like
Opening the chest would add +1 to the variable, and the game would know that if it equals 1 or more, the reward has already been collected...
Re: Hmm...Think I May Need Some Help Using Variables...
Well, fiddled with them some more...and though I understand them a bit better now...still haven't gotten one to work.
This time I made a character say one thing...and programmed it to bring its internal variable to one...and having a second mode prepared (with new dialogue), I tried to set the condition for that new dialogue to having a variable equal to one. Since there are no set conditions for characters, I tried that Val Conditional Branch...which did nothing.
These variable seem tricky for some reason...considering how easy the rest of the game is to use, you would think they would have made the event governing system more streamlined.
I'm starting to miss how switches worked, heh.
Comment