# Core Concepts

This is the part of the docs worth understanding well. Once these pages click, every typed module is just a thin layer of convenience on top of what is here.

* [The patch lifecycle](/doc/the-patch-lifecycle-bV7YhyoMv8) is the one genuinely non-obvious topic: how passes and ordering buckets decide when your patch runs. Read this before you fight with ordering.
* [Targeting assets](/doc/targeting-assets-8eefHSmg4w) covers labels and the `Named` and `NotNamed` filters that decide which assets a patch touches.
* [The Do callback](/doc/the-do-callback-Qq6LNtj9BT) is where you actually change data, including how to delete an asset.
* [Creating assets](/doc/creating-assets-9bPpsuBU3M) covers adding brand new content instead of editing existing content, including copying an asset with `Duplicate`.
* [Features](/doc/features-geboWdIiDN) describes how to declare campaign features and how to gate patches, created assets and prefab patches on them. Your content is then only in the campaigns that enable it.
* [Gates](/doc/gates-Zh2sLnyxZX) (`Requires`, `Has`, `HasNo`) skip a patch when its preconditions are not met and report the skip cleanly.
* [Dependencies and ordering](/doc/dependencies-and-ordering-werp1yYh7P) covers `Needs`, `Conflicts`, and the before and after relationships that let patches coexist.
* [Working with JSON](/doc/working-with-json-fWfY8KrejF) covers the JSON value you are handed, the methods on it, and the `J` helpers for the cases plain Lua tables cannot express.
* [Config integration](/doc/config-integration-aTM54Tfqkz) describes the settings of your mod and the relation between settings and patches.
* [Reading the summary](/doc/reading-the-summary-8ahmOdWbza) is how you debug: where to find what ran, what was skipped, and what errored, plus logging from a patch with the `Log` global for the cases the summary cannot cover.

---

**Documents**

- [The patch lifecycle](https://docs.ksp2redux.org/s/0a4a3e31-0b40-48e0-bd81-e14856f80d3d/doc/the-patch-lifecycle-bV7YhyoMv8)
- [Targeting assets](https://docs.ksp2redux.org/s/0a4a3e31-0b40-48e0-bd81-e14856f80d3d/doc/targeting-assets-8eefHSmg4w)
- [The Do callback](https://docs.ksp2redux.org/s/0a4a3e31-0b40-48e0-bd81-e14856f80d3d/doc/the-do-callback-Qq6LNtj9BT)
- [Creating assets](https://docs.ksp2redux.org/s/0a4a3e31-0b40-48e0-bd81-e14856f80d3d/doc/creating-assets-9bPpsuBU3M)
- [Gates](https://docs.ksp2redux.org/s/0a4a3e31-0b40-48e0-bd81-e14856f80d3d/doc/gates-Zh2sLnyxZX)
- [Features](https://docs.ksp2redux.org/s/0a4a3e31-0b40-48e0-bd81-e14856f80d3d/doc/features-geboWdIiDN)
- [Dependencies and ordering](https://docs.ksp2redux.org/s/0a4a3e31-0b40-48e0-bd81-e14856f80d3d/doc/dependencies-and-ordering-werp1yYh7P)
- [Working with JSON](https://docs.ksp2redux.org/s/0a4a3e31-0b40-48e0-bd81-e14856f80d3d/doc/working-with-json-fWfY8KrejF)
- [Config integration](https://docs.ksp2redux.org/s/0a4a3e31-0b40-48e0-bd81-e14856f80d3d/doc/config-integration-aTM54Tfqkz)
- [Reading the summary](https://docs.ksp2redux.org/s/0a4a3e31-0b40-48e0-bd81-e14856f80d3d/doc/reading-the-summary-8ahmOdWbza)