Skip to content
k-mods.com

Adding a Recipe to an Existing Schematic

Unlocking a new or existing recipe from a schematic you didn't generate (vanilla, another mod's, or your own from an earlier pack), with either a direct cdo append or the schematic class shortcut.

Maybe you already have a schematic. It could be vanilla, from another mod, or one you generated in an earlier version of your own pack. Either way, you just want it to also unlock a recipe. Use a direct cdo append when you want the smallest possible patch, or use type: schematic with class: when you prefer the same unlock syntax used for generated schematics.

mUnlocks is an instanced UObject array. For append, prepend, insert, or set, KDataForge can construct each new entry from a class: plus nested properties: block before adding it to the array.

append-extra-recipe.cdo.yml
type: cdo
patches:
- target: /Game/FactoryGame/Schematics/Progression/Schematic_1-2.Schematic_1-2_C
properties:
- path: mUnlocks
op: append
value:
class: /Game/FactoryGame/Unlocks/BP_UnlockRecipe.BP_UnlockRecipe_C
properties:
- path: mRecipes
value:
- /KDataForge/Gen/MyPack.Gen_MyPack_Recipe_MyNewRecipe

Use a sequence under value: if you want to append several unlock objects in one operation.

Schematic shortcut: type: schematic with class:

Section titled “Schematic shortcut: type: schematic with class:”
unlock-extra-recipe.schematic.yml
type: schematic
schematics:
- class: /Game/FactoryGame/Schematics/Progression/Schematic_1-2.Schematic_1-2_C # the EXISTING schematic
register: false # it's already registered by the base game don't re-register it
unlocks:
- class: /Game/FactoryGame/Unlocks/BP_UnlockRecipe.BP_UnlockRecipe_C
properties:
- path: mRecipes
value:
- /KDataForge/Gen/MyPack.Gen_MyPack_Recipe_MyNewRecipe
  • class: (instead of id:) tells KDataForge “don’t generate a class, resolve this existing one”. See Type: recipe → register-only mode for the general id:/class: duality, since schematics work the same way.
  • unlocks: applies even in register-only mode. The schematic content-creation handler runs properties: and unlocks: against whatever CDO it resolved, whether that CDO came from generating a new class or from resolving an existing one. This is the one detail that makes the whole pattern work.
  • register: false matters here. register: true (the default) is right when the schematic is yours and this is the first time anything registers it. For a vanilla schematic, or one another mod already registers, it’s already known to UModContentRegistry. You’re only reaching into its CDO to add an extra unlock, not re-announcing its existence. Set register: false to avoid registering it a second time under your mod’s reference.

Same pattern for one of YOUR OWN existing schematics

Section titled “Same pattern for one of YOUR OWN existing schematics”

Nothing changes if the schematic is one you generated in an earlier pack version. Just point class: at its generated path instead of a vanilla one, and leave register: false for the same reason: it’s already registered from whichever document first created and registered it.

type: schematic
schematics:
- class: /KDataForge/Gen/MyPack.Gen_MyPack_Schematic_SuperIngot
register: false
unlocks:
- class: /Game/FactoryGame/Unlocks/BP_UnlockRecipe.BP_UnlockRecipe_C
properties:
- path: mRecipes
value:
- /KDataForge/Gen/MyPack.Gen_MyPack_Recipe_PureSuperIngot

The same class: + unlocks: shape works for any concrete FGUnlock subclass, not just FGUnlockRecipe. That includes inventory slots, schematics that unlock other schematics, custom unlock types from other mods, and anything else you’d normally put in a schematic’s unlocks: list at generation time. See Type: schematic → Instanced unlocks for the full list of what an unlock entry can configure.

  • “class: could not be resolved”: double check the exact path, including the _C suffix for Blueprint schematics. The bare class-name shortcut also works here (see Targeting → bare class name) if you only know the short name.
  • The recipe registers but the schematic seems to unlock it twice, or you see a warning about duplicate registration: you likely left register: true (the default) on a schematic that’s already registered elsewhere. Add register: false.
  • This is for adding an unlock to something that already exists. For building a brand new schematic from scratch, see Item + Icon + Recipe + Tier-1 Unlock instead.

The Type: schematic reference covers mType, unlocks:, and generate-versus-register behavior. Type: recipe uses the same id: and class: duality one stage earlier. For the full new-content chain, see Item + Icon + Recipe + Tier-1 Unlock.