Fragment Definition
A collectible fragment piece definition
Campos
| Campo | Tipo | Padrão | Descrição |
|---|---|---|---|
fragmentGroup | Var<String> | — | Group this fragment belongs to (e.g. 'elder_runes', 'dragon_scales'). |
fragmentId | Var<String> | — | Unique fragment identifier within the group. |
displayItem | Item | — | Display item shown in the codex. |
customItem | Optional<Item> | — | Custom item the player must pick up to collect this fragment. If empty, uses displayItem. |
loreText | String | — | Lore text revealed about this fragment. Supports color codes.PlaceholdersCoresVárias linhas |
position | Optional<Var<Position>> | — | Optional world position where this fragment is hidden. |
hint | String | — | Hint text to help players find the fragment.PlaceholdersCores |
onFound | Ref<TriggerableEntry> | — | Sequence triggered when this fragment is collected. |
How to use it
The fragment is collected when the player picks up an item matching customItem (or displayItem when empty, then the defaultFragmentItem of the Fragment Collection Config). A fragment with no usable item at all is never collected. One item is consumed, the fragment is saved with its fragmentGroup and fragmentId, and onFound is triggered. Give the item to players with a loot, an action or a drop. loreText, hint and position are descriptive fields and are not used by the pickup logic.