Hello,
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
[0.3.0] Unlock your items from the default technologies
-
- Long Handed Inserter
- Posts: 73
- Joined: Wed Feb 20, 2013 6:57 pm
- Contact:
Re: [0.3.0] Unlock your items from the default technologies
You can modify the technologies, read the post slpwnd posted
Re: [0.3.0] Unlock your items from the default technologies
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"}
-
- Long Handed Inserter
- Posts: 73
- Joined: Wed Feb 20, 2013 6:57 pm
- Contact:
Re: [0.3.0] Unlock your items from the default technologies
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
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
Re: [0.3.0] Unlock your items from the default technologies
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
Second in graphic/entity/inserters the inverted-longhanded-inserter-platform has two .pngs so it is inverted-longhanded-inserter-platform.png.png. the game is looking for a picture named inverted-longhanded-inserter-platform.png so remove one .png from the filename
<I'm really not active any more so these may not be up to date>
~FreeER=Factorio Modding
- Factorio Wiki
- My Factorio Modding Guide
- Wiki Modding Guide
Feel free to pm me
Or drop into #factorio on irc.esper.net
~FreeER=Factorio Modding
- Factorio Wiki
- My Factorio Modding Guide
- Wiki Modding Guide
Feel free to pm me
Or drop into #factorio on irc.esper.net
Re: [0.3.0] Unlock your items from the default technologies
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"}
Initially I had
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
}
}
<I'm really not active any more so these may not be up to date>
~FreeER=Factorio Modding
- Factorio Wiki
- My Factorio Modding Guide
- Wiki Modding Guide
Feel free to pm me
Or drop into #factorio on irc.esper.net
~FreeER=Factorio Modding
- Factorio Wiki
- My Factorio Modding Guide
- Wiki Modding Guide
Feel free to pm me
Or drop into #factorio on irc.esper.net
Re: [0.3.0] Unlock your items from the default technologies
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 } }
Re: [0.3.0] Unlock your items from the default technologies
Ah, thanks for clarifying that for me I started thinking it was something along those lines before I posted but wasn't sure since I knew I'd read in one of the lua tutorials I've found that variables can 'point' to the data, but I hadn't realized (that logically) by reassigning the variable it changes the variable and not what it is pointing to
At least I did find the proper way
At least I did find the proper way
<I'm really not active any more so these may not be up to date>
~FreeER=Factorio Modding
- Factorio Wiki
- My Factorio Modding Guide
- Wiki Modding Guide
Feel free to pm me
Or drop into #factorio on irc.esper.net
~FreeER=Factorio Modding
- Factorio Wiki
- My Factorio Modding Guide
- Wiki Modding Guide
Feel free to pm me
Or drop into #factorio on irc.esper.net