How do I turn on replays in TF2?

CS:S, TF2, DOD:S, etc.
Post Reply
User avatar
Edge100x
Founder
Founder
Posts: 12219
Joined: Thu Apr 18, 2002 11:04 pm
Location: Seattle
Contact:

How do I turn on replays in TF2?

Post by Edge100x » Fri May 06, 2011 9:40 am

To enable replays, you will have to tell the game server to upload to your free webhosting with NFO using FTP. Here's how:

1. Create a cfg/replay.cfg file containing the below lines, tailored to match your actual website and FTP information. You can create this file through the "File manager" page in your control panel, or by uploading it through FTP.
// Enable replay!
replay_enable "1"

// How often we dump replay data. You should not need to modify this value.
replay_block_dump_interval "15"

// This is the method by which clients download replay data. At the moment, only HTTP is available.
replay_fileserver_protocol "http"

// Offload using FTP. Do not use a local web server. DO NOT EDIT THIS LINE.
replay_fileserver_offload_enable "1"

//
// YOU MUST EDIT THE CONVARS BELOW THIS LINE.
//

// These are used to reconstruct a URL on the client.
replay_fileserver_host "yoursite.site.nfoservers.com"
replay_fileserver_port "80"
replay_fileserver_path "/replayfolder"

// Your FTP info. This data is private and not shared with the client.
replay_fileserver_offload_protocol "ftp"
replay_fileserver_offload_hostname "yoursite.site.nfoservers.com"
replay_fileserver_offload_port "21"
replay_fileserver_offload_remotepath "/public/replayfolder"
replay_fileserver_offload_login "youridentifier"
replay_fileserver_offload_password "yourpassword"
replay_fileserver_offload_maxuploads "5"
Replace:

yoursite.site.nfoservers.com with the subdomain of your website (from your "Status" or "Domains" page for the website)
/public/replayfolder with the place that you want relays to go within your website FTP. The way that we set up websites by default, "public" is what is shown to clients, so by using the directory "replayfolder" within that, you are allowing replays to show up at http://yoursite.site.nfoservers.com/replayfolder.
/replayfolder with the public part of the URL, as just discussed.
youridentifier with your website identifier. Usually this is the same as your game server.
yourpassword with the system (SSH/FTP) password from your website. You can find this on the "Passwords" page for the website.

2. Edit your cfg/autoexec.cfg file and add this above the "map" line:

Code: Select all

exec replay.cfg
3. In the FTP for your website, make sure that the /public/replayfolder (or whatever you decided to call it) exists. If it does not, create it.

4. Restart your server, or execute exec replay.cfg through rcon on your "Server control" page.

Your players will then be able to use the replay feature through their client. Valve discusses how clients can use replay.

Valve also describes more comprehensively how replays work in a Steampowered forums thread. We do things slightly differently here, such as by executing replay.cfg from the autoexec.cfg file.

User avatar
Edge100x
Founder
Founder
Posts: 12219
Joined: Thu Apr 18, 2002 11:04 pm
Location: Seattle
Contact:

Re: How do I turn on replays in TF2?

Post by Edge100x » Fri May 06, 2011 9:53 am

