How to Make a Stat
A stat is a base attribute at the core of EcoSkills, like vanilla attributes but visible to the player. Its effects apply continuously based on the stat's level, which skills raise as rewards. This page takes you from an empty file to a working stat, then breaks down every part of the config.
Quick start
Open the
/plugins/EcoSkills/stats/folder.Copy
_example.ymland rename the copy to your stat's ID, e.g.saturation.yml. The file name is the ID.Set the
name,placeholder, anddescription.Add the
effectsthat make the stat do something.Run
/ecoskills reload.Run
/ecoskills give <player> saturation 5, then/statsto confirm the stat shows and its effect applies.
Naming and IDs
The file name without .yml is the stat's ID. That ID is what you use in commands, rewards, and placeholders. For item textures and icons, see the Item Lookup System.
The structure of a stat
| Part | What it controls |
|---|---|
| Info | The name, description, and value shown to players |
| GUI | How the stat appears in the /stats menu |
| Effects | What the stat does while levelled |
| Conditions | Requirements for the effects to apply |
# === Info: name, value, description ===
name: "&#f5aa42🍖 Saturation" # Display name shown to players
placeholder: "%level% / 3" # Value shown in the description; supports expressions, e.g. %level% * 2
description: "&8Lose &a%placeholder%%&8 less hunger" # Description shown in lore and messages
# === GUI: how it appears in /stats ===
gui:
enabled: false # Optional; whether the stat shows in the /stats menu
icon: player_head texture:eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvZDMzZGRiOTJjYjZiM2E3OTI4MGI4YmRjZWQ4OTc2YWVhYjEzYTRiZmZlYWVmMmQ0NmQ4MjhiZDkxZGVlMGYzZSJ9fX0= # Icon item; see the Item Lookup System for the format
position: # Slot in the /stats menu
row: 5
column: 5
# === Effects: what the stat does ===
effects:
- id: hunger_multiplier
args:
multiplier: "1 - (%level% / 300)" # %level% is the stat level
# === Conditions: requirements for the effects ===
conditions: [ ] # Conditions that must pass for the effects to apply
Info
The display fields and the value players see for the stat.
name: "&#f5aa42🍖 Saturation" # Display name shown to players
placeholder: "%level% / 3" # Value shown in the description; supports expressions, e.g. %level% * 2
description: "&8Lose &a%placeholder%%&8 less hunger" # Description shown in lore and messages
GUI
How the stat appears in the /stats menu.
gui:
enabled: false # Optional; whether the stat shows in the /stats menu
icon: player_head texture:"..." # Icon item; see the Item Lookup System for the format
position:
row: 5
column: 5
Effects
What the stat does while the player has it levelled. Use %level% to scale with the stat level.
effects:
- id: hunger_multiplier
args:
multiplier: "1 - (%level% / 300)" # %level% is the stat level
Conditions
Conditions that must pass for the stat's effects to apply. You can use %level% here too.
conditions: [ ] # Empty means the effects always apply
Internal placeholders
| Placeholder | Value |
|---|---|
%level% | The player's stat level, for scaling effects |
%level_numeral% | The player's stat level as a Roman numeral |
%level_x% | The stat level offset by a value, e.g. %level_-1% is the current level minus 1 |
%level_x_numeral% | The offset stat level as a Roman numeral |
Where to go next
Default stats: the shipped stat configs are on GitHub; community configs are on lrcdb.
Grant stats from skills: hand stats out as level rewards in How to make a Skill.
Configure effects: the effects system is covered in Configuring an Effect.