[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4688: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4690: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4691: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4692: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
Garden Box Central • View topic - Guide to writing Patch Plants

Guide to writing Patch Plants

Development guides, discussion, and testing for Garden Box compatible agents.

Guide to writing Patch Plants

Postby Amaikokonut » Wed Aug 01, 2012 9:22 pm

Amaikokonut
Site Admin
 
Posts: 171
Joined: Wed Feb 08, 2012 3:34 pm

Re: Guide to writing Patch Plants

Postby malkin » Fri Aug 10, 2012 4:13 pm

Is making a 'ground' patch plant (mushrooms, carrots... grass?) significantly different from making a 'wall' patch plant?
malkin
 
Posts: 132
Joined: Sat Feb 11, 2012 3:55 am

Re: Guide to writing Patch Plants

Postby Amaikokonut » Fri Aug 10, 2012 10:13 pm

Not really; I think the only thing to be aware of is that you need to give the plants physics from the start, and you might want to make your first "stage" of growth an invisible or very tiny sprite if you don't want them to be plainly visible since they still spawn in the patch box and then fall to the ground.

Ground patches were one of those things that weren't really intended from the start, but ended up being a nice use for the existing framework anyway!
Amaikokonut
Site Admin
 
Posts: 171
Joined: Wed Feb 08, 2012 3:34 pm

Re: Guide to writing Patch Plants

Postby AquaShee » Sun Aug 12, 2012 6:34 am

A solution for the flower/fruit problem would be keeping the flower hidden behind the fruit until the fruit drops. This way butterflies, hummingbirds and other flower-loving critters get to enjoy the tasty, tasty blossoms properly.
AquaShee
 
Posts: 3
Joined: Sun Aug 12, 2012 6:24 am

Re: Guide to writing Patch Plants

Postby malkin » Mon Jan 21, 2013 1:11 am

malkin
 
Posts: 132
Joined: Sat Feb 11, 2012 3:55 am

Re: Guide to writing Patch Plants

Postby Amaikokonut » Mon Jan 21, 2013 12:02 pm

Hmm, what specifically is baffling you? I can try to make that segment a little more clear.

If you compare the chili spawn-code and the carrot-spawn code side-by-side, they're nearly identical with a few differences:
- The carrot seed starts out with attr 208 to allow physics; it falls directly from its spawn-point in the box onto the ground, whereas the chili starts with attr 80 which doesn't allow physics-- obviously it wants to stay in place until it's grown!
- The carrot has some additional code to determine which way it faces when it lies on the ground, but that's just...carrotyness.

Let me know how else I can help!
Amaikokonut
Site Admin
 
Posts: 171
Joined: Wed Feb 08, 2012 3:34 pm


Return to The Greenhouse Laboratory

Who is online

Users browsing this forum: No registered users and 1 guest