Welcome to the Zoo Tycoon 2 Behavior API!

This is a reference document to help you code new and exciting behaviors without having to dig through the whole codebase to discover functions. Everything used by ZT2 is here, and often you are given examples in context.

Notes

  • Attributes preceded by * are optional
  • "" designate dummy names for entries where the tag specifies the proper name
  • ? designates uncertain entries
  • ! designates clear errors

Data types

  • string - Usually the name of something, like an entity or an animation. May also be special, like subject, target, object or fromToken.
  • int - A single integer eg. 5, optionally prefaced with a logic component, eg. GE 20.
  • float - A single floating point number, eg. 1.5.
  • bool - A boolean toggle, either true or false.
  • matrix3x3 - Matrix of 3x3 ints, rare, eg. 1 0 0, -1 0 0, 0 1 0.