creating attributes - magemonkeystudio/fabled GitHub Wiki

๐Ÿงฌ Creating Attributes

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.


โž• Creating an Attribute

  1. Click the Attributes tab at the top of the web editor.
  2. Click โž• Add Attribute in the sidebar.
  3. Enter a name (internal key) and a display name.
  4. Choose an icon material and optionally set model data and lore.

๐Ÿ“ฆ Attribute Fields

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

๐Ÿ“ Stat Modifiers

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.

General Modifiers

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+)

1.21+ Generic Attributes

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.

1.21+ Player-Only Attributes

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.

๐ŸŽฏ Skill Component Modifiers

Attributes can scale parts of a skill by modifying specific Mechanic, Target, or Condition components.

Format:

<componentName>-<valueKey>: '<formula>'

Basic Formula Examples

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.


Dynamic Settings

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'


Formula Examples

Flat Change

a*<num>+v where <num> is the amount to change by per attribute point

Percentage Change

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.

โœ๏ธ Formula Variables

These variables can be used in any scaling formula:

  • a โ€” Attribute value
  • v โ€” Skill level
  • c โ€” Player class level
  • t โ€” Targetโ€™s class level

๐Ÿ’ฌ Placeholders in Icon Lore

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

๐Ÿ’พ Saving & Exporting

When youโ€™re finished configuring the attribute:

  1. Click ๐Ÿ’พ Save to export the current attribute.
  2. Or use the Backup All button to download all attributes, classes, and skills to your device.
  3. Place the attributes.yml file in:
    /plugins/Fabled/
    
  4. Reload with:
    /fabled reload
    

๐Ÿ”— Related Pages

โš ๏ธ **GitHub.com Fallback** โš ๏ธ