<commit_before># Cactbot Customization

- [Using the cactbot UI](#using-the-cactbot-ui)
- [User Directory Overview](#user-directory-overview)
- [Setting Your User Directory](#setting-your-user-directory)
- [Customizing Appearance](#customizing-appearance)
- [Overriding Raidboss Triggers](#overriding-raidboss-triggers)
  - [Example 1: changing the output text](#example-1--changing-the-output-text)
  - [Example 2: making provoke work for all jobs](#example-2--making-provoke-work-for-all-jobs)
  - [Example 3: adding custom triggers](#example-3--adding-custom-triggers)
- [Overriding Raidboss Timelines](#overriding-raidboss-timelines)
- [Customizing Behavior](#customizing-behavior)
- [Debugging User Files](#debugging-user-files)
  - [Check the OverlayPlugin log for errors](#check-the-overlayplugin-log-for-errors)
  - [Check if your file is loaded](#check-if-your-file-is-loaded)
  - [Check if your user file has errors](#check-if-your-user-file-has-errors)

## Using the cactbot UI

The best way to customize cactbot is to use the cactbot configuration UI.
This is under
ACT -> Plugins -> OverlayPlugin.dll -> Cactbot.

This has options for things like:

- setting triggers to tts
- disabling triggers
- changing your cactbot language
- volume settings
- getting rid of that cheese icon

It is not possible to configure everything you might want
through the cactbot configuration UI.
However, it is the easiest place to start with.
Over time, more options will be added there.

These options are stored in your
`%APPDATA%\Advanced Combat Tracker\Config\RainbowMage.OverlayPlugin.config.json`
file.
You should not need to edit that file directly.

## User Directory Overview

If the cactbot UI doesn't have the option you are looking for,
then you may need to consider user file overrides.
At this point, you are writing JavaScript and CSS,
and so you might need a little bit of programming savvy.

The general philosophy of cactbot is that
any user configuration should only go in files in the user directory.
This will prevent your changes from being overwritten during future cactbot updates.
Additionally, in the future modifying cactbot files directly from a cactbot release
will not work properly without running extra build steps.

All cactbot UI modules can load user settings from the [user/](../user/) directory.
The `raidboss` module loads `user/raidboss.js` and `user/raidboss.css`.
The `oopsyraidsy` module loads `user/oopsyraidsy.js` and `user/oopsyraidsy.css`.
And so on, for each module.
These files are included after cactbot's files and can override its settings.

The `user/` directory already includes some example configuration files,
which you can rename and use.
For example the [user/raidboss-example.js](../user/raidboss-example.js) file
can be renamed to `user/raidboss.js`
and edited to change the behavior of the `raidboss` module.

After making any changes to these files,
pressing the "Reload overlay" button
for the appropriate overlay in ACT's OverlayPlugin settings will apply the changes.

## Setting Your User Directory

The cactbot user directory can be set via the cactbot configuration UI:
ACT -> Plugins -> OverlayPlugin.dll -> Cactbot -> Cactbot user directory.
Click the `Choose Directory` button and select a folder on disk.

If you haven't selected one,
it will try to select one based on where you have installed cactbot on disk.

Ideally, you should select the `cactbot/user` folder from your cactbot installation.
This is often in `%APPDATA%\Advanced Combat Tracker\Plugins\cactbot-version\cactbot\user`.
[This folder](../docs) has example customization files.

## Customizing Appearance

The `user/<name>.css` file can change positions, sizes, colors, etc. for components of
the UI module. See the `ui/<name>/<name>.css` to find the selectors you can modify.<commit_msg>docs: fix "this folder" link to user folder<commit_after># Cactbot Customization

- [Using the cactbot UI](#using-the-cactbot-ui)
- [User Directory Overview](#user-directory-overview)
- [Setting Your User Directory](#setting-your-user-directory)
- [Customizing Appearance](#customizing-appearance)
- [Overriding Raidboss Triggers](#overriding-raidboss-triggers)
  - [Example 1: changing the output text](#example-1--changing-the-output-text)
  - [Example 2: making provoke work for all jobs](#example-2--making-provoke-work-for-all-jobs)
  - [Example 3: adding custom triggers](#example-3--adding-custom-triggers)
- [Overriding Raidboss Timelines](#overriding-raidboss-timelines)
- [Customizing Behavior](#customizing-behavior)
- [Debugging User Files](#debugging-user-files)
  - [Check the OverlayPlugin log for errors](#check-the-overlayplugin-log-for-errors)
  - [Check if your file is loaded](#check-if-your-file-is-loaded)
  - [Check if your user file has errors](#check-if-your-user-file-has-errors)

## Using the cactbot UI

The best way to customize cactbot is to use the cactbot configuration UI.
This is under
ACT -> Plugins -> OverlayPlugin.dll -> Cactbot.

This has options for things like:

- setting triggers to tts
- disabling triggers
- changing your cactbot language
- volume settings
- getting rid of that cheese icon

It is not possible to configure everything you might want
through the cactbot configuration UI.
However, it is the easiest place to start with.
Over time, more options will be added there.

These options are stored in your
`%APPDATA%\Advanced Combat Tracker\Config\RainbowMage.OverlayPlugin.config.json`
file.
You should not need to edit that file directly.

## User Directory Overview

If the cactbot UI doesn't have the option you are looking for,
then you may need to consider user file overrides.
At this point, you are writing JavaScript and CSS,
and so you might need a little bit of programming savvy.

The general philosophy of cactbot is that
any user configuration should only go in files in the user directory.
This will prevent your changes from being overwritten during future cactbot updates.
Additionally, in the future modifying cactbot files directly from a cactbot release
will not work properly without running extra build steps.

All cactbot UI modules can load user settings from the [user/](../user/) directory.
The `raidboss` module loads `user/raidboss.js` and `user/raidboss.css`.
The `oopsyraidsy` module loads `user/oopsyraidsy.js` and `user/oopsyraidsy.css`.
And so on, for each module.
These files are included after cactbot's files and can override its settings.

The `user/` directory already includes some example configuration files,
which you can rename and use.
For example the [user/raidboss-example.js](../user/raidboss-example.js) file
can be renamed to `user/raidboss.js`
and edited to change the behavior of the `raidboss` module.

After making any changes to these files,
pressing the "Reload overlay" button
for the appropriate overlay in ACT's OverlayPlugin settings will apply the changes.

## Setting Your User Directory

The cactbot user directory can be set via the cactbot configuration UI:
ACT -> Plugins -> OverlayPlugin.dll -> Cactbot -> Cactbot user directory.
Click the `Choose Directory` button and select a folder on disk.

If you haven't selected one,
it will try to select one based on where you have installed cactbot on disk.

Ideally, you should select the `cactbot/user` folder from your cactbot installation.
This is often in `%APPDATA%\Advanced Combat Tracker\Plugins\cactbot-version\cactbot\user`.
[This folder](../user) has example customization files.

## Customizing Appearance

The `user/<name>.css` file can change positions, sizes, colors, etc. for components of
the UI module. See the `ui/<name>/<name>.css` to find the selectors you can modify.
{'fraction_non_alphanumeric': 0.0837675872850443, 'fraction_numerical': 0.001563314226159458, 'mean_word_length': 4.595481049562682, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 23, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1656012', 'n_tokens_mistral': 2254, 'n_tokens_neox': 2143, 'n_words': 942}