> ## 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.

# Configuration

> Character slots, identity rules, selection behavior, spawn and server-only Creator settings.

Creator's configuration is split between shared gameplay options and server-only logic/secrets.

| File                | Use it for                                                                                     |
| ------------------- | ---------------------------------------------------------------------------------------------- |
| `config/config.lua` | Framework, locale, slot caps, identity rules, selection and spawn behavior                     |
| `config/server.lua` | Starter items, Discord token/roles, custom slot rules, spawn-admin permission and server hooks |

## Framework and debug

```lua theme={"dark"}
Config.Framework = 'auto'
Config.Debug = false
Config.Locale = 'en'
```

Keep framework detection on `auto` unless startup reports an ambiguity.

## Character slots

```lua theme={"dark"}
Config.MaxCharacters = 5
Config.DefaultCharacterSlots = 4
Config.AllowCharacterDelete = true
```

`MaxCharacters` is the hard ceiling. Discord/manual/custom slot resolvers can change how many slots a player gets, but never beyond that cap.

Full priority rules are documented in [Character slots](/rco-creator/character-slots).

## Logout / return to selection

Builds that expose the logout command use the Creator selection flow rather than disconnecting the player. Treat logout as a **character lifecycle operation**, not just a UI reopen: pending spawn/apply work from the old character must not continue into the next one.

If your framework/build intentionally disables the command, use its supported return-to-selection integration instead of forcing a client UI open.

## Identity rules

Typical options include:

```lua theme={"dark"}
Config.CharacterNameMaxLength = 24
Config.NationalityMaxLength = 32
Config.IdentityReferenceDate = '1899-01-01'
Config.MinimumAge = 18
Config.MaximumAge = 100
```

The historical reference date is important on an RDR2-era server. Age should be validated against the roleplay setting, not today's real-world year.

Server validation still runs even if someone modifies the NUI.

## Nationalities

Use the configured nationality list when you want a controlled set of values instead of arbitrary text. Keep the list readable for players — this is character creation, not a database enum screen.

## Selection scene

`Config.Selection` controls selection presentation/behavior, including how locked slots are shown. Scene coordinates should be treated as a complete setup (ped placement, camera and staging), not random independent numbers.

If you move the scene, test every slot with both male/female saved appearances and at high FPS before shipping it.

## Spawn selector

A typical spawn section controls:

* selector mode;
* Last Location availability;
* fallback spawn;
* the initial seed list of locations.

The location list in config is primarily the **seed**. After the database is initialized, use `/rcospawns` for normal live management.

See [Spawn locations](/rco-creator/spawn-locations).

## Starter package

Server-only example:

```lua theme={"dark"}
CreatorServerConfig.Starter = {
    enabled = true,
    items = {
        { name = 'bread', amount = 5 },
        { name = 'water', amount = 5 },
    },
}
```

Starter grants should be one-time per character. Use real inventory item names from your framework.

## Force Last Location for special states

Server-side logic can bypass the normal spawn choice for characters that must return to a specific persisted context, such as jail.

```lua theme={"dark"}
CreatorServerConfig.ForceLastPosition = function(source, character)
    return character.isJailed == true
end
```

Keep this decision on the server. Do not trust a client boolean that says "I am jailed" or "skip spawn selector."

## Discord / custom slots

`CreatorServerConfig.Discord`, `PlayerSlots` and `ResolveCustomSlots` are covered in [Character slots](/rco-creator/character-slots) and [Discord setup](/rco-creator/discord-roles-setup).

## Spawn editor permission

`CanManageSpawns` decides who may use `/rcospawns`. This is separate from normal character permissions and should stay server-authoritative.
