RPG Maker Forums

I am trying to create the scripts needed for non-scripters to make their own Harvest Moon style crops. I got as far the script for checking if plants are watered overnight, and I am getting an error that is well out of my league. I tried googling it, but I got nothing. I needed to cycle through every event on every map, and the only solution I found involves the rxdata, which I have avoided like the plague up to now. I don't even know a good tutorial for learning that, I just know that some people know it well, and I don't.
I am using the Self Variables from DrakoShade, as well as an original code I put together.
Here's the error:

And just to be thorough, here's the "bedtime" event with the script call:

The game starts fine, but when I try to call the Overnight script, that error comes up. Here's my script:
Code:
class Overnight
  def initialize
  @maps = []
  @farm = 1
  map_data = load_data('MapInfos.rxdata')
    for i in map_data.keys
      @maps.push(load_data(sprintf("Data/Map%03d.rxdata", i)))
    end
  end
  def water_check
    for f in 0...@maps[]
      @farm = @maps[f]
      for e in 0...@farm.events[]
        if $game_self_vaiables[[@farm, e, 1]] > 3
          if $game_self_switches[[@farm, e, "A"]] == on
            $game_self_switches[[@farm, e, "A"]] = off
            $game_self_variables[[@farm, e, 1]] += 1
          else if $game_self_switches[[@farm, e, "B"]] == off
            $game_self_variables[[@farm, e, 1]] = 3
          end
        end
      end
    end
  end
end
end
(I feel like there's one too many "ends" in there, but it won't run with any less or more.)
Self variable 1 is the main control for the crop event page.
Self switch A is used to check whether the crop has been watered.
Self Switch B checks if the crop is done growing.
If you want to look at the actual game, it can be downloaded from here: https://uploadfiles.io/xqshg

Latest Threads

Latest Posts

Latest Profile Posts

Just beat the last of us 2 last night and starting jedi: fallen order right now, both use unreal engine & when I say i knew 80% of jedi's buttons right away because they were the same buttons as TLOU2 its ridiculous, even the same narrow hallway crawl and barely-made-it jump they do. Unreal Engine is just big budget RPG Maker the way they make games nearly identical at its core lol.
Can someone recommend some fun story-heavy RPGs to me? Coming up with good gameplay is a nightmare! I was thinking of making some gameplay platforming-based, but that doesn't work well in RPG form*. I also was thinking of removing battles, but that would be too much like OneShot. I don't even know how to make good puzzles!
one bad plugin combo later and one of my followers is moonwalking off the screen on his own... I didn't even more yet on the new map lol.
time for a new avatar :)

Forum statistics

Threads
106,018
Messages
1,018,357
Members
137,803
Latest member
andrewcole
Top