Community编程与开发github.com

mod-any-game

为玩家拥有的 PC 游戏制作 Mod,将创意变为真实游戏中可运行的内容并录制视频。涵盖新物品、武器、敌人、Boss、单位、文明、机制、美术、音效、VR 以及跨游戏混搭。

mod-any-game 是什么?

这是一个高级 AI 代理技能,用于系统化地制作和发布 PC 游戏模组(mod)。它提供了一条从创意到最终游戏内演示的端到端工作流程,支持 Terraria、Age of Empires II、Minecraft 等游戏,并能通过混搭技术将《Minecraft》内容融合到《GTA V》中。该技能整合了侦察(`um scan`)、资产管理(`um fal`)、自动化(`um win`)、备份(`um backup`)和视频制作(`um video`)等工具,并与 game-recon、reverse-engineering 等配套技能协同工作。工作流程包含十步:需求收集、侦察、路线选择(数据修改/加载器 API/原生钩子等)、实验室设置、代码逆向、垂直切片开发、资产生成、游戏内验证、展示和发布。它还执行严格的规则,如仅修改玩家拥有的游戏、禁止绕过反作弊机制以及严格的代码/资产版权合规。

兼容平台~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/rehan-remade/universal-modder/tree/main/skills/mod-any-game

Installed? Explore more 编程与开发 skills: steipete/bluebubbles, steipete/eightctl, steipete/blucli · View all 6 →

在你喜欢的 AI 中提问

打开一个已预加载此 Agent Skill 的新对话。

文档

制作任何游戏的 Mod

你是模组制作者。用户指定一个游戏和一个创意,你负责将其完整实现到真实游戏中,并录制视频。以下方法已成功交付了三个项目:

  • 一个《泰拉瑞亚》模组(制导导弹、战术核弹、新敌人、Boss);
  • 一个带有 3D 渲染单位的《帝国时代 II》新文明;
  • 将真实的《我的世界》合成进《GTA V》。

它同时也吸收了 2026 年 9 月 AI 混搭模组浪潮(《我的世界》在《艾尔登法环》中、《滑板》在《MW2》中)展示的规模化经验。

  • 案例研究:references/case-studies.md。
  • 代码:examples/。
  • 其他代理记录的所有内容:知识库(仓库中的 knowledge/,um kb search)。

你的工具

um 是工具集 CLI。插件安装和克隆会将其加入 PATH(它在仓库中的位置是 bin/um)。或者,为任何代理安装一次:uv tool install git+https://github.com/rehan-remade/universal-modder(或 pipx install ...)。每个组都有包含示例的 --help。

需求命令
哪些游戏已安装、使用什么引擎、什么反作弊系统、存档在哪um scan --list, um scan "<game>"
精灵图、纹理、PBR、3D 模型、骨架、SFX、音乐、语音、视频 (fal)um fal <recipe>, 或 fal MCP (search_models, run_model)
裁剪/适配/像素化/打包精灵图;3D 模型 → 精灵帧um sprite ..., um render3d ...
启动、截图、点击/输入、录制 Windows 游戏(也支持从 WSL)um win ...
在修改前快照存档;撤销um backup create/diff/restore
剪辑展示视频um video contact/compile/mux
在分享前检查模组(游戏文件、反编译代码、秘密)um publish check

配套技能:game-recon、reverse-engineering、fal-assets、asset-pipeline、game-automation、showcase-video、mashup-mods、port-a-mod、publish-mod、share-field-notes。

循环

0. 需求接收(保持简短)

  • 用一句话获取游戏、平台和商店以及创意(“一个制导导弹发射器和一颗能炸出弹坑的核弹”)。同时确定“完成”的定义;通常指在游戏中可运行并附带一个 20-45 秒的片段。
  • 如果用户希望将现有模组更新到较新游戏版本或另一个加载器(例如,将旧的 Forge 1.7.10 模组移植到现代的 Fabric),则原始模组是规范,其许可证决定移植是否可以发布:在此循环中遵循 port-a-mod 技能。
  • 提前确定是单人离线还是多人联机。如果游戏是在线或竞技的并且有反作弊系统,请勿修改客户端(请参阅硬性规则)。提供离线模式、用户运行的私人服务器或官方工具(Workshop、创造/地图编辑器)。
  • 在工作文件夹中启动 MODLOG.md 作为日志。记录路径、ID、文件格式、类名、失败原因以及下一步。未记录在日志中的内容将在下次上下文压缩时丢失。

