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, 12:05 PM
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, 12:08 PM 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, 01: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, 04: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, 06: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 06: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, 06: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 06: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, 11: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, 10: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, 07: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, 10: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-09, 07:22 AM in reply to BlueCube's post starting "Alright, did this demo in about 25..."
Thank you very much BlueCube. I understand the variables now. I will be sure to put you on my special thanks list.
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-09, 11:04 AM in reply to azure hunter's post starting "Thank you very much BlueCube. I..."
I wonder how many "Special Thanks to..." lists BlueCube has been on...

In the day he was helping 10 people a day with things.
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-09, 12:32 PM in reply to BlueCube's post starting "Alright, did this demo in about 25..."
My timer stays at zero. Do you know why?

heres a quick drawing of my common event
I dont have a clock noise

if timer 0 0 less/equal
VO : 0008 Loop Index set VAR [0007] value (Which is set to 0)
Branch if switch [0006: start time] is on
Timer 1 Operation: Start
Else handler
Timer 1 operation: start
end
Loop
Variable Oper [0008 loop index 0] Set Var [0001]'s Value
loop
Variable Oper [v[0008]-, 1
Variable Oper [0008: loop index 0] +. 1
Branch if Var [0008:loop index 0] is V[0002] Greater
Break Loop

End

End Loop

End loop

end
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-09, 12:38 PM in reply to azure hunter's post starting "My timer stays at zero. Do you know..."
and i mean i dont have a clock noise because i dont want one
Also...how do i edit a post? i cant find the button
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-09, 04:13 PM in reply to azure hunter's post starting "My timer stays at zero. Do you know..."
azure hunter said:
My timer stays at zero. Do you know why?

heres a quick drawing of my common event
I dont have a clock noise

if timer 0 0 less/equal
VO : 0008 Loop Index set VAR [0007] value (Which is set to 0)
Branch if switch [0006: start time] is on
Timer 1 Operation: Start
Else handler
Timer 1 operation: start
end
Loop
Variable Oper [0008 loop index 0] Set Var [0001]'s Value
loop
Variable Oper [v[0008]-, 1
Variable Oper [0008: loop index 0] +. 1
Branch if Var [0008:loop index 0] is V[0002] Greater
Break Loop

End

End Loop

End loop

end
I'm not seeing where you are actually Setting the clock - remember to toss in a

<>Timer 1 Operation: Set, V[####]

Where #### is the variable that stores the seconds for the timer. (You can set it directly, but it's much, much easier for editing if you do it via variables). Setting and Starting the timer are two separate steps and are usually done right after one another.

Unrelated, there's a quirk with the timer - if you <>Set it while it is already running, the timer will continue counting down from the new number. However, if the timer is at zero, it'll automatically stop (and disappear from view), forcing you to <>Start it again when needed.

I do not know why you cannot edit, I'd imagine it has something to do with your postcount, but who knows

Edit: Yeah, there's no need for a clock noise, that's only in my example game for debugging purposes, so you can tell exactly when the timer is being set.

Last edited by BlueCube; 2006-11-09 at 04:15 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-10, 09:16 AM in reply to BlueCube's post starting "I'm not seeing where you are actually..."
I was able to figure it out. Yes you were right. I didn't actaully set the clock. I also accidently set the variable of my herbs to its number. I.e. herb number 81 would have 81 tiicks before respawn. Just something i didn't understand at the time.

also with the clock quirk. If i only set the clock once, and only once. would it happen since i never set it a second time? And could it happen if i set the second timer right when it hits zero?
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-10, 01:05 PM in reply to azure hunter's post starting "I was able to figure it out. Yes you..."
azure hunter said:
I was able to figure it out. Yes you were right. I didn't actaully set the clock. I also accidently set the variable of my herbs to its number. I.e. herb number 81 would have 81 tiicks before respawn. Just something i didn't understand at the time.

also with the clock quirk. If i only set the clock once, and only once. would it happen since i never set it a second time? And could it happen if i set the second timer right when it hits zero?
If you set the clock once, then the first time it hits zero, the clock will never work again in the game (obviously, the solution is to reset the clock every time you know it hits zero). Depending on how you have everything set up, it might also cause things to instantly respawn because it would keep checking to see if the clock was zero (thus making every 1/10 of a second a tick)

The second timer behaves the same way as the first one, and is completely separate, so in that situation the first timer would stop and the second timer would be set properly - but it would be hidden, and it wouldn't start until you told it to anyway.
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-14, 07:51 AM in reply to BlueCube's post starting "If you set the clock once, then the..."
I suppose My next question is, If I pick an Herb right when the clock hits zero, then the clock will stay at zero? making the herbs never disappear in the game and a player can continually pick the herbs since they never disappear. If this is what happens could i make and event so that whenever the clock is right on zero i can't pick the herbs just for that second, and so that when that event is activated the clock doesn't stay at zero?
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-14, 07:40 PM in reply to azure hunter's post starting "I suppose My next question is, If I..."
No, the clock will reset instantly as usual, and it would basically subtract one tick total from the regrowth rate for that particular herb for that particular cycle

In practice you will never actually pick anything when the timer is zero, because as soon as it hits zero, the common event will activate and reset the timer back to whatever the tick length is.

However, if you DO pick it during that 1/500th of a second or whatever, here's what would happen:
  1. Your herb would have its regrowth rate set to its normal time
  2. Clock resets and regrowth is decremented by 1
And that's it, basically. All that would happen is that the herb effectively grows one tick faster for that cycle. The next time you pick it, it would behave as it normally would.
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-15, 07:34 AM in reply to BlueCube's post starting "No, the clock will reset instantly as..."
Okay okay i understand. Say i have the clock at 60 seconds and resets. and after 3 ticks an herb respawns after i pick it. but if i pick it at zero seconds it simply resets and takes away a tick so there is only 2 (2 minutes) ticks instead. right

Last edited by azure hunter; 2006-11-15 at 08:09 AM.
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
 
 

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 04:49 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 - 2024, Jelsoft Enterprises Ltd.
This site is best seen with your eyes open.