Crossfire Mailing List Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: CF: New Pickup Code Proposal



On Sun, Jun 04, 2000 at 12:07:51PM -0700, Mark Wedel wrote:
>  Just as a note, keying an item type will likely have problems down the road as
> item types are added, removed, and changed.  I know some of the code currently
> use that mechanism, but if something can be developed that does it in a more
> generic fashion, that would be good.
I was hoping that the type codes in define.h were pretty static.  Adding,
types I knew that the pickup code might have to be modified.  I was going to
use an array that keyed a pickup mode.

> > I always felt that mode 4 (all magic) was sort of a cheat since at the time
> > of pickup, you didn't know if it was magic.  I figured it was better to hand
> > pick the items and include known magic items but excluding known cursed
> > items.  OTOH, as a player, I like being able to set the machine to
> 
>  I think that is wrong - looking at the code, it uses the KNOWN_MAGICAL and
> KNOWN_CURSED flags, so uses the same information the player has.  I think that
> is the right behaviour.
My base point is the latest release (0.95.5).  I can go into some dungeon or
another and kill the monsters.  Then set to mode 6 and walk over everything
and I'll pickup a bunch of weapons and armor (at least) that have not been
identified but will later show magic when I get them back to the store to
sell them.

> > The low byte of 'mode' holds the density value.  This does lower the highest
> > available density filter from 65535 (ish) down to 255.  (this is one point,
> > in particular, I wasn't sure how high people set this to on an practical
> > basis).
> 
>  I usually set it at 10.  In fact, one problem currently with the setup is you
> have a minimum value density of 8 or so.  It would be better to have one of the
> bits in the pickup mode toggle if we are on value density so the complete range
> is available.

Under the code I wrote last night, density can be set anywhere from 0 to
255.

> > Also, this setup removes the "and stop" and "stop before" type features.  To
> > implement them, we'd have to do away with one of the flags or take a bit
> > away from the density (leaving a max of 127 or even 63).
> 
>  Instead of subverting the meaning of the high bits, I think it makes more sense
> to just add a 'pickup_flags' field to the player structure which controls this
> information.  I think that will also result in clearer code than grabbing the
> high bits off the current mode field.

Ok, I'll look at the structures.  On the first pass, I did not want to
change any structure.

The code that I've written is up and running on crossfire.debian.net.
Please feel free (and encouraged) to head there and try it out.  The help
isn't written yet but there is a description in the MOTD.  And please,
provide feedback.

-- 
Please cc all mailing list replies to me, also.
* http://benham.net/index.html        <gecko@benham.net>           <><  *
* Debian:                             Software in the Public Interest:  *
*   Project Secretary                   Treasurer                       *
*   Webmaster Team                                                      *
*   BTS Team                          siteROCK:                         *
*   Lintian Team                        Linux Infrastructure Engineer   *

PGP signature