Egg that turns into a Chicken.

So I was wondering how to pull off an item that after a certain amount of steps would automatically change into another item, and play a sound effect and show a message. Specifically, I wanted to have an egg that eventually hatches into a chicken that is related to a quest in my game. My attempts of doing so haven't worked out so well so I was wondering if anyone would be able to help me figure this out.


As a similar example, it would function somewhat similar to how egg hatching does in Pokemon. However, I need it where each egg is on a different step counter.



Thanks in advance for any takers!
You could use a small handmade plugin to check the value of steps from the point you get the egg and add it to a variable.


Or you could try the old way. Use a common event in parallel process activated by a switch. Before turning the switch on, when you get the item, set a variable to current number of steps. Then, in the parallel process, set a second one as the new number of steps and subtract the old number. If result is what you want or bigger, activate a switch that your chicken hatched, call a common event about it and deactivate the event's plugin.


Can't check right now because of pc problems but the idea seems solid.
@Rusty_Gears...


This is, in essence, the same as Farming, but using Egg/Chicken graphics instead of Seeds/Carrots (could be Dragons, or Monsters, too...). There are several Farm methods, either using Events only, or with modest plugins. Have a search for Farm and you'll find a few, I don't doubt...


Edit: Here's a couple...


















Both of these work well; I've tried 'em. Other methods are available.
@Dad3353 there is a big difference. These farming systems use time and he wants to use steps.


There is probably a useful pligin h3 can use, but it is not these.
@Waterguy...


Sorry, I read 'steps' to mean 'stages'; I see now that he means 'steps taken on Map'. Cheers.


@Rusty_Gears...


I use Steps in my Desert Map, with a Parallel Event to detect a Step, and a Common Event to treat what happens. Here's my Code; you may be able to adapt it to your needs..? It's simple enough, I suspect...


The Parallel Process Event on the Map...

Spoiler
◆Control Variables:#0003 Old_X = Dumm_X
◆Control Variables:#0004 Old_Y = Dumm_Y
◆Control Variables:#0018 Dumm_X = Map X of Player
◆Control Variables:#0019 Dumm_Y = Map Y of Player
◆If:Old_X ≠ Dumm_X
  ◆Common Event:Dese_Step
  ◆
:End
◆If:Old_Y ≠ Dumm_Y
  ◆Common Event:Dese_Step
  ◆
:End



The Common Event...

Spoiler
◆Play SE:Step_1 (2, 100, 0)
◆Control Variables:#0054 Water_Left -= 1
◆If:Water_Left ≤ 0
  ◆Text:None, Dim, Bottom
  :    :Too tired to go any further, the Party succumbs to
  :    :its thirst and lack of Water. The Game is up.
  ◆Change State:Entire Party, + Knockout
  ◆
:Else
  ◆Control Variables:#0021 Step_Count += 1
  ◆If:Water_Left ≤ 100
    ◆If:Step_Count > 10
      ◆Control Variables:#0021 Step_Count = 0
      ◆Text:None, Dim, Bottom
      :    :Beware, \N[1]; your Water is very low indeed..!
      :    :You are in grave danger, now..!.
      ◆
    :Else
      ◆
    :End
    ◆
  :Else
    ◆If:Water_Left ≤ 300
      ◆If:Step_Count > 30
        ◆Control Variables:#0021 Step_Count = 0
        ◆Text:None, Dim, Bottom
        :    :Beware, \N[1]; your Water is getting low..!
        :    :You need to find Water very soon.
        ◆
      :Else
        ◆
      :End
      ◆
    :End
    ◆
  :End
  ◆
:End



Hope this helps.
@Dad3353


It seems like I could easily be able to adapt those events thanks to the way the eggs work, I'd just need to to change the parallel process to a common event as well so it applies to all maps, as long as there is at least one egg in the party. I still won't be able to have each egg on an individual timer from what it seems, but I can have the timer reset each time an egg is hatched at least. If anyone is able to figure out how to run each item on a separate timer, that'd help greatly, with or without a plugin.


Thanks for the help, though! I'll be using this system for now until I can get it working for each individual egg.
@Rusty_Gears for making each one have a check by itself you'll need to use a plugin instead of just using events...


Also, I thought I mentioned using a common event in parallel process activated by a switch turned on when you get the egg?
@Rusty_Gears for making each one have a check by itself you'll need to use a plugin instead of just using events...


Also, I thought I mentioned using a common event in parallel process activated by a switch turned on when you get the egg?

I figured I would need a plugin to do so, it's mainly just a matter of finding a plugin that'd help.


And you did, my apologies for not thanking you as well, you have both been helpful.
@Rusty_Gears...


Here's a screen shot for a Common Parallel Event to allow  Crops to grow (or Eggs to hatch...) with no plugins at all, inspired by the second of the videos above. It's basically using the Parallel Event to become a sort of Timer, incrementing 60 units per second. There's one Common Event per Plot (or Egg, if it's Chickens you want...)...

Spoiler
Ku1QyaT.png



Here's the code ...

Spoiler
◆If:Plot_Grown_3 is OFF
  ◆Control Variables:#0031 Crop_Timer_3 += Crop_Grow_Speed_3
  ◆
:End
◆If:Crop_Timer_3 ≥ Crop_Comp_Time_3
  ◆Control Switches:#0015 Plot_Grown_3 = ON
  ◆Control Switches:#0012 Plot_Sown_3 = OFF
  ◆Control Switches:#0011 Plot_Active_3 = OFF
  ◆If:Crop_Type_3 = 1
    ◆Text:None, Window, Bottom
    :    :The Carrots have grown..!\|\^
    ◆
  :End
  ◆If:Crop_Type_3 = 2
    ◆Text:None, Window, Bottom
    :    :The Cabbages have grown..!\|\^
    ◆
  :End
  ◆If:Crop_Type_3 = 3
    ◆Text:None, Window, Bottom
    :    :The Corn has grown..!\|\^
    ◆
  :End
  ◆
:Else
  ◆Control Variables:#0036 Part_Time_3 = Crop_Comp_Time_3
  ◆Control Variables:#0036 Part_Time_3 /= 3
  ◆Control Variables:#0036 Part_Time_3 *= 2
  ◆If:Crop_Timer_3 ≥ Part_Time_3
    ◆Control Switches:#0014 Plot_66_3 = ON
    ◆
  :Else
    ◆Control Variables:#0036 Part_Time_3 = Crop_Comp_Time_3
    ◆Control Variables:#0036 Part_Time_3 /= 3
    ◆If:Crop_Timer_3 ≥ Part_Time_3
      ◆Control Switches:#0013 Plot_33_3 = ON
      ◆
    :End
    ◆
  :End
  ◆
:End



...and here are the successive Pages of the Crop Event (There are more, to cater for more Seed Types, but they're the same, really...


Choose Seeds from a choice of 3 Types...

Spoiler
abBitRJ.png



The Seeds are sown...

Spoiler
U4LOVkp.png



1/3 grown...

Spoiler
mzEWria.png



2/3 grown...

Spoiler
FZydhZ8.png



Fully grown...

Spoiler
MMfJNWv.png



...and harvested...

Spoiler
O6Si6oW.png



If it helps, I could whip up a slimmed-down Project for downloading..? Hope this helps.

Original thread: https://forums.rpgmakerweb.com/threads/egg-that-turns-into-a-chicken.68585/