/godot-agent-skills:godot-modding-dlcfrom godot-agent-skills
Guides implementing mod support, DLC, and patching in Godot 4.7 using resource packs (PCK/ZIP), load timing, file overrides, mod folders, manifests, registries, and runtime asset loading.
Ships in godot-agent-skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
| Level | What mods can do | How |
|---|---|---|
| Data mods | new items, levels as JSON, textures, sounds, models | read files from a mods folder at runtime (no Godot needed by modders) |
| Pack mods | new scenes, scripts, resources; replace any game file | .pck/.zip loaded with ProjectSettings.load_resource_pack(); modders use the Godot editor |
| Script-extension mods | change existing game logic without replacing files | the Godot Mod Loader addon (script extensions and hooks, used by shipped games) |
| Workshop | discovery and install | Steam UGC through GodotSteam; it downloads into a folder you then load like any other mod |
| Start with data mods plus a registry API. Add packs when modders need scenes and scripts. |
ProjectSettings.load_resource_pack(path, replace_files := true, offset := 0) mounts a PCK or ZIP into res://. It returns false on failure. With replace_files = true, pack files override game files at the same path (texture packs, balance patches). Set false to protect the base game._init() (the first autoload), before the main scene loads. To swap later, reload with ResourceLoader.load(path, "", ResourceLoader.CACHE_MODE_REPLACE) and rebuild the scenes that use it.user://mods/ (always writable) and the folder next to the executable (OS.get_executable_path().get_base_dir() + "/mods", for Steam/manual installs; not writable on every platform). In the editor, OS.has_feature("editor") points to a dev folder instead.res://mods/<mod_id>/ so two mods don't overwrite each other by accident. Overrides then become deliberate (same path as a game file).godot --headless --export-pack "Mod" mymod.pck, see godot-export-ci).class_name in mod scripts isn't reliable (the global class cache comes from the game). Mods should reference scripts and scenes by path or through your registry.AssemblyLoadContext code. Most games keep mods GDScript or data only.mod.cfg (a ConfigFile): id, name, version, game_version (min compatible), depends, priority. Read it before loading the pack (the reference reads it from inside a ZIP with ZIPReader, or from a folder).user://mods.cfg.game_version or missing dependencies and say why in the mod menu. Never crash because of a bad mod: push_warning and continue.res://mods/<id>/main.gd with func _mod_init(api)), passing a narrow API object.ItemRegistry.register(id, item_resource), EnemyRegistry, LevelRegistry. The game reads from registries, never from hard-coded lists, so mods add content without patching files.enemy_killed, level_loaded, player_spawned) for mods to react to.api_version in the manifest), and deprecate before you remove anything.JSON.parse_string, check types and ranges, clamp numbers, and fall back to defaults.| Asset | API |
|---|---|
| Image → texture | Image.load_from_file(path) → ImageTexture.create_from_image(img) |
| Audio | AudioStreamOggVorbis.load_from_file, AudioStreamWAV.load_from_file, AudioStreamMP3.load_from_file |
| 3D model | GLTFDocument.new().append_from_file(path, state) → generate_scene(state) |
| Font | FontFile.new().load_dynamic_font(path) |
| Text, data | FileAccess.get_file_as_string, JSON.parse_string, ConfigFile.load |
| Zipped content | ZIPReader.open → read_file (then Image.load_png_from_buffer, …) |
Runtime-loaded textures aren't VRAM-compressed, so cap their size for mobile. Load big sets with WorkerThreadPool (godot-performance). |
Pack mods and Mod Loader mods run unrestricted GDScript: file access, network and OS calls. Godot has no sandbox. Show a warning on first enable, and keep data-only mods as the default for user-generated content you download automatically. Evaluate expressions from mod data with Expression.execute(..., const_calls_only = true).
--export-pack with a preset that includes only res://dlc/<name>/). Ship it as a separate depot or download, verify ownership (Steam: GodotSteam isDLCInstalled(app_id); consoles and mobile stores have their own APIs), then load_resource_pack. PCKs aren't DRM: anyone can copy the file.godot --export-patch out.pck --patches base.pck (4.6+) writes only changed files, delta-encoded. Load patches in order after the base. Each patch adds load-time overhead, so fold patches into a new base PCK at major updates. Steam and most stores already diff builds, so patch PCKs matter mainly for custom launchers and mobile hot-content.PCKPacker builds packs from inside the game (pck_start, add_file(res_path, source), flush), e.g. a level editor that exports shareable levels.Mod loader (discovery, manifests, order, packs), registry, runtime asset loading, PCK export from game, DLC gate (compiled by the tests): references/patterns.md
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
godot-modding, dlc-patching, resource-packs, mod-loader, steam-workshop
npx claudepluginhub el4cteo/godot-skills --plugin godot-agent-skills27 skills in this plugin
/godot-2d2D games in Godot 4.7 - pixel-art and HD setup, TileMapLayer (cells, terrains, custom data, runtime tiles, physics chunking), Parallax2D, Camera2D (limits, smoothing, shake), y-sort and z-index, 2D lights and normal maps, AnimatedSprite2D, one-way platforms, custom drawing, many-sprite performance. Use for platformers, top-down, tile-based or any 2D scene./godot-3d-gameplayBuilding 3D games in Godot 4.7 - third-person and orbit cameras (SpringArm3D), camera-relative movement, lock-on, top-down/RTS/isometric cameras, GridMap + MeshLibrary levels, CSG blockout and baking, modular kit import hints, Path3D rails, interactables, spawners, world-space UI, large worlds and LOD. Use for 3D player controllers, cameras or level building./godot-Other plugins' skills for the same job