🟪Achievements

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

▸ Location

lua\achievements\*

▸ About

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 General 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 TTT gamemode; then the TTT folder and General folders will load.

▸ Achievement Structure

All achievements typically have the same structure:

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:

▸ Achievement Types

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 stat.

XTASK.stat                  = 'action_damageinf'

The following is a list of achievement types you can choose from. You can find this list also in lua\modules\xtask\cfg\sh_cfg_actions.lua

Last updated