welcor's blog

Saving variables on mobs/rooms/objs

We recently got a question on the forum (http://www.tbamud.com/forum/thread/743) , asking if it could be possible to save variables over reboots.

Well, now you can! I've made a shoddy first hack at something to that end.

I'm not entirely sure the AVL implementation license (MIT) is compatible with the circle license, so I think it needs some rewriting before it can be incoorporated in a release. But hey, as long as it's downloaded separately, there's no problems.

After installing the patch and the tree.h file, you have acces to two new commands in your dg scripts:

persist varname
Stores the current value of the variable with the given name to disk. It is stored based on type (room/mob/object) and vnum - so several mobs sharing a script or trigger will currently have separate values stored.
%self.persisted(varname)%
is substitued with the value from persistent storage

Be advised that currently the code has not been thoroughly tested, does not contain a lot of comments or log statements.

Server malfunction.

At about 9:41 CET this morning (October 26th) a RAM-module failed in the builderacademy server.

As one might guess, this caused some pretty weird results in the system, one of which was a system lockup.

The server has been rebooted, and works as it is supposed to at the moment. The system makes sure it keeps running, and just doesn't use memory marked as bad. Thus, currently, the server runs on 511.9MB instead of 512MB. I expect a new RAM block to arrive within a reasonable timeframe.

Recent downtime

As some of you may have noticed, the http://tbamud.com (and for us oldtimers, http://www.builderacademy.net) site was down due to issues with the mysql database.

I think it's fixed now, but I need feedback - if you see something out of the ordinary, be sure to send a mail my way (on welcor@builderacademy.net, of course).

Syndicate content