entityguide‎ > ‎

item_inventory

Highly customizable item that can be stored in player inventory based on visual interface, and applies bunch of optional effects on players. Item_inventory contains a lot of trigger conditions. It's possible to make other entities require specific item, abort to have an item, force to drop item e.t.c. You can also make this item useable at player's will from inventory menu (self-activation). This is how you can implement gas masks, invincibility, speed boots, healing potions, keys to locked doors, remote controllers, capture the flag, air tanks and many more! Those entities are fully integrated with item_inventory, each including inventory related keyvalues:
  • func_button
  • func_door
  • func_door_rotating
  • func_rot_button
  • func_tankcontrols
  • func_traincontrols
  • momentary_door
  • trigger_changelevel
  • trigger_hurt
  • trigger_multiple
  • trigger_once
  • trigger_teleport
  • func_water

Keyvalues


"
Gravity Setting", movetype :
Determines how items behave after spawn. 'Fall to the ground' makes entity fall to first brush beneath it. Note that not all entities with collision may block items to fall through them. Set 'Hover in the air' so items won't fall from it's 
starting position. You can also set 'Hover in the air, ignore brush collision' so item won't be affected by brush collision. 
Use 'Unmoveable' to make item completely unmovable by any external influence, unless changed at runtime by e.g. trigger_changevalue.

"Solid Setting", solid :
Determines item solidity. 'Hollow' disables solidity completely. 'Touch on Edge, non-blocking' is default setting that makes
item behave as trigger.
'Touch on Edge, blocking' makes item solid, it enables collision but requires hull sizes to be specified.

"Custom respawn time", m_flCustomRespawnTime:
Specify a number to ovveride respawn time of this item (in seconds). '0' for instantaneous respawn.

"Custom Model", model :
You need to specify model of item_inventory.

"Skin", skin:
Model skin to use, if model have multiple skins.

"Body", body:
Model body to use, if model have multiple bodies.

"Sequence Name", sequencename:
Default model sequence name to set.

"Animation Sequence (Number)", sequence:
Change model sequence by specifying it's number.

"Scale Model", scale:
Model size scale, higher values for bigger model. Hull is resized as well.

"Custom min hullsize (X Y Z)", minhullsize :
If set, this will overwrite the monster's default minimum hullsize. Minimum and maximum hullsize form a solid cuboid which define the monster's collision hull. Think of them as two span-vectors originating from the monster's origin.

"Custom max hullsize (X Y Z)", maxhullsize :
If set, this will overwrite the monster's default maximum hullsize. Minimum and maximum hullsize form a solid cuboid which define the monster's collision hull. Think of them as two span-vectors originating from the monster's origin.

"Sound Replacement File", soundlist :
Set the path to a sound replacement file for the item. The path begins in 'svencoop/sound/mapname', whereas 'mapname' would be your map's name. You can go to the parent directory using '../'. A valid sound replacement file contains one or more lines with two sound-paths, which are seperated by a space and wrapped into quotes. The first sound is the sound to be replaced. The second sound is the new sound. Sound-paths start in the sound directory. You cannot go to the parent directory using '../' in that case. These sounds do not need to be precached using a custom_precache point entity.

"Item name", item_name:
Name of the item to refer to. This is not a tagetname. You can trigger this item by a targetname and you can refer to this item
by it's item name.

"Item group name", item_group:
You can assign this item to group. You can refer to item group from other item-related keyvalues as well.

"Display name (HUD)", display_name:
It's a display name of item that show up at the inventory menu window.

"Description (HUD)", description:
It's a description of the item player can read at the the inventory menu window.

"Item Icon (HUD)", item_icon:
Name of the sprite file to use as item hud icon. Provide the full file name and path relative to the 'sprites' directory.

"Self-activation limit", activate_limit:
If 'Holder:Allowed to self-activate' is set to 'Yes', this is a number of times player can activate this item.

"Collection limit", collect_limit:
How many item duplicates player can hold in his inventory. '0' for no limit.

"Item weight", weight:
Item weight. The limit for all items in inventory is '100', Over that value player cannot pick up more items.

"Collect: Entity target names", filter_targetnames:
Only enitites with given name(s) can pick up this item.

