Proper Final Fixes

Place to get help with not working mods / modding interface.
Claviduck
Inserter
Inserter
Posts: 21
Joined: Wed Jul 17, 2019 8:37 am
Contact:

Proper Final Fixes

Post by Claviduck »

A master mod cancels one recipe of a soft dependency mod. The recipe does not longer appear in the master mod overwriting technology. How can i easily put that recipe into existence again?
User avatar
darkfrei
Smart Inserter
Smart Inserter
Posts: 2905
Joined: Thu Nov 20, 2014 11:11 pm
Contact:

Re: Proper Final Fixes

Post by darkfrei »

Set dependency and place your code to the data-final-fixes.lua (or data-updates or data.lua, where the master has changed the prototype:

Code: Select all

data:extend(list_of_prototypes)
Claviduck
Inserter
Inserter
Posts: 21
Joined: Wed Jul 17, 2019 8:37 am
Contact:

Re: Proper Final Fixes

Post by Claviduck »

Thank you for your help. But i am too new to programming to understand your advise. Also i did most likely describe the problem not properly.
But i found some code snippet that worked (after i googled the problem). I still do not understand all of it though...
here is the solution:

Code: Select all

if data.raw.recipe["rubber-vulcanised"] then
table.insert(data.raw["technology"]["sulfur-processing"].effects, {type = "unlock-recipe", recipe = "rubber-vulcanised"})
	
end 
User avatar
darkfrei
Smart Inserter
Smart Inserter
Posts: 2905
Joined: Thu Nov 20, 2014 11:11 pm
Contact:

Re: Proper Final Fixes

Post by darkfrei »

Claviduck wrote: Thu Oct 17, 2019 11:47 am Thank you for your help. But i am too new to programming to understand your advise. Also i did most likely describe the problem not properly.
But i found some code snippet that worked (after i googled the problem). I still do not understand all of it though...
here is the solution:

Code: Select all

if data.raw.recipe["rubber-vulcanised"] then
  table.insert(data.raw["technology"]["sulfur-processing"].effects, {type = "unlock-recipe", recipe = "rubber-vulcanised"})	
end 
It's connection between technology and enabled recipes by this technology.
Post Reply

Return to “Modding help”