Skip to content

Latest commit

 

History

History
116 lines (93 loc) · 5.65 KB

README.md

File metadata and controls

116 lines (93 loc) · 5.65 KB

ocap-stats

What is this?

OCAP JSON data parser/editor/viewer web service.

Provides a handy UI to parse OCAP JSON data files, then store and edit the data in a database.
The data is presented on a simple spreadsheet like web frontend.

OCAP web server » [JSON] » ocap-stats (parser) » [SQL] » ocap-stats (editor/viewer) » [HTML]

Features

  • OCAP JSON data file parser that inserts the contents in an SQL database
    • markers, framesFired and positions entries are aggregated to create more entity data and events, not stored in their entirety
    • compatible with all OCAP versions (with limitations)
  • automatic corrections for known and detectable OCAP JSON data errors
  • commander detection based on group and role configuration
  • player tracking via the unit name or uid (not implemented in the official OCAP release)
  • content manager interface
    • select what OCAP entries get added to the stats as ops
    • fix incorrect or missing op data (op info, commanders, entities, events)
    • assign player aliases

Demo sites

fnf-stats.devs.space
  ⤷ based on OCAP2 data from FNF
ofcra-stats.devs.space
  ⤷ based on OCAP data from OFCRA
ofcra2-stats.devs.space
  ⤷ based on OCAP2 data from OFCRA
3cb-stats.devs.space
  ⤷ based on OCAP2 data from 3CB
rb-stats.devs.space
  ⤷ based on OCAP data from RED-BEAR
tbd-stats.devs.space
  ⤷ based on OCAP2 data from TBD
hk-stats.devs.space
  ⤷ based on OCAP2 data from HK

Search

CTRL+F

Aggregated data

  • Shots
    nr. of framesFired events (only counts main weapon and sidearm rounds afaik.)
    + nr. of projectile markers tied to a unit (grenades, rockets, mines, etc.)
  • Hits
    nr. of hit events as attacker, where victim is a unit on a different side or a vehicle (asset)
  • Kills
    nr. of killed events as attacker, where victim is a unit on a different side
  • Deaths
    nr. of killed events as victim
  • Frienldy fire
    nr. of hit events as attacker, where victim is a unit on the same side
  • Teamkills
    nr. of killed events as attacker, where victim is a unit on the same side
  • Destroyed assets
    nr. of killed events as attacker, where victim is a vehicle (asset)
  • Distance traveled
    the delta sum of all the position coordinates of an entity
  • Time in game
    the nr. of frames recorded of an entity in game (including spectator), adjusted by the ops capture delay configuration

Self inflicted and environmental hits / kills (something) are omitted! (except when counting deaths)

Aggregated events

  • _enter_vehicle
  • _exit_vehicle
  • _awake
  • _uncon
  • _dead
  • _projectile

Custom views, charts and live dashboards

OData

ocap-odata is an open source web service (and one day complete replacement of ocap-stats maybe) that provides OData, OpenAPI and other REST APIs to an existing OCAP (ocap-stats) database. The different endpoints can be consumed by a variety of analytics and business intelligence tools.

Direct database connection

To create more complex views and charts directly from the database you can use tools like Seal Report or Metabase.

Deployment

Check out SETUP.md for instructions on how to start your own stats page.

Known issues

  1. player stats are collected based on name only (aliases must be set manually to mitigate this)
  2. ops recorded before using OCAP2 v1.1.0 had no proper tracking for hit events where the victim is a player
    • Hits / Shots percent and Shots / Hits are adjusted accordingly
  3. players can have multiple entities in the same op (rejoins/role switch)
    • this affects role data since there is no explicit way to tell which entity was actually playing
    • players can have killed events as spectator sometimes in relation to this
  4. vehicle kills are not always registered
  5. some hits / kills are registered to the weapon or item selected by the attacker at the time of the event
  6. some ops have no winner announced (endMission[1]: Mission ended automatically)
    • affects all ops recorded before using OCAP2 v1.0.0
  7. ops recorded before using OCAP2 v1.0.0 are missing the role info
  8. commanders can not always be determined automatically and must be set manually
  9. timestamps depend on the arma3 server config

TODO:

  1. format timestamps to local TZ (data-ts; Intl.DateTimeFormat().resolvedOptions().timeZone)
  2. support capture_delay properly
  3. track friendly fire on assets by checking the side of the asset's crew
    (preprocess and track asset entities crews via positions)
  4. new player tab for kill/death log ☠💀

Similar projects (not open source)