Tutorial / Tools > World

Generate Loot

Loot containers or item spawners all over the map (nav mesh).

What it does

Generate Loot fills an area, or the whole map, with loot in one run. It picks walkable spots from the map's nav mesh around where you aim. You see the spots first, then confirm.

It makes one of two things. Loot containers are crates, lockers or cabinets in loot mode, refilled from a loot table (World > Create Storage). Item spawners each make a weapon or item picked from the loot table, and make it again after it is taken.

Every run is listed in the panel and can be removed again, also after a restart.

Where to find it

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

Superadmins only. Other players get "Only superadmins can generate." The map needs a nav mesh: make one in the AI > AI Paths panel, or with nav_generate.

Admins only (v3.6.11.3): this tool sets up the server, so it cannot be given to players; it is greyed out in Settings > Player Access.

Controls

Key What it does
Left click Preview spots around where you aim
Right click Make the previewed loot
Reload Remove the last run (the newest loot run on this map)

The panel

Option What it does Default
Make Loot containers (crates, lockers, cabinets) or Item spawners (weapons and items of the loot table; at most 64 per map). Loot containers
Loot table The loot table to use. Tables are made in World > Create Storage (Loot tables). First table
Containers Mixed, Crates, Lockers or Cabinets. Mixed picks one at random per spot. Mixed
Refill after (minutes; spawners: made again after) Container refill time, or spawner respawn time. 0-120. 10
Containers' loot Shared (first come, first served) or Everyone gets their own. Shared
Where
Option What it does Default
Around where you aim, radius (0 = the whole map) Search radius, 0-20000. 2000
How many Spots to find, 1 up to kgxat_gen_max. 20
At least this far apart Minimum distance between spots, 32-2000. 300
At least this far from spawn points 0-3000. 500
Inside / outside Both, Inside only (a roof above) or Outside only (open sky). Both
Not inside zones (World > Zones) Skip spots inside zones. On

Cancel the preview clears the marked spots without making anything.

Runs

A list of every run on this map with the columns When, What and # (how many were made). Right-click a run and pick Remove what this run made. Remove everything ever generated (both tools) removes all containers, item spawners and props that Generate Loot and Generate Map Props made on this map. Refresh reloads the list. Below the list you see the nav mesh state: loaded, generating or none.

Safety (superadmins)
Option What it does Default
Most things one run makes (kgxat_gen_max) Cap per run, 1-2000. Click Apply the number above to save it. 300
Back up the data files before each run (data/kgx_admin_toolbox/backups/) (kgxat_gen_backup) Copies the map's storage and item spawner files before a run. On

How to use it

Fill part of the map with loot crates
  1. Make sure a loot table exists in World > Create Storage.
  2. Set Make to Loot containers, pick the Loot table and the Containers style.
  3. Set the radius and How many, for example 1500 and 10.
  4. Aim at the center of the area and left-click. The spots are marked and the HUD shows how many.
  5. Right-click to make them. They are made a few at a time.
  6. Players open the containers with E.
Place item spawners instead
  1. Set Make to Item spawners and pick a loot table with weapons or items.
  2. Set Refill after to the respawn time in minutes.
  3. Left-click to preview, then right-click to make them.
Undo a run
  1. Press reload with the tool to remove the newest loot run.
  2. Or right-click any run in the Runs list and pick Remove what this run made.

Settings and commands

Setting What it does Default Range
kgxat_gen_max Most things one Generate Loot / Generate Map Props run makes. 300 1-2000
kgxat_gen_backup Back up the data files before generating. 1 0-1

Tips and limits

  • A preview expires after 5 minutes. Right click without a preview says "Make a preview first (left click)."
  • Spots are never on or near players, spawn points or jails, and only where the container fits.
  • If the area is small, crowded or the spacing is large, fewer spots are found and you are told how many.
  • Item spawners are capped at 64 per map. Their respawn time is at least 30 seconds.
  • Only weapon and item entries of the loot table are used for item spawners.
  • Generated containers and spawners are saved for the map and come back after a restart.
  • Only one run can work at a time. Removing waits until a run is done.
  • The run list keeps the 100 newest runs per map.

Back to Tools

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