> 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/booking.md).

# Booking a Ceremony

Booking a wedding ceremony in the RedM Wedding & Marriage System: the county clerk, the calendar, ceremony hours, fees, cancellations, refunds and missed ceremonies.

An engaged couple books their ceremony with the county clerk. They pick a day and an hour, pay the fees, and the altar opens for them at that hour.

## The county clerk

The clerk stands in **Valentine** and is marked on the map as **County Clerk - Weddings**. Walk up to them and hold:

| Key   | Opens               |
| ----- | ------------------- |
| **E** | Book a Ceremony     |
| **G** | Wedding Invitations |
| **R** | Marriage Records    |

Only an engaged couple can book. Either partner can book on their own. If the other partner is online, they get a notification too.

## The calendar

The booking window shows the venue with its picture, address, description and capacity, and a calendar starting today.

* **Days.** Today and the next 14 days (`Config.Booking.DaysAhead`).
* **Hours.** Four evening hours by default, from 18:00 to 22:00 server time. Each is shown in the player's own time zone. See [Time and Time Zones](/script-documentation/cas-wedding/time-zones.md).

Each hour shows its state:

| State        | Meaning                                                         |
| ------------ | --------------------------------------------------------------- |
| **Open**     | Free to book                                                    |
| **Reserved** | Another couple has it                                           |
| **Closed**   | Less than 30 minutes away, already past, or on a closed weekday |
| **Yours**    | Your booking                                                    |

Choose an hour and **Book**. The confirmation shows the venue, the hour in your time and in server time, and the price. **Confirm & Pay** takes the money and books the hour. The couple gets a notification with the venue and the time, and the booking gets a receipt number such as `CH-48213`.

A couple can hold **one** booking at a time.

## Price

|                                             | Default  |
| ------------------------------------------- | -------- |
| Venue fee (`venue.price` of the office)     | $110     |
| Registry fee (`Config.Booking.RegistryFee`) | $5       |
| **Total**                                   | **$115** |

It is paid in cash by the partner who books.

## Cancelling

Open **Book a Ceremony** at the clerk again and choose **Cancel Booking**.

* Cancelling refunds **50%** of what was paid (`Config.Booking.CancelRefund`). The refund goes to the partner who paid. If they are offline, it goes to the partner who cancels.
* A booking cannot be cancelled in the last 15 minutes before its hour (`Config.Ceremony.EarlyMinutes`), since the altar is already open by then.
* The hour becomes free for other couples straight away.

## When the hour comes

The altar opens **15 minutes** before the booked hour and stays open until **30 minutes** after it ends. During that time the couple begins the ceremony at the altar. See [The Ceremony](/script-documentation/cas-wedding/ceremony.md).

A couple that does not marry by then **misses** their booking. It is closed without a refund and the couple can book again.

## Ceremony hours

```lua
Config.Booking = {
    DaysAhead = 14,
    RegistryFee = 5,
    MinLeadMinutes = 30,
    CancelRefund = 0.5,
    ClosedWeekdays = {},
    Slots = {
        { id = "s1", start = "18:00", finish = "19:00" },
        { id = "s2", start = "19:00", finish = "20:00" },
        { id = "s3", start = "20:00", finish = "21:00" },
        { id = "s4", start = "21:00", finish = "22:00" },
    },
}
```

| Setting          | Effect                                                                                            |
| ---------------- | ------------------------------------------------------------------------------------------------- |
| `DaysAhead`      | How many days ahead couples can book, after today                                                 |
| `RegistryFee`    | Added to the venue's price                                                                        |
| `MinLeadMinutes` | An hour closes this many minutes before it starts                                                 |
| `CancelRefund`   | Share of the total refunded on cancelling, `0` to `1`                                             |
| `ClosedWeekdays` | Days with no ceremonies. `0` is Sunday, `6` is Saturday. `{ 0 }` closes Sundays                   |
| `Slots`          | The hours. `start` and `finish` are in server time, 24-hour format. An hour may run past midnight |

Each slot has a name shown in the calendar, from the language file (`cfg_slot_s1` is *Early evening*). Give a slot a `name` to write it yourself:

```lua
{ id = "s5", start = "14:00", finish = "15:00", name = "Afternoon" },
```

Plan your hours around when your players are online. Evening hours in server time suit a server whose players mostly share that time zone.

{% hint style="warning" %}
Do not remove or rename a slot while couples hold bookings on it. Such a booking is cancelled the next time anyone looks at it, and the full price is refunded only if the partner who paid is online at that moment.
{% endhint %}

## The venue

The price, capacity, picture and location come from the office in `Config.Offices`. See [The Wedding Venue](/script-documentation/cas-wedding/venue.md) and [Configuration](/script-documentation/cas-wedding/configuration.md#offices-and-venues).
