Skip to content

Combat Log

Normalizes combat-log data from both Source 1 and Source 2 ingestion paths into a unified entry shape.

See also: Using the Combat Log, How Proto Parsing Works


Generated API

gem.combat.log.CombatLogProcessor

CombatLogProcessor

python
class CombatLogProcessor

Parses and dispatches combat log entries.

Source: src/gem/combat/log.py:262

Methods

on_combat_log_entry

Signature: def CombatLogProcessor.on_combat_log_entry(self, handler: CombatLogHandler) -> None

Register a handler to receive decoded CombatLogEntry objects.

Source: src/gem/combat/log.py:272

process_rune_pickup

Signature: def CombatLogProcessor.process_rune_pickup(self, player_slot: int, rune_type: int, tick: int = 0) -> None

Emit a PICKUP_RUNE CombatLogEntry from a CDOTAUserMsg_ChatEvent.

Source: src/gem/combat/log.py:280

process_s1_event

Signature: def CombatLogProcessor.process_s1_event(self, game_event: Any, name_table: Any, tick: int = 0) -> None

Parse a dota_combatlog S1 game event and emit a CombatLogEntry.

Source: src/gem/combat/log.py:305

process_s2_bulk

Signature: def CombatLogProcessor.process_s2_bulk(self, msg: Any, name_table: Any, tick: int = 0) -> None

Parse a CDOTAUserMsg_CombatLogBulkData and emit CombatLogEntry per entry.

Source: src/gem/combat/log.py:371

process_s2_entry

Signature: def CombatLogProcessor.process_s2_entry(self, msg: Any, name_table: Any, tick: int = 0, game_time_s: int | None = None) -> None

Parse a CMsgDOTACombatLogEntry and emit a CombatLogEntry.

Source: src/gem/combat/log.py:383

gem.combat.log.CombatLogEntry

CombatLogEntry

python
class CombatLogEntry

One decoded combat log entry.

Source: src/gem/combat/log.py:134

Dataclass fields

NameTypeDefault
tickint-
log_typeCombatLogType-
attacker_namestr''
damage_source_namestr''
target_namestr''
inflictor_namestr''
valueint0
attacker_is_heroboolFalse
target_is_heroboolFalse
attacker_is_illusionboolFalse
target_is_illusionboolFalse
ability_levelint0
gold_reasonint0
xp_reasonint0
value_namestr''
damage_typestr''
stun_durationfloat0.0
neutral_camp_typeint0
neutral_camp_teamint0
location_xfloat | NoneNone
location_yfloat | NoneNone
timestamp_sfloat | NoneNone
game_time_sint | NoneNone
will_reincarnateboolFalse