Backing cards - Psych-Slice/P-Slice GitHub Wiki

Custom backing cards

gooey You can add a custom backing card to a character by creating a new script file in mods/mod-name/registry/cards/<charId>.hx Here's an example script

This works similarly to the custom loading screen scripts.

Variables

backingCard

Gives access to the backing card (That's where you add all your fancy props to freeplay)

add(sprite:FlxSprite)

Adds the given sprite

remove(sprite:FlxSprite)

Removes the given sprite

insert(position:Int,sprite:FlxSprite)

Inserts your sprite to the given position

Objects

  • backingTextYeah
  • orangeBackShit
  • alsoOrangeLOL
  • pinkBack
  • confirmGlow
  • confirmGlow2
  • confirmTextGlow
  • cardGlow

Callbacks

onCreate()

Called when creating your card. You shouldn't add anything to the card yet.

init()

Called when actually creating your card. Here you can start adding things to your card.

introDone()

Called when DJ is done with his init animation. That also lets the player use the freeplay menu.

beatHit(curBeat:Int)

Called when a beat hits with the number of the beat.

confirm()

Called when the player selects a song.

enterCharSel()

Called when entering character selection screen.

disappear()

Called when exiting the Freeplay.

applyExitMovers(?exitMovers:FreeplayState.ExitMoverData, ?exitMoversCharSel:FreeplayState.ExitMoverData)

Called when requesting the information about the movement of elements when exiting from Freeplay/to char select.

ExitMoverData is a map from FlxSprite to

{
	"x":Float;
	"y":Float;
	"speed":Float;
	"wait":Float;
}

You can add values to them using the set method of the map.

destroy()

Called when destroying the card. You should clean up any sprites you've created here.

⚠️ **GitHub.com Fallback** ⚠️