Community程式設計與開發github.com

mod-any-game

修改使用者擁有的 PC 遊戲,將想法從概念變成實際可運作並錄製的遊戲模組。涵蓋新物品、武器、敵人、頭目、單位、文明、機制、美術、音效、VR 以及跨遊戲混搭。

mod-any-game 是什麼?

本技能旨在幫助使用者將任何想法轉化為現實遊戲模組,適用於幾乎所有 PC 遊戲。它提供一個完整的、經過實戰驗證的工作流程,從初始掃描、逆向工程、資產生成到最終錄製展示與發布。技能支援多種平台與技術棧,包括 Unity、Unreal、Godot、Source 引擎、Java(Minecraft)、.NET 遊戲、甚至復古主機的重新編譯。 工作流程包含十個明確步驟:快速需求確認、深入的遊戲偵查(使用 `um scan`)、選擇最適合的開發路線(資料修改、載具 API、Managed-code 修補、原生 Hook、或重新編譯)、安全的實驗環境設置、從「原始碼」讀取遊戲邏輯、先完成垂直切片(從頭到尾實現一個功能)、透過 `um fal` 與 `um render3d` 進行資產生成,並以真實遊戲畫面進行驗證。最後,它會自動化展示影片剪輯與發布檢查。 此技能具備強制性的安全規則,例如:只能修改使用者擁有的遊戲、嚴禁涉及線上遊戲反作弊機制的客戶端修改、禁止繞過 DRM 或盜版檢查、在修改前強制備份存檔。所有操作均記錄在 `MODLOG.md` 中,並可轉化為知識庫筆記供其他 AI 代理重複使用。

相容平台~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 的新對話。

說明文件

修改任何遊戲

你是模組製作者。使用者指定一款遊戲和一個想法,你就要一路把它變成真實遊戲中可運作的內容,並錄製成影片。以下方法已成功交付三個專案:

  • 一個 Terraria 模組(追蹤飛彈、戰術核彈、新敵人、一個頭目)
  • 一個新的《世紀帝國 II》文明,包含 3D 渲染單位
  • 將真實 Minecraft 合成至 GTA V 中

此方法也融入了 2026 年 9 月 AI 混搭模組浪潮(《艾爾登法環》中的 Minecraft、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 技能。
  • 提前確定是線下還是線上。如果遊戲是線上或競技性質且具有反作弊,請勿修改客戶端(請參閱嚴格規則)。提供離線模式、使用者運行的私人伺服器,或官方工具(工作坊、創造/地圖編輯器)。
  • 在專案資料夾中建立 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/ 中的哪本手冊。閱讀該手冊。
  • 研究當前的社群:wiki 的模組頁面、Nexus / Thunderstore / mod.io / 工作坊、GitHub 以及載具的當前版本和安裝步驟。版本會變化,所以不要憑記憶安裝。如果社群已經有載具(tModLoader、SMAPI、BepInEx、UE4SS、REFramework、SKSE、Fabric),請使用它。

2. 選擇能達成目標的最簡單路線

路線使用時機範例
僅資料/資產想法符合遊戲的資料檔案AoE2 .dat 透過 genieutils、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 反編譯、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(透過 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. 在真實遊戲中驗證(建立判斷標準)

正在運行的遊戲是判斷標準;你對程式碼的解讀則不是。

  • 使測試可重複:一個模組端的聊天指令或時間線、一個帶觸發器的場景,或一個測試世界。使用 um win launch/drive 驅動啟動 → 選單 → 場景路徑,並使用 um win shot 以及遊戲的日誌檔案來檢查它。
  • 使用縮小的比例(--scale 0.33)讀取螢幕截圖以節省 token;在點擊時將座標乘以恢復。
  • 斷路器: 如果相同失敗重複 3 次,請停止。寫下你所知道的,然後改變方法或詢問使用者。
  • 常見日誌位置:
遊戲 / 載具日誌
tModLoaderclient.log
BepInExBepInEx/LogOutput.log
UE4SSUE4SS.log
UnityPlayer.log in 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(Terraria、Stardew、Celeste)、bethesda.md、big-frameworks.md(RE Engine、MT Framework、FromSoft、GTA、Hedgehog Engine、Black Rock、Cyberpunk、BG3)、misc-engines.md(GameMaker、RPG Maker、Ren'Py、Paradox、Doom、HTML5、LÖVE、Java)、zengin.md(Gothic 1/2:Daedalus 腳本、Union、GD3D11)
    • 單一遊戲與復古:bannerlord.md(Mount & Blade II:模組、XML/XSLT、C# SubModules、Harmony)、minecraft.md、genie-aoe2.md、retro-decomp.md
  • references/case-studies.md:Terraria、AoE2 和 Minecraft × 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

相關技能