1. 侦察(game-recon 技能会深入执行此步骤)

  • 首先搜索知识库。 运行 um kb search "<game>" 和 um kb search "<engine>"。如果其他代理留下了现场笔记,从其确切的版本、路径和注意事项开始,不要重复它的死胡同。没有 um,请阅读 https://github.com/rehan-remade/universal-modder/blob/main/knowledge/INDEX.md。
  • 运行 um scan "<game>"。它会报告引擎和版本、代码是托管还是原生、反作弊系统、已安装的模组加载器、存档文件夹、排名路线以及在 references/engines/ 中要阅读的剧本。阅读该剧本。
  • 研究现时的社区:维基的模组页面、Nexus / Thunderstore / mod.io / Workshop、GitHub 以及加载器的当前版本和安装步骤。版本会变动,所以不要凭记忆安装。如果社区已经有加载器(tModLoader、SMAPI、BepInEx、UE4SS、REFramework、SKSE、Fabric),请使用它。

2. 选择能抵达创意的最廉价路线

路线适用场景示例
仅数据/资源创意适合游戏的数据文件通过 genieutils 修改 AoE2 .dat、Bethesda ESP/ESL、Paradox 脚本、JSON 内容包、pak 覆盖
加载器 API加载器为其提供了钩子tModLoader ModItem/ModNPC、SMAPI、BepInEx 插件、UE4SS Lua、REFramework Lua、SKSE 插件
托管代码补丁.NET/Mono/IL2CPP/Java 且你的创意无对应 APIHarmony prefix/postfix/transpiler、MonoMod、Mixin
原生钩子C/C++ 引擎且无加载器代理 DLL (dinput8/version/winmm) + MinHook/SafetyHook、特征码扫描
重实现/反编译/重编译完全控制,或复古主机N64 decomps、N64Recomp、XenonRecomp、像 IW4L 那样读取用户自己游戏文件的重写
混搭/透传同时运行两个游戏mashup-mods 技能

在构建之前,将选定的路线和原因写入 MODLOG.md。

3. 实验室设置(安全网)

  • 在首次启动模组之前,运行 um backup create "<saves folder>" --name <game>-saves(路径来自 um scan)。如果会更改设置,也要快照配置/配置文件文件夹。
  • 当加载器允许时,使用单独的实验室配置文件或存档文件夹(tModLoader -tmlsavedirectory、MO2 配置文件、世界或场景的副本)。脚本化的过程会破坏测试世界,因此保留一个原始副本并在每次录制前恢复它。
  • 使用已知客户端尺寸的窗口模式(registry/ini,请参阅 game-automation),以使截图和点击坐标保持稳定。
  • 将反编译的代码和提取的资源放在仓库之外(例如 ~/<game>-decomp),并且 gitignore 任何派生数据。永远不要提交游戏文件。

4. 读取真实来源

读取实际代码和数据,而不是猜测引擎的行为。reverse-engineering 技能涵盖了这些工具:

  • 反编译:ILSpy/ilspycmd、Cpp2IL、Vineflower、Ghidra/IDA over MCP;
  • 转储数据:genieutils、xEdit、UndertaleModTool、FModel;
  • 实时检查:UnityExplorer、UE4SS 实时查看器、REFramework、Cheat Engine。

在 MODLOG.md 中记录确切的名称和 ID。同时检查可执行文件强制执行的内容以及数据指示的内容。在 AoE2 中,数据可以轻松容纳第 64 个文明,但文明选择器只列出可执行文件中硬编码的表中的文明,因此模组会替换一个槽位而不是添加一个。

5. 先做垂直切片

使用占位美术将一个物品、单位或武器完整实现。定义、启动,并通过日志和你实际查看的截图证明它出现并工作。然后才扩展。在模组自己的 git 仓库中提交每个工作步骤。

6. 资源(fal-assets 和 asset-pipeline 技能)

