MEtrics, Skills and Achievements

Basics.

MESKA is built around two concepts: skills and achievements. Achievements have requirements, and skills have metrics.

Tracking Metrics

Metrics need an attached skill and config entry.

Add meska.conf.skills."<skill>"."<metric name>". For a generic metric, this can just be set to

lvl = 0,
exp = 0,
highlight = false,
requirements = {}

but for a skill, see fishing as an example.

Add a hook, which calls meska.metrics.track(ply, "<skill>", "<metric name>", "<value>") Value can be +, -, etc etc.

As an example for the setting name metric.

hook.Add("PlayerSetIgname", "MESKA_METRICS_TRACK_PLAYER_IGNAME", function(ply)
    meska.metrics.track(ply, "general", "setname", "+1")
end)