Lua Script API; Variables - Marcos875433/FNF-PsychEngine GitHub Wiki
Lua/Unique variables
= true
or = false
for now, you will have to use setProperty() if you want to change it
Note: Those two are the only variables that can be changed by using luaDebugMode
- Enables debug mode, useluaDebugMode = true
to enable it. Default value:false
luaDeprecatedWarnings
- Tells you if a function/variable is deprecated (shouldn't be used anymore), only works when Debug mode is on, useluaDeprecatedWarnings = false
to disable it. Default value:true
Song/Week Variables
curBpm
- Current BPM of the Song, shortcut togetPropertyClass('Conductor', 'bpm')
bpm
- Starting BPM of the Song, shortcut togetProperty('SONG.bpm')
scrollSpeed
- Starting Scroll speed of the Song, shortcut togetProperty('SONG.bpm')
crochet
- Interval between Beat hitsstepCrochet
- Interval between Step hitssongLength
- Song duration in millisecondssongName
- Shortcut togetProperty('SONG.song')
isStoryMode
- Shortcut togetProperty('isStoryMode')
difficulty
- Returns the difficulty ID (Easy = 0, Normal = 1, Hard = 2), Shortcut togetProperty('storyDifficulty')
weekRaw
- Returns the raw current week number. I doubt you will ever use this, but hey, just in case you do, it's here.week
- Returns the properly formatted current week file name.
Camera Variables
cameraX
- Shortcut togetProperty('camFollowPos.x')
cameraY
- Shortcut togetProperty('camFollowPos.y')
Screen variables
screenWidth
- Shortcut togetPropertyClass('FlxG', width)
screenHeight
- Shortcut togetPropertyClass('FlxG', heigth)
Gameplay Variables
-
startedCountdown
- Tells you if the countdown already started -
seenCutscene
- Is set totrue
afteronCreate()
function, Shortcut togetProperty('seenCutscene')
-
curBeat
- Current beat number -
curStep
- Current step number -
score
- Current score, Shortcut togetProperty('songScore')
-
misses
- Current total number of notes missed, Shortcut togetProperty('songMisses')
-
ghostMisses
- Current number of Key press misses, Shortcut togetProperty('ghostMisses')
-
hits
- Current number of notes hit, Shortcut togetProperty('songHits')
-
rating
- Current rating percentage, goes from0
to1
. Shortcut togetProperty('ratingPercent')
-
ratingName
- Current rating's name. Shortcut togetProperty('ratingString')
-
inGameOver
- Player is Dead -
mustHitSection
- Tells if the current section is aMust Hit Section
(from Chart Editor) -
botPlay
- Tells if Botplay is enabled. Shortcut togetProperty('cpuControlled')
Strum/Receptor Variables
defaultPlayerStrumX0
- Player's default left arrow XdefaultPlayerStrumY0
- Player's default left arrow YdefaultOpponentStrumX0
- Opponent's default left arrow XdefaultOpponentStrumY0
- Opponent's default left arrow YdefaultPlayerStrumX1
- Player's default down arrow XdefaultPlayerStrumY1
- Player's default down arrow YdefaultOpponentStrumX1
- Opponent's default down arrow XdefaultOpponentStrumY1
- Opponent's default down arrow YdefaultPlayerStrumX2
- Player's default up arrow XdefaultPlayerStrumY2
- Player's default up arrow YdefaultOpponentStrumX2
- Opponent's default up arrow XdefaultOpponentStrumY2
- Opponent's default up arrow YdefaultPlayerStrumX3
- Player's default right arrow XdefaultPlayerStrumY3
- Player's default right arrow YdefaultOpponentStrumX3
- Opponent's default right arrow XdefaultOpponentStrumY3
- Opponent's default right arrow Y
Preferences Variables
downscroll
- Downscroll is enabled. Shortcut togetPropertyClass('ClientPrefs', 'downScroll')
middlescroll
- Downscroll is enabled. Shortcut togetPropertyClass('ClientPrefs', 'middleScroll')
framerate
- Current framerate limit. Shortcut togetPropertyClass('ClientPrefs', 'framerate')
ghostTapping
- Ghost tapping is enabled. Shortcut togetPropertyClass('ClientPrefs', 'ghostTapping')
hideHud
- "Hide HUD" is enabled. Shortcut togetPropertyClass('ClientPrefs', 'hideHud')
hideTime
- "Hide Song Length" is enabled. Shortcut togetPropertyClass('ClientPrefs', 'hideTime')
cameraZoomOnBeat
- Shortcut togetPropertyClass('ClientPrefs', 'camZooms')
flashingLights
- Shortcut togetPropertyClass('ClientPrefs', 'flashing')
noteOffset
- Represents the note delay in milliseconds (Goes from0
to500
). Shortcut togetPropertyClass('ClientPrefs', 'noteOffset')
lowQuality
- Shortcut togetPropertyClass('ClientPrefs', 'lowQuality')