eolib.protocol.pub

EO pub file data structures.

class Ecf[source]

Bases: object

Endless Class File

__init__(*, rid, total_classes_count, version, classes)[source]

Create a new instance of Ecf.

Parameters:
  • rid (Iterable[int]) – (Length must be 2.) (Element value range is 0-64008.)

  • total_classes_count (int) – (Value range is 0-64008.)

  • version (int) – (Value range is 0-252.)

  • classes (Iterable[EcfRecord])

property byte_size: int

The size of the data that this was deserialized from.

property rid: tuple[int, ...]

The rid field.

property total_classes_count: int

The total_classes_count field.

property version: int

The version field.

property classes: tuple[EcfRecord, ...]

The classes field.

static serialize(writer, data) None[source]

Serializes an instance of Ecf to the provided EoWriter.

Parameters:
  • writer (EoWriter) – The writer that the data will be serialized to.

  • data (Ecf) – The data to serialize.

static deserialize(reader) Ecf[source]

Deserializes an instance of Ecf from the provided EoReader.

Parameters:

reader (EoReader) – The writer that the data will be serialized to.

Returns:

The data to serialize.

class EcfRecord[source]

Bases: object

Record of Class data in an Endless Class File

__init__(*, name, parent_type, stat_group, str, intl, wis, agi, con, cha)[source]

Create a new instance of EcfRecord.

Parameters:
  • name (str) – (Length must be 252 or less.)

  • parent_type (int) – (Value range is 0-252.)

  • stat_group (int) – (Value range is 0-252.)

  • str (int) – (Value range is 0-64008.)

  • intl (int) – (Value range is 0-64008.)

  • wis (int) – (Value range is 0-64008.)

  • agi (int) – (Value range is 0-64008.)

  • con (int) – (Value range is 0-64008.)

  • cha (int) – (Value range is 0-64008.)

property byte_size: int

The size of the data that this was deserialized from.

property name: str

The name field.

property parent_type: int

The parent_type field.

property stat_group: int

The stat_group field.

property str: int

The str field.

property intl: int

The intl field.

property wis: int

The wis field.

property agi: int

The agi field.

property con: int

The con field.

property cha: int

The cha field.

static serialize(writer, data) None[source]

Serializes an instance of EcfRecord to the provided EoWriter.

Parameters:
  • writer (EoWriter) – The writer that the data will be serialized to.

  • data (EcfRecord) – The data to serialize.

static deserialize(reader) EcfRecord[source]

Deserializes an instance of EcfRecord from the provided EoReader.

Parameters:

reader (EoReader) – The writer that the data will be serialized to.

Returns:

The data to serialize.

class Eif[source]

Bases: object

Endless Item File

__init__(*, rid, total_items_count, version, items)[source]

Create a new instance of Eif.

Parameters:
  • rid (Iterable[int]) – (Length must be 2.) (Element value range is 0-64008.)

  • total_items_count (int) – (Value range is 0-64008.)

  • version (int) – (Value range is 0-252.)

  • items (Iterable[EifRecord])

property byte_size: int

The size of the data that this was deserialized from.

property rid: tuple[int, ...]

The rid field.

property total_items_count: int

The total_items_count field.

property version: int

The version field.

property items: tuple[EifRecord, ...]

The items field.

static serialize(writer, data) None[source]

Serializes an instance of Eif to the provided EoWriter.

Parameters:
  • writer (EoWriter) – The writer that the data will be serialized to.

  • data (Eif) – The data to serialize.

static deserialize(reader) Eif[source]

Deserializes an instance of Eif from the provided EoReader.

Parameters:

reader (EoReader) – The writer that the data will be serialized to.

Returns:

The data to serialize.

class EifRecord[source]

Bases: object

Record of Item data in an Endless Item File

