eolib.protocol.map¶
EO map file data structures.
- class Emf[source]¶
Bases:
objectEndless Map File
- __init__(*, rid, name, type, timed_effect, music_id, music_control, ambient_sound_id, width, height, fill_tile, map_available, can_scroll, relog_x, relog_y, npcs, legacy_door_keys, items, tile_spec_rows, warp_rows, graphic_layers, signs)[source]¶
Create a new instance of Emf.
- Parameters:
rid (
Iterable[int]) – (Length must be 2.) (Element value range is 0-64008.)name (
str) – (Length must be 24 or less.)type (
MapType)timed_effect (
MapTimedEffect)music_id (
int) – (Value range is 0-252.)music_control (
MapMusicControl)ambient_sound_id (
int) – (Value range is 0-64008.)width (
int) – (Value range is 0-252.)height (
int) – (Value range is 0-252.)fill_tile (
int) – (Value range is 0-64008.)map_available (
bool)can_scroll (
bool)relog_x (
int) – (Value range is 0-252.)relog_y (
int) – (Value range is 0-252.)legacy_door_keys (
Iterable[MapLegacyDoorKey]) – (Length must be 252 or less.)tile_spec_rows (
Iterable[MapTileSpecRow]) – (Length must be 252 or less.)warp_rows (
Iterable[MapWarpRow]) – (Length must be 252 or less.)graphic_layers (
Iterable[MapGraphicLayer]) – The 9 layers of map graphics. Order is [Ground, Object, Overlay, Down Wall, Right Wall, Roof, Top, Shadow, Overlay2] (Length must be 9.)
- property timed_effect: MapTimedEffect¶
The timed_effect field.
- property music_control: MapMusicControl¶
The music_control field.
- property legacy_door_keys: tuple[MapLegacyDoorKey, ...]¶
The legacy_door_keys field.
- property tile_spec_rows: tuple[MapTileSpecRow, ...]¶
The tile_spec_rows field.
- property warp_rows: tuple[MapWarpRow, ...]¶
The warp_rows field.
- property graphic_layers: tuple[MapGraphicLayer, ...]¶
The 9 layers of map graphics. Order is [Ground, Object, Overlay, Down Wall, Right Wall, Roof, Top, Shadow, Overlay2]
- class MapGraphicLayer[source]¶
Bases:
objectA layer of map graphics
- __init__(*, graphic_rows)[source]¶
Create a new instance of MapGraphicLayer.
- Parameters:
graphic_rows (
Iterable[MapGraphicRow]) – (Length must be 252 or less.)
- property graphic_rows: tuple[MapGraphicRow, ...]¶
The graphic_rows field.
- static serialize(writer, data) None[source]¶
Serializes an instance of MapGraphicLayer to the provided EoWriter.
- Parameters:
writer (
EoWriter) – The writer that the data will be serialized to.data (
MapGraphicLayer) – The data to serialize.
- static deserialize(reader) MapGraphicLayer[source]¶
Deserializes an instance of MapGraphicLayer from the provided EoReader.
- Parameters:
reader (
EoReader) – The writer that the data will be serialized to.- Returns:
The data to serialize.
- class MapGraphicRow[source]¶
Bases:
objectA row in a layer of map graphics
- __init__(*, y, tiles)[source]¶
Create a new instance of MapGraphicRow.
- Parameters:
y (
int) – (Value range is 0-252.)tiles (
Iterable[MapGraphicRowTile]) – (Length must be 252 or less.)
- property tiles: tuple[MapGraphicRowTile, ...]¶
The tiles field.
- static serialize(writer, data) None[source]¶
Serializes an instance of MapGraphicRow to the provided EoWriter.
- Parameters:
writer (
EoWriter) – The writer that the data will be serialized to.data (
MapGraphicRow) – The data to serialize.
- static deserialize(reader) MapGraphicRow[source]¶
Deserializes an instance of MapGraphicRow from the provided EoReader.
- Parameters:
reader (
EoReader) – The writer that the data will be serialized to.- Returns:
The data to serialize.
- class MapGraphicRowTile[source]¶
Bases:
objectA single tile in a row of map graphics
- static serialize(writer, data) None[source]¶
Serializes an instance of MapGraphicRowTile to the provided EoWriter.
- Parameters:
writer (
EoWriter) – The writer that the data will be serialized to.data (
MapGraphicRowTile) – The data to serialize.
- static deserialize(reader) MapGraphicRowTile[source]¶
Deserializes an instance of MapGraphicRowTile from the provided EoReader.
- Parameters:
reader (
EoReader) – The writer that the data will be serialized to.- Returns:
The data to serialize.
- class MapItem[source]¶
Bases:
objectItem spawn EMF entity
- __init__(*, coords, key, chest_slot, item_id, spawn_time, amount)[source]¶
Create a new instance of MapItem.
- class MapLegacyDoorKey[source]¶
Bases:
objectLegacy EMF entity used to specify a key on a door
- static serialize(writer, data) None[source]¶
Serializes an instance of MapLegacyDoorKey to the provided EoWriter.
- Parameters:
writer (
EoWriter) – The writer that the data will be serialized to.data (
MapLegacyDoorKey) – The data to serialize.
- static deserialize(reader) MapLegacyDoorKey[source]¶
Deserializes an instance of MapLegacyDoorKey from the provided EoReader.
- Parameters:
reader (
EoReader) – The writer that the data will be serialized to.- Returns:
The data to serialize.
- class MapMusicControl[source]¶
Bases:
IntEnumHow background music should be played on a map
- InterruptIfDifferentPlayOnce = 0¶
- InterruptPlayOnce = 1¶
- FinishPlayOnce = 2¶
- InterruptIfDifferentPlayRepeat = 3¶
- InterruptPlayRepeat = 4¶
- FinishPlayRepeat = 5¶
- InterruptPlayNothing = 6¶
- class MapNpc[source]¶
Bases:
objectNPC spawn EMF entity
- class MapSign[source]¶
Bases:
objectSign EMF entity
- class MapTileSpec[source]¶
Bases:
IntEnumThe type of a tile on a map
- Wall = 0¶
- ChairDown = 1¶
- ChairLeft = 2¶
- ChairRight = 3¶
- ChairUp = 4¶
- ChairDownRight = 5¶
- ChairUpLeft = 6¶
- ChairAll = 7¶
- Reserved8 = 8¶
- Chest = 9¶
- Reserved10 = 10¶
- Reserved11 = 11¶
- Reserved12 = 12¶
- Reserved13 = 13¶
- Reserved14 = 14¶
- Reserved15 = 15¶
- BankVault = 16¶
- NpcBoundary = 17¶
- Edge = 18¶
- FakeWall = 19¶
- Board1 = 20¶
- Board2 = 21¶
- Board3 = 22¶
- Board4 = 23¶
- Board5 = 24¶
- Board6 = 25¶
- Board7 = 26¶
- Board8 = 27¶
- Jukebox = 28¶
- Jump = 29¶
- Water = 30¶
- Reserved31 = 31¶
- Arena = 32¶
- AmbientSource = 33¶
- TimedSpikes = 34¶
- Spikes = 35¶
- HiddenSpikes = 36¶
- class MapTileSpecRow[source]¶
Bases:
objectA row of tilespecs
- __init__(*, y, tiles)[source]¶
Create a new instance of MapTileSpecRow.
- Parameters:
y (
int) – (Value range is 0-252.)tiles (
Iterable[MapTileSpecRowTile]) – (Length must be 252 or less.)
- property tiles: tuple[MapTileSpecRowTile, ...]¶
The tiles field.
- static serialize(writer, data) None[source]¶
Serializes an instance of MapTileSpecRow to the provided EoWriter.
- Parameters:
writer (
EoWriter) – The writer that the data will be serialized to.data (
MapTileSpecRow) – The data to serialize.
- static deserialize(reader) MapTileSpecRow[source]¶
Deserializes an instance of MapTileSpecRow from the provided EoReader.
- Parameters:
reader (
EoReader) – The writer that the data will be serialized to.- Returns:
The data to serialize.
- class MapTileSpecRowTile[source]¶
Bases:
objectA single tile in a row of tilespecs
- __init__(*, x, tile_spec)[source]¶
Create a new instance of MapTileSpecRowTile.
- Parameters:
x (
int) – (Value range is 0-252.)tile_spec (
MapTileSpec)
- property tile_spec: MapTileSpec¶
The tile_spec field.
- static serialize(writer, data) None[source]¶
Serializes an instance of MapTileSpecRowTile to the provided EoWriter.
- Parameters:
writer (
EoWriter) – The writer that the data will be serialized to.data (
MapTileSpecRowTile) – The data to serialize.
- static deserialize(reader) MapTileSpecRowTile[source]¶
Deserializes an instance of MapTileSpecRowTile from the provided EoReader.
- Parameters:
reader (
EoReader) – The writer that the data will be serialized to.- Returns:
The data to serialize.
- class MapTimedEffect[source]¶
Bases:
IntEnumA timed effect that can occur on a map
- None_ = 0¶
- HpDrain = 1¶
- TpDrain = 2¶
- Quake1 = 3¶
- Quake2 = 4¶
- Quake3 = 5¶
- Quake4 = 6¶
- class MapWarp[source]¶
Bases:
objectWarp EMF entity
- __init__(*, destination_map, destination_coords, level_required, door)[source]¶
Create a new instance of MapWarp.
- class MapWarpRow[source]¶
Bases:
objectA row of warp entities
- __init__(*, y, tiles)[source]¶
Create a new instance of MapWarpRow.
- Parameters:
y (
int) – (Value range is 0-252.)tiles (
Iterable[MapWarpRowTile]) – (Length must be 252 or less.)
- property tiles: tuple[MapWarpRowTile, ...]¶
The tiles field.
- static serialize(writer, data) None[source]¶
Serializes an instance of MapWarpRow to the provided EoWriter.
- Parameters:
writer (
EoWriter) – The writer that the data will be serialized to.data (
MapWarpRow) – The data to serialize.
- static deserialize(reader) MapWarpRow[source]¶
Deserializes an instance of MapWarpRow from the provided EoReader.
- Parameters:
reader (
EoReader) – The writer that the data will be serialized to.- Returns:
The data to serialize.
- class MapWarpRowTile[source]¶
Bases:
objectA single tile in a row of warp entities
- static serialize(writer, data) None[source]¶
Serializes an instance of MapWarpRowTile to the provided EoWriter.
- Parameters:
writer (
EoWriter) – The writer that the data will be serialized to.data (
MapWarpRowTile) – The data to serialize.
- static deserialize(reader) MapWarpRowTile[source]¶
Deserializes an instance of MapWarpRowTile from the provided EoReader.
- Parameters:
reader (
EoReader) – The writer that the data will be serialized to.- Returns:
The data to serialize.