Gate.txt
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. TheX/Ycolumns 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, facingTargetDir. 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#
When SpecialClassMoveLevelDiscount = 1 in Common.dat (the shipped default), 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.
Set that key to 0 to remove the discount and make every class pay full MinLevel everywhere.
Examples#
//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
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+.
17 0 0 133 118 151 135 0 0 0 400 * * 0
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.
38 1 4 131 15 132 18 39 0 50 400 * * 0
Gate 38 on Lost Tower (map 4) requires level 50+ to use. With the class-scaled discount enabled (the default), MG/DL/RF players pass the check at level 34+.
Cross-File Dependencies#
| Attribute | Related in |
|---|---|
Map | MapManager.xml |
Index | Referenced by Move.txt (teleport command destinations), MapManager.xml (DeathGate), event entry configs under Event/ |
| Level / reset / account gates | Overlap with command-level gates in Command.xml / Command.dat |
Class-scaled MinLevel discount | Toggled by SpecialClassMoveLevelDiscount in Common.dat; the Swamp of Calmness carve-out uses that map's index, see MapManager.xml |
Common Issues#
- Entry gate never fires - trigger zone is measured around
(TX, TY), not(X, Y); check that column. Flag=0row used as entry - zone markers do not teleport; setFlag=1with a validTargetGate.- 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
MinLevelthan any reachable character. Remember the MG/DL/RF two-thirds discount off Swamp of Calmness, and that it disappears entirely whenSpecialClassMoveLevelDiscount = 0. - 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 as0and blocks resets below 0 vacuously but never above 0.