For reference, here are all of the cvars that Valve currently exposes on the server, which can be used to control how replays work:
demo_timescale : cmd : : Sets demo replay speed.
replay_add_fake_replays : cmd : : Adds a set of fake replays
replay_allow_camera_man : 1 : , "sv" : Auto director allows spectators to become camera man
replay_allow_static_shots : 1 : , "sv" : Auto director uses fixed level cameras for shots
replay_block_dump_interval : 10 : , "norecord", "cl" : The server will write partial replay files at this interval when recording.
replay_buffersize : 32 : , "norecord", "cl" : Maximum size for the replay memory buffer.
replay_cleanup_time : 1 : , "rep", "norecord", "cl" : The Replay system will periodically remove stale .dem files from disk. This variable represents the amount of time (in hours)
replay_deathcammaxverticaloffset : 150 : , "norecord", "cl" : Vertical offset for player death camera
replay_debug : 0 : , "cl" : Replay debug info.
replay_delay : 30 : , "sv" : Replay broadcast delay in seconds
replay_deleteclientreplays : cmd : : Deletes all replays from client replay history, as well as all files associated with each replay.
replay_demolifespan : 1 : , "rep", "norecord", "cl" : The number of days before cleaning up replay demos. Modifying this number will not affect the lifespan of existing replays.
replay_docleanup : cmd : : Deletes stale session data from the fileserver. 'replay_docleanup force' will remove all replay session data.
replay_dofileserver_cleanup_on_start : 1 : , "sv", "cl" : Cleanup any stale replay data (both locally and on fileserver) at startup.
replay_dopublishtest : cmd : : Do a replay publish test using the current setup.
replay_dosanitycheck : cmd : : Run a sanity check on replay server setup.
replay_enable : 0 : , "rep", "norecord", "cl" : Enable Replay recording on server
replay_enableeventbasedscreenshots : 0 : , "a", "norecord", "cl" : If disabled, only take a screenshot when a replay is saved. If enabled, take up to replay_maxscreenshotsperreplay screenshots,
replay_fileserver_host : 0 : , "rep", "norecord", "cl" : The hostname of the Web server hosting replays. This can be an IP or a hostname, e.g. '1.2.3.4' or 'www.myserver.com'
replay_fileserver_offload_enable : 0 : , "sv", "cl" : If enabled, offload session blocks to a secondary machine using the replay_offload_* convars.
replay_fileserver_offload_hostname : 0 : , "sv", "cl" : Hostname for FTP server where session blocks will be offloaded.
replay_fileserver_offload_login : 0 : , "sv", "cl" : Login for session block offloading.
replay_fileserver_offload_maxuploads : 1 : , "sv", "cl" : The maximum number of concurrent uploads allowed.
replay_fileserver_offload_password : 0 : , "sv", "prot", "cl" : Login for session block offloading.
replay_fileserver_offload_port : 21 : , "sv", "cl" : Port number for FTP server where session blocks will be offloaded.
replay_fileserver_offload_protocol : 0 : , "sv", "cl" : Must be 'ftp'
replay_fileserver_offload_remotepath : 0 : , "sv", "cl" : Remote path where blocks will be stored on the FTP server for session block offloading.
replay_fileserver_path : 0 : , "rep", "norecord", "cl" : If your replays are stored at 'http://123.123.123.123:4567/tf/replays', replay_fileserver_path should be set to '/tf/replays'
replay_fileserver_port : 80 : , "rep", "norecord", "cl" : The port for the Web server hosting replays. For example, if your replays are stored at 'http://123.123.123.123:4567/tf/replay
replay_fileserver_protocol : 0 : , "rep", "norecord", "cl" : Can be 'http' or 'https'
replay_flushinterval : 15 : , "a", "norecord", "cl" : Replay system will flush to disk a maximum of every replay_flushinterval seconds.
replay_forcereconstruct : 0 : , "norecord", "cl" : Force the reconstruction of replays each time.
replay_ignorereplayticks : 0 : :
replay_local_fileserver_path : 0 : , "norecord", "cl" : The file server local path. For example, 'c:\MyWebServer\htdocs\replays' or '/MyWebServer/htdocs/replays'.
replay_maxconcurrentdownloads : 3 : , "norecord", "cl" : The maximum number of concurrent downloads allowed.
replay_maxscreenshotsperreplay : 8 : , "norecord", "cl" : The maximum number of screenshots that can be taken for any given replay.
replay_mintimebetweenscreenshots : 5 : , "norecord", "cl" : The minimum time (in seconds) that must pass between screenshots being taken.
replay_playerdeathscreenshotdelay : 2 : , "norecord", "cl" : Amount of time to wait after player is killed before taking a screenshot
replay_port : 27040 : : Host Replay port
replay_postdeathrecordtime : 5 : , "norecord", "cl" : The amount of time (seconds) to be recorded after you die for a given replay.
replay_postwinreminderduration : 5 : , "norecord", "cl" : The number of seconds to show a Replay reminder, post-win/lose.
replay_printclientreplays : cmd : : Prints out all client replay info
replay_printsessioninfo : cmd : : Print session info
replay_record : cmd : : Starts Replay demo recording.
replay_removeclientreplay : cmd : : Remove the replay at the given index.
replay_renderpause : cmd : : Pause Replay rendering.
replay_renderunpause : cmd : : Unpause Replay rendering.
replay_screenshotkilldelay : 0 : , "norecord", "cl" : Delay before taking a screenshot when you kill someone, in seconds.
replay_screenshotresolution : 0 : , "norecord", "cl" : 0 for low-res screenshots (width=512), 1 for hi-res (width=1024)
replay_screenshotsenabled : 1 : , "a", "norecord", "cl" : Take screenshots for the replay browser during gameplay?
replay_screenshotsentrykilldelay : 0 : , "norecord", "cl" : Delay before taking a screenshot when you kill someone, in seconds.
replay_sentrycammaxverticaloffset : 10 : , "norecord", "cl" : Vertical offset from a sentry on sentry kill
replay_sentrycamoffset_frontback : -50 : , "norecord", "cl" : Front/back offset for sentry POV screenshot
replay_sentrycamoffset_leftright : -25 : , "norecord", "cl" : Left/right offset for sentry POV screenshot
replay_sentrycamoffset_updown : 22 : , "norecord", "cl" : Up/down offset for sentry POV screenshot
replay_sessioninfo_updatefrequency : 5 : , "norecord", "cl" : If a replay has not been downloaded, the replay browser will update the status of a given replay on the server based on this cv
replay_snapshotrate : 16 : , "norecord", "cl" : Snapshots broadcasted per second
replay_stoprecord : cmd : : Stop Replay demo recording.
save_replay : cmd : : Save a replay of the current life if possible.
sv_maxreplay : 0 : : Maximum replay time in seconds

Post Reply