Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

pet protocol

bUTTONpUSHER Jones
professional puddlejumper
Join date: 10 Oct 2002
Posts: 172
12-23-2004 03:58
Wouldn't it be cool if your pet could communicate and interact with mine? I've been working on a pet protocol and am looking for some feedback. Here goes:

The goal is to develop a protocol that would allow pets to communicate and interact with other pets and avatars.

1) easy to understand and modify
2) open source which anyone can copy for free from the forum.
- Please do not post your ideas to this thread if you don't want other people to use it. =]
- It is completely acceptable if you wish to use any or all of the code in this post in your pets and sell them for profit.

We need some scale to show where the animal fits into the food chain and show what other animals would be concidered a threat, prey, or playmate.

food chain 0.0 - 1.0
*This scale is off the top of my head and Very likely to be changed.*
0.0 grass
0.1 sheep
0.15 birds, mice
0.2 house cats
0.3 dogs
0.7 hippo
0.8 shark
0.9 lion
1.0 godzilla

A pet will chat it's status on a the introduction channel (9000) once every 10 seconds.

(If 2 pets decide they want to chase each other they agree to communicate more often on some other channel.. need to think about that more.)

Here are the attributes to be chatted every 10 seconds.
attribute example
fight 0.3 what would the pet approach
flee 0.4 what would the pet run from
type dog
subtype beagle
action chase, hide, beg, eat
target sylvester/grass/bp (use target's key instead of name?)
offsetR relative offset from target. <-5,0,0> would follow 5m behind target
offsetA absolute offset from target. <-5,0,0> would follow 5m west of target
- - - -
inferred info (can be detected when the pet chats)
name spot (pet's name = object name)
key a0deec52-f289-7608-7064-a8bcf480e6d8
distance distance in meters, often a radius

now to list some behaviors or "action" (a + sign indicates a target is required - such as another pet or avatar)
+ eat
+ chase
+ avoid
+ follow/swarm/flock
+ bump/push
+ ride/perch
+ mimic
play dead
speak
sit
stay
sleep
+ jump over
dig
+ circle
+ play tag
+ beg
find
give/deliver
retrieve/fetch
meet
face/look

example introduction string:
"introduction + fight|0.3 + flee|0.4 + type|dog + subtype|beagle + action|watching + target|owner + offsetR| <-5,0,0> + group|6500"

example command string:
"command + action|follow + target|mykey + offsetR|<-5,0,0>"

[ question + knowncommands|1 ]

[ answer + knowcommands|1 + follow| + sit| ]


Is this protocol missing anything?

You can find some code to start out with at http://secondlife.com/badgeo/wakka.php?wakka=PetProtocol21
Ming Chen
Here since 0.4.1!
Join date: 3 Sep 2003
Posts: 524
12-23-2004 05:09
lol, Ive started something like this last night! Something like this would be very cool in sl
_____________________
Adam Zaius
Deus
Join date: 9 Jan 2004
Posts: 1,483
12-23-2004 06:01
Just a note, I saw this and thought about updating the interchange index I posted in the forums a while ago.

I've added this entry on the wiki and something of my own to this page, as part of a scheme to standardise communication protocol's between scripts. :)

-Adam
_____________________
Co-Founder / Lead Developer
GigasSecondServer
Strife Onizuka
Moonchild
Join date: 3 Mar 2004
Posts: 5,887
12-23-2004 08:15
Just a thought about the protocal exchange, it would be nice if a few simple sample scripts were posted.

For your vender, it would be nice to know what valid button names that are supported & the range of values that can be passed.
_____________________
Truth is a river that is always splitting up into arms that reunite. Islanded between the arms, the inhabitants argue for a lifetime as to which is the main river.
- Cyril Connolly

Without the political will to find common ground, the continual friction of tactic and counter tactic, only creates suspicion and hatred and vengeance, and perpetuates the cycle of violence.
- James Nachtwey
Water Rogers
Registered User
Join date: 1 May 2003
Posts: 286
12-23-2004 11:09
bp good to see you again.. it's been awhile!

Couple quick questions fer ya.

I assume you are parsing the entire call splitting at (+) signs, and then individual attributes at (|) signs. You might want to consider a query builder function for this to make it happy for ya. The call itself looks clean enough, however keep in mind the string limitation when passing values (depending on weather you want to expand the query in the future, this may or may not be an issue).

What do you plan on doing after an action has been initialized? Will health or something be involved for the pet? Haha, reminds me of the little giga-pets kids were carrying around a few years back. you'd have to feed, walk etc or it will die :)

Interesting ideas enough... love to watch it's development. Keep posted :)

--Water
_____________________
From: Philip Linden

For the more technically minded - the problem is actually NOT the asset server (or 'asshat' as you prefer to affectionately call it herein).
Torley Linden
Enlightenment!
Join date: 15 Sep 2004
Posts: 16,530
12-23-2004 12:51
bUTTONpUSHER! Haven't seen you in the 'while, but I like your idea of more pet interaction. After all, it seems highly unnatural -- not to mention improbable -- that one's primanimal companions not socialize with each other in some capacity. I'd actually like to see this in action. :)

