Skip to content
This repository has been archived by the owner on Apr 22, 2023. It is now read-only.

Lua API

Leather128 edited this page Jan 23, 2023 · 4 revisions

Lua API Documentation

Warning! This documentation is VERY unfinished, you will probably have to look in the source code of Leather Engine to find everything you can do for the moment.

Basic Types

Name Description
Int Any whole number.
Float Any number.
Bool true or false.
String Text

Blocked Classes / Functions

  • os (allows access to the operating system, which can also be dangerous)
  • require (allows other libraries which can be dangerous to be accessed)

Global Variables

Song Information

Variable Description Type
difficulty The current difficulty. String
difficulty (Legacy pre 0.4.1) The current difficulty from 0 to 2 Int
bpm / songBpm Current BPM (Beats per minute) Float
keyCount Opponent's key count currently (equal to playerKeyCount unless specifically specified). Int
playerKeyCount Player's key count currently. Int
scrollspeed The current scroll speed. Float
curBeat The current 'beat' (4th note) of the song. Int
curStep The current 'step' (16th note) of the song. Int
crochet Time between each 'step' (16th note) of the song in milliseconds. Float
bot Botplay setting value. Bool
noDeath No Death setting value. Bool
downscrollBool Downscroll setting value. Bool
downscroll (Deprecated ⚠️ ) Downscroll setting value (0 or 1). Int
middlescroll Middlescroll setting value. Bool
flashingLights / flashing Flashing Lights setting value. Bool
distractions (Not Implemented ❌ ) Distractions setting value (always true). Bool
animatedBackgrounds Animated Backgrounds setting value. Bool
fpsCap FPS Cap setting value. Int
cameraZooms Camera Zooms setting value. Bool
Clone this wiki locally