Little Scenes
Each file under pet_interaction/ is one little scene. The mod comes with five: clinging, crab greeting, treat, coffee and listening. Take coffee as an example, where Kurimanju hands a coffee to a pet that has just finished a Weeding slip:
{
"initiators": [
{ "pets": ["chiikawa:kurimanju"], "pose": "hand_over" }
],
"partners": [
{
"pets": ["chiikawa:chiikawa", "chiikawa:hachiware", "chiikawa:usagi"],
"pose": "drink",
"begin": { "reaction": "happy", "voice": "given_coffee" }
},
{
"pets": ["chiikawa:rakko"],
"pose": "drink",
"begin": { "voice": "given_coffee" }
}
],
"partner_finished": { "slip": "chiikawa:weeding", "within_ticks": 2400 },
"partner_eager_ticks": 1200,
"chance": 0.25,
"notice_distance": 12.0,
"approach_distance": 1,
"reservation_ticks": 400,
"duration_ticks": 80,
"cooldown_ticks": 24000
}Who acts with whom. initiators is the side that starts the scene, and partners is the side it seeks out. Both are written as groups: pets lists character ids or entity tags starting with #, and a pet acts according to the first group it appears in. The order of partners is also the order of preference, so the initiator looks for those listed first. This way every character in one file can have its own reaction: when clung to, Chiikawa cries, while Rakko is unmoved.
How each side acts. pose is the pose held throughout the scene; begin, now_and_then and end are what it does when they meet, every so often during the scene, and when it ends. Each of these can have an animation, a reaction expression (happy, hurt, confused) and a voice moment, and all of them can be left out. now_and_then also needs every_ticks, how often it happens. A voice moment looks up the line in the character's own voice file, so every character says it in its own words.
Poses and animations can only use animations already in the mod: cling, clung_to, crab_greeting, hand_over, drink, eat, sit, clap. A character without that animation just stands there.
When it happens.
| Field | Meaning |
|---|---|
partner_state | Optional, what the partner has to be doing: idle, having nothing to do (the default), or playing_music, performing, in which case the partner doesn't stop and anyone can come over to be the audience |
partner_finished | Optional, which kind of slip the partner has to have finished, and within how long |
hands_over | Optional, what the initiator takes out of its backpack for the partner to eat on the spot, as an item or a tag; if it has none in its backpack, the scene doesn't happen |
partner_eager_ticks | Optional, how long the partner works with extra zeal afterwards, 0 by default |
chance | The chance of thinking of this scene each time it looks around |
notice_distance | How close the partner has to be to come to mind; pets can see 16 blocks at most |
approach_distance | How close the initiator walks before starting |
reservation_ticks | How long the initiator has to walk over, and how long the partner waits |
duration_ticks | How long the scene lasts |
cooldown_ticks | How long after a pair acts out this scene before they act it out again |
