Lua Script API - Marcos875433/FNF-PsychEngine GitHub Wiki
Running a script
There's four types of LUA Scripts you can run:
- A Stage Script, it will only run if the song's stage has been set to the same as its name, it should have the same name as your stage's .json file and should be located inside mods/stages/
- A Note Type Script, it will only run if the said Note Type is being used on the chart, it should be located inside mods/custom_notetypes/
- An Event Script, it will only run if the said Event is being used on the chart, it should be located inside mods/custom_events/
- Song's Script, should be named
script.lua
and saved inside the song's chart folder, it will only run on this specific song, no matter the difficulty, stage or whatever else.
API Documentation
- Variables
- General Functions
- Tweens and Timers
- Value Setting and Getting Functions
- Functions for Dialogues and Cutscenes
- Custom Sprites/Objects
- Precaching Stuff
Example Scripts
- Template Script with all Callbacks explained
- Example of Triggering an Event via Lua - Change Characters on Key Press/Precaching characters
- Tween Example - Boyfriend gets bigger on his turn
- Animated Sprite Example - Dad clone behind Dad that bops head on Beat hit
- Dialogue Script - Drop this file + your dialogue.json in your Song's chart folder!
- Video Example - Cutscene on Bopeebo (Story Mode)
- Example of a Custom Event - Garcello/Opponent Fade
- Example of a Custom Note Type - Instakill Note
- Example of a Custom Stage - Copy of Week 1 Stage made fully in LUA
FOR MORE ADVANCED USERS: