|
Development Forum |
 |
|
 Tea Queen
Laura
    

|
4/19/2013 | 3 |
I'm making a new patch plant for the Garden Box, but I need some help before I can release it into your worlds. 
Code (so far): Bouncingplums.cos
Sprites: Bouncingplums.c16
Please could someone experienced with patch plants show me how to finish off the 'remove' script (and point out anything else they notice needs doing) and also proof read my code to make sure nothing's wrong it? I really want this patch plant to work; it's been a huge learning curve, and hopefully it's going to be awesome to play with.
Thanks!  |

Malkin
     Manager

|
4/19/2013 | |
Great work so far, Laura! 
*install invisible flag agent:
new: simp 1 205 22929 "blnk" 0 0 9000
|
The 22929 needs to be 14852, because this doesn't refer to the main GB.
I'd tend to want to mash in
*full fruit and half-eaten fruit rots (9 = timer script):
elif pose eq 3
pose 4
elif pose eq 5
pose 6
endi |
with this:
***and if it's fully grown and already on the ground, it should add to its decay timer (ov01):
elif attr = 195
doif ov01 lt 10
addv ov01 1
else
kill targ
endi
endm |
So you'd go, elif attr = 195 (if I'm carryable by both norns and mouse, if I can take notice of room boundaries and if I can suffer physics), and ov01 is less than 10, add to the decay timer, and then change pose once it's decayed (from the full plum to the splatted plums if the pose is the full plum, or from the half-plum to the decaying half-plum if it's a half plum, and then eventually kill the decayed fruit).
The eat script looks great. 
My TCR Norns |

Malkin
     Manager

|
4/19/2013 | |
As another thought, you might like to check out this thread for some ideas on how to flip your fruit from looking and behaving like a fruit to looking and behaving like a detritus. 
My TCR Norns |
 Tea Queen
Laura
    

|
4/21/2013 | |
Thanks, Malkin: I'll look into those things.  |

ham5ter


|
4/27/2013 | |
As you wished the "a litle bit" fixed Sourcecode.
Bouncingplums.cos
moep!
|
 Tea Queen
Laura
    

|
4/27/2013 | |
Thank you, ham5ter; this is really helpful!  |

Malkin
     Manager

|
4/27/2013 | |
TheSecond has published the source code for the strawberries, for future reference. 
My TCR Norns |
 Tea Queen
Laura
    

|
4/27/2013 | |
Thanks, Malkin! I'm wondering if I can pick your brains about something, please? Here's my timer script:
*timer:
scrp 2 8 14852 9
***Age it every Tick
addv ov00 1
***if it's not fully grown, grow it to the next stage:
doif ov00 lt 3
setv va00 pose
addv va00 1
pose va00
endi
***if it's older then 20 ticks, let it rot
doif ov00 gt 19
setv va00 pose
doif va00 eq 4
kill targ
endi
doif va00 eq 6
kill targ
endi
addv va00 1
pose va00
**if it's fully grown and has been sitting on the plant for 10 turns, it should fall off the patch:
elif ov00 gt 12
doif attr eq 67
setv name "patch_id" 0
attr 195
stop
endi
***if it is fully grown, make sure creatures can see/grab it:
elif ov00 gt 3
doif attr eq 80
attr 67
emit 6 0.01
endi
stop
endi
endm |
What's the best way to amend it so that the plums grow and rot more gradually? At the moment they're growing and rotting too quickly! Thanks.  |

Malkin
     Manager

|
4/27/2013 | |
At the moment, you're aging it every tick - so they're counting up at lightning speed and doing everything accordingly.
Maybe doubling each number instance of ov00 including and after doif ov00 lt 3 would help?
My TCR Norns |
 Tea Queen
Laura
    

|
4/27/2013 | |
Thank you, that helped! One last question: where do I place this line if I want the plums to make a noise every time they bounce (similarly to the ball in C1)? 
|
 Tea Queen
Laura
    

|
4/27/2013 | |
Nevermind, I've figured it out; just replaced "smit" with "boun" in the collision script, so the plums make a bouncing ball noise... Except now I can't decide which sound would be better!
What do we reckon: a louder bouncing noise, or a soft thudding noise? |

Malkin
     Manager

|
4/27/2013 | |
Or you could make it random! Something like this:
rand va00 0 1
doif va00 eq 0
sndc boun
else
sndc smit
endi
|
My TCR Norns |
 Tea Queen
Laura
    

|
4/28/2013 | |
I think I'm all set, except I'm a bit confused in regards to this PRAY file and making the patch plant show up in the Garden Box itself. I've tried following this guide, but I'm still stratching my head... I've never compiled patch plants before!
Can anybody help, please? Explain it to me like I'm a dummy or something. |
 Peppery One
Papriko
    
|
4/28/2013 | |
I'd try to download the Strawberries as agent, decompile them using Monk and have a look at their PRAY-file. That's what I always do.
Though I am not totally sure if Monk understands GardenBox chunks so well. If not, it'd be another thing worth to be reported.
Lets play plants! Photosynthesis... Photosynthesis... Photosynthesis... |
 Tea Queen
Laura
    

|
4/28/2013 | |
Thanks, Papriko; that would be super-helpful! It'll all be worth it, I promise... I just haven't got a clue about what I'm doing.  |

Malkin
     Manager

|
4/28/2013 | |
I find that TCR's PRAY Decompiler can help.
My TCR Norns |
 Tea Queen
Laura
    

|
4/29/2013 | |
Thanks for the tips and tricks everyone! I'm happy that the Bouncing Plums have finally been released.  |