From 2f6e145cf1c7e8931900185e5915fff504351c5e Mon Sep 17 00:00:00 2001 From: Vinlic Date: Sat, 24 Oct 2026 16:55:16 +0800 Subject: [PATCH] docs: add WIP notice + English README with language switcher --- README.md | 5 +++++ README_EN.md | 48 ++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 53 insertions(+) create mode 100644 README_EN.md diff --git a/README.md b/README.md index e884ace..f0e8542 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,10 @@ # mods-core +**[简体中文](README.md) | [English](README_EN.md)** + +> [!NOTE] +> 当前 mod 仍在开发测试期,可能存在功能不完整或不稳定的情况。商店与分发体系正在建设中。 + SandboxWorld 的 mod 集合仓——源码、构建与**商店注册表源仓**。 ## 结构 diff --git a/README_EN.md b/README_EN.md new file mode 100644 index 0000000..4e44d71 --- /dev/null +++ b/README_EN.md @@ -0,0 +1,48 @@ +# mods-core + +**[简体中文](README.md) | [English](README_EN.md)** + +> [!NOTE] +> Mods are still in active development and testing — features may be incomplete or unstable. The store and distribution infrastructure is under construction. + +The SandboxWorld mod collection repository — source, builds, and the **store registry source repo**. + +## Structure + +``` +/ + mod.json # Store schema v2 (required: id/name/version/author/description/ + # minEngine/category; optional: tags/dependencies/config) + icon.png # Store card icon + content/ # L1 declarative content / scripts/ (L2 scripting) / textures/ / i18n/ +tools/gen-mod-registry.mjs # Registry generator (scan → registry.json) +``` + +## Store Architecture (three decoupled layers) + +- **Source layer**: this repo (many mods, one repo). Giant mods (e.g. calamity) + live in dedicated `-port` repos and publish to the same registry schema; +- **Index layer**: `registry.json` (auto-regenerated by CI on merge, deployed to CDN); +- **Artifact layer**: `.swmod` builds distributed via GitHub Releases; the registry + records SHA-256 hashes. + +## Building a mod + +Inside the Open-Terraria repo: `node scripts/mod-cli.mjs build ` → `.swmod`. + +## Regenerating the registry locally + +```bash +node tools/gen-mod-registry.mjs +``` + +## Conventions + +- mod id: `[a-z0-9_]+` (store key domain, enforced by the validator); +- `minEngine`: minimum engine version (the in-game store filters by current version); +- a missing icon.png triggers a generator warning (non-blocking). + +## License + +Each mod's licensing is defined by its `mod.json` author field and PORTING.md (if present); +repo tooling is MIT.