RE: [Circle] [CIRCLE] [CODE] Player file questions.

From: Gary Barnett (
Date: 11/25/96

On Monday, November 25, 1996 5:53 AM, Rasdan[SMTP:thomas@mail.CS.ORST.EDU] wrote:
>Hey all,
>	Is it possible to save character's hitroll, damroll, and ac in the
>pfile without ruining it? I looked through structs.h and none of the
>spares are sbytes or sh_ints.
>Is it possible for me to change ubyte to sbyte in the spares and int to
>sh_int without really screwing everything in the world up?
>Thanks anyone for input to my questions,

The only way to know the answer to this one is to experiment.. unless you
are confident of the docs your system uses.

If I were to do that, (I decided to go to ascii player files for just this
sort of thing) I would first create a little test program to see how many
bits a sh_int takes, etc. Then in the spares.. just put the right sized
place holder var in there to make the total number of bits match up. Then
write something to handle a read of an older formatted player (maybe a
version # stored in one of the spares.)

Just as a quick plug for ascii player files: Three benefits:
1) The freedom to re-arrange the player database w/o worrying about
   corrupting the player file.

2) Lowered likelyhood of a future bug corrupting your database and creating
   a hard to fix situation... (e.g. use set to set your title to multiple lines)

3) The chance to rewrite the nanny function into something more straightforward.
   (A perfect example of how stock Circle is too much.. the options in CONFIG.C
    cause it to be quite cluttered IMHO)

This is in no way a flame at Jeremy.. The stock Circle is very well behaved and
is quite effecient in it's use of resources, while providing a maximum of
configurable options. My approach to mud coding is one that just didn't lend
itself to a fixed record length binary file approach, nor the presence of options
in the code that I intend to never use. I am also writing for a fixed max # of
players and lots of processing power on a dedicated machine. (ASCII Player files
consume quite a bit of processor time to process compared to a binary player read)

My $0.02.


-- -- telnet:// 4000 --

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

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