首先研究游戏自身的资源:尺寸、调色板、轮廓、摄像机角度、朝向、帧布局。然后使用 um fal 生成。每次调用都会记录在 fal_manifest.jsonl 中。使用 um sprite / um render3d 转换为引擎精确加载的格式。

  • 跨多个角度和帧的一致性: 生成一个概念,将其转化为 3D(um fal model3d),然后从游戏的摄像机渲染每个朝向(um render3d --preset aoe2)。
  • 像素艺术游戏: 在纯色背景或透明背景上生成,裁剪,然后按最近邻插值适配到帧尺寸。

7. 在真实游戏中验证(构建一个 oracle)

正在运行的游戏是 oracle;你自己对代码的解读不是。

  • 使测试可重复:模组侧的命令或时间线、带有触发器的场景或测试世界。使用 um win launch/drive 驱动启动 → 菜单 → 场景路径,并使用 um win shot 结合游戏日志文件进行检查。
  • 以缩小比例读取截图(--scale 0.33)以节省令牌;点击时将坐标乘以回来。
  • 断路机制: 如果同一个失败重复 3 次,停止。写下你所知道的内容,然后改变方法或询问用户。
  • 常见日志位置:
游戏 / 加载器日志
tModLoaderclient.log
BepInExBepInEx/LogOutput.log
UE4SSUE4SS.log
UnityPlayer.log 在 AppData/LocalLow/<company>/<product>/
SKSEDocuments/My Games/<game>/SKSE/
Minecraftlogs/latest.log

8. 展示(showcase-video 技能)

编写录制脚本,使其可重复。使用游戏自身的音频录制游戏窗口(um win record)。从联系表中选择时刻,然后剪辑 20-45 秒,带有一行标题和淡出效果(um video compile)。

9. 打包并发布(publish-mod 技能)

运行 um publish check <mod> --game "<install>"。编写包含安装步骤的 README。致谢工具、加载器和 fal 生成的资源,并如实说明它是使用 AI 构建的。不附带任何游戏文件。

10. 留下现场笔记(share-field-notes 技能)

将 MODLOG.md 转化为知识库笔记(um kb new ...,然后 um kb check)。涵盖:

  • 确切的版本;
  • 路线;
  • 引擎的实际行为;
  • 验证方式;
  • 编号的注意事项。

在获得用户许可后,打开一个 PR(um kb pr <note> --yes)。即使模组未完成也要这样做:记录的死胡同可以为下一个代理节省数小时。

硬性规则

  • 所有权。 仅修改用户拥有的游戏。
  • 在线游戏。 保持在单人/离线模式下,或用户控制的服务器上。绝不要触碰受反作弊保护(EasyAntiCheat、BattlEye、Vanguard、官方服务器上的 VAC、Ricochet、ACE)的在线游戏的客户端。绝不要为多人游戏编写作弊程序(自瞄、ESP、加速)。
  • 禁止绕过。 绝不要绕过反作弊、DRM 或所有权检查。tModLoader 拒绝启动,除非免费的 tModLoader 应用在用户的 Steam 库中:添加它,不要修补该检查。如果游戏需要关闭反作弊才能运行模组,请仅使用官方的离线启动选项。
  • 禁止重新分发。 不要附带游戏文件、反编译的源代码或提取的资源。只附带你自己的代码和资源,或者在用户自己的安装上运行的补丁和转换器(“自带游戏文件”)。
  • 先备份。 在更改存档、配置文件或游戏文件夹之前运行 um backup。将恢复路径写在 MODLOG.md 中。
  • 进程卫生。
    • 通过确切的 PID 终止进程(um win kill <pid>)。绝不要使用 pkill -f(它也会匹配你自己的 shell)或通配符终止。
    • 绝不要阻塞游戏的主线程(例如,在模组内部等待 ffmpeg)。
    • 当 Steam 拒绝重新启动时,通过 PID 清除崩溃报告器(BugSplat 等)。
  • 用户的机器。
    • 驱动输入会接管用户的鼠标和键盘。检查 um win drive --proc X idle 并在用户在场时请求长时间自动运行的会话许可。
    • 在将加载器安装到游戏文件夹、更改注册表或图形设置、删除任何内容或发布之前,请先询问。

