GFramework/tools/gframework-config-tool
GeWuYou 7c07395825 docs(config): 添加游戏内容配置系统完整文档
- 介绍面向静态游戏内容的 AI-First 配表方案
- 说明 YAML 配置源文件和 JSON Schema 结构描述支持
- 提供推荐目录结构和 Schema 配置示例
- 展示怪物配置和物品配置的 YAML 示例
- 提供完整的接入模板包括 csproj 配置和启动代码
- 介绍官方启动帮助器 GameConfigBootstrap 使用方法
- 说明 Godot 引擎文本配置桥接功能
- 提供运行时读取模板和生成查询辅助功能
- 介绍 Architecture 架构接入模板和热重载配置
- 详述运行时接入方式和注册辅助功能
- 说明运行时校验行为和跨表引用机制
- 提供开发期热重载功能配置指南
- 介绍生成器接入约定和 VS Code 工具支持
- 列出当前功能限制和独立工具评估结论
- 添加配置验证 JavaScript 实现代码
- 实现字符串格式验证和正则表达式校验
- 提供 schema 解析和 YAML 解析功能
- 实现配置字段编辑和注释提取功能
2026-04-11 14:44:00 +08:00
..

GFramework Config Tool

VS Code extension for the GFramework AI-First config workflow.

Current MVP

  • Browse config files from the workspace config/ directory
  • Open raw YAML files
  • Open matching schema files from schemas/
  • Localize extension UI text in English and Simplified Chinese, including the form preview, prompts, and notifications
  • Run lightweight schema validation for nested required fields, unknown nested fields, scalar types, scalar arrays, and arrays of objects
  • Open a lightweight form preview for nested object fields, object arrays, top-level scalar fields, and scalar arrays
  • Render existing YAML comments in the form preview and edit per-field YAML comments directly from the form
  • Jump from reference fields to the referenced schema, config domain, or direct config file when a reference value is present
  • Initialize empty config files from schema-derived example YAML
  • Batch edit one config domain across multiple files for top-level scalar and scalar-array fields
  • Surface schema metadata such as title, description, default, enum, and x-gframework-ref-table in the lightweight editors

Validation Coverage

The extension currently validates the repository's minimal config-schema subset:

  • required properties in nested objects
  • unknown properties in nested objects
  • scalar compatibility for integer, number, boolean, and string
  • scalar arrays with scalar item type checks
  • arrays of objects whose items use the same supported subset recursively
  • scalar enum constraints and scalar-array item enum constraints

Local Testing

cd tools/gframework-config-tool
bun install
bun run test

Packaging And Publishing

cd tools/gframework-config-tool
bun install
bun run package:vsix
VSCE_PAT=your_marketplace_pat bun run publish:marketplace

Current Constraints

  • Multi-root workspaces use the first workspace folder
  • Validation only covers a minimal subset of JSON Schema
  • Form preview supports object-array editing, but nested object arrays inside array items still fall back to raw YAML
  • Batch editing remains limited to top-level scalar fields and top-level scalar arrays

Workspace Settings

  • gframeworkConfig.configPath
  • gframeworkConfig.schemasPath