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.
Direct fix: type: cdo append to mUnlocks
Section titled “Direct fix: type: cdo append to mUnlocks”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.
type: cdopatches: - 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_MyNewRecipeUse 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:”type: schematicschematics: - 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_MyNewRecipeclass:(instead ofid:) tells KDataForge “don’t generate a class, resolve this existing one”. See Type: recipe → register-only mode for the generalid:/class:duality, since schematics work the same way.unlocks:applies even in register-only mode. The schematic content-creation handler runsproperties:andunlocks: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: falsematters 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 toUModContentRegistry. You’re only reaching into its CDO to add an extra unlock, not re-announcing its existence. Setregister: falseto 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: schematicschematics: - 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_PureSuperIngotUnlocking something other than a recipe
Section titled “Unlocking something other than a recipe”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.
Troubleshooting
Section titled “Troubleshooting”- “class: could not be resolved”: double check the exact path, including the
_Csuffix 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. Addregister: 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.
