Pets
In Staxel, *.pet files are used to specify a pet. These pets build open the framework provided by Farm Animals, and extend it further to allow pet based behaviours to be implemented.
It specifies the following;
- What the pets's model and body type is.
- What behaviours the animal will have
- What the pet will give under certain circumstances.
Pets are a small extension to Farm Animals and as such are just as complex to make. Pets touch on so many different areas that it isn't uncommon to see at least 7 files per pet.
Contents
- 1 Creating a *.pet file
- 2 Config Options
- 3 Inherited Config Options
- 3.1 "code"
- 3.2 "airResistance"
- 3.3 "animationParameters"
- 3.4 "catatonic"
- 3.5 "crateTile"
- 3.6 "designs"
- 3.7 "despawnBehaviourKind"
- 3.8 "eatsFromHand"
- 3.9 "eatsGrass"
- 3.10 "eatPartcles"
- 3.11 "eating"
- 3.12 "eggs"
- 3.13 "expressions"
- 3.14 "feedKind"
- 3.15 "grazes"
- 3.16 "happy"
- 3.17 "idleBehaviours"
- 3.18 "jumpForce"
- 3.19 "milkingBehaviours"
- 3.20 "milks"
- 3.21 "models"
- 3.22 "moods"
- 3.23 "moodOverrides"
- 3.24 "movementVelocity"
- 3.25 "names"
- 3.26 "nudeModels"
- 3.27 "paramAnimator"
- 3.28 "playBehaviours"
- 3.29 "poops"
- 3.30 "pushedForce"
- 3.31 "resistedPushedForce"
- 3.32 "shearingBehaviours"
- 3.33 "sleepy"
- 3.34 "spawnBehaviours"
- 3.35 "standingResistance"
- 3.36 "turnSmoothingFactor"
- 3.37 "unhappy"
- 3.38 "unhappyBehaviours"
- 3.39 "velocityRandomizationFactor"
- 3.40 "wools"
Creating a *.pet file
Config Options
"begging"
This is a Blob that contains information on the what the effects that will play when the animal is playing the "staxel.petBehaviour.BegIdle" behaviour. It will commonly look like;
"begging": { "emotes": [ "staxel.emote.pets.Beg"] },
"emotes"
Valid options (List of Strings): A list of strings each containing the code to a Emote file.
Default Value: No default value is specified. Always need to provide your own.
This is the list of emotes that will be randomly selected in when showing the animal is begging.
"categories"
Valid options (List of String): A list of valid strings.
Default Value: If not specified, will not have any user defined categories.
This is a list of strings which are used to identify what the tile actually is. These terms can all be searched for in the Catalogue/Creative Menu, but are also used in Totems and Achievements. Certain categories will appear under certain tabs in either menu. These include:
"block", "door", "floor"/"flooring", "flower", "furniture", "light", "plant", "tool", "window", "misc", "red", "orange", "yellow", "green", "blue", "purple", "pink", "white", "black" and "brown"
"maxFollowDistance"
Valid options (Double): A positive decimal number.
Default Value: No default value is specified. Always need to provide your own.
This is maximum distance away from the pet house that the pet will go to, while following a player.
"petHouse"
Valid options (String): A string containing the code to a Tile
Default Value: No default value is specified. Always need to provide your own.
This is the tile that houses this pet. This tile must have the Tile#"kind" of "staxel.tileState.PetHouse"
and will therefore add this pet to that tile.
"pickUp"
This is a Blob that contains information on the what the effects that will play when the animal is playing the "staxel.petBehaviour.Fetch" behaviour. It will commonly look like;
"pickUp": { "emotes": [ "staxel.emote.pets.PickUp"] },
"emotes"
Valid options (List of Strings): A list of strings each containing the code to a Emote file.
Default Value: No default value is specified. Always need to provide your own.
This is the list of emotes that will be randomly selected in when showing the animal is picking up the ball.
"rolling"
This is a Blob that contains information on the what the effects that will play when the animal is playing the "staxel.petBehaviour.Rollover" behaviour. It will commonly look like;
"rolling": { "emotes": [ "staxel.emote.pets.Rollover"] },
"emotes"
Valid options (List of Strings): A list of strings each containing the code to a Emote file.
Default Value: No default value is specified. Always need to provide your own.
This is the list of emotes that will be randomly selected in when showing the animal is rolling over.
"searchable"
Valid options (Bool): True or False
Default Value: If not specified, will default to False.
This option specifies if the object whether the object will show up when it is searched for in the shop catalogue or the creative inventory. This is useful for objects with auto tiling info, as you only want a single version of that tile appearing.
"sitting"
This is a Blob that contains information on the what the effects that will play when the animal is playing the "staxel.petBehaviour.SitIdle" and other behaviours. It will commonly look like;
"sitting": { "emotes": [ "staxel.emote.pets.Sit"] },
"emotes"
Valid options (List of Strings): A list of strings each containing the code to a Emote file.
Default Value: No default value is specified. Always need to provide your own.
This is the list of emotes that will be randomly selected in when showing the animal is sitting down.
"treasure"
Valid options (String): A strings containing the code to a Treasure Pool file.
Default Value: If not specified, will give the default items to the player. (By default the treasure is staxel.treasure.PetFurniture)
This is the treasure that will determine what the pet will give the player when the pet is happy.
"wanderRadius"
Valid options (Double): A positive decimal number.
Default Value: No default value is specified. Always need to provide your own.
This is maximum distance away from the pet house that the pet will to on its own.
Inherited Config Options
"code"
Valid options (String): A unique string which species what this Farm Animal is.
Default Value: No default value is specified. Always need to provide your own.
A string containing the code of the farm animal the blob will be referring to.
"airResistance"
Valid options (Double): A positive decimal number.
Default Value: No default value is specified. Always need to provide your own.
This is the amount of resistance to movement the animal will have while on the ground.
"animationParameters"
This is a blob containing the values of how the animal can move and the animation that goes with that. It will commonly look like;
"animationParameters": { "WalkingStrideCycleLength": 0.5, "SwimmingStrideCycleLength": 0.5, "MaxWalkingSpeed": 2.0, "RunningStrideCycleLength": 2.0, "MinRunningSpeed": 3.0, "AnimationJitterFactor": 1.0 },
"AnimationJitterFactor"
Valid options (Float): A positive decimal number.
Default Value: No default value is specified. Always need to provide your own.
This is how much the animation will vary from frame to frame. This effectively changes the animation playing speed where a value of 10 will play the animation 10 times as fast, while 0.1 will take 10 times as long to complete.
"MaxWalkingSpeed"
Valid options (Float): A positive decimal number.
Default Value: No default value is specified. Always need to provide your own.
This is the minimum velocity the animal will change its animation to. Going slower than this value will not make the animal animate slower.
"MinRunningSpeed"
Valid options (Float): A positive decimal number.
Default Value: No default value is specified. Always need to provide your own.
This is the maximum velocity the animal will change its animation to. Going higher than this value will not make the animal animate faster.
"RunningStrideCycleLength"
Valid options (Float): A positive decimal number.
Default Value: No default value is specified. Always need to provide your own.
This is the highest value for how long the running stride will take. Smaller values mean that the animation will repeat more often over a set distance.
"SwimmingStrideCycleLength"
Valid options (Float): A positive decimal number.
Default Value: No default value is specified. Always need to provide your own.
This is the value for how long the swimming stride will take. Smaller values mean that the animation will repeat more often over a set distance.
"WalkingStrideCycleLength"
Valid options (Float): A positive decimal number.
Default Value: No default value is specified. Always need to provide your own.
This is the lowest value for how long the running stride will take. Smaller values mean that the animation will repeat more often over a set distance.
"catatonic"
This is a Blob that contains information on the what the effects that will play when the animal is playing the "staxel.farmAnimalBehaviour.Catatonic" behaviour. (Most commonly done while despawning.) It will commonly look like;
"catatonic": { "emotes": [ "staxel.emote.farmAnimals.Eaiting_1"], },
"emotes"
Valid options (List of Strings): A list of strings each containing the code to a Emote file.
Default Value: No default value is specified. Always need to provide your own.
This is the list of emotes that will be randomly selected in when showing the animal is catatonic.
"crateTile"
Valid options (String): A string containing the code to a Tile
Default Value: No default value is specified. Always need to provide your own.
This is the tile that is given when attempting to capture this animal. It should be the same one to spawn the animal, although it can be different.
"designs"
Valid options (List of Blobs ): A list of blobs.
Default Value: No default value is specified. Always need to provide your own.
This is a list of blobs containing all the different Villager Designs the animal can take. Often this is only used to specify the Species, gender, and Personalities of the animal and not to specify the clothing of the animal.
"despawnBehaviourKind"
Valid options (List of Strings): A list of strings containing the name of a behaviour.
Default Value: No default value is specified. Always need to provide your own.
This is a list of behaviours that the animal will use when despawning from the world. The full list of Behaviour codes and what they do is listed under Animal Behaviours.
"eatsFromHand"
This is an List of Blobs that contains information on each items that can be eaten. This will commonly look like;
"eatsFromHand": [ { "code": "staxel.item.crafting.Wool" } ],
Each blob follows the Items#How to Spawn an Item of normal items.
"eatsGrass"
Valid options (Bool): True or False
Default Value: No default value is specified. Always need to provide your own.
This will determine if the animal will actually eat the tile tile and lose hunger. Will do nothing unless #"grazes" is true.
"eatPartcles"
Valid options (String): A strings containing the code to a Particle System file.
Default Value: If not specified, will not play any particles.
This will decide what particles to play while the animal is eating.
"eating"
This is a Blob that contains information on the what the effects that will play when the animal is eating. It will commonly look like;
"happy": { "emotes": [ "staxel.emote.farmAnimals.Eaiting_1"], },
"emotes"
Valid options (List of Strings): A list of strings each containing the code to a Emote file.
Default Value: No default value is specified. Always need to provide your own.
This is the list of emotes that will be randomly selected in when showing the animal is eating.
"eggs"
Valid options (List of Blobs): A list of blobs containing Items. See Items#How to Spawn an Item for more details.
Default Value: No default value is specified. Always need to provide your own.
This is the list of items you want the Animal to lay on occasion. Each of these items will need to follow the Items#How to Spawn an Item of normal items.
"expressions"
This is a Blob that contains information on what Expressions will be played with certain moods. It will commonly look like;
"expressions": { "great": [ "staxel.accessories.eyes.BlackCat.great"], "good": [ "staxel.accessories.eyes.BlackCat.happy"], "normal": [ "staxel.accessories.eyes.BlackCat.normal"], "bad": [ "staxel.accessories.eyes.BlackCat.bad"], "horrible": [ "staxel.accessories.eyes.BlackCat.horrible"], "sleeping": [ "staxel.accessories.eyes.BlackCat.sleeping"] },
"great"
Valid options (List of Strings): A list of strings each containing the code to a Expressions file.
Default Value: If not specified, will not change the face.
This is the list of expressions to use when showing off great level happiness.
"good"
Valid options (List of Strings): A list of strings each containing the code to a Expressions file.
Default Value: If not specified, will not change the face.
This is the list of expressions to use when showing off good level happiness.
"bad"
Valid options (List of Strings): A list of strings each containing the code to a Expressions file.
Default Value: If not specified, will not change the face.
This is the list of expressions to use when showing off bad level happiness.
"horrible"
Valid options (List of Strings): A list of strings each containing the code to a Expressions file.
Default Value: If not specified, will not change the face.
This is the list of expressions to use when showing off horrible level happiness.
"sleeping"
Valid options (List of Strings): A list of strings each containing the code to a Expressions file.
Default Value: If not specified, will not change the face.
This is the list of expressions to use when showing that the animal is sleeping.
"feedKind"
Valid options (String): Any valid string.
Default Value: No default value is specified. Always need to provide your own.
This is the string containing what the animal will eat. This animal will then proceed to eat from Tiles that have a Feeder Component with this particular string.
"grazes"
Valid options (Bool): True or False
Default Value: No default value is specified. Always need to provide your own.
This will determine whether or not the Animal will show the eating the ground animation. This will not determine if the animal will turn the grass to dirt. (That is decided by #"eatsGrass".)
"happy"
This is a Blob that contains information on the what the effects that will play when the animal is happy. It will commonly look like;
"happy": { "emotes": [ "staxel.emote.farmAnimals.Happy_1"], "sounds": [ "staxel.sounds.farmAnimals.Chicken.happy_1"] },
"emotes"
Valid options (List of Strings): A list of strings each containing the code to a Emote file.
Default Value: No default value is specified. Always need to provide your own.
This is the list of emotes that will be randomly selected in when showing the animal is happy.
"sounds"
Valid options (List of Strings): A list of strings each containing the code to a Sound file.
Default Value: No default value is specified. Always need to provide your own.
This is the list of sounds that will be randomly selected in when showing the animal is happy.
"idleBehaviours"
Valid options (List of Strings): A list of strings containing the name of a behaviour.
Default Value: No default value is specified. Always need to provide your own.
This is a list of behaviours that the animal will use when the animal is considered Idle. This is often the default behaviour. The full list of Behaviour codes and what they do is listed under Animal Behaviours.
"jumpForce"
Valid options (Double): A positive decimal number.
Default Value: No default value is specified. Always need to provide your own.
This is the force the will get applied when the animal starts to jump. Be sure to set this high enough for your animal to get over blocks.
"milkingBehaviours"
Valid options (List of Strings): A list of strings containing the name of a behaviour.
Default Value: No default value is specified. Always need to provide your own.
This is a list of behaviours that the animal will use when the animal is being milked. The full list of Behaviour codes and what they do is listed under Animal Behaviours.
"milks"
Valid options (List of Blobs): A list of blobs containing Items. See Items#How to Spawn an Item for more details.
Default Value: No default value is specified. Always need to provide your own.
This is the list of items you want the Animal to give when they are milked. Each of these items will need to follow the Items#How to Spawn an Item of normal items.
"models"
Valid options (List of Strings): A list of strings each containing the path to a model.
Default Value: No default value is specified. Always need to provide your own.
This is a list of models that will be randomly used when creating the animal.
"moods"
This is a Blob that contains information on what Accessories will be played with certain moods. It will commonly look like;
"moods": { "great": [ "staxel.accessories.eyes.BlackCat.great"], "good": [ "staxel.accessories.eyes.BlackCat.happy"], "normal": [ "staxel.accessories.eyes.BlackCat.normal"], "bad": [ "staxel.accessories.eyes.BlackCat.bad"], "horrible": [ "staxel.accessories.eyes.BlackCat.horrible"], "sleeping": [ "staxel.accessories.eyes.BlackCat.sleeping"] },
"great"
Valid options (List of Strings): A list of strings each containing the code to a Accessory file.
Default Value: If not specified, will not change the face.
This is the list of accessories to use when showing off great level happiness.
"good"
Valid options (List of Strings): A list of strings each containing the code to a Accessory file.
Default Value: If not specified, will not change the face.
This is the list of accessories to use when showing off good level happiness.
"bad"
Valid options (List of Strings): A list of strings each containing the code to a Accessory file.
Default Value: If not specified, will not change the face.
This is the list of accessories to use when showing off bad level happiness.
"horrible"
Valid options (List of Strings): A list of strings each containing the code to a Accessory file.
Default Value: If not specified, will not change the face.
This is the list of accessories to use when showing off horrible level happiness.
"sleeping"
Valid options (List of Strings): A list of strings each containing the code to a Accessory file.
Default Value: If not specified, will not change the face.
This is the list of accessories to use when showing that the animal is sleeping.
"moodOverrides"
This is a Blob that contains information on what Accessories will be played with certain moods. It will commonly look like;
{ "model": "staxel/pets/cat/EgyptianCat.qb", "moods": { //Skipped for brevity } }, { "model": "staxel/pets/cat/FloofyCat.qb", "moods": { //Skipped for brevity } },
"model"
Valid options (String): A strings containing a path to a Model that is being used in this Animal.
Default Value: No default value is specified. Always need to provide your own.
This is the model that will apply these moods to.
"moods"
This is a Blob that contains #"moods". See that section for more information.
"movementVelocity"
Valid options (Double): A positive decimal number.
Default Value: No default value is specified. Always need to provide your own.
This is the maximum speed that the Animal will move at.
"names"
Valid options (List of Strings): A list of strings containing any valid values.
Default Value: No default value is specified. Always need to provide your own.
This is a list of names that will be randomly given to the animal upon spawning.
"nudeModels"
Valid options (List of Strings): A list of strings each containing the path to a model.
Default Value: No default value is specified. Always need to provide your own.
This is a list of models that will be randomly used when the animal is sheared. They will go back to a normal model after regrowing their wool.
"paramAnimator"
Valid options (String): A strings containing the code to a Parameter Animation file.
Default Value: If not specified, will not play any animation while eating.
This is the animation that will play while eating. You probably don't want to change from "staxel.paramAnimation.AnimalEat".
"playBehaviours"
Valid options (List of Strings): A list of strings containing the name of a behaviour.
Default Value: No default value is specified. Always need to provide your own.
This is a list of behaviours that the animal will use when the animal is interacted with. These behaviours are special and are usually associated with specific items. Such as those with the Throwable Component. The full list of Behaviour codes and what they do is listed under Animal Behaviours.
"poops"
Valid options (List of Blobs): A list of blobs containing Items. See Items#How to Spawn an Item for more details.
Default Value: No default value is specified. Always need to provide your own.
This is the list of items you want the Animal to poop out on occasion. Each of these items will need to follow the Items#How to Spawn an Item of normal items.
"pushedForce"
Valid options (Double): A positive decimal number.
Default Value: No default value is specified. Always need to provide your own.
This is the force the will get applied when the animal when it gets pushed. This particular force happens when the animal is idle. (i.e. Not doing anything.)
"resistedPushedForce"
Valid options (Double): A positive decimal number.
Default Value: No default value is specified. Always need to provide your own.
This is the force the will get applied when the animal when it gets pushed. This particular force happens when the animal is not idle. (i.e. Moving, eating etc)
"shearingBehaviours"
Valid options (List of Strings): A list of strings containing the name of a behaviour.
Default Value: No default value is specified. Always need to provide your own.
This is a list of behaviours that the animal will use when the animal is being sheared. The full list of Behaviour codes and what they do is listed under Animal Behaviours.
"sleepy"
Valid options (Bool): True or False
Default Value: If not specified, will default to false.
This will determine if the animal will randomly sleep throughout the day.
"spawnBehaviours"
Valid options (List of Strings): A list of strings containing the name of a behaviour.
Default Value: No default value is specified. Always need to provide your own.
This is a list of behaviours that the animal will use when spawning into the world. The full list of Behaviour codes and what they do is listed under Animal Behaviours.
"standingResistance"
Valid options (Double): A positive decimal number.
Default Value: No default value is specified. Always need to provide your own.
This is the amount of resistance to movement the animal will have while on the ground.
"turnSmoothingFactor"
Valid options (Double): A positive decimal number.
Default Value: No default value is specified. Always need to provide your own.
This is the largest angle you will allow the animal to turn in one tick. Note that this is in Radians.
"unhappy"
This is a Blob that contains information on the what the effects that will play when the animal is unhappy. It will commonly look like;
"unhappy": { "emotes": [ "staxel.emote.farmAnimals.Unhappy_1"], "sounds": [ "staxel.sounds.farmAnimals.Chicken.unhappy_1"] },
"emotes"
Valid options (List of Strings): A list of strings each containing the code to a Emote file.
Default Value: No default value is specified. Always need to provide your own.
This is the list of emotes that will be randomly selected in when showing the animal is unhappy.
"sounds"
Valid options (List of Strings): A list of strings each containing the code to a Sound file.
Default Value: No default value is specified. Always need to provide your own.
This is the list of sounds that will be randomly selected in when showing the animal is unhappy.
"unhappyBehaviours"
Valid options (List of Strings): A list of strings containing the name of a behaviour.
Default Value: No default value is specified. Always need to provide your own.
This is a list of behaviours that the animal will use when the player tries to perform an action while they are unhappy. These are used instead of milking and shearing behaviours when unhappy. The full list of Behaviour codes and what they do is listed under Animal Behaviours.
"velocityRandomizationFactor"
Valid options (Double): A positive decimal number.
Default Value: No default value is specified. Always need to provide your own.
This is the additional randomness added to movement. It will cause animals to move faster or slower while moving between destinations.
"wools"
Valid options (List of Blobs): A list of blobs containing Items. See Items#How to Spawn an Item for more details.
Default Value: No default value is specified. Always need to provide your own.
This is the list of items you want the Animal to give when they are sheared. Each of these items will need to follow the Items#How to Spawn an Item of normal items.