#This script holds data for the scriptcall that is to be used to progress#your crop events.#crop_progress(mapid) #Using the provided event, there are 3 stages of progression, 4 crops per#season, 12 crops total.class Game_Interpreter def crop_progress(mapid) season = $game_variables[HM_SEL::MONTH] events = load_data(sprintf("Data/Map%03d.rvdata2", mapid)).events.keys for eventid in events if self_metadata([mapid, eventid, 1]) == 'Crop' $game_self_switches[[mapid, eventid, 'A']] = false $game_self_switches[[mapid, eventid, 'B']] = false #F/G/H/I are Crop Indexes #After that are water requirement for crop stages. crop_control(mapid, eventid, 'F', 2, 3, 5) crop_control(mapid, eventid, 'G', 3, 6, 8) crop_control(mapid, eventid, 'H', 4, 8, 12) crop_control(mapid, eventid, 'I', 3, 6, 9) end end #If raining, then... if $game_variables[HM_SEL::WEATHA] == 2 for eventid in events if self_metadata([mapid, eventid, 1]) == 'Crop' rain_control(mapid, eventid, 'F') rain_control(mapid, eventid, 'G') rain_control(mapid, eventid, 'H') rain_control(mapid, eventid, 'I') end end end end #Do not Edit Below-----------------------------------------X def crop_control(mapid, eventid, index, var1, var2, var3) if $game_self_switches[[mapid, eventid, index]] if self_variable([mapid, eventid, 1]) >= var1 $game_self_switches[[mapid, eventid, 'C']] = true end if self_variable([mapid, eventid, 1]) >= var2 $game_self_switches[[mapid, eventid, 'D']] = true end if self_variable([mapid, eventid, 1]) >= var3 $game_self_switches[[mapid, eventid, 'E']] = true end end end def rain_control(mapid, eventid, index) if $game_self_switches[[mapid, eventid, index]] if $game_self_switches[[mapid, eventid, 'B']] == false self_variable([mapid, eventid, 1], 1, 1) $game_self_switches[[mapid, eventid, 'B']] = true end end end def crop_death(mapid, eventid, index) if $game_self_switches[[mapid, eventid, index]] $game_self_switches[[mapid, eventid, 'J']] = true end end def crop_wipe_out(mapid, eventid) self_variable([mapid, eventid, 1], 0, 0) $game_self_switches[[mapid, eventid, 'A']] = false $game_self_switches[[mapid, eventid, 'B']] = false $game_self_switches[[mapid, eventid, 'C']] = false $game_self_switches[[mapid, eventid, 'D']] = false $game_self_switches[[mapid, eventid, 'E']] = false $game_self_switches[[mapid, eventid, 'F']] = false $game_self_switches[[mapid, eventid, 'G']] = false $game_self_switches[[mapid, eventid, 'H']] = false $game_self_switches[[mapid, eventid, 'I']] = false $game_self_switches[[mapid, eventid, 'J']] = false endend