RMRK is retiring.
Registration is disabled. The site will remain online, but eventually become a read-only archive. More information.

RMRK.net has nothing to do with Blockchains, Cryptocurrency or NFTs. We have been around since the early 2000s, but there is a new group using the RMRK name that deals with those things. We have nothing to do with them.
NFTs are a scam, and if somebody is trying to persuade you to buy or invest in crypto/blockchain/NFT content, please turn them down and save your money. See this video for more information.
Looking for Variable Tuts for RPG Maker 2k3

0 Members and 1 Guest are viewing this topic.

**
Rep: +0/-0Level 83
I've been searching everywhere for easy to understand tutorials on variables for 2k3. I taught myself how to make basic events using switches, but I'm having great difficulty learning how to use variables, how they work, and what makes variables work.
If anyone is able to explain variables or knows links to working variable tutorials (for 2k3 only please) could you please post them here? I would be forever indebted to whomever can help me!

A bonus might be step by step instructions on how to set up an event using variables that I could practice with...something that says "do this first by going here, this is what it does, and this is why it works". That sort of set up seems to teach me the best :3

Thank you so much!

***
Rep:
Level 86
Sonic Dog -> Light Spear -> Overlimit -> Slash
I'm sure there are a bunch of them laying around here, try an advanced search of just this forum.

If you still don't find one you're looking for, I suppose I can help you out. I don't have much time today, but I should be open for the next couple days.

**
Rep: +0/-0Level 83
I've looked through the entire RPG Maker 2k/2k3 Tutorial section and moved on to other sections just browsing around and picking up tidbits of new information regarding other things so far. I've tried searching for specific things, but all the comes up are tutorials for other versions.

I tried reading through them to see if it might help me learn anyhow, but it all seems too complex. I know I can learn it though if it's presented in the right way... telling me what I have to do and why, and how each step changes the event.

I really appreciate your response Sirius, I hope you are able to help me. Thanks for your time :)


**
Rep: +0/-0Level 83
Nessiah those links were helpful on explaining what a variable is, I never thought of it as a container anymore...but what do you do when you put a number in the variable?
How do you make that number do something?

I suppose if I explained something I wanted to do with variables, maybe it would help... I want to make a fishing game, where I can fish off the end of a dock. You have a rod and bait. For each bait you can catch one fish. I have in my database about 10 different fish. When one bait is taken away, I want one fish to be given to you RANDOMLY out of those 10 fish. None of the fish are more rare than one another, so you have a 1 in 10 chance to get each fish.

*****
Rep:
Level 85
I am the wood of my broom
2010 Project of the YearProject of the Month winner for January 2009Project of the Month winner for January 2010Project of the Month winner for April 2010
Do it like this, this is just  a rough example and might contain bugs for some reason*

Variable 003: FISH

Variable Operation: Var 3 random 1-10
Conditional branch
If Variable 3 is 1
Message: CHARACTER CAUGHT A MILKFISH OMG
Add Item: Milkfish
end
If Variable 3 is 2
Message: CHARACTER CAUGHT A Nessiahfish
Add Item: Nessiah fish
end
rinse and repeat till you have all ten


**
Rep: +0/-0Level 83
Thanks :3
I tried it out but it doesn't seem to work, but I'm starting to be able to visualize how variables work.

Do I have to put a conditional branch multiple times? Do I need separate pages in the event?
« Last Edit: July 05, 2009, 04:01:45 PM by Pearlstardust »

*****
Rep:
Level 85
I am the wood of my broom
2010 Project of the YearProject of the Month winner for January 2009Project of the Month winner for January 2010Project of the Month winner for April 2010
It should work :S
To be honest I didn't put them in branches because it would look too messy.
But here's one thing, did you make sure that when you catch a fish, an event will call the event the thing was placed on or something?


**
Rep: +0/-0Level 83
I don't know what you mean :/
I really don't know how to use anything besides making basic event's using switches.

I have never used variables, common events, parallel processes etc.

**
Rep: +0/-0Level 83
Okay, so I was messing around with variables, trying different things to see what worked and what didn't. I'll post what I did step by step, what it's doing, and what is going wrong and we'll see if we can pinpoint what I need to do and why :D

I went into Variable Operations and set it as:
Single Variable 0001:fishing
Operation: Add
Operand: Random Number between 1 and 3
So it shows up as: <>Variable Oper: [0001:fishing]+ , Rnd [1-3]

Then below that I put in a Conditional Branch for if the variable 0001:fishing was 1 you would get a red fish.
and in the Else Handler I put in another branch for 2 and so forth.

My code looks like this:

<>Variable Oper: [0001:fishing] + , Rnd [1-3]
<>Branch if Var [0001:fishing] is 1
  <>Change Items: red fish 1 Add
  <>Message: You got a red fish!
  <>
