Entity Prototype Composition
Posted: Thu Apr 21, 2016 10:57 pm
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.
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.