Page 1 of 1
Need help with this.
Posted: Tue Dec 09, 2014 7:43 pm
by Mackan90096
So, none of my mods entities are placeable, and all my mods items displays with the name
Unknown key:"item-name."
How do I fix this?
Code can be found at
http://github.com/Mackan90096/Factorio_Mod
Re: Need help with this.
Posted: Tue Dec 09, 2014 7:55 pm
by L0771
try with it in your config.lua
event onbuiltentity returns createdentity, playerindex, tick and other...
i don't know what your mod must do, but if create a tree, i think you need destroy the seed xd
Code: Select all
require "util"
require "defines"
game.oninit(function()
glob.bomber = 0
end)
game.onevent(defines.events.onbuiltentity, function(e)
if e.createdentity.name == "tree-seed" then
game.createentity{name = "big-tree", position= e.createdentity.position}
e.createdentity.destroy()
end
end)
Re: Need help with this.
Posted: Tue Dec 09, 2014 8:04 pm
by rk84
Placeable item needs to have place_result.
example:
Code: Select all
{
type = "item",
name = "giant-chest",
icon = "__base__/graphics/icons/wood-chest.png",
flags = { "goes-to-quickbar" },
subgroup = "storage",
place_result = "giant-chest",
stack_size = 50,
fuel_value = "0.1MJ"
}
Unknown key:"item-name." means item has no localized name. Add cfg file in Factorio_mod\locale\en\locale.cfg. Use the factorio's base mod as example.
Re: Need help with this.
Posted: Tue Dec 09, 2014 8:09 pm
by Mackan90096
Thanks! My mod is now running smoothly!