Lua Script API - Lokitot/FNF-SoulEngine GitHub Wiki
VS Code Extension
It's highly recommended for you to install it, as it makes everything easier for you to code in LUA as you don't have to memorize the functions.
Made by Held_der_Zeit, huge props to them (We are not associated).
Running a script
There's six types of LUA Scripts you can run:
Script Types
Stage Script
Only ran 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/
.
NoteType Script
Only ran if the said note type is being used on the chart, should be located in mods/custom_notetypes/
.
Event Script
Only ran if the said event is being used on the chart, it should be located inside mods/custom_events/
.
Song Scripts
Should be saved inside the song's data folder, it will only run on this specific song.
Character Script
It will only be run if the specified character is used on the current song and it's the same name as the character, it should be located inside mods/characters
.
Global Script
Should be saved in mods/scripts/
. It will run in all songs/difficulties, with no exceptions.
Resources
Mods Folder Template (BROKEN LINK)
MOD FOLDER TEMPLATE
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) - LINK BROKEN/TO BE FIXED
- Example of a Custom Event - Opponent Fade - LINK BROKEN/TO BE FIXED
- Example of a Custom Note Type - Instakill Note
- Custom Stage Examples - Recreations of Base Game's Stages in LUA
- Usage of setPropertyFromClass - Game Over Modifications
- Online Fake BF (URL BF) - Loads a character using URL's - Watch out!! this only works with a internet connection