Galv Simple Crops water with rain

Hahasea

Veteran
Veteran
Joined
Jul 4, 2019
Messages
151
Reaction score
17
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

Engr. Adiktuzmiko

Chemical Engineer, Game Developer, Using BlinkBoy'
Veteran
Joined
May 15, 2012
Messages
14,696
Reaction score
3,008
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
17
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

^_^
Veteran
Joined
Feb 21, 2018
Messages
1,712
Reaction score
1,162
First Language
EN
Primarily Uses
RMMV
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,696
Reaction score
3,008
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
17
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

^_^
Veteran
Joined
Feb 21, 2018
Messages
1,712
Reaction score
1,162
First Language
EN
Primarily Uses
RMMV
@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
17
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,115
Reaction score
11,465
First Language
English
Primarily Uses
RMVXA
[move]JavaScript/Plugin Support[/move]
 

caethyril

^_^
Veteran
Joined
Feb 21, 2018
Messages
1,712
Reaction score
1,162
First Language
EN
Primarily Uses
RMMV
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
17
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

^_^
Veteran
Joined
Feb 21, 2018
Messages
1,712
Reaction score
1,162
First Language
EN
Primarily Uses
RMMV
You're welcome, happy RPG Making! :kaojoy:
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

Husband has roped me into playing one of his PSO2 characters. Productivity is now negative.
Tileset A is lava! Don't burn D:
as MZ come out what you guys think about.....Some particles engine :3c?
Who wants to sing this song with me?~

Decided to submit my games to the Monday Night Stream. Figured it might be a fun way to get some traction.

Forum statistics

Threads
100,702
Messages
978,527
Members
132,318
Latest member
Sassypsilon
Top