Inventory, gear, boosters & gadgets
Inventory basics
Section titled “Inventory basics”bs_inventory/config/config_inventory.lua, Inventory.Settings:
gridWidth = 8,gridHeight = 5,hotbarSlots = 5,openKey = 'I',tradeDistance = 3.0,dropLifetime = 1800, -- seconds a dropped bag stayspickupRange = 1.8,corpseLifetime = 900,overweightSlowdown = 0.75,Items take space on the grid (w x h) and have weight. The hotbar is keys 1-5.
Adding an item
Section titled “Adding an item”Items are in bs_inventory/config/config_items.lua, Items.Definitions. On start they are synced into the bs_item_definitions table so DB and config don’t drift. A real one from the file:
medkit = { label = 'Medkit', category = 'medical', weight = 1.2, w = 2, h = 2, stack = 3, usable = true, value = 120, data = { heal = 75, revive = true } },What goes in data depends on the category. Some you will use:
heal,hunger,thirst- consumablesweapon = 'WEAPON_X'- the item is a weapon (bs_guard also checks you really have it)drug = ...- handled by bs_drugs, see Drugshandled = true- the inventory does not consume it on use, another resource doesdefaultMeta = {...}- metadata a new item gets when nobody gives it any (drone battery uses this)
Recipes are in the same file (craft_medkit etc). A recipe with factionBase = true only crafts inside your own faction’s active flag radius.
Icons: the inventory uses the line icons in bs_ui/html/js/icons.js. A new item without an icon just shows a generic one.
Gear (clothes vs equipment)
Section titled “Gear (clothes vs equipment)”Clothes are appearance, not items since migration 021. What you wear is set at the wardrobe NPC (bs_traders) and saved with the character. Only the backpack and body armour are still items with equipment slots, because they have gameplay (capacity, protection). That’s config_clothing.lua.
Container loot (bins, cars, cabinets) is in bs_interactions/config/config_containers.lua. Zombie loot tables are in bs_economy/config/config_economy.lua. Global.lootMultiplier and Global.lootRollsMultiplier in F1 scale container loot without touching the tables.
Boosters and gadgets
Section titled “Boosters and gadgets”Two separate systems with their own slots.
Boosters (bs_boosters) | Gadgets (bs_gadgets) | |
|---|---|---|
| What | personal buffs, used instantly | things you place or fly |
| Slots / keys | 3, keys 6 / 7 / 8 | 2, keys 9 / 0 |
| Item category | booster | gadget |
| Config | bs_boosters/config/config_boosters.lua | bs_gadgets/config/config_gadgets.lua |
Keys are FiveM key mappings, players can rebind them in Settings > Key Bindings > FiveM. Faction skills booster_cd / booster_cd2 cut both cooldowns.
Boosters: Adrenaline (sprint, endless stamina), Focus (less recoil and sway), Painkiller drip (heal over time), Fortify (ignores part of every zombie bite). All end when you go down.
Gadgets:
- Scout drone - fly it with WASD, Space/Ctrl, Shift boost, E pings a spot for your squad. Has a battery (
Gadgets.Batteries: small 60 s, medium 120 s, large 240 s of flight). Charges sitting in a running vehicle, or with E next to a running vehicle or a generator (Gadgets.Charge). - Mini turret - shoots walkers only, never players. One per player. Every shot is checked by the server.
- Medic beacon - heals you and squad mates inside the radius.
- Decoy - a boombox that makes noise and pulls walkers. Can be shot.
- Riot shield - parked for now (
Gadgets.Types.booster_shield.enabled = false), the prop doesn’t show on the arm yet.
The item ids are still booster_drone, booster_turret, booster_medic, booster_decoy so old saves work. Don’t rename them.
Give items for testing from F10 > ITEMS (there’s a BOOSTERS and GADGETS tab), or from code with exports.bs_inventory:GiveItem(src, item, amount, metadata).
bs19.org · Privacy · Terms · Cookie settings