feat(thought): add thought config and npc-thought socket event type

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
root
2026-03-08 21:02:50 +00:00
parent e17f8c7655
commit e33a253c5b
2 changed files with 15 additions and 0 deletions
+14
View File
@@ -0,0 +1,14 @@
export const thoughtConfig = {
/** Ticks between periodic thought generation cycles (90s at 10 ticks/s) */
periodicIntervalTicks: 900,
/** Minimum ticks between thoughts for any single NPC */
perNpcCooldownTicks: 900,
/** Max NPCs per batched LLM request */
maxBatchSize: 8,
/** Hunger/energy threshold below which a need is "critical" */
needCriticalThreshold: 20,
/** How long emoji shows on screen (ms) */
emojiHoldDurationMs: 4000,
/** Emoji fade in/out duration (ms) */
emojiFadeDurationMs: 500,
};
+1
View File
@@ -197,6 +197,7 @@ export interface ServerEvents {
'narration-event': (data: NarrationEvent) => void;
'narration-update': (data: { id: number; narration: string }) => void;
'narration-history': (data: NarrationEvent[]) => void;
'npc-thought': (data: { entityId: EntityId; text: string; emoji: string }) => void;
}
// Client -> Server events