prev | toc | next
 

4.6 Archiving Your Belongings

The @archive command (syntax @archive <object>) `decompiles' objects. That is, it examines them, and then outputs the commands that would be necessary to recreate them. Unless you simply want to create an epic amount of spam, you need to capture this output in some way in order to make use of it. The normal way is to use your client to start a log file, and then issue the @archive command, then close the log. The resulting file can be used to recreate the object(s) if you accidently mess them up, or if the MUCK experiences database loss or corruption, or if you want to move the object to a different MUCK. To do so, simply quote or paste the file into your client window on the destination MUCK.

The command operates in a recursive fashion: a single @archive command will decompile the specified object, and any objects contained within it. This is usually a good thing: you can, for example, @archive an entire area with a single command by @archiving the area's parent room. But a minor warning: if you issue the command while you are in the area, your character object will be archived as well. This isn't a calamity, but it's probably not the best approach. The resulting archive file will be much larger than it needs to be, and if you quote it back without deleting the portions that apply to your character, you will get a great many error messages. So, if you want to @archive a room or area, do so by moving to a remote location before issuing the @archive command. (You can, of course, @archive your character as well... it's a good idea in fact. You would need the help of a wizard to recreate the character object, but once this is done, you could use the file to return your character to a previous state).

In the following example, we @archive the area created in the previous tutorial, using the logging commands for the TinyFugue client. Other clients will have other logging commands.

====================================
> gohome   ( leave area, so character won't be archived )
  ShadowKat's Lair
  .
  .
  .

> /log amberside
> @archive $ae
  .
  .
  . ( lots of text scrolls by )
  .
  .
> /log off
====================================

That's all there is to it! Since the @archive command is recursive, and since the whole area is — directly or indirectly — contained within the environment room referenced by the registered name $ae, the whole area will be @archived.

To recreate the area, we would simply quote the log file:

====================================
> /quote -S 'amberside
====================================

It is normal to see a few error messages when you recreate something from a log file. Common causes are exits that cannot be properly relinked because they led to something not included in the log and restricted properties that the @archive command could read but that you cannot set when you quote the file. Other, less obvious problems are sometimes caused by dbrefs included in properties: if you are moving the object to a different MUCK, these dbrefs will now be inaccurate. The effects of this will vary, but regardless you need to examine and test objects recreated from archive files.

prev | toc | top | next