[VX ACE]Problem with Selchar's Harvest moon farm/HP Tool scripts, cant plant crops, get water or use tools .

PoniMeiMei

Veteran
Veteran
Joined
Sep 29, 2021
Messages
83
Reaction score
15
First Language
english
Primarily Uses
RMVXA
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
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
36,278
Reaction score
9,702
First Language
German
Primarily Uses
RMMV
is the first script your configuration, or did you use it unchanged?

because the most common mistake for both scripts and plugins (in later makers) is to fail to configure them correctly for your specific game.

other than that we need to see screenshots of your events as well to see if they are configured correctly.
 

PoniMeiMei

Veteran
Veteran
Joined
Sep 29, 2021
Messages
83
Reaction score
15
First Language
english
Primarily Uses
RMVXA
yes i did configure it.
and
theres 71 different pages to one event-
which is the crop event.
the watering hole event only has one.
but heres the watering hole one-
if i figure out whats the problem for this it may help fix the crop one.

watering hole.PNG
 

Latest Threads

Latest Profile Posts

ScreenShot_6_28_2022_3_2_40.png

There's 7 main areas in the game that are all connected. This train get's you from an underground lab to the center of someone's subconscious. inside the train you can talk to some of the passengers. but going to the top of it, there's battles.
Speedrunning all character portraits just so they all have the same quality. Not sure if this was a good idea, but now I'm almost done.
We now have a gameplay video!
DrBuni wrote on Akiritas's profile.
That is a cute Link picture, reminds me of the Samurai Jack artstyle.
I had an idea on how to get my encounters to leash after chasing the player for a little bit. After going down the Javascript rabbit hole, I realized I could do it in a regular movement route. Derp!

Forum statistics

Threads
123,146
Messages
1,154,378
Members
161,492
Latest member
moslngs
Top