__init__(*, name, graphic_id, type, subtype, special, hp, tp, min_damage, max_damage, accuracy, evade, armor, return_damage, str, intl, wis, agi, con, cha, light_resistance, dark_resistance, earth_resistance, air_resistance, water_resistance, fire_resistance, spec1, spec2, spec3, level_requirement, class_requirement, str_requirement, int_requirement, wis_requirement, agi_requirement, con_requirement, cha_requirement, element, element_damage, weight, size)[source]

Create a new instance of EifRecord.

Parameters:
  • name (str) – (Length must be 252 or less.)

  • graphic_id (int) – (Value range is 0-64008.)

  • type (ItemType)

  • subtype (ItemSubtype)

  • special (ItemSpecial)

  • hp (int) – (Value range is 0-64008.)

  • tp (int) – (Value range is 0-64008.)

  • min_damage (int) – (Value range is 0-64008.)

  • max_damage (int) – (Value range is 0-64008.)

  • accuracy (int) – (Value range is 0-64008.)

  • evade (int) – (Value range is 0-64008.)

  • armor (int) – (Value range is 0-64008.)

  • return_damage (int) – (Value range is 0-252.)

  • str (int) – (Value range is 0-252.)

  • intl (int) – (Value range is 0-252.)

  • wis (int) – (Value range is 0-252.)

  • agi (int) – (Value range is 0-252.)

  • con (int) – (Value range is 0-252.)

  • cha (int) – (Value range is 0-252.)

  • light_resistance (int) – (Value range is 0-252.)

  • dark_resistance (int) – (Value range is 0-252.)

  • earth_resistance (int) – (Value range is 0-252.)

  • air_resistance (int) – (Value range is 0-252.)

  • water_resistance (int) – (Value range is 0-252.)

  • fire_resistance (int) – (Value range is 0-252.)

  • spec1 (int) – Holds one the following values, depending on item type: scroll_map, doll_graphic, exp_reward, hair_color, effect, key, alcohol_potency (Value range is 0-16194276.)

  • spec2 (int) – Holds one the following values, depending on item type: scroll_x, gender (Value range is 0-252.)

  • spec3 (int) – Holds one the following values, depending on item type: scroll_y (Value range is 0-252.)

  • level_requirement (int) – (Value range is 0-64008.)

  • class_requirement (int) – (Value range is 0-64008.)

  • str_requirement (int) – (Value range is 0-64008.)

  • int_requirement (int) – (Value range is 0-64008.)

  • wis_requirement (int) – (Value range is 0-64008.)

  • agi_requirement (int) – (Value range is 0-64008.)

  • con_requirement (int) – (Value range is 0-64008.)

  • cha_requirement (int) – (Value range is 0-64008.)

  • element (Element)

  • element_damage (int) – (Value range is 0-252.)

  • weight (int) – (Value range is 0-252.)

  • size (ItemSize)

property byte_size: int

The size of the data that this was deserialized from.

property name: str

The name field.

property graphic_id: int

The graphic_id field.

property type: ItemType

The type field.

property subtype: ItemSubtype

The subtype field.

property special: ItemSpecial

The special field.

property hp: int

The hp field.

property tp: int

The tp field.

property min_damage: int

The min_damage field.

property max_damage: int

The max_damage field.

property accuracy: int

The accuracy field.

property evade: int

The evade field.

property armor: int

The armor field.

property return_damage: int

The return_damage field.

property str: int

The str field.

property intl: int

The intl field.

property wis: int

The wis field.

property agi: int

The agi field.

property con: int

The con field.

property cha: int

The cha field.

property light_resistance: int

The light_resistance field.

property dark_resistance: int

The dark_resistance field.

property earth_resistance: int

The earth_resistance field.

property air_resistance: int

The air_resistance field.

property water_resistance: int

The water_resistance field.

property fire_resistance: int

The fire_resistance field.

property spec1: int

Holds one the following values, depending on item type: scroll_map, doll_graphic, exp_reward, hair_color, effect, key, alcohol_potency

property spec2: int

Holds one the following values, depending on item type: scroll_x, gender

