Repository navigation
scripting
Mily_0 edited this page Jun 29, 2026
·
10 revisions
-
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
.luaand.hxc. The paths are almost quite the same and essentially, works by the same.
-
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 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
opponentNoteHitcan be used on their neutral alternatives, such ascharacterNoteHit, etc.
Neutral functions can be seen on the API down below!
- Creating new characters
- Creating new songs
- Creating new stages
- Creating new levels
- Creating new stickers
- Creating new freeplay tabs
- Creating new mixes
- Creating new states
- on Songs
- on Characters
- on Notetypes
- on Events
- on Dialogues (DialoguePlus)
- on GameOver
- on Dialogue Portraits
- on Icons
- on StoryMenu
- on Pause Screen
- Globally