:Else Handler
  <>Branch if Var [0001:fishing] is 2
    <>Change Items: blue fish 1 Add
    <>Message: You got a blue fish!
    <>
  :Else Handler
   <>Branch if Var [0001:fishing] is 3
     <>Change Items: yellow fish 1 Add
     <>Message: You got a yellow fish!
     <>
   :Else Handler
     <>
   :End
   <>
  :End
   <>
:End


And what happens is, I click on the event, it gives me a random fish (Yay! I actually got a random item!) But after that, I go to click it again and I get no message but I get another of the same fish.

I want to be able to use this event over and over as long as I have bait, and I want the event to randomize every time I click on the event, giving me the message.
Would I add a loop maybe?
Once I fix this variable section of my event, I will be able to add in the condition that I need a rod to start the event, then I need bait to get to the second page of the event where the variable part will be. and after each fish is given to me, one bait is taken.
If I run out of bait, I won't be able to get to the second page of the event, but if I get bait again, I will be able to fish again.

*****
Rep:
Level 85
I am the wood of my broom
2010 Project of the YearProject of the Month winner for January 2009Project of the Month winner for January 2010Project of the Month winner for April 2010
Single Variable 0001:fishing
Operation: Add
Operand: Random Number between 1 and 3
So it shows up as: <>Variable Oper: [0001:fishing]+ , Rnd [1-3]

Why do you have an operation Add? just make it SET
it means that for example, the character has 3 fishing as a set variable, now since you set it add it will add either, 1,2,3 so if it adds 3 it becomes 6! then you won't get a message because your else variable over there is BLANK this part specifically:
Quote
<>Branch if Var [0001:fishing] is 3
     <>Change Items: yellow fish 1 Add
     <>Message: You got a yellow fish!
    <>
   :Else Handler
     <>

   :End
   <>
  :End
   <>
:End

In a more friendly and proper explanation
I catch fish 3!
Now I try again
but the variable adds it
so I got 1 this time in random
and then my result will be 3+1 = 4
now I have 4 variable
but the variable list says more than 3 nothing will happen
so I don't get any :<
« Last Edit: July 07, 2009, 01:31:50 AM by Nessiah »


**
Rep: +0/-0Level 83
Oh! Right, that makes perfect sense. I only had it set as add because I was trying different things and seeing what happened and trying to figure out why :P
I'm gonna go change the event and see if there are any more problems.. hopefully there won't be :P

Edit: Alright, I have it as SET. What do I do to make the event start over fresh from the start each time I click it? The event is acting like:
"Oh, you clicked on me.. lets pick a number between 1 and 3. Oh you got a 2! Here have a red fish. Oh you clicked on me again, I'm not going to say anything and just give you the red fish, forget picking a new number at random."
It's like after it chooses a random number the event is frozen on that number.

Edit 2: -_-; I can't believe I didn't notice that I had 3 extra pages on my event... each of them set with a condition related to the random number of the variable! I'm feeling pretty smart now :P

I want to thank you guys for your patience in teaching me how to use variables, I'm confident I will be able to work most things out on my own now :D
« Last Edit: July 07, 2009, 08:11:16 PM by Pearlstardust »

***
Rep:
Level 86
Sonic Dog -> Light Spear -> Overlimit -> Slash
Haha, I got back from vacation a little too late... Thanks for covering for me, Nessiah  ;D

Yeah, as long as you remember that variables are just placeholders for whatever you want them to be, you can do a ton with them. It's late tonight, but maybe I'll give you a little variable test tomorrow (Unless I get caught up in other things, I hope I don't though)

**
Rep: +0/-0Level 83
Haha, I doubt I'll be able to pass a variable test so soon, but I'll take it if I can learn something from it :P

*
A Random Custom Title
Rep:
Level 96
wah
I used this to learn about variables and now, I'm not too shabby with variables.

http://rmrk.net/index.php/topic,33775.0.html

It's for RMXP but the concept is the same. In fact, almost everything should be the same except the look of it.
« Last Edit: July 09, 2009, 01:05:31 AM by modern algebra »

***
Rep:
Level 86
Sonic Dog -> Light Spear -> Overlimit -> Slash
Silly me, I closed firefox before my post went through... Well, try making this situation work:

So, you enter a large chamber with four passages and one large door at the north end. As you examine the door, it reads "Insert the code:" and a window is brought up. Because you do not yet know the combination, you must first make your way through the passages in the correct order, working clockwise from the far left passage. Travel through the left area, fighting monsters and traversing the land's terrain until you reach the back wall which has inscribed on it "Digit 1: 6." The same repeats with the next three passages, with different numbers found at the end of each trail.

Now that all the digits are known, enter the main chamber, input the correct code, and be on your way.

This actually can be done with either all variables, or a combination of variables and switches. Do it however you find easiest (there are multiple ways to event this), and if you have questions, post here or PM me.