Posted 31 July 2013 - 08:59 AM
Hello everybody and welcome to a small brainteaser!
At the moment I am playing with Immibis's "Adventure Map Peripheral" and I am able to save a building(block by block) into a file using the textutils.serialize() on the table that keeps all the block information for that building.
The problem I have is that I need to also save the nbt data for all those blocks(currently only saving x, y, z, block id and metadata).
Before I start doing this and find out that I make huge files I wonder if there is a better way(a more space efficient way) of storing a table into a file.
- why save a building on file?
Because I need to make it appear and disappear at will for an adventure map
- why save nbt data?
Because chests and modded blocks
- how do you construct the table?
With table.insert()
- have you searched for any database API?
Yes but they are more effort than worth it and they still work with tables… also the nbt data is not all the same(structure/length) so databases are out of the equation.
I hope you all had a pleasant stay!
Sincerely,
sky
At the moment I am playing with Immibis's "Adventure Map Peripheral" and I am able to save a building(block by block) into a file using the textutils.serialize() on the table that keeps all the block information for that building.
The problem I have is that I need to also save the nbt data for all those blocks(currently only saving x, y, z, block id and metadata).
Before I start doing this and find out that I make huge files I wonder if there is a better way(a more space efficient way) of storing a table into a file.
- why save a building on file?
Because I need to make it appear and disappear at will for an adventure map
- why save nbt data?
Because chests and modded blocks
- how do you construct the table?
With table.insert()
- have you searched for any database API?
Yes but they are more effort than worth it and they still work with tables… also the nbt data is not all the same(structure/length) so databases are out of the equation.
I hope you all had a pleasant stay!
Sincerely,
sky