Planting Trees

Caedmon

Veteran
Veteran
Joined
Aug 9, 2012
Messages
248
Reaction score
16
First Language
English
Primarily Uses
Right now I am using vaiables to accomplish planting trees how do I make it so that only one tree grows at a time when a varibale is reached? I noticed that right now if a variable is reached all of a sudden trees start popping up everywhere. I was using Celianna's garden events modified for this. There are only 3 self switches correct?
 

Celianna

Tileset artist
Veteran
Joined
Mar 1, 2012
Messages
10,557
Reaction score
5,592
First Language
Dutch
Primarily Uses
RMMV
My what now?

You need a different variable for each event/tree, otherwise they'll all use the same variable, and thus they'll all appear to grow.
 

Caedmon

Veteran
Veteran
Joined
Aug 9, 2012
Messages
248
Reaction score
16
First Language
English
Primarily Uses
Hmm so what's a better option because if I have 10 variables for each tree that is going to eat up a lot of variables fast. Any ideas?
 

Celianna

Tileset artist
Veteran
Joined
Mar 1, 2012
Messages
10,557
Reaction score
5,592
First Language
Dutch
Primarily Uses
RMMV
Maybe VX Ace has a self variable script out there, I suggest looking for one, otherwise you'll be quite busy.
 

Genii Benedict

Supervillain, Extraordinaire
Veteran
Joined
Jun 13, 2012
Messages
333
Reaction score
115
First Language
English
Primarily Uses
Maybe VX Ace has a self variable script out there, I suggest looking for one, otherwise you'll be quite busy.
If you have to go this route, it's still well worth the time and effort. I'm working with some events that require a great deal of tedium to make sure they all fire off differently, so as to give the effect of randomness, and the end results are shaping up nicely. Good luck!

GB
 

Caedmon

Veteran
Veteran
Joined
Aug 9, 2012
Messages
248
Reaction score
16
First Language
English
Primarily Uses
So Genii you are using a different set of variables for every one? I'm thinking this could end up being hundreds of variables. Is there an issue with having too many variables and the game running slow?

Edit: Any one use PK8's self data script with good results?

http://forums.rpgmakerweb.com/index.php?showtopic=1567
 
Last edited by a moderator:

Genii Benedict

Supervillain, Extraordinaire
Veteran
Joined
Jun 13, 2012
Messages
333
Reaction score
115
First Language
English
Primarily Uses
So Genii you are using a different set of variables for every one? I'm thinking this could end up being hundreds of variables. Is there an issue with having too many variables and the game running slow?
I hope to do a 'stress test' this afternoon. I've actually been thinking it over, and my own personal configuration - being random - may not require variables at all. It will, however, require a couple of random timing choices... Essentially, I'm going to test a room containing twenty or so monitors, whose screens 'change' at a random interval. I'm planning on first, choosing a random screen type (I've already made about 50 different monitor screens this morning) and then delaying the screen change for a random number. If it works as intended, the random screen delay should be different for each monitor screen, and then each one should look different and change at different times.

We'll see, but I'll report back!
 

Celianna

Tileset artist
Veteran
Joined
Mar 1, 2012
Messages
10,557
Reaction score
5,592
First Language
Dutch
Primarily Uses
RMMV
No, the game won't lag if you use a lot of variables. Myself I've used over 900 almost, it runs fine.

It's when you've got several events on the map, or a bunch of parallel processes running, that the game loses framerate.

I haven't tried out PK8's script, but it seems that's the one you're looking for (it also gives you more self switches, which is a dream) :)
 

Genii Benedict

