Entity Prototype Composition

Things that we aren't going to implement
Post Reply
metalhedd
Manual Inserter
Manual Inserter
Posts: 3
Joined: Sat Apr 16, 2016 6:40 pm
Contact:

Entity Prototype Composition

Post by metalhedd »

Apologies in advance if this has been brought up before, It's difficult to search for.

So far one of the bigger problems I've had with modding is finding an appropriate prototype to base my new object on. the closest would be an ammo-turret, but I want it to also require electricity to work, and that's where the problem lies. There isn't an existing turret which both requires ammo, AND draws electricity.

What I'd like to see is "behaviours" which can be given to prototypes, instead of behaving like one existing entity, they would all be based on composable behaviours. 'draws_power', 'can-request-logistics', 'attacks-nearby-enemies', 'has-inputs', 'has-outputs', the lua api wouldn't look much different.. things like animations and sounds would need to be standardized so that they could apply to any entity, but other than that, it would basically just allow for more of the existing properties to be used with any prototype.

This is probably extremely difficult to implement this late in the game, but It's essentially an entity component system (forums won't let me post the wikipedia link in my first post), and It would really expand the possibilities of what mods can do.

Rseding91
Factorio Staff
Factorio Staff
Posts: 13175
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: Entity Prototype Composition

Post by Rseding91 »

metalhedd wrote:... but It's essentially an entity component system ...
Yeah that's not happening :)

It would require a complete re-write of the game from the ground up to *maybe* work and I have extreme doubts it could be done without a huge impact on performance and the number of bugs introduced/difficulty of debugging a given issue.

Those issues aside: I've never seen any game implement such a system that did anything close to what Factorio does today.
If you want to get ahold of me I'm almost always on Discord.

metalhedd
Manual Inserter
Manual Inserter
Posts: 3
Joined: Sat Apr 16, 2016 6:40 pm
Contact:

Re: Entity Prototype Composition

Post by metalhedd »

totally understood :) The elecric ammo turret can never be.

User avatar
Adil
Filter Inserter
Filter Inserter
Posts: 945
Joined: Fri Aug 15, 2014 8:36 pm
Contact:

Re: Entity Prototype Composition

Post by Adil »

Well, you still can do a composition of different entities to get the functionality. Klonan's burner generator is an adamant example of such.
I do mods. Modding wiki is friend, it teaches how to mod. Api docs is friend too...
I also update mods, some of them even work.
Recently I did a mod tutorial.

seronis
Fast Inserter
Fast Inserter
Posts: 225
Joined: Fri Mar 04, 2016 8:04 pm
Contact:

Re: Entity Prototype Composition

Post by seronis »

Rseding91 wrote: Those issues aside: I've never seen any game implement such a system that did anything close to what Factorio does today.
Dont Starve uses LUA for its game behavior and scripting and does use such a component system, but it doesnt handle even 1% as many simultaneous entities either.

Post Reply

Return to “Won't implement”