property spec3: int

Holds one the following values, depending on item type: scroll_y

property level_requirement: int

The level_requirement field.

property class_requirement: int

The class_requirement field.

property str_requirement: int

The str_requirement field.

property int_requirement: int

The int_requirement field.

property wis_requirement: int

The wis_requirement field.

property agi_requirement: int

The agi_requirement field.

property con_requirement: int

The con_requirement field.

property cha_requirement: int

The cha_requirement field.

property element: Element

The element field.

property element_damage: int

The element_damage field.

property weight: int

The weight field.

property size: ItemSize

The size field.

static serialize(writer, data) None[source]

Serializes an instance of EifRecord to the provided EoWriter.

Parameters:
  • writer (EoWriter) – The writer that the data will be serialized to.

  • data (EifRecord) – The data to serialize.

static deserialize(reader) EifRecord[source]

Deserializes an instance of EifRecord from the provided EoReader.

Parameters:

reader (EoReader) – The writer that the data will be serialized to.

Returns:

The data to serialize.

class Element[source]

Bases: IntEnum

None_ = 0
Light = 1
Dark = 2
Earth = 3
Wind = 4
Water = 5
Fire = 6
class Enf[source]

Bases: object

Endless NPC File

__init__(*, rid, total_npcs_count, version, npcs)[source]

Create a new instance of Enf.

Parameters:
  • rid (Iterable[int]) – (Length must be 2.) (Element value range is 0-64008.)

  • total_npcs_count (int) – (Value range is 0-64008.)

  • version (int) – (Value range is 0-252.)

  • npcs (Iterable[EnfRecord])

property byte_size: int

The size of the data that this was deserialized from.

property rid: tuple[int, ...]

The rid field.

property total_npcs_count: int

The total_npcs_count field.

property version: int

The version field.

property npcs: tuple[EnfRecord, ...]

The npcs field.

static serialize(writer, data) None[source]

Serializes an instance of Enf to the provided EoWriter.

Parameters:
  • writer (EoWriter) – The writer that the data will be serialized to.

  • data (Enf) – The data to serialize.

static deserialize(reader) Enf[source]

Deserializes an instance of Enf from the provided EoReader.

Parameters:

reader (EoReader) – The writer that the data will be serialized to.

Returns:

The data to serialize.

class EnfRecord[source]

Bases: object

Record of NPC data in an Endless NPC File

__init__(*, name, graphic_id, race, boss, child, type, behavior_id, hp, tp, min_damage, max_damage, accuracy, evade, armor, return_damage, element, element_damage, element_weakness, element_weakness_damage, level, experience)[source]

Create a new instance of EnfRecord.

Parameters:
  • name (str) – (Length must be 252 or less.)

  • graphic_id (int) – (Value range is 0-64008.)

  • race (int) – (Value range is 0-252.)

  • boss (bool)

  • child (bool)

  • type (NpcType)

  • behavior_id (int) – (Value range is 0-64008.)

  • hp (int) – (Value range is 0-16194276.)

  • tp (int) – (Value range is 0-64008.)

  • min_damage (int) – (Value range is 0-64008.)

  • max_damage (int) – (Value range is 0-64008.)

  • accuracy (int) – (Value range is 0-64008.)

  • evade (int) – (Value range is 0-64008.)

  • armor (int) – (Value range is 0-64008.)

  • return_damage (int) – (Value range is 0-252.)

  • element (Element)

  • element_damage (int) – (Value range is 0-64008.)

  • element_weakness (Element)

  • element_weakness_damage (int) – (Value range is 0-64008.)

  • level (int) – (Value range is 0-252.)

  • experience (int) – (Value range is 0-16194276.)

property byte_size: int

The size of the data that this was deserialized from.

property name: str

The name field.

property graphic_id: int

The graphic_id field.

property race: int

The race field.

property boss: bool

The boss field.

property child: bool

The child field.

property type: NpcType

The type field.

property behavior_id: int

