djcev.com

//

Git Repos / fte_dogmode / qc / defs_items.qc

Last update to this file was on 2025-03-30 at 19:29.

Show defs_items.qc

//==============================================================================
// defs_items.qc
//==============================================================================

//======================================================================
// constants
//======================================================================

#if defined(CSQC) || defined(SSQC)
//----------------------------------------------------------------------
// item_seq -- indexes into the item_info array below
//----------------------------------------------------------------------
typedef enum
{
ITEM_SEQ_HANDS, // empty hands
ITEM_SEQ_AXE, // id1 weapons
ITEM_SEQ_SHOTGUN,
ITEM_SEQ_SUPERSHOTGUN,
ITEM_SEQ_NAILGUN,
ITEM_SEQ_SUPERNAILGUN,
ITEM_SEQ_GRENADELAUNCHER,
ITEM_SEQ_ROCKETLAUNCHER,
ITEM_SEQ_LIGHTNINGGUN,
ITEM_SEQ_AMMO_SHELLS_SMALL, // id1 ammo packs
ITEM_SEQ_AMMO_SHELLS_LARGE,
ITEM_SEQ_AMMO_NAILS_SMALL,
ITEM_SEQ_AMMO_NAILS_LARGE,
ITEM_SEQ_AMMO_ROCKETS_SMALL,
ITEM_SEQ_AMMO_ROCKETS_LARGE,
ITEM_SEQ_AMMO_CELLS_SMALL,
ITEM_SEQ_AMMO_CELLS_LARGE,
ITEM_SEQ_ARMOR_GREEN, // id1 armor
ITEM_SEQ_ARMOR_YELLOW,
ITEM_SEQ_ARMOR_RED,
ITEM_SEQ_ARMOR_SHARD, // pd3 armor shards
ITEM_SEQ_BACKPACK, // id1 backpack
ITEM_SEQ_PD3BACKPACK, // pd3 backpack
ITEM_SEQ_HEALTH_ROTTEN, // id1 healthpacks
ITEM_SEQ_HEALTH,
ITEM_SEQ_HEALTH_MEGA,
ITEM_SEQ_HEALTH_VIAL, // pd3 health vials
ITEM_SEQ_KEY_SILVER_MEDIEVAL, // id1 keys
ITEM_SEQ_KEY_SILVER_METAL,
ITEM_SEQ_KEY_SILVER_BASE,
ITEM_SEQ_KEY_GOLD_MEDIEVAL,
ITEM_SEQ_KEY_GOLD_METAL,
ITEM_SEQ_KEY_GOLD_BASE,
ITEM_SEQ_RUNE1, // id1 runes
ITEM_SEQ_RUNE2,
ITEM_SEQ_RUNE3,
ITEM_SEQ_RUNE4,
ITEM_SEQ_MGRUNE1, // mg1 runes
ITEM_SEQ_MGRUNE2,
ITEM_SEQ_MGRUNE3,
ITEM_SEQ_MGRUNE4,
ITEM_SEQ_MGRUNE5,
ITEM_SEQ_MGRUNE6,
ITEM_SEQ_ARTIFACT_ENVIROSUIT, // id1 artifacts / powerups
ITEM_SEQ_ARTIFACT_INVISIBILITY,
ITEM_SEQ_ARTIFACT_INVULNERABILITY,
ITEM_SEQ_ARTIFACT_QUAD,
ITEM_SEQ_GIB1, // id1 gibs
ITEM_SEQ_GIB2,
ITEM_SEQ_GIB3,
ITEM_SEQ_HEAD_ARMY, // id1 monster heads
ITEM_SEQ_HEAD_DEMON,
ITEM_SEQ_HEAD_DOG,
ITEM_SEQ_HEAD_ENFORCER,
ITEM_SEQ_HEAD_HELLKNIGHT,
ITEM_SEQ_HEAD_KNIGHT,
ITEM_SEQ_HEAD_OGRE,
ITEM_SEQ_HEAD_PLAYER,
ITEM_SEQ_HEAD_SHALRATH,
ITEM_SEQ_HEAD_SHAMBLER,
ITEM_SEQ_HEAD_WIZARD,
ITEM_SEQ_HEAD_ZOMBIE
} item_seq;

