Need help with this.

Place to get help with not working mods / modding interface.
Mackan90096
Inserter
Inserter
Posts: 25
Joined: Mon Dec 08, 2014 7:59 am
Contact:

Need help with this.

Post 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
<Trangar> If it doesn't run factorio, it's not worth buying
* mngrif back in my day..
<Trangar> We didn't have schools
<mngrif> WE HAD STICKS.
immaturity is the concentrated essence from which happiness is made
User avatar
L0771
Filter Inserter
Filter Inserter
Posts: 516
Joined: Tue Jan 14, 2014 1:51 pm
Contact:

Re: Need help with this.

Post 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)
User avatar
rk84
Filter Inserter
Filter Inserter
Posts: 556
Joined: Wed Feb 13, 2013 9:15 am
Contact:

Re: Need help with this.

Post 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.
Test mode
Searching Flashlight
[WIP]Fluid handling expansion
[WIP]PvP gamescript
[WIP]Rocket Express
Autofill: The torch has been pass to Nexela
Mackan90096
Inserter
Inserter
Posts: 25
Joined: Mon Dec 08, 2014 7:59 am
Contact:

Re: Need help with this.

Post by Mackan90096 »

Thanks! My mod is now running smoothly!
:D
<Trangar> If it doesn't run factorio, it's not worth buying
* mngrif back in my day..
<Trangar> We didn't have schools
<mngrif> WE HAD STICKS.
immaturity is the concentrated essence from which happiness is made
Post Reply

Return to “Modding help”