[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7E6M7DVDACRSDBPEFFBZ28V":3,"skill-same:01M7E6M7DVDACRSDBPEFFBZ28V":47},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":24,"commitSha":25,"skillDirectory":26,"forksCount":27,"repositoryHtmlUrl":28,"repositoryHomepageUrl":29,"ownerHtmlUrl":30,"ownerBlogUrl":31,"ownerDescription":6,"updatedAt":32,"install":33,"resources":46},"01M7E6M7DVDACRSDBPEFFBZ28V","modding",null,"Use when a Godot game should accept player-made mods, levels, skins or data, when loading PCK or ZIP packs at run time, when adding Steam Workshop or mod.io, or when a mod fails to load or breaks the game.","nick-vas\u002Fhyperdot","nick-vas","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F7181961?v=4","01M7E6F6F0BQ49V0JZHX9BXCBD","Nikolaos Vasilikiotis","01M7E6F6FZW8SW1AJ1S7ARFE89",1,"Apache-2.0","https:\u002F\u002Fgithub.com\u002Fnick-vas\u002Fhyperdot\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fmodding\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: modding\ndescription: Use when a Godot game should accept player-made mods, levels, skins or data, when loading PCK or ZIP packs at run time, when adding Steam Workshop or mod.io, or when a mod fails to load or breaks the game.\n---\n\n# Mod support in Godot 4 (C#)\n\nDecide first what a mod may do: change data and assets (safe), or run code (full rights on the player's machine,\ndesktop only). Everything below was tested on an exported Godot 4.7.2 mono game; sources:\n`${CLAUDE_PLUGIN_ROOT}\u002Fdocs\u002Fmodding.md`.\n\n## 1. Three levels\n\n| Level | What mods contain | Risk | Platforms |\n|---|---|---|---|\n| Data | JSON or CSV tables, plain images (`Image.LoadFromFile`), audio (`AudioStreamOggVorbis.LoadFromFile`) | None if validated | All, consoles through a vetted service |\n| Assets and scenes | A PCK or ZIP of Godot resources | Code: a `.tres` or `.tscn` can carry a script that runs on load | Desktop |\n| Scripts | GDScript or C# in a pack | Full rights: files, network, `OS.Execute`; Godot has no sandbox | Desktop only (C# needs JIT) |\n\n- Start with data mods: the game reads files it validates, like the C# example's `data` runner does with `data.json`. Keep\n  gameplay in data and scripts that can be replaced, and when rewriting internals, keep the old data contract working.\n- Loading a `.tres` from a mod or save folder runs any script embedded in it (tested). Never load Godot resources from\n  `user:\u002F\u002F` or a Workshop folder unless that mod is trusted as code; the `architecture` runner warns (`untrusted-load`).\n\n## 2. Packs: PCK or ZIP\n\n```csharp\n\u002F\u002F In an autoload's constructor or _Init, before anything else is loaded.\nbool ok = ProjectSettings.LoadResourcePack(modPath, replaceFiles: true);\n```\n\n- Export a mod with the Godot editor: `godot --headless --path mod_project --export-pack \"Linux\" coolmod.pck` (no export\n  templates needed). ZIP and PCK behave the same.\n- A mod file at a game path replaces it, but only for loads that happen after mounting: a resource already loaded or\n  preloaded stays the old one. Mount mods first, or reload with `ResourceLoader.Load(path, \"\", ResourceLoader.CacheMode.Replace)`,\n  which also updates the copies already in use. Data read with `FileAccess` changes at once.\n- Every pack carries the mod project's `project.binary`, class-name list and UID cache. With `replaceFiles: true` the\n  game's class list is replaced by the mod's (`GetGlobalClassList()` then lists only the mod's classes); with\n  `false`, the mod's UIDs and class names do not resolve. So mods refer to their files by path, under their own folder,\n  `res:\u002F\u002Fmods\u002F\u003Cid>\u002F...`, never by class name or UID.\n- Load order is override order: make it explicit and fixed (sorted, not the order files happen to be found), and show it. Decide which game paths mods may\n  replace; any file at the same path silently wins.\n- Official patches and DLC are packs too; sign them (`Crypto` with an asymmetric key) if they come from a launcher.\n  Godot cannot stop a PCK being copied.\n\n## 3. C# mods (desktop only)\n\nThe way the Godot docs show, `Assembly.LoadFile`, crashes an exported game (segfault, not catchable): the mod binds to a\nsecond, uninitialised copy of GodotSharp. So does `AssemblyLoadContext.Default` and a plain new context. Load mods into\nthe game assembly's own context instead:\n\n```csharp\nusing System.Runtime.Loader;\n\nvar gameContext = AssemblyLoadContext.GetLoadContext(typeof(Main).Assembly)!;   \u002F\u002F not Default in an export\nvar mod = gameContext.LoadFromAssemblyPath(dllPath);                            \u002F\u002F or LoadFromStream(bytes) from a mod pack\nGodot.Bridge.ScriptManagerBridge.LookupScriptsInAssembly(mod);                   \u002F\u002F so scenes can load its scripts by path\n```\n\n- For `GD.Load(\"res:\u002F\u002Fmods\u002Fx\u002FThing.cs\")` to work, each mod class sits in its own file named after the class (Godot's\n  source generator only adds `[ScriptPath]` then).\n- A collectible context that hands back the game's own assemblies (GodotSharp, the game) also works, but unloading\n  while mod objects are alive is untested: plan to restart the game to unload a mod.\n- A mod that needs NuGet packages the game lacks needs an `AssemblyDependencyResolver`.\n- .NET has no sandbox. A C# mod is a program the player chose to run.\n\n## 4. Distribution\n\n- **Steam Workshop** (through a Steamworks binding): upload with `CreateItem`, then `SetItemContent` (a folder)\n  and `SubmitItemUpdate`, sending players to the Workshop agreement when `UserNeedsToAcceptWorkshopLegalAgreement`;\n  install with `GetSubscribedItems` and `GetItemInstallInfo`, and read a download only after `DownloadItemResult_t`.\n- **mod.io:** REST API or its C++ SDK (no official Godot plugin); moderation tools built in; consoles on paid tiers.\n- On consoles mods are user content: reporting or filtering is required (Xbox XR-018), and only data and asset mods through\n  a vetted service are realistic.\n\n## 5. Safety and support\n\n- Say plainly in the game that code mods run with full rights; show where each mod came from; never run downloaded\n  code without the player choosing it; offer a \"start without mods\" mode.\n- Record the active mods (ids and versions) in saves and crash reports (`game-telemetry` fingerprints); mark saves that\n  need mods.\n- Multiplayer: compare a hash of the mod list on joining, or refuse modded clients in ranked play (`anti-cheat`).\n- Write a mod policy: who owns mods, whether they may be sold, which game assets may be redistributed. Third-party assets in\n  the game may forbid it (`assets.json`, `asset-pipeline`).\n\n## 6. Prove it\n\n- [ ] an exported build loads a sample mod pack that replaces a texture, adds a scene and changes a data table, and the\n      change shows (a smoke run with the mod in place)\n- [ ] a broken mod (bad JSON, missing file, a value out of range) is reported by name and skipped, never a crash\n- [ ] a `.tres` in a data-mod folder is not loaded\n- [ ] mods load in the order shown, and \"start without mods\" starts clean\n","# Mod support in Godot 4 (C#)\n\nDecide first what a mod may do: change data and assets (safe), or run code (full rights on the player's machine,\ndesktop only). Everything below was tested on an exported Godot 4.7.2 mono game; sources:\n`${CLAUDE_PLUGIN_ROOT}\u002Fdocs\u002Fmodding.md`.\n\n## 1. Three levels\n\n| Level | What mods contain | Risk | Platforms |\n|---|---|---|---|\n| Data | JSON or CSV tables, plain images (`Image.LoadFromFile`), audio (`AudioStreamOggVorbis.LoadFromFile`) | None if validated | All, consoles through a vetted service |\n| Assets and scenes | A PCK or ZIP of Godot resources | Code: a `.tres` or `.tscn` can carry a script that runs on load | Desktop |\n| Scripts | GDScript or C# in a pack | Full rights: files, network, `OS.Execute`; Godot has no sandbox | Desktop only (C# needs JIT) |\n\n- Start with data mods: the game reads files it validates, like the C# example's `data` runner does with `data.json`. Keep\n  gameplay in data and scripts that can be replaced, and when rewriting internals, keep the old data contract working.\n- Loading a `.tres` from a mod or save folder runs any script embedded in it (tested). Never load Godot resources from\n  `user:\u002F\u002F` or a Workshop folder unless that mod is trusted as code; the `architecture` runner warns (`untrusted-load`).\n\n## 2. Packs: PCK or ZIP\n\n```csharp\n\u002F\u002F In an autoload's constructor or _Init, before anything else is loaded.\nbool ok = ProjectSettings.LoadResourcePack(modPath, replaceFiles: true);\n```\n\n- Export a mod with the Godot editor: `godot --headless --path mod_project --export-pack \"Linux\" coolmod.pck` (no export\n  templates needed). ZIP and PCK behave the same.\n- A mod file at a game path replaces it, but only for loads that happen after mounting: a resource already loaded or\n  preloaded stays the old one. Mount mods first, or reload with `ResourceLoader.Load(path, \"\", ResourceLoader.CacheMode.Replace)`,\n  which also updates the copies already in use. Data read with `FileAccess` changes at once.\n- Every pack carries the mod project's `project.binary`, class-name list and UID cache. With `replaceFiles: true` the\n  game's class list is replaced by the mod's (`GetGlobalClassList()` then lists only the mod's classes); with\n  `false`, the mod's UIDs and class names do not resolve. So mods refer to their files by path, under their own folder,\n  `res:\u002F\u002Fmods\u002F\u003Cid>\u002F...`, never by class name or UID.\n- Load order is override order: make it explicit and fixed (sorted, not the order files happen to be found), and show it. Decide which game paths mods may\n  replace; any file at the same path silently wins.\n- Official patches and DLC are packs too; sign them (`Crypto` with an asymmetric key) if they come from a launcher.\n  Godot cannot stop a PCK being copied.\n\n## 3. C# mods (desktop only)\n\nThe way the Godot docs show, `Assembly.LoadFile`, crashes an exported game (segfault, not catchable): the mod binds to a\nsecond, uninitialised copy of GodotSharp. So does `AssemblyLoadContext.Default` and a plain new context. Load mods into\nthe game assembly's own context instead:\n\n```csharp\nusing System.Runtime.Loader;\n\nvar gameContext = AssemblyLoadContext.GetLoadContext(typeof(Main).Assembly)!;   \u002F\u002F not Default in an export\nvar mod = gameContext.LoadFromAssemblyPath(dllPath);                            \u002F\u002F or LoadFromStream(bytes) from a mod pack\nGodot.Bridge.ScriptManagerBridge.LookupScriptsInAssembly(mod);                   \u002F\u002F so scenes can load its scripts by path\n```\n\n- For `GD.Load(\"res:\u002F\u002Fmods\u002Fx\u002FThing.cs\")` to work, each mod class sits in its own file named after the class (Godot's\n  source generator only adds `[ScriptPath]` then).\n- A collectible context that hands back the game's own assemblies (GodotSharp, the game) also works, but unloading\n  while mod objects are alive is untested: plan to restart the game to unload a mod.\n- A mod that needs NuGet packages the game lacks needs an `AssemblyDependencyResolver`.\n- .NET has no sandbox. A C# mod is a program the player chose to run.\n\n## 4. Distribution\n\n- **Steam Workshop** (through a Steamworks binding): upload with `CreateItem`, then `SetItemContent` (a folder)\n  and `SubmitItemUpdate`, sending players to the Workshop agreement when `UserNeedsToAcceptWorkshopLegalAgreement`;\n  install with `GetSubscribedItems` and `GetItemInstallInfo`, and read a download only after `DownloadItemResult_t`.\n- **mod.io:** REST API or its C++ SDK (no official Godot plugin); moderation tools built in; consoles on paid tiers.\n- On consoles mods are user content: reporting or filtering is required (Xbox XR-018), and only data and asset mods through\n  a vetted service are realistic.\n\n## 5. Safety and support\n\n- Say plainly in the game that code mods run with full rights; show where each mod came from; never run downloaded\n  code without the player choosing it; offer a \"start without mods\" mode.\n- Record the active mods (ids and versions) in saves and crash reports (`game-telemetry` fingerprints); mark saves that\n  need mods.\n- Multiplayer: compare a hash of the mod list on joining, or refuse modded clients in ranked play (`anti-cheat`).\n- Write a mod policy: who owns mods, whether they may be sold, which game assets may be redistributed. Third-party assets in\n  the game may forbid it (`assets.json`, `asset-pipeline`).\n\n## 6. Prove it\n\n- [ ] an exported build loads a sample mod pack that replaces a texture, adds a scene and changes a data table, and the\n      change shows (a smoke run with the mod in place)\n- [ ] a broken mod (bad JSON, missing file, a value out of range) is reported by name and skipped, never a crash\n- [ ] a `.tres` in a data-mod folder is not loaded\n- [ ] mods load in the order shown, and \"start without mods\" starts clean\n",{"name":5,"description":7},"main","5fa4c2262d814d50f72198a95b8c483ff195f90f",".agents\u002Fskills\u002Fmodding",0,"https:\u002F\u002Fgithub.com\u002Fnick-vas\u002Fhyperdot","https:\u002F\u002Fnick-vas.github.io\u002Fhyperdot\u002F","https:\u002F\u002Fgithub.com\u002Fnick-vas","https:\u002F\u002Fcommon-beef.itch.io\u002F","2026-11-13 18:55:29",{"source":8,"skillName":5,"commands":34,"prompt":44,"zipAvailable":45},[35,38,41],{"tool":36,"command":37},"npx","npx skills add nick-vas\u002Fhyperdot --skill modding",{"tool":39,"command":40},"bunx","bunx skills add nick-vas\u002Fhyperdot --skill modding",{"tool":42,"command":43},"pnpm","pnpm dlx skills add nick-vas\u002Fhyperdot --skill modding","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fnick-vas\u002Fhyperdot\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fmodding\u002FSKILL.md",true,[],[48,55,61,68,75,82],{"skillNo":49,"name":50,"nameZh":6,"description":51,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":52,"categories":53,"keywords":54,"publishedAt":19},"01M7E6RF2S03S92PB9RZB4S4W0","over-budget","Use when a fixture exceeds the size budget.","https:\u002F\u002Fgithub.com\u002Fnick-vas\u002Fhyperdot\u002Fblob\u002Fmain\u002Ftests\u002Fskill-fixtures\u002Fover-budget\u002FSKILL.md",[],[],{"skillNo":56,"name":57,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":58,"categories":59,"keywords":60,"publishedAt":19},"01M7E6RBY8SDNMA3ZARE8MAH0G","bad-yaml","https:\u002F\u002Fgithub.com\u002Fnick-vas\u002Fhyperdot\u002Fblob\u002Fmain\u002Ftests\u002Fskill-fixtures\u002Fbad-yaml\u002FSKILL.md",[],[],{"skillNo":62,"name":63,"nameZh":6,"description":64,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":65,"categories":66,"keywords":67,"publishedAt":19},"01M7E6R9S9YHTC552SR41RQAJ1","bad-workflow-description","Use when testing; runs the kit and then reads the JSON.","https:\u002F\u002Fgithub.com\u002Fnick-vas\u002Fhyperdot\u002Fblob\u002Fmain\u002Ftests\u002Fskill-fixtures\u002Fbad-workflow-description\u002FSKILL.md",[],[],{"skillNo":69,"name":70,"nameZh":6,"description":71,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":72,"categories":73,"keywords":74,"publishedAt":19},"01M7E6R6CWSAN48C80130CM1AK","bad-version","Use when a fixture quotes a stale package version.","https:\u002F\u002Fgithub.com\u002Fnick-vas\u002Fhyperdot\u002Fblob\u002Fmain\u002Ftests\u002Fskill-fixtures\u002Fbad-version\u002FSKILL.md",[],[],{"skillNo":76,"name":77,"nameZh":6,"description":78,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":79,"categories":80,"keywords":81,"publishedAt":19},"01M7E6R2C0E24TC133ESHKZT9R","bad-value","Use when a fixture passes a value outside a parameter's set.","https:\u002F\u002Fgithub.com\u002Fnick-vas\u002Fhyperdot\u002Fblob\u002Fmain\u002Ftests\u002Fskill-fixtures\u002Fbad-value\u002FSKILL.md",[],[],{"skillNo":83,"name":84,"nameZh":6,"description":85,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":86,"categories":87,"keywords":88,"publishedAt":19},"01M7E6QYM81V061X7DSQ94CZRP","bad-trigger","Helps with Godot tests.","https:\u002F\u002Fgithub.com\u002Fnick-vas\u002Fhyperdot\u002Fblob\u002Fmain\u002Ftests\u002Fskill-fixtures\u002Fbad-trigger\u002FSKILL.md",[],[]]