modding
Skill1 starsChanged yesterdayApache-2.0View on GitHub
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.
In this repository56 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- algorithmsSkill
- animationSkill
- anti-cheatSkill
- asset-pipelineSkill
- automation-hooksSkill
- calendarSkill
- cameraSkill
- console-certSkill
- debug-toolsSkill
- determinismSkill
- game-aiSkill
- game-audioSkill
- game-dataSkill
- game-designSkill
- game-juiceSkill
- game-planSkill
- game-playtestSkill
- gameSkill
- game-telemetrySkill
- godot-addonsSkill
- godot-diagnoseSkill
- godot-editor-bridgeSkill
- godot-export-releaseSkill
- godot-pitfallsSkill
- godot-shaders-vfxSkill
- godot-test-loopSkill
- inputSkill
- kit-reviewSkill
- kitSkill
- legalSkill
- llmSkill
- localizationSkill
- lookSkill
- mathSkill
- mobile-webSkill
- multiplayerSkill
- narrativeSkill
- new-gameSkill
- patternsSkill
- performanceSkill
- procgenSkill
- progressionSkill
- release-readinessSkill
- retroSkill
- savesSkill
- serversSkill
- steamSkill
- store-pageSkill
- typographySkill
- ui-accessibilitySkill
- ui-flowsSkill
- verify-before-doneSkill
- weekly-reviewSkill
- xrSkill
The file
We split this skill into the rules it gives an agent
3 rules. About 0 are common, 0 are distinctive, and 3 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈0
Distinctive · estimate
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 20
Start with data mods: the game reads files it validates, like the C# example's data runner does with data.json.
- Very specific: line 37
Every pack carries the mod project's project.binary, class-name list and UID cache.
- Very specific: line 83
Write a mod policy: who owns mods, whether they may be sold, which game assets may be redistributed.
≈ “Common” is an estimate: at least 1 in 5 of the 408,460 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Mod support in Godot 4 (C#)
Decide first what a mod may do: change data and assets (safe), or run code (full rights on the player's machine,
desktop only). Everything below was tested on an exported Godot 4.7.2 mono game; sources:
${CLAUDE_PLUGIN_ROOT}/docs/modding.md.
1. Three levels
| Level | What mods contain | Risk | Platforms |
| Data | JSON or CSV tables, plain images (Image.LoadFromFile), audio (AudioStreamOggVorbis.LoadFromFile) | None if validated | All, consoles through a vetted service |
| Assets and scenes | A PCK or ZIP of Godot resources | Code: a .tres or .tscn can carry a script that runs on load | Desktop |
| Scripts | GDScript or C# in a pack | Full rights: files, network, OS.Execute; Godot has no sandbox | Desktop only (C# needs JIT) |
- Start with data mods: the game reads files it validates, like the C# example's
datarunner does withdata.json. Keep gameplay in data and scripts that can be replaced, and when rewriting internals, keep the old data contract working. - Loading a
.tresfrom a mod or save folder runs any script embedded in it (tested). Never load Godot resources fromuser://or a Workshop folder unless that mod is trusted as code; thearchitecturerunner warns (untrusted-load).
2. Packs: PCK or ZIP
// In an autoload's constructor or _Init, before anything else is loaded.
bool ok = ProjectSettings.LoadResourcePack(modPath, replaceFiles: true);- Export a mod with the Godot editor:
godot --headless --path mod_project --export-pack "Linux" coolmod.pck(no export templates needed). ZIP and PCK behave the same. - A mod file at a game path replaces it, but only for loads that happen after mounting: a resource already loaded or
preloaded stays the old one. Mount mods first, or reload with
ResourceLoader.Load(path, "", ResourceLoader.CacheMode.Replace), which also updates the copies already in use. Data read withFileAccesschanges at once. - Every pack carries the mod project's
project.binary, class-name list and UID cache. WithreplaceFiles: truethe game's class list is replaced by the mod's (GetGlobalClassList()then lists only the mod's classes); withfalse, the mod's UIDs and class names do not resolve. So mods refer to their files by path, under their own folder,res://mods/<id>/..., never by class name or UID. - 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 replace; any file at the same path silently wins.
- Official patches and DLC are packs too; sign them (
Cryptowith an asymmetric key) if they come from a launcher. Godot cannot stop a PCK being copied.
3. C# mods (desktop only)
The way the Godot docs show, Assembly.LoadFile, crashes an exported game (segfault, not catchable): the mod binds to a
second, uninitialised copy of GodotSharp. So does AssemblyLoadContext.Default and a plain new context. Load mods into
the game assembly's own context instead:
using System.Runtime.Loader;
var gameContext = AssemblyLoadContext.GetLoadContext(typeof(Main).Assembly)!; // not Default in an export
var mod = gameContext.LoadFromAssemblyPath(dllPath); // or LoadFromStream(bytes) from a mod pack
Godot.Bridge.ScriptManagerBridge.LookupScriptsInAssembly(mod); // so scenes can load its scripts by path- For
GD.Load("res://mods/x/Thing.cs")to work, each mod class sits in its own file named after the class (Godot's source generator only adds[ScriptPath]then). - A collectible context that hands back the game's own assemblies (GodotSharp, the game) also works, but unloading while mod objects are alive is untested: plan to restart the game to unload a mod.
- A mod that needs NuGet packages the game lacks needs an
AssemblyDependencyResolver. - .NET has no sandbox. A C# mod is a program the player chose to run.
4. Distribution
- Steam Workshop (through a Steamworks binding): upload with
CreateItem, thenSetItemContent(a folder) andSubmitItemUpdate, sending players to the Workshop agreement whenUserNeedsToAcceptWorkshopLegalAgreement; install withGetSubscribedItemsandGetItemInstallInfo, and read a download only afterDownloadItemResult_t. - mod.io: REST API or its C++ SDK (no official Godot plugin); moderation tools built in; consoles on paid tiers.
- On consoles mods are user content: reporting or filtering is required (Xbox XR-018), and only data and asset mods through a vetted service are realistic.
5. Safety and support
- Say plainly in the game that code mods run with full rights; show where each mod came from; never run downloaded code without the player choosing it; offer a "start without mods" mode.
- Record the active mods (ids and versions) in saves and crash reports (
game-telemetryfingerprints); mark saves that need mods. - Multiplayer: compare a hash of the mod list on joining, or refuse modded clients in ranked play (
anti-cheat). - Write a mod policy: who owns mods, whether they may be sold, which game assets may be redistributed. Third-party assets in
the game may forbid it (
assets.json,asset-pipeline).
6. Prove it
- an exported build loads a sample mod pack that replaces a texture, adds a scene and changes a data table, and the change shows (a smoke run with the mod in place)
- a broken mod (bad JSON, missing file, a value out of range) is reported by name and skipped, never a crash
- a
.tresin a data-mod folder is not loaded - mods load in the order shown, and "start without mods" starts clean
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

