Saving variables
Posted: Mon Feb 02, 2015 4:20 am
Can someone make a standard script to save some variables and the party state? A savegame is 2 MB in size, but how big will this 'save' become? Goal is to have a reset back to the start of a dungeon without using the load/save options of the game. It could also be used if you work in turns with 2 parties.
Some variables:
10 variables x 4 letters x 1 byte value = 40 bytes
For 1 champion:
Inventory has 32 slots x 2 bytes = 64 bytes
Stats has 10 x 2 bytes + exp x 4 bytes = 24 bytes
Skills has 16 x 3 bits ( = 8 bytes ) + unused skill points = 9 bytes
Traits 24 x 1 bit = 3 bytes
Total = 100 bytes x 4 champions = 400 bytes
Custum dungeon level:
32 x 32 squares ( = 1024 squares ) would possible have 24 or so switches x 1 bit = 3 bytes
Estimated save size : 443 bytes ( about 25% of 2 MB )
So, with the above data can someone make a 'save' and 'restore' script?
Edit : with 'save' I mean storing data to much smaller file than a savegame
Some variables:
10 variables x 4 letters x 1 byte value = 40 bytes
For 1 champion:
Inventory has 32 slots x 2 bytes = 64 bytes
Stats has 10 x 2 bytes + exp x 4 bytes = 24 bytes
Skills has 16 x 3 bits ( = 8 bytes ) + unused skill points = 9 bytes
Traits 24 x 1 bit = 3 bytes
Total = 100 bytes x 4 champions = 400 bytes
Custum dungeon level:
32 x 32 squares ( = 1024 squares ) would possible have 24 or so switches x 1 bit = 3 bytes
Estimated save size : 443 bytes ( about 25% of 2 MB )
So, with the above data can someone make a 'save' and 'restore' script?
Edit : with 'save' I mean storing data to much smaller file than a savegame