The Dink Network

Reply to Re: YeOldeDink 0.91 Saving Private Dink

If you don't have an account, just leave the password field blank.
Username:
Password:
Subject:
Antispam: Enter Dink Smallwood's last name (surname) below.
Formatting: :) :( ;( :P ;) :D >( : :s :O evil cat blood
Bold font Italic font hyperlink Code tags
Message:
 
 
April 19th, 03:36 AM
peasantmb.gif
yeoldetoast
Peasant They/Them Australia
LOOK UPON MY DEFORMED FACE! 
*shames anyway for neglecting tiles!*

I've tentatively rigged up a serialisation system using Serpent. In the final release, saving to disk will look something like:

mytable = {"A", "b", "C"}
dink.todisk(mytable, "mytable.dat")


Which will save the table alongside the usual savefiles to mytable.dat. Loading would be similarly accomplished by:

mytable = dink.fromdisk("mytable.dat")
-- Say A
player ay(mytable[1])


Unlike the inbuilt save/load it doesn't assume anything else, which means you could rig up your own savebot and continue scripts to account for both normal and Lua saves, and write a custom packer. Lua allows for nested tables which means in theory you could store almost whatever you wanted in the one file.