creatures caves welcome, guest
downloads   gallery   dev   community   creatchi   forum   mycaves
bookmarks | search | post new topic
Development Forum
old
Plant Agent In Progress help   
Norngirl

Norngirl
Sweden  

 visit Norngirl's website: Norngirl's Temporary Storage
  8/3/2011

(Originaly posted on Creaturetopia)

I need help with one C3-Ds agent me and Razgriz is co working on,called the Lifephiria plant.
As allways - started off with me making a sprite for a agent idea of my own and
Razgriz kindly wanted to help me bring it to life.
He done most of the coding ,but it dosn't work quite the way it should yet,but
with some changes I think it won't be long til it maybe will be fixed,and thats why I
hope soneone here maybe can help by pointing out what can be done.
I just come to realise that the DS Lemon pod vendor seem to work
much the way I want it to,but Razgriz find it quite complex but still
wanna have a try on it thought that I could maybe get a answer here on how
it can be done. Here is a image of what the plant look like.

Im going to try my best to explain what it is supposed to do and
what the current ingame beta does for now,along with the similarness points of the
Ds Lemon pod vendor .

Here is a breif explenation on what It is supposed to do:
******************
Meant to be kinda like a pretty decoration when idle,
and act kinda like a vendor (but is a plant).

¤ A plant that when clicked on it drops it's fullgrown flower to the ground,
after a short while a new flower grows quickly back to a fullgrown flower (along with a sound playing,matching the grow back animation).

¤ When eating 2 or 3 of this flower makes a creature age once

¤ when picked up by hand/creature the flower is held upright.

and here is what it does ingame:
**************************************
¤ for now - it inject the plant without the adult flower on..
(this image was made - so I could make the flower seperate when it is going to fall to the ground,
and was originaly not the first image in the sprite set,it was image set as image 4,but razgriz thought if he changed it to the first,it would
work better )

¤ duo to this,only when you click on the plant it produce a adult flower by
the "grow back" sound start to play and ends as slowly the flower grows to fullsize and then quickly drops to the ground,
so when the plant is idle again, it's flowerless -_-'

¤ One flower make a creature age once...

Here is a help picture I made for Razgriz to try explain what I meant by
seperate flower image - the drop down effect and if the flower could be droped in a specific area.

Also, Razgriz said he found a code that would make the upright flower image appear,
but said he couldn't make it work..so now I wonder,any clue how to make this possible?

The Lemon Ds Pod similarness:
*************************************
Everyone here who play DS knows about the Lemon pod vendor in the
upper left corner of the norn meso.
The lemon vendor vends lemons,but after some few clicks,
it start to harvest the lemons and they grow back to full size and then vend another lemon right after.

The similarness is listed here:

Both lifephiria and the lemonpod act that when just clicking once
(Not coutning the extra few clicks that has to be made to trigger the harvest part)
the fruit/flower fall down and right after harvest/grows back again to be ready for being activated again.
Both also have two sounds - one for droping the fruit/flower and one from the harvest/growing back flower.

I think the DS lemonvendor here acts as close to what I want,
it just have some small differ,but the idea is quite pretty same.

so,once again,here is a better veiw of the plant again of what it should do/and what it does now.
This is just kind of a end summary and a better comperation explaining * hopes at least*.
also note: this is not the exact comperation explenation seen above.

Current beta version - not acting as it should :
****************************************************
¤ Injects with the no adult flower on it

¤ Click on it and it grows (slowly) a flower wich quickly drops it - leaving a plant without one flower,making it not so pretty..

¤ The "grow back" sound was meant to be near the end - but it play in the start..

¤ one flower age a creature once

¤ The pickup image of the flower got replaced with the lay on ground image,as the code didn't work for it to change to another image when picking it up.

Things that was meant to be:
********************************
¤ flower facing up image for the "pick up" part

¤ inject the plant with the correct plant with the adult flower on it.

¤ Once clicked - the flower drops and then after a while ( Like the DS Lemon Pod) grows back a new flower (with the sound matching the speed of animation of it)
That way the flower look pretty as idle too and the adult flower is ready to be droped everytime you click as it allways grows back a new.
(Note - hopefuly animation speed could be like this - the sound itself is 1,30 sec long)

¤ as said before, 2-3 flowers make a creature age once

so is there any chance this can be fixed ?
I appreciate any kind of help you can give!

We realy want to make this work as it should and be able to release it so anyone can enjoy it.

 
Papriko
Peppery One

Papriko



  8/4/2011

I don't know if the lemon pod really works like that, but I would make the plant base a NEW: COMP agent and inject every single flower as PAT: DULL. This way you can individually grow or drop them.

When the wrong positions are used, then it's either something with the positions or with the sprites. Don't forget: invisible parts of the sprite will be used too! That means when the sprite has lots of invisible space above, the flower will appear lower than it actually should be.
If that isn't the problem, there's something wrong in the code and you have to change the positions by hand.

