Skip to content

Installation

Install Cuxial Multichar step by step: dependencies, convars, Discord bot and start order.

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_lib
  • oxmysql
  • cuxial_bridge 2.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, with family.enabled = true.
  • cuxial_multichar_playtime: hours played per character, with characters.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.

server.cfg
cfg
# 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"
ConvarUsed for
cuxial_multichar_discord_tokenToken of the Discord bot that reads the roles of each player
cuxial_multichar_discord_guildID of your Discord server
cuxial_multichar_webhookDiscord webhook that receives the logs
cuxial_multichar_debug1 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.

  1. Create a bot in the Discord Developer Portal and invite it to your Discord server.
  2. Put its token and your server ID in the convars of the previous step.
  3. Enable the feature and list your roles in shared/config.lua:
shared/config.lua
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.

server.cfg
cfg
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_multichar

Final check ​

  1. Restart the server and connect.
  2. The loading screen appears and ends on a start button.
  3. The selection opens with your characters, or the creation form if you have none.
  4. 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.

© Cuxial