Files
Genarrative/README.md
高物 ddcb5d5c8c
Some checks failed
CI / verify (push) Has been cancelled
Rework story engine flow and reorganize project docs
2026-04-06 23:19:00 +08:00

119 lines
3.2 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# AI Native Visual RPG
一个以“AI 叙事 + 本地规则 + 像素演出”为核心的视觉 RPG 原型。
当前已经具备这些主要能力:
- 世界与角色选择
- AI 剧情推进与流式对话
- 战斗演出、NPC 战斗、切磋
- NPC 交易、送礼、求助、招募
- 宝藏交互
- 同伴跟随与战斗
- 预设编辑器 / NPC 视觉编辑器 / 行为编辑器
- 自动存档与继续游戏
## 运行
前置条件:
- Node.js
安装依赖:
```bash
npm install
```
准备环境变量:
- 复制 `.env.example``.env.local`
- 填入 `LLM_API_KEY` / `ARK_API_KEY`
- 按需设置 `VITE_LLM_MODEL`
- 如需打印完整 prompt/output可把 `VITE_LLM_DEBUG_LOG` 设为 `true`
启动开发环境:
```bash
npm run dev
```
构建生产包:
```bash
npm run build
```
## 常用检查
类型检查:
```bash
npm run lint
```
编码检查:
```bash
npm run check:encoding
```
内容引用校验:
```bash
npm run check:data
```
编辑器 override 校验:
```bash
npm run check:overrides
```
关键内容 smoke 检查:
```bash
npm run check:smoke
```
一键内容检查:
```bash
npm run check:content
```
## 主要结构
主运行时:
- [src/App.tsx](/E:/Repos/Genarrative/src/App.tsx)
- [src/components/GameShell.tsx](/E:/Repos/Genarrative/src/components/GameShell.tsx)
- [src/hooks/useCombatFlow.ts](/E:/Repos/Genarrative/src/hooks/useCombatFlow.ts)
- [src/hooks/useStoryGeneration.ts](/E:/Repos/Genarrative/src/hooks/useStoryGeneration.ts)
编辑器:
- [src/components/PresetEditor.tsx](/E:/Repos/Genarrative/src/components/PresetEditor.tsx)
- [src/components/NpcVisualEditor.tsx](/E:/Repos/Genarrative/src/components/NpcVisualEditor.tsx)
- [src/components/StateFunctionEditor.tsx](/E:/Repos/Genarrative/src/components/StateFunctionEditor.tsx)
核心数据:
- [src/data/scenePresets.ts](/E:/Repos/Genarrative/src/data/scenePresets.ts)
- [src/data/characterPresets.ts](/E:/Repos/Genarrative/src/data/characterPresets.ts)
- [src/data/monsterPresets.ts](/E:/Repos/Genarrative/src/data/monsterPresets.ts)
- [src/data/npcInteractions.ts](/E:/Repos/Genarrative/src/data/npcInteractions.ts)
- [src/data/treasureInteractions.ts](/E:/Repos/Genarrative/src/data/treasureInteractions.ts)
## 文档入口
- [docs/README.md](/E:/Repos/Genarrative/docs/README.md):文档总入口,按主题分类后的导航页
- [docs/experience/README.md](/E:/Repos/Genarrative/docs/experience/README.md)项目开发经验、UI 交接、历史实现经验
- [docs/audits/README.md](/E:/Repos/Genarrative/docs/audits/README.md):工程审查、文本审计、专项审计
- [docs/planning/README.md](/E:/Repos/Genarrative/docs/planning/README.md):当前阶段优先级与推进顺序
- [docs/design/README.md](/E:/Repos/Genarrative/docs/design/README.md):玩法、关系、物品与对话设计
- [docs/technical/README.md](/E:/Repos/Genarrative/docs/technical/README.md):技术路线、服务端方案、外部产品拆解
- [docs/reference/README.md](/E:/Repos/Genarrative/docs/reference/README.md)Function 与脚本速查
- [docs/prd/](/E:/Repos/Genarrative/docs/prd/)PRD 与阶段计划,原样保留
- [UI_CODING_STANDARD.md](/E:/Repos/Genarrative/UI_CODING_STANDARD.md)UI 资产与编码规范