# Patch Manager

Patch Manager lets mods change game content without distributing replacement copies of the affected assets. Each patch describes a specific change. When an asset loads, Patch Manager combines the compatible patches from each mod that is on in the campaign. Each campaign has its own selection of mods and of their [features](/doc/campaign-features-9YIewcIArR).

## Patching systems

### [Text assets](/doc/text-assets-qrsUfIrMVQ)

Use text-asset patches for JSON-backed game data such as parts, resources, planets, science, missions, tech nodes, variants, and audio definitions.

Patches are normally written in Lua. Typed modules provide helpers for common game data, while the generic JSON API can patch other JSON-backed assets.

### [Prefabs](/doc/prefabs-JwCaFT4rZd)

Use prefab patches for Unity object graphs: component fields, object references, added components, child GameObjects, materials, textures, audio clips, and other prefab-level changes.

Prefab patches can be authored visually in Unity or registered from C# or Lua.

## Choosing the right system

Use a text-asset patch when the value appears in a JSON-backed definition. Use a prefab patch when the change belongs to a Unity prefab hierarchy or component.

Some features need both. For example, a part definition can be changed with a text-asset patch while its model hierarch is changed with a prefab patch.

## Dependencies and diagnostics

Both systems support named patches, dependency checks, feature gating, ordering, conflict reporting, and cached results. When testing a mod, check `pm_summary.log` for discovered patches, skipped requirements, conflicts, and application failures.

---

**Documents**

- [Text assets](https://docs.ksp2redux.org/s/0a4a3e31-0b40-48e0-bd81-e14856f80d3d/doc/text-assets-qrsUfIrMVQ)
- [Prefabs](https://docs.ksp2redux.org/s/0a4a3e31-0b40-48e0-bd81-e14856f80d3d/doc/prefabs-JwCaFT4rZd)