Skip to content

scripting

Mily_0 edited this page Jun 29, 2026 · 10 revisions
1000014992

About

  • This section is entirely about the scripting feature of the engine. Highly modified from Psych Engine's system.

    As you may have seen, the engine supports scripting in .lua and .hxc. The paths are almost quite the same and essentially, works by the same.

Scripting on Songs

  • Scripting on songs is quite simple. You just need to add your LuaScript / Hscript at <ModFolder>/songs/<songName>/. Then, it should work normally.

  • All the callbacks and functions work perfectly at song scripts.

  • An example of a working Script for a song:

function onMoveCamera(target:String)
{
    if (target == 'boyfriend' || target == 'player') {
        cameraZoom(0.83, 4, 'elasticInOut', 'nll');
    } else if (target == 'dad' || target == 'opponent') {
        cameraZoom(0.75, 4, 'elasticInOut', 'nll');
    }
}

This script basically changes the camera zoom depending on who is focused.

Scripting on Characters

  • Scripting on Characters is almost the same thing. You just need to add your LuaScript / Hscript at data/characters/<charName>.script.
  • Thankfully by a wonderful person on Psych Mint server, now the characters itself don't have the specific functions for it.
  • What i mean is, instead of:
    dad.alpha = 0.6;
    dad.color = 'RED';
    dad.x = var + 445;
  • The characters scripts now work with:
    alpha = 0.6;
    color = 'RED';
    x = var + 445;
  • This is because when the script is put on chrs folder, the script will understand that the DEFAULT of the script IS the character choosen. So functions like opponentNoteHit can be used on their neutral alternatives, such as characterNoteHit, etc.

Neutral functions can be seen on the API down below!

Clone this wiki locally