Skip to content

Kandru/cs2-demo-recorder

 
 

Repository files navigation

CounterstrikeSharp - Automatic SourceTV Demo Recorder

UpdateManager Compatible GitHub release License issues - cs2-map-modifier

This tool automatically start a recording whenever someone is on your server. It makes sure to stop the recording before the level is being changed. CounterStrike 2 does currently crash if the HLTV recording is not stopped before the map is changed regardless of what caused a map change. This tool will make sure to stop the recording first and afterwards change the map.

Features

  • check server state on plugin hot-reload
  • enables the HLTV before starting to record
  • stops recording when last player left the server
  • starts recording when first player joins the server
  • disables transmit of HLTV entity to players to avoid one possible way to detect recording

Installation

  1. Download and extract the latest release from the GitHub releases page.
  2. Move the "DemoRecorder" folder to the /addons/counterstrikesharp/plugins/ directory.
  3. Restart the server.

Updating is even easier: simply overwrite all plugin files and they will be reloaded automatically. To automate updates please use our CS2 Update Manager.

Configuration

This plugin automatically creates a readable JSON configuration file. This configuration file can be found in /addons/counterstrikesharp/configs/plugins/DemoRecorder/DemoRecorder.json.

{
  "enabled": true,
  "demo_folder": "",
  "changelevel_delay": 3,
  "minimum_players_for_recording": 1,
  "disable_recording_during_warmup": false,
  "transmit_hltv_entity": false,
  "hltv_name": "visit Counterstrike.Party",
  "ConfigVersion": 1
}

Config will be read on map start to update all parameters without the need to reload the plugin.

enabled

Disabled this plugin without removing it.

demo_folder

Folder where to save recorded demos to. A default absolute path will be generated if this value is empty or does not exist. Please allow the plugin to generate this path first and change it afterwards.

changelevel_delay

Minimum delay before map will be changed when using a map-change command. Should be at least one second to allow SourceTV to stop recording properly.

minimum_players_for_recording

Minimum players necessary to start recording.

disable_recording_during_warmup

Whether or not to disable recording during warmup period.

transmit_hltv_entity

An experimental feature to not send the HLTV entity to players to avoid detection whether a demo is being recorded right now. Does not complete hide the fact that a SourceTV is currently active but may helps to avoid detection of whether we currently record or not.

hltv_name

Change the name of the SourceTV. Simply changes "tv_name".

Commands

demorecorder reload (server console only)

Reloads the plug-in configuration.

demorecorder enable (server console only)

Enables the plug-in and saves this state to the configuration.

demorecorder disable (server console only)

Disables the plug-in and saves this state to the configuration.

Compile Yourself

Clone the project:

git clone https://github.com/Kandru/cs2-demo-recorder.git

Go to the project directory

  cd cs2-demo-recorder

Install dependencies

  dotnet restore

Build debug files (to use on a development game server)

  dotnet build

Build release files (to use on a production game server)

  dotnet publish

FAQ

TODO

License

Released under GPLv3 by @Kandru.

Authors

About

a simple Counter-Strike 2 Demo Recorder

Topics

Resources

License

Stars

Watchers

Forks

Contributors

Languages

  • C# 100.0%