So, ive been having issues with the script, and i cant seem to farm or get water. nor can i use tools,when i go to to the event to use it (the dirt plot) it wont let me use the tools. here are the two scripts, i got them from selchars HM demo, => here
Ruby:
#This module holds some variable IDs, as well as methods used to determine
#if a specific tool type is selected(simply put, I reduced the number of
#conditional branches within conditional branches in certain events.
#Feel free to edit weapon ID ranges below.
#At the very bottom is an automated check for if you run out of seeds, to
#turn the tool variable back to 0, effectively "unequipping" them.
module HM_TOOL
#Variables used for current and max water
CURRENT_WATER = 14
MAX_WATER = 15
TOOL_VAR = 21 #This one is for "current tool"
TEMP_VAR_1 = 22
TEMP_VAR_2 = 23
TEMP_VAR_3 = 24
SHIPPING = 26
#Item Ids for Shippable Items
Shippable_Items = [1,3,7,8,11,12,13,14,15,16,17,18,19,20,21,22]
#Weapon Ids for different tools.
Axe_Equips = [1, 2, 3, 4, 5]
Hammer_Equips = [6, 7, 8, 9, 10]
Sickle_Equips = [11, 12, 13, 14, 15]
Water_Can_Equips = [16, 17, 18, 19, 42]
Hoe_Equips = [20, 21, 22, 23, 24]
Fishing_Rod_Equips = [25, 26, 27, 28, 29]
Seed_Equips = [30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41]
#Scriptcall used by Shipping Box to determine if an Item can be shipped
def self.can_ship?
return true if Shippable_Items.include?($game_variables[TEMP_VAR_1])
return false
end
def self.axe?
return true if Axe_Equips.include?($game_variables[TOOL_VAR])
return false
end
def self.hammer?
return true if Hammer_Equips.include?($game_variables[TOOL_VAR])
return false
end
def self.sickle?
return true if Sickle_Equips.include?($game_variables[TOOL_VAR])
return false
end
def self.water_can?
return true if Water_Can_Equips.include?($game_variables[TOOL_VAR])
return false
end
def self.hoe?
return true if Hoe_Equips.include?($game_variables[TOOL_VAR])
return false
end
def self.fishing_rod?
return true if Fishing_Rod_Equips.include?($game_variables[TOOL_VAR])
return false
end
def self.seed?
return true if Seed_Equips.include?($game_variables[TOOL_VAR])
return false
end
#After you use a seed, checks if you have any more, if you don't, set the
#variable to 0.
def self.have_seed?
#unequip seed
$game_party.members[0].change_equip(0,nil)
#decrease seed count by 1
id = $game_variables[TOOL_VAR]
$game_party.gain_item($data_weapons[id], -1)
#If still have seed, re-equip
if $game_party.has_item?($data_weapons[id]) == true
$game_party.members[0].change_equip(0,$data_weapons[id])
end
end
def self.get_equip_id
if $game_party.members[0].equips[0] != nil
right_hand = $game_party.members[0].equips[0]
$game_variables[TOOL_VAR] = right_hand.id
else
$game_variables[TOOL_VAR] = 0
end
end
end
Ruby:
#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
if $game_variables[HM_SEL::DAYB] > 1
case season
when 1 #SPRING------------------------------------------------
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
when 2 #SUMMER------------------------------------------------
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
crop_control(mapid, eventid, 'F', 3, 6, 10)
crop_control(mapid, eventid, 'G', 2, 9, 15)
crop_control(mapid, eventid, 'H', 2, 6, 8)
crop_control(mapid, eventid, 'I', 3, 5, 10)
end
end
when 3 #FALL--------------------------------------------------
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
crop_control(mapid, eventid, 'F', 2, 6, 10)
crop_control(mapid, eventid, 'G', 2, 7, 8)
crop_control(mapid, eventid, 'H', 3, 6, 8)
crop_control(mapid, eventid, 'I', 4, 10, 15)
end
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
else #If 1st of the month...
for eventid in events
if self_metadata([mapid, eventid, 1]) == 'Crop'
if $game_variables[HM_SEL::WEATHA] != 4
crop_death(mapid, eventid, 'F')
crop_death(mapid, eventid, 'G')
crop_death(mapid, eventid, 'H')
crop_death(mapid, eventid, 'I')
else
crop_wipe_out(mapid, eventid)
end
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
end
end