Zelaron Gaming Forum  
Stats Arcade Portal Forum FAQ Community Calendar Today's Posts Search
Go Back   Zelaron Gaming Forum > Zelaron Gaming > RPGMaker

 
 
Thread Tools Display Modes

 
Unhappy I've got a "few" problems I might need BlueCube
Reply
Posted 2006-11-02, 11:05 AM
First is easy, because I've seen someone do it...I just simply forgot. He had the game set up that on certain maps (like a field map) whenever he hit "v" i believe, he would jump.

The second might be a little harder to figure. I want to have a system where you can take an item i made called a "floral kit" which can be used to cut out herbs from the map. The problem i run into is i want the herbs /plants to grow back after certain periods of time depending on how rare the herb/plant is rather than creating a large and complex switch system.
Problems I've already faced with this are: The herb comes back everytime i enter the screen, I would enter the map the herb was in but then would constantly recieve the herb and confirmation mesage. The herb never disappears because the item i have is always with me.

Basically all i want to see is something like this. ( I walk into the screen and hit the action key next to the herb to recieve it. the herb disappears and i walk out of the screen. I do something for about 5 minutes and decide to go back. I walk back into the screen and wait 5 minutes since it takes 10 minutes to grow back. It reappears and then I grab it.)
Old
Profile PM WWW Search
azure hunter is neither ape nor machine; has so far settled for the in-betweenazure hunter is neither ape nor machine; has so far settled for the in-between
 
azure hunter
 



 
Reply
Posted 2006-11-02, 11:08 AM in reply to azure hunter's post "I've got a "few" problems I might need..."
I forgot to ad this is for 2k3
Old
Profile PM WWW Search
azure hunter is neither ape nor machine; has so far settled for the in-betweenazure hunter is neither ape nor machine; has so far settled for the in-between
 
azure hunter
 



 
Reply
Posted 2006-11-02, 12:56 PM in reply to azure hunter's post starting "I forgot to ad this is for 2k3"
*SUMMON BLUECUBE*

This noob with two posts needs your wisdom!
Old
Profile PM WWW Search
Dar_Win enjoys the static noises of ten television sets simultaneously tuned to 412.84 MHzDar_Win enjoys the static noises of ten television sets simultaneously tuned to 412.84 MHz
 
 
Dar_Win
 



 
Reply
Posted 2006-11-02, 03:29 PM in reply to Dar_Win's post starting "*SUMMON BLUECUBE* This noob with two..."
It's interesting to see that he seems to know about BC's mastery. He must travel far and wide.

-----

I know the Jump is possible, and I'm pretty sure that someone has posted a thread about it... but I'm known to be wrong.

As for the growing back, welllll... I think you can make a timer in RM2K3. Most people use it for night and day, but I don't see why one can't distort it to fit ones needs.
Old
Profile PM WWW Search
Lenny simplifies with no grasp of the basicsLenny simplifies with no grasp of the basicsLenny simplifies with no grasp of the basicsLenny simplifies with no grasp of the basicsLenny simplifies with no grasp of the basicsLenny simplifies with no grasp of the basics
 
 
Lenny
 



 
-Remove this-
Reply
Posted 2006-11-02, 05:21 PM in reply to azure hunter's post "I've got a "few" problems I might need..."
Oh hey, double post, that doesn't happen too often

Last edited by BlueCube; 2006-11-02 at 05:29 PM.
Old
Profile PM WWW Search
BlueCube enjoys the static noises of ten television sets simultaneously tuned to 412.84 MHzBlueCube enjoys the static noises of ten television sets simultaneously tuned to 412.84 MHz
 
 
BlueCube
 



 
Summon Successful
Reply
Posted 2006-11-02, 05:28 PM in reply to azure hunter's post "I've got a "few" problems I might need..."
azure hunter said:
First is easy, because I've seen someone do it...I just simply forgot. He had the game set up that on certain maps (like a field map) whenever he hit "v" i believe, he would jump.

