ID:149866
 
I'm wondering what the code would look like to save and recall the entire settings/objs/etc of the world? I guess to restart the world I'd just delete the saved file?

Later for my game Kemet I'm going to have a town dedicated to allowing players to purchase building material to construct and build on their own plots of land. And so when the world closes I'd like their items, houses etc to be there when I restart the game again.

LJR
I'm about to confront this issue myself, but I doubt saving the entire world is such a good idea. Because you'd also save the 'junk' that gets dropped on the ground by players (such as unrecovered gold, useless equipment, etc). Not sure exactly how, but I'm sure you could go through the items at area House, and somehow save those settings to a file. If i'm lucky I can just < the area to a file ^_^ But I know that wouldn't work :)
LordJR wrote:
I'm wondering what the code would look like to save and recall the entire settings/objs/etc of the world? I guess to restart the world I'd just delete the saved file?

The simplest approach is to set up a savefile system for saving objects in the world.

For info on savefiles, see:

http://www.deadron.com/Games/ByondBasicSavefiles.html

Someday I'll update that and make it a BYONDscape article.
My solution (which has undercone minimal tests) is to have one savefile, and stuff every obj/mob in existence into that savefile. Then, when you load the game again, check to see if those obj/mobs exist on the map already (if you can do that, if not, just don't have anything on the map to start with) and replace them onto the map from the savefile.

As for turfs...um.... I say use Dmpmaker :oP

Saving world vars will have to be done manually.