Attributes
Attributes that define various RPG stats of a character. Attributes allow characters to be more defined within an RPG context.
Functions
nut.attribs.loadFromDir (directory)
nut.attribs.loadFromDir
Internal
This is used internally - although you're able to use it you probably shouldn't.
Plugin function
This is defined and used within the Attributes plugin. As such, its functionality might differ in different schemas, or be unavailable.
Load attribute files from a directory.
Parameters:
string directory Path of the directory containing attribute filesnut.attribs.setup (client)
nut.attribs.setup
Internal
This is used internally - although you're able to use it you probably shouldn't.
Plugin function
This is defined and used within the Attributes plugin. As such, its functionality might differ in different schemas, or be unavailable.
Run onSetup functions of each relevant attribute on a client.
Parameters:
Client client Target player entityCharacter methods
charMeta:updateAttrib (key, value)
charMeta:updateAttrib
Plugin function
This is defined and used within the Attributes plugin. As such, its functionality might differ in different schemas, or be unavailable.
adds a value to a character's attribute. The new value cannot exceed the attributes maxValue or the maxAttribs config
Parameters:
string key the id of attributenumber value the value to be added
charMeta:setAttrib (key, value)
charMeta:setAttrib
Plugin function
This is defined and used within the Attributes plugin. As such, its functionality might differ in different schemas, or be unavailable.
sets a character's attribute value.
Parameters:
string key the id of attributenumber value the value to be added
charMeta:addBoost (boostID, attribID, boostAmount)
charMeta:addBoost
Plugin function
This is defined and used within the Attributes plugin. As such, its functionality might differ in different schemas, or be unavailable.
adds a boost to a character's attribute. The boost acts as a (semi-)temporary change to the attribute value without changing the base value.
Parameters:
string boostID ID of the boost. Used to easily edit/remove the boost laterstring attribID the id of attribute
number boostAmount the value to be added
charMeta:removeBoost (boostID, attribID)
charMeta:removeBoost
Plugin function
This is defined and used within the Attributes plugin. As such, its functionality might differ in different schemas, or be unavailable.
removes a boost from a character's attribute.
Parameters:
string boostID ID of the booststring attribID the id of attribute
charMeta:getBoost (attribID)
charMeta:getBoost
Plugin function
This is defined and used within the Attributes plugin. As such, its functionality might differ in different schemas, or be unavailable.
Get all applied boosts to a character's attribute.
Parameters:
string attribID ID of the attributeReturns:
table A list of boosts applied to the character's attributecharMeta:getBoosts ()
charMeta:getBoosts
Plugin function
This is defined and used within the Attributes plugin. As such, its functionality might differ in different schemas, or be unavailable.
Get all boosts applied to a character, across all attributes.
Returns:
table A list of all boosts applied to a charactercharMeta:getAttrib (key, default)
charMeta:getAttrib
Plugin function
This is defined and used within the Attributes plugin. As such, its functionality might differ in different schemas, or be unavailable.
Get a character's current attribute value. Includes applied boosts.
Parameters:
string key the ID of the attributenumber default the default value if the character does not have an attribute value