The second might be a little harder to figure. I want to have a system where you can take an item i made called a "floral kit" which can be used to cut out herbs from the map. The problem i run into is i want the herbs /plants to grow back after certain periods of time depending on how rare the herb/plant is rather than creating a large and complex switch system.
Problems I've already faced with this are: The herb comes back everytime i enter the screen, I would enter the map the herb was in but then would constantly recieve the herb and confirmation mesage. The herb never disappears because the item i have is always with me.

Basically all i want to see is something like this. ( I walk into the screen and hit the action key next to the herb to recieve it. the herb disappears and i walk out of the screen. I do something for about 5 minutes and decide to go back. I walk back into the screen and wait 5 minutes since it takes 10 minutes to grow back. It reappears and then I grab it.)
Ok, for the first, I'm not going to reinvent the wheel here - http://zelaron.com/forum/showthread.php?t=39307

The second is interesting, because you want to keep all of your herb events separate, with differing regrowth rates, with three states each (grown/unpickable, grown/pickable, ungrown), and you want it all somehow uncomplicated


The problem you're describing with the herb disappearing is due to not 'getting' that there are those specific 3 states to the herb - you are very, very likely putting pages in the wrong order. You can set it up temporarily like

(Page 1 - Grown,No Item)(Page 2 - Grown,Has Item)(Page 3 - Plant Gone)

But then we would be using switches, and that would not be a good idea since we're dealing with numbers.







The only real way to do this is with a Timer event that "ticks" every 5 seconds or something. Here's a quick psuedocode example of a common event for the timer:

Code:
Comment: Making these variables at the start will help you later on when you need to change things.
Variable operation: variable herbCounterStart = 3000
Variable operation: set variable herbCounterEnd = 3100
Variable operation: set variable index = 0
If TIMER is 0
{ 


   Comment:  This part goes through all of your herb variables and reduces the number by 1
   index = herbCounterStart
   Loop 
      Variable operation:  variable reference[index], subtract 1
      Variable operation:  index, add 1
      if index > herbCounterEnd
      {
          Break out of Loop
      }
   :End Loop

   Set TIMER to 5 seconds
}


And each event, separately, would check to see if its own regrowTimer is 0 - if so, it's available to be cut, assuming you have the item. This means that, because we're using variables to determine the state of the herb, we can just use the regrowth variable to see if we can get it. As a bonus, all the regrowth timers will start out as 0 anyway, so there's fewer variables to set! Just remember not to name the herb regrowth variables as you go, and DO NOT INTERRUPT THE 'CHAIN' OF VARIABLES. In other words, keep a larger block of variables open than you think you will need. If you think you'll only have 100 herbs in the game, save 150 spaces just in case.

There is a small bug, which isn't too big of a deal - at worst, you might pick an herb when the timer is 00:01 instead of 00:05 and 'save' 4 seconds. If you want to, you can set the timer to a smaller interval to reduce this effect.

Edit:

The basic page structure for EACH herb would then be something like:

(Page 1 - Picture: Grown, Precond: no item)
(Page 2 - Picture: Grown, Precond: has item, var[3030] = 0)
(Page 3 - Picture: Plant gone, Precond: var[3030] > 0)

On Page 2 you would just set the variable number to be whatever you want the time to be. For a rare herb, you can set it to be 100 which would be 500 seconds, or whatever you want.


Edit 2:

Almost forgot something important that doesn't really have anything to do with the rest of the post - this should be self-evident, but set your regrowth rates as variables somewhere in your first set-up event in the game. You do NOT want to find and edit all of your "potion herbs" to add a few seconds of regrowth time when just changing potionRegrowRate to 4 instead of 3 is possible.

Obviously, in Page 2 of an herb's event, you would set herbRegrow[3030] = potionRegrowRate instead of a number.

