> For the complete documentation index, see [llms.txt](https://batscripts.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://batscripts.gitbook.io/docs/rp-enhancement-scripts/bat_animpoints/configuration-file.md).

# Configuration file

The configuration file (e.g. `config.lua`) has 4 main variables:

### **MaxInteractionDistance**: `number`&#x20;

The maximum distance players can be from the animation point to be able to use it.

***

### **Controls**: `table`

The interaction configuration, what keys trigger what action from the script. Check the [FiveM documentation](https://docs.fivem.net/docs/game-references/controls/) for the list of all available keys.

* **SelectUpKey**: `number` (required)
  * The key that will change the animation selection upwards.
* **SelectDownKey**: `number` (required)
  * The key that will change the animation selection downwards.
* **SelectLabel**: `string` (required)
  * Label showing which keys the user needs to press to change the selected animation.
* **StartKey**: `number` (required)
  * The key that will start the selected animation.
* **StartLabel**: `string` (required)
  * Label showing which key the user needs to press to start the selected animation.
* **StopKey**: `number` (required)
  * The key that will stop the current animation.
* **StopLabel**: `string` (required)
  * Label showing which key the user needs to press to stop the current animation.

***

### **Blips**: `table`

Defines the blips (e.g. points) where each animation group will be available to the users.

* This table is a list, so no keys are needed.
* Each table (e.g. list item) must contain the following properties:
  * **Coords**: `table | number[]` (required)
    * A list containing XYZ coordinates for the point in the format `{ x, y, z }`.
  * **AnimationGroup**: `string` (required)
    * The code of the animation group (next configuration variable below) that defines the animations available in this point.
  * **InitialHeading**: `number` (optional / defaults to `nil`)
    * The heading peds will be rotated to before starting animations. It should be pointing to the audience location. Zero is still a heading valid value.
    * If not provided, peds won't be rotated before starting animations.
  * **PreservePointZ**: `boolean` (optional / defaults to `false`)
    * If `false`, the ped's Z coordinate will be preserved, and only the X and Y coordinates from the point will be used when warping the ped. If `true`, the ped will be warped to the X, Y and Z coordinates from the point.

***

### **Animations**: `table`

The animation groups that will be used by `Blips`.

* The key is the animation group code (used in `Blips > AnimationGroup`) as a `string`.
* Each table must contain the following properties:
  * **Dict**: `string` (required)
    * The animation dictionary name.
  * **Name**: `string` (required)
    * The animation name.
  * **Label**: `string` (required)
    * A simple description of what animation it is. This will be shown to the user when selecting a animation.
  * **Offsets**: `table | number[]` (optional)
    * A list containing XYZ offsets for the animation in the format `{ x, y, z }`. Use it in case you need to move the ped away from the animation point before starting it.
  * **HeadingOffset**: `number` (optional / defaults to `nil`)
    * A heading offset that will be added to the point's `InitialHeading` (if it is setup). Use it in case you need to rotate the ped before starting the animation.
  * **Flags**: `number` (optional / defaults to `2048 + 512 + 1`)
    * The flags that will be used for the animation. By default, animations will freeze the ped, unless you define a value for this variable.
  * **Props**: `table` (optional)
    * A list of objects - yes, plural! Spawn some food on them trays! - you want to spawn with the animation. They will be deleted as soon as the animation is cancelled.
    * This table is a list, so no keys are needed.
    * Each table (e.g. list item) must contain the following properties:
      * **ModelCode**: `string` (required)
        * The prop model code (not the numeric hash).
      * **BoneId**: `number` (required)
        * The ped's bone ID in which the prop will be attached to. Check the [FiveM documentation](https://docs.fivem.net/natives/?_0x3F428D08BE5AAE31) for the list of all available bones.
      * **Offsets**: `table | number[]` (optional)
        * The coordinates offsets for the attachment. In the format `{ x, y, z }`.
      * **Rotation**: `table | number[]` (optional)
        * The rotation for the attachment. In the format `{ x, y, z }`.
