跳到主要内容

Fragment Definition

A collectible fragment piece definition

字段

字段类型默认值描述
fragmentGroupVar<String>—Group this fragment belongs to (e.g. 'elder_runes', 'dragon_scales').
fragmentIdVar<String>—Unique fragment identifier within the group.
displayItemItem—Display item shown in the codex.
customItemOptional<Item>—Custom item the player must pick up to collect this fragment. If empty, uses displayItem.
loreTextString—Lore text revealed about this fragment. Supports color codes.占位符颜色多行
positionOptional<Var<Position>>—Optional world position where this fragment is hidden.
hintString—Hint text to help players find the fragment.占位符颜色
onFoundRef<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.