pastellixs

Villager
Member
Joined
Jun 13, 2020
Messages
6
Reaction score
1
First Language
English
Primarily Uses
RMVXA
So I've been using RPG Maker VX Ace for about a month or two now, and I'm struggling on a feature I'm trying to add to my game. I'm trying to make a farming system, and I'm having trouble making the events for it. I'm not quite sure if how I'm doing it is very efficient, but it's the way I've found to make the most sense for me, but I'm still having trouble with it. I currently have 3 event pages for a singular event, and when it reaches the third event, I want it to loop and go back to the first event page and start again. I'm not sure if this is possible, but I'm honestly just stuck on how to make this farming system work. Here's the code I have for each page:

grape1.PNGgrape2.PNGgrape3.PNG

And then I have the timer that counts down when a crop is planted:

grape4.PNG

Another issue I'm having is that not only does the timer for a growing crop restart if another one is planted during the timer countdown, all the crops planted during the timer grow at the same time since they're basically all linked to the same timer event.

I'm genuinely stuck on how to make these events more efficient and make them work properly.. Any help is appreciated :)
 

Trihan

Speedy Scripter
Veteran
Joined
Apr 12, 2012
Messages
3,778
Reaction score
2,917
First Language
English
Primarily Uses
RMMZ
You've identified the issues with the way you currently have it set up pretty handily: tying it to a "timer" command means you'll reset it every time you plant a grape, and all grapes will grow at the same rate.

Effectively what you need to do is give each grape event its own timer variable, which you'll then check for determining when it's ready for harvesting.

I actually made an event self variables thing for someone the other day that would work well for this, let me see if I can grab a link.

Edit: https://forums.rpgmakerweb.com/inde...self-variables-for-events.124104/post-1090846
 

pastellixs

Villager
Member
Joined
Jun 13, 2020
Messages
6
Reaction score
1
First Language
English
Primarily Uses
RMVXA
Effectively what you need to do is give each grape event its own timer variable, which you'll then check for determining when it's ready for harvesting.

I should probably learn what variables are then since I've never used them before, lol
 

Trihan

Speedy Scripter
Veteran
Joined
Apr 12, 2012
Messages
3,778
Reaction score
2,917
First Language
English
Primarily Uses
RMMZ
A variable is like a switch but instead of only two possible values (0 - OFF, 1 - ON) you can store any integer value in them.

So for example, if you set a self variable for the crop event called "timer" to, say, 60, and then had a parallel process event that waits 60 frames and then reduces all timer self variables by 1, that event would take a minute to grow. But because it's unique to the event, it wouldn't affect the timer for any other crop event.
 

Kes

Veteran
Veteran
Joined
Aug 3, 2012
Messages
22,512
Reaction score
12,002
First Language
English
Primarily Uses
RMVXA
@pastellixs As you are new to variables, I strongly suggest that you have a look at Celianna's tutorial that you can find here. It is a playable tutorial, and the best way of using it is to play through it first and then open it up in your editor to see how she did it. It's the best and quickest way I know of learning about them.
 

Latest Threads

Latest Posts

Latest Profile Posts

Been sick with a stomach virus for seven days now. Not going to work tomorrow because I'm still contagious according to my doctor.
Much as I love my job, I really hate playing "office politics". It would be nice if I didn't have to pretend to be someone else all day long.
I wanna get back into showing off Battlers and other assets I create again. But i'm always haunted by the "It's not good/realistic enough" voices that keep me from doing so.

Maybe I should get back to it, I did enjoy showing off whatever I came up with!
Big Google Warning Today for chrome users - apparently some kind of security threat has happened and everyone is being advised to update their Chrome browser ASAP by going to settings and/or "About Google Chrome", to update their browser version to a new one just released.

Forum statistics

Threads
115,955
Messages
1,094,345
Members
151,213
Latest member
lil_plt
Top