Class: VaultCoh::Replay
- Inherits:
-
Object
- Object
- VaultCoh::Replay
- Defined in:
- lib/vault_coh/replay.rb
Overview
A complete representation of all information able to be parsed from a Company of Heroes 3 replay. Note that parsing is not yet exhaustive, and iterative improvements will be made to pull more information from replay files over time.
Class Method Summary collapse
-
.from_bytes(bytes) ⇒ Replay
Takes a byte slice, parses it as a CoH3 replay, and returns a representation of the parsed information.
Instance Method Summary collapse
-
#length ⇒ Integer
A simple count of the number of ticks that were executed in this match.
-
#map ⇒ Map
Map information for this match.
-
#map_filename ⇒ String
Filename of the map this match was played on.
-
#map_localized_description_id ⇒ String
Localization ID of the map’s description.
-
#map_localized_name_id ⇒ String
Localization ID of the map’s name.
-
#matchhistory_id ⇒ Integer
The ID used by Relic to track this match on their internal servers.
-
#players ⇒ Array<Player>
A list of all players who participated in this match.
-
#timestamp ⇒ String
A UTF-16 representation of the recording user’s local time when the replay was recorded.
-
#to_h ⇒ Hash
Returns a hash representation of the object.
-
#version ⇒ Integer
The Company of Heroes 3 game version this replay was recorded on.
Class Method Details
.from_bytes(bytes) ⇒ Replay
Takes a byte slice, parses it as a CoH3 replay, and returns a representation of the parsed information. Any failures during parsing or conversion will return an error.
23 |
# File 'lib/vault_coh/replay.rb', line 23 def self.from_bytes(bytes); end |
Instance Method Details
#length ⇒ Integer
A simple count of the number of ticks that were executed in this match. Because CoH3’s engine runs at 8 ticks per second, you can divide this value by 8 to get the duration of the match in seconds.
84 |
# File 'lib/vault_coh/replay.rb', line 84 def length; end |
#map ⇒ Map
Map information for this match.
54 |
# File 'lib/vault_coh/replay.rb', line 54 def map; end |
#map_filename ⇒ String
Filename of the map this match was played on. See Map#filename for more information.
60 |
# File 'lib/vault_coh/replay.rb', line 60 def map_filename; end |
#map_localized_description_id ⇒ String
Localization ID of the map’s description. See Map#localized_description_id for more information.
72 |
# File 'lib/vault_coh/replay.rb', line 72 def map_localized_description_id; end |
#map_localized_name_id ⇒ String
Localization ID of the map’s name. See Map#localized_name_id for more information.
66 |
# File 'lib/vault_coh/replay.rb', line 66 def map_localized_name_id; end |
#matchhistory_id ⇒ Integer
The ID used by Relic to track this match on their internal servers. This ID can be matched with an ID of the same name returned by Relic’s CoH3 stats API, enabling linkage between replay files and statistical information for a match.
49 |
# File 'lib/vault_coh/replay.rb', line 49 def matchhistory_id; end |
#players ⇒ Array<Player>
A list of all players who participated in this match.
77 |
# File 'lib/vault_coh/replay.rb', line 77 def players; end |
#timestamp ⇒ String
A UTF-16 representation of the recording user’s local time when the replay was recorded. Note that value may contain non-standard characters and is not guaranteed to be parsable into an accurate date/time format.
41 |
# File 'lib/vault_coh/replay.rb', line 41 def ; end |
#to_h ⇒ Hash
Returns a hash representation of the object.
89 |
# File 'lib/vault_coh/replay.rb', line 89 def to_h; end |
#version ⇒ Integer
The Company of Heroes 3 game version this replay was recorded on. Note that this is probably more accurately described as the build version, and represents the final segment of digits you see in the game version on the game’s main menu. Every time the game is patched, this version will change, and replays are generally only viewable on the same game version they were recorded on.
33 |
# File 'lib/vault_coh/replay.rb', line 33 def version; end |