"Collect: Entity class names", filter_classnames:
Optional filter. Only entities with given class(es) can pick up this item.

"Collect: Teams", filter_teams:
Optional filter. Only players that are part of given team(s) name can pick up this item.

"Collect: NPC classifications", filter_npc_classifications:
Optional filter. Only Monsters with given class(es) are able to pick up this item.

"Collect: Need item(s)", item_name_required:
Name of required item(s) (held in inventory) to pick up this item.

"Collect: Need item(s) from group(s)", item_group_required:
Name of group(s) (in which item(s) from player inventory belongs) required to pick up this item.

"Collect: Item count in group need have", item_group_required_num:
Total number of items that are part of specified group(s) required to pick up this item. Specify a group names in keyvalue above.

"Collect: Item(s) moved", item_name_moved:
Allow to pick up this item only when specified item_inventory wasn't relocated yet (and is not in someone's inventory).

"Collect: CAN'T have item", item_name_canthave:
Name of item(s) in player inventory that prevents from picking up this item off the ground. 

"Collect: CAN'T have item from group", item_group_canthave:
Name of group(s) (in which item(s) from player inventory belongs) that prevents from picking up this item off the ground.

"Collect: Item count in group CAN'T have", tem_group_canthave_num:
Total number of items that are part of specified group(s) that prevents from picking up this item from a ground.
Specify a group names in keyvalue above.

"Collect: Item(s) NOT moved", item_name_not_moved:
Allow to pick up this item only when specified entities (of item_inventory class) has been moved from it's starting position.

"Carried: Hide item (3rd person)", carried_hidden:
Hide item from 3rd person view. When 'No' is selected, the item model is floating above player head when equipped.

"Carried: Skin", carried_skin:
Change models' skin of carried item (only when it's not hidden).

"Carried: Body", carried_body:
Change models' body of carried item (only when it's not hidden).

"Carried: Sequence Name", carried_sequencename:
Change models' sequence of carried item (only when it's not hidden).

"Carried: Sequence Number (overrides name)", carried_sequence:
Change models' sequence by specifying it's number.

"Return: Wait", return_timelimit:
After this amount of time the item returns to it's starting position (when dropped somewhere else).

"Return: Delay respawn (materialisation)", return_delay_respawn:
Allows to specify if item_inventory will wait for respawn after returning to it's default position.

"Holder: Hold time limit", holder_timelimit:
Maximum time the item can be held on for, then it's returning if possible.

"Holder: Delay between self-activations", holder_time_activate_wait:
If 'Holder:Allowed to self-activate' is set to 'Yes', this is a delay between which player can activate this item.

"Holder: Wearing out trigger time", holder_time_wearout:
Time before 'Hold time' reach it's limit to trigger target specified in 'Target: On wearing out' keyvalue. If you set it to e.g. 4,
it will fire a target 4 seconds before this item's 'Hold time limit' ends. It's useful if you want to trigger a sound or a game_text informing player that item will be worn out soon. Example: player picked up power-up which have 'Hold time limit' set to 10, and 'Wearing out trigger time' to 3, so 3 seconds before item is removed from player (in other words, before 'Hold time limit' ends) game_text specified in 'Target: On wearing out' is fired with message "Warning! 3 seconds for buff to end!".


"Holder: Allowed to self-activate", holder_can_activate:
Set it to 'Yes' allows players to activate this item by themselfes from inventory menu.

"Holder: Hold time limit doesn't start until item activated", holder_timelimit_wait_until_activated:
If set to 'Yes', hold time limit doesn't start until item is activated by player through inventory menu.

"Holder: Allowed to drop", holder_can_drop:
Determines whenever item can be dropped manually by player from within inventory menu.

"Holder: Keep item on death", holder_keep_on_death:
Self-explanatory. Note that player will lost this item after respawn if keyvalue below isn't set to 'Yes'.

"Holder: Keep item on respawn", holder_keep_on_respawn:
Self-explanatory. Remember that player can also lose his item on death, if "Keep item on death" is set to 'No', the player won't keep this item.

"Target: On collect [self/team/others]", target_on_collect<_team/_other>
Fire specified target(s) when item is successfully collected.

