This is an old revision of the document!
Table of Contents
NQuest Editor is an online tool designed to assist in creating JSON-formatted quest data used by NQuest.
The tool is publicly accessible, but only staff members can apply the generated data to the server. If you are not a staff member but wish to contribute, you can export the JSON data from the tool and send it to a staff member.
Structure & Conventions
Metadata
- Quest ID: Must be unique, lowercase, and written in kebab-case.
Example:west-lake-tour-1
Bad examples:westlaketour1
,West Lake Tour 1
- Category, Tier: Must match one of the predefined category–tier combinations (list TBD).
Quests without a valid combination will not appear in the list. Contact staff if you would like to suggest improvements to the category list. - Quest Points: The reward players receive upon completing the quest. Ensure the points are proportional to the quest’s difficulty.
Steps & Criteria
Each step consists of a criterion that, once fulfilled, advances the quest to the next step.
Optionally, a step may include a failure criterion that aborts the entire quest if triggered. Since this results in the player losing all progress, use failure conditions carefully and ensure they are clearly communicated to the player.
A quest-wide failure criterion may also be defined. This can be used for e.g. preventing teleportation during the entire quest. Note that step-level failure criteria override quest-wide ones, rather than working in parallel.
Each criterion generates an automatic description that is shown to the player. If the default description is insufficient (e.g., when using complex logic), you may provide a custom one with the Descriptor
criterion.
Criteria
RideLineCriterion
True as long as the player is a passenger on a vehicle on a specific transit line.
lineName
: (string) A prefix to match the required transit line's English part. For example, “Line 1” will match both “Line 1” and “Line 1 Phase 1”.
VisitStationCriterion
True as long as the player is in the X-Z bound of a specific transit station.
stationName
: (string) The name or ID of the station.
RideLineToStationCriterion
Triggers once when the player enters the X-Z bound of a specific station, and at that exact moment, is on a specific transit line. That means arriving at the station with other means and then boarding a train will not fullfill this criterion.
For banning the usage of a line using RideLineCriterion
as failure condition is better. Using this will result in player not knowing they have failed until they arrive at the station, which is suboptimal.
lineName
: (string) A prefix to match the required transit line's English part. For example, “Line 1” will match both “Line 1” and “Line 1 Phase 1”.stationName
: (string) The name or ID of the destination station.
RideToStationCriterion
RideLineToStationCriterion
but any line will do. Walking there will not fulfill this criterion.
stationName
: (string) The name or ID of the destination station.
ManualTriggerCriterion
A criterion met when manually triggered by an command block. The associated command is /nquest trigger <player e.g. @p> <trigger_id>
.
id
: (string) A unique identifier for the trigger.description
: (string) A user-facing description for how they can trigger it.
InBoundsCriterion
Checks if the player is within a specific 3D bounding box.
min
: (Vec3d) The minimum coordinate corner {'x', 'y', 'z'}.max
: (Vec3d) The maximum coordinate corner {'x', 'y', 'z'}.description
: (string) A user-facing description for how to enter this area.
OverSpeedCriterion
Checks if the player's speed exceeds a certain limit.
maxSpeedMps
: (number) The maximum allowed speed in meters per second.
TeleportDetectCriterion
A specialized version of OverSpeedCriterion set at 600km/h for quick usage.
Descriptor
Wraps another criterion to provide a custom description, overriding the base criterion's description.
base
: (Criterion) The criterion to wrap.description
: (string) The new description to display to the user.
Criteria for Advanced Logic
ConstantCriterion
A criterion that is always either true or false.
value
: (boolean) The constant boolean value.description
: (string) An explanation for this constant value.
AndCriterion
Combines multiple sub-criteria. It is met only if all sub-criteria are met simultaneously.
criteria
: (Criterion[]) An array of sub-criteria.
OrCriterion
Combines multiple sub-criteria. It is met if at least one sub-criterion is met.
criteria
: (Criterion[]) An array of sub-criteria.
NotCriterion
Inverts the result of its base criterion. It is met if the base criterion is false.
base
: (Criterion) The criterion to negate.description
: (string) A description of the inverted condition.
LatchingCriterion
A stateful wrapper. Once its base criterion becomes true, this criterion “latches” and remains true forever (forever as in during the step), even if the base criterion becomes false later.
base
: (Criterion) The inner criterion to monitor.
RisingEdgeAndConditionCriterion
Triggers at the exact moment a triggerCriteria
transitions from false to true, but only if a conditionCriteria
is also true at that same instant. Generalized verison of RideLineToStationCriterion
and RideToStationCriterion
.
triggerCriteria
: (Criterion) The criterion that acts as the trigger event.conditionCriteria
: (Criterion) The criterion that must be true when the trigger fires.