Hosting and domain costs until October 2024 have been generously sponsored by dumptruck_ds. Thank you!

Fields:Items

From Quake Wiki

The items field is used to track which item bits an entity currently has. Each item is stored as a single bit within the field itself. For players, items is also used to give information to the HUD about what elements to draw. This includes what weapons the player has picked up, what powerups the player has active, what keys the player has, what kind of armor type the player has equipped, and what ammo type the player has for their currently selected weapon. For this reason the item constants below cannot be remapped to different bits.

Within vanilla Quake items has a few alternative uses. Items will generally set their items field to determine what to give to the player when they get picked up. By default this method only works for weapons and keys with powerups and armor requiring extra handling. Ammo should not be given this way.

For backpacks, items signifies which weapons are stored in it. This can also be used to give keys but powerups and armor will not be added properly without modifications. For ammo, the ammo_* fields should be used.

Locked doors use items to determine what items a player must have to open it. This can be any value, but it should be noted that a locked door will take away those items on use. Taking away powerups, armor, and ammo will do nothing without modifications.

Warning: Quake uses floats as its main numeric data type meaning only 23 bits are available for use instead of the standard 32 bits of an integer. Trying to use more than this will cause data to get lost.

Weapons[edit]

Each bit that's set changes the HUD image for the weapon slots e.g. if the player has the Rocket Launcher, weapon slot 7 will now have the Rocket Launcher image in it. The weapon field controls which weapon slot is highlighted to indicate the currently selected weapon.

Keys[edit]

Each bit that's set adds the key image to the HUD signifying the player has it. What type of image is used depends on the world type set for the level.

Powerups[edit]

Each bit that's set draws the appropriate powerup icon in the HUD. Only IT_SUPERHEALTH has no icon and is replaceable within mods as it has no purpose.

Armor[edit]

Unlike standard bits, only one of these should be set at a time. Which armor type is set determines what HUD icon is used (Green, Yellow, or Red Armor). Note that this bit has no control over the damage reduction itself as the armortype field controls this.

Ammo[edit]

Similar to armor, only one of these bits should be set at a time. This controls what ammo box image is drawn in the HUD for the player's currently selected weapon. The ammo_* fields control the actual ammo amounts and the currentammo field stores the value for that ammo amount.