{
  "format_version": "1.10.0",
  "animation_controllers": {
    "controller.animation.silverlabs_nat.otter.main": {
      "initial_state": "default",
      "states": {
        "default": {
          "animations": [
            { "idle": "!q.is_baby" },
            { "baby_idle": "q.is_baby" }
          ],
          "blend_transition": 0.5,
          "on_entry": ["v.float_delay = q.life_time + 1;"],
          "transitions": [
            { "sit": "(q.is_sitting && q.is_on_ground)" },
            { "float": "q.property('silverlabs_nat:floating')" },
            {
              "walk": "!q.has_target && (q.modified_move_speed >= (v.walk_threshold ?? 0))"
            },
            {
              "run": "q.has_target && (q.modified_move_speed >= (v.walk_threshold ?? 0))"
            },
            {
              "swim": "q.is_in_water && (q.modified_move_speed >= (v.swim_threshold ?? 0))"
            },
            { "sleep": "q.is_sleeping && !q.is_in_water" }
          ]
        },
        "sit": {
          "animations": [
            { "sit": "!q.is_baby" },
            { "baby_sit": "q.is_baby" }
          ],
          "transitions": [
            {
              "sit_idle": "q.is_baby && q.is_sitting && q.all_animations_finished"
            },
            { "unsit": "q.is_baby && !q.is_sitting" },
            { "default": "!q.is_baby && !q.is_sitting" }
          ],
          "blend_transition": 0.2
        },
        "sit_idle": {
          "animations": ["baby_sit_idle"],
          "transitions": [
            { "unsit": "!q.is_sitting" }
          ],
          "blend_transition": 0.2
        },
        "unsit": {
          "animations": ["baby_unsit"],
          "transitions": [
            { "sit": "q.is_sitting" },
            { "default": "!q.is_sitting && q.all_animations_finished" }
          ],
          "blend_transition": 0.2
        },
        "float": {
          "animations": ["float"],
          "blend_transition": 0.5,
          "transitions": [
            { "sit": "(q.is_sitting && q.is_on_ground)" },
            { "default": "!q.is_item_equipped(0) || !q.is_in_water" },
            {
              "walk": "!q.has_target && (q.modified_move_speed >= (v.walk_threshold ?? 0))"
            },
            {
              "run": "q.has_target && (q.modified_move_speed >= (v.walk_threshold ?? 0))"
            },
            {
              "swim": "q.is_in_water && (q.modified_move_speed >= (v.swim_threshold ?? 0))"
            }
          ]
        },
        "walk": {
          "animations": [
            { "walk": "!q.is_baby" },
            { "baby_walk": "q.is_baby" }
          ],
          "blend_transition": 0.5,
          "transitions": [
            { "sit": "(q.is_sitting && q.is_on_ground)" },
            { "default": "q.modified_move_speed < (v.walk_threshold ?? 0)" },
            { "run": "q.has_target || q.is_interested" },
            { "swim": "q.is_in_water" }
          ]
        },
        "run": {
          "animations": [
            { "run": "!q.is_baby" },
            { "baby_run": "q.is_baby" }
          ],
          "blend_transition": 0.5,
          "transitions": [
            { "sit": "(q.is_sitting && q.is_on_ground)" },
            { "default": "q.modified_move_speed < (v.walk_threshold ?? 0)" },
            { "walk": "!q.has_target && !q.is_interested" },
            { "swim": "q.is_in_water" }
          ]
        },
        "sleep": {
          "animations": ["sleep"],
          "blend_transition": 0.5,
          "transitions": [
            { "sit": "(q.is_sitting && q.is_on_ground)" },
            { "default": "!q.is_sleeping || q.is_in_water" }
          ]
        },
        "swim": {
          "animations": ["swim"],
          "blend_transition": 0.5,
          "transitions": [
            { "sit": "(q.is_sitting && q.is_on_ground)" },
            { "default": "q.modified_move_speed < (v.swim_threshold ?? 0)" },
            { "run": "q.has_target && !q.is_in_water" },
            { "walk": "!q.has_target && !q.is_in_water" }
          ]
        }
      }
    },
    "controller.animation.silverlabs_nat.otter.hold_item": {
      "initial_state": "default",
      "states": {
        "default": {
          "animations": ["item_adjust"],
          "blend_transition": 0.5,
          "transitions": [
            { "play_with_item": "(q.property('silverlabs_nat:floating'))" },
            { "nap_with_item": "q.is_sleeping" }
          ]
        },
        "play_with_item": {
          "animations": ["play_with_item"],
          "blend_transition": 0.5,
          "transitions": [{ "default": "!(q.property('silverlabs_nat:floating'))" }]
        },
        "nap_with_item": {
          "animations": ["nap_with_item"],
          "blend_transition": 0.5,
          "transitions": [{ "default": "!q.is_sleeping" }]
        }
      }
    }
  }
}