Last edited by BlueCube; 2006-11-02 at 05:51 PM.
Old
Profile PM WWW Search
BlueCube enjoys the static noises of ten television sets simultaneously tuned to 412.84 MHzBlueCube enjoys the static noises of ten television sets simultaneously tuned to 412.84 MHz
 
 
BlueCube
 



 
Reply
Posted 2006-11-03, 10:37 AM in reply to BlueCube's post "Summon Successful"
You put all this code in as a Comment, right?

What language do you use? Is it Ruby like RMXP? Or a normal programming language like C++ or VB?
Old
Profile PM WWW Search
Lenny simplifies with no grasp of the basicsLenny simplifies with no grasp of the basicsLenny simplifies with no grasp of the basicsLenny simplifies with no grasp of the basicsLenny simplifies with no grasp of the basicsLenny simplifies with no grasp of the basics
 
 
Lenny
 



 
Reply
Posted 2006-11-03, 09:22 PM in reply to Lenny's post starting "You put all this code in as a Comment,..."
Lenny said:
You put all this code in as a Comment, right?

What language do you use? Is it Ruby like RMXP? Or a normal programming language like C++ or VB?
Nah, that's all pseudocode, I don't use regular RM2k3 language because it's tougher to read and longer to type out. If someone needs shown exactly what commands to use, I'll oblige, but in general "Set TIMER to 5 seconds" should be obvious enough, especially since the "real" code is generated for you by RM2k3 anyway.

For pseudocode, I just use a blend of random languages, I mainly use vbscript but I like C++ conventions as well. (I just noticed I capitalized TIMER, I think it was capitalized way back when I was 10 and playing with QBASIC for DOS and it stuck with me. Good old RANDOMIZE TIMER. Even if the timer in RM2k3 is nothing like the QBASIC TIMER variable, but whatever)
Old
Profile PM WWW Search
BlueCube enjoys the static noises of ten television sets simultaneously tuned to 412.84 MHzBlueCube enjoys the static noises of ten television sets simultaneously tuned to 412.84 MHz
 
 
BlueCube
 



 
Reply
Posted 2006-11-06, 06:35 AM in reply to BlueCube's post starting "Nah, that's all pseudocode, I don't use..."
I might need to be shown exactly how to do it. I'm still new to all this. I got the jumping but still having trouble with the herbs
Old
Profile PM WWW Search
azure hunter is neither ape nor machine; has so far settled for the in-betweenazure hunter is neither ape nor machine; has so far settled for the in-between
 
azure hunter
 



 
Reply
Posted 2006-11-06, 09:24 PM in reply to azure hunter's post starting "I might need to be shown exactly how to..."
azure hunter said:
I might need to be shown exactly how to do it. I'm still new to all this. I got the jumping but still having trouble with the herbs
Alright, did this demo in about 25 minutes (and it shows!)


http://www.make7.org/files/trees.zip

Trees instead of herbs, but hey, it's the RTP default trees, so who cares. (I assume you have the "standard" RTP, but if not, I can add that in as well, though it'd make the zip a bit huge)
Old
Profile PM WWW Search
BlueCube enjoys the static noises of ten television sets simultaneously tuned to 412.84 MHzBlueCube enjoys the static noises of ten television sets simultaneously tuned to 412.84 MHz
 
 
BlueCube
 



 
Reply
Posted 2006-11-24, 11:37 AM in reply to azure hunter's post "I've got a "few" problems I might need..."
hey so youre haveing problems with the herb, what are you useing i just have the rpgmaker2000
Old
Profile PM WWW Search
Master_Chief is neither ape nor machine; has so far settled for the in-betweenMaster_Chief is neither ape nor machine; has so far settled for the in-between
 
Master_Chief
 



 

Bookmarks

« Previous Thread | Next Thread »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 

Posting Rules [Forum Rules]
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -6. The time now is 09:04 PM.
'Synthesis 2' vBulletin 3.x styles and 'x79' derivative
by WetWired the Unbound and Chruser
Copyright ©2002-2008 zelaron.com
Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
This site is best seen with your eyes open.