> For the complete documentation index, see [llms.txt](https://acestudios.gitbook.io/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://acestudios.gitbook.io/docs/roleplay/advanced-knockout/installation.md).

# Installation

Install ace\_knockout on your server.

## Requirements

* [ox\_lib](https://github.com/overextended/ox_lib) (required, loaded as a shared script)
* Optional: QBCore, Qbox or ESX, for job immunities and native notifications

## Steps

{% stepper %}
{% step %}

### Place the resource

Copy `ace_knockout` into your `resources` directory.
{% endstep %}

{% step %}

### Add it to `server.cfg`

Start it after `ox_lib` and your framework. The framework is detected when the resource loads.

{% code title="server.cfg" %}

```properties
ensure ox_lib
ensure qb-core        # or qbx_core / es_extended (optional)

ensure ace_knockout
```

{% endcode %}
{% endstep %}

{% step %}

### Choose a video format (optional)

The resource ships with **MP4** dream videos turned on (about 180 MB). For faster loading, switch to the smaller **WEBM** versions. See [Dream Sequences](/docs/roleplay/advanced-knockout/dream-sequences.md#switching-to-webm).
{% endstep %}

{% step %}

### Configure

Tune the triggers, chances and immunities in `config.lua`. See [Configuration](/docs/roleplay/advanced-knockout/configuration.md).
{% endstep %}

{% step %}

### Restart the server

{% endstep %}
{% endstepper %}

## Framework detection

With `Config.Framework = 'auto'`, `bridge.lua` checks in this order:

| Order | Resource      | Result       |
| :---: | ------------- | ------------ |
|   1   | `qbx_core`    | `qbox`       |
|   2   | `qb-core`     | `qbcore`     |
|   3   | `es_extended` | `esx`        |
|   —   | none          | `standalone` |

{% hint style="info" %}
In **standalone** mode the bridge has no job lookup, so `Config.Immunities.Jobs` needs QBCore, Qbox or ESX to take effect.
{% endhint %}

## Notification detection

`bridge.lua` picks a notification system automatically:

| Order | Condition               | System used                      |
| :---: | ----------------------- | -------------------------------- |
|   1   | `ox_lib` started        | `lib.notify`                     |
|   2   | `okokNotify` started    | `okokNotify:Alert`               |
|   3   | `mythic_notify` started | `mythic_notify:client:SendAlert` |
|   4   | QBCore/Qbox             | `Core.Functions.Notify`          |
|   4   | ESX                     | `ESX.ShowNotification`           |
|   5   | Standalone              | Chat message                     |

{% hint style="info" %}
Because `ox_lib` is required, ox\_lib notifications are used on a normal setup. The current `bridge.lua` doesn't read `Config.NotificationSystem`. To use a different system, edit `Bridge.Notify` in `bridge.lua` (not escrowed).
{% endhint %}