From: someone
1.0 godzilla


LOL -- what about King Kong, in the case of Siggy et al.? ;)
_____________________
Chromal Brodsky
ExperimentalMetaphysicist
Join date: 24 Feb 2004
Posts: 243
12-27-2004 09:19
From: bUTTONpUSHER Jones
Wouldn't it be cool if your pet could communicate and interact with mine?

This is a very cool idea. Keep us posted, or maybe make an in-world group?
Hiro Pendragon
bye bye f0rums!
Join date: 22 Jan 2004
Posts: 5,905
01-28-2005 01:45
I was digging through some old posts.... this is a cool idea, for sure.

Anyone start working on this?

Perhaps step 1 would simply have the periodic broadcast "I am pet XYZ" on the 9000 channel, and when heard, a pet could respond by barking / mewing / chirping, etc.

I can see all other features expanding from something like this.
_____________________
Hiro Pendragon
------------------
http://www.involve3d.com - Involve - Metaverse / Emerging Media Studio

Visit my SL blog: http://secondtense.blogspot.com
Samhain Broom
Registered User
Join date: 1 Aug 2004
Posts: 298
Geek Alert!!
01-28-2005 12:10
Oh hey, a "little birdie" told me to come read this post and say:

Oh yeah very cool, an unofficial set of chat ports for pets...

I propose someone write a doctrine 'bout this Channel: name? Call it the Dogma channel!

*looking innocent*

I hope it doesn't have a cataclysmic effect on things... "
_____________________
rm -rf /bin/ladden #beware of geeks bearing grifts
Morgam Biedermann
Registered User
Join date: 17 Jul 2008
Posts: 1
Help with the script
04-05-2009 10:08
Hey, how do i control the pet? I type the command and the only that the pet do is turn the head to me all time...
Void Singer
Int vSelf = Sing(void);
Join date: 24 Sep 2005
Posts: 6,973
04-05-2009 11:54
this is not the topic you were looking for...

contact the creator of your pet if you are having problems with it. if you don't know the creator right click on the pet and choose properties (if it is in inventory) or more -> more -> inspect (if it is rezzed in world).
_____________________
|
| . "Cat-Like Typing Detected"
| . This post may contain errors in logic, spelling, and
| . grammar known to the SL populace to cause confusion
|
| - Please Use PHP tags when posting scripts/code, Thanks.
| - Can't See PHP or URL Tags Correctly? Check Out This Link...
| -
Lightwave Valkyrie
Registered User
Join date: 30 Jan 2004
Posts: 666
04-06-2009 02:54
/me invents Godzilla Grass
_____________________
L$ is the root of all evil
videos work! thanks SL :)