{"id":28725868,"url":"https://github.com/iplaylf2/lf2-taiwu-mods","last_synced_at":"2026-01-31T22:03:50.136Z","repository":{"id":298832539,"uuid":"1000969012","full_name":"iplaylf2/lf2-taiwu-mods","owner":"iplaylf2","description":"🎮 太吾绘卷 Mod 开发模板 - 现代化工具链与自动化构建系统","archived":false,"fork":false,"pushed_at":"2025-11-16T11:47:20.000Z","size":189,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-11-16T12:21:37.926Z","etag":null,"topics":["dotnet","mod","monorepo","taiwu","unity"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/iplaylf2.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-06-12T15:46:51.000Z","updated_at":"2025-11-16T11:47:11.000Z","dependencies_parsed_at":"2025-06-13T06:34:29.858Z","dependency_job_id":"34205fb0-853b-4d6e-a369-084a7e38e9d9","html_url":"https://github.com/iplaylf2/lf2-taiwu-mods","commit_stats":null,"previous_names":["iplaylf2/lf2-taiwu-mods"],"tags_count":6,"template":true,"template_full_name":null,"purl":"pkg:github/iplaylf2/lf2-taiwu-mods","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iplaylf2%2Flf2-taiwu-mods","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iplaylf2%2Flf2-taiwu-mods/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iplaylf2%2Flf2-taiwu-mods/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iplaylf2%2Flf2-taiwu-mods/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/iplaylf2","download_url":"https://codeload.github.com/iplaylf2/lf2-taiwu-mods/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iplaylf2%2Flf2-taiwu-mods/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28956938,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-31T18:30:42.805Z","status":"ssl_error","status_checked_at":"2026-01-31T18:30:19.593Z","response_time":128,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["dotnet","mod","monorepo","taiwu","unity"],"created_at":"2025-06-15T12:08:29.828Z","updated_at":"2026-01-31T22:03:50.126Z","avatar_url":"https://github.com/iplaylf2.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 太吾绘卷 Mod 开发模板\n\n本仓库汇总了在 Mod 开发实践中沉淀的通用模板与工作区，旨在通过现代化的工具链和高度自动化的构建系统，为开发者提供一个高效、稳定且易于协作的开发环境。\n\n## 核心特性\n\n- ✅ **自动化项目配置**：只需按约定命名并创建项目，框架便会自动配置目标平台、依赖引用等所有繁琐细节。\n- ✅ **依赖自动内嵌**：告别“DLL 冲突”，你发布的 Mod 将是单个独立的程序集文件。\n- ✅ **完整智能提示**：游戏私有 API 也能获得完整的代码提示，如同调用原生函数般流畅自然。\n- ✅ **一键式环境准备**：仅需一个 `dotnet restore` 命令，即可从官方 NuGet 源和 GitHub Packages 自动拉取所有依赖。\n\n## 快速上手\n\n本章节将引导你完成从环境配置到创建第一个 Mod 的完整流程。\n\n### 前置条件\n\n- **.NET SDK**：版本需满足 [`global.json`](./global.json) 文件中的定义。\n- **GitHub PAT**：一个拥有 `read:packages` 权限的 [Personal Access Token](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token)。\n\n### 1. 环境配置\n\n本项目的依赖分为两部分：一部分来自官方 NuGet 源的标准库，另一部分是托管在 GitHub Packages 上的项目特有库。因此，你需要配置凭据以访问 GitHub Packages。\n\n**VS Code / 命令行用户**：\n\n1. 将你的 GitHub 用户名和 PAT 配置为环境变量 `GITHUB_USERNAME` 和 `GITHUB_TOKEN`\n2. 在项目根目录运行 `dotnet restore`。该命令会自动拉取所有必要的 NuGet包\n\n\u003e [!TIP]\n\u003e **Visual Studio 用户**：如果遇到凭据配置或 Release 编译报错等问题，请查阅专门的[环境配置指南](./docs/how-to/visual-studio-setup.md)。\n\n\u003e [!WARNING]\n\u003e 理想情况下，`dotnet restore` 能一键拉取所有依赖。但由于分发游戏文件存在法律风险，**本模板并未包含游戏核心库的在线包**。因此，在首次配置环境时，你可能会遇到 `NU1101` 等“包找不到”的错误。要解决此问题，你需要将这些缺失的依赖打包并推送至开发者自己的远程 NuGet 源。具体方法请参阅 [**非托管依赖项设置指南**](./projects/unmanaged-vendor/README.md)。\n\n### 2. 创建你的第一个 Mod\n\n本框架遵循**约定优于配置**的理念，将创建新 Mod 的流程极大简化：\n\n1. 在 `projects/mods/` 目录下为你的新 Mod 创建一个文件夹，例如 `MyNewMod`\n2. 在其中创建对应的项目文件夹，并遵循命名约定，例如 `MyNewMod.Backend`\n3. 在项目文件夹中，创建一个最简化的 C# 项目文件 `MyNewMod.Backend.csproj`：\n\n    ```xml\n    \u003cProject Sdk=\"Microsoft.NET.Sdk\" /\u003e\n    ```\n\n完成！仅需遵循 `.Backend` 或 `.Frontend` 的命名约定，构建系统就会自动完成所有配置[^1]。你无需关心任何构建细节，可以立即开始编写 Mod 逻辑。\n\n### 3. 开始编码\n\n现在，在你的项目文件夹中添加 C# 代码（如 `ModEntry.cs`），并遵循游戏官方的 Mod 开发文档编写逻辑即可。\n\n### 4. 构建与发布\n\n准备交付时，执行一次 `dotnet build -c Release -t:LF2PublishMod -p:LF2Mod=\u003cmod-name\u003e` 即可产出游戏可识别的目录结构（默认输出在 `.lf2.publish/\u003cmod-name\u003e/`）[^2]。\n\n## 进一步阅读\n\n- **[文档索引](./docs/README.md)**：浏览完整的文档分类，按需跳转到操作指南与参考资料。\n- **[仓库内 Mod 导览](./projects/mods/README.md)**：查看目前包含的 Mod 列表、状态与源码路径。\n\n## 相关资源\n\n- **[仓库目录结构](./docs/reference/repository-layout.md)** - 了解模板约定的项目命名与目录职责。\n- **[构建系统参考 - Mod 打包使用指南](./docs/reference/build-system.md#mod-打包使用指南)** - 深入掌握 `LF2PublishMod` 打包目标的工作流程。\n\n## 贡献与反馈\n\n欢迎通过提交 Issue 或 Pull Request 来为本项目做出贡献。\n\n## 参考资料\n\n[^1]: `.Backend` 和 `.Frontend` 后缀是构建系统识别项目类型的关键约定，系统会据此自动配置相应的依赖和构建参数。\n\n[^2]: `LF2PublishMod` 是构建系统提供的发布目标，负责产出符合游戏规范的发布目录结构。\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fiplaylf2%2Flf2-taiwu-mods","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fiplaylf2%2Flf2-taiwu-mods","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fiplaylf2%2Flf2-taiwu-mods/lists"}