Skip to main content

Python library for capturing and handling game events in Plutonium T6

Project description

GSC Events for Plutonium T6

A GSC script and Python library for capturing and handling game events in Plutonium T6 (Call of Duty: Black Ops 2).

Features

  • Captures various in-game events and saves them to JSONL files
  • Python library to read and process these events in real-time
  • Supports the following events:
    • Player Connected/Disconnected
    • Player Spawned/Death
    • Player Killed (with killer and weapon information)
    • Player Chat Messages
    • Killcam Start/End

Installation

Option 1: From GitHub Repository

1. Clone the repository:

git clone https://github.com/Yallamaztar/gsc-events.git

Option 2: Direct Installation

1. Copy gsc-events.gsc to your Plutonium T6 scripts folder:

%localappdata%\Plutonium\storage\t6\scripts\

2. Install the Python package:

pip install gsc-events

Event Format

Events are stored in JSONL format (one JSON object per line) in separate files for each event type. For example:

{ "event": "player_connected", "args": ["PlayerName"] }
{ "event": "player_say", "args": ["PlayerName", "message"] }
{ "event": "player_killed", "args": ["VictimName", "KillerName", "WeaponName"] }

Python Usage

from gsc_events import GSCClient

client = GSCClient()

@client.on("player_connected")
def on_connected(player: str):
    print(f"{player} Connected")

@client.on("player_spawned")
def on_spawned(player: str):
    print(f"{player} Spawned")

@client.on("player_death")
def on_death(player: str):
    print(f"{player} Died")

@client.on("joined_spectators")
def on_join_spectators(player: str):
    print(f"{player} Joined spectators")

@client.on("player_killed")
def on_killed(player: str, attacker: str, reason: str, weapon: str, hit_location: str):
    print(f"{player} was killed by {attacker} with {weapon} | location: {hit_location} & reason: {reason}")

@client.on("player_disconnected")
def on_disconnect(player: str):
    print(f"{player} Disconnected")

@client.on("weapon_change")
def on_weapon_change(player: str, weapon: str):
    print(f"{player} changed weapon to {weapon}")

@client.on("player_say")
def on_say(player: str, message: str):
    print(f"{player} said {message}")

@client.on("menu_response")
def on_menu_response(player: str, menu: str, response: str):
    print(f"{player} opened {menu} | response: {response}")

@client.on("joined_team")
def on_joined_team(player: str, team: str):
    print(f"{player} joined {team}")

@client.on("killcam_start")
def on_killcam():
    print(f"Killcam started")

@client.on("killcam_end")
def on_killcam_end():
    print(f"Killcam ended")

client.run()

Events Reference

Event Name Arguments Description
player_connected player_name Triggered when a player connects
player_disconnected player_name Triggered when a player disconnects
player_spawned player_name Triggered when a player spawns
player_death player_name Triggered when a player dies
player_killed victim_name, killer_name, weapon Triggered when a player is killed
player_say player_name, message Triggered when a player sends a chat message
joined_team player_name, team Triggered when a player joins a team
joined_spectators player_name Triggered when a player joins spectators
weapon_change player_name, weapon Triggered when a player changes weapon
killcam_start none Triggered when killcam starts
killcam_end none Triggered when killcam ends
menu_response player_name, menu, response Triggered when a menu is opened and responded to
score_event player_name, score_type, value Triggered when player gains score (XP, medal, etc.)
streak_awarded player_name, streak_name Triggered when player earns a killstreak
objective_captured player_name, objective Triggered when an objective is captured
objective_defended player_name, objective Triggered when an objective is defended
objective_taken player_name, objective Triggered when an objective is taken
flag_captured player_name Triggered when a CTF flag is captured
flag_dropped player_name Triggered when a CTF flag is dropped
flag_returned player_name Triggered when a CTF flag is returned
hardpoint_entered player_name Triggered when player enters Hardpoint
hardpoint_left player_name Triggered when player leaves Hardpoint

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

gsc_events-0.1.4.tar.gz (4.9 kB view details)

Uploaded Source

Built Distribution

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

gsc_events-0.1.4-py3-none-any.whl (5.8 kB view details)

Uploaded Python 3

File details

Details for the file gsc_events-0.1.4.tar.gz.

File metadata

  • Download URL: gsc_events-0.1.4.tar.gz
  • Upload date:
  • Size: 4.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.4

File hashes

Hashes for gsc_events-0.1.4.tar.gz
Algorithm Hash digest
SHA256 2860c99b5c0c74ddcd6234cff80441fa488f52b6c8db9925896d0c2c5aa032c0
MD5 306b4f59c7834fd5e8a38bed3726d9ef
BLAKE2b-256 afcddf0ee36a97e9a8ec7b0643d1a943f6c1fc36a599f66fb3ba8a3276ad678e

See more details on using hashes here.

File details

Details for the file gsc_events-0.1.4-py3-none-any.whl.

File metadata

  • Download URL: gsc_events-0.1.4-py3-none-any.whl
  • Upload date:
  • Size: 5.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.4

File hashes

Hashes for gsc_events-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 eb190ac703d5dc75b6a4d424c820e0e1a6481b3bd3f02f5bf4e02808227bd3cd
MD5 1586c6fbfa7dbf159b6c6586a468c34d
BLAKE2b-256 4b6016c7066a06391d9455e1adc67b22f354d441c8bbdb37227a8c1412bd4a89

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