"Target: On can't collect [self/team/others]", target_cant_collect<_team/_other>:
Fire specified target(s) when player failed to collect item.

"Target: On drop [self/team/others]", target_on_drop<_team/_other>:
Fire specified target(s) when item is dropped (by player or trigger).

"Target: On can't drop [self/team/others]", target_cant_drop<_team/_other>:
Fire specified target(s) when attempting to drop an item is unsuccessful.

"Target: On self-activate  [self/team/others]", target_on_activate<_team/_other>:
Fire specified target(s) when player activate item from inventory menu, only if 'Allowed to self-activate' is set to 'Yes'.

"Target: On can't self-activate  [self/team/others]", target_cant_activate<_team/_other>:
If 'Allowed to self-activate' is set to 'Yes' and item activation limit hit 0, this is a target to fire when player attempts
to activate it again.

"Target: On use by trigger [self/team/others]", target_on_use<_team/_other>:
Fire specified target(s) when item is used by trigger.

"Target: On wearing out [self/team/others]", target_on_wearing_out<_team/_other>:
Fire specified target(s) when item's 'Wearing out trigger time' ends (which must be greater than 0 but less than 'Hold time limit' value), see 'Holder: Wearing out trigger time' above for more info.

"Target: On return [self/team/others]", target_on_return<_team/_other>:
Fire specified target(s) when item returns to his starting position.

"Target: On materialise after return", target_on_materialise:
Fire specified target when item gets materialised after a drop or return.

"Target: On Destroy", target_on_destroy:
Fire specified target when item gets destroyed by environment.

"Effect: Wait until item is self-activated?", effects_wait_until_activated:
If 'Allowed to self-activate' is set to 'Yes', this will determine if effects should be applied only when player activate
an item from inventory menu.

"Effect: Permanent?", effects_permanent:
Specify if effects below effect applied on player are permanent ('Yes') or temporary ('No'). If option 'No' is chosen, the effects ends after "Hold Time Limit" is hit, and if 'Yes' is selected, effect ends after respawn.

"Effects: Glow shell color (R G B)", effect_glow:
Color of glow shell effect to apply. '0 0 0' for none.

"Effects: Block weapons", effect_block_weapon:
Prevent player from using weapons ('Yes'/'No').

"Effects: Invulnerable", effect_invulnerable:
Makes player invulnerable ('Yes'/'No').

"Effects: Invisible", effect_invisible:
Makes player invisible (for enemies) ('Yes'/'No').

"Effects: Non-solid", effect_nonsolid:
Makes player not-solid for different dynamic objects ('Yes'/'No').

"Effects: +/- time before drown", effect_respiration:
Additional amount of time before drown (can be negative!).

"Effects: Friction modifier (%)", effect_friction:
Percent of friction to change on player.

"Effects: Gravity modifier (0%+)", effect_gravity:
Percent of gravity to change on player.

"Effects: Speed modifier (%)", effect_speed:
Percent of speed to change on player. Weapon_minigun does not affect this value.

"Effects: Damage modifier (%)", effect_damage:
Player damage modifier in percent.


Flags


128
: "TOUCH only": pick item up only by touching it.

256: "USE only": pick item up only by using it ('USE' key).

512: "Can use w/o LoS": Player can pick up this item even when it's not in his line of sight (normally it's required with USE only flag).

1024: "Disable Respawn": Prevents this item from respawning.


Note

    • Use semicolon ' to separate multiple item/target/group names in filters and conditions.
    • If both 'TOUCH only' and 'USE only' flags are selected, the item can only be collected by trigger, but only if player is the !activator.
    • Item can be collected on trigger, touch and use when none of flags above are selected.
    • You can specify a group of affected players in all trigger fields making it possible to have different action for different players.


    Changes

      • 5.07: All trigger targets are split into self (collector) and everyone else (other) as well as whole team (team).
      • 5.07: Added new trigger targets types: 'on materialize', 'on destroy' and 'on wearing out' paired with 'Wearing out trigger time'.
      • 5.07: New Inventory events (in entities with InventoryRules class) that allows to ignore certain triggers events on affected items.
      • 5.23: Added 'Unmoveable' to Gravity Settings.
      • 5.23: Added 'Solid Setting' keyvalue.
      Comments