Tutorial / Admin panels > World

Loot Tables

Make the weighted lists of weapons, ammo, items and money that loot containers fill themselves from, shared by every map.

What it does

A loot table is a list of things a loot container can hold. Each time a container fills, it picks random entries from its table. An entry with a higher weight comes up more often.

Loot tables are shared by every map. You pick a table for a container in its editor, on the Loot tab (World > Create Storage, right-click a container).

When the server has no loot tables, the addon makes a starter table called Basic supplies. It holds pistol, SMG and buckshot ammo, health kits, batteries, a pistol, an SMG and money.

Where to find it

Q menu > KGX's Admin Toolbox > World > Loot Tables.

Toolbox admins can use it. Superadmins can also give it to players in Settings > Player Access with the Storage (containers list, loot tables) tick. Players with the Create Storage tool can read the tables but not save them.

The panel

Table and entries
Control What it does
Loot table Picks the table to view and edit.
Entry list Columns Kind, Item, Amount (a range like 12-36) and Chance (the entry's share of the total weight, in %). Click an entry to load it into the form.
Entry form
Option What it does Default
Kind Weapon, Ammo, Item (entity) or Money. Weapon
Class (or Pick) The weapon, ammo type or entity class. Not used for money. Empty
Pick the item... Opens a picker for the chosen kind and fills Class.
Amount (least) Smallest amount, 1 to 1000. Weapons always give 1. 1
Amount (most) Largest amount, 1 to 1000. 1
Weight (how often) 1 to 100. Higher comes up more often. 10
Buttons
Button What it does
Add entry Adds the form as a new entry.
Update selected entry Replaces the selected entry with the form.
Remove selected entry Removes the selected entry.
Save this loot table Saves your changes to the server.
New loot table... Asks for a name and makes an empty table.
Rename this loot table... Renames it. Containers using it follow the new name.
Delete this loot table... Deletes it after a confirmation. Containers using it stop getting loot.

How to use it

Make a new loot table
  1. Click New loot table... and enter a name, such as Police armory.
  2. Set Kind to Weapon and click Pick the item... to choose one.
  3. Set Weight (how often) and click Add entry.
  4. Add ammo the same way, with Amount (least) and Amount (most) for the range.
  5. Check the Chance column, then click Save this loot table.
Change an entry
  1. Pick the table in Loot table.
  2. Click the entry. Its values load into the form.
  3. Change them and click Update selected entry.
  4. Click Save this loot table.
Use the table in a container
  1. Take out World > Create Storage and right-click a container.
  2. On General, set Kind to Loot.
  3. On Loot, pick your table in Loot table and click Save.

Tips and limits

  • Saved for every map in data/kgx_admin_toolbox/loot_tables.json.
  • Changes in the form are local until you click Save this loot table.
  • At most 100 loot tables, and 100 entries per table. Names are up to 40 characters.
  • Each fill rolls a random number of items between the container's Items per fill (least) and (most). The same ammo type or money rolled twice stacks into one slot.
  • Weapons from loot come with their normal starting ammo.
  • Money goes to the wallet (with DarkRP: DarkRP money) and is skipped while the economy is off.
  • Entries whose class does not exist on the server are skipped when loot is rolled.

Back to Admin panels

Type to search every tool, panel, setting, FAQ answer and release.