Implement scene-based chapter quest progression
Some checks failed
CI / verify (push) Has been cancelled

This commit is contained in:
2026-04-08 11:58:47 +08:00
parent 9d2fc9e4b8
commit bd9fdcbe31
170 changed files with 18259 additions and 1049 deletions

View File

@@ -19,6 +19,7 @@ import {
type SkillStyle,
WorldType,
} from './core';
import type { CustomWorldNpcVisual } from './customWorld';
export type SpriteSequenceDefinition =
| {
@@ -142,6 +143,7 @@ export interface Character {
generatedVisualAssetId?: string;
generatedAnimationSetId?: string;
groundOffsetY?: number;
visual?: CustomWorldNpcVisual;
animationMap?: Partial<Record<AnimationState, CharacterAnimationConfig>>;
attributes: LegacyAttributeSet;
attributeProfile?: RoleAttributeProfile;

View File

@@ -206,6 +206,13 @@ export interface CustomWorldSceneConnection {
summary: string;
}
export interface CustomWorldCampScene {
name: string;
description: string;
dangerLevel: string;
imageSrc?: string;
}
export interface CustomWorldLandmark {
id: string;
name: string;
@@ -232,6 +239,7 @@ export interface CustomWorldProfile {
playableNpcs: CustomWorldPlayableNpc[];
storyNpcs: CustomWorldNpc[];
items: CustomWorldItem[];
camp?: CustomWorldCampScene | null;
landmarks: CustomWorldLandmark[];
themePack?: ThemePack | null;
storyGraph?: WorldStoryGraph | null;

View File

@@ -7,6 +7,12 @@ import {
import type {InventoryItem} from './items';
import type {SceneDirective} from './scene';
export interface StoryOptionGoalAffordance {
goalId: string;
relation: 'advance' | 'support' | 'detour';
label: string;
}
export interface StoryOption {
functionId: string;
actionText: string;
@@ -16,6 +22,7 @@ export interface StoryOption {
visuals: SceneDirective;
skillProbabilities?: Record<string, number>;
interaction?: StoryOptionInteraction;
goalAffordance?: StoryOptionGoalAffordance | null;
}
export interface QuestReward {

View File

@@ -114,6 +114,77 @@ export interface SceneNarrativeDirective {
emotionalCadence: SceneNarrativeCadence;
}
export type GoalSourceKind =
| 'quest'
| 'chapter'
| 'journey_beat'
| 'thread_contract'
| 'setpiece'
| 'relationship'
| 'survival';
export type GoalTrack =
| 'main'
| 'side'
| 'relationship'
| 'survival'
| 'exploration';
export type GoalStatus =
| 'teased'
| 'active'
| 'blocked'
| 'ready_to_resolve'
| 'resolved'
| 'archived';
export type GoalLayer =
| 'north_star'
| 'active_contract'
| 'immediate_step'
| 'support';
export interface GoalStackEntry {
id: string;
sourceKind: GoalSourceKind;
sourceId: string;
layer: GoalLayer;
track: GoalTrack;
title: string;
promiseText: string;
whyNow: string;
nextStepText: string;
sceneHint?: string | null;
npcHint?: string | null;
progressLabel?: string | null;
status: GoalStatus;
urgency: 'low' | 'medium' | 'high';
relatedThreadIds: string[];
}
export interface GoalStackState {
northStarGoal: GoalStackEntry | null;
activeGoal: GoalStackEntry | null;
immediateStepGoal: GoalStackEntry | null;
supportGoals: GoalStackEntry[];
}
export interface GoalHandoff {
goalId: string;
title: string;
detail: string;
track: GoalTrack;
}
export interface GoalPulseEvent {
id: string;
goalId: string;
pulseType: 'progress' | 'ready_to_turn_in' | 'resolved' | 'handoff';
title: string;
detail: string;
track: GoalTrack;
}
export interface CarrierStoryFingerprint {
visibleClue: string;
witnessMark: string;