Crossfire Mailing List Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: CF: New Pickup Code Proposal
- To: "Darren O. Benham" <>
- Subject: Re: CF: New Pickup Code Proposal
- From: Mark Wedel <>
- Date: Sun, 04 Jun 2000 12:07:51 -0700
- CC: Crossfire Mailing List <crossfire (at) ifi.uio.no>
- References: <>
- Sender:
"Darren O. Benham" wrote:
> First, I didn't want to change any of the structures of objects to implement
> this. I used the existing pickup mode variable. Some of the
> suggestions/tradeoffs I talk about are assuming we want to continue this
> policy.
>
> Possible pickup flags are:
> Money - types 36, 60
> Food - types 6, 7, 54
> Magic - types 3, 5, 8, 39, 43, 70, 85, 109, 124 (see below)
> Weapon - types 13, 14, 15
> Armor - types 16, 33, 34, 87, 99, 100
> Equipment - types 24, 75, 122, 221
> Inorganics - type 73
> All - pickup everything every time.
> (types are the first run of the list in define.h. I'm sure I missed a few)
>
> This is accomplished by using the bits of the high byte of "mode" with a
> special case of 0xFF being "all". I don't use the last of the 8 bits as "all"
> to save it for the "magic cheat" I talk about below.
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 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.
>
> 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.
>
> 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.
-
[you can put yourself on the announcement list only or unsubscribe altogether
by sending an email stating your wishes to ]