wahming wrote:Oh.. is there any way to READ the raw data?
game.entityprototypes have all entity prototipes.
Or if you have the entity (in onbuildentity for example), can call [entity].prototype, isn't like raw data, but is the best option for now, i think.
wahming wrote:On a related question - I'm trying to create a custom transport belt, with an additional integer variable. This variable can be different for each instance of the belt, and should be writeable to me. What's the best way for me to do this?
i don't know what do that "integer variable", but i think the best way to know about differences with some entities, is the name.
For example, you have 2 belts with the same speed, but change the color, with names "belt-red", "belt-yellow" and "belt-black", you can use game.player.print(string.sub([entity].name,6)) to write the color of entity.
But you can't edit the prototype in the game (data.raw), i don't know what variable is doing, if you need add a number to only 1 entity, like if 1 "belt-red" need know is the number 1, and all other without number, the best way is with a table, you can save the entity in a variable, for example with this, you need: belts = { entity = [entity], number = 1 }.
But i don't know what you need do.