Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!

Recording demos

  • Views Views: 2,007
  • Last updated Last updated:
  • < Back to main menu

    How to record a demo

    A guide on how to record demos to catch rulebreakers

    This guide covers everything from the basics of how to record a demo and how to play them back to making an automated script that will help you record demos at the click of a button.

    The basics

    Accessing your console

    Open your TF2 settings and hit “Advanced...”. Now check the box labelled “enable developer console”. Close the settings menu and press `, you should see the console pop up on your pause menu (or main menu if you’re not in a game).


    Recording a demo

    - Type 'record demoname' into your console - You should see "Recording to demoname.dem"
    - Type 'status' in console once recording for a list of Steam IDs/users that were present. This records into your demo.
    - Once enough evidence is recorded, type 'stop' in console and you should see the finished message say - "Completed demo, recording time 3.2, game frames 203."
    Your demo file should save to your TF2 install location, mine is - C:\Program Files (x86)\Steam\Steamapps\common\Team Fortress 2\tf

    Reviewing a demo

    Open your console and type “demoui”. A usable UI should now pop up and you can use it to load and replay your demo. Play through it and take note of the important ticks where the rulebreak happens. When you have them, you can add them to your report.
    NOTE: demos aren’t videos. They are files that have game information that TF2 then actively converts into a “render” of the gamestate. This means anything out of render distance doesn’t get saved, and since it’s not a video, the file size is rather small. Even a 30 minute demo is small enough to be uploaded directly on the forums.

    Useful tips

    The demoui

    You can pause, speed up or slow down the demo with the demoui, just use the button and slider respectively.
    You can also type in a tick number and skip to the part in the demo.
    Warning: demos can only play forwards. If you try to skip backwards, the demo will close, restart and then skip to your point. Also, don’t type in a number bigger than the demo, if not it will glitch your game and the demo will keep skipping forwards, even if you re-open it.
    You can also press “drive” which allows you to move the player around in noclip mode. Just press and hold anywhere on the screen and use WASD to move around. Very useful if a rulebreak happens behind you or behind a wall.


    Console commands

    Here are some quality-of-life commands to help you analyze demos. First off, enable “sv_cheats 1” in the console.
    thirdperson - puts you in third person
    glow_outline_effect_enable 1 - essentially gives you wallhacks in the demo. You can see all players through the map and it makes it really easy to spot a hacker, for instance (they lock onto people through walls).
    hidepanel all - applies to spectators and removes the brown borders at the top and bottom of the screen, giving you the full fov. Particularly useful when watching suspected hackers, especially snipers.

    [advanced] A demo recording script

    This guide will help you get a demo recording script installed and working, where you can record multiple demos with a single button press. This script makes it really easy to split your demos into smaller chunks and always have a demo recording active to catch rulebreakers.


    Preparation work


    Checking for autoexec

    First off, you need to head to the TF2 script folder on your PC. The location will be at
    [your steam directory]/steamapps/common/Team Fortress 2/tf/cfg
    Check if there is a file called autoexec. If there is none, just keep reading. If there is one, open it with notepad (or any other text editor) and jump to the next category.


    Creating autoexec

    If you don't have autoexec, open up notepad and press save as. save the file in the cfg folder, and make sure "all files" is selected. name the file autoexec.cfg. Make sure the file is a .cfg and not a .txt file. This file that you just created will run whenever you start up TF2. Be careful that you don't overwrite this file (when installing a config, for example) as this will remove your demo recording script.


    The script


    Making the script

    Making the script is rather easy. Just copy and paste this code into your text editor and save the file.


    //demo recording tool
    alias demorec "demorec1"
    alias demorec1 "stop; record tmpdemo1; developer 1; echo Demo #1 recording on...; wait 100; developer 0; alias demorec demorec2"
    alias demorec2 "stop; record tmpdemo2; developer 1; echo Demo #2 recording on...; wait 100; developer 0; alias demorec demorec3"
    alias demorec3 "stop; record tmpdemo3; developer 1; echo Demo #3 recording on...; wait 100; developer 0; alias demorec demorec4"
    alias demorec4 "stop; record tmpdemo4; developer 1; echo Demo #4 recording on...; wait 100; developer 0; alias demorec demorec5"
    alias demorec5 "stop; record tmpdemo5; developer 1; echo Demo #5 recording on...; wait 100; developer 0; alias demorec demorec6"
    alias demorec6 "stop; record tmpdemo6; developer 1; echo Demo #6 recording on...; wait 100; developer 0; alias demorec demorec7"
    alias demorec7 "stop; record tmpdemo7; developer 1; echo Demo #7 recording on...; wait 100; developer 0; alias demorec demorec8"
    alias demorec8 "stop; record tmpdemo8; developer 1; echo Demo #8 recording on...; wait 100; developer 0; alias demorec demorec9"
    alias demorec9 "stop; record tmpdemo9; developer 1; echo Demo #9 recording on...; wait 100; developer 0; alias demorec demorec10"
    alias demorec10 "stop; record tmpdemo10; developer 1; echo Demo #10 recording on...; wait 100; developer 0; alias demorec demorec11"
    alias demorec11 "stop; record tmpdemo11; developer 1; echo Demo #11 recording on...; wait 100; developer 0; alias demorec demorec12"
    alias demorec12 "stop; record tmpdemo12; developer 1; echo Demo #12 recording on...; wait 100; developer 0; alias demorec demorec13"
    alias demorec13 "stop; record tmpdemo13; developer 1; echo Demo #13 recording on...; wait 100; developer 0; alias demorec demorec14"
    alias demorec14 "stop; record tmpdemo14; developer 1; echo Demo #14 recording on...; wait 100; developer 0; alias demorec demorec15"
    alias demorec15 "stop; record tmpdemo15; developer 1; echo Demo #15 recording on...; wait 100; developer 0; alias demorec demorec1"
    bind "o" "demorec"
    bind "p" "stop"

    How does the script work?

    Essentially what this code does is start recording a demo named tmpdemo1 once you press o. While it's recording, you can press o again to stop and save the current demo, and start recording a new demo named tmpdemo2. After that it's tmpdemo3 and so on.


    Warnings and limitations


    Once you reach tmpdemo15, the script will loop back and overwrite tmpdemo1, so do be aware of that. The script will also start at tmpdemo1 once you restart the game, overwriting any older demo in the process, so make sure that you have all important demos saved.

  • Loading…
Top Bottom