Compare commits
152 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4abc639aa6 | ||
|
|
8a06e950a3 | ||
|
|
26f44b8f74 | ||
|
|
77a6dfcb7c | ||
|
|
b7dad2d725 | ||
|
|
2ffd6301f8 | ||
|
|
67b559ac5a | ||
|
|
ef926594c7 | ||
|
|
741a88d174 | ||
|
|
a143ed8a80 | ||
|
|
07e9b40645 | ||
|
|
955dac0c69 | ||
|
|
2cc456f6b3 | ||
|
|
07d1cfbee2 | ||
|
|
7e8a737402 | ||
|
|
7630174820 | ||
|
|
a9d9288432 | ||
|
|
bd6f7e67d5 | ||
|
|
f15ee94559 | ||
|
|
51472c0580 | ||
|
|
c2c1ce46d1 | ||
|
|
f2c4b5609d | ||
|
|
a59f6837ca | ||
|
|
d4cc50962c | ||
|
|
56015265c6 | ||
|
|
fe47cdb442 | ||
|
|
4ce32c8b94 | ||
|
|
99c0af1a9b | ||
|
|
2cbe7660e7 | ||
|
|
26332003e5 | ||
|
|
ade1379448 | ||
|
|
4f377551e8 | ||
|
|
7143b27a0a | ||
|
|
be6e3d43c0 | ||
|
|
d9e7d824a6 | ||
|
|
9ee049c377 | ||
|
|
4674cbe930 | ||
|
|
15bb9ca874 | ||
|
|
f0b6b62de5 | ||
|
|
c981aff863 | ||
|
|
666310e7b4 | ||
|
|
07dacb8876 | ||
|
|
d53d5885c0 | ||
|
|
bc3ebc006c | ||
|
|
5d46b47672 | ||
|
|
24ded1d40f | ||
|
|
b6104f4fce | ||
|
|
15e831a471 | ||
|
|
3580968bfa | ||
|
|
0315dca6e6 | ||
|
|
efa663febe | ||
|
|
3a4c1a5dcb | ||
|
|
aa0e6aa32f | ||
|
|
3ddd7868b6 | ||
|
|
202de66654 | ||
|
|
6cb9e5c4e9 | ||
|
|
a59f6f816f | ||
|
|
cd9f16527b | ||
|
|
c28e9e2d73 | ||
|
|
54714a5ace | ||
|
|
3947dfde7b | ||
|
|
57d1f9a704 | ||
|
|
64783e018f | ||
|
|
84027fc1d7 | ||
|
|
406d62f983 | ||
|
|
c3ac584a90 | ||
|
|
4a4c45c428 | ||
|
|
c406d2988f | ||
|
|
aaa636a08e | ||
|
|
2b5ec24455 | ||
|
|
5fa8016334 | ||
|
|
0d8a001f8c | ||
|
|
e286d249c4 | ||
|
|
a2f2010ee5 | ||
|
|
8af763531b | ||
|
|
547cc01aef | ||
|
|
b772fe0c3a | ||
|
|
1224dd2fcb | ||
|
|
339f6a655e | ||
|
|
e1091fdf5a | ||
|
|
6f4b648d6e | ||
|
|
00c8860c56 | ||
|
|
38327c1b10 | ||
|
|
ec71310588 | ||
|
|
666e19215d | ||
|
|
189e675711 | ||
|
|
2b8812852c | ||
|
|
64732d6912 | ||
|
|
6ed614814f | ||
|
|
498249e83b | ||
|
|
d4b9b7303d | ||
|
|
a1241a9156 | ||
|
|
5f236361dc | ||
|
|
a8666950b1 | ||
|
|
325c72e513 | ||
|
|
2c9ef96c36 | ||
|
|
a7ab18ea1c | ||
|
|
bf13cdf2d2 | ||
|
|
31d0c060e8 | ||
|
|
7f31d9884f | ||
|
|
665d94addb | ||
|
|
8bf5f64bc3 | ||
|
|
9677055faa | ||
|
|
8f7c2cfa66 | ||
|
|
ee2964e151 | ||
|
|
daa7a20679 | ||
|
|
ed2d8720aa | ||
|
|
5a82a186a7 | ||
|
|
1a34b7724b | ||
|
|
2e04b718e8 | ||
|
|
a075c1cc59 | ||
|
|
bc6725b302 | ||
|
|
6185d314af | ||
|
|
b68403e601 | ||
|
|
ce64c6b048 | ||
|
|
47ad330b35 | ||
|
|
094a8fdd00 | ||
|
|
eb2c715069 | ||
|
|
bd563b10f4 | ||
|
|
e3bf36bcd4 | ||
|
|
7edae9188b | ||
|
|
0acf72a313 | ||
|
|
4fea4b6a9b | ||
|
|
e5ed418949 | ||
|
|
9b294ccba3 | ||
|
|
e900c3e098 | ||
|
|
df8b1b9433 | ||
|
|
63fc2f828e | ||
|
|
0d34b27fff | ||
|
|
224e3e76f0 | ||
|
|
bb2e010930 | ||
|
|
95e1f11502 | ||
|
|
176fa95425 | ||
|
|
2caa5586be | ||
|
|
287f9d2ae4 | ||
|
|
57cf5ca51a | ||
|
|
5241f70ef3 | ||
|
|
fa4c0340fd | ||
|
|
19b9ddd8ba | ||
|
|
879a3c0d1f | ||
|
|
08e28f52c7 | ||
|
|
f33cfab0d5 | ||
|
|
488758764e | ||
|
|
090e8fe32c | ||
|
|
5143266442 | ||
|
|
3a0e432b02 | ||
|
|
2056538375 | ||
|
|
2d9f073435 | ||
|
|
ff6038b786 | ||
|
|
88cc7cd966 | ||
|
|
ed7d16b4f3 | ||
|
|
a0cfb3b9da |
30
.claude/skills/git-pr/SKILL.md
Normal file
@@ -0,0 +1,30 @@
|
||||
---
|
||||
name: git-pr
|
||||
description: Create a pull request with proper remote handling
|
||||
---
|
||||
|
||||
## Pre-flight
|
||||
|
||||
```bash
|
||||
git remote -v
|
||||
# If origin URL is outdated, fix it:
|
||||
# git remote set-url origin https://github.com/AI-Cultivation/cultivation-world-simulator.git
|
||||
```
|
||||
|
||||
## Commands
|
||||
|
||||
```bash
|
||||
git checkout main && git pull origin main
|
||||
git checkout -b <github-username>/<branch-name>
|
||||
git add <files>
|
||||
git commit -m "<type>: <description>"
|
||||
git push -u origin <github-username>/<branch-name>
|
||||
gh pr create --head <github-username>/<branch-name> --base main --title "<type>: <description>" --body "<body>"
|
||||
```
|
||||
|
||||
## Notes
|
||||
|
||||
- Always branch off from `main`, not from current branch
|
||||
- Follow PR template in `.github/PULL_REQUEST_TEMPLATE.md`
|
||||
- `<github-username>`: e.g., `xzhseh`
|
||||
- `<type>`: `feat` | `fix` | `refactor` | `test` | `docs`
|
||||
51
.claude/skills/spec-interview/SKILL.md
Normal file
@@ -0,0 +1,51 @@
|
||||
---
|
||||
name: spec-interview
|
||||
description: Conduct an in-depth interview to gather requirements and write a detailed spec
|
||||
---
|
||||
|
||||
## Overview
|
||||
|
||||
Conduct a thorough interview using `AskUserQuestion` to deeply understand a feature, system, or idea before writing a specification document.
|
||||
|
||||
## Core Principles
|
||||
|
||||
1. **Use your judgment** - Adapt question depth and focus based on the topic. A small UI change needs different questions than a new authentication system.
|
||||
|
||||
2. **Ask non-obvious questions** - Skip surface-level questions. Probe for:
|
||||
- Hidden assumptions the user hasn't articulated
|
||||
- Edge cases they haven't considered
|
||||
- Tradeoffs they're implicitly making
|
||||
- Constraints they forgot to mention
|
||||
- Failure modes and recovery paths
|
||||
|
||||
3. **Follow interesting threads** - When an answer reveals complexity or uncertainty, dig deeper before moving on.
|
||||
|
||||
4. **Challenge gently** - Ask "what if X fails?" or "why not Y instead?" to stress-test the design.
|
||||
|
||||
5. **Know when to stop** - End the interview when you have enough clarity to write a useful spec. Not every topic needs exhaustive coverage.
|
||||
|
||||
## Question Areas (use as needed, not as a checklist)
|
||||
|
||||
- **Problem & motivation**: Why now? What's the cost of not doing this?
|
||||
- **Technical design**: Data model, state, APIs, performance, migrations
|
||||
- **User experience**: Error states, loading, edge cases, accessibility
|
||||
- **Integration**: What else does this touch? Security? Observability?
|
||||
- **Tradeoffs**: What are you NOT building? What debt are you accepting?
|
||||
- **Risks**: What assumptions could be wrong? What would make this a failure?
|
||||
|
||||
## Interview Flow
|
||||
|
||||
1. Start with 2-4 questions per round via `AskUserQuestion`.
|
||||
2. Synthesize answers and follow up on gaps or ambiguities.
|
||||
3. Periodically summarize to confirm understanding.
|
||||
4. When sufficiently complete, confirm with the user and write the spec.
|
||||
|
||||
## Output
|
||||
|
||||
Write the spec to `docs/specs/<feature-name>.md` (or ask user for preferred path). Include whatever sections are relevant — don't force a rigid template.
|
||||
|
||||
## Invocation
|
||||
|
||||
```
|
||||
/spec-interview [topic]
|
||||
```
|
||||
33
.claude/skills/test-validate/SKILL.md
Normal file
@@ -0,0 +1,33 @@
|
||||
---
|
||||
name: test-validate
|
||||
description: Run Python tests using the project venv
|
||||
---
|
||||
|
||||
## Commands
|
||||
|
||||
```bash
|
||||
# Run all tests
|
||||
.venv/bin/pytest
|
||||
|
||||
# Run specific test file
|
||||
.venv/bin/pytest tests/test_<name>.py -v
|
||||
|
||||
# Run with coverage
|
||||
.venv/bin/pytest --cov=src
|
||||
|
||||
# Run server (dev mode)
|
||||
.venv/bin/python src/server/main.py --dev
|
||||
```
|
||||
|
||||
## Test Coverage Guidelines
|
||||
|
||||
After making code changes, consider whether tests are needed:
|
||||
|
||||
| Change Type | Test Recommendation |
|
||||
|-------------|---------------------|
|
||||
| Bug fix | Add regression test to prevent recurrence |
|
||||
| New feature | Unit tests + integration test if affects multiple modules |
|
||||
| Refactor | Existing tests should pass; add tests if behavior changes |
|
||||
| Config/docs | Usually no tests needed |
|
||||
|
||||
For bug fixes, ensure the test would have **failed before the fix** and **passes after**.
|
||||
40
.dockerignore
Normal file
@@ -0,0 +1,40 @@
|
||||
# 忽略不需要的文件
|
||||
.git
|
||||
.gitignore
|
||||
node_modules
|
||||
__pycache__
|
||||
*.pyc
|
||||
*.pyo
|
||||
*.pyd
|
||||
.Python
|
||||
env/
|
||||
venv/
|
||||
.env
|
||||
.env.local
|
||||
.DS_Store
|
||||
Thumbs.db
|
||||
|
||||
# 开发文件
|
||||
README.md
|
||||
ROADMAP.md
|
||||
CONTRIBUTING.md
|
||||
.github/
|
||||
.vscode/
|
||||
.idea/
|
||||
*.md
|
||||
|
||||
# 构建产物
|
||||
web/dist/
|
||||
web/node_modules/
|
||||
dist/
|
||||
build/
|
||||
|
||||
# 日志
|
||||
*.log
|
||||
logs/
|
||||
|
||||
# 测试
|
||||
tests/
|
||||
pytest_cache/
|
||||
.coverage
|
||||
htmlcov/
|
||||
2
.github/CODEOWNERS
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
/README.md wangxin4qiao@163.com
|
||||
/EN_README.md wangxin4qiao@163.com
|
||||
34
.github/workflows/test.yml
vendored
@@ -9,10 +9,12 @@ on:
|
||||
jobs:
|
||||
test:
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 10
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
# --- Backend Tests ---
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
@@ -24,10 +26,34 @@ jobs:
|
||||
enable-cache: true
|
||||
cache-dependency-glob: "requirements.txt"
|
||||
|
||||
- name: Install dependencies
|
||||
- name: Install Python 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 backend tests with coverage
|
||||
run: pytest -v --cov=src --cov-report=xml --cov-report=term --cov-fail-under=60
|
||||
|
||||
# --- Frontend Tests ---
|
||||
- name: Set up Node.js
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: "20"
|
||||
cache: "npm"
|
||||
cache-dependency-path: web/package-lock.json
|
||||
|
||||
- name: Install Node dependencies
|
||||
working-directory: web
|
||||
run: npm ci
|
||||
|
||||
- name: Run frontend tests with coverage
|
||||
working-directory: web
|
||||
run: npm run test:coverage
|
||||
|
||||
# --- Upload Coverage ---
|
||||
- name: Upload coverage to Codecov
|
||||
uses: codecov/codecov-action@v4
|
||||
with:
|
||||
files: ./coverage.xml,./web/coverage/coverage-final.json
|
||||
fail_ci_if_error: false
|
||||
token: ${{ secrets.CODECOV_TOKEN }}
|
||||
|
||||
20
.gitignore
vendored
@@ -152,4 +152,22 @@ local_config.yml
|
||||
|
||||
台本/
|
||||
笔记/
|
||||
tmp*/
|
||||
tmp*/
|
||||
|
||||
#############################
|
||||
# Docker
|
||||
#############################
|
||||
|
||||
# Docker data directories
|
||||
saves/
|
||||
logs/
|
||||
|
||||
# Docker environment files
|
||||
.env
|
||||
|
||||
#############################
|
||||
# Frontend (web/)
|
||||
#############################
|
||||
|
||||
# Test coverage reports generated by Vitest.
|
||||
web/coverage/
|
||||
|
||||
@@ -1,6 +1,10 @@
|
||||
# 贡献指南 (Contributing Guide)
|
||||
|
||||
感谢你对 **Cultivation World Simulator** (修仙模拟器) 感兴趣!欢迎任何形式的贡献,包括修复 Bug、改进文档或开发新功能。
|
||||
感谢你对 **Cultivation World Simulator** (修仙模拟器) 感兴趣!欢迎任何形式的贡献,包括提出Bug、修复 Bug、改进文档或开发新功能。
|
||||
|
||||
> **重要**:任何新功能提交,特别是业务功能提交,请务必提前在 issue 中讨论清楚,得到维护者确认后,再进行贡献。
|
||||
|
||||
在开始贡献之前,建议先查看 [项目路线图](./ROADMAP.md),了解项目的发展方向和计划,这有助于你的贡献与项目目标保持一致。
|
||||
|
||||
为了保持代码库的健康和风格统一,请在贡献前阅读以下指南。
|
||||
|
||||
@@ -17,9 +21,38 @@
|
||||
在提交 Pull Request 之前,请务必确保所有测试通过。这是保证代码质量的关键。
|
||||
|
||||
**运行后端测试:**
|
||||
```bash
|
||||
pytest tests/
|
||||
```
|
||||
|
||||
本项目在 CI 环境中使用 Python 3.11。
|
||||
|
||||
1. 确保已安装测试依赖(包含在 requirements.txt 中):
|
||||
```bash
|
||||
pip install -r requirements.txt
|
||||
```
|
||||
|
||||
2. 运行测试并检查覆盖率(需满足 60% 覆盖率要求):
|
||||
```bash
|
||||
pytest -v --cov=src --cov-report=term --cov-fail-under=60
|
||||
```
|
||||
|
||||
**运行前端测试 (Vue/Vitest):**
|
||||
|
||||
前端测试位于 `web/` 目录。
|
||||
|
||||
1. 进入前端目录并安装依赖:
|
||||
```bash
|
||||
cd web
|
||||
npm install
|
||||
```
|
||||
|
||||
2. 运行单元测试:
|
||||
```bash
|
||||
npm run test:run
|
||||
```
|
||||
|
||||
3. 运行测试并查看覆盖率:
|
||||
```bash
|
||||
npm run test:coverage
|
||||
```
|
||||
|
||||
请确保所有测试用例都能通过(PASS)。如果你添加了新功能,建议同时也添加相应的测试用例。
|
||||
|
||||
@@ -50,4 +83,4 @@ pytest tests/
|
||||
5. 推送 (Push) 到你的远程分支。
|
||||
6. 在 GitHub 上发起 **Pull Request**。
|
||||
|
||||
感谢你的贡献!一起打造更好的修仙世界。
|
||||
感谢你的贡献!一起打造更好玩有趣的AI修仙世界。
|
||||
6
CONTRIBUTORS.md
Normal file
@@ -0,0 +1,6 @@
|
||||
# 贡献者 (Contributors)
|
||||
|
||||
* **Aku** - 世界观 & 玩法设计与讨论
|
||||
* **[@xzhseh](https://github.com/xzhseh)** - 代码与repo维护
|
||||
* **[@teps3105](https://github.com/teps3105)** - 代码贡献
|
||||
* **[@MarkYangKp](https://github.com/MarkYangkp)** - 代码贡献
|
||||
267
EN_README.md
@@ -9,19 +9,12 @@
|
||||

|
||||
[](https://space.bilibili.com/527346837)
|
||||

|
||||
|
||||

|
||||

|
||||

|
||||
[](LICENSE)
|
||||
|
||||

|
||||

|
||||
[](https://discord.gg/shhRWmZR)
|
||||
[](LICENSE)
|
||||

|
||||

|
||||

|
||||

|
||||
|
||||

|
||||

|
||||

|
||||

|
||||
@@ -30,11 +23,17 @@
|
||||

|
||||
|
||||
<p align="center">
|
||||
<img src="assets/screenshot.gif" alt="Game Demo" width="100%">
|
||||
<img src="assets/en-US/screenshot.gif" alt="Game Demo" width="100%">
|
||||
</p>
|
||||
|
||||
> **An AI-driven cultivation world simulator that aims to create a truly living, immersive xianxia world.**
|
||||
|
||||
<p align="center">
|
||||
<a href="https://hellogithub.com/repository/4thfever/cultivation-world-simulator" target="_blank">
|
||||
<img src="https://api.hellogithub.com/v1/widgets/recommend.svg?rid=d0d75240fb95445bba1d7af7574d8420&claim_uid=DogxfCROM1PBL89" alt="Featured|HelloGitHub" style="width: 250px; height: 54px;" width="250" height="54" />
|
||||
</a>
|
||||
</p>
|
||||
|
||||
## 📖 Introduction
|
||||
|
||||
This is an **AI-driven open-world cultivation simulator**.
|
||||
@@ -51,34 +50,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/en-US/screenshots/宗门.png" width="100%" />
|
||||
<br/><br/>
|
||||
<h4 align="center">City Region</h4>
|
||||
<img src="assets/en-US/screenshots/城市.png" width="100%" />
|
||||
<br/><br/>
|
||||
<h4 align="center">Life Experiences</h4>
|
||||
<img src="assets/经历.png" width="100%" />
|
||||
<img src="assets/en-US/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/en-US/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/en-US/screenshots/特质.png" width="100%" />
|
||||
<br/><br/>
|
||||
<h4 align="center">Independent Thinking</h4>
|
||||
<img src="assets/en-US/screenshots/思考.png" width="100%" />
|
||||
<br/><br/>
|
||||
<h4 align="center">Nicknames</h4>
|
||||
<img src="assets/绰号.png" width="100%" />
|
||||
<img src="assets/en-US/screenshots/绰号.png" width="100%" />
|
||||
</td>
|
||||
<td width="33%" valign="top">
|
||||
<h4 align="center">Dungeon Exploration</h4>
|
||||
<img src="assets/en-US/screenshots/洞府.png" width="100%" />
|
||||
<br/><br/>
|
||||
<h4 align="center">Short/Long Term Goals</h4>
|
||||
<img src="assets/en-US/screenshots/目标.png" width="100%" />
|
||||
<br/><br/>
|
||||
<h4 align="center">Elixirs/Treasures/Weapons</h4>
|
||||
<img src="assets/en-US/screenshots/丹药.png" width="100%" />
|
||||
<img src="assets/en-US/screenshots/法宝.png" width="100%" />
|
||||
<img src="assets/en-US/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 +97,147 @@ 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: 肥桥今天吃什么
|
||||
Join our Discord community: [https://discord.gg/shhRWmZR](https://discord.gg/shhRWmZR)
|
||||
|
||||
## Development Progress
|
||||
## 🚀 Usage
|
||||
|
||||
### ⚙️ Run Steps
|
||||
|
||||
#### Option 1: Docker Compose (Recommended)
|
||||
|
||||
If you have Docker installed, this is the easiest way:
|
||||
|
||||
1. **Clone the repo**
|
||||
```bash
|
||||
git clone https://github.com/AI-Cultivation/cultivation-world-simulator.git
|
||||
cd cultivation-world-simulator
|
||||
```
|
||||
|
||||
2. **Start Service (Auto build & run)**
|
||||
```bash
|
||||
docker-compose up -d --build
|
||||
```
|
||||
|
||||
#### Option 2: Manual Installation
|
||||
|
||||
1. Clone the repo:
|
||||
```bash
|
||||
git clone https://github.com/AI-Cultivation/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:
|
||||
|
||||
**Recommended: Configure directly in the frontend (supports quick preset filling)**
|
||||
|
||||
<img src="assets/en-US/llm_config.png" alt="Frontend LLM Config" width="100%">
|
||||
|
||||
You can also manually configure it in `static/local_config.yml` (OpenAI compatible format):
|
||||
```yaml
|
||||
llm:
|
||||
base_url: https://api.deepseek.com # API addr
|
||||
key: your-api-key-here # your api key
|
||||
model_name: deepseek-chat # normal model name
|
||||
fast_model_name: deepseek-chat # fast model name
|
||||
mode: default # run mode (default/normal/fast)
|
||||
```
|
||||
Supports all API providers compatible with OpenAI interface format (e.g., Qwen, DeepSeek, SiliconFlow, OpenRouter, etc.)
|
||||
|
||||
**Local Deployment (Ollama):** Also supports connecting to local Ollama, just select "Ollama (Local)" preset in the frontend.
|
||||
|
||||
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.
|
||||
|
||||
### 🌐 Access Application
|
||||
|
||||
Frontend: `http://localhost:8123`
|
||||
Backend API: `http://localhost:8002`
|
||||
|
||||
### 📱 Mobile / LAN Access
|
||||
|
||||
You can access the game from other devices on the same network (e.g., phone, tablet).
|
||||
|
||||
> ⚠️ **Note**: The mobile UI is not optimized yet. See [Issue #130](https://github.com/4thfever/cultivation-world-simulator/issues/130).
|
||||
|
||||
**Configuration steps:**
|
||||
|
||||
1. Add to `static/local_config.yml`:
|
||||
```yaml
|
||||
system:
|
||||
host: "0.0.0.0" # Allow LAN access
|
||||
```
|
||||
|
||||
2. If using dev mode (`--dev`), also add to `web/vite.config.ts` in the `server` config:
|
||||
```typescript
|
||||
server: {
|
||||
host: '0.0.0.0', // Add this line
|
||||
proxy: { ... }
|
||||
}
|
||||
```
|
||||
|
||||
3. After starting the server, access from your phone:
|
||||
```
|
||||
http://<your-computer-lan-ip>:5173 # Dev mode
|
||||
http://<your-computer-lan-ip>:8002 # Production mode
|
||||
```
|
||||
|
||||
4. Find your computer's LAN IP:
|
||||
```bash
|
||||
# macOS
|
||||
ipconfig getifaddr en0
|
||||
|
||||
# Linux
|
||||
hostname -I
|
||||
|
||||
# Windows
|
||||
ipconfig
|
||||
```
|
||||
|
||||
> 💡 Make sure your phone and computer are on the same WiFi, and the firewall allows the corresponding port.
|
||||
|
||||
|
||||
## 📊 Project Status
|
||||
|
||||

|
||||
|
||||
## ⭐ 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
|
||||
|
||||
<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>
|
||||
|
||||
For more details on contributions, please see [CONTRIBUTORS.md](CONTRIBUTORS.md).
|
||||
|
||||
|
||||
## 📋 Development Progress
|
||||
|
||||
### 🏗️ Foundation
|
||||
- ✅ World map basics, time, event system
|
||||
@@ -105,7 +249,9 @@ You can also join the QQ group for discussion: 1071821688. Verification answer i
|
||||
- ✅ Menu bar & Save & Load
|
||||
- ✅ Flexible custom LLM interface
|
||||
- ✅ Support macOS
|
||||
- [ ] Support multi-language localization
|
||||
- ✅ Support multi-language localization
|
||||
- ✅ Start Game Page
|
||||
- [ ] Mod Support
|
||||
|
||||
### 🗺️ World System
|
||||
- ✅ Basic tile mechanics
|
||||
@@ -137,7 +283,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,8 +309,8 @@ You can also join the QQ group for discussion: 1071821688. Verification answer i
|
||||
### 🎭 Event System
|
||||
- ✅ Heaven-earth Qi fluctuations
|
||||
- [ ] World-scale events:
|
||||
- [ ] Auctions
|
||||
- [ ] Secret realm exploration
|
||||
- ✅ Auctions
|
||||
- ✅ Hidden domain exploration
|
||||
- [ ] Martial tournaments
|
||||
- [ ] Sect grand competition
|
||||
- [ ] Sudden events
|
||||
@@ -204,10 +349,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
|
||||
@@ -221,56 +365,7 @@ You can also join the QQ group for discussion: 1071821688. Verification answer i
|
||||
- [ ] 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
|
||||
168
LICENSE
@@ -1,21 +1,155 @@
|
||||
MIT License
|
||||
Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International Public License
|
||||
|
||||
Copyright (c) 2024 cultivation-world-simulator
|
||||
By exercising the Licensed Rights (defined below), You accept and agree to be bound by the terms and conditions of this Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International Public License (“Public License”). To the extent this Public License may be interpreted as a contract, You are granted the Licensed Rights in consideration of Your acceptance of these terms and conditions, and the Licensor grants You such rights in consideration of benefits the Licensor receives from making the Licensed Material available under these terms and conditions.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
Section 1 – Definitions.
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
a. Adapted Material means material subject to Copyright and Similar Rights that is derived from or based upon the Licensed Material and in which the Licensed Material is translated, altered, arranged, transformed, or otherwise modified in a manner requiring permission under the Copyright and Similar Rights held by the Licensor. For purposes of this Public License, where the Licensed Material is a musical work, performance, or sound recording, Adapted Material is always produced where the Licensed Material is synched in timed relation with a moving image.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
b. Adapter’s License means the license You apply to Your Copyright and Similar Rights in Your contributions to Adapted Material in accordance with the terms and conditions of this Public License.
|
||||
|
||||
c. BY-NC-SA Compatible License means a license listed at CreativeCommons.org/compatiblelicenses, approved by Creative Commons as essentially the equivalent of this Public License.
|
||||
|
||||
d. Copyright and Similar Rights means copyright and/or similar rights closely related to copyright including, without limitation, performance, broadcast, sound recording, and Sui Generis Database Rights, without regard to how the rights are labeled or categorized. For purposes of this Public License, the rights specified in Section 2(b)(1)-(2) are not Copyright and Similar Rights.
|
||||
|
||||
e. Effective Technological Measures means those measures that, in the absence of proper authority, may not be circumvented under laws fulfilling obligations under Article 11 of the WIPO Copyright Treaty adopted on December 20, 1996, and/or similar international agreements.
|
||||
|
||||
f. Exceptions and Limitations means fair use, fair dealing, and/or any other exception or limitation to Copyright and Similar Rights that applies to Your use of the Licensed Material.
|
||||
|
||||
g. License Elements means the license attributes listed in the name of a Creative Commons Public License. The License Elements of this Public License are Attribution, NonCommercial, and ShareAlike.
|
||||
|
||||
h. Licensed Material means the artistic or literary work, database, or other material to which the Licensor applied this Public License.
|
||||
|
||||
i. Licensed Rights means the rights granted to You subject to the terms and conditions of this Public License, which are limited to all Copyright and Similar Rights that apply to Your use of the Licensed Material and that the Licensor has authority to license.
|
||||
|
||||
j. Licensor means the individual(s) or entity(ies) granting rights under this Public License.
|
||||
|
||||
k. NonCommercial means not primarily intended for or directed towards commercial advantage or monetary compensation. For purposes of this Public License, the exchange of the Licensed Material for other material subject to Copyright and Similar Rights by digital file-sharing or similar means is NonCommercial provided there is no payment of monetary compensation in connection with the exchange.
|
||||
|
||||
l. Share means to provide material to the public by any means or process that requires permission under the Licensed Rights, such as reproduction, public display, public performance, distribution, dissemination, communication, or importation, and to make material available to the public including in ways that members of the public may access the material from a place and at a time individually chosen by them.
|
||||
|
||||
m. Sui Generis Database Rights means rights other than copyright resulting from Directive 96/9/EC of the European Parliament and of the Council of 11 March 1996 on the legal protection of databases, as amended and/or succeeded, as well as other essentially equivalent rights anywhere in the world.
|
||||
|
||||
n. You means the individual or entity exercising the Licensed Rights under this Public License. Your has a corresponding meaning.
|
||||
|
||||
Section 2 – Scope.
|
||||
|
||||
a. License grant.
|
||||
|
||||
1. Subject to the terms and conditions of this Public License, the Licensor hereby grants You a worldwide, royalty-free, non-sublicensable, non-exclusive, irrevocable license to exercise the Licensed Rights in the Licensed Material to:
|
||||
|
||||
A. reproduce and Share the Licensed Material, in whole or in part, for NonCommercial purposes only; and
|
||||
|
||||
B. produce, reproduce, and Share Adapted Material for NonCommercial purposes only.
|
||||
|
||||
2. Exceptions and Limitations. For the avoidance of doubt, where Exceptions and Limitations apply to Your use of the Licensed Material, this Public License does not apply, and You do not need to comply with its terms and conditions.
|
||||
|
||||
3. Term. The term of this Public License is specified in Section 6(a).
|
||||
|
||||
4. Media and formats; technical modifications allowed. The Licensor authorizes You to exercise the Licensed Rights in all media and formats whether now known or hereafter created, and to make technical modifications necessary to do so. The Licensor waives or agrees not to assert any right or authority to forbid You from making technical modifications necessary to exercise the Licensed Rights, including technical modifications necessary to circumvent Effective Technological Measures applied by the Licensor. For purposes of this Public License, making modifications authorized by this Section 2(a)(4) does not produce Adapted Material.
|
||||
|
||||
b. Other rights.
|
||||
|
||||
1. Moral rights, whether asserted or not, are not licensed under this Public License, nor are publicity, privacy, and/or other similar personality rights; however, to the extent possible, the Licensor waives or agrees not to assert any such rights held by the Licensor to the limited extent necessary to allow You to exercise the Licensed Rights.
|
||||
|
||||
2. Patent and trademark rights are not licensed under this Public License.
|
||||
|
||||
3. To the extent possible, the Licensor waives the right to collect royalties from You for the exercise of the Licensed Rights, whether directly or through a collecting society under any voluntary or waivable statutory or compulsory licensing scheme. In all other cases the Licensor expressly reserves the right to collect such royalties.
|
||||
|
||||
Section 3 – License Conditions.
|
||||
|
||||
Your exercise of the Licensed Rights is expressly made subject to the following conditions.
|
||||
|
||||
a. Attribution.
|
||||
|
||||
1. If You Share the Licensed Material (including in modified form), You must:
|
||||
|
||||
A. retain the following if it is supplied by the Licensor with the Licensed Material:
|
||||
|
||||
i. identification of the creator(s) of the Licensed Material and any others designated to receive attribution, in any reasonable manner requested by the Licensor (including by pseudonym if designated);
|
||||
|
||||
ii. a copyright notice;
|
||||
|
||||
iii. a notice that refers to this Public License;
|
||||
|
||||
iv. a notice that refers to the disclaimer of warranties;
|
||||
|
||||
v. a URI or hyperlink to the Licensed Material to the extent reasonably practicable;
|
||||
|
||||
B. indicate if You modified the Licensed Material and retain an indication of any previous modifications; and
|
||||
|
||||
C. indicate that the Licensed Material is licensed under this Public License, and include the text of, or the URI or hyperlink to, this Public License.
|
||||
|
||||
2. You may satisfy the conditions in Section 3(a)(1) in any reasonable manner based on the medium, means, and context in which You Share the Licensed Material. For example, it may be reasonable to satisfy the conditions by providing a URI or hyperlink to a resource that includes the required information.
|
||||
|
||||
3. If requested by the Licensor, You must remove any of the information required by Section 3(a)(1)(A) to the extent reasonably practicable.
|
||||
|
||||
b. ShareAlike.
|
||||
|
||||
In addition to the conditions in Section 3(a), if You Share Adapted Material You produce, the following conditions also apply.
|
||||
|
||||
1. The Adapter’s License You apply must be a Creative Commons license with the same License Elements, this version or later, or a BY-NC-SA Compatible License.
|
||||
|
||||
2. You must include the text of, or the URI or hyperlink to, the Adapter’s License You apply. You may satisfy this condition in any reasonable manner based on the medium, means, and context in which You Share Adapted Material.
|
||||
|
||||
3. You may not offer or impose any additional or different terms or conditions on, or apply any Effective Technological Measures to, Adapted Material that restrict exercise of the rights granted under the Adapter’s License You apply.
|
||||
|
||||
Section 4 – Sui Generis Database Rights.
|
||||
|
||||
Where the Licensed Rights include Sui Generis Database Rights that apply to Your use of the Licensed Material:
|
||||
|
||||
1. for the avoidance of doubt, Section 2(a)(1) grants You the right to extract, reuse, reproduce, and Share all or a substantial portion of the contents of the database for NonCommercial purposes only;
|
||||
|
||||
2. if You include all or a substantial portion of the database contents in a database in which You have Sui Generis Database Rights, then the database in which You have Sui Generis Rights (but not its individual contents) is Adapted Material, including for purposes of Section 3(b);
|
||||
|
||||
3. You must comply with the conditions in Section 3(a) if You Share all or a substantial portion of the contents of the database.
|
||||
|
||||
For the avoidance of doubt, this Section 4 supplements and does not replace Your obligations under this Public License where the Licensed Rights include other Copyright and Similar Rights.
|
||||
|
||||
Section 5 – Disclaimer of Warranties and Limitation of Liability.
|
||||
|
||||
1. Unless otherwise separately undertaken by the Licensor, to the extent possible, the Licensor offers the Licensed Material “as-is” and as-available, and makes no representations or warranties of any kind concerning the Licensed Material, whether express, implied, statutory, or other. This includes, without limitation, warranties of title, merchantability, fitness for a particular purpose, non-infringement, absence of latent or other defects, accuracy, or the presence or absence of errors, whether or not known or discoverable. Where disclaimers of warranties are not allowed in full or in part, this disclaimer may not apply to You.
|
||||
|
||||
2. To the extent possible, in no event will the Licensor be liable to You on any legal theory (including, without limitation, negligence) or otherwise for any direct, special, indirect, incidental, consequential, punitive, exemplary, or other losses, costs, expenses, or damages arising out of this Public License or use of the Licensed Material, even if the Licensor has been advised of the possibility of such losses, costs, expenses, or damages. Where a limitation of liability is not allowed in full or in part, this limitation may not apply to You.
|
||||
|
||||
3. The disclaimer of warranties and limitation of liability provided above shall be interpreted in a manner that, to the extent possible, most closely approximates an absolute disclaimer and waiver of all liability.
|
||||
|
||||
Section 6 – Term and Termination.
|
||||
|
||||
a. Term.
|
||||
|
||||
This Public License applies for the term of the Copyright and Similar Rights licensed here. However, if You fail to comply with this Public License, then Your rights under this Public License terminate automatically.
|
||||
|
||||
b. Reinstatement.
|
||||
|
||||
Where Your right to use the Licensed Material has terminated under Section 6(a), it reinstates:
|
||||
|
||||
1. automatically as of the date the violation is cured, provided it is cured within 30 days of Your discovery of the violation; or
|
||||
|
||||
2. upon express reinstatement by the Licensor.
|
||||
|
||||
For the avoidance of doubt, this Section 6(b) does not affect any right the Licensor may have to seek remedies for Your violations of this Public License.
|
||||
|
||||
c. The Licensor may also offer the Licensed Material under separate terms or conditions or stop distributing the Licensed Material at any time; however, doing so will not terminate this Public License.
|
||||
|
||||
d. Sections 1, 5, 6, 7, and 8 survive termination of this Public License.
|
||||
|
||||
Section 7 – Other Terms and Conditions.
|
||||
|
||||
a. The Licensor shall not be bound by any additional or different terms or conditions communicated by You unless expressly agreed to.
|
||||
|
||||
b. Any arrangements, understandings, or agreements regarding the Licensed Material not stated herein are separate from and independent of the terms and conditions of this Public License.
|
||||
|
||||
Section 8 – Interpretation.
|
||||
|
||||
a. For the avoidance of doubt, this Public License does not, and shall not be interpreted to, reduce, limit, restrict, or impose conditions on any use of the Licensed Material that could lawfully be made without permission under this Public License.
|
||||
|
||||
b. To the extent possible, if any provision of this Public License is deemed unenforceable, it shall be automatically reformed to the minimum extent necessary to make it enforceable. If the provision cannot be reformed, it shall be severed from this Public License without affecting the enforceability of the remaining terms and conditions.
|
||||
|
||||
c. No term or condition of this Public License will be waived and no failure to comply consented to unless expressly agreed to by the Licensor.
|
||||
|
||||
d. Nothing in this Public License constitutes or may be interpreted as a limitation upon, or waiver of, any privileges and immunities that apply to the Licensor or You, including from the legal processes of any jurisdiction or authority.
|
||||
|
||||
---
|
||||
|
||||
Creative Commons is not a party to its public licenses. Notwithstanding, Creative Commons may elect to apply one of its public licenses to material it publishes and in those instances will be considered the “Licensor.” Except for the limited purpose of indicating that material is shared under a Creative Commons public license or as otherwise permitted by the Creative Commons policies, Creative Commons does not authorize the use of the trademark “Creative Commons” or any other trademark or logo of Creative Commons without its prior written consent including, without limitation, in connection with any unauthorized modifications to any of its public licenses or any other arrangements, understandings, or agreements concerning use of licensed material. For the avoidance of doubt, this paragraph does not form part of the public licenses. Creative Commons may be contacted at https://creativecommons.org.
|
||||
|
||||
256
README.md
@@ -2,6 +2,9 @@
|
||||
<h3 align="center">
|
||||
<a href="README.md">🇨🇳 中文</a> · <a href="EN_README.md">🇺🇸 English</a>
|
||||
</h3>
|
||||
<blockquote align="center">
|
||||
This project now supports English. Don't hesitate to give it a try!
|
||||
</blockquote>
|
||||
<p align="center">— ✦ —</p>
|
||||
|
||||
# 修仙世界模拟器 (Cultivation World Simulator)
|
||||
@@ -9,19 +12,12 @@
|
||||

|
||||
[](https://space.bilibili.com/527346837)
|
||||

|
||||
|
||||

|
||||

|
||||

|
||||
[](LICENSE)
|
||||
|
||||

|
||||

|
||||
[](https://discord.gg/shhRWmZR)
|
||||
[](LICENSE)
|
||||

|
||||

|
||||

|
||||

|
||||
|
||||

|
||||

|
||||

|
||||

|
||||
@@ -31,11 +27,17 @@
|
||||
|
||||
|
||||
<p align="center">
|
||||
<img src="assets/screenshot.gif" alt="游戏演示" width="100%">
|
||||
<img src="assets/zh-CN/screenshot.gif" alt="游戏演示" width="100%">
|
||||
</p>
|
||||
|
||||
> **一个AI驱动的修仙世界模拟器,旨在创造一个真正活着的、有沉浸感的仙侠世界。**
|
||||
|
||||
<p align="center">
|
||||
<a href="https://hellogithub.com/repository/4thfever/cultivation-world-simulator" target="_blank">
|
||||
<img src="https://api.hellogithub.com/v1/widgets/recommend.svg?rid=d0d75240fb95445bba1d7af7574d8420&claim_uid=DogxfCROM1PBL89" alt="Featured|HelloGitHub" style="width: 250px; height: 54px;" width="250" height="54" />
|
||||
</a>
|
||||
</p>
|
||||
|
||||
## 📖 简介
|
||||
|
||||
这是一个 **AI 驱动的开放世界修仙模拟器**。
|
||||
@@ -54,43 +56,43 @@
|
||||
<tr>
|
||||
<td width="33%" valign="top">
|
||||
<h4 align="center">宗门体系</h4>
|
||||
<img src="assets/screenshots/宗门.png" width="100%" />
|
||||
<img src="assets/zh-CN/screenshots/宗门.png" width="100%" />
|
||||
<br/><br/>
|
||||
<h4 align="center">城市区域</h4>
|
||||
<img src="assets/screenshots/城市.png" width="100%" />
|
||||
<img src="assets/zh-CN/screenshots/城市.png" width="100%" />
|
||||
<br/><br/>
|
||||
<h4 align="center">生平经历</h4>
|
||||
<img src="assets/screenshots/经历.png" width="100%" />
|
||||
<img src="assets/zh-CN/screenshots/经历.png" width="100%" />
|
||||
</td>
|
||||
<td width="33%" valign="top">
|
||||
<h4 align="center">角色面板</h4>
|
||||
<img src="assets/screenshots/角色.png" width="100%" />
|
||||
<img src="assets/zh-CN/screenshots/角色.png" width="100%" />
|
||||
<br/><br/>
|
||||
<h4 align="center">性格特质</h4>
|
||||
<img src="assets/screenshots/特质.png" width="100%" />
|
||||
<img src="assets/zh-CN/screenshots/特质.png" width="100%" />
|
||||
<br/><br/>
|
||||
<h4 align="center">自主思考</h4>
|
||||
<img src="assets/screenshots/思考.png" width="100%" />
|
||||
<img src="assets/zh-CN/screenshots/思考.png" width="100%" />
|
||||
<br/><br/>
|
||||
<h4 align="center">江湖绰号</h4>
|
||||
<img src="assets/screenshots/绰号.png" width="100%" />
|
||||
<img src="assets/zh-CN/screenshots/绰号.png" width="100%" />
|
||||
</td>
|
||||
<td width="33%" valign="top">
|
||||
<h4 align="center">洞府探秘</h4>
|
||||
<img src="assets/screenshots/洞府.png" width="100%" />
|
||||
<img src="assets/zh-CN/screenshots/洞府.png" width="100%" />
|
||||
<br/><br/>
|
||||
<h4 align="center">长短期目标</h4>
|
||||
<img src="assets/screenshots/目标.png" width="100%" />
|
||||
<img src="assets/zh-CN/screenshots/目标.png" width="100%" />
|
||||
<br/><br/>
|
||||
<h4 align="center">丹药/法宝/武器</h4>
|
||||
<img src="assets/screenshots/丹药.png" width="100%" />
|
||||
<img src="assets/screenshots/法宝.png" width="100%" />
|
||||
<img src="assets/screenshots/武器.png" width="100%" />
|
||||
<img src="assets/zh-CN/screenshots/丹药.png" width="100%" />
|
||||
<img src="assets/zh-CN/screenshots/法宝.png" width="100%" />
|
||||
<img src="assets/zh-CN/screenshots/武器.png" width="100%" />
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
### 为什么要做这个?
|
||||
### 💭 为什么要做这个?
|
||||
修仙网文中的世界很精彩,但读者永远只能观察到一隅。
|
||||
|
||||
修仙品类游戏要么是完全的预设剧本,要么依靠人工设计的简单规则状态机,有许许多多牵强和降智的表现。
|
||||
@@ -99,12 +101,146 @@
|
||||
|
||||
希望能够创造出纯粹的、快乐的、直接的、活着的修仙世界的沉浸感。不是像一些游戏公司的纯粹宣传工具,也不是像斯坦福小镇那样的纯粹研究,而是能给玩家提供真实代入感和沉浸感的实际世界。
|
||||
|
||||
## 联系方式
|
||||
## 📞 联系方式
|
||||
如果您对项目有任何问题或建议,欢迎提交 Issue 或 Pull Request。
|
||||
欢迎给我的[B站账号](https://space.bilibili.com/527346837)留言!
|
||||
也可以加入QQ群进行讨论:1071821688。进群需要输入我的B站昵称。
|
||||
也可以加入QQ群进行讨论:1071821688。进群问题的答案:肥桥今天吃什么
|
||||
加入 Discord 社区:[https://discord.gg/shhRWmZR](https://discord.gg/shhRWmZR)
|
||||
|
||||
## 功能开发进度
|
||||
## 🚀 使用方法
|
||||
|
||||
### ⚙️ 运行步骤
|
||||
|
||||
#### 方式一:Docker Compose 一键部署(推荐)
|
||||
|
||||
如果你已经安装了 Docker,这是最简单的方式:
|
||||
|
||||
1. **克隆项目**
|
||||
```bash
|
||||
git clone https://github.com/AI-Cultivation/cultivation-world-simulator.git
|
||||
cd cultivation-world-simulator
|
||||
```
|
||||
|
||||
2. **启动服务(自动构建并运行)**
|
||||
```bash
|
||||
docker-compose up -d --build
|
||||
```
|
||||
|
||||
#### 方式二:手动安装运行
|
||||
|
||||
1. 克隆项目到本地:
|
||||
```bash
|
||||
git clone https://github.com/AI-Cultivation/cultivation-world-simulator.git
|
||||
cd cultivation-world-simulator
|
||||
```
|
||||
|
||||
2. 安装依赖:
|
||||
```bash
|
||||
# 后端依赖
|
||||
pip install -r requirements.txt
|
||||
|
||||
# 前端依赖 (需Node.js环境)
|
||||
cd web && npm install
|
||||
```
|
||||
|
||||
3. 配置LLM:
|
||||
|
||||
**推荐方式:在前端直接配置(支持快速填充预设)**
|
||||
|
||||
<img src="assets/zh-CN/llm_config.png" alt="前端LLM配置" width="100%">
|
||||
|
||||
也可以在 `static/local_config.yml` 中手动配置(OpenAI兼容格式):
|
||||
```yaml
|
||||
llm:
|
||||
base_url: https://api.deepseek.com # API地址
|
||||
key: your-api-key-here # 你的API密钥
|
||||
model_name: deepseek-chat # 智能模型名称
|
||||
fast_model_name: deepseek-chat # 快速模型名称
|
||||
mode: default # 运行模式 (default/normal/fast)
|
||||
```
|
||||
|
||||
**本地部署 (Ollama):** 也支持对接本地 Ollama,在前端选择 "Ollama (本地)" 预设即可。
|
||||
|
||||
4. 运行:
|
||||
```bash
|
||||
# 启动服务 (推荐开发模式,会自动启动前端)
|
||||
python src/server/main.py --dev
|
||||
```
|
||||
浏览器会自动打开网页前端。
|
||||
|
||||
### 🌐 访问应用
|
||||
|
||||
无论使用哪种方式运行,启动后都可以通过以下地址访问:
|
||||
|
||||
前端:`http://localhost:8123`
|
||||
后端 API:`http://localhost:8002`
|
||||
|
||||
### 📱 手机/局域网访问
|
||||
|
||||
支持从局域网内的其他设备(如手机、平板)访问游戏。
|
||||
|
||||
> ⚠️ **注意**:移动端 UI 目前未做适配优化,体验可能不佳。详见 [Issue #130](https://github.com/4thfever/cultivation-world-simulator/issues/130)。
|
||||
|
||||
**配置步骤:**
|
||||
|
||||
1. 在 `static/local_config.yml` 中添加:
|
||||
```yaml
|
||||
system:
|
||||
host: "0.0.0.0" # 允许局域网访问
|
||||
```
|
||||
|
||||
2. 如果使用开发模式(`--dev`),还需在 `web/vite.config.ts` 的 `server` 配置中添加:
|
||||
```typescript
|
||||
server: {
|
||||
host: '0.0.0.0', // 添加这一行
|
||||
proxy: { ... }
|
||||
}
|
||||
```
|
||||
|
||||
3. 启动服务器后,在手机浏览器访问:
|
||||
```
|
||||
http://<电脑局域网IP>:5173 # 开发模式
|
||||
http://<电脑局域网IP>:8002 # 生产模式
|
||||
```
|
||||
|
||||
4. 查看电脑局域网 IP:
|
||||
```bash
|
||||
# macOS
|
||||
ipconfig getifaddr en0
|
||||
|
||||
# Linux
|
||||
hostname -I
|
||||
|
||||
# Windows
|
||||
ipconfig
|
||||
```
|
||||
|
||||
> 💡 确保手机和电脑连接同一个 WiFi,且防火墙已放行对应端口。
|
||||
|
||||
|
||||
## 📊 项目状态
|
||||
|
||||

|
||||
|
||||
## ⭐ 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=11" />
|
||||
</a>
|
||||
|
||||
更多贡献细节请查看 [CONTRIBUTORS.md](CONTRIBUTORS.md)。
|
||||
|
||||
## 📋 功能开发进度
|
||||
|
||||
### 🏗️ 基础系统
|
||||
- ✅ 基础世界地图、时间、事件系统
|
||||
@@ -116,8 +252,9 @@
|
||||
- ✅ 菜单栏 & 存档 & 读档
|
||||
- ✅ 灵活自定义LLM接口
|
||||
- ✅ 支持mac os
|
||||
- [ ] 支持多语言本地化
|
||||
- [ ] 开始游戏时的游戏设定栏
|
||||
- ✅ 多语言本地化
|
||||
- ✅ 开始游戏页
|
||||
- [ ] Mod支持
|
||||
|
||||
### 🗺️ 世界系统
|
||||
- ✅ 基础tile地块系统
|
||||
@@ -149,7 +286,6 @@
|
||||
- [ ] 饲养
|
||||
- [ ] 技能可升级
|
||||
- [ ] 凡人系统
|
||||
- [ ] 天骄系统(更强能力,更强AI)
|
||||
|
||||
### 🏛️ 组织系统
|
||||
- [ ] 宗门系统
|
||||
@@ -175,9 +311,9 @@
|
||||
|
||||
### 🎭 事件系统
|
||||
- ✅ 天地灵气变动
|
||||
- [ ] 世界范围大事件:
|
||||
- [ ] 拍卖会
|
||||
- [ ] 秘境探索
|
||||
- ✅ 多人大事件:
|
||||
- ✅ 拍卖会
|
||||
- ✅ 秘境探索
|
||||
- [ ] 比武大会
|
||||
- [ ] 宗门大比
|
||||
- [ ] 突发事件
|
||||
@@ -216,10 +352,9 @@
|
||||
|
||||
### 🏛️ 世界背景系统
|
||||
- ✅ 注入基础世界知识
|
||||
- [ ] 动态世界观生成
|
||||
- [ ] 基于用户输入历史的动态功法、装备、宗门、地图生成
|
||||
- ✅ 用户输入历史,动态生成功法、装备、宗门、区域信息
|
||||
|
||||
### 特殊
|
||||
### ✨ 特殊
|
||||
- ✅ 奇遇
|
||||
- ✅ 天劫 & 心魔
|
||||
- [ ] 夺舍 & 重生
|
||||
@@ -236,51 +371,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化,修士自行调用工具
|
||||
8
ROADMAP.md
Normal file
@@ -0,0 +1,8 @@
|
||||
# 2026Q1
|
||||
完善宗门体系
|
||||
世家体系
|
||||
凡人体系
|
||||
# 2026Q2
|
||||
玩家更多的干涉手段
|
||||
安卓支持
|
||||
mod支持
|
||||
|
Before Width: | Height: | Size: 1.9 KiB After Width: | Height: | Size: 1.9 KiB |
|
Before Width: | Height: | Size: 204 KiB After Width: | Height: | Size: 204 KiB |
|
Before Width: | Height: | Size: 2.0 KiB After Width: | Height: | Size: 2.0 KiB |
|
Before Width: | Height: | Size: 208 KiB After Width: | Height: | Size: 208 KiB |
|
Before Width: | Height: | Size: 1.9 KiB After Width: | Height: | Size: 1.9 KiB |
|
Before Width: | Height: | Size: 196 KiB After Width: | Height: | Size: 196 KiB |
|
Before Width: | Height: | Size: 1.9 KiB After Width: | Height: | Size: 1.9 KiB |
|
Before Width: | Height: | Size: 191 KiB After Width: | Height: | Size: 191 KiB |
|
Before Width: | Height: | Size: 2.1 KiB After Width: | Height: | Size: 2.1 KiB |
|
Before Width: | Height: | Size: 263 KiB After Width: | Height: | Size: 263 KiB |
|
Before Width: | Height: | Size: 2.1 KiB After Width: | Height: | Size: 2.1 KiB |
|
Before Width: | Height: | Size: 244 KiB After Width: | Height: | Size: 244 KiB |
|
Before Width: | Height: | Size: 2.1 KiB After Width: | Height: | Size: 2.1 KiB |
|
Before Width: | Height: | Size: 238 KiB After Width: | Height: | Size: 238 KiB |
|
Before Width: | Height: | Size: 2.1 KiB After Width: | Height: | Size: 2.1 KiB |
|
Before Width: | Height: | Size: 218 KiB After Width: | Height: | Size: 218 KiB |
|
Before Width: | Height: | Size: 2.1 KiB After Width: | Height: | Size: 2.1 KiB |
|
Before Width: | Height: | Size: 357 KiB After Width: | Height: | Size: 357 KiB |
|
Before Width: | Height: | Size: 2.1 KiB After Width: | Height: | Size: 2.1 KiB |
|
Before Width: | Height: | Size: 348 KiB After Width: | Height: | Size: 348 KiB |
|
Before Width: | Height: | Size: 2.0 KiB After Width: | Height: | Size: 2.0 KiB |
|
Before Width: | Height: | Size: 335 KiB After Width: | Height: | Size: 335 KiB |
|
Before Width: | Height: | Size: 2.1 KiB After Width: | Height: | Size: 2.1 KiB |
|
Before Width: | Height: | Size: 325 KiB After Width: | Height: | Size: 325 KiB |
|
Before Width: | Height: | Size: 2.0 KiB After Width: | Height: | Size: 2.0 KiB |
|
Before Width: | Height: | Size: 222 KiB After Width: | Height: | Size: 222 KiB |
|
Before Width: | Height: | Size: 2.0 KiB After Width: | Height: | Size: 2.0 KiB |
|
Before Width: | Height: | Size: 230 KiB After Width: | Height: | Size: 230 KiB |
|
Before Width: | Height: | Size: 1.9 KiB After Width: | Height: | Size: 1.9 KiB |
|
Before Width: | Height: | Size: 194 KiB After Width: | Height: | Size: 194 KiB |
|
Before Width: | Height: | Size: 2.0 KiB After Width: | Height: | Size: 2.0 KiB |
|
Before Width: | Height: | Size: 198 KiB After Width: | Height: | Size: 198 KiB |
|
Before Width: | Height: | Size: 2.0 KiB After Width: | Height: | Size: 2.0 KiB |
|
Before Width: | Height: | Size: 292 KiB After Width: | Height: | Size: 292 KiB |
|
Before Width: | Height: | Size: 2.0 KiB After Width: | Height: | Size: 2.0 KiB |
|
Before Width: | Height: | Size: 281 KiB After Width: | Height: | Size: 281 KiB |
|
Before Width: | Height: | Size: 1.9 KiB After Width: | Height: | Size: 1.9 KiB |
|
Before Width: | Height: | Size: 255 KiB After Width: | Height: | Size: 255 KiB |
|
Before Width: | Height: | Size: 2.0 KiB After Width: | Height: | Size: 2.0 KiB |
|
Before Width: | Height: | Size: 275 KiB After Width: | Height: | Size: 275 KiB |
BIN
assets/en-US/llm_config.png
Normal file
|
After Width: | Height: | Size: 45 KiB |
BIN
assets/en-US/screenshot.gif
Normal file
|
After Width: | Height: | Size: 30 MiB |
|
Before Width: | Height: | Size: 1.5 MiB After Width: | Height: | Size: 1.5 MiB |
BIN
assets/en-US/screenshots/丹药.png
Normal file
|
After Width: | Height: | Size: 36 KiB |
BIN
assets/en-US/screenshots/城市.png
Normal file
|
After Width: | Height: | Size: 64 KiB |
BIN
assets/en-US/screenshots/宗门.png
Normal file
|
After Width: | Height: | Size: 109 KiB |
BIN
assets/en-US/screenshots/思考.png
Normal file
|
After Width: | Height: | Size: 80 KiB |
BIN
assets/en-US/screenshots/武器.png
Normal file
|
After Width: | Height: | Size: 32 KiB |
BIN
assets/en-US/screenshots/法宝.png
Normal file
|
After Width: | Height: | Size: 27 KiB |
BIN
assets/en-US/screenshots/洞府.png
Normal file
|
After Width: | Height: | Size: 65 KiB |
BIN
assets/en-US/screenshots/特质.png
Normal file
|
After Width: | Height: | Size: 53 KiB |
BIN
assets/en-US/screenshots/目标.png
Normal file
|
After Width: | Height: | Size: 54 KiB |
BIN
assets/en-US/screenshots/经历.png
Normal file
|
After Width: | Height: | Size: 22 KiB |
BIN
assets/en-US/screenshots/绰号.png
Normal file
|
After Width: | Height: | Size: 28 KiB |
BIN
assets/en-US/screenshots/角色.png
Normal file
|
After Width: | Height: | Size: 69 KiB |
|
Before Width: | Height: | Size: 318 KiB After Width: | Height: | Size: 318 KiB |
|
Before Width: | Height: | Size: 2.0 MiB After Width: | Height: | Size: 2.0 MiB |
|
Before Width: | Height: | Size: 9.6 KiB After Width: | Height: | Size: 9.6 KiB |
|
Before Width: | Height: | Size: 9.6 KiB After Width: | Height: | Size: 9.6 KiB |
|
Before Width: | Height: | Size: 9.6 KiB After Width: | Height: | Size: 9.6 KiB |
|
Before Width: | Height: | Size: 10 KiB After Width: | Height: | Size: 10 KiB |
|
Before Width: | Height: | Size: 1.6 MiB After Width: | Height: | Size: 1.6 MiB |
|
Before Width: | Height: | Size: 6.5 KiB After Width: | Height: | Size: 6.5 KiB |
|
Before Width: | Height: | Size: 6.1 KiB After Width: | Height: | Size: 6.1 KiB |
|
Before Width: | Height: | Size: 8.6 KiB After Width: | Height: | Size: 8.6 KiB |
|
Before Width: | Height: | Size: 9.0 KiB After Width: | Height: | Size: 9.0 KiB |
|
Before Width: | Height: | Size: 2.0 MiB After Width: | Height: | Size: 2.0 MiB |
|
Before Width: | Height: | Size: 8.4 KiB After Width: | Height: | Size: 8.4 KiB |
|
Before Width: | Height: | Size: 9.5 KiB After Width: | Height: | Size: 9.5 KiB |
|
Before Width: | Height: | Size: 9.7 KiB After Width: | Height: | Size: 9.7 KiB |
|
Before Width: | Height: | Size: 9.6 KiB After Width: | Height: | Size: 9.6 KiB |
|
Before Width: | Height: | Size: 1.7 MiB After Width: | Height: | Size: 1.7 MiB |
|
Before Width: | Height: | Size: 6.2 KiB After Width: | Height: | Size: 6.2 KiB |
|
Before Width: | Height: | Size: 7.6 KiB After Width: | Height: | Size: 7.6 KiB |
|
Before Width: | Height: | Size: 8.5 KiB After Width: | Height: | Size: 8.5 KiB |
|
Before Width: | Height: | Size: 8.9 KiB After Width: | Height: | Size: 8.9 KiB |
|
Before Width: | Height: | Size: 1.8 MiB After Width: | Height: | Size: 1.8 MiB |
|
Before Width: | Height: | Size: 7.4 KiB After Width: | Height: | Size: 7.4 KiB |
|
Before Width: | Height: | Size: 8.7 KiB After Width: | Height: | Size: 8.7 KiB |
|
Before Width: | Height: | Size: 9.4 KiB After Width: | Height: | Size: 9.4 KiB |
|
Before Width: | Height: | Size: 9.8 KiB After Width: | Height: | Size: 9.8 KiB |
|
Before Width: | Height: | Size: 8.7 KiB After Width: | Height: | Size: 8.7 KiB |
|
Before Width: | Height: | Size: 8.3 KiB After Width: | Height: | Size: 8.3 KiB |
|
Before Width: | Height: | Size: 9.3 KiB After Width: | Height: | Size: 9.3 KiB |
|
Before Width: | Height: | Size: 9.6 KiB After Width: | Height: | Size: 9.6 KiB |
|
Before Width: | Height: | Size: 352 KiB After Width: | Height: | Size: 352 KiB |
|
Before Width: | Height: | Size: 8.5 KiB After Width: | Height: | Size: 8.5 KiB |