by Tafe
Be gone old stat structures! This is something i think people should look into!
Name: Owl_attributeClass
Version: 1.0.2
Condition: Complete

Library: Owl_Framework
Link: http://www.byond.com/developer/Tafe/Owl_Framework
version: 0.1 or higher

This library utilizes a system inspired by the skill/stat system from Skyrim. Every unique stat has it's own experience, level and value ++.

Why this library?
If you wish to use a leveling system where each individual skill has it's own functions, this is the way to do it!

Every individual attribute is a class on it's own and is created inside a container(/mob/var/list/stat[])

The class for stats is labeled "attribute". It is a system that can be used in various ways but in this case it is primarely used for a stat system. Every proc you as a user need to worry about is the procs under /mob. You should rarely have to edit or create procs for /attribute

If people find interrest in adding more futures you can suggest it under "future requests" in the hub.

Mob procs
give_stats() //Initiation procedure to add attributes to mob/stats[]
get_attribute_value(attr) //Returns attribute value, arg attr = attribute name
get_attribute_limit(attr) //Returns attribute limit, arg attr = attribute name
set_attribute_value(attr, val) //Set attrubute value, arg attr: attribute name, arg val: value
gain_xp(attr, amount) //arg attr: attribute name, arg amount: xp amount

add_attribute(name, val, level, xp_next,limit_gain_rate,xp_gain_rate)

attribute class
name //name
value //Example would be: level 3 in strength, but hitting 24 damage. 24 is value, and 3 is level
limit //limit is a handle to value. limit = value, as of value should be changed by buffs etc, and limit should not.
level //The attributes level
xp //xp = current xp
xp_next //xp_next = required xp to level up attribute
xp_total //Handle for resetting current xp when leveling
limit_gain_rate //As of which rate said attribute should gain limit. it relates to how fast certain attribute can grow stronger
xp_gain_rate //As of which rate said attribute should gain xp. higher rate resaults in faster leveling
gain_xp(xp) //arg: xp determines how much xp said attribute gains

New( name, value, level, xp_next, limit_gain_rate, xp_gain_rate )

Login to reply.