Skip to content

Configuration

Every option of Cuxial Multichar: slots, Discord, registration, minors, spawn, scene and loading screen.

Everything is set in shared/config.lua. Locations, loading screen content and nationalities live in the data folder. Restart the resource after any change.

General ​

OptionTypeDefaultWhat it does
debugbooleanfalsePrints debug messages in the console
ui.accentstringconfigurableAccent colour of the interface and the loading screen, as a hex colour
hudfunctionemptyCalled with false when the selection opens and with true when it closes. Use it to hide and show your HUD. The minimap is hidden without it
shared/config.lua
lua
hud = function(visible)
    exports.my_hud:setVisible(visible)
end,

Characters ​

OptionTypeDefaultWhat it does
characters.slotsnumber3Characters any player can have
characters.maxSlotsnumber10Absolute cap. No role or user ID goes above it
characters.allowDeletebooleantruetrue lets players delete their own characters
characters.card.moneybooleantrueShows cash and bank on the character card
characters.card.playtimebooleantrueShows hours played. With false nothing is counted and its table is not created
characters.card.locationbooleantrueShows the street and area of the last logout
characters.card.gangbooleantrueShows the character's gang
characters.card.lastSeenbooleantrueShows how long ago the character was last online
characters.portraits.enabledbooleantrueFace portrait of the character in each slot. With false their initials are shown
characters.portraits.transparentbooleantruePortrait with a transparent background
characters.portraits.maxnumber8Maximum portraits generated per selection session. Slots beyond that show initials

Hours played ​

Hours played are stored per citizenid in the cuxial_multichar_playtime table, created automatically on start. The counter starts when the character enters the game and adds the time on logout, on disconnect and every 10 minutes. Characters that already existed start at zero.

Discord slots ​

Gives more characters to specific Discord roles or users.

OptionTypeDefaultWhat it does
discordSlots.enabledbooleanfalsetrue enables extra slots by role and by user ID
discordSlots.roleslistempty{ id = 'ROLE_ID', slots = N } entries. Needs the bot convars
discordSlots.userstableempty['DISCORD_USER_ID'] = N entries. Works without the bot
discordSlots.cacheMinutesnumber10Minutes the roles of a player are remembered before asking Discord again
discordSlots.timeoutMsnumber4000Milliseconds to wait for Discord. With no answer, the player keeps the base slots

How the final number is calculated:

  • slots in a role or a user is the total number of characters, not an addition.
  • If a player matches several entries, the highest number wins.
  • The result is never lower than characters.slots and never higher than characters.maxSlots.
  • The player needs Discord linked to FiveM. Without it, they get the base slots.

The bot token and the server ID are convars, not config options. See Installation.

Registration ​

OptionTypeDefaultWhat it does
register.name.min / maxnumber2 / 32Length allowed for first name and last name
register.dob.formatstring"DD-MM-YYYY"Date format: DD-MM-YYYY, YYYY-MM-DD or MM-DD-YYYY
register.dob.minYearnumber1950Oldest year of birth accepted
register.minAgenumber18Minimum age of an adult character
register.height.enabledbooleantrueShows the height field
register.height.min / maxnumber150 / 200Height range in cm
register.backstory.enabledbooleantrueShows the backstory field
register.backstory.min / maxnumber10 / 300Length allowed for the backstory

The nationality list is in data/nationalities.lua.

Minor characters ​

A minor is created as a request. The player picks the parents and writes a motivation, and staff approve or reject it. Until it is approved, the character cannot be played.

OptionTypeDefaultWhat it does
family.enabledbooleantrueEnables minor characters
family.minAge / maxAgenumber6 / 17Age range of a minor
family.motivation.min / maxnumber30 / 600Length allowed for the motivation
family.height.minnumber100Minimum height of a minor in cm
family.height.maxtablemale = 168, female = 158Maximum height by gender
family.adultHeighttablemale = 182, female = 170Reference adult height. The character is scaled as its height divided by this value
family.growthCommandstring'estatura'Command the minor uses to change height. false removes it
family.scaleRadiusnumber60.0Distance in metres within which other players are shown scaled
family.rejectCooldownHoursnumber24Hours to wait after a rejection before sending a new request. 0 disables it
family.allowOwnParentbooleanfalsetrue lets a player choose their own characters as parents
family.maxPendingnumber1Pending requests allowed per player

Requests are reviewed through the exports.

Spawn ​

OptionTypeDefaultWhat it does
spawn.newCharactervec4—Where a new character is placed while the appearance creator opens
spawn.birthvec4—Where a new character appears after the creator. false skips this move
spawn.registerPreviewvec4—Where the character stands during creation
spawn.registerReferencevec4—Where the adult reference stands when setting a minor's height
spawn.fallbackvec4—Used when a character has no saved position or no location is available
spawn.apartmentsstring / boolean"auto""auto" uses starting apartments if qbx_properties is running and the framework has them enabled. true / false forces it. With apartments, the appearance creator and the move to spawn.birth are skipped

