Effect icons and tooltip !
This commit is contained in:
@@ -17,18 +17,20 @@ game's effects are defined this way, in `mods/bworld/effects`.
|
||||
"effect": {
|
||||
"id": "copper_tools:swiftness",
|
||||
"category": "beneficial",
|
||||
"icon": "copper_tools:swiftness",
|
||||
"modifiers": [{ "attribute": "bworld:movement_speed", "amount": 0.1, "operation": "add_multiplied_total" }]
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
| Field | Required | What it does |
|
||||
| ------------ | -------- | ---------------------------------------------------------------------------------------------- |
|
||||
| `id` | yes | The effect's id, in the mod's [namespace](../concepts/registries.md#identifiers). |
|
||||
| `category` | no | `"beneficial"`, `"harmful"` or `"neutral"` (the default), like NeoForge's `MobEffectCategory`. |
|
||||
| `instant` | no | `true` makes it happen once when added instead of lasting, like `bworld:instant_health`. |
|
||||
| `modifiers` | no | [Attribute modifiers](players.md#attributes) while it's on. Each level adds `amount` again. |
|
||||
| `components` | no | What it does over time, see below. |
|
||||
| Field | Required | What it does |
|
||||
| ------------ | -------- | ----------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `id` | yes | The effect's id, in the mod's [namespace](../concepts/registries.md#identifiers). |
|
||||
| `category` | no | `"beneficial"`, `"harmful"` or `"neutral"` (the default), like NeoForge's `MobEffectCategory`. |
|
||||
| `instant` | no | `true` makes it happen once when added instead of lasting, like `bworld:instant_health`. |
|
||||
| `icon` | no | A texture, shown at the top of the inventory screen while the player has it, with its name, level and time left on hover. 16×16 like an item's. |
|
||||
| `modifiers` | no | [Attribute modifiers](players.md#attributes) while it's on. Each level adds `amount` again. |
|
||||
| `components` | no | What it does over time, see below. |
|
||||
|
||||
The modifiers' `operation` is `"add_value"`, `"add_multiplied_base"` or `"add_multiplied_total"`. They come off when the
|
||||
effect ends.
|
||||
|
||||
Reference in New Issue
Block a user