item_inventory

From Sven Co-op
Revision as of 23:29, 27 January 2019 by GeckonCZ (talk | contribs) (Import of converted entguide pages from Sven Manor.)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
item_inventory
Type

point

Status

supported

 


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. This is how you can implement gas masks, invincibility, speed boots, keys to locked doors, capture the flag, air tanks and many more! Those entities are fully integrated with item_inventory, each including inventory related keyvalues: func_buttonfunc_doorfunc_door_rotatingfunc_rot_buttonfunc_tankcontrolsfunc_traincontrolsmomentary_doortrigger_changeleveltrigger_hurttrigger_multipletrigger_oncetrigger_teleportfunc_water

1 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 move or fall from it's starting position.

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) : displayname

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.

Collection limit : collect_limit

How many item duplicates player can hold in his inventory. '0' for no limit.

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

<Not implemented yet>Optional filter. Only entities with given class(es) can pick up this item.

Collect: Teams : filter_teams

<Not implemented yet>Optional filter. Only players that are part of given team(s) name can pick up this item.

Collect: Player classes : filter_player_classes

<Not implemented yet>Optional filter. Only players with given class(es) are able to pick up this item.

Collect: NPC classifications : filter_npc_classifications

<Not implemented yet>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: Animation Sequence (Number) : 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 : 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: 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 drop manually : 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 when item is successfully collected. Target: On can't collect [self/team/others] : target_cant_collect<team/other>

Fire specified target when player failed to collect item.

Target: On drop [self/team/others] : target_on_drop<team/other>

Fire specified target when item is dropped (by player or trigger).

Target: On can't drop [self/team/others] : target_cant_drop<team/other>

Fire specified target when attempting to drop an item is unsuccessful.

Target: On use (by trigger) [self/team/others] : target_on_use<team/other>

Fire specified target when item is used by trigger.

Target: On wearing out [self/team/others] : target_on_wearing_out<team/other>

Fire specified target 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 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: 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.

2 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 either '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.

3 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.