Re: Autoloot

From: Sammy (
Date: 07/25/95

On Mon, 24 Jul 1995, Ron Poulton wrote:

> Well, in order to add such a feature so the users can toggle it, you'd 
> have to add information to the user structure, thereby tampering with the 
> user files.
> I had the thought of creating an 'extended user datafile' in addition to 
> the datafile that's present for each user.  If the datafile doesn't 
> exist, the MUD presets all the values for the player and the player gets 
> to configure their character as they wish, and so forth.
> The MUD would also look at the current structure and upgrade it 
> appropriately.  The theory behind this is simple; implementing it is 
> another matter.  I suppose I'll have to play with files now. <grin>

Merc does this simply and easily.  I've been looking at Merc 2.2 source.  
In a Merc pfile, which is text-based and parsed when loaded, has text 
labels for every field.  It's a little wasteful, but you could use 3 
letter identifiers in place of the long labels.  The beauty of the setup 
is that the pfile entries can be in any order.  The parser loads a line 
at a time and decides what to do with each one.

Setting default values is easily accomplished.  Initialize them just 
before the pfile is loaded.  Then old pfiles are converted to new pfiles 
the next time the user connects.


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