Skip to content

Configuration

Every option of Cuxial Dance Class explained: who teaches, zones, fees, difficulties and points.

Everything you can adjust lives in shared/config.lua. Restart the resource after any change.

Instructor · instructor ​

OptionTypeDefaultWhat it does
modestring'everyone'Who can open a class. 'everyone' = any player, 'job' = only the jobs in jobs, 'ace' = only players with the permission in ace. Any other value works as 'everyone'.
jobsstring[]exampleJob names allowed to teach. Only used with mode = 'job'. Replace the example with your own.
acestring'danceclass.instructor'ACE permission required. Only used with mode = 'ace'.
commandstring'danceclass'Name of the command that opens the panel.
keybindstring | nilnilDefault key that opens the panel, for example 'F7'. nil = command only.
nextKeystring | nil'F6'Default key the instructor uses to start the class or launch the next dance without opening the panel. nil = no key.

keybind and nextKey are only defaults. Each player can rebind them in the GTA key settings, and FiveM remembers their choice.

Interface and join prompt ​

OptionTypeDefaultWhat it does
ui.accentstring (hex)configurableAccent colour of the interface.
joinKeynumber38Game control that accepts a class with a fee when you step into its zone. 38 is E.
joinPromptMsnumber12000Milliseconds the fee prompt stays on screen.

Rooms · rooms ​

OptionTypeDefaultWhat it does
anywherebooleantruetrue lets instructors open a class anywhere. false only allows classes whose zone centre is inside a studio from studios.
studiostable[]{}Dance studios. Each entry: name, coords (vector3), radius in metres (25 if omitted) and blip (true shows it on the map).
bliptablesprite = 480, color = 8, scale = 0.7Look of the studio blips.
maxStudentsnumber8Highest capacity an instructor can pick for a class.
joinMarginnumber6.0Extra metres around the zone accepted when the server checks that a student is really there. Also the range of the nearby class list in the panel.
feetablesee belowEntry fee settings.
refundIfNoRoundbooleantruetrue returns the fee to a student who leaves, is kicked or sees the class closed before any dance has started. false never refunds.

Class zone · rooms.zone ​

The instructor draws the zone with the zone creator of Cuxial Bridge.

OptionTypeDefaultWhat it does
minPointsnumber3Minimum points of the polygon.
maxPointsnumber12Maximum points. Extra points are ignored.
maxRadiusnumber40.0Largest distance in metres from the centre of the zone to its farthest point. A bigger zone is rejected.
maxThicknessnumber12.0Maximum height of the zone, in metres.
heightnumber4.0Height the creator starts with.
debugbooleanfalsetrue draws every class zone in the world, for testing.

Two classes cannot overlap. A zone drawn too close to an open class is rejected.

Entry fee · rooms.fee ​

OptionTypeDefaultWhat it does
enabledbooleantruetrue lets instructors charge a fee. false makes every class free.
accountstring'bank'Account the fee is taken from and paid into. Use an account name your framework knows.
minnumber0Lowest fee an instructor can set.
maxnumber5000Highest fee an instructor can set.

The fee goes straight from the student to the instructor when the student joins. Refunds are paid from the instructor's account.

Class · class ​

OptionTypeDefaultWhat it does
countdownSecondsnumber3Countdown before each dance.
roundSecondsnumber30Length of each dance.
maxRoundsnumber12Dances per class. Also the most dances an instructor can pick for the list.
resultsHoldMsnumber6000Milliseconds the results table of a dance stays on screen.
classEndHoldMsnumber9000Milliseconds the final podium stays on screen.
missesToFallnumber3Misses in a row that make the character fall.
fallMsnumber2500Milliseconds on the ground.
fallGraceMsnumber1000Milliseconds after getting up during which misses do not count towards another fall.
stumbleMsnumber900Length of the stumble shown on a single miss.
minStudentsnumber1Students needed to start a dance.

Students can only join before the first dance. Once the class has started, the zone tells newcomers it is already under way.

Difficulties · difficulties ​

Three levels are included: easy, normal and hard. difficultyOrder sets the order in which they appear in the panel.

FieldTypeWhat it does
labelstringName shown on the class cards.
noteIntervalMsnumberBase gap between notes. Lower is faster.
perfectMsnumberTiming window, in milliseconds either side of the note, for a Perfect.
goodMsnumberTiming window for a Good. Outside it, the note is a miss.
pointsBasenumberPoints of a dance with every note Perfect, before the streak bonus.
keysstring[]Keys used by the level. Valid values: 'W', 'A', 'S', 'D', 'UP', 'DOWN', 'LEFT', 'RIGHT'.
LevelnoteIntervalMsperfectMsgoodMspointsBaseKeys
easy9501002203W A S D
normal700801804W A S D + up, down
hard480651406W A S D + four arrows

Points · points ​

At the end of each dance the script works out the accuracy of every student and turns it into points. With Cuxial Gym running, those points raise the skill in skill.

OptionTypeDefaultWhat it does
skillstring'Stamina'Gym skill that goes up. Use a name Cuxial Gym accepts, such as 'Stamina', 'Strength' or 'Running'.
perfectnumber1.0Weight of a Perfect in the accuracy.
goodnumber0.6Weight of a Good.
minAccuracynumber0.25Accuracy below which a dance gives no points. From 0 to 1.
streakBonusPernumber0.02Bonus for each hit of the best streak.
streakBonusMaxnumber0.3Cap of the streak bonus.
maxPerRoundnumber6Most points a student can earn in one dance.
maxPerClassnumber24Most points a student can earn in one class.
instructorPerStudentnumber1Points the instructor earns for each student who reaches minAccuracy.
instructorMaxPerRoundnumber3Most points the instructor can earn in one dance.

Points of a dance = pointsBase × accuracy × (1 + streak bonus), rounded and limited by maxPerRound.

Dances · playlists ​

One list of dances per difficulty, used when the instructor leaves the class on random. Each entry is the command of a dance from the Cuxial Emotes catalog.

  • A command that does not exist in the catalog is skipped.
  • An empty list picks at random from the whole catalog.
  • A dance is not repeated until every dance of the list has been used.

The instructor can always pick specific dances in the panel, for the whole class or for the next dance only.

Ranks · ranks ​

Titles shown in each player's history, by total points earned as a student and as an instructor.

FieldTypeWhat it does
pointsnumberPoints needed to reach the rank.
labelstringName of the rank.

Keep the list sorted from fewest to most points, starting at 0.

Security · security ​

OptionTypeDefaultWhat it does
maxEventsPerSecondnumber30Notes per second the server accepts from one player. Anything above is dropped.

Common changes ​

Only a job can teach ​

shared/config.lua
lua
instructor = {
    mode = 'job',
    jobs = { 'dancer' },
    -- the rest stays the same
},

Classes only inside a studio ​

shared/config.lua
lua
rooms = {
    anywhere = false,
    studios = {
        { name = 'Dance Studio', coords = vector3(0.0, 0.0, 0.0), radius = 25.0, blip = true },
    },
    -- the rest stays the same
},

Free classes ​

shared/config.lua
lua
fee = { enabled = false, account = 'bank', min = 0, max = 5000 },

Texts in your language ​

The difficulty and rank names are written in shared/config.lua. Set them in the language of your server.

© Cuxial