56 Commits

Author SHA1 Message Date
bridge
a7ab18ea1c fix: package bug 2026-01-19 21:26:09 +08:00
bridge
bf13cdf2d2 fix: incorrect relationship for new avatar 2026-01-19 21:14:20 +08:00
Zihao Xu
31d0c060e8 feat: enhance README with activity graph and contributor avatars (#65) 2026-01-19 20:50:33 +08:00
Zihao Xu
7f31d9884f test: add comprehensive tests for ai.py (13% -> 98% coverage) (#64)
- Test LLM response parsing (list and dict formats)
- Test null params conversion to empty dict
- Test invalid format handling and skipping
- Test emotion update logic with all emotion types
- Test fallback to CALM on invalid/missing emotion
- Test batch avatar processing
- Test AI.decide wrapper returns NULL_EVENT
- Test thinking field variants (avatar_thinking vs thinking)
- Add testing strategy documentation to test file

Closes #63
2026-01-19 20:49:24 +08:00
Zihao Xu
665d94addb test(web): add example frontend tests (#61)
* test(web): setup frontend test infrastructure

- Add testing dependencies (vitest, vue-test-utils, testing-library, jsdom, msw)
- Create vitest.config.ts with jsdom environment and coverage settings
- Create setup.ts with Pinia initialization and fake timers
- Add test scripts to package.json (test, test:run, test:coverage)

Closes #56, closes #57

* test(web): add example frontend tests

- Add system store tests (initial state, getters, togglePause)
- Add eventHelper utility tests (processNewEvents, mergeAndSortEvents, avatarIdToColor, highlightAvatarNames)

Closes #59
2026-01-19 20:48:43 +08:00
Zihao Xu
8bf5f64bc3 test(web): setup frontend test infrastructure (#60)
- Add testing dependencies (vitest, vue-test-utils, testing-library, jsdom, msw)
- Create vitest.config.ts with jsdom environment and coverage settings
- Create setup.ts with Pinia initialization and fake timers
- Add test scripts to package.json (test, test:run, test:coverage)

Closes #56, closes #57
2026-01-19 20:48:28 +08:00
Zihao Xu
9677055faa fix: use sect_id instead of sect in fortune technique filter (#55)
PR #32 changed Technique.sect (str) to Technique.sect_id (int), but
fortune.py was not updated. This caused AttributeError when fortune
event triggered and tried to access t.sect.

Error: 'Technique' object has no attribute 'sect'
2026-01-19 20:48:05 +08:00
Zihao Xu
8f7c2cfa66 docs: add Codecov coverage badge to README (#54)
Closes #49
2026-01-19 20:47:49 +08:00
Zihao Xu
ee2964e151 ci: add coverage reporting, 60% threshold, and Codecov integration (#53)
- Add pytest-cov to CI dependencies
- Generate coverage report (xml + terminal)
- Set minimum coverage threshold to 60% (current: 63%, target: 90%)
- Upload coverage to Codecov
- Add 10 minute timeout

Closes #46, closes #47, closes #48
2026-01-19 20:47:26 +08:00
Zihao Xu
daa7a20679 test: add fixed_random_seed fixture with autouse=True (#52)
Ensures all tests have deterministic random behavior by setting
random.seed(42) before each test. This prevents flaky tests caused
by random number generation.

Closes #44
2026-01-19 20:46:59 +08:00
Zihao Xu
ed2d8720aa chore: configure coverage settings in pyproject.toml (#51)
- Add [tool.coverage.run] with source and branch coverage
- Add [tool.coverage.report] with exclude patterns and show_missing

Closes #43
2026-01-19 20:46:42 +08:00
Zihao Xu
5a82a186a7 chore: add pytest-cov to requirements (#50)
Closes #42
2026-01-19 20:46:09 +08:00
Zihao Xu
1a34b7724b feat(web): make avatar names in event log clickable (#41)
When avatars overlap (e.g., during sparring, talking, dual cultivation),
it's hard to click on them directly. This adds the ability to click on
colored avatar names in the event panel to open their detail view.

- Modify highlightAvatarNames to include data-avatar-id attribute
- Add click event delegation in EventPanel
- Add hover styles for clickable names
2026-01-19 20:45:44 +08:00
bridge
2e04b718e8 update: splash 2026-01-18 21:49:13 +08:00
bridge
a075c1cc59 update: history prompt 2026-01-18 21:44:47 +08:00
bridge
bc6725b302 update: version 2026-01-18 17:25:27 +08:00
4thfever
6185d314af refactor: remove region_names dict, use regions traversal instead (#40)
The region_names dictionary was a redundant index that needed manual
sync when HistoryManager modified region names. This caused bugs where
resolve_query couldn't find regions by their new (history-modified) names.

Instead of maintaining two data structures (regions[id] and region_names[name]),
we now only use regions[id] as the single source of truth. The _resolve_region
function iterates over regions.values() to find matches by name.

This approach:
- Eliminates the sync bug entirely
- Simplifies the codebase
- Has negligible performance impact (region count is small)

Co-authored-by: Zihao Xu <xzhseh@gmail.com>
2026-01-18 17:13:28 +08:00
Zihao Xu
b68403e601 fix: mock StoryTeller in mock_llm_managers to prevent flaky test (#36)
The test_passive_update_loop test was flaky because when misfortune
randomly triggers during sim.step(), it calls StoryTeller.tell_story
which wasn't mocked, causing real LLM API calls to fail in CI.

Added StoryTeller.tell_story to the mock_llm_managers fixture.
2026-01-18 17:00:42 +08:00
Zihao Xu
ce64c6b048 fix(web): decouple manual pause state from system pause behavior (#37)
The pause indicator was showing 'paused' while the game was still running
because isManualPaused was being modified by both user actions (clicking
pause button) and system actions (opening menu).

Changes:
- systemStore: pause()/resume() no longer modify isManualPaused, only
  togglePause() does (with optimistic update + rollback on failure)
- useGameControl: consolidate 3 overlapping watches into 1 clean watch
  that only handles menu open/close without polluting manual pause state
- App.vue: explicitly call resumeGame() API when game initializes
2026-01-18 16:59:44 +08:00
bridge
47ad330b35 feat: data reload system 2026-01-18 16:53:24 +08:00
bridge
094a8fdd00 feat: data reload system 2026-01-18 16:47:54 +08:00
bridge
eb2c715069 feat: data reload system 2026-01-18 16:37:08 +08:00
bridge
bd563b10f4 feat: add splash mp4 video 2026-01-18 16:11:34 +08:00
Zihao Xu
e3bf36bcd4 test: add tests for Avatar._init_known_regions (#34)
Verify that:
1. Avatar without sect knows current location's region
2. Avatar with sect knows their sect headquarters
3. Avatar without sect does not automatically know sect regions
4. Avatar only knows their own sect's headquarters, not others
2026-01-18 15:31:41 +08:00
Zihao Xu
7edae9188b fix(misc): CSV column name mismatches in data loading (#32)
* fix: CSV column name mismatches in data loading

- sect.py: Fix headquarter_name/headquarter_desc -> name/desc when reading sect_region.csv
- sect.py: Move sid initialization before technique lookup to fix unbound variable bug
- technique.py: Change sect (name) to sect_id (int) to match technique.csv column
- elixir.py: Remove redundant get_int(row, "id") that reads non-existent column

These fixes ensure:
1. Sect headquarters display correct location names (e.g., "大千光极城" instead of "不夜城")
2. Sect techniques are correctly associated and displayed
3. Technique sect restrictions work properly

* fix: update main.py to use sect_id, add CSV loading tests

- main.py: Change technique.sect to technique.sect_id in API response
- Add tests/test_csv_loading.py to verify CSV column names match code

* test: add API test for /api/meta/game_data endpoint

Verify that techniques in API response use sect_id field (not sect)

* fix: add None check for hq_region in AvatarFactory

Remove redundant code that adds sect headquarters to known_regions.
This logic is already handled by Avatar._init_known_regions() which
uses sect_id matching (more reliable than name-based lookup).

The removed code was causing a flaky test (~1% failure rate) because
resolve_query returns None in test environments with simplified maps.
2026-01-18 15:31:15 +08:00
bridge
0acf72a313 fix: remove tmp 2026-01-18 14:42:45 +08:00
bridge
4fea4b6a9b update: contributing md 2026-01-15 09:35:34 +08:00
bridge
e5ed418949 update: readme 2026-01-15 09:01:02 +08:00
bridge
9b294ccba3 fix: game control bug 2026-01-15 08:55:01 +08:00
bridge
e900c3e098 fix pytest 2026-01-14 17:17:21 +08:00
4thfever
df8b1b9433 Refactor/event (#31)
重构事件机制和部分拍卖会机制
2026-01-14 16:58:50 +08:00
4thfever
63fc2f828e Feat/auction (#30)
Add gathering events, in which multiple avatars participate
Add auction event

Closes #24
2026-01-14 02:33:13 +08:00
4thfever
0d34b27fff Feat: Add splash layer (#29)
Add splash layer, support game start, settings, exit
Modify settings layer, add "go back to splash" and "exit"
Add character threshold for history input
Closes #28
2026-01-13 22:00:23 +08:00
bridge
224e3e76f0 fix: pytest llm error only existed in github online CI 2026-01-13 00:08:42 +08:00
4thfever
bb2e010930 refactor readme (#26)
refactor readme, simulate style of
https://github.com/vladelaina/Catime
Closes #23
2026-01-13 00:03:09 +08:00
4thfever
95e1f11502 Refactor/history (#25)
add multi process history modification
2026-01-12 23:25:53 +08:00
4thfever
176fa95425 Merge pull request #21 from AI-Cultivation/feat/history
Feat/history
2026-01-12 00:40:56 +08:00
bridge
2caa5586be refactor history archi 2026-01-12 00:36:10 +08:00
bridge
287f9d2ae4 update history pytest 2026-01-12 00:20:15 +08:00
bridge
57cf5ca51a add history class 2026-01-11 23:53:26 +08:00
bridge
5241f70ef3 refactor item ids 2026-01-11 23:12:48 +08:00
bridge
fa4c0340fd fix pytest 2026-01-11 22:48:05 +08:00
bridge
19b9ddd8ba refactor frontend 2026-01-11 22:44:05 +08:00
bridge
879a3c0d1f refactor frontend (not done) 2026-01-11 22:29:53 +08:00
bridge
08e28f52c7 refactor frontend (not done) 2026-01-11 22:15:45 +08:00
bridge
f33cfab0d5 refactor frontend (not done) 2026-01-11 22:08:01 +08:00
bridge
488758764e fix pytest for new awaken avatars 2026-01-11 21:03:02 +08:00
bridge
090e8fe32c fix remove avatar bug 2026-01-11 20:45:51 +08:00
bridge
5143266442 fix remove avatar bug 2026-01-11 20:40:53 +08:00
bridge
3a0e432b02 refactor gift 2026-01-11 20:33:54 +08:00
bridge
2056538375 uncomment protagonists 2026-01-11 19:56:26 +08:00
4thfever
2d9f073435 Merge pull request #20 from AI-Cultivation/fix-misorder-events
fix: incorrect order in event panel
2026-01-11 19:27:55 +08:00
bridge
ff6038b786 fix: incorrect order in event panel 2026-01-11 19:26:05 +08:00
bridge
88cc7cd966 feat: add color to map avatar names 2026-01-11 18:54:34 +08:00
bridge
ed7d16b4f3 feature: log print version 2026-01-11 18:27:41 +08:00
bridge
a0cfb3b9da make better conversation template 2026-01-10 01:41:13 +08:00
238 changed files with 8491 additions and 2359 deletions

View File

@@ -9,6 +9,7 @@ on:
jobs:
test:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v4
@@ -27,7 +28,14 @@ jobs:
- name: Install dependencies
run: |
uv pip install --system -r requirements.txt
uv pip install --system pytest
uv pip install --system pytest pytest-cov
- name: Run tests
run: pytest -v
- name: Run tests with coverage
run: pytest -v --cov=src --cov-report=xml --cov-report=term --cov-fail-under=60
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
with:
files: ./coverage.xml
fail_ci_if_error: false
token: ${{ secrets.CODECOV_TOKEN }} # Optional for public repos, but recommended

View File

@@ -2,6 +2,8 @@
感谢你对 **Cultivation World Simulator** (修仙模拟器) 感兴趣!欢迎任何形式的贡献,包括修复 Bug、改进文档或开发新功能。
> **重要**:任何新功能提交请务必提前在 issue 中讨论清楚,得到维护者确认后,再进行贡献。
为了保持代码库的健康和风格统一,请在贡献前阅读以下指南。
## 🛠️ 开发环境搭建

View File

@@ -51,34 +51,45 @@ You don't need to personally fight monsters or level up. Instead, you observe al
<table border="0">
<tr>
<td width="33%" valign="top">
<h4 align="center">Character Panel</h4>
<img src="assets/角色.png" width="100%" />
<br/><br/>
<h4 align="center">Personality Traits</h4>
<img src="assets/特质.png" width="100%" />
</td>
<td width="33%" valign="top">
<h4 align="center">Sect System</h4>
<img src="assets/宗门.png" width="100%" />
<img src="assets/screenshots/宗门.png" width="100%" />
<br/><br/>
<h4 align="center">City Regions</h4>
<img src="assets/screenshots/城市.png" width="100%" />
<br/><br/>
<h4 align="center">Life Experiences</h4>
<img src="assets/经历.png" width="100%" />
<img src="assets/screenshots/经历.png" width="100%" />
</td>
<td width="33%" valign="top">
<h4 align="center">Independent Thinking</h4>
<img src="assets/思考.png" width="100%" />
<h4 align="center">Character Panel</h4>
<img src="assets/screenshots/角色.png" width="100%" />
<br/><br/>
<h4 align="center">Short/Long Term Goals</h4>
<img src="assets/目标.png" width="100%" />
<h4 align="center">Personality Traits</h4>
<img src="assets/screenshots/特质.png" width="100%" />
<br/><br/>
<h4 align="center">Independent Thinking</h4>
<img src="assets/screenshots/思考.png" width="100%" />
<br/><br/>
<h4 align="center">Nicknames</h4>
<img src="assets/绰号.png" width="100%" />
<img src="assets/screenshots/绰号.png" width="100%" />
</td>
<td width="33%" valign="top">
<h4 align="center">Cave Exploration</h4>
<img src="assets/screenshots/洞府.png" width="100%" />
<br/><br/>
<h4 align="center">Short/Long Term Goals</h4>
<img src="assets/screenshots/目标.png" width="100%" />
<br/><br/>
<h4 align="center">Elixirs/Artifacts/Weapons</h4>
<img src="assets/screenshots/丹药.png" width="100%" />
<img src="assets/screenshots/法宝.png" width="100%" />
<img src="assets/screenshots/武器.png" width="100%" />
</td>
</tr>
</table>
### Why make this?
### 💭 Why make this?
The worlds in cultivation novels are fascinating, but readers can only ever observe a corner of them.
Cultivation games are either completely scripted or rely on simple state machines designed by humans, often resulting in forced and unintelligent behaviors.
@@ -87,13 +98,75 @@ With the advent of Large Language Models, the goal of making "every character al
I hope to create a pure, joyful, direct, and living sense of immersion in a cultivation world. Not a pure marketing tool for some game company, nor pure research like "Stanford Town", but an actual world that provides players with real immersion.
## Contact
## 📞 Contact
If you have any questions or suggestions, feel free to open an Issue or Pull Request.
You're also welcome to leave a message on my [Bilibili account](https://space.bilibili.com/527346837)!
You can also join the QQ group for discussion: 1071821688. Verification answer is my Bilibili nickname.
You can also join the QQ group for discussion: 1071821688. Verification answer: 肥桥今天吃什么
## Development Progress
## 🚀 Usage
### ⚙️ Run Steps
1. Clone the repo:
```bash
git clone https://github.com/your-username/cultivation-world-simulator.git
cd cultivation-world-simulator
```
2. Install dependencies:
```bash
# Backend dependencies
pip install -r requirements.txt
# Frontend dependencies (Node.js environment required)
cd web && npm install
```
3. Configure LLM:
Edit `static/config.yml`:
```yaml
llm:
key: "your-api-key-here" # your api key
base_url: "https://api.xxx.com" # API addr
model_name: "normal_model_name"
fast_model_name: "fast_model_name"
```
Supports all API providers compatible with OpenAI interface format (e.g., Qwen, DeepSeek, SiliconFlow, OpenRouter, etc.)
You can also configure LLM parameters directly in the frontend:
<img src="assets/llm_config.png" alt="Frontend LLM Config" width="100%">
4. Run:
```bash
# Start service (Recommended dev mode, automatically starts frontend)
python src/server/main.py --dev
```
The browser will automatically open the web frontend.
## 📊 Project Status
![Repobeats analytics](https://repobeats.axiom.co/api/embed/91667dce0fca651a7427022b2d819d20dd17c5e3.svg "Repobeats analytics image")
## ⭐ Star History
If you find this project interesting, please give us a Star ⭐! It will motivate us to keep improving and adding new features.
<div align="center">
<a href="https://star-history.com/#4thfever/cultivation-world-simulator&Date">
<img src="https://api.star-history.com/svg?repos=4thfever/cultivation-world-simulator&type=Date" alt="Star History Chart" width="600">
</a>
</div>
## 👥 Contributors
- Aku, for world design & discussion
- [@xzhseh](https://github.com/xzhseh), contributed code
## 🙏 Acknowledgments
- Referenced some UI elements from ailifeengine
## 📋 Development Progress
### 🏗️ Foundation
- ✅ World map basics, time, event system
@@ -106,6 +179,7 @@ You can also join the QQ group for discussion: 1071821688. Verification answer i
- ✅ Flexible custom LLM interface
- ✅ Support macOS
- [ ] Support multi-language localization
- ✅ Start Game Page
### 🗺️ World System
- ✅ Basic tile mechanics
@@ -137,7 +211,6 @@ You can also join the QQ group for discussion: 1071821688. Verification answer i
- [ ] Taming
- [ ] Evolving skills
- [ ] Mortals
- [ ] Prodigies (stronger abilities and AI)
### 🏛️ Organizations
- [ ] Sect system
@@ -164,7 +237,7 @@ You can also join the QQ group for discussion: 1071821688. Verification answer i
### 🎭 Event System
- ✅ Heaven-earth Qi fluctuations
- [ ] World-scale events:
- [ ] Auctions
- Auctions
- [ ] Secret realm exploration
- [ ] Martial tournaments
- [ ] Sect grand competition
@@ -204,10 +277,9 @@ You can also join the QQ group for discussion: 1071821688. Verification answer i
### 🏛️ World Lore
- ✅ Inject basic world knowledge
- [ ] Dynamic worldview generation
- [ ] Dynamic generation of techniques, equipment, sects, and maps based on user input history
- ✅ User input history, dynamic generation of techniques, equipment, sects, and region info
### Specials
### Specials
- ✅ Fortuitous encounters
- ✅ Tribulations & Heart devils
- [ ] Possession & Rebirth
@@ -215,62 +287,13 @@ You can also join the QQ group for discussion: 1071821688. Verification answer i
- [ ] Divination & Prophecy
- [ ] Male appearance female traits & Female appearance male traits
- [ ] Character Secrets & Two-faced
- [ ] Ascension to Upper Realm
- [ ] Ascension to Heaven
- [ ] Formations
- [ ] Paths/Daos
- [ ] World Secrets & World Laws (Flexible customization)
- [ ] Gu Refining
- [ ] World-ending Crisis
- [ ] Become a Legend of Later Ages
### 🔭 Long-term
- [ ] Novelization/imagery/video for history and events
- [ ] Avatar calling MCP tools on their own
## Usage
### Run Steps
1. Clone the repo:
```bash
git clone https://github.com/your-username/cultivation-world-simulator.git
cd cultivation-world-simulator
```
2. Install dependencies:
```bash
# Backend dependencies
pip install -r requirements.txt
# Frontend dependencies (Node.js environment required)
cd web && npm install
```
3. Configure LLM:
Edit `static/config.yml`:
```yaml
llm:
key: "your-api-key-here" # your api key
base_url: "https://api.xxx.com" # API addr
model_name: "normal_model_name"
fast_model_name: "fast_model_name"
```
Supports all API providers compatible with OpenAI interface format (e.g., Qwen, DeepSeek, SiliconFlow, OpenRouter, etc.)
You can also configure LLM parameters directly in the frontend:
<img src="assets/llm_config.png" alt="Frontend LLM Config" width="100%">
4. Run:
```bash
# Start service (Recommended dev mode, automatically starts frontend)
python src/server/main.py --dev
```
The browser will automatically open the web frontend.
## Contributors
- Aku, for world design & discussion
- [@xzhseh](https://github.com/xzhseh), contributed code
## Acknowledgments
- Referenced some UI elements from ailifeengine
- [ ] Avatar calling MCP tools on their own

144
README.md
View File

@@ -14,6 +14,7 @@
![Commit Activity](https://img.shields.io/github/commit-activity/y/4thfever/cultivation-world-simulator)
![Repo Size](https://img.shields.io/github/repo-size/4thfever/cultivation-world-simulator)
[![License](https://img.shields.io/badge/license-MIT-green)](LICENSE)
[![codecov](https://codecov.io/gh/AI-Cultivation/cultivation-world-simulator/graph/badge.svg)](https://codecov.io/gh/AI-Cultivation/cultivation-world-simulator)
![Status](https://img.shields.io/badge/Status-Alpha-tomato)
![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)
@@ -90,7 +91,7 @@
</tr>
</table>
### 为什么要做这个?
### 💭 为什么要做这个?
修仙网文中的世界很精彩,但读者永远只能观察到一隅。
修仙品类游戏要么是完全的预设剧本,要么依靠人工设计的简单规则状态机,有许许多多牵强和降智的表现。
@@ -99,12 +100,84 @@
希望能够创造出纯粹的、快乐的、直接的、活着的修仙世界的沉浸感。不是像一些游戏公司的纯粹宣传工具,也不是像斯坦福小镇那样的纯粹研究,而是能给玩家提供真实代入感和沉浸感的实际世界。
## 联系方式
## 📞 联系方式
如果您对项目有任何问题或建议,欢迎提交 Issue 或 Pull Request。
欢迎给我的[B站账号](https://space.bilibili.com/527346837)留言!
也可以加入QQ群进行讨论1071821688。进群需要输入我的B站昵称。
也可以加入QQ群进行讨论1071821688。进群问题的答案:肥桥今天吃什么
## 功能开发进度
## 🚀 使用方法
### ⚙️ 运行步骤
1. 克隆项目到本地:
```bash
git clone https://github.com/your-username/cultivation-world-simulator.git
cd cultivation-world-simulator
```
2. 安装依赖:
```bash
# 后端依赖
pip install -r requirements.txt
# 前端依赖 (需Node.js环境)
cd web && npm install
```
3. 配置LLM
在 `static/config.yml` 中配置LLM参数OpenAI格式
```yaml
llm:
key: "your-api-key-here" # 你的API密钥
base_url: "https://api.xxx.com" # API地址
model_name: "normal_model_name" # 智能模型名称
fast_model_name: "fast_model_name" # 快速模型名称
```
也支持在前端直接配入LLM参数
<img src="assets/llm_config.png" alt="前端LLM配置" width="100%">
4. 运行:
```bash
# 启动服务 (推荐开发模式,会自动启动前端)
python src/server/main.py --dev
```
浏览器会自动打开网页前端。
## 📊 项目状态
<div align="center">
<img src="https://github-readme-activity-graph.vercel.app/graph?username=4thfever&repo=cultivation-world-simulator&theme=github-compact&hide_border=true&area=true" width="100%" alt="Activity Graph" />
</div>
<br/>
![Repobeats analytics](https://repobeats.axiom.co/api/embed/91667dce0fca651a7427022b2d819d20dd17c5e3.svg "Repobeats analytics image")
## ⭐ Star History
如果你觉得这个项目有趣,请给我们一个 Star ⭐!这将激励我们持续改进和添加新功能。
<div align="center">
<a href="https://star-history.com/#4thfever/cultivation-world-simulator&Date">
<img src="https://api.star-history.com/svg?repos=4thfever/cultivation-world-simulator&type=Date" alt="Star History Chart" width="600">
</a>
</div>
## 👥 贡献者
<a href="https://github.com/4thfever/cultivation-world-simulator/graphs/contributors">
<img src="https://contrib.rocks/image?repo=4thfever/cultivation-world-simulator&max=100&columns=12" />
</a>
* **Aku** - 世界观 & 玩法设计与讨论
* **[@xzhseh](https://github.com/xzhseh)** - 贡献代码
## 🙏 致谢
- 参考了ai life engine部分ui
## 📋 功能开发进度
### 🏗️ 基础系统
- ✅ 基础世界地图、时间、事件系统
@@ -116,8 +189,8 @@
- ✅ 菜单栏 & 存档 & 读档
- ✅ 灵活自定义LLM接口
- ✅ 支持mac os
- [ ] 支持多语言本地化
- [ ] 开始游戏时的游戏设定栏
- [ ] 多语言本地化
- ✅ 开始游戏页
### 🗺️ 世界系统
- ✅ 基础tile地块系统
@@ -149,7 +222,6 @@
- [ ] 饲养
- [ ] 技能可升级
- [ ] 凡人系统
- [ ] 天骄系统更强能力更强AI
### 🏛️ 组织系统
- [ ] 宗门系统
@@ -175,8 +247,8 @@
### 🎭 事件系统
- ✅ 天地灵气变动
- [ ] 世界范围大事件:
- [ ] 拍卖会
- ✅ 多人大事件:
- 拍卖会
- [ ] 秘境探索
- [ ] 比武大会
- [ ] 宗门大比
@@ -216,10 +288,9 @@
### 🏛️ 世界背景系统
- ✅ 注入基础世界知识
- [ ] 动态世界观生成
- [ ] 基于用户输入历史的动态功法、装备、宗门、地图生成
- ✅ 用户输入历史,动态生成功法、装备、宗门、区域信息
### 特殊
### 特殊
- ✅ 奇遇
- ✅ 天劫 & 心魔
- [ ] 夺舍 & 重生
@@ -236,51 +307,4 @@
### 🔭 远期展望
- [ ] 历史/事件的小说化&图片化&视频化
- [ ] MCP agent化修士自行调用工具
## 使用方法
### 运行步骤
1. 克隆项目到本地:
```bash
git clone https://github.com/your-username/cultivation-world-simulator.git
cd cultivation-world-simulator
```
2. 安装依赖:
```bash
# 后端依赖
pip install -r requirements.txt
# 前端依赖 (需Node.js环境)
cd web && npm install
```
3. 配置LLM
在 `static/config.yml` 中配置LLM参数OpenAI格式
```yaml
llm:
key: "your-api-key-here" # 你的API密钥
base_url: "https://api.xxx.com" # API地址
model_name: "normal_model_name" # 智能模型名称
fast_model_name: "fast_model_name" # 快速模型名称
```
也支持在前端直接配入LLM参数
<img src="assets/llm_config.png" alt="前端LLM配置" width="100%">
4. 运行:
```bash
# 启动服务 (推荐开发模式,会自动启动前端)
python src/server/main.py --dev
```
浏览器会自动打开网页前端。
## 贡献者
* Aku, 世界观\玩法设计与讨论
* [@xzhseh](https://github.com/xzhseh), 贡献代码
## 致谢
- 参考了ai life engine部分ui
- [ ] MCP agent化修士自行调用工具

View File

Before

Width:  |  Height:  |  Size: 1.9 KiB

After

Width:  |  Height:  |  Size: 1.9 KiB

View File

Before

Width:  |  Height:  |  Size: 204 KiB

After

Width:  |  Height:  |  Size: 204 KiB

View File

Before

Width:  |  Height:  |  Size: 2.0 KiB

After

Width:  |  Height:  |  Size: 2.0 KiB

View File

Before

Width:  |  Height:  |  Size: 208 KiB

After

Width:  |  Height:  |  Size: 208 KiB

View File

Before

Width:  |  Height:  |  Size: 1.9 KiB

After

Width:  |  Height:  |  Size: 1.9 KiB

View File

Before

Width:  |  Height:  |  Size: 196 KiB

After

Width:  |  Height:  |  Size: 196 KiB

View File

Before

Width:  |  Height:  |  Size: 1.9 KiB

After

Width:  |  Height:  |  Size: 1.9 KiB

View File

Before

Width:  |  Height:  |  Size: 191 KiB

After

Width:  |  Height:  |  Size: 191 KiB

View File

Before

Width:  |  Height:  |  Size: 2.1 KiB

After

Width:  |  Height:  |  Size: 2.1 KiB

View File

Before

Width:  |  Height:  |  Size: 263 KiB

After

Width:  |  Height:  |  Size: 263 KiB

View File

Before

Width:  |  Height:  |  Size: 2.1 KiB

After

Width:  |  Height:  |  Size: 2.1 KiB

View File

Before

Width:  |  Height:  |  Size: 244 KiB

After

Width:  |  Height:  |  Size: 244 KiB

View File

Before

Width:  |  Height:  |  Size: 2.1 KiB

After

Width:  |  Height:  |  Size: 2.1 KiB

View File

Before

Width:  |  Height:  |  Size: 238 KiB

After

Width:  |  Height:  |  Size: 238 KiB

View File

Before

Width:  |  Height:  |  Size: 2.1 KiB

After

Width:  |  Height:  |  Size: 2.1 KiB

View File

Before

Width:  |  Height:  |  Size: 218 KiB

After

Width:  |  Height:  |  Size: 218 KiB

View File

Before

Width:  |  Height:  |  Size: 2.1 KiB

After

Width:  |  Height:  |  Size: 2.1 KiB

View File

Before

Width:  |  Height:  |  Size: 357 KiB

After

Width:  |  Height:  |  Size: 357 KiB

View File

Before

Width:  |  Height:  |  Size: 2.1 KiB

After

Width:  |  Height:  |  Size: 2.1 KiB

View File

Before

Width:  |  Height:  |  Size: 348 KiB

After

Width:  |  Height:  |  Size: 348 KiB

View File

Before

Width:  |  Height:  |  Size: 2.0 KiB

After

Width:  |  Height:  |  Size: 2.0 KiB

View File

Before

Width:  |  Height:  |  Size: 335 KiB

After

Width:  |  Height:  |  Size: 335 KiB

View File

Before

Width:  |  Height:  |  Size: 2.1 KiB

After

Width:  |  Height:  |  Size: 2.1 KiB

View File

Before

Width:  |  Height:  |  Size: 325 KiB

After

Width:  |  Height:  |  Size: 325 KiB

View File

Before

Width:  |  Height:  |  Size: 2.0 KiB

After

Width:  |  Height:  |  Size: 2.0 KiB

View File

Before

Width:  |  Height:  |  Size: 222 KiB

After

Width:  |  Height:  |  Size: 222 KiB

View File

Before

Width:  |  Height:  |  Size: 2.0 KiB

After

Width:  |  Height:  |  Size: 2.0 KiB

View File

Before

Width:  |  Height:  |  Size: 230 KiB

After

Width:  |  Height:  |  Size: 230 KiB

View File

Before

Width:  |  Height:  |  Size: 1.9 KiB

After

Width:  |  Height:  |  Size: 1.9 KiB

View File

Before

Width:  |  Height:  |  Size: 194 KiB

After

Width:  |  Height:  |  Size: 194 KiB

View File

Before

Width:  |  Height:  |  Size: 2.0 KiB

After

Width:  |  Height:  |  Size: 2.0 KiB

View File

Before

Width:  |  Height:  |  Size: 198 KiB

After

Width:  |  Height:  |  Size: 198 KiB

View File

Before

Width:  |  Height:  |  Size: 2.0 KiB

After

Width:  |  Height:  |  Size: 2.0 KiB

View File

Before

Width:  |  Height:  |  Size: 292 KiB

After

Width:  |  Height:  |  Size: 292 KiB

View File

Before

Width:  |  Height:  |  Size: 2.0 KiB

After

Width:  |  Height:  |  Size: 2.0 KiB

View File

Before

Width:  |  Height:  |  Size: 281 KiB

After

Width:  |  Height:  |  Size: 281 KiB

View File

Before

Width:  |  Height:  |  Size: 1.9 KiB

After

Width:  |  Height:  |  Size: 1.9 KiB

View File

Before

Width:  |  Height:  |  Size: 255 KiB

After

Width:  |  Height:  |  Size: 255 KiB

View File

Before

Width:  |  Height:  |  Size: 2.0 KiB

After

Width:  |  Height:  |  Size: 2.0 KiB

View File

Before

Width:  |  Height:  |  Size: 275 KiB

After

Width:  |  Height:  |  Size: 275 KiB

View File

Before

Width:  |  Height:  |  Size: 318 KiB

After

Width:  |  Height:  |  Size: 318 KiB

View File

Before

Width:  |  Height:  |  Size: 2.0 MiB

After

Width:  |  Height:  |  Size: 2.0 MiB

View File

Before

Width:  |  Height:  |  Size: 9.6 KiB

After

Width:  |  Height:  |  Size: 9.6 KiB

View File

Before

Width:  |  Height:  |  Size: 9.6 KiB

After

Width:  |  Height:  |  Size: 9.6 KiB

View File

Before

Width:  |  Height:  |  Size: 9.6 KiB

After

Width:  |  Height:  |  Size: 9.6 KiB

View File

Before

Width:  |  Height:  |  Size: 10 KiB

After

Width:  |  Height:  |  Size: 10 KiB

View File

Before

Width:  |  Height:  |  Size: 1.6 MiB

After

Width:  |  Height:  |  Size: 1.6 MiB

View File

Before

Width:  |  Height:  |  Size: 6.5 KiB

After

Width:  |  Height:  |  Size: 6.5 KiB

View File

Before

Width:  |  Height:  |  Size: 6.1 KiB

After

Width:  |  Height:  |  Size: 6.1 KiB

View File

Before

Width:  |  Height:  |  Size: 8.6 KiB

After

Width:  |  Height:  |  Size: 8.6 KiB

View File

Before

Width:  |  Height:  |  Size: 9.0 KiB

After

Width:  |  Height:  |  Size: 9.0 KiB

View File

Before

Width:  |  Height:  |  Size: 2.0 MiB

After

Width:  |  Height:  |  Size: 2.0 MiB

View File

Before

Width:  |  Height:  |  Size: 8.4 KiB

After

Width:  |  Height:  |  Size: 8.4 KiB

View File

Before

Width:  |  Height:  |  Size: 9.5 KiB

After

Width:  |  Height:  |  Size: 9.5 KiB

View File

Before

Width:  |  Height:  |  Size: 9.7 KiB

After

Width:  |  Height:  |  Size: 9.7 KiB

View File

Before

Width:  |  Height:  |  Size: 9.6 KiB

After

Width:  |  Height:  |  Size: 9.6 KiB

View File

Before

Width:  |  Height:  |  Size: 1.7 MiB

After

Width:  |  Height:  |  Size: 1.7 MiB

View File

Before

Width:  |  Height:  |  Size: 6.2 KiB

After

Width:  |  Height:  |  Size: 6.2 KiB

View File

Before

Width:  |  Height:  |  Size: 7.6 KiB

After

Width:  |  Height:  |  Size: 7.6 KiB

View File

Before

Width:  |  Height:  |  Size: 8.5 KiB

After

Width:  |  Height:  |  Size: 8.5 KiB

View File

Before

Width:  |  Height:  |  Size: 8.9 KiB

After

Width:  |  Height:  |  Size: 8.9 KiB

View File

Before

Width:  |  Height:  |  Size: 1.8 MiB

After

Width:  |  Height:  |  Size: 1.8 MiB

View File

Before

Width:  |  Height:  |  Size: 7.4 KiB

After

Width:  |  Height:  |  Size: 7.4 KiB

View File

Before

Width:  |  Height:  |  Size: 8.7 KiB

After

Width:  |  Height:  |  Size: 8.7 KiB

View File

Before

Width:  |  Height:  |  Size: 9.4 KiB

After

Width:  |  Height:  |  Size: 9.4 KiB

View File

Before

Width:  |  Height:  |  Size: 9.8 KiB

After

Width:  |  Height:  |  Size: 9.8 KiB

View File

Before

Width:  |  Height:  |  Size: 8.7 KiB

After

Width:  |  Height:  |  Size: 8.7 KiB

View File

Before

Width:  |  Height:  |  Size: 8.3 KiB

After

Width:  |  Height:  |  Size: 8.3 KiB

View File

Before

Width:  |  Height:  |  Size: 9.3 KiB

After

Width:  |  Height:  |  Size: 9.3 KiB

View File

Before

Width:  |  Height:  |  Size: 9.6 KiB

After

Width:  |  Height:  |  Size: 9.6 KiB

View File

Before

Width:  |  Height:  |  Size: 352 KiB

After

Width:  |  Height:  |  Size: 352 KiB

View File

Before

Width:  |  Height:  |  Size: 8.5 KiB

After

Width:  |  Height:  |  Size: 8.5 KiB

View File

Before

Width:  |  Height:  |  Size: 8.0 KiB

After

Width:  |  Height:  |  Size: 8.0 KiB

View File

Before

Width:  |  Height:  |  Size: 10 KiB

After

Width:  |  Height:  |  Size: 10 KiB

View File

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 11 KiB

View File

Before

Width:  |  Height:  |  Size: 323 KiB

After

Width:  |  Height:  |  Size: 323 KiB

View File

Before

Width:  |  Height:  |  Size: 9.4 KiB

After

Width:  |  Height:  |  Size: 9.4 KiB

View File

Before

Width:  |  Height:  |  Size: 9.3 KiB

After

Width:  |  Height:  |  Size: 9.3 KiB

View File

Before

Width:  |  Height:  |  Size: 8.8 KiB

After

Width:  |  Height:  |  Size: 8.8 KiB

View File

Before

Width:  |  Height:  |  Size: 9.1 KiB

After

Width:  |  Height:  |  Size: 9.1 KiB

View File

Before

Width:  |  Height:  |  Size: 330 KiB

After

Width:  |  Height:  |  Size: 330 KiB

View File

Before

Width:  |  Height:  |  Size: 7.5 KiB

After

Width:  |  Height:  |  Size: 7.5 KiB

View File

Before

Width:  |  Height:  |  Size: 8.7 KiB

After

Width:  |  Height:  |  Size: 8.7 KiB

View File

Before

Width:  |  Height:  |  Size: 10 KiB

After

Width:  |  Height:  |  Size: 10 KiB

View File

Before

Width:  |  Height:  |  Size: 10 KiB

After

Width:  |  Height:  |  Size: 10 KiB

View File

Before

Width:  |  Height:  |  Size: 372 KiB

After

Width:  |  Height:  |  Size: 372 KiB

View File

Before

Width:  |  Height:  |  Size: 8.9 KiB

After

Width:  |  Height:  |  Size: 8.9 KiB

View File

Before

Width:  |  Height:  |  Size: 9.9 KiB

After

Width:  |  Height:  |  Size: 9.9 KiB

View File

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 11 KiB

View File

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 11 KiB

View File

Before

Width:  |  Height:  |  Size: 275 KiB

After

Width:  |  Height:  |  Size: 275 KiB

View File

Before

Width:  |  Height:  |  Size: 7.8 KiB

After

Width:  |  Height:  |  Size: 7.8 KiB

View File

Before

Width:  |  Height:  |  Size: 8.9 KiB

After

Width:  |  Height:  |  Size: 8.9 KiB

View File

Before

Width:  |  Height:  |  Size: 8.3 KiB

After

Width:  |  Height:  |  Size: 8.3 KiB

View File

Before

Width:  |  Height:  |  Size: 8.5 KiB

After

Width:  |  Height:  |  Size: 8.5 KiB

View File

Before

Width:  |  Height:  |  Size: 345 KiB

After

Width:  |  Height:  |  Size: 345 KiB

Some files were not shown because too many files have changed in this diff Show More