Playable character calibration (Config pack)
Playable character calibration - is the INI file config file which declares the per-frame setup of playable character hitbox over a sprite and also contains a set of animations. The editing tool that allows to create and edit them is the Player Calibrator which is a part of Moondust Project. Player calibration files are used by Moondust Engine where they are used as the main source of playable character sprite setup, and also by LunaLua and later by SMBX2 as the ability to customize hard-coded sprite setup of SMBX Engine. TheXTech has the support of those files since the version 1.3.3.
Header
The "common" section is the file header that declares calibration global setup.
| [common] | |||
|---|---|---|---|
| Parameter | Allowed values | Example value | Description |
| width | [>=0] | width = 25 | Hitbox width for the playable character. |
| height | [>=0] | height = 50 | Hitbox height for the playable character for the regular standing state. |
| height-duck | [>=0] | height-duck = 30 | Hitbox lowered height for the playable character for the sitting down "ducking" state. |
| grab-offset-x | integer | grab-offset-x = 0 | Horizontal offset of a carrying item at the side position (by bottom corner of a carrying item). |
| grab-offset-y | integer | grab-offset-y = 0 | Vertical offset of a carrying item at the center position (by bottom corner of a carrying item). |
Moondust Engine only | |||
| over-top-grab | boolean | over-top-grab = false | Put grabbed objects over the head. Can't be affected by grab offset. |
Frames
The Calibration do store multiple frame sections for specific X and Y sprite matrix cell position.
The format of frame section is next: frame-X-Y
- X - the horizontal matrix cell index.
- Y - the vertical matrix cell index.
One frame definition
| [frame-*-*] | ||||
|---|---|---|---|---|
| Parameter | Allowed values | Example value | Description | |
| offsetX | integer | offsetX = 25 | The horizontal offset for the player hitbox at the left-top corner of the frame box. | |
| offsetY | integer | offsetY = 11 | The vertical offset for the player hitbox at the left-top corner of the frame box. | |
| duck | boolean | duck = false | Should this frame to use the lowered height? | |
| isRightDir | boolean | isRightDir = false | If true, playable character is faced to right. If false - to left. | |
| showGrabItem | boolean | showGrabItem = false | If the true, in the Player Calibrator the grabbed item position will be displayed for this frame. | |
SMBX2 only | ||||
| used | boolean | used = true | Enable this frame.
| |
Animations
Note: SMBX2 require Lua Code for custom animation (e.g. [animationPal.lua & cutscenePal.lua by MrDoableA] ) instead of calibration files. TheXTech don't support the player animation changes by the calibration at all, meaning any character that require custom animations are unusable for TheXTech.
The Calibration can store the set of various animations. For every animation entry there are two separated frame sequencies for each direction: left and right.
The format of animation section is next: Animation_NAME_DIRECTION
- Where the NAME - the name of animation, written by latin characters without spaces and special characters.
- Where the DIRECTION - the direction marker, L for left, and R for right.
- Example: Animation_Meowing_R. The animation for right direction with "Meowing" name.
| [Animation_*_*] | |||
|---|---|---|---|
| Parameter | Allowed values | Example value | Description |
| frames | integer | frames = 5 | The count of animation frames. |
| frame0x | integer | frame0x = 4 | The X cell number on the matrix at 0. Where * - the index of the frame in a list. |
| frame0y | integer | frame0y = 4 | The Y cell number on the matrix at 0. Where * - the index of the frame in a list. |
| frame1x | integer | frame1x = 4 | ... |
| frame1y | integer | frame1y = 5 | ... |
| frame*x | integer | frame*x = 4 | ... |
| frame*y | integer | frame*y = 6 | ... |