Refine NPC interactions and runtime item generation

This commit is contained in:
2026-04-05 17:13:07 +08:00
parent c49c64896a
commit 89cecda7da
58 changed files with 4199 additions and 1562 deletions

View File

@@ -10,16 +10,19 @@ import {
} from './core';
import type {ItemStatProfile, ItemUseProfile} from './items';
export interface CustomWorldPlayableNpc {
export interface CustomWorldRoleProfile {
id: string;
name: string;
title: string;
role: string;
description: string;
backstory: string;
personality: string;
motivation: string;
combatStyle: string;
initialAffinity: number;
relationshipHooks: string[];
tags: string[];
templateCharacterId?: string;
attributeProfile?: RoleAttributeProfile;
}
@@ -46,16 +49,13 @@ export interface CustomWorldNpcVisual {
offHand?: CustomWorldNpcVisualGear | null;
}
export interface CustomWorldNpc {
id: string;
name: string;
role: string;
description: string;
motivation: string;
relationshipHooks: string[];
export interface CustomWorldPlayableNpc extends CustomWorldRoleProfile {
templateCharacterId?: string;
}
export interface CustomWorldNpc extends CustomWorldRoleProfile {
imageSrc?: string;
visual?: CustomWorldNpcVisual;
attributeProfile?: RoleAttributeProfile;
}
export interface CustomWorldItem {

View File

@@ -22,6 +22,7 @@ export interface NpcPersistentState {
chattedCount: number;
giftsGiven: number;
inventory: InventoryItem[];
tradeStockSignature?: string | null;
recruited: boolean;
revealedFacts?: string[];
knownAttributeRumors?: string[];

View File

@@ -22,6 +22,7 @@ export interface QuestReward {
affinityBonus: number;
currency: number;
items: InventoryItem[];
storyHint?: string;
intel?: {
codexEntry?: string;
rumorText?: string;