Commands#
Dance Machine registers two admin commands. Players need none: they open a machine with E or the target option.
Command | Permission | Description |
|---|---|---|
|
| Opens the admin panel on the Machines tab: place, edit, teleport to and delete machines. The name is |
|
| Opens the admin panel on the Music tab: generate, edit and remove songs. The name is |
Both permissions default to the ACE command.dancecreator — see Installation for how to grant it. The server checks it again whenever a machine is saved or removed and whenever a song is edited or removed, not only when the panel opens.
Debug and calibration commands#
These exist only while Config.Debug.enabled = true. Most of them print values to the F8 console, ready to paste into config/main.lua.
Command | Description |
|---|---|
| Lists every machine your client knows — id, name, pads, price and whether the cabinet is spawned — in F8. |
| Positions the players on the nearest machine (within 15 m), with a dancing copy on the other pad. Prints |
| Toggles autoplay: the next songs you start play themselves. For testing charts and cameras. |
| Camera editor on the default stage. Prints |
| Shows or hides the scene behind the song menu, on its track step or — with |
| Frames the dancer and camera of the track step. Prints |
| Frames the two dancers and camera of the mode step. Prints |
| Frames the dancer and camera of the settings screen. Prints |
/dancepad controls
Key | Does |
|---|---|
| Move the pad, |
| Rotate. |
| Up and down, |
| Switch between pad 1 and pad 2. |
| Print the pads to F8. |
| Print and exit. |
Paste the printed block over Config.Pads[1] or Config.Pads[2], depending on the machine you stood at, and restart.
/dancecam and the /danceplace commands controls
Key | Does |
|---|---|
| Fly the camera. |
| Up and down. |
| Faster. |
Mouse wheel | Field of view. |
|
|
|
|
| Print the values to F8. |
| Exit and return to where you were. |
Server Exports#
How another resource reads Dance Machine — a leaderboard board in your arcade, a Discord bot that posts records, a tournament script. All of them are server-side; there are no client exports.
GetSongCatalog
Every song the server loaded, generated or not, sorted by name.
local songs = exports['qs-dancemachine']:GetSongCatalog()
for _, song in ipairs(songs) do
print(song.id, song.name, song.artist, song.bpm, song.duration, song.hasBeatmap)
for _, diff in ipairs(song.difficulties) do
-- diff.id = 'easy' | 'normal' | 'hard', diff.level = 1-20 stars,
-- diff.notes = note count, diff.enabled = offered to players
end
endOnly songs with hasBeatmap = true appear on the machines. Each entry also carries file, playStart, playEnd and preview.
GetMachines
Every machine on the server, keyed by id.
local machines = exports['qs-dancemachine']:GetMachines()
for id, m in pairs(machines) do
-- m.coords = { x, y, z }, m.heading, m.label,
-- m.players = 1 | 2, m.price, m.paymentMethod = 'money' | 'bank',
-- m.allowedModes = { 'solo', 'duo', 'versus' } or nil for all,
-- m.managed = the owning resource (e.g. 'qs-arcades') or nil
endA machine's id comes from its position, so moving it in the creator gives it a new id.
GetRecords
The server record and the top list of one song on one difficulty. The song id is its file or folder name, as in GetSongCatalog.
local rec = exports['qs-dancemachine']:GetRecords('Neon_Horizon', 'hard')
if rec.serverBest then
print(('%s holds the record: %d points, %.1f%%, grade %s'):format(
rec.serverBest.name, rec.serverBest.score, rec.serverBest.accuracy, rec.serverBest.grade))
end
for rank, row in ipairs(rec.top) do
-- row.name, row.score, row.accuracy, row.max_combo, row.grade
endtop holds Config.Leaderboard.topLimit rows. serverBest is the whole score row, including the judgment counts (perfect … miss) and plays, or nil when nobody has played it yet.
GetGlobalTop
The server-wide ranking players see in Settings → Ranking.
local top = exports['qs-dancemachine']:GetGlobalTop()
-- top.scores = { { name, song, difficulty, score, grade }, ... }
-- top.combos = { { name, song, difficulty, max_combo }, ... }
-- top.accuracy = { { name, song, difficulty, best_accuracy }, ... }listSongs
What the server finds in songs/ right now, without loading anything. Handy to check a file is seen before restarting.
local res = exports['qs-dancemachine']:listSongs()
if res.ok then
for id, entry in pairs(res.songs) do
print(id, entry.file) -- e.g. 'my_track', 'my_track/song.mp3'
end
else
print('cannot read songs/:', res.error)
endArcade cabinets
GetManagedMachines() lists, read-only, the machines another resource owns, with how many players can currently see each one.
CreateManagedMachine, RemoveManagedMachine and SetManagedVisible are how Arcade Creator places its cabinets. They only answer calls from qs-arcades; any other resource gets { ok = false, error = 'not_allowed' }.
About the Messages#
Whenever the server refuses something — a full machine, a missing permission, not enough money — it answers with a locale key such as notify.machine_full, not a sentence, so each player reads it in the server's language. The keys and what they mean are listed in Common Errors; the wording lives in locales/.



