Page 1 of 1

Entity prototype not working

Posted: Wed Nov 08, 2017 1:29 am
by Penguin_Spy
My entity prototype isnt working, but I dont know why. When I launch the game it says:
Imgur link
The text is:

Code: Select all

Error while loading entity prototype "destroyerOfTheTrueEnemy" (simple-entity): Missing pictures or picture input in property tree at ROOT.simple-entity.destroyerOfTheTrueEnemy
The entity prototype is as follows:

Code: Select all

data:extend({
   {
    type = "simple-entity",
    name = "destroyerOfTheTrueEnemy",
	flags = {"placeable-off-grid"},
	icon = "__destroyerOfTheTrueEnemy__/graphics/destroyerOfTheTrueEnemyIcon.png",
    selection_box = {{-0.5, -0.5}, {0.5, 0.5}},
    stack_size = 100
  }
})
The picture file does exist, and I have tried replacing it with a picture form the base game, but it still brings up this same error. It's probably something really obvious, but I cant figure it out. Any help at all would be appreciated!
Thx.

Re: Entity prototype not working

Posted: Wed Nov 08, 2017 7:32 am
by Bilka
Penguin_Spy wrote:Missing pictures or picture input in property tree
it's missing the picture or pictures PROPERTY.

Re: Entity prototype not working

Posted: Wed Nov 08, 2017 8:18 am
by darkfrei
All items need icons and all entities need pictures.

Re: Entity prototype not working

Posted: Wed Nov 08, 2017 9:02 am
by bobingabout
darkfrei wrote:All items need icons and all entities need pictures.
Entities need icons too. They're used in the map editor.

Re: Entity prototype not working

Posted: Wed Nov 08, 2017 9:37 am
by Bilka
bobingabout wrote:
darkfrei wrote:All items need icons and all entities need pictures.
Entities need icons too. They're used in the map editor.
Only if you give it one of the placeable flags (https://wiki.factorio.com/Prototype/Entity#icon). If you have entities that are just used for scripting purposes, don't give them one of those flags and you don't need an order or icon.

Re: Entity prototype not working

Posted: Wed Nov 08, 2017 11:54 am
by Rseding91
bobingabout wrote:
darkfrei wrote:All items need icons and all entities need pictures.
Entities need icons too. They're used in the map editor.
Also the deconstruction planner filters.

Re: Entity prototype not working

Posted: Wed Nov 08, 2017 12:38 pm
by Bilka
Rseding91 wrote:
bobingabout wrote:
darkfrei wrote:All items need icons and all entities need pictures.
Entities need icons too. They're used in the map editor.
Also the deconstruction planner filters.
And the bonus gui. But the game is nice enough to show a questionmark as the icon if you have none specified.

Re: Entity prototype not working

Posted: Sat Dec 02, 2017 1:21 am
by Penguin_Spy
Ok. Thank you. I was looking on the wiki and got the icon and the entity picture tag mixed up.