ID:153917
 
Heh. That rhymes.

Anyways, a textfile saving method would be much smaller, probably faster, and easier to edit than the stand BYOND savefile format. I, first, have a few question or two.

1) Are variables kept in a list? I believe they are, but I am not positive, nor have I tested anything.

2) if(1) Are variables able to be manipulated through a list?

With this knowledge, I should be able to complete my saving method. I have plenty of list manipulation procs for lists, as well as some Foomerian little wonders. Who would be interested in this sort of library? *Note: This would be a bad library to use with hubfiles, for security reasons*


~Polatrite~
vars is a list but it can not be changed at runtime.
In response to Super16
True, you can't change the vars list itself, but through it you can change (almost) all of the vars themselves, which is what I think he needs.

-AbyssDragon
You can actually make regular savefiles into plaintext using ImportText() and ExportText().. but your library might still have a use somewhere. Regular savefiles imported that way aren't always easily readable.

-AbyssDragon
Polatrite wrote:
Heh. That rhymes.

Anyways, a textfile saving method would be much smaller, probably faster, and easier to edit than the stand BYOND savefile format. I, first, have a few question or two.

1) Are variables kept in a list? I believe they are, but I am not positive, nor have I tested anything.

2) if(1) Are variables able to be manipulated through a list?

With this knowledge, I should be able to complete my saving method. I have plenty of list manipulation procs for lists, as well as some Foomerian little wonders. Who would be interested in this sort of library? *Note: This would be a bad library to use with hubfiles, for security reasons*

Heck, you don't even need to worry about lists.
You can use ExportText() and save in the text equivalent of the BYOND-native format. Strangely this seems to still be smaller than its binary equivalent.
mob/proc/SaveAsText()
var/savefile/S=new
S[ckey(name)] << src
var/filename="characters/[ckey(key)].txt"
fdel(filename)
S.ExportText("/",filename)
The resulting file will still be easy to edit.

Lummox JR
In response to Lummox JR
Smaller, yes -- safer, no. ;-)