Re: PiD Item Specs
Posted By: Ron HunsingerDate: 6/25/12 5:39 p.m.

In Response To: Re: PiD Item Specs (PerseusSpartacus)

: Indeed. Also, Ron mentioned the on/off flag for lights. This is exactly
: what somebody else (can't remember who) was saying about the
: flashlight, and it explains the odd behavior of flashlights when you
: duplicate them.

The "somebody else" is, of course, you. I hadn't thought of what toggling multiple flashlights would do until you mentioned it, and was then able to verify it (and Hopper's explanation) by looking at the code.

However, I haven't said anything in this thread that addresses the behavior of multiple flashlights, because I've only spoken of what "using" an item does to its in-use flag. If you have multiple flashlights, each one has its own in-use flag (which is how it can be that some of them say "Flashlight (on)" and some just say "Flashlight" in your inventory). The odd behavior is because, in addition to these flags, there is also a single game-wide variable shared by all flashlights.

Here's a more complete description of what happens when you "use" an item by double-clicking on it in your inventory.

Every item in your inventory has an in-use flag, which is mostly
for the benefit of the inventory routines. (For example, so your
inventory window can append annotations like "(ready)" or
"(in hand)".)

In addition, many item types have a separate game variable,
so the game doesn't need to keep rummaging through your inventory
to find out what's what. For those separate variables, I'll
give the name (made up by me) and in parentheses the hex offset
into a GameState record in the Saved Games file.

.. currentWeapon(0198) is the index into your
.. .. inventory of the curent weapon, or -1 if none
.. to wield a weapon:
.. .. turn on its in-use flag
.. .. say "... ready"
.. .. set currentWeapon(0198) to this one
.. .. prepare it for use (e.g., close it if it's open)
.. to unwield a weapon:
.. .. turn off its in-use flag
.. .. say "... put away"
.. .. set currentWeapon(0198) to -1
.. to 'use' a weapon
.. .. it must not be in a container.
.. .. if it needs ammo, you must have some
.. .. unwield the current weapon, if any
.. .. wield this one, if different from previous

Crystals: almost exactly the same as weapons, except:
.. currentCrystal(0192) is the index into inventory, or -1
.. crystalCharge(0194) is how long it's been charging
.. wield/unwield both set crystalCharge(0194) to 0

Consume: Remove from inventory, after the following action:
.. PotionBlue:
.. .. if poisonRate(013E) is non-zero, set it to 0;
.. .. otherwise set currentHealth(0060) to maxHealth(0062)
.. PotionRed: add 2 minutes to frenzyTime(013A)
.. PotionBrown: set poisonRate(013E) to 5 seconds per HP.
.. PotionViolet: add 2 minutes to ImmuneTime(0140)
.. EasterEgg: teleport you to sector(14,19) on level 24(WEWS).

.. These all have the same basic behavior, differing mainly
.. in the messages produced. Using such an item verifies
.. that it's not inside a container (and for flashlights that
.. the battery is not dead), and if that's OK toggles
.. its in-use flag, and also toggles a 1-byte game variable.
.. Goggles: usingInfrared(0132)
.. Watch: wearingWatch(0133)
.. RedCloak: wearingCloak(0134)
.. Flashlight: usingFlashlight(0135)
.. RingRuby: wearingRubyRing(0136)
.. RingAmethyst: wearingAmethystRing(0137)

All times (crystalCharge, frenzyTime, etc.) are in 60ths of a
second in game time. wearingCloak(0134) determines whether
game time is real time or half that.

When you get hit while immuneTime(0140) is non-zero, the damage
is subtracted from immuneTime(0140) instead of from currentHealth(0060).
If the damage exceeds immuneTime(0140), it just goes to 0, without
passing the excess through to you.

[ Post a Reply | Message Index | Read Prev Msg | Read Next Msg ]
Pre-2004 Posts


PiD Item SpecsRon Hunsinger 6/24/12 10:02 p.m.
     Re: PiD Item SpecsGodot 6/25/12 7:47 a.m.
           Re: PiD Item SpecsPerseusSpartacus 6/25/12 10:37 a.m.
                 Re: PiD Item SpecsRon Hunsinger 6/25/12 5:39 p.m.
                       Re: PiD Item SpecsPerseusSpartacus 6/25/12 6:04 p.m.
                       Re: PiD Item SpecsHopper 6/26/12 8:52 a.m.
                             Re: PiD Item SpecsRon Hunsinger 6/26/12 8:26 p.m.
                                   Re: PiD Item SpecsHopper 6/28/12 8:55 p.m.
           Re: PiD Item Specs *LINK*Ron Hunsinger 6/25/12 2:01 p.m.

[ Post a Reply | Message Index | Read Prev Msg | Read Next Msg ]
Pre-2004 Posts



Your Name:
Your E-Mail Address:

If you'd like to include a link to another page with your message,
please provide both the URL address and the title of the page:

Optional Link URL:
Optional Link Title:

If necessary, enter your password below:




Problems? Suggestions? Comments? Email maintainer@bungie.org

Marathon's Story Forum is maintained with WebBBS 5.12.