set_encounters
Replace a map's random encounter list with validated troops, specifying weights and region restrictions, and set the average steps between encounters.
Instructions
Set a map's random-encounter list (replaces it wholesale) and optionally its encounterStep (average steps between encounters). Each encounter is { troopId, weight?, regionSet? }: weight biases the random pick (default 5), regionSet restricts it to those map region ids (empty/omitted = anywhere). Every troopId is validated against Troops.json — a non-existent troop throws. Prefer this over update_map for encounters (it validates and hides the on-disk shape).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mapId | Yes | The ID of the map | |
| dryRun | No | Preview only: return a diff of what would change without writing to disk. | |
| encounters | Yes | The full encounter list to set (replaces any existing entries) | |
| encounterStep | No | Average number of steps between encounters (unchanged if omitted) |