> For the complete documentation index, see [llms.txt](https://xtask.rlib.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://xtask.rlib.io/configuration/achievements.md).

# Achievements

Information related to how achievements are stored and what makes an achievement work

## <mark style="color:red;">▸ Location</mark>

```
lua\achievements\*
```

## <mark style="color:red;">▸ About</mark>

Achievements are broken up into folders and the foldername specifies what those achievements are for. Usually they're based on the gamemode.

Non-specific achievements that can be used for any gamemode go in the <mark style="color:red;">**General**</mark> folder.

When you boot your server up, only the achievements for that specific gamemode will be loaded, as well as the **general** folder. Which means that if your server runs the <mark style="color:red;">**TTT**</mark> gamemode; then the <mark style="color:red;">**TTT**</mark> folder and <mark style="color:red;">**General**</mark> folders will load.

## <mark style="color:red;">▸ Achievement Structure</mark>

All achievements typically have the same structure:

```lua
XTASK                       = { }
XTASK.enabled               = true
XTASK.cat_clr               = Color( 196, 43, 76, 255 )
XTASK.maxreq                = 1000000
XTASK.po_enabled            = true
XTASK.po                    = { items = { }, currency = { points = 0, points_prem = 0, darkrpfunds = 200 } }
XTASK.gamemode              = { }
XTASK.title                 = 'Ass-Blaster'
XTASK.desc                  = sf( 'Deal %s in total damage to other players.', string.Comma( XTASK.maxreq ) )
XTASK.cat                   = 'Damage'
XTASK.author                = 'Richard'
XTASK.icon                  = 'rlib/modules/xtask/ach/ass_blaster.png'
XTASK.stat                  = 'action_damageinf'
```

Most of the settings are self-explanitory, but a summary of them are provided below:

| [<mark style="color:red;">**enabled**</mark>](/configuration/achievements/xtask.enabled.md)        | Specifies if the achievement is enabled on the server. Disabled achievements will not show or be tracked at all.                                                                                                                                                                                                                                                                                                                          |
| -------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [<mark style="color:red;">**cat\_clr**</mark>](/configuration/achievements/xtask.cat_clr.md)       | The color that will be used for the Category                                                                                                                                                                                                                                                                                                                                                                                              |
| [<mark style="color:red;">**maxreq**</mark>](/configuration/achievements/xtask.maxreq.md)          | <p>The maximum requirement needed to complete this achievement.<br><br>As an example, if you set the <mark style="color:red;"><strong>stat</strong></mark> to <mark style="color:yellow;"><strong>action\_damageinf</strong></mark> and the <mark style="color:red;"><strong>maxreq</strong></mark> to <mark style="color:yellow;"><strong>100000</strong></mark>, then that means the player must do 100000 damage to other players.</p> |
| [<mark style="color:red;">**po\_enabled**</mark>](/configuration/achievements/xtask.po_enabled.md) | Determines if there will be a payout when the achievement is completed. Player will receieve things like money, etc.                                                                                                                                                                                                                                                                                                                      |
| [<mark style="color:red;">**po**</mark>](/configuration/achievements/xtask.po.md)                  | The payout that will be given to the player when they complete an achievement.                                                                                                                                                                                                                                                                                                                                                            |
| [<mark style="color:red;">**gamemode**</mark>](/configuration/achievements/xtask.gamemode.md)      | Which gamemode(s) the achievement will be enabled on.                                                                                                                                                                                                                                                                                                                                                                                     |
| [<mark style="color:red;">**title**</mark>](/configuration/achievements/xtask.title.md)            | The name of the achievement which will show on the interface when a player opens the achievements interface.                                                                                                                                                                                                                                                                                                                              |
| [<mark style="color:red;">**desc**</mark>](/configuration/achievements/xtask.desc.md)              | The description for the achievement which will show on the interface when a player opens the achievements interface.                                                                                                                                                                                                                                                                                                                      |
| [<mark style="color:red;">**cat**</mark>](/configuration/achievements/xtask.cat.md)                | Which category the achievement belongs to. Example: Damage, Sitting, etc.                                                                                                                                                                                                                                                                                                                                                                 |
| [<mark style="color:red;">**author**</mark>](/configuration/achievements/xtask.author.md)          | Who made the achievement                                                                                                                                                                                                                                                                                                                                                                                                                  |
| [<mark style="color:red;">**icon**</mark>](/configuration/achievements/xtask.icon.md)              | The icon that will show for the player when they view the achievement.                                                                                                                                                                                                                                                                                                                                                                    |
| [<mark style="color:red;">**stat**</mark>](/configuration/achievements/xtask.stat.md)              | What type of achievement this is. Damage, etc.                                                                                                                                                                                                                                                                                                                                                                                            |

## <mark style="color:red;">▸ Achievement Types</mark>

The achievement type is what determines how a user will earn the achievement. This includes things like jumping, sitting, crouching, damage, etc.

In the above achievement example, this is the value you will specify for the setting <mark style="color:red;">**stat**</mark>**.**

```lua
XTASK.stat                  = 'action_damageinf'
```

The following is a list of achievement types you can choose from. You can find this list also in <mark style="color:red;">**lua\modules\xtask\cfg\sh\_cfg\_actions.lua**</mark>

<table><thead><tr><th width="318"></th><th></th></tr></thead><tbody><tr><td><mark style="color:red;"><strong>action_bulletsfired</strong></mark></td><td>Bullets fired from your gun</td></tr><tr><td><mark style="color:red;"><strong>action_connections</strong></mark></td><td>Player connecting to the server</td></tr><tr><td><mark style="color:red;"><strong>action_contextmenu</strong></mark></td><td>"C" Context Menu</td></tr><tr><td><mark style="color:red;"><strong>action_damageinf</strong></mark></td><td>Damage inflicted on other players</td></tr><tr><td><mark style="color:red;"><strong>action_damagetaken</strong></mark></td><td>Damage taken when shot by other players</td></tr><tr><td><mark style="color:red;"><strong>action_deaths</strong></mark></td><td>Death</td></tr><tr><td><mark style="color:red;"><strong>action_drugs</strong></mark></td><td>Basewars drugs</td></tr><tr><td><mark style="color:red;"><strong>action_duck</strong></mark></td><td>Ducking, crouching</td></tr><tr><td><mark style="color:red;"><strong>action_factions_create</strong></mark></td><td>Basewars factions created</td></tr><tr><td><mark style="color:red;"><strong>action_factions_join</strong></mark></td><td>Basewars factions joined</td></tr><tr><td><mark style="color:red;"><strong>action_factions_leave</strong></mark></td><td>Basewars factions left</td></tr><tr><td><mark style="color:red;"><strong>action_ignite_ply</strong></mark></td><td>Players on fire</td></tr><tr><td><mark style="color:red;"><strong>action_jobswitches</strong></mark></td><td>Switching between job to job (DarkRP).</td></tr><tr><td><mark style="color:red;"><strong>action_jumps</strong></mark></td><td>Jumping</td></tr><tr><td><mark style="color:red;"><strong>action_karma</strong></mark></td><td>Basewars karma</td></tr><tr><td><mark style="color:red;"><strong>action_kills</strong></mark></td><td>Kills you make to other players</td></tr><tr><td><mark style="color:red;"><strong>action_messages</strong></mark></td><td>Sending a message to another player</td></tr><tr><td><mark style="color:red;"><strong>action_props</strong></mark></td><td>Props interacted with / spawned</td></tr><tr><td><mark style="color:red;"><strong>action_reloads</strong></mark></td><td>Reloading your weapon</td></tr><tr><td><mark style="color:red;"><strong>action_spawnmenu</strong></mark></td><td>"Q" Spawn menu interactions</td></tr><tr><td><mark style="color:red;"><strong>action_steps</strong></mark></td><td>Walking, running</td></tr><tr><td><mark style="color:red;"><strong>action_use</strong></mark></td><td>Using an item with the "E" key. Opening a door, pressing a button, etc.</td></tr><tr><td><mark style="color:red;"><strong>action_voice</strong></mark></td><td>Voice chat</td></tr></tbody></table>
