Skip to main content

Demo parser utility for Counter-Strike 2

Project description

nut_report

Usage

python nut_report.py                             # default csgo folder
python nut_report.py "c:/path/to/demos/"         # load a folder
python nut_report.py "c:/path/to/demos/demo.dem" # load a demo

Nut Report

  ┌─────────────────────────────────────────────────────────────────────────────────────────────┐
  │                                                                                             │
  │  Nut Reporter                                                                               │
  │                                                                                             │
  │  +---+----+-----+------+-------+---------------------------------------------------+        │
  │  | * | ** | *** | **** | ***** | kills, timing, and location affects the nut meter |        │
  │  +---+----+-----+------+-------+---------------------------------------------------+        │
  │                                                                                             │
  │                                                                                             │
  │  Select a demo:                                                                             │
  │                                                                                             │
  │                                                                                             │
  │    1 - 08/02/24 23:13 de_inferno (2)                                                        │
  │    2 - 08/02/24 23:13 de_dust2 (0)                                                          │
  │    3 - 08/02/24 23:12 de_nuke (0)                                                           │
  │    4 - 07/31/24 20:58 de_inferno (2)                                                        │
  │    5 - 07/29/24 20:01 de_nuke (0)                                                           │
  │    6 - 07/28/24 10:43 de_nuke (2)                                                           │
  │    7 - 07/27/24 21:53 de_mirage (0)                                                         │
  │    q - Quit                                                                                 │
  │                                                                                             │
  │                                                                                             │
  │  C:\Program Files (x86)\Steam\steamapps\common\Counter-Strike Global                        │
  │  Offensive\game\csgo\replays                                                                │
  │                                                                                             │
  │                                                                                             │
  └─────────────────────────────────────────────────────────────────────────────────────────────┘

List multikill events for a match that happened within KILL_THRESHOLD_SECONDS.

  • Round
  • Meter
  • Time - seconds (ticks)
  • Player (location)
  • Killed (location)
  ┌─────────────────────────────────────────────────────────────────────────────────────────────┐
  │                                                                                             │
  │  #1 08/02/24 23:13                                                                          │
  │  Valve Counter-Strike 2 us_north_central Server (srcds1012-ord1.129.109)                    │
  │  de_inferno                                                                                 │
  │                                                                                             │
  │  meter         round         time          player              killed                       │
  │  ***           2             0.02          something           Papa (CTSpawn), Henry        │
  │                              (1)           (Arch)              (CTSpawn)                    │
  │  *             10            0.61          something           Henry (TopofMid), Papa       │
  │                              (39)          (Middle)            (TopofMid)                   │
  │                                                                                             │
  │                                                                                             │
  │    s - Send Webhook (discord.com)                                                           │
  │    b - Back                                                                                 │
  │                                                                                             │
  │                                                                                             │
  │  KILL_THRESHOLD_SECONDS: 1                                                                  │
  │                                                                                             │
  │                                                                                             │
  └─────────────────────────────────────────────────────────────────────────────────────────────┘

Meter

  • Only multikill events that fall within KILL_THRESHOLD_SECONDS get rated
  • Pulling in more variables related to movement and direction would contribute a lot
  • There are simple indicators of cheating, such as the attacker being in 3+ named map zones in under a certain period of time
def get_rating(num_kills, num_zones, time):
    if ((num_kills >= 4 and time <= 0.1)
        or (num_kills >= 3 and time <= 0.1 and num_zones >= 2)
        or (num_zones >= 3)):
        return NUT * 5
    elif (num_kills >= 4 and time <= 0.25)
        or (num_kills >= 3 and time <= 0.25 and num_zones >= 2):
        return NUT * 4
    elif (num_kills >= 2 and time <= 0.25)
        or (num_kills >= 2 and time <= 0.5 and num_zones >= 2):
        return NUT * 3
    elif (num_kills >= 2 and time <= 0.5)
        or (num_kills >= 2 and time <= 1 and num_zones >= 2):
        return NUT * 2
    else:
        return NUT

Settings

Set envars or create a .env file to customize settings.

KILL_THRESHOLD_SECONDS=1
NR_WEBHOOK_URL="https://discord.com/api/webhooks/XYZ"

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

nut_report-1.0.0.tar.gz (7.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

nut_report-1.0.0-py3-none-any.whl (7.7 kB view details)

Uploaded Python 3

File details

Details for the file nut_report-1.0.0.tar.gz.

File metadata

  • Download URL: nut_report-1.0.0.tar.gz
  • Upload date:
  • Size: 7.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.2

File hashes

Hashes for nut_report-1.0.0.tar.gz
Algorithm Hash digest
SHA256 035ca80a1c06739e5564bcf90806159bc92dc9d4efe98bf4e56acebb16b8d379
MD5 f0fde8a4901a5b535bf0a37942b98b8a
BLAKE2b-256 61ce87d17cfca7bf01ee91735864b7280f94be457d8c1036659138187ae53dca

See more details on using hashes here.

File details

Details for the file nut_report-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: nut_report-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 7.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.2

File hashes

Hashes for nut_report-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 1bf744eb9df8eb6a00939cfad6f2903cab5e663bc90a455d64d0ad2e50bb04f7
MD5 d78a1511fb7a40c86806089f228151ce
BLAKE2b-256 252b4a10e390d2cb7e4f2a018af6a13bfc70691407baba5f264bf6f4567c2792

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page