Regrowing plants?

● ARCHIVED · READ-ONLY
Started by Xenphir 10 posts View original ↗
  1. Hello so I have been trying to make plants that regrow when off screen. I am using RMMV. So far I have a working time system with minutes, hours, days, months, and years. I am trying to get it so each plant or tree grows 1 stage of its progression each day or so that after x amount of days pass after planting/harvesting, it regrows. I got it to work on one map, however it does not work for plants/events off the map the character sleeps on. I have tried using self-switches, normal switches, common events, time-check. I can get it to work on the same map by checking for when time is 6AM, but it does not work on other maps.
  2. It sounds like your problem is because you've linked it to a specific hour, & you aren't present during that specific hour.

    Have you tried linking the advancement to the day itself?
  3. XIIIthHarbinger said:
    It sounds like your problem is because you've linked it to a specific hour, & you aren't present during that specific hour.

    Have you tried linking the advancement to the day itself?
    I'm not sure how to do "If Variable Day +1 then plant does X" Doing it with "If Variable Day = x" doesn't work because some days it might not regrow if the player hasn't picked it and also I'm not sure how to get it to do it only once per day, let alone only if the player waters it.
  4. Galv's Event Spawn Timers function even when you're not on the same map. It isn't a real time system, only actual play time. But, looking at the code might give you some idea of how to make your system work.
  5. JGreene said:
    Galv's Event Spawn Timers function even when you're not on the same map. It isn't a real time system, only actual play time. But, looking at the code might give you some idea of how to make your system work.
    I'm afraid I have tried that already and have got nothing from it so far. v.v
  6. Have you considered integrating a second set of "growth cycle" variables that are anchored to your day transition point?

    So for example say you "harvest" on "Tuesday", that sets the event on "Tuesday/Wednesday Growth Cycle", divide them up into four cycles assuming you have a seven day week, to be switched over via event self switch. Then when the final "growth" day is reached have the self switch turn off & revert the event to the "Mature Plant" variant again.

    As for tracking interactions like water & the like, you would probably have to link other variables to it. You might be able to reduce the total number of variables by "grouping" the events, rather like field furrows, & then use the "furrows" or "groupings" variable for conditionals on your growth cycle mechanics.
  7. XIIIthHarbinger said:
    Have you considered integrating a second set of "growth cycle" variables that are anchored to your day transition point?

    So for example say you "harvest" on "Tuesday", that sets the event on "Tuesday/Wednesday Growth Cycle", divide them up into four cycles assuming you have a seven day week, to be switched over via event self switch. Then when the final "growth" day is reached have the self switch turn off & revert the event to the "Mature Plant" variant again.

    As for tracking interactions like water & the like, you would probably have to link other variables to it. You might be able to reduce the total number of variables by "grouping" the events, rather like field furrows, & then use the "furrows" or "groupings" variable for conditionals on your growth cycle mechanics.
    So I think I figured out the first part. I set it so that when the player cuts down a tree, it sets variable for that tree to 0, and then everytime the player sleeps (which advances a day) it adds plus 1 to the variable for that tree. The second part is now figuring out how to event a single spot for multiple crops since I've heard only 20 event pages can be made. ;-;
  8. Okay, here is my time system.

    Time System
    ◆Wait:300 frames
    ◆Control Variables:#0001 Minute += 1
    ◆If:Minute ≥ 60
    ◆Control Variables:#0008 Weather = Random 1..10
    ◆Control Variables:#0002 Hour += 1
    ◆Control Variables:#0001 Minute = 0

    :End
    ◆If:Hour ≥ 24
    ◆Control Variables:#0003 Day += 1
    ◆Control Variables:#0002 Hour = 0
    ◆Control Variables:#0067 Shop Inventory = Random 1..10

    :End
    ◆If:Day ≥ 29
    ◆Control Variables:#0004 Month += 1
    ◆Control Variables:#0003 Day = 1

    :End
    ◆If:Month ≥ 14
    ◆Control Variables:#0005 Year += 1
    ◆Control Variables:#0004 Month = 1

    :End
    ◆If:Hour = 5
    ◆Control Switches:#0002 Pre-Dawn = ON
    ◆Control Switches:#0003 Dawn = OFF
    ◆Control Switches:#0004 Day = OFF
    ◆Control Switches:#0005 Dusk = OFF
    ◆Control Switches:#0006 Twilight = OFF
    ◆Control Switches:#0007 Night = OFF

    :End
    ◆If:Hour = 6
    ◆Control Switches:#0002 Pre-Dawn = OFF
    ◆Control Switches:#0003 Dawn = ON
    ◆Control Switches:#0004 Day = OFF
    ◆Control Switches:#0005 Dusk = OFF
    ◆Control Switches:#0006 Twilight = OFF
    ◆Control Switches:#0007 Night = OFF

    :End
    ◆If:Hour = 7
    ◆Control Switches:#0002 Pre-Dawn = OFF
    ◆Control Switches:#0003 Dawn = OFF
    ◆Control Switches:#0004 Day = ON
    ◆Control Switches:#0005 Dusk = OFF
    ◆Control Switches:#0006 Twilight = OFF
    ◆Control Switches:#0007 Night = OFF

    :End
    ◆If:Hour = 19
    ◆Control Switches:#0002 Pre-Dawn = OFF
    ◆Control Switches:#0003 Dawn = OFF
    ◆Control Switches:#0004 Day = OFF
    ◆Control Switches:#0005 Dusk = ON
    ◆Control Switches:#0006 Twilight = OFF
    ◆Control Switches:#0007 Night = OFF

    :End
    ◆If:Hour = 20
    ◆Control Switches:#0002 Pre-Dawn = OFF
    ◆Control Switches:#0003 Dawn = OFF
    ◆Control Switches:#0004 Day = OFF
    ◆Control Switches:#0005 Dusk = OFF
    ◆Control Switches:#0006 Twilight = ON
    ◆Control Switches:#0007 Night = OFF

    :End
    ◆If:Hour = 21
    ◆Control Switches:#0002 Pre-Dawn = OFF
    ◆Control Switches:#0003 Dawn = OFF
    ◆Control Switches:#0004 Day = OFF
    ◆Control Switches:#0005 Dusk = OFF
    ◆Control Switches:#0006 Twilight = OFF
    ◆Control Switches:#0007 Night = ON

    :End
    ◆If:Weather Region = 0
    ◆Tint Screen:(0,0,0,0), 60 frames

    :End
    ◆If:Weather Region = 1
    ◆If:Pre-Dawn is ON
    ◆Tint Screen:(34,-34,-68,170), 60 frames

    :End
    ◆If:Dawn is ON
    ◆Tint Screen:(68,-34,-34,0), 60 frames

    :End
    ◆If:Day is ON
    ◆Tint Screen:(0,0,0,0), 60 frames

    :End
    ◆If:Dusk is ON
    ◆Tint Screen:(68,-34,-34,0), 60 frames

    :End
    ◆If:Twilight is ON
    ◆Tint Screen:(34,-34,-68,170), 60 frames

    :End
    ◆If:Night is ON
    ◆Tint Screen:(-68,-68,0,68), 60 frames

    :End

    :End
    ◆If:Weather Region = 2
    ◆If:Pre-Dawn is ON
    ◆Tint Screen:(34,-34,-68,170), 60 frames

    :End
    ◆If:Dawn is ON
    ◆Tint Screen:(68,-34,-34,0), 60 frames

    :End
    ◆If:Day is ON
    ◆Tint Screen:(0,0,0,0), 60 frames

    :End
    ◆If:Dusk is ON
    ◆Tint Screen:(68,-34,-34,0), 60 frames

    :End
    ◆If:Twilight is ON
    ◆Tint Screen:(34,-34,-68,170), 60 frames

    :End
    ◆If:Night is ON
    ◆Tint Screen:(-68,-68,0,68), 60 frames

    :End

    :End
    ◆If:Weather Region = 3
    ◆If:Pre-Dawn is ON
    ◆Tint Screen:(34,-34,-68,170), 60 frames

    :End
    ◆If:Dawn is ON
    ◆Tint Screen:(68,-34,-34,0), 60 frames

    :End
    ◆If:Day is ON
    ◆Tint Screen:(0,0,0,0), 60 frames

    :End
    ◆If:Dusk is ON
    ◆Tint Screen:(68,-34,-34,0), 60 frames

    :End
    ◆If:Twilight is ON
    ◆Tint Screen:(34,-34,-68,170), 60 frames

    :End
    ◆If:Night is ON
    ◆Tint Screen:(-68,-68,0,68), 60 frames

    :End

    :End
    ◆If:Weather Region = 4
    ◆If:Pre-Dawn is ON
    ◆Tint Screen:(34,-34,-68,170), 60 frames

    :End
    ◆If:Dawn is ON
    ◆Tint Screen:(68,-34,-34,0), 60 frames

    :End
    ◆If:Day is ON
    ◆Tint Screen:(0,0,0,0), 60 frames

    :End
    ◆If:Dusk is ON
    ◆Tint Screen:(68,-34,-34,0), 60 frames

    :End
    ◆If:Twilight is ON
    ◆Tint Screen:(34,-34,-68,170), 60 frames

    :End
    ◆If:Night is ON
    ◆Tint Screen:(-68,-68,0,68), 60 frames

    :End

    :End
    ◆If:Weather Region = 5
    ◆If:Pre-Dawn is ON
    ◆Tint Screen:(34,-34,-68,170), 60 frames

    :End
    ◆If:Dawn is ON
    ◆Tint Screen:(68,-34,-34,0), 60 frames

    :End
    ◆If:Day is ON
    ◆Tint Screen:(0,0,0,0), 60 frames

    :End
    ◆If:Dusk is ON
    ◆Tint Screen:(68,-34,-34,0), 60 frames

    :End
    ◆If:Twilight is ON
    ◆Tint Screen:(34,-34,-68,170), 60 frames

    :End
    ◆If:Night is ON
    ◆Tint Screen:(-68,-68,0,68), 60 frames

    :End

    :End
    ◆If:Weather Region = 6
    ◆If:Pre-Dawn is ON
    ◆Tint Screen:(34,-34,-68,170), 60 frames

    :End
    ◆If:Dawn is ON
    ◆Tint Screen:(68,-34,-34,0), 60 frames

    :End
    ◆If:Day is ON
    ◆Tint Screen:(0,0,0,0), 60 frames

    :End
    ◆If:Dusk is ON
    ◆Tint Screen:(68,-34,-34,0), 60 frames

    :End
    ◆If:Twilight is ON
    ◆Tint Screen:(34,-34,-68,170), 60 frames

    :End
    ◆If:Night is ON
    ◆Tint Screen:(-68,-68,0,68), 60 frames

    :End

    :End

    See how I've linked my "Weather" variable, to the hour cycling, & my "Shop Inventory" variable, to the shop cycling?

    Instead of using a RNG mechanic with a secondary variable like I did, to make my weather constantly changing every "hour", & my shop inventories changing every day; what you should do is create four secondary cycles where I have my "Shop Inventory" RNG mechanic.

    How many "levels" you want for each growth cycle is up to you, but you'll want a conditional branch with an else condition, that will check to see if the "growth cycle" variable has reached your desired peek, & if so revert "0", else it will +1 to the corresponding growth cycle variable.

    Now when you "harvest" an item, you need to have it check what the day is, & then from that, flip a self switch "ON". Say "A" for "Monday/Tuesday", "B" for "Wednesday/Thursday", "C" for "Friday/Saturday", & "D" for "Sunday". Once that self switch has been thrown, the any event that was "Harvested" on the corresponding day, will take its cues from the "growth cycle" variable amount. So just rig the conditional branches based on the corresponding "growth cycle" variable to produce image changes for the event, movement route controls attached to the conditional.

    Then once the final "growth cycle" component hits, just turn "off" the corresponding events self switch; that leaves it as a "mature plant" detached from the "growth cycle variables.
  9. XIIIthHarbinger said:
    Okay, here is my time system.

    Time System
    ◆Wait:300 frames
    ◆Control Variables:#0001 Minute += 1
    ◆If:Minute ≥ 60
    ◆Control Variables:#0008 Weather = Random 1..10
    ◆Control Variables:#0002 Hour += 1
    ◆Control Variables:#0001 Minute = 0

    :End
    ◆If:Hour ≥ 24
    ◆Control Variables:#0003 Day += 1
    ◆Control Variables:#0002 Hour = 0
    ◆Control Variables:#0067 Shop Inventory = Random 1..10

    :End
    ◆If:Day ≥ 29
    ◆Control Variables:#0004 Month += 1
    ◆Control Variables:#0003 Day = 1

    :End
    ◆If:Month ≥ 14
    ◆Control Variables:#0005 Year += 1
    ◆Control Variables:#0004 Month = 1

    :End
    ◆If:Hour = 5
    ◆Control Switches:#0002 Pre-Dawn = ON
    ◆Control Switches:#0003 Dawn = OFF
    ◆Control Switches:#0004 Day = OFF
    ◆Control Switches:#0005 Dusk = OFF
    ◆Control Switches:#0006 Twilight = OFF
    ◆Control Switches:#0007 Night = OFF

    :End
    ◆If:Hour = 6
    ◆Control Switches:#0002 Pre-Dawn = OFF
    ◆Control Switches:#0003 Dawn = ON
    ◆Control Switches:#0004 Day = OFF
    ◆Control Switches:#0005 Dusk = OFF
    ◆Control Switches:#0006 Twilight = OFF
    ◆Control Switches:#0007 Night = OFF

    :End
    ◆If:Hour = 7
    ◆Control Switches:#0002 Pre-Dawn = OFF
    ◆Control Switches:#0003 Dawn = OFF
    ◆Control Switches:#0004 Day = ON
    ◆Control Switches:#0005 Dusk = OFF
    ◆Control Switches:#0006 Twilight = OFF
    ◆Control Switches:#0007 Night = OFF

    :End
    ◆If:Hour = 19
    ◆Control Switches:#0002 Pre-Dawn = OFF
    ◆Control Switches:#0003 Dawn = OFF
    ◆Control Switches:#0004 Day = OFF
    ◆Control Switches:#0005 Dusk = ON
    ◆Control Switches:#0006 Twilight = OFF
    ◆Control Switches:#0007 Night = OFF

    :End
    ◆If:Hour = 20
    ◆Control Switches:#0002 Pre-Dawn = OFF
    ◆Control Switches:#0003 Dawn = OFF
    ◆Control Switches:#0004 Day = OFF
    ◆Control Switches:#0005 Dusk = OFF
    ◆Control Switches:#0006 Twilight = ON
    ◆Control Switches:#0007 Night = OFF

    :End
    ◆If:Hour = 21
    ◆Control Switches:#0002 Pre-Dawn = OFF
    ◆Control Switches:#0003 Dawn = OFF
    ◆Control Switches:#0004 Day = OFF
    ◆Control Switches:#0005 Dusk = OFF
    ◆Control Switches:#0006 Twilight = OFF
    ◆Control Switches:#0007 Night = ON

    :End
    ◆If:Weather Region = 0
    ◆Tint Screen:(0,0,0,0), 60 frames

    :End
    ◆If:Weather Region = 1
    ◆If:Pre-Dawn is ON
    ◆Tint Screen:(34,-34,-68,170), 60 frames

    :End
    ◆If:Dawn is ON
    ◆Tint Screen:(68,-34,-34,0), 60 frames

    :End
    ◆If:Day is ON
    ◆Tint Screen:(0,0,0,0), 60 frames

    :End
    ◆If:Dusk is ON
    ◆Tint Screen:(68,-34,-34,0), 60 frames

    :End
    ◆If:Twilight is ON
    ◆Tint Screen:(34,-34,-68,170), 60 frames

    :End
    ◆If:Night is ON
    ◆Tint Screen:(-68,-68,0,68), 60 frames

    :End

    :End
    ◆If:Weather Region = 2
    ◆If:Pre-Dawn is ON
    ◆Tint Screen:(34,-34,-68,170), 60 frames

    :End
    ◆If:Dawn is ON
    ◆Tint Screen:(68,-34,-34,0), 60 frames

    :End
    ◆If:Day is ON
    ◆Tint Screen:(0,0,0,0), 60 frames

    :End
    ◆If:Dusk is ON
    ◆Tint Screen:(68,-34,-34,0), 60 frames

    :End
    ◆If:Twilight is ON
    ◆Tint Screen:(34,-34,-68,170), 60 frames

    :End
    ◆If:Night is ON
    ◆Tint Screen:(-68,-68,0,68), 60 frames

    :End

    :End
    ◆If:Weather Region = 3
    ◆If:Pre-Dawn is ON
    ◆Tint Screen:(34,-34,-68,170), 60 frames

    :End
    ◆If:Dawn is ON
    ◆Tint Screen:(68,-34,-34,0), 60 frames

    :End
    ◆If:Day is ON
    ◆Tint Screen:(0,0,0,0), 60 frames

    :End
    ◆If:Dusk is ON
    ◆Tint Screen:(68,-34,-34,0), 60 frames

    :End
    ◆If:Twilight is ON
    ◆Tint Screen:(34,-34,-68,170), 60 frames

    :End
    ◆If:Night is ON
    ◆Tint Screen:(-68,-68,0,68), 60 frames

    :End

    :End
    ◆If:Weather Region = 4
    ◆If:Pre-Dawn is ON
    ◆Tint Screen:(34,-34,-68,170), 60 frames

    :End
    ◆If:Dawn is ON
    ◆Tint Screen:(68,-34,-34,0), 60 frames

    :End
    ◆If:Day is ON
    ◆Tint Screen:(0,0,0,0), 60 frames

    :End
    ◆If:Dusk is ON
    ◆Tint Screen:(68,-34,-34,0), 60 frames

    :End
    ◆If:Twilight is ON
    ◆Tint Screen:(34,-34,-68,170), 60 frames

    :End
    ◆If:Night is ON
    ◆Tint Screen:(-68,-68,0,68), 60 frames

    :End

    :End
    ◆If:Weather Region = 5
    ◆If:Pre-Dawn is ON
    ◆Tint Screen:(34,-34,-68,170), 60 frames

    :End
    ◆If:Dawn is ON
    ◆Tint Screen:(68,-34,-34,0), 60 frames

    :End
    ◆If:Day is ON
    ◆Tint Screen:(0,0,0,0), 60 frames

    :End
    ◆If:Dusk is ON
    ◆Tint Screen:(68,-34,-34,0), 60 frames

    :End
    ◆If:Twilight is ON
    ◆Tint Screen:(34,-34,-68,170), 60 frames

    :End
    ◆If:Night is ON
    ◆Tint Screen:(-68,-68,0,68), 60 frames

    :End

    :End
    ◆If:Weather Region = 6
    ◆If:Pre-Dawn is ON
    ◆Tint Screen:(34,-34,-68,170), 60 frames

    :End
    ◆If:Dawn is ON
    ◆Tint Screen:(68,-34,-34,0), 60 frames

    :End
    ◆If:Day is ON
    ◆Tint Screen:(0,0,0,0), 60 frames

    :End
    ◆If:Dusk is ON
    ◆Tint Screen:(68,-34,-34,0), 60 frames

    :End
    ◆If:Twilight is ON
    ◆Tint Screen:(34,-34,-68,170), 60 frames

    :End
    ◆If:Night is ON
    ◆Tint Screen:(-68,-68,0,68), 60 frames

    :End

    :End

    See how I've linked my "Weather" variable, to the hour cycling, & my "Shop Inventory" variable, to the shop cycling?

    Instead of using a RNG mechanic with a secondary variable like I did, to make my weather constantly changing every "hour", & my shop inventories changing every day; what you should do is create four secondary cycles where I have my "Shop Inventory" RNG mechanic.

    How many "levels" you want for each growth cycle is up to you, but you'll want a conditional branch with an else condition, that will check to see if the "growth cycle" variable has reached your desired peek, & if so revert "0", else it will +1 to the corresponding growth cycle variable.

    Now when you "harvest" an item, you need to have it check what the day is, & then from that, flip a self switch "ON". Say "A" for "Monday/Tuesday", "B" for "Wednesday/Thursday", "C" for "Friday/Saturday", & "D" for "Sunday". Once that self switch has been thrown, the any event that was "Harvested" on the corresponding day, will take its cues from the "growth cycle" variable amount. So just rig the conditional branches based on the corresponding "growth cycle" variable to produce image changes for the event, movement route controls attached to the conditional.

    Then once the final "growth cycle" component hits, just turn "off" the corresponding events self switch; that leaves it as a "mature plant" detached from the "growth cycle variables.

    Ohhh I see! Thanks a ton. @o@ Funny thing is my time system looks exactly like yours except its with Counters not Frames. That, and my tint-screens are a separate common event. Might add them to the same one now xD

    This will really help me with my game!
  10. No worries.