Existing characters always spawn at their last saved position.

Entering the game ​

Transition from the selection into the game.

OptionTypeDefaultWhat it does
play.fadeOutnumber1800Fade to black after pressing play, in milliseconds
play.holdnumber900Minimum time on black, in milliseconds
play.loadMsnumber6000Maximum wait for the area around the spawn point to load, in milliseconds
play.fadeInnumber2000Fade in, in milliseconds
play.introbooleantrueArrival shot that moves down to the player camera. With false the player enters directly
play.introMsnumber3500Duration of the arrival shot, in milliseconds
play.handoffMsnumber1500Transition from the arrival shot to the gameplay camera, in milliseconds

Scene ​

OptionTypeDefaultWhat it does
scene.randomLocationbooleantruetrue picks a random location each time. false always uses the first one in the list
scene.emoteslisttexting, idle3, smoke2Emote commands played at random when the location has no emote of its own. Needs cuxial_emotes
scene.fallbackScenariostring"WORLD_HUMAN_STAND_MOBILE"Scenario used when cuxial_emotes is not running
scene.posturestring"side""side" keeps the heading of the location. "front" turns the character towards the camera
scene.depthOfFieldbooleantrueBackground blur. The player can turn it off with FPS mode
scene.cameraDistancenumber2Default camera distance: 1 near, 2 far
scene.byJobbooleantrueUses locations with jobs, gangs or groups for characters of that job or gang. With false everyone gets the general locations
scene.pacenumber1.8Speed of camera moves. 1 is the base; higher is slower
scene.switchFadeOut / switchFadeInnumber900 / 1600Fades when switching character, in milliseconds
scene.switchShotnumber1.0Share of the medium shot played when switching character, from 0.2 to 1
scene.light.enabledbooleantrueEach location applies its own time, weather and filter. With false the world block is used
scene.light.timelist{ 19, 0 }Time { hour, minute } for locations that do not set time
scene.light.weatherstring'EXTRASUNNY'Weather for locations that do not set weather
scene.light.timecycletablename = 'cinema', strength = 0.25Colour filter (timecycle) and its strength from 0 to 1, for locations that do not set their own
scene.sound.enabledbooleantrueTransition sound when switching character
scene.sound.set / out / instring'PLAYER_SWITCH_CUSTOM_SOUNDSET', 'Short_Transition_Out', 'Short_Transition_In'GTA soundset and the out and in sounds

If the player picks a weather or time in their settings, their choice wins over the location.

Locations ​

data/locations.lua holds the places where characters are shown.

data/locations.lua
lua
{ label = 'Rockford Hills', coords = vec4(-852.73, -226.99, 61.02, 354.04) },

{
    label = 'Police station',
    coords = vec4(444.37, -984.33, 30.69, 71.35),
    jobs = { 'police' },
    emote = { scenario = 'WORLD_HUMAN_COP_IDLES' },
    time = { 10, 0 },
    weather = 'CLEAR',
},

{
    label = 'Police yard',
    coords = vec4(448.16, -1017.41, 28.56, 90.65),
    jobs = { 'police' },
    camera = 'vehicle',
    ride = { model = 'police3', siren = true },
},
FieldWhat it does
labelName of the location
coordsPosition and heading of the character
jobsJob names. The location is only used for characters with one of those jobs, and those characters only get locations of their job
gangsSame as jobs, with gang names. The job is checked before the gang
groupsNames that count as both job and gang
emote{ command = '...' } for an emote or { scenario = '...' } for a GTA scenario
camerafront (default), back, close, free or vehicle
rideScene vehicle, with camera = 'vehicle': { model, siren, props }. siren = true turns on the lights without sound. props accepts the properties of lib.setVehicleProperties
requiresThe location is only used when these hold: interior (a vec3 inside a loaded interior), resource (a running resource) and timeout (maximum wait for the interior in milliseconds, 3000 if omitted)
time, weather, timecycleTime { hour, minute }, weather and filter { name, strength } for this location. timecycle = false removes it. They need scene.light.enabled
cameraCoords, fov, focusOffset, blurCamera position and lens, only with camera = 'free'. cameraCoords is required in that mode
scene'bar' plays the leaning animation with props defined in data/scenes.lua

data/vehicle_locations.lua holds the spots used when the character poses with an owned vehicle.

data/scenes.lua holds the scene animations:

