Is there any way to copy modded data associated with an entity into blueprint and then paste the data when another entity is built based on the blueprint?
In other words, I have some data about an entity. The data is stored in the global table. The structure is like
Code: Select all
{ entity = event.created_entity, data = "we have some data here" }
If no, do you think we need this feature?
I am thinking about something like the NBT tags from Minecraft, which associate custom data with each entity. Maybe it will be named LuaEntity::custom_data in Factorio.
It will be a table and work like the one in global. You can put any serialisable data inside it. But unlike data stored in global, LuaEntity::custom_data can be easily blueprinted.
It will be useful for complicated entities that have individual data and players are allowed to blueprint the data. e.g. the customised contents in the creative chests of my Creaetive Mode mod.
But I am not sure whether we really need this. The only use case I can think of so far is the creative chest which is not supposed to use in normal gameplay, and I have already implemented copy-and-paste as an alternative way to clone the contents.
I think this feature will require some work for the devs, so I want to make sure this is really worth to propose.