Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Format

An Animation Kit has only two obligatory values. VERSION, and module.

VERSION is a constant value that MUST be 1, because this is the value that will signal which format version Depraved Sense will use when reading the data. This ensures that in the future we can have better formats without worrying about getting stuck into a single deprecated format.

module is essentially the unique identification of your Animation Kit. Mainly used to find the kit across multiple other kits. Make sure to make this value as unique as it can be, you can add your own nick on it, define which context it is for, or maybe even insert a random number. Anything goes.

Below it is the simplest form of an Animation Kit.

---@type DS_AnimKit
local animation_kit = {
    VERSION = 1,
    module = "your_unique_name"
}

---It is obligatory to ALWAYS return the animation_kit at the end of the `.lua` file.
return animation_kit

Wait, that’s it? Yes. That’s it.

An Animation Kit doesn’t need any more than this to be valid. Which makes them extremely versatile and flexible in terms of organization. It allows developers to divide their own files, and define which kit is responsible for each part of the Graph. A single file can be a pack for Tickets, another for Depots and Stages, and another only having Phases. Or, if a developer wish to, can create a singleton having everything they need. The choice is theirs.

It is good practice to name the .lua files the same as the module field.