Re: [CODE][OASIS] Extra object flags

From: Mike Stilson (
Date: 10/31/02

On Thu, Oct 31, 2002 at 04:29:18PM +0100, Christian Ejlertsen wrote:
>> so basicly i am stuck with 32 aff flags if i am stock .. how to i get
>> beyond
>> this problem
>> without too much work.
>I would recommend patching in the 128 bit patch. It does take some efford to put in,
>but it's easy expandable and you don't have to remember if the flag was the AFF2 or AFF3.

I'd recommend (if you're using gcc) to change bitvector_t to unsigned long long int
unless you think 64 would eventually be too little.  I've found though,
that once you get to about 45 or 50, the curve for what more flags you
need starts getting steeper.

>As for updating your world files, when using olc that's not a big problem and can be done in 3 steps.
>1. Add the new fields to the save function, make, boot the mud.
>2. Now just save all the your zones, redit save <zonenumber>
>3. Add the load portion of the code in db.c, make, boot the mud.
that works, or you could write a quick perl script to convert them.

1 step:
1: Modify the parser to check if the new field exists.  If it does, read
& use it.  If not, set it to 0ULL or whatever length the patch uses.

I've still never used this patch, but if it puts all the values on one
line, you could easily do something like this:  (mailer code)

(Note: not only haven't I used it, I don't really remember looking at
it.  This might be WAY wrong, but I think it'd be the easiest way to do

int count;
int t[4];
count = sscanf(line, "%d %d %d %d", t, t+1, t+2, t+3);
switch(count) {
case 1:
  t[1] = 0;
case 2:
  t[2] = 0;
case 3:
  t[3] = 0;

If it isn't on the same line, then just find a way to check it when
you're reading it.  Perhaps tag the lines.

   | FAQ: |
   | Archives: |
   | Newbie List:   |

This archive was generated by hypermail 2b30 : 06/25/03 PDT