Film
spnkr.film
Download and read Halo Infinite film chunks to extract match data.
HighlightEvent
Bases: NamedTuple
A kill, death, mode-related, or medal game event in a Halo Infinite match.
event_type
instance-attribute
Inferred event type. One of 'kill', 'death', 'mode', or 'medal'.
gamertag
instance-attribute
Gamertag of the player the event is tied to.
is_medal
instance-attribute
Byte value used to infer the event type.
medal_name
instance-attribute
Name of the medal awarded for 'medal' event types. Otherwise None
.
medal_value
instance-attribute
Byte value encoding the medal type for medal event types.
time_ms
instance-attribute
Timestamp of the event in milliseconds following the start of the match.
type_hint
instance-attribute
Byte value used to infer the event type.
xuid
instance-attribute
Xbox user ID of the player the event is tied to.
read_highlight_events(client, match_id)
async
Download and parse the highlight events chunk from a film asset for a given match.
Only human (not bot) players have events available. Bot data is unlikely to be available in the highlight events chunk as they are not observable in theater mode.
Team IDs for the players are not yet available, so it is necessary to join up to match stats data for the information.
Mode-specific details are not available yet, such as a to distinguish a flag capture from a flag return.
Killing AI opponents (such as in Firefight game modes) does not record a highlight event.
There are infrequent cases where not all kill/death events are captured as
expected. See spnkr.film.highlight_events.check
for a method of checking
outcomes against match stats.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
client
|
HaloInfiniteClient
|
A client for requesting film metadata and downloading film data. |
required |
match_id
|
str | UUID
|
The UUID of the match to read film data for. |
required |
Returns:
Type | Description |
---|---|
A list of HighlightEvent instances extracted from the downloaded data. |