Re: Level restrictions

From: Patrick Dughi (
Date: 07/21/99

        >compressed for space<

I want to enforce max # of items.

> I guess at respawn time you have to count all objects currently loaded
> or saved with a character, wouldn't you?  In a LARGE MUD that could get
> processor intensive, I think.

        Well, simple enough, if you don't mind doing a little boot-time
computing.  Run through all your player object files, and add that to the
max count for each item in the index (after object files are loaded,
before zones are booted, of course).  Now, add a check for any time an
item is permanantly destroyed (not extracted - since saved obejcts are
extracted too..) and decrement the # by one.

        Since standard (and most non-standard) circlemuds don't allow for
actual deletion of a character during gameplay, you don't have to worry
about anything but one-at-a-time deletion of items, and the next time you
boot, it will be accurately recalcuated again.

        If you're really a stickler, and know you code so well that
nothing will go wrong, you could just do this boot time parsing once, and
then write that file out before you shutdown/crash/etc.  I don't trust my
own code that much though, so I'd proably just let the mud churn for an
extra 20-30 seconds it'd take to make the calculations.


ps - if you're using the standard circle max number, you may want to
remove any other decrementers (like in extract_obj, or whatever).
Otherwise, well.. it's logic, you figure it out.

     | Ensure that you have read the CircleMUD Mailing List FAQ:  |
     |  |

This archive was generated by hypermail 2b30 : 12/15/00 PST