The behavior_id field.

property hp: int

The hp field.

property tp: int

The tp field.

property min_damage: int

The min_damage field.

property max_damage: int

The max_damage field.

property accuracy: int

The accuracy field.

property evade: int

The evade field.

property armor: int

The armor field.

property return_damage: int

The return_damage field.

property element: Element

The element field.

property element_damage: int

The element_damage field.

property element_weakness: Element

The element_weakness field.

property element_weakness_damage: int

The element_weakness_damage field.

property level: int

The level field.

property experience: int

The experience field.

static serialize(writer, data) None[source]

Serializes an instance of EnfRecord to the provided EoWriter.

Parameters:
  • writer (EoWriter) – The writer that the data will be serialized to.

  • data (EnfRecord) – The data to serialize.

static deserialize(reader) EnfRecord[source]

Deserializes an instance of EnfRecord from the provided EoReader.

Parameters:

reader (EoReader) – The writer that the data will be serialized to.

Returns:

The data to serialize.

class Esf[source]

Bases: object

Endless Skill File

__init__(*, rid, total_skills_count, version, skills)[source]

Create a new instance of Esf.

Parameters:
  • rid (Iterable[int]) – (Length must be 2.) (Element value range is 0-64008.)

  • total_skills_count (int) – (Value range is 0-64008.)

  • version (int) – (Value range is 0-252.)

  • skills (Iterable[EsfRecord])

property byte_size: int

The size of the data that this was deserialized from.

property rid: tuple[int, ...]

The rid field.

property total_skills_count: int

The total_skills_count field.

property version: int

The version field.

property skills: tuple[EsfRecord, ...]

The skills field.

static serialize(writer, data) None[source]

Serializes an instance of Esf to the provided EoWriter.

Parameters:
  • writer (EoWriter) – The writer that the data will be serialized to.

  • data (Esf) – The data to serialize.

static deserialize(reader) Esf[source]

Deserializes an instance of Esf from the provided EoReader.

Parameters:

reader (EoReader) – The writer that the data will be serialized to.

Returns:

The data to serialize.

class EsfRecord[source]

Bases: object

Record of Skill data in an Endless Skill File

__init__(*, name, chant, icon_id, graphic_id, tp_cost, sp_cost, cast_time, nature, type, element, element_power, target_restrict, target_type, target_time, max_skill_level, min_damage, max_damage, accuracy, evade, armor, return_damage, hp_heal, tp_heal, sp_heal, str, intl, wis, agi, con, cha)[source]

Create a new instance of EsfRecord.

Parameters:
  • name (str) – (Length must be 252 or less.)

  • chant (str) – (Length must be 252 or less.)

  • icon_id (int) – (Value range is 0-64008.)

  • graphic_id (int) – (Value range is 0-64008.)

  • tp_cost (int) – (Value range is 0-64008.)

  • sp_cost (int) – (Value range is 0-64008.)

  • cast_time (int) – (Value range is 0-252.)

  • nature (SkillNature)

  • type (SkillType)

  • element (Element)

  • element_power (int) – (Value range is 0-64008.)

  • target_restrict (SkillTargetRestrict)

  • target_type (SkillTargetType)

  • target_time (int) – (Value range is 0-252.)

  • max_skill_level (int) – (Value range is 0-64008.)

  • min_damage (int) – (Value range is 0-64008.)

  • max_damage (int) – (Value range is 0-64008.)

  • accuracy (int) – (Value range is 0-64008.)

  • evade (int) – (Value range is 0-64008.)

  • armor (int) – (Value range is 0-64008.)

  • return_damage (int) – (Value range is 0-252.)

  • hp_heal (int) – (Value range is 0-64008.)

  • tp_heal (int) – (Value range is 0-64008.)

  • sp_heal (int) – (Value range is 0-252.)

  • str (int) – (Value range is 0-64008.)

  • intl (int) – (Value range is 0-64008.)

  • wis (int) – (Value range is 0-64008.)

  • agi (int) – (Value range is 0-64008.)

  • con (int) – (Value range is 0-64008.)

  • cha (int) – (Value range is 0-64008.)

