ID:160838
 
Is it possible to save-out the states of npc instance-objects,
something akin to a world configuration file, and then have the file reload all the instance-states on server start-up?

For example...
We have a small rpg, lets name it "Cliche" (or something sarcastic like that :P). Cliche has a single map, with guards roaming around. When the Cliche server is shutdown, the positions and health of all the NPC guards are saved out to a world configuration file. When Cliche is started back up, the data in the world configuration file is loaded into the game, and the NPC guards assume there previous positions on the map.

Is this possible?
You'd do the loading upon world/New() and the saving upon world/Del(). Look those up in the DM Reference. Note that if what you're doing on world/Del() takes too long to execute, it may not get a chance to finish. It'd probably be a good idea to also do a periodical save, which will also account for the server crashing for one reason or another.