#define ITEM_SEQ_W_START ITEM_SEQ_AXE
#define ITEM_SEQ_W_END ITEM_SEQ_LIGHTNINGGUN
#define ITEM_SEQ_HEAD_START ITEM_SEQ_HEAD_ARMY
#define ITEM_SEQ_HEAD_END ITEM_SEQ_HEAD_ZOMBIE

//----------------------------------------------------------------------
typedef enum
{
ITEM_AMMO_NONE,
ITEM_AMMO_SHELLS, // id1 ammo types
ITEM_AMMO_NAILS,
ITEM_AMMO_ROCKETS,
ITEM_AMMO_CELLS
} item_ammo_types;

//----------------------------------------------------------------------
// item_info -- CEV
//----------------------------------------------------------------------
typedef struct
{
float class; // classtype
float option; // ammo type (if any), .skin
float pickup_vol; // volume of pickup sound
vector view_origin_offset; // viewmodel origin offset
vector view_angles_offset; // viewmodel angles offset
string name; // plaintext name (netname) of the item
string pickup_sound; // sound to play on pickup
string world_model; // model to be displayed in the world
string view_model; // viewmodel for the item
} item_info_t;

// entries in this array must match the order of elements in item_seq -- CEV
item_info_t item_info[] =
{
// index 0: empty hands
{0, 0, 0, '0 0 0', '0 0 0', "Hands", "", "", ""},

// index 1-8: id1 weapons, second field is ammo type
{CT_ITEM_AXE, 0, 0.3, '0 0 0', '0 0 0',
"Axe", "cev/items/weapon_pickup.ogg",
"progs/g_axe.mdl", "progs/v_axe.mdl"},
{CT_ITEM_SHOTGUN, ITEM_AMMO_SHELLS, 0.3, '0 0 0', '0 0 0',
"Shotgun", "cev/items/weapon_pickup.ogg",
"progs/g_shotgu.mdl", "progs/v_shot.mdl"},
{CT_ITEM_SUPER_SHOTGUN, ITEM_AMMO_SHELLS, 0.3, '0 0 0', '0 0 0',
"Double-barrelled Shotgun", "cev/items/weapon_pickup.ogg",
"progs/g_shot.mdl", "progs/v_shot2.mdl"},
{CT_ITEM_NAILGUN, ITEM_AMMO_NAILS, 0.3, '0 0 0', '0 0 0',
"Nailgun", "cev/items/weapon_pickup.ogg",
"progs/g_nail.mdl", "progs/v_nail.mdl"},
{CT_ITEM_SUPER_NAILGUN, ITEM_AMMO_NAILS, 0.3, '0 0 0', '0 0 0',
"Super Nailgun", "cev/items/weapon_pickup.ogg",
"progs/g_nail2.mdl", "progs/v_nail2.mdl"},
{CT_ITEM_GRENADE_LAUNCHER, ITEM_AMMO_ROCKETS, 0.3, '0 0 0', '0 0 0',
"Grenade Launcher", "cev/items/weapon_pickup.ogg",
"progs/g_rock.mdl", "progs/v_rock.mdl"},
{CT_ITEM_ROCKET_LAUNCHER, ITEM_AMMO_ROCKETS, 0.3, '0 0 0', '0 0 0',
"Rocket Launcher", "cev/items/weapon_pickup.ogg",
"progs/g_rock2.mdl", "progs/v_rock2.mdl"},
{CT_ITEM_LIGHTNING_GUN, ITEM_AMMO_CELLS, 0.3, '0 0 0', '0 0 0',
"Thunderbolt", "cev/items/weapon_pickup.ogg",
"progs/g_light.mdl", "progs/v_light.mdl"},

// index 9-16: id1 ammo (small then large)
{CT_ITEM_AMMO_SHELLS, 0, VOL_MHI, '40 -13 -35', '0 10 0',
"shells", "cev/items/ammo_pickup.ogg",
"progs/a_mdls/m_shell1.mdl", "progs/a_mdls/m_shell1.mdl"},
{CT_ITEM_AMMO_SHELLS, 0, VOL_MHI, '40 -13 -35', '0 10 0',
"shells", "cev/items/ammo_pickup.ogg",
"progs/a_mdls/m_shell2.mdl", "progs/a_mdls/m_shell2.mdl"},
{CT_ITEM_AMMO_SPIKES, 0, VOL_MHI, '40 -13 -35', '0 10 0',
"nails", "cev/items/ammo_pickup.ogg",
"progs/a_mdls/m_nails1.mdl", "progs/a_mdls/m_nails1.mdl"},
{CT_ITEM_AMMO_SPIKES, 0, VOL_MHI, '40 -13 -35', '0 10 0',
"nails", "cev/items/ammo_pickup.ogg",
"progs/a_mdls/m_nails2.mdl", "progs/a_mdls/m_nails2.mdl"},
{CT_ITEM_AMMO_ROCKETS, 0, VOL_MHI, '40 -13 -35', '0 10 0',
"rockets", "cev/items/ammo_pickup.ogg",
"progs/a_mdls/m_rock1.mdl", "progs/a_mdls/m_rock1.mdl"},
{CT_ITEM_AMMO_ROCKETS, 0, VOL_MHI, '40 -13 -35', '0 10 0',
"rockets", "cev/items/ammo_pickup.ogg",
"progs/a_mdls/m_rock2.mdl", "progs/a_mdls/m_rock2.mdl"},
{CT_ITEM_AMMO_CELLS, 0, VOL_MHI, '40 -13 -35', '0 10 0',
"cells", "cev/items/ammo_pickup.ogg",
"progs/a_mdls/m_cells1.mdl", "progs/a_mdls/m_cells1.mdl"},
{CT_ITEM_AMMO_CELLS, 0, VOL_MHI, '40 -13 -35', '0 10 0',
"cells", "cev/items/ammo_pickup.ogg",
"progs/a_mdls/m_cells2.mdl", "progs/a_mdls/m_cells2.mdl"},

// id1 armor (second field is .skin)
{CT_ITEM_ARMOR_GREEN, 0, VOL_MHI, '40 -13 -35', '0 190 0',
"green armor", "items/armor1.wav",
"progs/armor.mdl", "progs/armor.mdl"},
{CT_ITEM_ARMOR_YELLOW, 1, VOL_MHI, '40 -13 -35', '0 190 0',
"yellow armor", "items/armor1.wav",
"progs/armor.mdl", "progs/armor.mdl"},
{CT_ITEM_ARMOR_RED, 2, VOL_MHI, '40 -13 -35', '0 190 0',
"red armor", "items/armor1.wav",
"progs/armor.mdl", "progs/armor.mdl"},

// pd3 armor shard
{CT_ITEM_ARMOR_SHARD, 0, VOL_LOW, '40 -13 -35', '0 10 0',
"armor shard", "cev/items/shard_pickup.ogg",
"progs/armshr.mdl", "progs/armshr.mdl"},

// id1 backpacks
{CT_ITEM_BACKPACK, 0, VOL_HIGH, '40 -13 -35', '0 10 0',
"backpack", "cev/items/backpack_pickup.ogg",
"progs/backpack.mdl", "progs/backpack.mdl"},

// pd3 backpacks
{CT_ITEM_BACKPACK, 0, VOL_HIGH, '40 -13 -35', '0 10 0',
"backpack", "cev/items/backpack_pickup.ogg",
"progs/pd_bpack.mdl", "progs/pd_bpack.mdl"},

// id1 health
{CT_ITEM_HEALTH, 0, VOL_MHI, '40 -13 -35', '0 10 0',
"Health (Rotten)", "items/r_item1.wav",
"progs/h_mdls/m_h15.mdl", "progs/h_mdls/m_h15.mdl"},
{CT_ITEM_HEALTH, 0, VOL_MHI, '40 -13 -35', '0 10 0',
"Health", "items/health1.wav",
"progs/h_mdls/m_h25.mdl", "progs/h_mdls/m_h25.mdl"},
{CT_ITEM_HEALTH, 0, VOL_MHI, '40 -13 -35', '0 10 0',
"Megahealth", "items/r_item2.wav",
"progs/h_mdls/m_h100.mdl", "progs/h_mdls/m_h100.mdl"},

// pd3 health
{CT_ITEM_HEALTH_VIAL, 0, VOL_MHI, '40 -13 -35', '0 10 0',
"Health Vial", "items/r_item1.wav",
"progs/h_mdls/pd_vial.mdl", "progs/h_mdls/pd_vial.mdl"},

// id1 keys (.option is the IT_ flag)
{CT_ITEM_KEY1, IT_KEY1, VOL_HIGH, '0 0 0', '0 0 0',
"silver key", "misc/medkey.wav",
"progs/w_s_key.mdl", "progs/w_s_key.mdl"},
{CT_ITEM_KEY1, IT_KEY1, VOL_HIGH, '0 0 0', '0 0 0',
"silver runekey", "misc/runekey.wav",
"progs/m_s_key.mdl", "progs/m_s_key.mdl"},
{CT_ITEM_KEY1, IT_KEY1, VOL_HIGH, '0 0 0', '0 0 0',
"silver keycard", "misc/basekey.wav",
"progs/b_s_key.mdl", "progs/b_s_key.mdl"},
{CT_ITEM_KEY2, IT_KEY2, VOL_HIGH, '0 0 0', '0 0 0',
"gold key", "misc/medkey.wav",
"progs/w_g_key.mdl", "progs/w_g_key.mdl"},
{CT_ITEM_KEY2, IT_KEY2, VOL_HIGH, '0 0 0', '0 0 0',
"gold runekey", "misc/runekey.wav",
"progs/m_g_key.mdl", "progs/m_g_key.mdl"},
{CT_ITEM_KEY2, IT_KEY2, VOL_HIGH, '0 0 0', '0 0 0',
"gold keycard", "misc/basekey.wav",
"progs/b_g_key.mdl", "progs/b_g_key.mdl"},

// id1 runes
{CT_ITEM_RUNE, 0, VOL_MHI, '40 -13 -35', '0 10 0',
"Rune of Earth Magic", "misc/runekey.wav",
"progs/end1.mdl", "progs/end1.mdl"},
{CT_ITEM_RUNE, 0, VOL_MHI, '40 -13 -35', '0 10 0',
"Rune of Black Magic", "misc/runekey.wav",
"progs/end2.mdl", "progs/end2.mdl"},
{CT_ITEM_RUNE, 0, VOL_MHI, '40 -13 -35', '0 10 0',
"Rune of Hell Magic", "misc/runekey.wav",
"progs/end3.mdl", "progs/end3.mdl"},
{CT_ITEM_RUNE, 0, VOL_MHI, '40 -13 -35', '0 10 0',
"Rune of Elder Magic", "misc/runekey.wav",
"progs/end4.mdl", "progs/end4.mdl"},

// mg1 runes
{CT_ITEM_RUNE, 0, VOL_MHI, '40 -13 -35', '0 10 0',
"Rune of Machinists", "misc/runekey.wav",
"progs/mg1_rune1.mdl", "progs/mg1_rune1.mdl"},
{CT_ITEM_RUNE, 0, VOL_MHI, '40 -13 -35', '0 10 0',
"Rune of Blacksmiths", "misc/runekey.wav",
"progs/mg1_rune2.mdl", "progs/mg1_rune2.mdl"},
{CT_ITEM_RUNE, 0, VOL_MHI, '40 -13 -35', '0 10 0',
"Rune of Stonemasons", "misc/runekey.wav",
"progs/mg1_rune3.mdl", "progs/mg1_rune3.mdl"},
{CT_ITEM_RUNE, 0, VOL_MHI, '40 -13 -35', '0 10 0',
"Rune of Cultists", "misc/runekey.wav",
"progs/mg1_rune4.mdl", "progs/mg1_rune4.mdl"},
{CT_ITEM_RUNE, 0, VOL_MHI, '40 -13 -35', '0 10 0',
"Rune of Astrologers", "misc/runekey.wav",
"progs/mg1_rune5.mdl", "progs/mg1_rune5.mdl"},
{CT_ITEM_RUNE, 0, VOL_MHI, '40 -13 -35', '0 10 0',
"Rune of Mystics", "misc/runekey.wav",
"progs/mg1_rune6.mdl", "progs/mg1_rune6.mdl"},

// id1 powerups
{CT_ITEM_ENVIROSUIT, 0, VOL_MHI, '40 -13 -35', '0 10 0',
"Biosuit", "items/suit.wav",
"progs/suit.mdl", "progs/suit.mdl"},
{CT_ITEM_INVISIBILITY, 0, VOL_MHI, '40 -13 -35', '0 10 0',
"Ring of Shadows", "items/inv1.wav",
"progs/invisibl.mdl", "progs/invisibl.mdl"},
{CT_ITEM_INVULNERABILITY, 0, VOL_MHI, '40 -13 -35', '0 10 0',
"Pentagram of Protection", "items/protect.wav",
"progs/invulner.mdl", "progs/invulner.mdl"},
{CT_ITEM_QUAD, 0, VOL_MHI, '40 -13 -35', '0 10 0',
"Quad Damage", "items/damage.wav",
"progs/quaddama.mdl", "progs/quaddama.mdl"},

// id1 gibs
{CT_ITEM_GIB1, 0, VOL_MHI, '40 -13 -35', '0 10 0',
"Gib", "items/damage.wav",
"progs/gib1.mdl", "progs/gib1.mdl"},
{CT_ITEM_GIB2, 0, VOL_MHI, '40 -13 -35', '0 10 0',
"Gib", "items/damage.wav",
"progs/gib2.mdl", "progs/gib2.mdl"},
{CT_ITEM_GIB3, 0, VOL_MHI, '40 -13 -35', '0 10 0',
"Gib", "items/damage.wav",
"progs/gib3.mdl", "progs/gib3.mdl"},

// id1 monster heads
{CT_ITEM_HEAD_ARMY, 0, VOL_MHI, '40 0 -20', '0 170 0',
"Soldier Head", "items/damage.wav",
"progs/h_guard.mdl", "progs/h_guard.mdl"},
{CT_ITEM_HEAD_DEMON, 0, VOL_MHI, '40 0 -20', '0 170 0',
"Fiend Head", "items/damage.wav",
"progs/h_demon.mdl", "progs/h_demon.mdl"},
{CT_ITEM_HEAD_DOG, 0, VOL_MHI, '40 0 -20', '0 170 0',
"Dog Head", "items/damage.wav",
"progs/h_dog.mdl", "progs/h_dog.mdl"},
{CT_ITEM_HEAD_ENFORCER, 0, VOL_MHI, '40 0 -20', '0 170 0',
"Enforcer Head", "items/damage.wav",
"progs/h_mega.mdl", "progs/h_mega.mdl"},
{CT_ITEM_HEAD_HELLKNIGHT, 0, VOL_MHI, '40 0 -20', '0 170 0',
"Death Knight Head", "items/damage.wav",
"progs/h_hellkn.mdl", "progs/h_hellkn.mdl"},
{CT_ITEM_HEAD_KNIGHT, 0, VOL_MHI, '40 0 -20', '0 170 0',
"Knight Head", "items/damage.wav",
"progs/h_knight.mdl", "progs/h_knight.mdl"},
{CT_ITEM_HEAD_OGRE, 0, VOL_MHI, '40 0 -20', '0 170 0',
"Ogre Head", "items/damage.wav",
"progs/h_ogre.mdl", "progs/h_ogre.mdl"},
{CT_ITEM_HEAD_PLAYER, 0, VOL_MHI, '40 0 -20', '0 170 0',
"Player Head", "items/damage.wav",
"progs/h_player.mdl", "progs/h_player.mdl"},
{CT_ITEM_HEAD_SHALRATH, 0, VOL_MHI, '40 0 -20', '0 170 0',
"Vore Head", "items/damage.wav",
"progs/h_shal.mdl", "progs/h_shal.mdl"},
{CT_ITEM_HEAD_SHAMBLER, 0, VOL_MHI, '40 0 -20', '0 170 0',
"Shambler Head", "items/damage.wav",
"progs/h_shams.mdl", "progs/h_shams.mdl"},
{CT_ITEM_HEAD_WIZARD, 0, VOL_MHI, '40 0 -20', '0 170 0',
"Wizard Head", "items/damage.wav",
"progs/h_wizard.mdl", "progs/h_wizard.mdl"},
{CT_ITEM_HEAD_ZOMBIE, 0, VOL_MHI, '40 0 -20', '0 170 0',
"Zombie Head", "items/damage.wav",
"progs/h_zombie.mdl", "progs/h_zombie.mdl"}
};
#endif

Return to the top of this page or return to the overview of this repo.

Log defs_items.qc

Date Commit Message Author + -
2025-03-30 Big commit. Entity networking, etc. cev +327  

Return to the top of this page or return to the overview of this repo.