Docs/Guides
Troubleshooting
Fix common rtv-mp scenario problems: load failures, reload errors, loot.json validation messages, store errors, step budget timeouts and NPC spawn failures.
API version 1Lua 5.1Updated 2026-11-07
| Symptom | Cause |
|---|---|
Server stops at startup with load scenario "x": scenario folder ... does not exist | The folder must sit in scenarios/ next to the settings file the server was started with. |
/scenario reload says reload failed, keeping the running scenario | A data file or a script has an error; the message gives the file, the JSON path or the line. Nothing changed. |
scenario "x": layer/file.json: path: reason at startup | A data file is invalid; the layer names which scenario in the base chain set the value. Run /scenario validate x to list all problems. |
loot.json rules[2]: item "..." is unknown or ambiguous | Use /items <search> and copy the exact name or ID. Rules are numbered from 0. |
scenario data ... is not valid JSON | data/scenarios/<scenario>.json is damaged. Restore it from a backup, or move it away to start with empty data. |
cannot store a ... | store.set was given a handle or function. Store plain data such as player.identity. |
wait() only works inside ... | wait was called at the top level of a file, or inside your own coroutine. |
stopped after exceeding its 25ms step budget | A loop ran too long without wait. |
/name is a built-in chat command | Pick another command name. |
give returns player must be alive, fully loaded ... | The player is loading, travelling, dead, or still receiving items. Wait and retry. |
spawn_npc returns could not spawn there ... | The position is not walkable ground, the area is a hideout, a Nomad gathering is active, or IDs ran out. Use area:random_position(). |
place_objects returns an unknown or ambiguous target error | Check server.fetch_prefabs() or server.fetch_assets(). Use the exact asset path when a short name matches several objects. |
place_objects returns a limit error | Check max_buildings_per_area, max_pieces_per_area, and max_shapes_per_area in objects.json. |
| A script-placed building is gone after a reload | Reloads remove script placements; place them again in init.lua and area_loaded, as in the recipe. |
| A hook does not fire after a reload | Players and areas present at reload do not re-fire player_join, player_spawn or area_loaded. |
Lua states are shared by the scenario on the simulation goroutine. Loot rules in loot.json affect world refresh sources; AI corpse, Nomad, airdrop and trader contents follow their own data and game rules. Count-based world restocking is configured separately in economy.json and documented in docs/economy.md.
Found a mistake or missing detail? Tell us in the Discord.
rtv-mp