creating attributes - magemonkeystudio/fabled GitHub Wiki
Attributes define player stats like Strength, Dexterity, Vitality, etc. These values can influence player health, mana, regeneration, skill effects, movement speed, damage, and more.
Attributes are created and managed using the Fabled Web Editor, which allows you to visually configure scaling, stat modifiers, and skill integration โ no YAML editing required.
- Click the Attributes tab at the top of the web editor.
- Click โ Add Attribute in the sidebar.
- Enter a name (internal key) and a display name.
- Choose an icon material and optionally set model data and lore.
Field | Description |
---|---|
Name | Internal key used in logic and placeholders |
Display Name | What players see in menus |
Max | Maximum number of points the player can invest |
Base Cost | Skill point cost for level 1 |
Cost Modifier | How much the cost increases per level |
Icon | Material and optional lore/model used for display |
You must select one or more Stat Modifiers in the editor to apply attribute effects globally or passively. These directly modify a player's statistics using a formula you define.
Stat Modifier | Description |
---|---|
health |
Modifies the player's maximum health. |
mana |
Modifies the player's maximum mana. |
mana-regen |
Modifies the rate at which the player regenerates mana. |
cooldown |
Reduces the cooldown time for skills. A value of 0.1 represents a 10% reduction. |
exp |
Increases the amount of class experience gained from all sources. |
move-speed |
Modifies the player's movement speed. |
attack-speed |
Modifies the player's attack speed (weapon recharge time). (1.9+) |
armor |
Modifies the player's base armor points for damage mitigation. |
armor-toughness |
Modifies the player's armor toughness, which reduces damage from high-damage attacks. (1.9+) |
melee-damage |
Increases damage dealt by melee attacks. |
melee-defense |
Reduces damage taken from melee attacks. |
physical-damage |
Increases damage dealt by physical attacks (both melee and projectile). |
physical-defense |
Reduces damage taken from physical attacks (both melee and projectile). |
projectile-damage |
Increases damage dealt by projectile attacks. |
projectile-defense |
Reduces damage taken from projectile attacks. |
skill-damage |
Increases damage dealt by all skills. |
skill-defense |
Reduces damage taken from all skills. |
skill-damage-<type> |
Increases damage for skills using Fabled's built-in elemental system. Replace <type> with a custom damage type (e.g., Fire , Ice ). This is distinct from the rpgdamage modifier. |
skill-defense-<type> |
Reduces damage from skills using Fabled's built-in elemental system. Replace <type> with a custom defense type (e.g., Magic , Poison ). This is distinct from the rpgdefense modifier. |
defense-<damagecause> |
Reduces damage from a specific vanilla Minecraft damage source. Replace <damagecause> with a value from the official Spigot DamageCause page (e.g., defense-fall ). |
rpgdamage-<type> |
Increases RPG damage of a specific type. (Requires Divinity) |
rpgdefense-<type> |
Increases RPG defense against a specific type. (Requires Divinity) |
hunger |
Modifies how long the hunger bar lasts. |
hunger-heal |
Modifies the amount of health regained while satiated. |
knockback-resist |
Modifies the chance to resist knockback. A value of 1.0 is 100% resistance. (1.9+)
|
luck |
Modifies the player's luck, affecting loot tables. (1.9+) |
These modifiers correspond to the vanilla Minecraft attribute system introduced in version 1.21.
Stat Modifier | Description |
---|---|
attack-damage |
Modifies the base damage of all attacks. |
attack-knockback |
Modifies the amount of knockback dealt by attacks. |
absorption |
Modifies the maximum amount of absorption hearts a player can have. |
scale |
Modifies the entity's visual size. |
step-height |
Modifies the maximum height an entity can step up without jumping. |
jump-strength |
Modifies the height of an entity's jump. |
gravity |
Modifies the gravitational force applied to the entity. |
safe-fall-distance |
Modifies the fall distance from which an entity can land without taking damage. |
fall-damage-multiplier |
Modifies the amount of damage taken from falling. |
burning-time |
Modifies the duration an entity stays on fire. |
explosion-knockback-resistance |
Modifies resistance to knockback from explosions. |
water-movement-efficiency |
Modifies movement speed efficiency while in water. |
movement-efficiency |
Modifies movement speed efficiency on land. |
oxygen-bonus |
Modifies how long an entity can stay underwater before drowning. |
These are special attributes from the 1.21 update that only apply to players.
Stat Modifier | Description |
---|---|
block-interaction-range |
Modifies the player's reach for interacting with blocks. |
entity-interaction-range |
Modifies the player's reach for interacting with entities. |
block-break-speed |
Modifies how fast the player can mine or break blocks. |
mining-efficiency |
Alias for block-break-speed . |
submerged-mining-speed |
Modifies mining speed while the player is submerged in water. |
sneaking-speed |
Modifies the player's movement speed while sneaking. |
sweeping-damage-ratio |
Modifies the damage dealt by sweeping sword attacks. |
Attributes can scale parts of a skill by modifying specific Mechanic, Target, or Condition components.
<componentName>-<valueKey>: '<formula>'
This section shows common ways to scale skill component values. In these formulas, v
is the component's value from the skill's current level, and a
is the attribute value.
Attributes can modify the settings for dynamic skills. They are organized by their category (Mechanic, Target, or Condition) and have the following format:
<componentName>-<valueKey>: '<formula>'
An example which raises damage by 2% per attribute point:
Damage-value: 'a*0.02+1*v'
And another which causes more particle projectiles to be fired out:
Particle Projectile-amount: 'a*0.5+v'
You can add conditions to affect certain samples as well. Here's an example that only changes damage when the component has an Icon Key set to "example":
Damage-value: 'a*0.05+1*v:icon-key=example'
You can add multiple statements as well to target different groups. This example increases damage by 5% if the Icon Key is "example", and 2% for all other skills:
Damage-value: 'a*0.05+1*v:icon-key=example|a*0.02+1*v'
a*<num>+v
where <num> is the amount to change by per attribute point
v(a*<num>+1)
where <num> is the pertentage as a decimal (e.g. 0.01 for 1%)
For more advanced techniques and a full list of available mathematical functions, see the Formulas & Scaling page.
These variables can be used in any scaling formula:
-
a
โ Attribute value -
v
โ Skill level -
c
โ Player class level -
t
โ Targetโs class level
Use the following placeholders in the attributeโs icon lore to show dynamic info:
Placeholder | Description |
---|---|
{amount} |
Stage value for invested points only |
{total} |
Stage value for invested + class bonuses |
{max} |
Max value that can be invested |
{cost} |
Cost to upgrade to next level |
{invested} |
Total attribute points spent |
{ap} |
Current unspent attribute points |
When youโre finished configuring the attribute:
- Click ๐พ Save to export the current attribute.
- Or use the Backup All button to download all attributes, classes, and skills to your device.
- Place the
attributes.yml
file in:/plugins/Fabled/
- Reload with:
/fabled reload