> For the complete documentation index, see [llms.txt](https://axiomemu.gitbook.io/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://axiomemu.gitbook.io/docs/data/gate.md).

# Move

Every warp gate in the world: the tile that triggers the warp, where it sends the player, and the level / reset / account-tier gates required to use it. Referenced by teleport commands, event entry points, respawn targets, and client-side doors.

## File Location

```
Data/Move/Gate.txt
```

Loaded once at GameServer startup. Changes require a restart.

## Format

Plain text, whitespace-delimited. The first non-comment line is the column header; each subsequent line is one gate entry. The file ends at the first `end` token or EOF.

```
//Index   Flag   Map   X   Y   TX   TY   TargetGate   TargetDir   MinLevel   MaxLevel   MinReset   MaxReset   AccountLevel
1         1      0     121 232 123  233  2            0           20         400        *          *          0
```

## Columns

| Column                  | Type       | Effect                                                                                                                                                                                                            |
| ----------------------- | ---------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `Index`                 | int        | Unique gate ID. Referenced by other gates, Move.txt, event entries, and `DeathGate` in MapManager.xml                                                                                                             |
| `Flag`                  | 0, 1, or 2 | `0` = zone marker (not teleport-capable by itself, used as a named location), `1` = entry gate (player walks onto the trigger tile), `2` = exit gate (teleport destination)                                       |
| `Map`                   | int        | Map index this gate lives on                                                                                                                                                                                      |
| `X`, `Y`                | int        | For `Flag=2` / `Flag=0`: lower corner of the destination rectangle. For `Flag=1`: declared but not used to detect the trigger                                                                                     |
| `TX`, `TY`              | int        | For `Flag=2` / `Flag=0`: upper corner of the destination rectangle. For `Flag=1`: center of the trigger zone; the player triggers the gate whenever they stand within +/-5 tiles of `(TX, TY)` on the correct map |
| `TargetGate`            | int        | For `Flag=1`, the `Index` of the paired exit gate. `0` for `Flag=2` / `Flag=0` rows                                                                                                                               |
| `TargetDir`             | 0-7        | Facing direction applied on arrival                                                                                                                                                                               |
| `MinLevel`              | int        | Minimum character level to use. `-1` (written as `*`) disables the check                                                                                                                                          |
| `MaxLevel`              | int        | Maximum character level. Shipped data commonly uses `400` as effectively unlimited. `-1` / `*` disables                                                                                                           |
| `MinReset` / `MaxReset` | int or `*` | Reset count range. `*` stores as `-1` and disables that side of the check                                                                                                                                         |
| `AccountLevel`          | 0-3        | Minimum account tier required (`0` = free accounts allowed)                                                                                                                                                       |

## Trigger vs Destination Rectangles

The engine treats entry and exit rows differently:

* **Entry (`Flag=1`)**: player is considered inside the gate when their position is within a 10-tile square centered on `(TX, TY)` on the gate's map. The `X` / `Y` columns are loaded but do not participate in trigger detection.
* **Exit (`Flag=2`) / zone (`Flag=0`)**: on arrival, the engine picks a random walkable tile inside the rectangle spanning `(X, Y)` to `(TX, TY)` and places the player there, facing `TargetDir`. If every tile in the rectangle blocks movement, the teleport fails.

When an entry gate fires, the engine looks up `TargetGate`, reads that row's destination rectangle, and uses its `TargetDir` for the final facing. A non-zero `TargetGate` on a `Flag=2` row is ignored.

## Class-Scaled Level Gate

`MinLevel` is not applied raw for every class. For Magic Gladiator, Dark Lord, and Rage Fighter, the effective minimum becomes `floor(MinLevel * 2 / 3)` on every map except Swamp of Calmness. This matches the standard MU character-progression rule and applies equally to Move.txt entries whose destination resolves to those maps.

## Examples

{% tabs %}
{% tab title="Town-to-Dungeon pair" %}
{% code title="Gate.txt fragment" %}

```
//Index   Flag   Map   X    Y    TX   TY   TargetGate   TargetDir   MinLevel   MaxLevel   MinReset   MaxReset   AccountLevel
1         1      0     121  232  123  233  2            0           20         400        *          *          0
2         2      1     107  247  110  247  0            1           20         400        *          *          0
```

{% endcode %}

Gate 1 on Lorencia (map 0) is triggered whenever the player stands within 5 tiles of `(123, 233)`. It warps them to a random tile inside the rectangle `(107, 247)` to `(110, 247)` on Dungeon (map 1), facing direction 1. Requires level 20+.
{% endtab %}

{% tab title="Respawn target" %}
{% code title="Gate.txt fragment" %}

```
17        0      0     133  118  151  135  0            0           0          400        *          *          0
```

{% endcode %}

Gate 17 (`Flag=0`) is a zone marker on Lorencia. It is used as the `DeathGate` destination rectangle in MapManager.xml: the engine picks a random walkable tile inside `(133, 118)` to `(151, 135)`. No entry trigger is installed.
{% endtab %}

{% tab title="Level-locked portal" %}
{% code title="Gate.txt fragment" %}

```
38        1      4     131  15   132  18   39           0           50         400        *          *          0
```

{% endcode %}

Gate 38 on Lost Tower (map 4) requires level 50+ to use. MG/DL/RF players pass the check at level 34+ because of the class-scaled modifier.
{% endtab %}
{% endtabs %}

## Cross-File Dependencies

| Attribute                         | Related in                                                                                                                                                                                           |
| --------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `Map`                             | [MapManager.xml](/docs/data/mapmanager.md)                                                                                                                                                           |
| `Index`                           | Referenced by [Move.txt](/docs/data/gate/move.md) (teleport command destinations), [MapManager.xml](/docs/data/mapmanager.md) (`DeathGate`), event entry configs under [Event/](/docs/data/event.md) |
| Level / reset / account gates     | Overlap with command-level gates in [Command.xml](/docs/data/command-xml.md) / [Command.dat](/docs/gameserver/command-dat.md)                                                                        |
| Class-scaled `MinLevel` exception | Swamp of Calmness map index, see [MapManager.xml](/docs/data/mapmanager.md)                                                                                                                          |

## Common Issues

* **Entry gate never fires** - trigger zone is measured around `(TX, TY)`, not `(X, Y)`; check that column.
* **`Flag=0` row used as entry** - zone markers do not teleport; set `Flag=1` with a valid `TargetGate`.
* **Teleport drops player into a wall** - every tile in the destination rectangle fails the walkability check; widen `(X, Y)` to `(TX, TY)` until at least one walkable tile is inside.
* **Cannot reach a map** - all entry gates to that map have higher `MinLevel` than any reachable character. Remember the MG/DL/RF two-thirds modifier off Swamp of Calmness.
* **Gate disappears after GS restart** - duplicate `Index`. The file is loaded into a map keyed by index, so a later duplicate overwrites the earlier one.
* **Reset gate looks disabled but still blocks** - wildcard must be the literal `*`; any other string is parsed as `0` and blocks resets below 0 vacuously but never above 0.
