Follow these steps in order to get the character selection running without breaking your current setup.
Check the dependencies
These resources must be installed and working before you start:
- OneSync enabled
ox_liboxmysqlcuxial_bridge2.24.1 or later- A supported framework: QBox or QBCore
Cuxial Multichar requires QBox or QBCore.
Optional resources (cuxial_emotes, cuxial_license, cuxial_garages, av_weather, qbx_properties) are detected on their own. Nothing breaks if they are missing.
The appearance resource is optional too. Cuxial Multichar uses cuxial_appearance and, if it is not running, illenium-appearance. With either one, the character look shows in the scene and the creator opens when a new character is created. With illenium-appearance, the look is read from the playerskins table (row with active = 1).
Without an appearance resource, the character shows the base body (default model for the gender) and no creator opens when a character is created.
Do not run another character selection or another loading screen at the same time. Cuxial Multichar ships its own loading screen and handles the character login itself.
Copy the resource
Place the cuxial_multichar folder inside your resources directory. Keep the folder name as it is.
The interface is already built in web/build. You do not need to compile anything.
Database
Nothing to import. The tables are created automatically when the resource starts, and missing columns are added on later updates:
cuxial_family: minor characters, withfamily.enabled = true.cuxial_multichar_playtime: hours played per character, withcharacters.card.playtime = true.
If you prefer to create them by hand, the files are install/cuxial_family.sql and install/cuxial_multichar_playtime.sql.
Starter items
New characters receive the items listed in starterItems. By default: one black_phone.
Make sure those items exist in your inventory, or edit the list in shared/config.lua. An item that does not exist is reported in the server console at startup.
Convars
Add the ones you need to your server.cfg. All of them are optional.
# Extra character slots by Discord role
set cuxial_multichar_discord_token "YOUR_TOKEN_HERE"
set cuxial_multichar_discord_guild "YOUR_DISCORD_SERVER_ID"
# Discord logs
set cuxial_multichar_webhook "YOUR_WEBHOOK_HERE"| Convar | Used for |
|---|---|
cuxial_multichar_discord_token | Token of the Discord bot that reads the roles of each player |
cuxial_multichar_discord_guild | ID of your Discord server |
cuxial_multichar_webhook | Discord webhook that receives the logs |
cuxial_multichar_debug | 1 prints debug messages in the server console. To get them in the client console too, use debug = true in the config |
The bot token is a secret. Define these convars with set, never with setr: setr replicates the value to every connected client, and anyone could read your token. Do not paste the token in the config, in screenshots or in a public repository. If it leaks, regenerate it in the Discord Developer Portal right away.
The interface language follows ox_lib. Set it with setr ox:locale en (or es).
Discord slots (optional)
Skip this step if every player has the same number of characters.
- Create a bot in the Discord Developer Portal and invite it to your Discord server.
- Put its token and your server ID in the convars of the previous step.
- Enable the feature and list your roles in
shared/config.lua:
discordSlots = {
enabled = true,
roles = {
{ id = '123456789012345678', slots = 5 },
},
users = {
['123456789012345678'] = 4,
},
},Slots by user ID (users) work without the bot and without the convars. Details in Configuration.
Start order
Start Cuxial Multichar after its dependencies.
ensure oxmysql
ensure ox_lib
ensure qbx_core # or qb-core
ensure ox_inventory # or qb-inventory
ensure cuxial_bridge
# Appearance (optional): one of the two
ensure cuxial_appearance # or illenium-appearance
# Optional
ensure cuxial_emotes
ensure cuxial_license
ensure cuxial_garages
ensure cuxial_multicharFinal check
- Restart the server and connect.
- The loading screen appears and ends on a start button.
- The selection opens with your characters, or the creation form if you have none.
- Create a character: you go through the appearance creator (if you run an appearance resource) and spawn with the starter items.
If something fails, see Troubleshooting.
