Skip to content

Mod Shortcuts & Special Events

Saritahh edited this page Nov 14, 2026 · 5 revisions

On top of the game's own events (see Available Events), PlayerSprites adds a few of its own, too! They all start with Mod:, so they can't be confused with a game event. There are two kinds:

  • Special events: Things the game doesn't really have an event for, like an on-death event or an event that just runs on Update/Idle.
  • Shortcuts: One event that umbrellas a whole group of game events, so you don't have to write them all out manually if you wanna use a bunch of events like Landings or Fallings.

Like everything else, these names are case sensitive.

Shortcuts

A shortcut expands into a list of real events. You can use them in:

  • triggerOn and cancelOn of animations in spr-pack.json
  • triggerOn of sounds in sounds.json
Shortcut Covers
Mod:AnyLanding TinyLanding, FeatherLanding, SoftLanding, NormalLanding, HardLanding
Mod:BoostOrbs YellowOrb, PinkOrb, RedOrb, GreenOrb
Mod:AnyFall FallLow, FallMed, FallHigh, FallVHigh
Mod:FallSpeeds FallSpeedLow, FallSpeedMed, FallSpeedHigh
"Landing": {
	"triggerOn": ["Mod:AnyLanding"],
	"subfolder": "cube",
	"spriteBaseName": "land_",
	"frameCount": 3,
	"frameTime": 0.05,
	"loopAnim": false
}

Shortcuts vs. specific events

You can mix a shortcut with an animation for one of the events it covers. The specific event always wins. For example, you can have a general landing animation on Mod:AnyLanding and a special animation on HardLanding. Hard landings play the special one, and every other landing plays the general one.

"Landing": {
	"triggerOn": ["Mod:AnyLanding"],
	...
},
"Hard Landing": {
	"triggerOn": ["HardLanding"],
	...
}

This also works with cancelOn: a shortcut in cancelOn cancels the animation when any of the events it covers happens.

Special events

These are special events the mod defines for certain actions that the game's Event system doesn't cover. Every one of them goes in triggerOn(or as the event ID, if you don't set triggerOn)/cancelOn like any other event. Some of these are animations only, while some are SFX only.

Mod:Update

Animations Only. (for now)

The default animation. It plays whenever nothing else is playing, and comes back after any other animation ends. 90% of the time, this is gonna be your "running" animation in Cube, "flying" in Ship, etc etc.

  • In Classic levels, it's the "base", the one that plays while nothing else is going on, and the one you'll most likely see most of the time.
  • In Platformer levels, it's the base while the player is moving (holding left or right). Standing still uses Mod:Idle.
  • Other animations can interrupt it freely, and when they finish, the mod goes back to it.
  • If a gamemode has no Mod:Update, there's no base animation, and in-between moments show the normal vanilla icon.

Mod:Idle

Animations only.

The base animation for Platformer levels when the player is standing still (not holding left or right). Only ever does something in Platformer, and is ignored in Classic.

If you don't make one, nothing plays while standing. As soon as the player moves, Mod:Update takes over, and Mod:Idle comes back when they stop.

Mod:LevelComplete

Animations & SFX.

Plays when the player completes the level.

  • If your pack has it for the gamemode you finished the level in, your animation will play the moment the level complete effect happens. (When you hit the end wall/point, NOT when you start floating towards it)
  • Nothing else plays after it, so a non-looping animation just stays on its last frame. Give it a looping animation, or a holdFor of -1, if you want it to keep going.
  • If your pack doesn't have it, your sprite is hidden when the level is completed, so it doesn't stay frozen on screen and looking weird.
  • Like any other animation, it's listed in the mod's menu, so the user can turn it off.
  • It's also usable for sounds, so you can play something when you beat the level!
"Cube": {
	"Victory": {
		"triggerOn": ["Mod:LevelComplete"],
		"subfolder": "cube",
		"spriteBaseName": "win_",
		"frameCount": 6,
		"frameTime": 0.08,
		"loopAnim": false
	}
}

Mod:HitGround

Animations & SFX.

Plays when the player hits the ground at all. This event essentially works as a more accurate alternative to the Landing events from the vanilla Events list.

Mod:HitGround fires anytime the player touches the ground, regardless of the "landing strength".

This fixes an issue when using any of the vanilla landing events or Mod:AnyLanding where a jump that directly aligned you with a platform (e.g. a 2 block tall jump) would skip any vanilla Landing events entirely, therefore, not triggering/cancelling animations and not playing SFX.

Death events

Animations Only.

The events the mod will look for when a player dies.

  1. Mod:RetroDeath
  2. Mod:StaticDeath
  3. Mod:StaticDeathDisappear

Death animations always play, even if the animation that was playing is set to "canBeInterrupted": false. If no death animation exists in your pack, you'll just see the last playing animation keep going.

(You'll probably want noDeathEffects in globalAttributes turned on, so GD's explosion doesn't play over your sprite.)

  • Mod:RetroDeath - Plays your animation, and then plays an action on it to imitate the death animations from Classic games, such as Sonic or Mario. So retro. If mario, then only bros.
  • Mod:StaticDeath - Plays your animation and the sprite stays where the player died. Give it a -1 holdFor so the sprite stays on screen.
  • Mod:StaticDeathDisappear - Like Mod:StaticDeath, but the sprite fades out after its last frame. This is the only event where fadeOutTime is allowed, and it sets how long the fade takes.
"Death": {
	"triggerOn": ["Mod:StaticDeathDisappear"],
	"subfolder": "cube",
	"spriteBaseName": "death_",
	"frameCount": 5,
	"frameTime": 0.08,
	"loopAnim": false,
	"fadeOutTime": 0.4
}

Mod:Death

SFX Only.

Plays a sound when the player dies. It only works in sounds.json, since the three events above are the ones used for death animations. It plays regardless of what the pack does for the death sprite.

{
	"Cube": {
		"Death": {
			"triggerOn": ["Mod:Death"],
			"sounds": ["sfx/death1.ogg", "sfx/death2.ogg"]
		}
	}
}

This DOESN'T replace your vanilla death sound effect, instead, it plays on top of it.

Summary

Name Kind Works in What it does
Mod:Update Special Sprites Default animation (moving in Platformer, always in Classic).
Mod:Idle Special Sprites Default animation when standing still in Platformer.
Mod:LevelComplete Special Sprites & sounds Plays when the level is completed.
Mod:HitGround Special Sprites & Sounds Plays when the player touches the ground, regardless of anything else.
Mod:RetroDeath Special Sprites Death animation, the sprite drops off the screen.
Mod:StaticDeath Special Sprites Death animation, the sprite stays in place.
Mod:StaticDeathDisappear Special Sprites Death animation, the sprite fades away.
Mod:Death Special Sounds Plays a sound when the player dies.
Mod:AnyLanding Shortcut Sprites & sounds All landings.
Mod:BoostOrbs Shortcut Sprites & sounds Yellow, pink, red and green orbs.
Mod:AnyFall Shortcut Sprites & sounds All Fall* events.
Mod:FallSpeeds Shortcut Sprites & sounds All FallSpeed* events.

Clone this wiki locally