> ## Documentation Index
> Fetch the complete documentation index at: https://rust-co.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Character slots

> Default slots, manual overrides, Discord roles and custom Tebex/database rules.

Most servers only need `Config.DefaultCharacterSlots`. The rest of this page is for communities that sell/award additional character capacity.

## How the slot count is resolved

Creator checks the configured sources in priority order and uses the first authoritative result:

1. `ResolveCustomSlots`
2. Discord role rules (when enabled)
3. manual per-player overrides (when that path is active)
4. framework-provided limit
5. `Config.DefaultCharacterSlots`

The result is always capped by `Config.MaxCharacters`.

## Total slots, not bonus slots

If VIP is configured for `5`, that means the player has **five total character slots**. It does not mean "default + 5."

The same idea applies to Discord role rules: when a player matches several roles, the configured resolver uses the relevant/highest total according to the integration instead of summing every role into an absurd slot count.

## Manual override

Server-side example:

```lua theme={"dark"}
CreatorServerConfig.PlayerSlots = {
    ['license:...'] = 5,
}
```

Use the identifier format expected by your build and keep this file server-only.

## Discord roles

```lua theme={"dark"}
CreatorServerConfig.Discord = {
    enabled = true,
    guildId = '123456789012345678',
    botToken = 'YOUR_BOT_TOKEN',
    defaultSlots = 1,
    cacheSeconds = 600,
    timeoutMs = 8000,
    roleSlots = {
        ['SUPPORTER_ROLE_ID'] = 3,
        ['VIP_ROLE_ID'] = 5,
    },
}
```

The bot token is a secret. Do not put it in shared client config or screenshots.

Step-by-step setup: [Discord roles setup](/rco-creator/discord-roles-setup).

## Tebex, whitelist or your own database

Use `ResolveCustomSlots` when the answer already exists somewhere else:

```lua theme={"dark"}
CreatorServerConfig.ResolveCustomSlots = function(source, identifiers)
    local purchased = MyStoreGetSlots(identifiers.license)
    if purchased then
        return purchased
    end

    return nil -- continue to the next resolver
end
```

Return a total slot count, or `nil` when your custom source has no opinion.

Keep the resolver fast and defensive. Character selection should not become unavailable because an optional external lookup threw an error.

## Locked slot presentation

Selection can show unavailable slots as locked/ghost entries or hide them, depending on your `Config.Selection` settings. That is presentation only; the server still enforces the real slot count.
