TriangleGM
Member
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:
(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
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 [email=0...@farm.events]0...@farm.events[/email][]
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
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