> For the complete documentation index, see [llms.txt](https://code-after-sex.gitbook.io/script-documentation/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://code-after-sex.gitbook.io/script-documentation/cas-wedding/configuration.md).

# Configuration

Every setting in config.lua of the RedM Wedding & Marriage System: general options, items and rings, proposals, offices and venues, booking, invitations, the ceremony, marriage and divorce.

All settings are in `config.lua`, which is not escrowed. Every section is commented in the file itself. Restart the resource after a change.

Names that players read, such as ring names, hour names, bond levels and the court, come from the language file, so they follow `Config.Locale`. Wherever this page mentions a `name` or `label` field, writing it in the config overrides the language file, and it is then shown exactly as written. See [Languages and Translation](/script-documentation/cas-wedding/languages.md).

## General

```lua
Config.Locale = "en"
Config.Framework = "auto"
Config.DisplayYear = 1899
Config.SetupCommand = "weddingcoords"
Config.LedgerCommand = "marriage"
Config.StaffOnlyCommands = true
Config.DevTools = false
Config.Debug = false
Config.ServerUtcOffset = nil
```

| Setting             | Effect                                                                                                                                                   |
| ------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `Locale`            | The language of the interface and every message: `"en"` or `"tr"`, or your own                                                                           |
| `Framework`         | `"auto"`, `"vorp"` or `"rsg"`. See [VORP and RSG Core](/script-documentation/cas-wedding/frameworks.md)                                                  |
| `DisplayYear`       | The year shown on documents and in certificate and case numbers. `nil` for the real year                                                                 |
| `SetupCommand`      | The staff command that prints your position                                                                                                              |
| `LedgerCommand`     | The player command that opens the marriage records                                                                                                       |
| `StaffOnlyCommands` | `true` puts the staff commands behind ACE permissions. See [Permissions](/script-documentation/cas-wedding/commands.md#permissions)                      |
| `DevTools`          | Turns on the venue fine-tuning commands. Keep `false` on a live server                                                                                   |
| `Debug`             | Extra console output about the embrace and the NPC guests. Keep `false` on a live server                                                                 |
| `ServerUtcOffset`   | Pins server time to a UTC offset in hours. `nil` follows the machine's clock. See [Time and Time Zones](/script-documentation/cas-wedding/time-zones.md) |

## Items

```lua
Config.Items = {
    Invitation = "wedding_invitation",
    Certificate = "marriage_certificate",
}
```

The item names for invitations and certificates. If you rename them, rename them in your inventory's item list too.

## Rings

```lua
Config.Rings = {
    ring_diamond = { art = "provision_diamond_ring" },
    ring_gold = { art = "provision_goldring" },
    ring_platinum = { art = "provision_ring_platinum" },
    ring_chain = { art = "provision_golden_wedding_chain_ring" },
}
```

Every item listed here proposes when it is used. The key is the item name. `art` is the picture shown in the proposal and the marriage records, a PNG in `web/dist/tex/items/` without `.png`. The name comes from the language file (`cfg_ring_<item>`), or give a `label`.

To add a ring, add a line here and add the item to your inventory as a **usable** item. For its picture, reuse one of the ring pictures already in `web/dist/tex/items/`, or put your own PNG there:

```lua
ring_emerald = { art = "provision_ring_emerald", label = "Emerald Ring" },
```

Here `web/dist/tex/items/provision_ring_emerald.png` must exist.

## Proposals

```lua
Config.Proposal = {
    Distance = 2.5,
    Timeout = 45,
    RevealDelay = 5,
    GiveRingToPartner = true,
    MaxMessage = 240,
    Pose = { ... },
    Embrace = { Enabled = true, HoldLoops = 0 },
}
```

| Setting             | Effect                                                                             |
| ------------------- | ---------------------------------------------------------------------------------- |
| `Distance`          | How close the person being asked must be (m)                                       |
| `Timeout`           | Seconds they have to answer                                                        |
| `RevealDelay`       | Seconds they watch the kneel before the question opens                             |
| `GiveRingToPartner` | `true` moves the ring to the partner on a yes, `false` leaves it with the proposer |
| `MaxMessage`        | The longest proposal message, in characters                                        |
| `Embrace`           | See [The embrace](/script-documentation/cas-wedding/proposals.md#the-embrace)      |

### The kneeling pose

| Setting                                     | Effect                                                                                                |
| ------------------------------------------- | ----------------------------------------------------------------------------------------------------- |
| `Command`                                   | The emote command, `propose`                                                                          |
| `CancelKey`                                 | The key that stands up and withdraws, Backspace                                                       |
| `Dict`, `Clip`                              | The animation                                                                                         |
| `BoxAppearPhase`, `HoldPhase`, `StandPhase` | Where in the animation the box appears, the kneel is held and the rise starts, as a share of the clip |
| `StandTimeout`                              | The longest the rise may take (ms)                                                                    |
| `RiseBlend`, `RiseTimeout`                  | How the proposer rises into the embrace after a yes                                                   |
| `Prop`, `Bone`, `Offset`, `Rotation`        | The ring box model and where it sits in the right hand                                                |
| `SyncDistance`                              | Other players' proposals are shown within this range (m)                                              |

The pose values are tuned. Leave them unless you replace the ring box or the animation.

## Offices and venues

An office is a county clerk and the venue that belongs to it. The script ships with one: the clerk in Valentine and the Mayor's Garden in Saint Denis.

```lua
Config.Offices = {
    {
        id = "valentine",
        certificatePrefix = "NH",
        clerk = {
            model = "s_m_m_bankclerk_01",
            coords = vector4(-240.45, 796.06, 121.08, 115.0),
            interactDistance = 2.0,
        },
        blip = { sprite = -1954662204 },
        venue = {
            image = "img/venue_mayors_garden.jpg",
            capacity = 48,
            price = 110,
            ceremony = vector4(2388.06, -1111.29, 46.44, 0.0),
            officiant = {
                model = "cs_priest_wedding",
                coords = vector4(2388.06, -1109.59, 46.44, 180.0),
            },
        },
    },
}
```

| Field                         | Effect                                                                                |
| ----------------------------- | ------------------------------------------------------------------------------------- |
| `id`                          | A unique id. Bookings and marriages are stored by it, so do not change it once in use |
| `certificatePrefix`           | The start of certificate numbers, `NH-1899-0007`                                      |
| `clerk.model`, `clerk.coords` | The clerk NPC and where it stands                                                     |
| `clerk.interactDistance`      | How close the prompts appear (m)                                                      |
| `blip`                        | The map marker at the clerk. Remove it for no marker                                  |
| `venue.image`                 | The venue picture in the booking window, a file in `web/dist/`                        |
| `venue.capacity`              | The guest count shown in the booking window                                           |
| `venue.price`                 | The venue fee. The registry fee is added to it                                        |
| `venue.ceremony`              | The altar: where the couple stands and the ceremony begins                            |
| `venue.officiant`             | The NPC officiant's model and where it stands                                         |

The clerk's name, the state and county on documents, the blip name, and the venue's name, address, description and officiant name come from the language file (`cfg_office_<id>_clerk`, `_state`, `_county`, `_blip`, `_venue`, `_address`, `_description`, `_officiant`). Write `clerkName`, `state`, `county`, `blip.name`, `venue.name`, `venue.address`, `venue.description` or `venue.officiant.name` in the office to set them yourself.

### Adding an office

Add another block with its own `id`, for example a clerk in Saint Denis and a ceremony at the church. Each office has its own clerk, calendar, altar and officiant, and a couple books at whichever office they like. A couple can hold one booking at a time.

{% hint style="info" %}
The decorated venue belongs to the Mayor's Garden. A new office's ceremony works anywhere, but it has only the officiant NPC and whatever the map already has there.
{% endhint %}

To show a picture for a new venue, put a JPG or PNG in `web/dist/img/` and point `venue.image` at it, for example `"img/church.jpg"`.

## Booking

See [Booking a Ceremony](/script-documentation/cas-wedding/booking.md#ceremony-hours).

## Invitations

See [Wedding Invitations](/script-documentation/cas-wedding/invitations.md#settings-for-server-owners).

## Ceremony

See [The Ceremony](/script-documentation/cas-wedding/ceremony.md#settings).

## Venue

See [The Wedding Venue](/script-documentation/cas-wedding/venue.md).

## Marriage

```lua
Config.Marriage = {
    Levels = { ... },
    Bond = { TickMinutes = 10, Distance = 30.0, Xp = 10 },
    Milestones = { ... },
    CertificateCopyPrice = 2,
}
```

`CertificateCopyPrice` is the price of each certified copy of a marriage certificate. For the rest see [Marriage Records and Anniversaries](/script-documentation/cas-wedding/marriage.md).

## Divorce

See [Divorce](/script-documentation/cas-wedding/divorce.md#settings).
