ID:138275
 
I'm looking at ways of backing up an entire world on a regular basis. I just did a basic for(turf in world) savefile << turf sort of code and managed to generate 12Mb of data for a 800 turf world (my turfs aren't anything special). As I'm thinking of having a fairly large world I'm a bit concerned! Is there any easy way I can dump an image of a running world to file, that I can restart later if there is some sort of disaster? I appreciate that I could optimise the saving by checking for non-standard var setting for each turf, but I'm basically a lazy guy (no offense Guy) and I wondered if I've missed an important point somewhere? I've checked out Deadron's map maker, but I want to make sure I grap all my turf vars, including the ones that are pointers to procs. On a related note, is there a way of listing all vars associated with an obj type?</<>
On 12/3/00 1:13 pm Al wrote:
I'm looking at ways of backing up an entire world on a regular basis. I just did a basic for(turf in world) savefile << turf sort of code and managed to generate 12Mb of data for a 800 turf world (my turfs aren't anything special). As I'm thinking of having a fairly large world I'm a bit concerned!


Definitely can avoid that hassle with the correct approach. My guess here is that you are saving the image for each object as an image instead of a reference, for example...I don't have time to go into details at the moment, but you can save a lot of space/hassle if you are able to call << with a batch of objects at once. Then the automated savefile code will handle a number of things for you.

I wrote the map saving before much of the current savefile functionality was available...I probably need to revise that.

On a related note, is there a way of listing all vars associated with an obj type?

Yes, objects have a vars list, which is an associated list containing the name of the var and it's value.

By the way, have you gotten the Dream Maker book? You'll find it invaluable for this sort of thing. For example, the automated savefile code will handle checking whether a var has the default value and such.