Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Messages - TriangleGM

1
Wow, thank you! I didn't expect anybody to put that much into helping me out with this. I know it's not a really long script, but still, this is awesome. I fixed the other things you pointed out to me too, bonus! I can see I need to study up on hash and the difference between class and module. I expect there are tutorials around for that.

To be honest, I'm probably not the best person to be making a "toolkit." I've read through "C++ For Dummies" but I am not super familiar with ruby. It's just that I've been looking for something that does this for a long time, and I always find people asking about it, so I decided to just try and make it happen myself. This is definitely an early version of my first run at it, but perhaps I'll make a topic open for suggestions on the event structure. It just has to require as little additional scripting as possible for users to make their own crops for their games, that's my main goal. They'll have to cut and paste some one-liners, but there's just no other way to make it "event based." Anyway, thanks again, this is a great!
2
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:
Spoiler: ShowHide


The game starts fine, but when I try to call the Overnight script, that error comes up. Here's my script:
Spoiler: ShowHide
Code: text
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