Status
Not open for further replies.

Riazey

Master of None
Veteran
Joined
Feb 27, 2014
Messages
163
Reaction score
228
First Language
English
Primarily Uses
RMMV
Okay so basically, using yanfly's spawn/morph plugins and galv's tools, with some help from Imaginaryvillain and ct_bolt I've made a working crop system, but the most eventing intensive part comes with planting seeds. I am not sure if the current way I plan to tackle this is the most efficient with my current resources.

Lets say there are 20 seed items for example, they all use a common event to grab the item id then set it to a variable.
The thing is, how should I approach USING this variable that would cause the least amount of stress on the game, or if this is even the best way. They would spawn a different event depending on what seed is used.

If helpful note that the scripts between ifs will only change the following # in the first script call:
Code:
Yanfly.SpawnEventAt(3, #, $gameVariables.value....


------------------------------------------------------------------------------------------


I.e. if the seed was number 11:


1) Nested if/else statements by 10 then 5:
This method is the one I currently am thinking of, where it checks if it's over/under 10, then between 11-15 or 16-20, then has standalone ifs for 5. It kind of cuts down the amount of checks from 20 to 3/7.
1583426953081.png

2) Using 20+ if's
1583426038202.png

3) Using a plugin to handle this.
In this case, does anyone have a plugin to recommend (one unlikely to break other plugins) or has the free time to build me one? qvq Unsure if this is super complex but to be honest if this is at all a bit heavy for eventing every time a person uses a seed, I can saunter on over to plugin requests and hope for one aaa-!

3) A different method!
The above was the only method my tired, tiny non-js understanding brain could come up with, but if you have a lighter/easier way of sorting this let me know!
 

ShadowDragon

Veteran
Veteran
Joined
Oct 8, 2018
Messages
3,331
Reaction score
1,248
First Language
Dutch
Primarily Uses
RMMV
you can try to use this one that reduce a big nested conditional branch, but I'm also not sure
if this is what you are looking for.
 

Riazey

Master of None
Veteran
Joined
Feb 27, 2014
Messages
163
Reaction score
228
First Language
English
Primarily Uses
RMMV
you can try to use this one that reduces a big nested conditional branch, but I'm also not sure
if this is what you are looking for.

This is really nice for checking "If you have x amount of items" and cut out that condition! However how many of the seeds they have doesn't affect this current event build only WHAT seed they are using! Which is why all the conditions (it spawns a different "plant" depending on the seed used)~

Thanks though! I might actually be able to use this plugin elsewhere!
 

ShadowDragon

Veteran
Veteran
Joined
Oct 8, 2018
Messages
3,331
Reaction score
1,248
First Language
Dutch
Primarily Uses
RMMV
if its done in a common event, than I dont know if there is a nicer way.
the image menu I build also use alot of " if " statement, each with a different purpose.
I'm not sure if there is a good way or plugin to handly those if statement, other than using
a variable or switches that handles those switch, like Yanfly SelfSwitch/Self Variables,

each seed has its own variable, like 20 seed, seed = 0 to seed = 20.
if you know what I mean, than you control the seeds by a variable when placing it.
1 self variable per event handles its own and dont interupt with the other one.

Else I hope someone know a better way.
 

Riazey

Master of None
Veteran
Joined
Feb 27, 2014
Messages
163
Reaction score
228
First Language
English
Primarily Uses
RMMV
if its done in a common event, than I dont know if there is a nicer way.
the image menu I build also use alot of " if " statement, each with a different purpose.
I'm not sure if there is a good way or plugin to handly those if statement, other than using
a variable or switches that handles those switch, like Yanfly SelfSwitch/Self Variables,

each seed has its own variable, like 20 seed, seed = 0 to seed = 20.
if you know what I mean, than you control the seeds by a variable when placing it.
1 self variable per event handles its own and dont interupt with the other one.

Else I hope someone know a better way.


Yeah I am using self variables to handle their growth and morphing~ It's very smooth, I sprited my first tree last night! They have separate IDs thanks to being assigned a number based on the item they are o.ob I am just unsure what to do about that haha~ Unless I make the items the same ID as the events hmm
 
Status
Not open for further replies.

Latest Threads

Latest Profile Posts

AeroPergold wrote on LUKElcs's profile.
Its-a me, Pergold from Gamejolt!
I added footstep sounds to our content that I posted in a previous thread. I was unable to edit the post, so if you're interested, see below.

DOWNLOAD LINK

I've started working on rpg maker again, and I can see a lot of improvement from when I was 13. I still have a long way to go, but I'm proud that I've gotten this far.
Animated Title screen is by SharkerrBlue(SB)
I am using the Nightmare Land pack.
I just can't walk to the store for lunch without walking past people smoking. It not only smells bad, it's probably poisoning me. I'm afraid I'll eventually have to be hospitalized. I can't take another path because there's too much traffic and drivers in the plaza are reckless sometimes. I almost got run over once, even after looking both ways.
RyanYe wrote on whtdragon's profile.
Your art works about Wyrvens and Dragons are sooooooooo cooooooooool~! I like them so bad
Can you create more? like Archangels, Devils, Titans, Cyclops!!

Forum statistics

Threads
108,810
Messages
1,039,650
Members
141,257
Latest member
GoUrbex
Top