For the part that they change the pose when they are picked up, dropped or touch the ground, simply change the pose via the POSE command (very creative name for the command, I know). You can use the Been-Picked-Up-Script (scrp # # # 4), Been-Dropped-Script (scrp # # # 5) and the Hit-Ground-Script (scrp # # # 6).


Lets play plants! Photosynthesis... Photosynthesis... Photosynthesis...
 
Ghosthande
Prodigal Sock

Ghosthande


 visit Ghosthande's website: Breeders Beware
  8/4/2011

but Papri, if the flowers are pat: dull they're just images, Creatures won't be able to see them and they won't be edible objects.


 
AquaShee

AquaShee



  8/4/2011

Yeah, pat: parts only work if the object is not supposed to be interacted with by norns, or be pickupable immediately by the hand.

A better way would be to simply place a new object without gravity where the flower should be, and give it gravity as soon as the hand or a creature touches it.


The Community Scribble: make (y)our own metaroom!
 
Papriko
Peppery One

Papriko



  8/5/2011

I forgot the part with the pickup. In this case you had to use NEW: SIMP as Ghostie and AS suggested.
FREL will do the job then.


Lets play plants! Photosynthesis... Photosynthesis... Photosynthesis...
 
AquaShee

AquaShee



  8/5/2011

No need to use FREL if the agent it's floating next to isn't going to be moving. You won't be saving any work because you'd still have to reset the ATTR once the fruit has been touched/picked up. FREL is useful for things like potted plants, UI elements, indicator arrows and the like.

The Community Scribble: make (y)our own metaroom!
 
Ghosthande
Prodigal Sock

Ghosthande


 visit Ghosthande's website: Breeders Beware
  8/5/2011

This plant is potted, so I think FREL would be necessary, unless the pot is immobile. ;)


 
AquaShee

AquaShee



  8/5/2011

Oh! Silly me. Yes, by all means use FREL or vehicles. :)

The Community Scribble: make (y)our own metaroom!
 
Razgriz

Razgriz



  8/6/2011

Many thanks guys, I've gotten the plant's flowers to change frames properly :)

Now, I seem to be having trouble increasing the amount of flowers needed to actually age a creature. -0.3 is the current amount of the Life chemical the flower gives. Any suggestions on what number to change it to?

FREL is already being used in the code so yeah, any suggestions on the other things would be great ;)

 
Papriko
Peppery One

Papriko



  8/6/2011

1.0 is the maximum amount of life (and every other) chemical that creatures can have, so -0.3 already reduces it by almost 1/3.
Try smaller values. I'd start by... lets say -0.05 and then experiment.


Lets play plants! Photosynthesis... Photosynthesis... Photosynthesis...
 
Norngirl

Norngirl


 visit Norngirl's website: Norngirl's Temporary Storage
  8/7/2011

Yeah thanks a lot everyone here ^^ There's also another thing we wonder about:

How to do with the plants animation, specialy when it is idle..
is it that easy to set the sprite image I had as number 3 to 0 ?
*for now , the one without the flower is 0 ,as you may remember I mentioned razgriz switched to that*

and what about trying to match the
1,30 sec sound file to the speed of the re-grow flower ?
A speed on the flower growth like this would be d if possible:

http://i61.photobucket.com/albums/h78/Getchuz/Lifephiria_BloomBack_btr.gif

 
Ghosthande
Prodigal Sock

Ghosthande


 visit Ghosthande's website: Breeders Beware
  8/8/2011

idle animations can just be set in a script after other animations are finished (like, if the activate script animates it a certain way, the very end of that script can have a command telling it to create a looped animation). Or if it's supposed to be periodic, it can use a timer script.

Matching sound files isn't easy--the game handles playing sounds differently than say animation, it doesn't use ticks for sound effects, so you cannot rely on a sound file to be consistently equal to a certain number of ticks. You can use FRAT to make the animation slower/faster, and try putting the sound before/after to change when it starts to play (or splitting the animation into two lines and putting the sound file in the middle), but beyond that you just sort of have to go with what sounds closest and realize that it won't be perfect every time. :\



 
AquaShee

AquaShee



  8/8/2011

The game tries to keep a pace of 1 tick for every 50 milliseconds though. So you can calculate how long to wait between each pose to make it match up with the sound, but only if the computer is running DS at normal speed.
But if someone's computer is running DS slowly to start with, mismatched sounds are the least of their worries. ;)


The Community Scribble: make (y)our own metaroom!
 
Gumbo

Gumbo



  8/8/2011

this looks sooooooo cool good luck guys!!!

MOTIVATION YEA



in the spring you gotta let the flowers fully blossom

 
Ghosthande
Prodigal Sock

Ghosthande


 visit Ghosthande's website: Breeders Beware
  8/8/2011

True AquaShee. It doesn't matter much for short sound effects, but for long ones--like a radio that animates and plays a song--the difference can become noticeable.


 
Razgriz

Razgriz



  8/8/2011

Ghost: What command would that be? For the animation I mean.
 
Ghosthande
Prodigal Sock

Ghosthande


 visit Ghosthande's website: Breeders Beware
  8/9/2011

just regular old anim [whatever]
or pose, if it's just switching to a certain frame



 
Razgriz

Razgriz



  8/11/2011

Ah, I've tried anime before, but it animated far too quickly. Instead, I'm using pose as that seems to handle the animations better.
reps 3
setv va02 pose
wait rand 15 20
addv va02 1
pose va02
repe
pose 0

This is what I have so far in order to get the plant to reset to the first frame after going through the making flower frames. Is there a better way to do it? My way isn't working :/

 
Ghosthande
Prodigal Sock

Ghosthande


 visit Ghosthande's website: Breeders Beware
  8/12/2011

You can try using the FRAT command to change the frame rate; eg. FRAT 2 makes animations take twice as long, FRAT 3 three times as long, and so on. And you can change it any time in the scripts, eg. to make it longer before a certain animation and then change it back to normal after.


 


downloads
cobs
adoptions
creaturelink
metarooms
breeds
 
gallery
art
wallpaper
screenshots
graphics
promos
sprites
dev
hack shack
script reservations
dev resources
active projects
dev forum
 
community
links
advice
chat
polls
resources
creatchi
 
forum
bookmarks
general
news
help
development
strangeo
survivor
mycaves
log in
register
lost pw
0 online
creatures caves is your #1 resource for the creatures artificial life game series: creatures, creatures 2, creatures 3, docking station, and the upcoming creatures family.

contact    help    privacy policy    terms & conditions    rules    donate    wiki