[Solved] Prototype entity attribute seems to be missing

Place to get help with not working mods / modding interface.
kikker450
Inserter
Inserter
Posts: 30
Joined: Fri May 05, 2017 9:07 am
Contact:

[Solved] Prototype entity attribute seems to be missing

Post by kikker450 »

There is no game.prototype_entity["assembling-machine-2"].crafting_categories even though I'm staring right at it in the raw files (Factorio\data\base\prototypes\entity) and there seems to be no way to access that piece of data. Does anyone know another way to access that data? I've now spend around a hour trying to find another way but it seems impossible.

Otherwise I'm thinking about asking the devs to add it since it's already in the data files but somehow inaccessible through the control.lua.
Last edited by kikker450 on Mon May 08, 2017 8:46 am, edited 1 time in total.
321freddy
Fast Inserter
Fast Inserter
Posts: 125
Joined: Fri Sep 23, 2016 10:16 pm
Contact:

Re: Prototype entity attribute seems to be missing

Post by 321freddy »

I don't see the crafting_categories property in LuaEntityPrototype either, so you would need a small workaround for accessing it at control.lua stage.
Take a look at this. Using this you can read the data.raw table at runtime:

Code: Select all

data.raw["assembling-machine"]["assembling-machine-2"].crafting_categories
Rseding91
Factorio Staff
Factorio Staff
Posts: 16018
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: Prototype entity attribute seems to be missing

Post by Rseding91 »

321freddy wrote:I don't see the crafting_categories property in LuaEntityPrototype either, so you would need a small workaround for accessing it at control.lua stage.
Take a look at this. Using this you can read the data.raw table at runtime:

Code: Select all

data.raw["assembling-machine"]["assembling-machine-2"].crafting_categories
That mod is a giant hack - I don't advise ever using it.

If some property isn't available simply request it and I'll add it for the next version of the game (see: viewtopic.php?f=65&t=46735)
If you want to get ahold of me I'm almost always on Discord.
Post Reply

Return to “Modding help”