Character Stats
Adds the attributes and skills of every character, with boosts, ranks and d20 rolls, and the character sheet.
By TeslaCloud Studios
Modules
Hooks hooks
Stats plugin
Shared helpers of the Stats plugin for what the stats of a character do in play.
Migration that adds the
identifier column to the attribute_boosts and attribute_multipliers tables.Attribute class
Database record of one attribute of a character: the attribute ID and the level.
AttributeBase class
Definition of an attribute: its name, description, category and icon, its level range (
min, max, default, and creation_max, the highest level a new character can pick), and the boostable, boost_limited and hidden flags.AttributeBoost class
Database record of a boost to an attribute: the levels it adds (
value), the time at which it expires (expires_at, empty for a boost that stays until it is removed) and the name it was given to be found by (identifier, empty for a boost without one).Attributes library
Registry of the attribute definitions, together with the player methods that read and change the attributes of a player's character.
CreateAttributes object
Migration that creates the tables of the attribute system:
attributes, attribute_multipliers and attribute_boosts.CreateSkills object
Migration that creates the
skills table, which holds the rank of every skill of a character.DropAttributeMultipliers object
Migration that drops the
attribute_multipliers table.hooks (attributes) object
Hook handlers of the attribute registry, registered as
Attributes while this file is included, before the Stats plugin itself is registered, so that they already handle the folders of the Stats plugin.hooks (skills) object
Hook handlers of the skill registry, registered as
Skills while this file is included, before the Stats plugin itself is registered, so that they already handle the folders of the Stats plugin.Player class
Skill class
Database record of one skill of a character: the skill ID and the rank.
SkillBase class
Definition of a skill: its name, description and icon, the ID of the attribute it relies on (
attribute, its key stat), its highest rank (max) and the hidden flag.Skills library
Registry of the skill definitions, together with the player methods that read and change the skills of a player's character.
Commands
Attribute command
The
attribute staff command works with the attributes of the targeted players' characters: /attribute set <player> <attribute> <value> sets the level of an attribute, /attribute boost <player> <attribute> <value> <duration> gives a boost of that many levels for a duration such as 30 (minutes) or 2 hours, or until it is removed with a duration such as perma, /attribute clearboosts <player> [attribute] removes the boosts of one attribute or of all of them, and /attribute list <player> shows the caller every attribute, with its level and boosts, and every skill, with its rank, hidden ones included: a player gets them in a window, the server console as lines of text.CharSetSkill command
The CharSetSkill command sets the rank of a skill of the targeted players' characters:
/charsetskill <player> <skill> <rank>, with the skill typed as its ID.Panels
fl_attribute_row panel
The line of one attribute or skill in the attribute list (
fl_attribute_row).fl_attributes panel
The attribute list (
fl_attributes): a scrollable list with a header for every category of attributes and every key stat of skills, and an fl_attribute_row for every attribute and skill that is visible to the player.The stats stage of character creation (
fl_character_creation_stats): a list of the stats with a counter each, the points that are left to spend, a button that spreads the points at random, and a panel that describes the selected stat, the level picked for it, the bonus the chosen faction adds and what the stat changes in play at that level.fl_character_sheet panel
The character sheet of the tab menu (
fl_character_sheet): the 'character_sheet' Lumen template mounted into the panel, which shows the character of the local player with its level, health, stats and skills and lets the player roll them and spend unspent points.fl_stats_roll_button panel
The roll button of the character sheet (
fl_stats_roll_button), behind the roll_button Lumen element: a Lumen button that shows the last roll of its stat or skill.Templates
character_sheet template
The character sheet of the local player, the first page of the tab menu: a card with two columns.