Project Zomboid

Project Zomboid

Airdrops
computer.pers  [developer] 24 Oct @ 2:24pm
Custom Loot Tables [EN]
Using Custom Loot Tables

Description

The mod supports two loot modes:

1. Preset Mode (DefaultAirdropLootTable = true) - uses built-in presets (medical, survival, tools, etc.)
2. INI File Mode (DefaultAirdropLootTable = false) - uses custom table from AirdropLootTable.ini file

Important: Both modes support the LootQuantityMultiplier sandbox setting for balancing loot quantities in multiplayer.

Setting up Custom Loot Table

Step 1: Creating the File
1. Copy the AirdropLootTable.ini.example file to the Zomboid/lua/ folder
2. Rename it to AirdropLootTable.ini

Step 2: Game Configuration
1. Launch the game
2. In sandbox settings, find the "Air Drop" section
3. Set "Using Default Airdrop Loot Table" = false

Step 3: Editing the Table
Edit the AirdropLootTable.ini file to your liking. Table structure:

return { { type = "combo", -- Type: combo, item, oneof chance = 100, -- Spawn chance (0-100) quantity = 1, -- Quantity (optional) id = 1, -- Unique ID (optional) child = { -- Child elements { type = "item", chance = 100, quantity = 1, child = "Base.ItemName" } } } }

Element Types:
- combo - group of elements, all will be processed
- item - specific item
- oneof - one random element from the list

Item Examples:
- Base.AntibioticsBox - antibiotics box
- Base.Bandage - bandage
- Radio.WalkieTalkie4 - walkie-talkie
- Base.CannedMushroomSoup - canned mushroom soup

Debugging

Enable "Debug Messages" in sandbox settings to view logs:
- [createAirdrop] Using preset loot: survival - preset mode is used
- [createAirdrop] Using custom loot table from AirdropLootTable.ini - INI file is used

Compatibility

- By default, the mod uses preset mode (as in previous versions)
- Switching to INI mode fully restores the old functionality
- If INI file is missing and mode = false, the airdrop container will be empty
Last edited by computer.pers; 24 Oct @ 2:31pm