
Is there a way to unlock my crafting recipies after the person researched "automation".
Or do i need to make my own technologies,
thanks,
I_IBlackI_I
Code: Select all
local automationeffects = data.raw.technology.automation.effects
automationeffects[#automationeffects + 1] = {type="unlock-recipe", recipe="your-recipe-name-here"}
Two problems are causing this, both are spelling errors. The first inside of prototypes\entity\inserters.lua you miss-spelled inserters when you told the game where the graphics were so it was looking in inseters.I_IBlackI_I wrote:after an hour of trying different things it still cant load the graphics here is my mod:
http://www.mediafire.com/download.php?4l3fi2rbj5g7jqq
If some things are wrong it might also be because of me changing everything around to try to get it working
I figured I'd try this out using ficolas's mod (since he forgot to add the creeper loot lol) and was wondering why I had to directly modify data.raw.creeper.lootslpwnd wrote:You can modify the existing technologies. Try something like this in the data.lua of your mod:Code: Select all
local automationeffects = data.raw.technology.automation.effects automationeffects[#automationeffects + 1] = {type="unlock-recipe", recipe="your-recipe-name-here"}
Code: Select all
creeperloot=data.raw.unit.creeper.loot
creeperloot = {
{
count_max = 10,
count_min = 2,
item = "small-alien-artifact",
probability = 1
}
}
Code: Select all
data.raw.unit.creeper.loot = {
{
count_max = 10,
count_min = 2,
item = "small-alien-artifact",
probability = 1
}
}
This won't work because of the way Lua works. AfterFreeER wrote: Initially I hadI was expecting it to work, or error on loot being nil, since the creepers do not typically have any loot. Instead it looked like it worked but nothing dropped...was just wondering why I get no error and no loot using the local variable, and yet it works if i modify it directly.Code: Select all
creeperloot=data.raw.unit.creeper.loot creeperloot = { { count_max = 10, count_min = 2, item = "small-alien-artifact", probability = 1 } }
Code: Select all
creeperloot=data.raw.unit.creeper.loot
Code: Select all
creeperloot = {
...
}
This works because you are assigning directly into the loot.FreeEr wrote:Code: Select all
data.raw.unit.creeper.loot = { { count_max = 10, count_min = 2, item = "small-alien-artifact", probability = 1 } }