pub struct Quest {
pub id: QuestId,
pub trigger: Trigger,
pub objectives: Vec<Objective>,
pub on_objective_complete: BTreeMap<ObjectiveId, Vec<QuestEffect>>,
pub on_complete: Vec<QuestEffect>,
pub cast: BTreeMap<NpcId, CastEntry>,
pub happening: Option<Happening>,
}Expand description
One expanded quest.
Fields§
§id: QuestIdQuest id (matches a stage-4 planned quest).
trigger: TriggerWhat starts the quest.
objectives: Vec<Objective>Ordered objectives (intra-quest DAG via after).
on_objective_complete: BTreeMap<ObjectiveId, Vec<QuestEffect>>Effects fired when a given objective completes.
on_complete: Vec<QuestEffect>Effects fired when the whole quest completes.
cast: BTreeMap<NpcId, CastEntry>The cast ledger (DSL v0.7, spec-0020): for every stage-2 NPC that is live during this quest — spawned and not explicitly removed — where it stands, what it is doing, and what its right-click offers for this quest’s duration.
The ledger exists because an NPC’s dialogue used to be one tree for the
whole campaign: after the climactic escape a crew member still offered
“Tell me what he is.” — a premise question absurd once the story moved on.
Declaring the scene per quest makes the compiler able to check it
(DW0460–DW0467) and makes the declaration itself the gate: the
emitted right-click shows the root this quest declares, so a stale root
retires because the ledger says so, not because an author remembered a
flag.
Every NPC live during the quest owes an entry (DW0460).
happening: Option<Happening>What this quest does to the story (DSL v0.8, spec-0025; required at 0.8.0,
DW0481).
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Quest
impl<'de> Deserialize<'de> for Quest
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl JsonSchema for Quest
impl JsonSchema for Quest
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
$ref keyword. Read more