Supervillain, Extraordinaire
Veteran
Joined
Jun 13, 2012
Messages
333
Reaction score
115
First Language
English
Primarily Uses
It's when you've got several events on the map, or a bunch of parallel processes running, that the game loses framerate.
Well, I DO have some good news for you, in this regard. I've configured a single map with (so far) 50 monitors, all running parallel processes, and running randomized variables so that every screen shows an image after a random variable's worth of wait, and even selecting a random pattern to run on the screen, without any visible frame degradation. (It's a spaceship. It has to have a bunch of monitors doing something, at least!)

Basically, I run a common event for each monitor that rolls up a variable between 1 and 6. For each number, I've added a 10 frame delay (so, from 10 to 60 frames, or 1/10 of a second to 1 second) before the monitor screen changes. I have three different animated monitor screens (so far) in my test (one green, one amber, and one white) that run through 7 walking animations. If the above variable is 1 or 2, I select the first monitor animation. 3 or 4, the second, etc. It runs through it's display sequence, and then, it repeats all over again. I've made a call to the common event, and then copied it (so far) 50 times. When it's run, voila. Nice and quick.

Maybe there's some way you can use this method for the trees, Caedmonball19?
 

RyanA

Happy Cat
Veteran
Joined
Jun 28, 2012
Messages
2,423
Reaction score
230
First Language
English
Primarily Uses
I think you could do this a bit easier by using common events, maybe something like...If you water the plant, it turns on a switch that activates that trees common event and adds 1 to the variable Tree 1. In the common event you should have conditional branches. Something a little like this.

Conditional Branch, if variable Tree 1 = 1

Wait so many frames

Turn switch Feed Me! on

Turn switch Tree 1 watered off

Else

Conditional Branch, if variable Tree 1 = 2

etc etc

Keep going however many times you want until the plant's fully grown. The event itself will have different pages with the same commands, something like this.

Tree stage 1

Conditions - none

Show Text - Water the tree?

Show Choices Yes, No

When Yes - turn switch Tree 1 fed on, add 1 to variable Tree 1

Tree stage 2

Conditions - Variable tree 1 = 1

Show Text - Water the tree?

Show Choices Yes, No

When Yes - turn switch Tree 1 fed on, add 1 to variable Tree 1

Etc etc

I'm not sure if this is the kind of tree growing you want though, I could tinker around a bit and sort it out properly, this is all off the top of my head, hope it helps even a little bit :3
 

Genii Benedict

Supervillain, Extraordinaire
Veteran
Joined
Jun 13, 2012
Messages
333
Reaction score
115
First Language
English
Primarily Uses
Hey RyanA, that's very similar to the idea I put forth at the same time - great minds think alike! (Oh, and for those wondering - yeah, I managed to break the framerate. There's something about 100 parallel processes running that seems to impact the engine just a little bit...)

:p

GB
 

Terloch

Creative Worker.
Member
Joined
Aug 17, 2012
Messages
12
Reaction score
0
First Language
Dutch
Primarily Uses
Basically, I run a common event for each monitor that rolls up a variable between 1 and 6. For each number, I've added a 10 frame delay (so, from 10 to 60 frames, or 1/10 of a second to 1 second) before the monitor screen changes.
I dont wanna burst your bubble but I think you make a calculation mistake there.

if 60 F (framrate) = 1.0 second

10 F = 1.66/10

(I mean this in good intention for when you make a script you and others get the timing right, or am I wrong?

Kind Regards,

//Robin
 
Last edited by a moderator:

Genii Benedict

Supervillain, Extraordinaire
Veteran
Joined
Jun 13, 2012
Messages
333
Reaction score
115
First Language
English
Primarily Uses
I dont wanna burst your bubble but I think you make a calculation mistake there.

if 60 F (framrate) = 1.0 second

10 F = 1.66/10

(I mean this in good intention for when you make a script you and others get the timing right, or am I wrong?

Kind Regards,

//Robin
When you're right, you're right. I never was much good at math. By my calculation, 10 frames are one sixth of a second, and therefore, 6 frames should be one tenth of a second. (I think.)

GB
 

Caedmon

Veteran
Veteran
Joined
Aug 9, 2012
Messages
248
Reaction score
16
First Language
English
Primarily Uses
Genii thanks for the continued updates. Glad you got it working.

RyanA I will try that out thanks for throwing that together for me. If you do have time to formalize I would love to see it but that at least is a good start.
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Profile Posts

Do you Find Tilesetting or Looking for Tilesets/Plugins more fun? Personally I like making my tileset for my Game (Cretaceous Park TM) xD
How many parameters is 'too many'??
Yay, now back in action Happy Christmas time, coming back!






Back in action to develop the indie game that has been long overdue... Final Fallacy. A game that keeps on giving! The development never ends as the developer thinks to be the smart cookie by coming back and beginning by saying... "Oh bother, this indie game has been long overdue..." How could one resist such? No-one c
So I was playing with filters and this looked interesting...

Versus the normal look...

Kind of gives a very different feel. :LZSexcite:

Forum statistics

Threads
105,854
Messages
1,017,004
Members
137,562
Latest member
tamedeathman
Top