メインコンテンツまでスキップ

craftengine_quest_state_artifact

Type: artifact entry Exact entry ID: craftengine_quest_state_artifact

Role

This TypeWriter entry is registered in code with the exact display name Artifact storing per-player quest block and item state.

It is where the per-player deviations of one or more quest zones are kept: which blocks each player has broken or changed, and which items were taken from them at the exit.

One artifact holds every player and every zone that points at it, so several zones of the same quest can share a single artifact and be cleared together by one craftengine_clear_quest_state. Zones of unrelated quests are better off with their own: the whole document is rewritten on each save, and a document shared by everything is a document rewritten by everything.

Verified fields

Exact fieldTypeField guidance
artifactIdStringUnique ID generated by Typewriter for this artifact. SHOULD NOT BE CHANGED!

In practice

Create the artifact, then point craftengine_quest_zone_audience, craftengine_set_quest_block and craftengine_clear_quest_state at it. All three must name the same artifact and the same zoneId for a deviation written by one to be read by the others.

Let TypeWriter generate artifactId and leave it alone. Changing it does not rename the stored document, it points the entry at a different one — every player's recorded progress disappears from view without an error.

Common issue

If craftengine_quest_state_artifact is not available, check the installed extension version, the selected TypeWriter category, the exact identifier, and the extension dependencies. An entry from a Soon extension must not be used as an available feature.

A zone that reads nothing back is usually a mismatched zoneId. The audience defaults it to its own entry id when left empty; an action pointing at the same artifact with a hand-written zoneId will file its deviation somewhere else and neither will report a problem.

Writes are grouped, not immediate. State is flushed a couple of seconds after the last change, and forced out when a player leaves a zone or the server shuts down. A server killed rather than stopped can lose the last few seconds of a session.

Technical reference

Source moduleSource file
TypeWriter-CraftEngineExtensionqueststate/QuestStateArtifactEntry.kt
TypeWriter-CraftEngineExtensionqueststate/QuestStateService.kt