From cb6217d0cdeb3711d8cc025833adc4d0bf59be38 Mon Sep 17 00:00:00 2001 From: wjsjwr Date: Sun, 18 Jan 2026 12:38:03 +0800 Subject: [PATCH] NDBS update --- GEMINI.md | 67 ++ docs/配置定义系统文档.md | 188 +++++ tools/ndbs/server/web/app.js | 1256 +++++++++++++++++++++++++++++- tools/ndbs/server/web/index.html | 41 +- tools/ndbs/server/web/styles.css | 146 ++++ 5 files changed, 1689 insertions(+), 9 deletions(-) create mode 100644 GEMINI.md create mode 100644 docs/配置定义系统文档.md diff --git a/GEMINI.md b/GEMINI.md new file mode 100644 index 0000000..5eba249 --- /dev/null +++ b/GEMINI.md @@ -0,0 +1,67 @@ +# GEMINI.md - Context & Instructions for "Super Mentor" (最强导师) + +## 1. Project Overview + +**Project Name:** Super Mentor (最强导师 / Supervisor Simulator) +**Type:** Simulation / Strategy / Roguelite Game +**Engine:** Godot 4.x (C# / .NET) +**Platform:** Windows (Win32), likely cross-platform capable. + +**Core Concept:** +A "survival horror" simulation of academic life. Players manage a lab, recruit students, publish papers, secure funding, and navigate academic politics ("publish or perish"). + +## 2. Architecture & Directory Structure + +### 2.1 Game Engine (Godot/C#) +* **Root:** Contains `project.godot`, `.sln`, `.csproj`. +* **`scripts/`**: The core C# source code. + * `Core/`: Game systems (TurnSystem, TaskSystem, EconomySystem, SynergySystem) and Interfaces. + * `Models/`: Data models (StudentModel, TaskModel, etc.) and Definitions. + * `[Node classes]`: `Player.cs`, `Student.cs` (Godot Node behaviors). +* **`resources/definitions/`**: Data-driven design files. + * `.json`: Archetypes, Roles, Traits. + * `.tres`: Discipline specific resources (Godot Text Resource). +* **`scenes/`**: Godot `.tscn` scene files. +* **`docs/`**: Detailed game design documents (GDD). + +### 2.2 Tooling: Numerical Design & Balancing System (NDBS) +Located in `tools/ndbs/`, this is a web-based tool for designers to edit game data and write scripts. +* **Backend:** Python 3.14 (FastAPI), managed by `uv`. +* **Frontend:** Vue.js (Vite, Naive UI/Element Plus). +* **Spec:** `specs/numerical_design_system.md`. + +## 3. Building & Development + +### 3.1 Game (Godot) +* **Prerequisites:** Godot Engine (Mono version), .NET SDK. +* **Build:** Standard Godot build process or via IDE (Visual Studio / JetBrains Rider / VS Code). +* **Run:** Open `project.godot` in Godot Editor or run via CLI. + +### 3.2 NDBS Tool (`tools/ndbs`) +* **Backend (`tools/ndbs/server`):** + * Manager: `uv` + * Run: `uv run main.py` (or `uvicorn main:app --reload`) +* **Frontend (`tools/ndbs/client`):** + * Manager: `npm` / `yarn` + * Build: `npm run build` (Output consumed by Python server). + +## 4. Key Conventions + +### 4.1 C# / Godot +* **Systems Pattern:** Core logic is decoupled from Godot Nodes where possible, residing in `scripts/Core` implementing `IGameSystem`. +* **Rule System:** Game logic "rules" (Buffs/Debuffs) are referenced by string IDs (`RuleIds`) and executed via a `RuleManager` (using Reflection). +* **Data Driven:** Heavy reliance on JSON/TRES definitions for content. + +### 4.2 Code Style +* **C#:** Standard .NET conventions (PascalCase for public, camelCase for private/locals). +* **Python:** Type hints required (Python 3.14+). Pydantic for data validation. +* **Frontend:** Vue Composition API (`