property byte_size: int

The size of the data that this was deserialized from.

property name: str

The name field.

property chant: str

The chant field.

property icon_id: int

The icon_id field.

property graphic_id: int

The graphic_id field.

property tp_cost: int

The tp_cost field.

property sp_cost: int

The sp_cost field.

property cast_time: int

The cast_time field.

property nature: SkillNature

The nature field.

property type: SkillType

The type field.

property element: Element

The element field.

property element_power: int

The element_power field.

property target_restrict: SkillTargetRestrict

The target_restrict field.

property target_type: SkillTargetType

The target_type field.

property target_time: int

The target_time field.

property max_skill_level: int

The max_skill_level field.

property min_damage: int

The min_damage field.

property max_damage: int

The max_damage field.

property accuracy: int

The accuracy field.

property evade: int

The evade field.

property armor: int

The armor field.

property return_damage: int

The return_damage field.

property hp_heal: int

The hp_heal field.

property tp_heal: int

The tp_heal field.

property sp_heal: int

The sp_heal field.

property str: int

The str field.

property intl: int

The intl field.

property wis: int

The wis field.

property agi: int

The agi field.

property con: int

The con field.

property cha: int

The cha field.

static serialize(writer, data) None[source]

Serializes an instance of EsfRecord to the provided EoWriter.

Parameters:
  • writer (EoWriter) – The writer that the data will be serialized to.

  • data (EsfRecord) – The data to serialize.

static deserialize(reader) EsfRecord[source]

Deserializes an instance of EsfRecord from the provided EoReader.

Parameters:

reader (EoReader) – The writer that the data will be serialized to.

Returns:

The data to serialize.

class ItemSize[source]

Bases: IntEnum

Size of an item in the inventory

Size1x1 = 0
Size1x2 = 1
Size1x3 = 2
Size1x4 = 3
Size2x1 = 4
Size2x2 = 5
Size2x3 = 6
Size2x4 = 7
class ItemSpecial[source]

Bases: IntEnum

Normal = 0
Rare = 1
Legendary = 2
Unique = 3
Lore = 4
Cursed = 5
class ItemSubtype[source]

Bases: IntEnum

None_ = 0
Ranged = 1
Arrows = 2
Wings = 3
Reserved4 = 4
class ItemType[source]

Bases: IntEnum

General = 0
Reserved1 = 1
Currency = 2
Heal = 3
Teleport = 4
Reserved5 = 5
ExpReward = 6
Reserved7 = 7
Reserved8 = 8
Key = 9
Weapon = 10
Shield = 11
Armor = 12
Hat = 13
Boots = 14
Gloves = 15
Accessory = 16
Belt = 17
Necklace = 18
Ring = 19
Armlet = 20
Bracer = 21
Alcohol = 22
EffectPotion = 23
HairDye = 24
CureCurse = 25
Reserved26 = 26
Reserved27 = 27
Reserved28 = 28
Reserved29 = 29
class NpcType[source]

Bases: IntEnum

Friendly = 0
Passive = 1
Aggressive = 2
Reserved3 = 3
Reserved4 = 4
Reserved5 = 5
Shop = 6
Inn = 7
Reserved8 = 8
Bank = 9
Barber = 10
Guild = 11
Priest = 12
Lawyer = 13
Trainer = 14
Quest = 15
class SkillNature[source]

Bases: IntEnum

Spell = 0
Skill = 1
class SkillTargetRestrict[source]

Bases: IntEnum

Npc = 0
Friendly = 1
Opponent = 2
class SkillTargetType[source]

Bases: IntEnum

Normal = 0
Self = 1
Reserved2 = 2
Group = 3
class SkillType[source]

Bases: IntEnum

Heal = 0
Attack = 1
Bard = 2