Перейти к основному содержимому

craftengine_clear_quest_state

Type: action entry Exact entry ID: craftengine_clear_quest_state

Role

This TypeWriter entry is registered in code with the exact display name Drop a player's own state for a quest zone.

It puts the world back in front of the player and forgets what was recorded for them. This is what an abandoned or completed quest calls.

Leaving a zone already restores the world view — it keeps the state so the player finds it again on their way back. This action drops it for good.

Stashed items are handed back before the record goes, so clearing a zone never destroys what a player was carrying.

Verified fields

Exact fieldTypeField guidance
artifactRef<QuestStateArtifactEntry>Where this zone's state is stored.
zoneIdStringThe zone to clear, as named on the zone audience. Empty clears every zone of this artifact for the player.
groupRef<GroupEntry>The group the zone shares its state with, if any. Must match the zone audience. In a grouped zone, the group's view goes with it, for every member.
returnStashedItemsBooleanHand stashed items back before dropping the record.
inventoryModeQuestInventoryModeHow the stashed items were taken, so they come back the same way.

In practice

Reset a puzzle room so it can be solved again, or wipe a chapter's progress when the quest is abandoned.

Leave zoneId empty to clear every zone filed under that artifact for the triggering player. That is the natural shape for "quest abandoned" when the chapter's zones all share one artifact.

inventoryMode must match what the zone used. A FULL_SWAP stash returned as FILTERED still comes back, but wherever there is room rather than slot for slot.

Common issue

If craftengine_clear_quest_state 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.

Clearing with returnStashedItems off leaves the items in storage, not with the player. They are dropped from the record along with everything else. Only turn it off when the quest is meant to consume what it took.

An inventory with no room gets the difference on the ground. Items that cannot fit are dropped at the player's feet rather than discarded.

Clearing every zone needs an empty zoneId, not a wildcard. Any non-empty value is treated as a literal zone name.

Technical reference

Source moduleSource file
TypeWriter-CraftEngineExtensionqueststate/QuestStateActions.kt
TypeWriter-CraftEngineExtensionqueststate/QuestInventory.kt