Page 1 of 1
Do you need to be concerned about what gets stored in "glob"
Posted: Wed Nov 26, 2014 4:40 pm
by Plorntus
Essentially as far as I am away everything that gets stored in "glob" is saved and reloaded when the map gets loaded. Does whatever get stored in there get serialized/encoded as to not break the save?
So basically if I stored a binary file with lets say every byte inside there for whatever reason, could it corrupt the save file?
Re: Do you need to be concerned about what gets stored in "g
Posted: Wed Nov 26, 2014 7:17 pm
by Rseding91
Everything in glob gets serialized. You can store what ever you like in it (provided LUA can store it) and it will save/load without any issues.
I'm not sure how you would store a binary file since there are no functions exposed to read data from the script state and all input is in the format of strings or doubles.
Re: Do you need to be concerned about what gets stored in "g
Posted: Wed Nov 26, 2014 8:53 pm
by Plorntus
Rseding91 wrote:Everything in glob gets serialized. You can store what ever you like in it (provided LUA can store it) and it will save/load without any issues.
I'm not sure how you would store a binary file since there are no functions exposed to read data from the script state and all input is in the format of strings or doubles.
Ah thats good!
Second part about "binary file" was an accidental mishap (I had an earlier part in the post that I removed to keep the question shorter which gave context), meant more like storing a string representation of raw bytes which I realise now is probably not possible since it would be encoded as utf8 (or whatever lua uses for its strings). All in all just a complete misunderstanding on my part haha. Thanks for the reply!
Re: Do you need to be concerned about what gets stored in "g
Posted: Thu Nov 27, 2014 6:07 am
by Xecutor
From my experience you can have entities as values of a table, but not as keys.
After load lookup won't find these keys.