Repository navigation
Taunts
Taunts are animations that don't belong to any game event. Instead, you play them whenever you want by pressing a key. For example, Zero doing his 3 saber combo, Kris doing their, surprise, 3 sword slash combo, a character doing a stupid little dance, whatever you want!
They're just animations like the ones in events, so most of what you already know applies, with a couple of differences and some new keys. Read The Master JSON first if you haven't, since this page assumes you know how an animation is defined.
If you're reading this in 2.2081, this feature isn't available yet. Taunts are only available on mod version v1.1.0+
- In gameplay, you press the Taunt Keybind (defaults to
T, can be changed in the mod's settings). - The mod picks one of the active pack's taunts for the gamemode you're currently in, and plays it.
- If there's no active pack with taunts for that gamemode, nothing happens.
- In Duals, both players taunt at the same time (each with their own gamemode's taunts).
Taunts go in a taunts array, at the same level as events (not inside of it!). It has the exact same structure: an array of objects, each keyed by gamemode name, and each gamemode contains its taunts keyed by an ID.
{
"setName": "Zero",
"author": "Asterveila",
"events": [
{
"Cube": {
"Mod:Update": {
"blah blah": "blah blah"
}
}
}
],
"taunts": [
{
"Cube": {
"Saber Slash": {
"subfolder": "cube/taunts",
"spriteBaseName": "slash_",
"frameCount": 6,
"frameTime": 0.04,
"holdFor": 0.3
}
}
}
]
}Just like with events:
- The ID is what's used as the name, so you should generally make it something readable.
- You can split taunts across several objects in the array, and they'll get merged. If the same gamemode and ID shows up twice, the later one wins.
- A pack doesn't need
eventsto havetaunts, or the other way around. -
mimicworks on taunts too, but a taunt can only copy another taunt, not an event.
Taunts accept mostly the same keys as events, with these differences:
subfolder, spriteBaseName, frameCount, singleFrame, spriteName, frameTime (or minFrameTime/maxFrameTime), cancelOn, lockRotation, keepPlayer, offsetX, offsetY, and mimic.
| Field | What changes |
|---|---|
holdFor |
Required, and it has to be 0 or more. -1 isn't allowed. It's how long the last frame stays on screen before the mod goes back to the other animations (idle, running, etc). |
canBeInterrupted |
Only controls if other animations (the ones from game events, like a jump or a landing) can interrupt the taunt. Whether other taunts can is a different key, see interruptByTaunts later. Default is true. |
loopAnim |
Taunts can't loop. It's always false, and writing true is ignored (+ the mod logs a warning). |
-
triggerOn(the keybind is the trigger, not an event) -
skipForLoop(no loops, so nothing to skip) -
interruptBySelf(technically replaced(ish) byinterruptByTaunts)
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
order |
integer | No | none | Position of this taunt in a sequence. If any taunt of a gamemode has an order, the taunts play in that order (lowest number first) instead of at random. See Order and random for more details. |
resetAfter |
number (seconds) | No |
0 (never) |
Similar to the SFX key of the same name. Only matters with order. If this many seconds pass since the last taunt ended, the next press goes back to the first taunt of the sequence. Can't be negative. |
interruptByTaunts |
boolean | No | true |
true: pressing the key again interrupts the taunt that's playing and starts the next one immediately. false: the taunt can't be interrupted while its animation is running, and the next one can only be started after the last frame of the animation is hit. (Which essentially gives you resetAfter seconds as a window to play the next taunt consecutively). |
allowInMotion |
boolean | No | false |
false: the taunt can only be started while standing still, and is cancelled if the player starts moving or runs any other event. true: it can be used at any time, and may overlap other ongoing game events. See Standing still vs. in motion. |
sfx |
string, array or object | No | none | Sound(s) to play when the taunt starts. Same formats as in sounds.json. See Taunt SFX. |
This one is for taunts that purposely chain together, like a combo. (Again, let's think of Zero's 3 saber combo)
- With
true(default), spamming the key restarts things as fast as you press it: every press skips to the next taunt, even if the current one is still playing. - With
false, each taunt gets to play fully. Presses while the animation runs are ignored. Once it reaches its last frame, theholdFortime starts, and that's your window to press the key again and continue into the next one. If you miss it, the player goes back to normal.
canBeInterrupted and interruptByTaunts are independent. A taunt with canBeInterrupted: false and interruptByTaunts: true can't be interrupted by the game's events, but pressing the key again will still skip it.
"Standing still" means being in a Platformer level, and being on Mod:Idle's animation (not holding left or right). Which means:
- By default (
allowInMotion: false), a taunt can only be started when the player is idle in Platformer, and if the player starts moving mid-taunt, it's cancelled. - In Classic levels, you're never really standing still, so a taunt needs
"allowInMotion": trueto play there at all. - With
allowInMotion: true, the taunt can start at any time, and it takes over any animation that's currently playing (unless that animation is set to"canBeInterrupted": false).
If you want a taunt to work everywhere, set allowInMotion to true.
- If No taunts have an
orderkey: A random one is picked each time. It never picks the same taunt twice in a row (unless there's only one). - If At least one has an
orderkey: They play in order, from the lowest number to the highest, and then it loops back to the first one. If two taunts share the same number, they play in alphabetical order of their IDs. - When Mixing both: If only some taunts have an
order, the ones without it play last, alphabetically (and a warning is logged). Try to give all of them one if you're using it to avoid unwanted "randomness".
The sequence is kept per pack and gamemode, and goes back to the start on level restarts.
This works essentially the same as the resetAfter key in SFX Packs. If you wait too long after playing a taunt, the sequence starts over.
- The time is counted from when the last taunt ended. So, giving it a value of
0.1will give you a 0.1s window after the last frame of the animation is hit to continue the order. - The value that counts is the one from the taunt that played last.
- It does nothing if taunts aren't ordered.
Taunts can play sounds when they start, using the sfx key right inside the taunt. It takes the same formats as an entry in sounds.json: a single file, a list of files, or the full object with sounds, ordered, resetAfter and enabledByDefault.
"Saber Slash": {
"subfolder": "cube/taunts",
"spriteBaseName": "slash_",
"frameCount": 6,
"frameTime": 0.04,
"holdFor": 0.3,
"sfx": ["sfx/slash1.ogg", "sfx/slash2.ogg"]
}or,
"sfx": {
"sounds": ["sfx/slash1.ogg", "sfx/slash2.ogg"],
"ordered": true,
"enabledByDefault": false
}- You don't need
triggerOnhere, since the taunt is what triggers the sound. - It shows up in the pack's SFX menu as
Taunt: <taunt id>, so you can preview it or turn it off like any other sound, and it also respects the pack's general SFX toggle. - It plays right as the taunt starts, and for Duals it only plays once.
- The same rules as normal sounds apply:
.oggor.wavonly, paths relative to the pack's folder, and a missing file is skipped with a warning. - Taunt sounds don't overlap with a
sounds.jsonfile, these won't break them and they wont break these.
The example we've been mentioning all this page, 3 sword slash animations, one after the other. Each press (during the 0.25s window) starts the next one, and the third goes back to the first.
"taunts": [
{
"Cube": {
"Combo 1": {
"order": 1,
"subfolder": "cube/combo",
"spriteBaseName": "slash1_",
"frameCount": 5,
"frameTime": 0.04,
"holdFor": 0.2,
"resetAfter": 0.25,
"interruptByTaunts": false,
"sfx": "sfx/slash1.ogg"
},
"Combo 2": {
"order": 2,
"subfolder": "cube/combo",
"spriteBaseName": "slash2_",
"frameCount": 5,
"frameTime": 0.04,
"holdFor": 0.2,
"resetAfter": 0.25,
"interruptByTaunts": false,
"sfx": "sfx/slash2.ogg"
},
"Combo 3": {
"order": 3,
"subfolder": "cube/combo",
"spriteBaseName": "slash3_",
"frameCount": 8,
"frameTime": 0.05,
"holdFor": 0.2,
"resetAfter": 0.25,
"interruptByTaunts": false,
"sfx": "sfx/slash3.ogg"
}
}
}
]What's going on in this?:
-
ordermakes them play 1, 2, 3, and then back to 1. -
interruptByTaunts: falsemakes each slash forced to fully play.holdForleaves the last frame on screen for 0.2s as a small visual clue for you to continue the combo. TheresetAfterkey gives you a 0.25s window to do so. -
allowInMotionisn't set, defaulting to false so the combo can only be used while standing still in Platformer. (Add"allowInMotion": trueto each of them if you want to allow it in classic levels, or while moving on Platformer.)
| Message (roughly) | What's wrong/Fix? |
|---|---|
'taunts' must be an array |
taunts needs [ ... ], not { ... }. |
each entry in 'taunts' must be an object keyed by gamemode |
Every item inside the taunts array must be an object like { "Cube": {...} }. |
'globalAttributes' goes at the root of the file, not inside 'taunts' |
Move it out of taunts. |
taunts need a 'holdFor' of 0 or more |
Every taunt needs a holdFor, and it can't be negative. Use 0 if you don't want the last frame to hold at all. |
'order' must be a whole number |
order can't have decimals, or quotes. Use 1, not 1.5 or "1". |
'resetAfter' can't be negative |
Use 0 or higher. |
taunt sfx in spr-pack.json: ... |
Something is wrong in one of the sfx keys. The rest of the message says what. Same rules as SFX Packs. |
Everything else that can go wrong in a normal animation (missing subfolder, bad frameTime, etc.) is reported the same way as in events, with the taunt's name on it.
There's also two warnings that show up in your Geode log: one for loopAnim: true on a taunt (taunts can't loop), and one for when only some taunts of a gamemode have an order. These aren't hard errors and won't kill your pack, they're just not adviced and will be ignored.