dysphie / nmrih-backpack2

Sourcemod plugin for No More Room in Hell that adds backpacks
9 stars 5 forks source link

[NMRiH] Backpack 2

This is a complete rewrite of Backpack by Ryan with added features and bug fixes.

It adds portable inventory boxes to the game. They function just like normal inventory boxes except they also pick up items that are dropped on top of them. Punching one will place it on your back and allow you to carry it around the level.

Backpacks are able to store more ammo than a regular inventory box. By default backpacks store up to 4 boxes worth of ammo per slot. This means one slot holds 4 barricade boards or 40 rounds of 9mm or 80 rounds of .22.

Backpacks are randomly colored to help distinguish them.

Video

https://user-images.githubusercontent.com/11559683/142296315-f216a804-92b9-4bff-bbfd-e247b86dc9d1.mp4

Requirements

Installation:

Using backpacks

What's new in 2.0

Some old features are currently unavailable, though I plan on adding them

Backpack template options

You can configure backpack types, behavior and appareance in addons/sourcemod/configs/backpack2.cfg.

Item configs

Keys not mentioned here should be left as-is unless you know what you're doing, as they're required for the plugin to function properly.

Configuration variables are saved to cfg/sourcemod/plugin.backpack2.cfg

Command Description Default Value
sm_backpack_loot_ammo_min Minimum ammo boxes to place in backpacks spawned as loot 0
sm_backpack_loot_ammo_max Maximum ammo boxes to place in backpacks spawned as loot 4
sm_backpack_loot_ammo_min_pct Minimum fill percentage for ammo boxes spawned as backpack loot 40
sm_backpack_loot_ammo_max_pct Maximum fill percentage for ammo boxes spawned as backpack loot 100
sm_backpack_loot_gear_min Minimum gear items to place in backpacks spawned as loot 0
sm_backpack_loot_gear_max Maximum gear items to place in backpacks spawned as loot 1
sm_backpack_loot_weapon_min Minimum weapons to place in backpacks spawned as loot 0
sm_backpack_loot_weapon_max Maximum weapons to place in backpacks spawned as loot 2
sm_backpack_show_hints Whether to show screen hints on how to use backpacks 1
backpack2_version Plugin version and description
sm_backpack_hints_interval Rate in seconds at which hints are updated 1.0
sm_backpack_ammo_stack_limit Number of ammo pickups that can be stored per ammo slot 4
sm_backpack_count Number of backpacks to create at round start 1
sm_backpack_colorize Randomly colorize backpacks to help distinguish them 1
sm_backpack_glow_distance Glow backbacks in this range of the player 90
sm_backpack_blink Whether dropped backpacks pulse their brightness 0
sm_backpack_zombie_spawn_chance Chance for a zombie to spawn with a backpack 0.005

Admin Commands