Hahasea

Veteran
Veteran
Joined
Jul 4, 2019
Messages
151
Reaction score
18
First Language
English
Primarily Uses
RMMV
Hey guys, I've got a farming system set up with Galv's Simple Crops, but I'm having a bit of trouble figuring out how to set it to water all the plants when it rains.

The plugin has this script call which seems like the key:

upload_2019-7-23_0-15-40.png

I tried replacing the bottom line of this script (which is for manually watering individual crops with a watering can) and putting it in the relevant rainy part of my weather common event, but it didn't work:
upload_2019-7-23_0-17-51.png

Any tips on how I can get this work? Or examples that other people have done that I could get a look at and apply to my own?

Cheers!
 

Attachments

  • upload_2019-7-23_0-17-35.png
    upload_2019-7-23_0-17-35.png
    22 KB · Views: 1

Engr. Adiktuzmiko

Chemical Engineer, Game Developer, Using BlinkBoy'
Veteran
Joined
May 15, 2012
Messages
14,682
Reaction score
3,006
First Language
Tagalog
Primarily Uses
RMVXA
Can you show a screenshot of your actual rain event?
 

Hahasea

Veteran
Veteran
Joined
Jul 4, 2019
Messages
151
Reaction score
18
First Language
English
Primarily Uses
RMMV
Can you show a screenshot of your actual rain event?

upload_2019-7-24_16-17-16.png
(and so on, several more weather conditionals)

I was planning on putting the watering script under each rain event, and altering the daysVar (the amount of days a plot stays watered) depending on the strength of the rain. But that hasn't worked for me, not sure what I'm missing.
 

caethyril

^_^
Global Mod
Joined
Feb 21, 2018
Messages
2,759
Reaction score
2,108
First Language
EN
Primarily Uses
RMMZ
Does the "water single crop" thing work for you, or is it just the "water all crops" that's giving trouble?

I just downloaded Galv's Simple Crops demo and tried this in a Script call, seemed to work OK:
Code:
Galv.CROPS.waterAll();
 

Engr. Adiktuzmiko

Chemical Engineer, Game Developer, Using BlinkBoy'
Veteran
Joined
May 15, 2012
Messages
14,682
Reaction score
3,006
First Language
Tagalog
Primarily Uses
RMVXA
I dont see where in that event you tried to implement the water part... We cant help you if we dont see what you did.
 

Hahasea

Veteran
Veteran
Joined
Jul 4, 2019
Messages
151
Reaction score
18
First Language
English
Primarily Uses
RMMV
@Engr. Adiktuzmiko Sorry, I misunderstood what you were after. Here's where I'm at right now, still not working:

upload_2019-7-24_21-57-21.png

Thanks :)

@caethyril single watering works fine, it's just trying to get rain events to trigger watering all that is the issue. I'm still a bit green when it comes to scripting, so it's probably a dumb mistake.
 
Last edited by a moderator:

caethyril

^_^
Global Mod
Joined
Feb 21, 2018
Messages
2,759
Reaction score
2,108
First Language
EN
Primarily Uses
RMMZ
@Hahasea, I think that extra branch you have there is messing things up: it checks whether the current event has a seed planted. Assuming this weather sequence is getting called from a parallel common event, that'll always be false. :kaoswt:

Instead, I would suggest putting this Script command immediately after the "Light rain" comment:
Code:
Galv.CROPS.waterAll(19);
If that works, you can do something similar for other rain intensities~ :kaothx:
 

Hahasea

Veteran
Veteran
Joined
Jul 4, 2019
Messages
151
Reaction score
18
First Language
English
Primarily Uses
RMMV
@caethyril Ok, I tried that, and it seemed to work, but then I realised that any crop watered by the rain was staying at seed stage, and even if a crop managed to grow before a rain, the rain reverts it to seed stage. No idea why that's happening!

Tbh I'm a little unsure which variable I should be using. At the moment I have it on 19 which is the Seed: Crop ID variable, but I'm not sure if that's wrong? Also tried Seed: Plot ID but that did exactly the same thing.
 

Kes

Veteran
Veteran
Joined
Aug 3, 2012
Messages
22,511
Reaction score
11,995
First Language
English
Primarily Uses
RMVXA
[move]JavaScript/Plugin Support[/move]
 

caethyril

^_^
Global Mod
Joined
Feb 21, 2018
Messages
2,759
Reaction score
2,108
First Language
EN
Primarily Uses
RMMZ
The plugin help labels it as a "days" variable; I admit I don't quite understand, myself, but crop ID doesn't sound right regardless. Have you tried without anything in the brackets?
Code:
Galv.CROPS.waterAll();
 

Hahasea

Veteran
Veteran
Joined
Jul 4, 2019
Messages
151
Reaction score
18
First Language
English
Primarily Uses
RMMV
@caethyril I swear that I did and it didn't work, but I tried it again to double check, and this time it worked! :LZSwink:

Thank you so much for all your advice, you've been really amazing!
 

caethyril

^_^
Global Mod
Joined
Feb 21, 2018
Messages
2,759
Reaction score
2,108
First Language
EN
Primarily Uses
RMMZ
You're welcome, happy RPG Making! :kaojoy:
 

Latest Threads

Latest Profile Posts

 …I think I might need to switch from standard ATK/DEF up/down buffs to parameter altering states. I just had an actor whose usual attack against an enemy does ~25 do a buffed attack against a debuffed enemy for ~600…
just saw that titan quest is free on steam until the 23rd
Zombie status is now complete. I didn't have to do much in the way of changing how healing is applied to undead targets, was just a simple 3 line code. I thought I had to overhaul Game_Action lol. Everything else was doable by events. So.. Zombie: You turn undead. Your element changes to darkness. You're weak to light, you're strong to physical attacks and healing hurts you and revival items will kill you.
My Overworld might be a mix of inspiration from 2D Final Fantasy games, Breath of Fire, Battlechasers: Nightwar, Super Mario World, and Pillars of Eternity. If I can make it more in-depth than just walking from point A to point B, that might do a lot for the gameplay experience. Hmm...

Forum statistics

Threads
115,222
Messages
1,088,197
Members
149,813
Latest member
Mudge
Top