Make a tile a wall, a ladder, a bush
set_tileset_flagsEdit RPG Maker MZ tileset flags to set tile passability, blocking, ladders, bushes, counters, damage, and terrain tags across all maps without the editor.
Instructions
Edit what tiles do, without the editor. MZ keeps this as an 8192-entry flags array per tileset: 0x01/0x02/0x04/0x08 are impassable from Down/Left/Right/Up, 0x10 makes those four override the layers underneath, 0x20 ladder, 0x40 bush, 0x80 counter, 0x100 damage floor, 0x200/0x400/0x800 boat/ship/airship, and bits 12 up are the terrain tag. Passage is per direction, so passable: false is a fence and blockFrom: ["up"] is a ledge you can step onto but not climb back off. One bit has to be handled for you: MZ's 0x10 means "no effect on passage" — Game_Map.checkPassage skips the tile entirely — and much of the stock tileset (the pillars, trees and statues among others) ships with it set, so writing passage bits into one of those tiles without clearing it reports success and blocks nothing. Any passage change therefore clears 0x10 unless you pass overwrite: true on purpose, and the reply says when it did. For an A1-A4 autotile the id a map stores is one of 48 shapes of a base pattern and the engine reads the flags of that stored id, so a change is applied across the whole shape group unless shapes: false says otherwise; the reply reports which ids moved and what each flag became. This reaches every map that uses the tileset at once, which is the point and the danger: dryRun shows the before and after without writing, and validate_game re-checks the maps that now block.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| tiles | Yes | ||
| dryRun | No | Report what would change and write nothing | |
| tilesetId | Yes |