Re: Saving mail and notes

From: James Turner (turnerjh@XTN.NET)
Date: 06/15/98

Mark Gerritsen <m.p.h.gerritsen@STUDENT.UTWENTE.NL> writes:

> Will it use 4096 HD space for -every- item, or will it just
> use the space that's filled?
> Anyone know more elegant ways of saving the text on
> "virtual paper"?

Here's the trick I used... since the player object files don't need to
be fseek'd in, I altered the functions to store updated strings only
if necessary.  So in storing an object, it writes the length of a
string and, if that is non-zero, writes the string itself.  I do this
for several strings so that items can have different alias lists,
names, etc.  These will be settable within a limited set of boundaries
by players.  I will post the functions if you'd like, but I made a few
other changes to the code (getting rid of rent being the first!) as
well as having to slightly change the interface.

It works really well though.  You lose 4 bytes per object plus the
length of the changed descriptions (this amounts to maybe 16 bytes for
me since I have four possible strings stored).  It even works with
houses... transparently mostly... though there was a slight amount of
prototype changing.

Had very good success with it though, and players love their mail
saving :)

James Turner     

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

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