KeyWhat it does
bardict, anim, heading (character heading) and props ({ anim, model }) of the bar scene
coupleList of couple animations: { dict, m, f }, one per gender
friendsList of best friend animations: { dict, left, right }, one per side
vehicle.male / femaleLeaning on the car animation, by gender
vehicle.standingStanding next to a motorcycle animation
vehicle.gap / bikeGap / alongSide gap from the car and from the motorcycle, and offset along the vehicle, in metres

ID card, vehicles and partner ​

OptionTypeDefaultWhat it does
idCard.enabledbooleantrueShows the real ID card while creating a character
idCard.resourcestring"cuxial_license"Resource that provides the card
idCard.itemstring"id_card"Item whose card is used
idCard.cardIdstringnilSpecific card ID. nil picks it from the item
vehicles.enabledbooleantrueLets players pick an owned vehicle for the scene
vehicles.resourcestring"cuxial_garages"Resource that must be running for this feature
vehicles.spotCommandstring / booleanfalseCommand name that copies your current vec4 to the clipboard, to fill data/vehicle_locations.lua
partner.enabledbooleantrueEnables couple and best friend scenes
partner.maxDistancenumber10.0Maximum distance in metres to invite someone
partner.inviteSecondsnumber60Seconds an invitation stays open
partner.invitesPerMinutenumber3Invitations a player can send per minute
partner.commands.invitestring"partnerinvite"Name of the invite command
partner.commands.forcetableforcepartner, group.adminname and restricted (permission) of the staff command

World ​

Weather and time shown in the selection. Each player can change them in their settings.

OptionTypeDefaultWhat it does
world.enabledbooleantruefalse leaves the server weather and time untouched
world.weatherstring"XMAS"GTA weather type
world.hour / minutenumber23 / 30Time of day

Loading screen and music ​

OptionTypeDefaultWhat it does
loading.enabledbooleantruefalse closes the loading screen right away
loading.autoEnterbooleanfalsetrue enters the selection without the start button
loading.handoffMsnumber2400Duration of the transition to the selection, in milliseconds
loading.timeoutMsnumber60000Safety limit in milliseconds. The loading screen closes if the transition never arrives
loading.startKeystring"Enter""Start" key. Picked in the admin panel from the valid keys
loading.debugbooleanfalseDebug output of the loading screen
music.enabledbooleantrueMusic in the loading screen and the selection
music.filestring'sounds/music/…'Path inside web/build of the track used when data/loading.lua has no track list. By default it points to the included track
music.scalenumber0.35Volume multiplier applied over the player's volume
music.shufflebooleantrueStarts from a random track. With false, from the first one
music.analysebooleantrueMakes the interface react to the beat

Content is edited in data/loading.lua:

FieldWhat it does
background.videoVideo file inside web/build, or a URL. Empty by default: no video, a dark background with particles
background.dim, blurDarkening (0 to 1) and blur of the video
background.loop, startAtLoop the video and second where it starts
background.rateVideo playback speed. 0.5 by default (half speed)
background.sound'auto' detects whether the video has sound. true / false forces it
background.title, artistShown in the player when the video carries the sound
tipSecondsSeconds each tip stays on screen
tracksPlaylist: { id, url, title, artist }. By default it holds the included track
tipsTips: { id, category, title, text }
keysKey guide: { id, keys, label, category, description }

The package includes one music track in web/build/sounds/music, already listed in tracks. It includes no video. To change the music or add a video, copy your files inside web/build (for example web/build/sounds/music and web/build/video) and list them in data/loading.lua. Use .webm video and .ogg audio.

Starter items, commands and logs ​

OptionTypeDefaultWhat it does
starterItemslistblack_phone ×1{ item, amount }. identity = true fills the item with the character's name, date of birth and nationality. metadata sets custom metadata
commands.logouttablelogout, group.adminname and restricted (permission) of the command. restricted = false opens it to everyone
commands.logoutPlayertablelogoutplayer, group.adminname and restricted (permission) of the command
commands.admintablemcadmin, group.adminname and restricted (permission) of the admin panel command
logs.enabledbooleantrueSends logs to Discord when the webhook convar is set
logs.convarstring"cuxial_multichar_webhook"Name of the convar that holds the webhook
logs.usernamestring"Multicharacter"Name shown by the webhook
logs.webhookstring or falsefalseWebhook saved from the admin panel. It wins over the convar. false uses the convar

Admin panel ​

OptionTypeDefaultWhat it does
admin.permissionstring"admin"Permission checked on every admin panel action
admin.auditDaysnumber90Days the panel audit log is kept

The values in this file are the factory ones. What you save in the admin panel is stored in the database and wins over the file until you reset it.

Common changes ​

lua
discordSlots = {
    enabled = true,
    roles = {
        { id = '123456789012345678', slots = 5 },
    },
},

© Cuxial