Page 1 of 1

Loaders and custom entity types

Posted: Sun Feb 01, 2015 4:41 am
by morphman
I ran into a problem when I wanted to make an entity that doesn't share nodes with any vanilla entity type, so I thought I'd create my own. Unfortunately, it throws the error that the Loaders don't know how to handle that. I really don't want to hack an inserter or assembly machine or anything like that for something that will act nothing like those things...

I wonder if there's any way to add your own entity types to the loaders, or somehow override the loaders?

Re: Loaders and custom entity types

Posted: Sun Feb 01, 2015 5:30 am
by FreeER
morphman wrote:I wonder if there's any way to add your own entity types to the loaders, or somehow override the loaders?
Not currently, all entity types are coded in C++. The devs eventually intend to add a custom Lua entity but that probably won't be added until close to the official 1.0 release, so until then we just have to find the closest entity that kind of does what we want and use control.lua to script around it.
Note: there is a simple-entity that may have no extra C++ functionality but I'm not certain about it (it's used in the base game for stone-rock in data/base/entity/demo-doodads.lua and a couple remnants in data/base/entity/demo-remnants.lua).

Re: Loaders and custom entity types

Posted: Sun Feb 01, 2015 8:06 pm
by morphman
Thank you, I think simple-entity might be a good option, since it doesn't seem to have any other functionality code around it and thus will probably be the most future-proof option.