Active Dungeon Instance Artifact
Active Dungeon Instance Artifact
The persistent state of the runs of the dungeon instances that reference it (runtimeArtifact): for each active run its world, members, loot chests and what each member did among the rooms (the room they are in, the once triggers already spent). It is written through the Typewriter asset manager as a versioned JSON document (see [RunJournal]), so that a tw reload or a Publish, which reload the extension, adopt the runs again instead of dropping them. A server restart still closes the runs: their worlds are gone. The document is the artifact's asset, not its page fields: [instances] is the old format of this entry, which nothing reads or writes any more, and stays so that existing pages keep loading.
字段
| 字段 | 类型 | 默认值 | 描述 | ||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
artifactId | String | — | — | ||||||||||||||||||||
instances | Map<String, ActiveInstanceData> | empty | —
|
| 字段 | 类型 | 默认值 | 描述 |
|---|---|---|---|
worldName | String | — | — |
players | List<String> | empty | — |
remainingSeconds | Int | 0 | — |
lobbyIndex | Int? | — | — |
How to use it
Create one and link it in the runtimeArtifact field of your dungeon instances (several dungeons may share one). It keeps the state of the runs so that a typewriter reload or a Publish adopts them again instead of dropping them: members, world, deadline, room state (a once room stays spent), opened chests and mobs already spawned. A server restart still ends the runs. Without it, runs are kept in a runs.json file of the extension and a warning is logged at load. The instances field is the old format: nothing reads or writes it. See Runs and world isolation.