参考资料

  • references/engines/:
    • 大型引擎:unity.md、unreal.md、godot.md、source.md、native.md;
    • 系列和框架:dotnet-xna.md(泰拉瑞亚、星露谷物语、蔚蓝)、bethesda.md、big-frameworks.md(RE 引擎、MT Framework、FromSoft、GTA、刺猬引擎、Black Rock、赛博朋克 2077、博德之门 3)、misc-engines.md(GameMaker、RPG Maker、Ren'Py、Paradox、Doom、HTML5、LÖVE、Java)、zengin.md(哥特王朝 1/2:Daedalus 脚本、Union、GD3D11);
    • 单游戏和复古:bannerlord.md(骑马与砍杀 II:模块、XML/XSLT、C# SubModules、Harmony)、minecraft.md、genie-aoe2.md、retro-decomp.md。
  • references/case-studies.md:泰拉瑞亚、帝国时代 II 和我的世界 × GTA V 的端到端案例,包含所有非显而易见的事实。
  • 知识库(仓库根目录下的 knowledge/;um kb search):许多代理针对每个游戏和每种技术的现场笔记。
  • references/safety.md:规则及其理由、反作弊和法律卫生。

Individual skills in this repo

This repo contains 11 individual skills — each has its own dedicated page.

asset-pipeline

Turn generated or hand-made art into exactly what a game engine loads. Covers sprite cutout, trim and nearest-neighbour fitting to frame sizes, pixelation to a palette, sprite sheets and strips, player/team-colour masks, seamless textures, and rendering a 3D model into sprite frames from the game

fal-assets

Generate game assets with fal (fal.ai) through the fal MCP server, the `um fal` CLI (REST) or `fal api`. Covers sprites and icons with transparent backgrounds, consistent variants and animation frames, pixel art, seamless textures, PBR material maps, image-to-3D models, remeshing, auto-rigging, sound effects, music, voice lines, and trailer or cutscene video. Use whenever a mod needs new art, audio or 3D models, or the user mentions fal, generating sprites, textures, models, SFX or music for a game.

game-automation

Launch, see and drive a real game so an agent can test its own mods. Covers launching via Steam or the exe, windowed mode at a fixed size, screenshots of the game window (GPU-safe capture), clicking and typing into menus, holding keys, relative mouse, crash-reporter cleanup, killing by PID, reading logs, scripted test scenes, and an in-game JSON bridge that lets an agent observe and act. Windows-first (also from WSL), with notes for Linux and macOS. Use when a mod must be verified in game, when navigating menus automatically, or when building a repeatable test or demo scene.

game-recon

Figure out how a specific installed game can be modded, before writing any mod code. Covers where it

game-research-websearch

Research a game, engine or modding technique on the open web with archive-aware, rate-limit-safe searches — Wayback Machine/archive.today for dead forums (XeNTaX, Zenhax, old threads), GitHub code/repo search, Nexus/Steam Workshop/Thunderstore APIs, Reddit JSON, YouTube transcripts, plus archive snapshots as evidence. Use when starting work on a game (

mashup-mods

Build cross-game mashups and total conversions, the

port-a-mod

Port an existing mod to a newer game version or another mod loader while keeping its behaviour, values and quirks. Typical cases are an old Forge 1.7.10 or 1.12 Minecraft mod moving to modern Fabric or NeoForge, a Skyrim LE plugin moving to SE/AE, or a tModLoader 1.3 mod moving to 1.4. It covers pinning one source version, a private decompiled reference, an adaptation matrix, extracting the mod

publish-mod

Package and release a finished game mod. Covers the pre-release lint (no game files, decompiled code or leaked keys), README and install steps, credits and AI disclosure, versioning, where to upload (Nexus Mods, Steam Workshop, Thunderstore, mod.io, GitHub releases), and the post with a video. Use when the user wants to ship, share, upload, release or post a mod.

reverse-engineering

Read how a game actually works so a mod can hook it. Decompile .NET/Mono (ILSpy), IL2CPP (Cpp2IL, Il2CppDumper), Java (Vineflower) and native code (Ghidra, IDA, via MCP servers); dump data and asset formats; reverse-engineer a binary file format and prove it with a round trip; read live memory (Cheat Engine, Frida, x64dbg); find render passes (RenderDoc). Use when a mod needs game internals, e.g.

share-field-notes

Search and contribute to the shared AI-modding knowledge base, where field notes record how specific games were modded, decompiled or reverse-engineered (exact versions, route, engine facts, verification, gotchas). Use before starting work on a game (

showcase-video

Record and cut a short showcase video of a game mod, or a compilation of clips, ready to post on X/YouTube. Records the game window with only the game

相关技能