Skip to content

Basic script that allow automatic demo recording in CSGO

Notifications You must be signed in to change notification settings

Th0masL/csgo-demo-recorder-script

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 

Repository files navigation

csgo-demo-recorder-script

Basic script that allow automatic demo recording in Counter-Strike Global Offensive (CSGO)

Descrition

This script allow automated demo recording in Counter-Strike Global Offensive (CSGO).

How it works

This PowerShell script generate a dynamic 'record demo' command based on the current date and time, and save this record command in a CFG file called 'record.cfg', in your CSGO CFG Folder.

You have to schedule the execution of this PowerShell script in Windows' Task Scheduler so this script can 'refresh' the content of the 'record.cfg' file every couple of minutes, and allow the next demo to be recorded with a different name than the previous one.

You will then have to bind a KEY to execute this CFG file easily during your CSGO match, and it will start recording a new demo using the dynamic demo name that has been generated by the script.

If you want to record absolutely all your games automatically, the most efficient and convenient key to use to trigger this record.cfg script is to edit your 'TAB' key bind and add the execution of the 'record.cfg' script on it. By doing so, you will record every matches as long as you push the 'TAB' key at least once during the warmup (since it's only possible to start recording demo during the warmup).

Once the demo is recording, you can push the 'TAB' key as much as you want, it will not start recording another demo as long as this one is still recording.

Important

You have to use Windows' Task Scheduler to automate the execution of this script, so it keeps gerenating new dynamic 'record demo' command and save it in the file 'record.cfg' quite often. If you don't do that, the 'record demo' command that is in the file 'record.cfg' will not change, and you will therefore overwrite the previous demo that was recorded with this same existing name.

To make easy the declaration of this PowerShell script in the Task Scheduler, you can import the Task Scheduler template present on this page. Just make sure that you save the PowerShell script in the folder 'C:\scripts', with the original name 'generate_csgo_demoname.ps1', and it will automatically create a new Task Scheduler task, and execute the script every 15 minutes, to generate new 'record demo' commands every 15 minutes.

If you play Danger Zone and want to record your matches, I suggest you update the Task Scheduler frequenty and set the script execution to every 2 or 5 minutes, since Danger Zone matches do not last long.

Also, please note that recording all your matches will create a lot of demo files on your computer, and it can take quite some space, so don't forget to go in your CSGO folder and clean/delete the demos files that you don't want to keep.

Installation

  1. Create/decide a folder that will contain this script
Exemple : C:\scripts
  1. Download the PowerShell script and the XML file, either manually or by cloning this GIT repository to the folder you just created.
You should end up with those files, in this path :
C:\scripts\generate_csgo_demo_name\generate_csgo_demo_name.ps1
C:\scripts\generate_csgo_demo_name\generate_csgo_demo_name.xml
  1. Create the task in Windows' Task Scheduler
Quick method :
- Open Windows' Task Scheduler
- Right click, and select "Import", and import the XML template file from this page
- Tick the checkbox "Run whether user is logged in or not" and "Do not store password"
- Click OK to apply
NOTE : By default, the XML file contains the folder/path as suggested above (C:\scripts\generate_csgo_demo_name\generate_csgo_demo_name.ps1). If you plan to use another path, please edit the XML file with a text editor to update the path of the file "generate_csgo_demo_name.ps1", or use the manual method below to create the task.
Manual method :
- Open Windows' Task Scheduler
- Right click, and select "Create a New task"
- Set the name of your task, example 'generate_csgo_demo_name'
- Tick the checkbox "Run whether user is logged in or not" and "Do not store password"
- In the "Triggers" tab, add a new Trigger that would execute every day at midnight, and set the repeat frequency at every 5 or X minutes
- In the "Actions" tab, add a new Action and define the executable as 'powershell.exe', and the arguments as following :
       -ExecutionPolicy Bypass C:\<folder_of_the_script>\generate_csgo_demo_name\generate_csgo_demo_name.ps1
- Click OK to apply
  1. Trigger the script manually, by doing "right click > Run" on the Task in Task Scheduler
  2. Go in your CSGO CFG Folder and verify that a file 'record.cfg' has been created and contains the 'record demo' command with the dynamic date/time of now
  3. Update/define your BIND in your config.cfg file
Exemple :
bind "TAB" "+showscores; exec record.cfg"
  1. When you start your CSGO match, push at least once the key during the Warmup to start the demo recording

About

Basic script that allow automatic demo recording in CSGO

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published