From b9a8d286658c9ef67427e436d1fcdc4c25c370f5 Mon Sep 17 00:00:00 2001
From: kipod <167029528+kipod8@users.noreply.github.com>
Date: Fri, 30 Aug 2024 16:09:58 -0500
Subject: [PATCH 1/8] Add files via upload
---
README.md | 98 ++++---
VelocityGraph.cpp | 147 ++++++++++
VelocityGraph.hpp | 24 ++
cvars.md | 687 ++++++++++++++++++++++++++++++++++++++++++++++
4 files changed, 906 insertions(+), 50 deletions(-)
create mode 100644 VelocityGraph.cpp
create mode 100644 VelocityGraph.hpp
create mode 100644 cvars.md
diff --git a/README.md b/README.md
index 4ae4182c..5aa02313 100644
--- a/README.md
+++ b/README.md
@@ -1,50 +1,48 @@
-# SourceAutoRecord
-
-
-
-[![SourceAutoRecord Homepage](docs/web/img/sar_logo.webp)](https://sar.portal2.sr/)
-
-
-
-
-
-[![CI](https://github.com/p2sr/SourceAutoRecord/workflows/CI/badge.svg)](https://github.com/p2sr/SourceAutoRecord/actions?query=workflow%3ACI+branch%3Amaster)
-[![CD](https://github.com/p2sr/SourceAutoRecord/workflows/CD/badge.svg)](https://github.com/p2sr/SourceAutoRecord/actions?query=workflow%3ACD+branch%3Amaster)
-[![Latest release](https://img.shields.io/github/v/release/p2sr/SourceAutoRecord?label=latest%20release)](https://github.com/p2sr/SourceAutoRecord/releases/latest)
-[![Latest prerelease](https://img.shields.io/github/v/release/p2sr/SourceAutoRecord?label=latest%20pre-release&include_prereleases)](https://github.com/p2sr/SourceAutoRecord/releases)
-[![License](https://img.shields.io/github/license/p2sr/SourceAutoRecord)](https://github.com/p2sr/SourceAutoRecord/blob/master/LICENSE)
-
-
-
-
-
-### [Overview](#overview) | [Support](#support) | [Documentation](#documentation)
-
-
-
-## Overview
-
-**SourceAutoRecord** (**SAR**) is a plugin for Portal 2 and mods based on it, bringing lots of features and modifications
-into the game for speedrunners and people alike.
-
-For features and installation instructions, please visit [the website].
-
-[the website]: https://sar.portal2.sr/
-
-## Support
-
-| Game | Windows | Linux |
-|-------------------------------------------------------------------------|---------|-------|
-| [Portal 2](https://store.steampowered.com/app/620) | ✔ | ✔ |
-| [Aperture Tag](https://store.steampowered.com/app/280740) | ✔ | [✔*](https://wiki.portal2.sr/Aperture_Tag#Linux) |
-| [Portal Stories: Mel](https://store.steampowered.com/app/317400) | ✔ | ✔ |
-| [Thinking with Time Machine](https://store.steampowered.com/app/286080) | ✔ | ✔ |
-| [Portal Reloaded](https://store.steampowered.com/app/1255980) | ✔ | ✔ |
-
-\* *With Proton Compatibility*
-
-## Documentation
-
-- [Contributing](docs/contributing.md)
-- [Console Commands & Variables](docs/cvars.md)
-- [Setup & Usage](https://wiki.portal2.sr/SAR)
+# SourceAutoRecord
+
+
+
+[![SourceAutoRecord Homepage](docs/web/img/sar_logo.webp)](https://sar.portal2.sr/)
+
+
+
+
+
+[![CI](https://github.com/p2sr/SourceAutoRecord/workflows/CI/badge.svg)](https://github.com/p2sr/SourceAutoRecord/actions?query=workflow%3ACI+branch%3Amaster)
+[![CD](https://github.com/p2sr/SourceAutoRecord/workflows/CD/badge.svg)](https://github.com/p2sr/SourceAutoRecord/actions?query=workflow%3ACD+branch%3Amaster)
+[![License](https://img.shields.io/github/license/p2sr/SourceAutoRecord)](https://github.com/p2sr/SourceAutoRecord/blob/master/LICENSE)
+
+
+
+
+
+### [Overview](#overview) | [Support](#support) | [Documentation](#documentation)
+
+
+
+## Overview
+
+**SourceAutoRecord** (**SAR**) is a plugin for Portal 2 and mods based on it, bringing lots of features and modifications
+into the game for speedrunners and people alike.
+
+For features and installation instructions, please visit [the website].
+
+[the website]: https://sar.portal2.sr/
+
+## Support
+
+| Game | Windows | Linux |
+|-------------------------------------------------------------------------|---------|-------|
+| [Portal 2](https://store.steampowered.com/app/620) | ✔ | ✔ |
+| [Aperture Tag](https://store.steampowered.com/app/280740) | ✔ | [✔*](https://wiki.portal2.sr/Aperture_Tag#Linux) |
+| [Portal Stories: Mel](https://store.steampowered.com/app/317400) | ✔ | ✔ |
+| [Thinking with Time Machine](https://store.steampowered.com/app/286080) | ✔ | ✔ |
+| [Portal Reloaded](https://store.steampowered.com/app/1255980) | ✔ | ✔ |
+
+\* *With Proton Compatibility*
+
+## Documentation
+
+- [Contributing](docs/contributing.md)
+- [Console Commands & Variables](docs/cvars.md)
+- [Setup & Usage](https://wiki.portal2.sr/SAR)
diff --git a/VelocityGraph.cpp b/VelocityGraph.cpp
new file mode 100644
index 00000000..4f702bd2
--- /dev/null
+++ b/VelocityGraph.cpp
@@ -0,0 +1,147 @@
+#include "VelocityGraph.hpp"
+
+#include "Event.hpp"
+#include "Features/Session.hpp"
+#include "Modules/Client.hpp"
+#include "Modules/Engine.hpp"
+#include "Modules/Scheme.hpp"
+#include "Modules/Surface.hpp"
+#include "Utils/SDK/FixedQueue.hpp"
+#include "Variable.hpp"
+
+#include
+#include
+
+Variable sar_velocitygraph("sar_velocitygraph", "0", "Shows velocity graph.\n");
+Variable sar_velocitygraph_font_index("sar_velocitygraph_font_index", "21", 0, "Font index of velocity graph.\n"); // 21 looks pretty good
+Variable sar_velocitygraph_show_line("sar_velocitygraph_show_line", "1", "Shows line for velocity graph.\n");
+Variable sar_velocitygraph_x("sar_velocitygraph_x", "-250", "Velocity graph x axis offset.\n");
+Variable sar_velocitygraph_y("sar_velocitygraph_y", "-175", "Velocity graph y axis offset.\n");
+Variable sar_velocitygraph_background("sar_velocitygraph_background", "0", "Background of velocity graph.\n"); // imo this should be off by default
+Variable sar_velocitygraph_show_speed_on_graph("sar_velocitygraph_show_speed_on_graph", "1", "Show speed between jumps.\n");
+Variable sar_velocitygraph_rainbow("sar_velocitygraph_rainbow", "0", "Rainbow mode of velocity graph text.\n");
+
+struct VelocityData {
+ int speed;
+ bool on_ground;
+ VelocityData(int speed, bool on_ground)
+ : speed(speed)
+ , on_ground(on_ground) {
+ }
+ VelocityData()
+ : speed(0)
+ , on_ground(false) {
+ }
+};
+
+std::vector> velocityStamps(2, FixedQueue(500, VelocityData()));
+
+static int last_vel[2] = {0, 0};
+static int tick_prev[2] = {0, 0};
+
+static int take_off[2] = {0, 0};
+static int take_off_display_timeout[2] = {0, 0};
+
+static bool last_on_ground[2] = {false, false};
+
+VelocityGraph::VelocityGraph()
+ : Hud(HudType_InGame | HudType_Paused | HudType_Menu, true) {
+}
+bool VelocityGraph::ShouldDraw() {
+ return sar_velocitygraph.GetBool() && Hud::ShouldDraw();
+}
+
+void ClearData(int slot) {
+ take_off[slot] = 0;
+ take_off_display_timeout[slot] = 0;
+ velocityStamps[slot].setAll(VelocityData());
+}
+
+void VelocityGraph::GatherData(int slot, bool on_ground) {
+ auto player = client->GetPlayer(slot + 1);
+ if (!player) return;
+
+ auto vel = client->GetLocalVelocity(player);
+ int speed = vel.Length2D();
+
+ velocityStamps[slot].Push(VelocityData(speed, on_ground));
+
+ if (last_on_ground[slot] && !on_ground) {
+ take_off[slot] = speed;
+ take_off_display_timeout[slot] = engine->GetClientTime() + 2;
+ }
+ last_on_ground[slot] = on_ground;
+}
+
+void VelocityGraph::Paint(int slot) {
+ int speed = velocityStamps[slot].Last().speed;
+
+ int x, y;
+ engine->GetScreenSize(nullptr, x, y);
+
+ const Vector2 graphPos = Vector2(x / 2, y) +
+ Vector2(sar_velocitygraph_x.GetInt(), sar_velocitygraph_y.GetInt());
+
+ for (int i = 1; i < velocityStamps[slot].size - 1; i++) {
+ const auto current = velocityStamps[slot][i];
+ const auto next = velocityStamps[slot][i + 1];
+
+ const auto clamped_current_speed = std::clamp(current.speed, 0, 600);
+ const auto clamped_next_speed = std::clamp(next.speed, 0, 600);
+
+ int current_speed = (clamped_current_speed * 75 / 320);
+ int next_speed = (clamped_next_speed * 75 / 320);
+
+ if (current.on_ground != next.on_ground && !current.on_ground) {
+ if (sar_velocitygraph_show_speed_on_graph.GetBool()) {
+ auto height = 15;
+
+ surface->DrawTxt(scheme->GetFontByID(2), graphPos + Vector2(i, -next_speed - height),
+ Color(255, 255, 255), std::to_string(next.speed).c_str());
+ }
+ }
+
+ if (!sar_velocitygraph_show_line.GetBool()) break;
+ surface->DrawColoredLine(
+ graphPos + Vector2(i - 1, -current_speed),
+ graphPos + Vector2(i, -next_speed),
+ Color(255, 255, 255));
+ }
+
+ bool should_draw_takeoff = !last_on_ground[slot] || take_off_display_timeout[slot] > engine->GetClientTime();
+ int recentSpeed = velocityStamps[slot][velocityStamps[slot].size - 10].speed;
+ Color c = Color(30, 255, 109);
+ if (sar_velocitygraph_rainbow.GetBool()) {
+ c = Utils::HSVToRGB(speed, 100, 100);
+ } else if (std::abs(speed - recentSpeed) < 5) {
+ c = Color(255, 199, 89);
+ } else if (speed < recentSpeed + 5) {
+ c = Color(255, 119, 119);
+ }
+
+ auto font = scheme->GetFontByID(sar_velocitygraph_font_index.GetInt());
+ auto length = surface->GetFontLength(font, should_draw_takeoff ? "%i (%i)\n" : "%i", speed, take_off[slot]);
+
+ surface->DrawTxt(font, graphPos.x + 250 - length / 2, graphPos.y + 25, c, should_draw_takeoff ? "%i (%i)\n" : "%i", speed, take_off[slot]);
+
+ if (sar_velocitygraph_background.GetBool() && sar_velocitygraph_show_line.GetBool())
+ surface->DrawRect({0, 0, 0, 192}, graphPos - Vector2(5, 150 + 5), graphPos + Vector2(5 + 500, 5));
+}
+bool VelocityGraph::GetCurrentSize(int &xSize, int &ySize) {
+ return false;
+}
+ON_EVENT(SESSION_START) {
+ for (int slot = 0; slot < 2; slot++) {
+ if (take_off[slot] != 0) ClearData(slot);
+ }
+}
+ON_EVENT(PROCESS_MOVEMENT) {
+ if (!velocityGraph->ShouldDraw()) {
+ if (take_off[event.slot] != 0) ClearData(event.slot);
+ return;
+ }
+
+ velocityGraph->GatherData(event.slot, event.grounded);
+}
+
+VelocityGraph *velocityGraph = new VelocityGraph();
diff --git a/VelocityGraph.hpp b/VelocityGraph.hpp
new file mode 100644
index 00000000..e0b7d55f
--- /dev/null
+++ b/VelocityGraph.hpp
@@ -0,0 +1,24 @@
+#pragma once
+#include "Hud.hpp"
+#include "Variable.hpp"
+
+class VelocityGraph : public Hud {
+public:
+ VelocityGraph();
+ bool ShouldDraw() override;
+ void GatherData(int slot, bool on_ground);
+ Color HSVtoRGB(float H, float S, float V);
+ void Paint(int slot) override;
+ bool GetCurrentSize(int &xSize, int &ySize) override;
+};
+
+extern VelocityGraph *velocityGraph;
+
+extern Variable sar_velocitygraph;
+extern Variable sar_velocitygraph_font_index;
+extern Variable sar_velocitygraph_show_line;
+extern Variable sar_velocitygraph_x;
+extern Variable sar_velocitygraph_y;
+extern Variable sar_velocitygraph_background;
+extern Variable sar_velocitygraph_show_speed_on_graph;
+extern Variable sar_velocitygraph_rainbow;
diff --git a/cvars.md b/cvars.md
new file mode 100644
index 00000000..9e91957e
--- /dev/null
+++ b/cvars.md
@@ -0,0 +1,687 @@
+# SAR: Cvars
+
+|Name|Default|Description|
+|---|---|---|
+|cl_crosshair_t|0|Removes the top line from the crosshair :0: normal crosshair,1: crosshair without top.|
+|cl_crosshairalpha|255|Change the amount of transparency.|
+|cl_crosshaircolor_b|255|Changes the color of the crosshair.|
+|cl_crosshaircolor_g|255|Changes the color of the crosshair.|
+|cl_crosshaircolor_r|255|Changes the color of the crosshair.|
+|cl_crosshairdot|1|Decides if there is a dot in the middle of the crosshair|
+|cl_crosshairgap|9|Changes the distance of the crosshair lines from the center of screen.|
+|cl_crosshairsize|1|Changes the size of the crosshair.|
+|cl_crosshairthickness|0|Changes the thickness of the crosshair lines.|
+|cl_quickhud_alpha|255|Change the amount of transparency.|
+|cl_quickhudleftcolor_b|86|Changes the color of the left quickhud.|
+|cl_quickhudleftcolor_g|184|Changes the color of the left quickhud.|
+|cl_quickhudleftcolor_r|255|Changes the color of the left quickhud.|
+|cl_quickhudrightcolor_b|255|Changes the color of the right quickhud.|
+|cl_quickhudrightcolor_g|184|Changes the color of the right quickhud.|
+|cl_quickhudrightcolor_r|111|Changes the color of the right quickhud.|
+|cond|cmd|cond \ \ [args]... - runs a command only if a given condition is met|
+|conds|cmd|conds [\ \]... [else] - runs the first command which has a satisfied condition|
+|ghost_chat|cmd|ghost_chat - open the chat HUD for messaging other players|
+|ghost_connect|cmd|ghost_connect \ \ - connect to the server
ex: 'localhost 53000' - '127.0.0.1 53000' - '89.10.20.20 53000'.|
+|ghost_debug|cmd|ghost_debug - output a fuckton of debug info about network ghosts|
+|ghost_delete_all|cmd|ghost_delete_all - delete all ghosts|
+|ghost_delete_by_ID|cmd|ghost_delete_by_ID \ - delete the ghost selected|
+|ghost_demo_color|cmd|ghost_demo_color \ \ - sets the color of ghost|
+|ghost_disconnect|cmd|ghost_disconnect - disconnect|
+|ghost_draw_through_walls|0|Whether to draw ghosts through walls. 0 = none, 1 = names, 2 = names and ghosts.|
+|ghost_height|16|Height of the ghosts. (For prop models, only affects their position).|
+|+ghost_leaderboard|cmd|+ghost_leaderboard - enable the ghost leaderboard HUD|
+|-ghost_leaderboard|cmd|-ghost_leaderboard - disable the ghost leaderboard HUD|
+|ghost_leaderboard_font|68|The font to use for the ghost leaderboard.|
+|ghost_leaderboard_max_display|10|The maximum number of names to display on the leaderboard.|
+|ghost_leaderboard_mode|0|The mode for the leaderboard. 0 = CM, 1 = race|
+|ghost_leaderboard_reset|cmd|ghost_leaderboard_reset - reset all leaderboard entries to "no time".|
+|ghost_leaderboard_x|10|The x position of the leaderboard.|
+|ghost_leaderboard_y|10|The x position of the leaderboard.|
+|+ghost_list|cmd|+ghost_list - enable the ghost list HUD|
+|-ghost_list|cmd|-ghost_list - disable the ghost list HUD|
+|ghost_list|cmd|ghost_list - list all players in the current ghost server|
+|ghost_list_font|0|Font index for ghost list HUD.|
+|ghost_list_mode|0|Mode for ghost list HUD. 0 = all players, 1 = current map|
+|ghost_list_show_map|0|Show the map name in the ghost list HUD.|
+|ghost_list_x|2|X position of ghost list HUD.|
+|ghost_list_y|-2|Y position of ghost list HUD.|
+|ghost_message|cmd|ghost_message - send message to other players|
+|ghost_name|cmd|ghost_name - change your online name|
+|ghost_name_font_size|5.0|The size to render ghost names at.|
+|ghost_name_proximity_fade|200|Distance from ghosts at which their names fade out.|
+|ghost_net_dump|0|Dump all ghost network activity to a file for debugging.|
+|ghost_net_dump_mark|cmd|Mark a point of interest in the ghost network activity dump.|
+|ghost_offset|cmd|ghost_offset \ \ - delay the ghost start by \ frames|
+|ghost_opacity|255|Opacity of the ghosts.|
+|ghost_ping|cmd|Pong!|
+|ghost_prop_model|cmd|ghost_prop_model \ - set the prop model. Example: models/props/metal_box.mdl|
+|ghost_proximity_fade|100|Distance from ghosts at which their models fade out.|
+|ghost_recap|cmd|ghost_recap - recap all ghosts setup|
+|ghost_reset|cmd|ghost_reset - reset ghosts|
+|ghost_set_color|cmd|ghost_set_color \ - sets the ghost color to the specified sRGB color code|
+|ghost_set_demo|cmd|ghost_set_demo \ [ID] - ghost will use this demo. If ID is specified, will create or modify the ID-th ghost|
+|ghost_set_demos|cmd|ghost_set_demos \ [first_id] [ID] - ghost will setup a speedrun with first_demo, first_demo_2, etc.
If first_id is specified as e.g. 5, will instead start from first_demo_5, then first_demo_6, etc. Specifying first_id as 1 will use first_demo, first_demo_2 etc as normal.
If ID is specified, will create or modify the ID-th ghost.|
+|ghost_shading|1|Enable simple light level based shading for overlaid ghosts.|
+|ghost_show_advancement|3|Show the advancement of the ghosts. 1 = show finished runs on the current map, 2 = show all finished runs, 3 = show all finished runs and map changes|
+|ghost_show_names|1|Whether to show names above ghosts.|
+|ghost_show_spec_chat|1|Show chat messages from spectators when not spectating.|
+|ghost_spec_connect|cmd|ghost_spec_connect \ \ - connect to the server as a spectator
ex: 'localhost 53000' - '127.0.0.1 53000' - '89.10.20.20 53000'.|
+|ghost_spec_next|cmd|ghost_spec_next [samemap] - spectate the next ghost|
+|ghost_spec_pov|cmd|ghost_spec_pov \ - spectate the specified ghost|
+|ghost_spec_prev|cmd|ghost_spec_prev - spectate the previous ghost|
+|ghost_spec_see_spectators|0|Whether to see other spectators while spectating.|
+|ghost_spec_thirdperson|0|Whether to spectate ghost from a third-person perspective.|
+|ghost_spec_thirdperson_dist|300|The maximum distance from which to spectate in third-person.|
+|ghost_start|cmd|ghost_start - start ghosts|
+|ghost_sync|0|When loading a new level, pauses the game until other players load it.|
+|ghost_sync_countdown|3|The number of seconds of countdown to show at the start of every synced map. 0 to disable.|
+|ghost_TCP_only|0|Uses only TCP for ghost servers. For people with unreliable internet.|
+|ghost_text_offset|7|Offset of the name over the ghosts.|
+|ghost_type|cmd|ghost_type \<0/1/2/3/4>:
0: Colored circle
1: Colored pyramid
2: Colored pyramid with portal gun (RECORDED IN DEMOS)
3: Prop model (RECORDED IN DEMOS)
4: Bendy|
+|ghost_update_rate|50|Milliseconds between ghost updates. For people with slow/metered internet.|
+|hwait|cmd|hwait \ \ [args...] - run a command after the given number of host ticks|
+|nop|cmd|nop [args]... - nop ignores all its arguments and does nothing|
+|sar_about|cmd|sar_about - prints info about SAR plugin|
+|sar_achievement_tracker_ignore_coop|0|When set, achievement tracker ignores coop-specific achievements.|
+|sar_achievement_tracker_reset|cmd|sar_achievement_tracker_reset - resets the status of achievement tracker.|
+|sar_achievement_tracker_show|0|Enables achievement tracker toasts (using tag "achievements").|
+|sar_achievement_tracker_status|cmd|sar_achievement_tracker_status - shows achievement completion status.|
+|sar_aim_point_add|cmd|sar_aim_point_add - add frozen aimpoint at current position|
+|sar_aim_point_clear|cmd|sar_aim_point_clear - clear all frozen aimpoints|
+|sar_aim_point_hud|0|Overlays a marker with coordinates at the point you're aiming at|
+|sar_aircontrol|0|Enables more air-control on the server.|
+|sar_alias|cmd|sar_alias \ [command] [args]... - create an alias, similar to the 'alias' command but not requiring quoting. If no command is specified, prints the given alias|
+|sar_alias_run|cmd|sar_alias_run \ [args]... - run a SAR alias, passing on any additional arguments|
+|sar_allow_resizing_window|0|EXPERIMENTAL! Forces resizing on game's window.|
+|sar_always_transmit_heavy_ents|0|Always transmit large but seldom changing edicts to clients to prevent lag spikes.|
+|sar_auto_voidclip_pause|cmd|sar_auto_voidclip_pause \ - runs the specified command, and automatically voidclip-pauses on the next load|
+|sar_autoaim_point|cmd|sar_autoaim_point \ \ \ - automatically aims at a point in space. Requires cheats|
+|sar_autojump|0|Enables automatic jumping on the server.|
+|sar_autorecord|0|Enables or disables automatic demo recording.|
+|sar_autostrafe|0|Automatically strafes in your current wishdir.|
+|sar_avg_result|cmd|sar_avg_result - prints result of average|
+|sar_avg_start|cmd|sar_avg_start - starts calculating the average when using timer|
+|sar_avg_stop|cmd|sar_avg_stop - stops average calculation|
+|sar_bink_respect_host_time|1|Make BINK video playback respect host time.|
+|sar_cam_control|0|sar_cam_control \: Change type of camera control.
0 = Default (camera is controlled by game engine),
1 = Drive mode (camera is separated and can be controlled by user input),
2 = Cinematic mode (camera is controlled by predefined path).
3 = Follow mode (Camera is following the player but not rotating, useful when strafing on gel).|
+|sar_cam_drive|1|Enables or disables camera drive mode in-game (turning it on is not required for demo player)|
+|sar_cam_force_eye_pos|0|Forces camera to be placed exactly on the player's eye position|
+|sar_cam_ortho|0|Enables or disables camera orthographic projection.|
+|sar_cam_ortho_nearz|1|Changes the near Z plane of orthographic projection.|
+|sar_cam_ortho_scale|1|Changes the scale of orthographic projection (how many units per pixel).|
+|sar_cam_path_draw|0|Draws a representation of the camera path in the world. Disabled in cinematic mode.|
+|sar_cam_path_export|cmd|sar_cam_path_export \ [format] [framerate] - exports current camera path to a given file in given format.
Available formats:
kf - default, exports commands that can be used to recreate camera path. Does not use rate parameter.
raw - exports a dump of raw camera position for each frame in given framerate (60 by default).
davinci - exports a script for DaVinci Resolve's Camera 3D Fusion component based on raw camera dump.|
+|sar_cam_path_getkfs|cmd|sar_cam_path_getkfs - exports commands for recreating currently made camera path|
+|sar_cam_path_goto|cmd|sar_cam_path_goto \ [skipto] - sends the camera to a specified frame of the camera path. If skipto is 1, goto the tick in the demo.|
+|sar_cam_path_interp|2|Sets interpolation type between keyframes for cinematic camera.
0 = Linear interpolation
1 = Cubic spline
2 = Piecewise Cubic Hermite Interpolating Polynomial (PCHIP)|
+|sar_cam_path_remkf|cmd|sar_cam_path_remkf \ - removes camera path keyframe at specified frame|
+|sar_cam_path_remkfs|cmd|sar_cam_path_remkfs - removes all camera path keyframes|
+|sar_cam_path_setkf|cmd|sar_cam_path_setkf [frame] [x] [y] [z] [pitch] [yaw] [roll] [fov] - sets the camera path keyframe|
+|sar_cam_path_showkf|cmd|sar_cam_path_showkf \ - display information about camera path keyframe at specified frame|
+|sar_cam_reset|cmd|sar_cam_reset - resets camera to its default position|
+|sar_cam_setang|cmd|sar_cam_setang \ \ [roll] - sets camera angle (requires camera Drive Mode)|
+|sar_cam_setfov|cmd|sar_cam_setfov \ - sets camera field of view (requires camera Drive Mode)|
+|sar_cam_setpos|cmd|sar_cam_setpos \ \ \ - sets camera position (requires camera Drive Mode)|
+|sar_cfg_message|cmd|sar_cfg_message \ - sends a config message to the other player in coop|
+|sar_challenge_autostop|0|Automatically stops recording demos when the leaderboard opens after a CM run. If 2, automatically appends the run time to the demo name.|
+|sar_challenge_autosubmit_reload_api_key|cmd|sar_challenge_autosubmit_reload_api_key - reload the board.portal2.sr API key from its file.|
+|sar_chat|cmd|sar_chat - open the chat HUD|
+|sar_cheat_hud|1|Display a warning in the HUD when cheats are active. 0 = disable, 1 = display if sv_cheats off, 2 = display always|
+|sar_cheat_hud_x|-4|X position of the cheat warning HUD.|
+|sar_cheat_hud_y|4|Y position of the cheat warning HUD.|
+|sar_check_update|cmd|sar_check_update [release\|pre\|canary] - check whether the latest version of SAR is being used|
+|sar_clear_lines|cmd|sar_clear_lines - clears all active drawline overlays|
+|sar_cm_rightwarp|0|Fix CM wrongwarp.|
+|sar_command_debug|0|Output debugging information to the console related to commands. **Breaks svar_capture**|
+|sar_con_filter|0|Enable the console filter|
+|sar_con_filter_allow|cmd|sar_con_filter_allow \ [end] - add an allow rule to the console filter, allowing until 'end' is matched|
+|sar_con_filter_block|cmd|sar_con_filter_block \ [end] - add a disallow rule to the console filter, blocking until 'end' is matched|
+|sar_con_filter_debug|cmd|sar_con_filter_debug - print the console filter rule list|
+|sar_con_filter_default|0|Whether to allow text through the console filter by default|
+|sar_con_filter_reset|cmd|sar_con_filter_reset - clear the console filter rule list|
+|sar_con_filter_suppress_blank_lines|0|Whether to suppress blank lines in console|
+|sar_coop_reset_progress|cmd|sar_coop_reset_progress - resets all coop progress|
+|sar_cps_add|cmd|sar_cps_add - saves current time of timer|
+|sar_cps_clear|cmd|sar_cps_clear - resets saved times of timer|
+|sar_cps_result|cmd|sar_cps_result - prints result of timer checkpoints|
+|sar_crosshair_mode|0|Set the crosshair mode :
0: Default crosshair
1: Customizable crosshair
2: Crosshair from .png|
+|sar_crosshair_P1|0|Use the P1 crosshair style.|
+|sar_crosshair_set_texture|cmd|sar_crosshair_set_texture \|
+|sar_cvarlist|cmd|sar_cvarlist - lists all SAR cvars and unlocked engine cvars|
+|sar_cvars_dump|cmd|sar_cvars_dump [all\|game\|sar] - dumps all cvars to a file|
+|sar_cvars_dump_doc|cmd|sar_cvars_dump_doc - dumps all SAR cvars to a file|
+|sar_cvars_lock|cmd|sar_cvars_lock - restores default flags of unlocked cvars|
+|sar_cvars_unlock|cmd|sar_cvars_unlock - unlocks all special cvars|
+|sar_debug_listener|0|Prints event data of registered listener.|
+|sar_debug_step_slope_boost|0|Debugs step slope boosts|
+|sar_delete_alias_cmds|cmd|sar_delete_alias_cmds - deletes all alias commands|
+|sar_demo_blacklist|0|Stop a set of commands from being run by demo playback.|
+|sar_demo_blacklist_addcmd|cmd|sar_demo_blacklist_addcmd \ - add a command to the demo blacklist|
+|sar_demo_blacklist_all|0|Stop all commands from being run by demo playback.|
+|sar_demo_overwrite_bak|0|Rename demos to (name)_bak if they would be overwritten by recording|
+|sar_demo_portal_interp_fix|1|Fix eye interpolation through portals in demo playback.|
+|sar_demo_remove_broken|1|Whether to remove broken frames from demo playback|
+|sar_demo_replay|cmd|sar_demo_replay - play the last recorded or played demo|
+|sar_disable_challenge_stats_hud|0|Disables opening the challenge mode stats HUD. Greater than 1 specifies a custom amount of ticks to leave leaderboard open. -1 closes instantly.|
+|sar_disable_challenge_stats_hud_partner|1|Closes the challenge mode stats HUD after your coop partner does.|
+|sar_disable_coop_score_hud|0|Disables the coop score HUD which appears in demo playback.|
+|sar_disable_no_focus_sleep|0|Does not yield the CPU when game is not focused.|
+|sar_disable_progress_bar_update|0|Disables excessive usage of progress bar.|
+|sar_disable_save_status_hud|0|Disables the saving/saved HUD which appears when you make a save.|
+|sar_disable_steam_pause|0|Prevents pauses from steam overlay.|
+|sar_disable_viewmodel_shadows|0|Disables the shadows on the viewmodel.|
+|sar_disable_weapon_sway|0|Disables the viewmodel lagging behind.|
+|sar_discord_rpc_app_id|1084419823737524294|Defines Discord Rich Presence's application ID.|
+|sar_discord_rpc_enabled|0|Enables Discord Rich Presence integration.|
+|sar_dpi_scale|1|Fraction to scale mouse DPI down by.|
+|sar_drawline|cmd|sar_drawline \ \ \ \ \ \ [r] [g] [b] - overlay a line in the world|
+|sar_drawline_clear|cmd|sar_drawline_clear - clear all active sar_drawlines|
+|sar_duckjump|0|Allows duck-jumping even when fully crouched, similar to prevent_crouch_jump.|
+|sar_dump_client_classes|cmd|sar_dump_client_classes - dumps all client classes to a file|
+|sar_dump_client_datamap|cmd|sar_dump_client_datamap - dumps client datamap to a file|
+|sar_dump_events|cmd|sar_dump_events - dumps all registered game events of the game event manager|
+|sar_dump_server_classes|cmd|sar_dump_server_classes - dumps all server classes to a file|
+|sar_dump_server_datamap|cmd|sar_dump_server_datamap - dumps server datamap to a file|
+|sar_echo|cmd|sar_echo \ \ - echo a string to console with a given color|
+|sar_echo_nolf|cmd|sar_echo_nolf \ \ - echo a string to console with a given color and no trailing line feed|
+|sar_ei_hud|0|Draws entity inspection data.|
+|sar_ei_hud_font_color|255 255 255 255|RGBA font color of entity inspection HUD when not recording.|
+|sar_ei_hud_font_color2|153 23 9 255|RGBA font color of entity inspection HUD when recording.|
+|sar_ei_hud_font_index|1|Font index of entity inspection HUD.|
+|sar_ei_hud_x|0|X offset of entity inspection HUD.|
+|sar_ei_hud_y|0|Y offset of entity inspection HUD.|
+|sar_ei_hud_z|0|Z offset of entity inspection HUD.|
+|sar_ent_info|cmd|sar_ent_info [selector] - show info about the entity under the crosshair or with the given name|
+|sar_ent_slot_serial|cmd|sar_ent_slot_serial \ [value] - prints entity slot serial number, or sets it if additional parameter is specified.
Banned in most categories, check with the rules before use!|
+|sar_exit|cmd|sar_exit - removes all function hooks, registered commands and unloads the module|
+|sar_expand|cmd|sar_expand [cmd]... - run a command after expanding svar substitutions|
+|sar_export_stats|cmd|sar_export_stats \ - export the stats to the specified path in a .csv file|
+|sar_fast_load_preset|cmd|sar_fast_load_preset \ - sets all loading fixes to preset values|
+|sar_fcps_anim_start|cmd|sar_fcps_anim_start \ - start animating the ID'th FCPS call.|
+|sar_fcps_anim_step|cmd|sar_fcps_anim_step - step the FCPS animation forward.|
+|sar_fcps_autostep|0|Time between automatic steps of FCPS animation. 0 to disable automatic stepping.|
+|sar_fcps_clear|cmd|sar_fcps_clear - clear the FCPS event history.|
+|sar_fcps_override|0|Override FCPS for tracing results.|
+|sar_find_client_class|cmd|sar_find_client_class \ - finds specific client class tables and props with their offset|
+|sar_find_ents|cmd|sar_find_ents \ - finds entities in the entity list by class name|
+|sar_find_server_class|cmd|sar_find_server_class \ - finds specific server class tables and props with their offset|
+|sar_fix_reloaded_cheats|1|Overrides map execution of specific console commands in Reloaded in order to separate map usage from player usage for these commands.|
+|sar_fix_viewmodel_bug|0|Fixes the viewmodel seemingly randomly disappearing.|
+|sar_font_get_name|cmd|sar_font_get_name \ - gets the name of a font from its index|
+|sar_font_list|cmd|sar_font_list - lists all available fonts|
+|sar_force_fov|cmd|sar_force_fov \ - forces player FOV|
+|sar_force_qc|0|When ducking, forces view offset to always be at standing height. Requires sv_cheats to work.|
+|sar_force_viewmodel_fov|cmd|sar_force_viewmodel_fov \ - forces viewmodel FOV|
+|sar_frametime_debug|0|Output debugging information to the console related to frametime.|
+|sar_frametime_uncap|0|EXPERIMENTAL - USE AT OWN RISK. Removes the 10-1000 FPS cap on frametime. More info https://wiki.portal2.sr/Frametime|
+|sar_function|cmd|sar_function \ [command] [args]... - create a function, replacing $1, $2 etc in the command string with the respective argument, and more. If no command is specified, prints the given function|
+|sar_function_run|cmd|sar_function_run \ [args]... - run a function with the given arguments|
+|sar_get_partner_id|cmd|sar_get_partner_id - Prints your coop partner's steam id|
+|sar_geteyepos|cmd|sar_geteyepos [slot] - get the view position (portal shooting origin) and view angles of a certain player.|
+|sar_getpos|cmd|sar_getpos [slot] [server\|client] - get the absolute origin and angles of a particular player from either the server or client. Defaults to slot 0 and server.|
+|sar_give_betsrighter|cmd|sar_give_betsrighter [n] - gives the player in slot n (0 by default) betsrighter.|
+|sar_give_fly|cmd|sar_give_fly [n] - gives the player in slot n (0 by default) preserved crouchfly.|
+|sar_groundframes_reset|cmd|sar_groundframes_reset - reset recorded groundframe statistics.|
+|sar_groundframes_total|cmd|sar_groundframes_total [slot] - output a summary of groundframe counts for the given player slot.|
+|sar_hud_angles|0|Draws absolute view angles of the client.
0 = Default,
1 = XY,
2 = XYZ.|
+|sar_hud_avg|0|Draws calculated average of timer.|
+|sar_hud_bg|0|Enable the SAR HUD background.|
+|sar_hud_cps|0|Draws latest checkpoint of timer.|
+|sar_hud_demo|0|Draws name, tick and time of current demo.|
+|sar_hud_duckstate|0|Draw the state of player ducking.
1 - shows either ducked or standing state
2 - shows detailed report (requires sv_cheats)|
+|sar_hud_ent_slot_serial|0|Draw the serial number of given entity slot.|
+|sar_hud_eyeoffset|0|Draws player's eye offset.
0 = Default,
1 = eye offset including precision error,
2 = raw eye offset.|
+|sar_hud_font_color|255 255 255 255|RGBA font color of HUD.|
+|sar_hud_font_index|0|Font index of HUD.|
+|sar_hud_fps|0|Show fps (frames per second) on the SAR hud.
1 - Show fps
2 - Show fps with fps cap|
+|sar_hud_frame|0|Draws current frame count.|
+|sar_hud_ghost_spec|0|Show the name of the ghost you're currently spectating.|
+|sar_hud_grounded|0|Draws the state of player being on ground.|
+|sar_hud_groundframes|0|Draws the number of ground frames since last landing. Setting it to 2 preserves the value.|
+|sar_hud_groundspeed|0|Draw the speed of the player upon leaving the ground.|
+|sar_hud_hide_text|cmd|sar_hud_hide_text \ - hides the nth text value in the HUD|
+|sar_hud_inspection|0|Draws entity inspection data.|
+|sar_hud_jump|0|Draws current jump distance.|
+|sar_hud_jump_peak|0|Draws longest jump distance.|
+|sar_hud_jumps|0|Draws total jump count.|
+|sar_hud_last_frame|0|Draws last saved frame value.|
+|sar_hud_last_session|0|Draws value of latest completed session.|
+|sar_hud_orange_only|0|Only display the SAR HUD for orange, for solo coop (fullscreen PIP).|
+|sar_hud_order_bottom|cmd|sar_hud_order_bottom \ - orders hud element to bottom|
+|sar_hud_order_reset|cmd|sar_hud_order_reset - resets order of hud elements|
+|sar_hud_order_top|cmd|sar_hud_order_top \ - orders hud element to top|
+|sar_hud_pause_timer|0|Draws current value of pause timer.|
+|sar_hud_portal_angles|0|Draw the camera angles of the last primary portal shot.|
+|sar_hud_portal_angles_2|0|Draw the camera angles of the last secondary portal shot.|
+|sar_hud_portals|0|Draws total portal count.|
+|sar_hud_position|0|Draws absolute position of the client.
0 = Default,
1 = Player position,
2 = Camera (shoot) position.|
+|sar_hud_precision|2|Precision of HUD numbers.|
+|sar_hud_rainbow|-1|Enables the rainbow HUD mode. -1 = default, 0 = disable, 1 = enable.|
+|sar_hud_session|0|Draws current session tick.|
+|sar_hud_set_text|cmd|sar_hud_set_text \ \... - sets and shows the nth text value in the HUD|
+|sar_hud_set_text_color|cmd|sar_hud_set_text_color \ [color] - sets the color of the nth text value in the HUD. Reset by not giving color.|
+|sar_hud_show_text|cmd|sar_hud_show_text \ - shows the nth text value in the HUD|
+|sar_hud_spacing|1|Spacing between elements of HUD.|
+|sar_hud_steps|0|Draws total step count.|
+|sar_hud_strafesync_color|0 150 250 255|RGBA font color of strafesync HUD.|
+|sar_hud_strafesync_font_index|1|Font index of strafesync HUD.|
+|sar_hud_strafesync_offset_x|0|X offset of strafesync HUD.|
+|sar_hud_strafesync_offset_y|1000|Y offset of strafesync HUD.|
+|sar_hud_strafesync_split_offset_y|1050|Y offset of strafesync HUD.|
+|sar_hud_sum|0|Draws summary value of sessions.|
+|sar_hud_tastick|0|Draws current TAS playback tick.|
+|sar_hud_tbeam|0|Draw the name of the funnel player is currently in (requires sv_cheats).|
+|sar_hud_tbeam_count|0|Draw the player's funnel count (requires sv_cheats).|
+|sar_hud_timer|0|Draws current value of timer.|
+|sar_hud_toggle_text|cmd|sar_hud_toggle_text \ - toggles the nth text value in the HUD|
+|sar_hud_trace|0|Draws info about current trace bbox tick.|
+|sar_hud_velang|0|Draw the angle of the player's horizontal velocity vector.|
+|sar_hud_velocity|0|Draws velocity of the client.
0 = Default,
1 = X, Y, Z
2 = X:Y
3 = X:Y, Z
4 = X:Y:Z
5 = X, Y, X:Y, Z|
+|sar_hud_velocity_peak|0|Draws last saved velocity peak.|
+|sar_hud_velocity_precision|2|Precision of velocity HUD numbers.|
+|sar_hud_x|2|X padding of HUD.|
+|sar_hud_y|2|Y padding of HUD.|
+|sar_ihud|0|Enables or disables movement inputs HUD of client.|
+|sar_ihud_add_key|cmd|sar_ihud_add_key \|
+|sar_ihud_analog_image_scale|0.6|Scale of analog input images against max extent.|
+|sar_ihud_analog_view_deshake|0|Try to eliminate small fluctuations in the movement analog.|
+|sar_ihud_clear_background|cmd|sar_ihud_clear_background|
+|sar_ihud_grid_padding|2|Padding between grid squares of input HUD.|
+|sar_ihud_grid_size|60|Grid square size of input HUD.|
+|sar_ihud_modify|cmd|sar_ihud_modify \ [param=value]... - modifies parameters in given element.
Params: enabled, text, pos, x, y, width, height, font, background, highlight, textcolor, texthighlight, image, highlightimage, minhold.|
+|sar_ihud_preset|cmd|sar_ihud_preset \ - modifies input hud based on given preset|
+|sar_ihud_set_background|cmd|sar_ihud_set_background \ \ \ \ \|
+|sar_ihud_setpos|cmd|sar_ihud_setpos \ \ - automatically sets the position of input HUD.|
+|sar_ihud_x|2|X position of input HUD.|
+|sar_ihud_y|2|Y position of input HUD.|
+|sar_import_stats|cmd|sar_import_stats \ - import the stats from the specified .csv file|
+|sar_inspection_export|cmd|sar_inspection_export \ - saves recorded entity data to a csv file|
+|sar_inspection_index|cmd|sar_inspection_index - sets entity index for inspection|
+|sar_inspection_print|cmd|sar_inspection_print - prints recorded entity data|
+|sar_inspection_save_every_tick|0|Saves inspection data even when session tick does not increment.|
+|sar_inspection_start|cmd|sar_inspection_start - starts recording entity data|
+|sar_inspection_stop|cmd|sar_inspection_stop - stops recording entity data|
+|sar_jumpboost|0|Enables special game movement on the server.
0 = Default,
1 = Orange Box Engine,
2 = Pre-OBE.|
+|sar_list_client_classes|cmd|sar_list_client_classes - lists all client classes|
+|sar_list_ents|cmd|sar_list_ents - lists entities|
+|sar_list_server_classes|cmd|sar_list_server_classes - lists all server classes|
+|sar_load_delay|0|Delay for this number of milliseconds at the end of a load.|
+|sar_loads_norender|0|Temporarily set mat_norendering to 1 during loads|
+|sar_loads_uncap|0|Temporarily set fps_max to 0 during loads|
+|sar_lphud|0|Enables or disables the portals display on screen.|
+|sar_lphud_font|92|Change font of portal counter.|
+|sar_lphud_reset|cmd|sar_lphud_reset - resets lp counter|
+|sar_lphud_reset_on_changelevel|0|Reset the lp counter on any changelevel or restart_level. Useful for ILs.|
+|sar_lphud_set|cmd|sar_lphud_set \ - sets lp counter to given number|
+|sar_lphud_setpos|cmd|sar_lphud_setpos \ \ - automatically sets the position of least portals HUD.|
+|sar_lphud_x|-10|x pos of lp counter.|
+|sar_lphud_y|-10|y pos of lp counter.|
+|sar_minimap_load|cmd|sar_minimap_load \ - load a minimap from a JSON file.|
+|sar_minimap_max_height|1000|The maximum height of the minimap.|
+|sar_minimap_max_width|500|The maximum width of the minimap.|
+|sar_minimap_player_color|255 0 0 255|The color of the circle representing the player on the minimap.|
+|sar_minimap_x|-10|The X position of the minimap.|
+|sar_minimap_y|10|The Y position of the minimap.|
+|sar_mtrigger_legacy|0||
+|sar_mtrigger_legacy_format|!seg -> !tt (!st)|Formatting of the text that is displayed in the chat (!map - for map name, !seg - for segment name, !tt - for total time, !st - for split time).|
+|sar_mtrigger_legacy_textcolor|255 176 0|The color of the text that is displayed in the chat.|
+|sar_netmessage_debug|0|Debug NetMessages.|
+|sar_nextdemo|cmd|sar_nextdemo - plays the next demo in demo queue|
+|sar_on_cfg_message|cmd|sar_on_cfg_message \ [args]... - registers a command to be run when partner sends a custom message (_sar_cfg_message svar)|
+|sar_on_cfg_message_clear|cmd|sar_on_cfg_message_clear - clears commands registered on event "cfg_message"|
+|sar_on_cfg_message_list|cmd|sar_on_cfg_message_list - lists commands registered on event "cfg_message"|
+|sar_on_config_exec|cmd|sar_on_config_exec \ [args]... - registers a command to be run on config.cfg exec|
+|sar_on_config_exec_clear|cmd|sar_on_config_exec_clear - clears commands registered on event "config_exec"|
+|sar_on_config_exec_list|cmd|sar_on_config_exec_list - lists commands registered on event "config_exec"|
+|sar_on_coop_reset_done|cmd|sar_on_coop_reset_done \ [args]... - registers a command to be run when coop reset is completed|
+|sar_on_coop_reset_done_clear|cmd|sar_on_coop_reset_done_clear - clears commands registered on event "coop_reset_done"|
+|sar_on_coop_reset_done_list|cmd|sar_on_coop_reset_done_list - lists commands registered on event "coop_reset_done"|
+|sar_on_coop_reset_remote|cmd|sar_on_coop_reset_remote \ [args]... - registers a command to be run when coop reset run remotely|
+|sar_on_coop_reset_remote_clear|cmd|sar_on_coop_reset_remote_clear - clears commands registered on event "coop_reset_remote"|
+|sar_on_coop_reset_remote_list|cmd|sar_on_coop_reset_remote_list - lists commands registered on event "coop_reset_remote"|
+|sar_on_coop_spawn|cmd|sar_on_coop_spawn \ [args]... - registers a command to be run on coop spawn|
+|sar_on_coop_spawn_clear|cmd|sar_on_coop_spawn_clear - clears commands registered on event "coop_spawn"|
+|sar_on_coop_spawn_list|cmd|sar_on_coop_spawn_list - lists commands registered on event "coop_spawn"|
+|sar_on_demo_start|cmd|sar_on_demo_start \ [args]... - registers a command to be run when demo playback starts|
+|sar_on_demo_start_clear|cmd|sar_on_demo_start_clear - clears commands registered on event "demo_start"|
+|sar_on_demo_start_list|cmd|sar_on_demo_start_list - lists commands registered on event "demo_start"|
+|sar_on_demo_stop|cmd|sar_on_demo_stop \ [args]... - registers a command to be run when demo playback stops|
+|sar_on_demo_stop_clear|cmd|sar_on_demo_stop_clear - clears commands registered on event "demo_stop"|
+|sar_on_demo_stop_list|cmd|sar_on_demo_stop_list - lists commands registered on event "demo_stop"|
+|sar_on_exit|cmd|sar_on_exit \ [args]... - registers a command to be run on game exit|
+|sar_on_exit_clear|cmd|sar_on_exit_clear - clears commands registered on event "exit"|
+|sar_on_exit_list|cmd|sar_on_exit_list - lists commands registered on event "exit"|
+|sar_on_flags|cmd|sar_on_flags \ [args]... - registers a command to be run when CM flags are hit|
+|sar_on_flags_clear|cmd|sar_on_flags_clear - clears commands registered on event "flags"|
+|sar_on_flags_list|cmd|sar_on_flags_list - lists commands registered on event "flags"|
+|sar_on_load|cmd|sar_on_load \ [args]... - registers a command to be run on session start|
+|sar_on_load_clear|cmd|sar_on_load_clear - clears commands registered on event "load"|
+|sar_on_load_list|cmd|sar_on_load_list - lists commands registered on event "load"|
+|sar_on_not_pb|cmd|sar_on_not_pb \ [args]... - registers a command to be run when auto-submitter detects not PB|
+|sar_on_not_pb_clear|cmd|sar_on_not_pb_clear - clears commands registered on event "not_pb"|
+|sar_on_not_pb_list|cmd|sar_on_not_pb_list - lists commands registered on event "not_pb"|
+|sar_on_pb|cmd|sar_on_pb \ [args]... - registers a command to be run when auto-submitter detects PB|
+|sar_on_pb_clear|cmd|sar_on_pb_clear - clears commands registered on event "pb"|
+|sar_on_pb_list|cmd|sar_on_pb_list - lists commands registered on event "pb"|
+|sar_on_renderer_finish|cmd|sar_on_renderer_finish \ [args]... - registers a command to be run when renderer finishes|
+|sar_on_renderer_finish_clear|cmd|sar_on_renderer_finish_clear - clears commands registered on event "renderer_finish"|
+|sar_on_renderer_finish_list|cmd|sar_on_renderer_finish_list - lists commands registered on event "renderer_finish"|
+|sar_on_renderer_start|cmd|sar_on_renderer_start \ [args]... - registers a command to be run when renderer starts|
+|sar_on_renderer_start_clear|cmd|sar_on_renderer_start_clear - clears commands registered on event "renderer_start"|
+|sar_on_renderer_start_list|cmd|sar_on_renderer_start_list - lists commands registered on event "renderer_start"|
+|sar_on_session_end|cmd|sar_on_session_end \ [args]... - registers a command to be run on session end|
+|sar_on_session_end_clear|cmd|sar_on_session_end_clear - clears commands registered on event "session_end"|
+|sar_on_session_end_list|cmd|sar_on_session_end_list - lists commands registered on event "session_end"|
+|sar_on_speedrun_finish|cmd|sar_on_speedrun_finish \ [args]... - registers a command to be run when a speedrun finishes|
+|sar_on_speedrun_finish_clear|cmd|sar_on_speedrun_finish_clear - clears commands registered on event "speedrun_finish"|
+|sar_on_speedrun_finish_list|cmd|sar_on_speedrun_finish_list - lists commands registered on event "speedrun_finish"|
+|sar_on_tas_end|cmd|sar_on_tas_end \ [args]... - registers a command to be run when TAS script playback ends|
+|sar_on_tas_end_clear|cmd|sar_on_tas_end_clear - clears commands registered on event "tas_end"|
+|sar_on_tas_end_list|cmd|sar_on_tas_end_list - lists commands registered on event "tas_end"|
+|sar_on_tas_start|cmd|sar_on_tas_start \ [args]... - registers a command to be run when TAS script playback starts|
+|sar_on_tas_start_clear|cmd|sar_on_tas_start_clear - clears commands registered on event "tas_start"|
+|sar_on_tas_start_list|cmd|sar_on_tas_start_list - lists commands registered on event "tas_start"|
+|sar_paint_reseed|cmd|sar_paint_reseed \ - re-seed all paint sprayers in the map to the given value (-9999 to 9999 inclusive)|
+|sar_patch_bhop|0|Patches bhop by limiting wish direction if your velocity is too high.|
+|sar_patch_cfg|0|Patches Crouch Flying Glitch.|
+|sar_patch_major_angle_decay|0|Patches major pitch angle decay. Requires cheats.|
+|sar_patch_minor_angle_decay|0|Patches minor pitch angle decay present on Windows version of the game.|
+|sar_patch_small_angle_decay|0|Patches small angle decay (not minor decay).|
+|sar_patch_viewcontrol|1|Disable camera controllers before changing levels to prevent visual glitches.|
+|sar_pause_at|-1|Pause at the specified tick. -1 to deactivate it.|
+|sar_pause_for|0|Pause for this amount of ticks.|
+|sar_performance_hud|0|Enables the performance HUD.
1 = normal,
2 = stats only.|
+|sar_performance_hud_clear|cmd|Clears the performance HUD data.|
+|sar_performance_hud_duration|60|How long (in frames) to measure performance for.|
+|sar_performance_hud_font_index|6|Font index of the performance HUD.|
+|sar_performance_hud_x|20|X position of the performance HUD.|
+|sar_performance_hud_y|300|Y position of the performance HUD.|
+|sar_pip_align|cmd|sar_pip_align \ \ - aligns the remote view.|
+|sar_placement_helper_hud|0|Visually displays all portal placement helpers (requires sv_cheats).|
+|sar_portalcolor_enable|0|Enable custom portal colors.|
+|sar_portalcolor_mp1_1|31 127 210|Portal color for Atlas (blue)'s left portal.|
+|sar_portalcolor_mp1_2|19 0 210|Portal color for Atlas (blue)'s right portal.|
+|sar_portalcolor_mp2_1|255 179 31|Portal color for P-Body (orange)'s left portal.|
+|sar_portalcolor_mp2_2|57 2 2|Portal color for P-Body (orange)'s right portal.|
+|sar_portalcolor_rainbow|0|Rainbow portals!|
+|sar_portalcolor_sp_1|64 160 255|Portal color for Chell's left portal.|
+|sar_portalcolor_sp_2|255 160 32|Portal color for Chell's right portal.|
+|sar_portalgun_hud|0|Enables the portalgun HUD.|
+|sar_portalgun_hud_x|5|The x position of the portalgun HUD.|
+|sar_portalgun_hud_y|5|The y position of the portalgun HUD.|
+|sar_portals_thru_portals|0|Allow firing portals through portals.|
+|sar_pp_hud|0|Enables or disables the portals placement HUD.|
+|sar_pp_hud_font|0|Change font of portal placement hud.|
+|sar_pp_hud_opacity|100|Opacity of portal previews.|
+|sar_pp_hud_show_blue|0|Enables or disables blue portal preview.|
+|sar_pp_hud_show_orange|0|Enables or disables orange portal preview.|
+|sar_pp_hud_x|5|x pos of portal placement hud.|
+|sar_pp_hud_y|5|y pos of portal placement hud.|
+|sar_pp_scan_reset|cmd|sar_pp_scan_reset - reset ppscan.|
+|sar_pp_scan_set|cmd|sar_pp_scan_set - set the ppscan point where you're aiming.|
+|sar_prevent_ehm|0|Prevents Entity Handle Misinterpretation (EHM) from happening.|
+|sar_prevent_mat_snapshot_recompute|0|Shortens loading times by preventing state snapshot recomputation.|
+|sar_print_stats|cmd|sar_print_stats - prints your statistics if those are loaded|
+|sar_quickhud_mode|0|Set the quickhud mode :
0: Default quickhud
1: Customizable quickhud
2: quickhud from .png|
+|sar_quickhud_set_texture|cmd|sar_quickhud_set_texture \ - enter the base name, it will search for \1.png, \2.png, \3.png and \4.png
ex: sar_quickhud_set_texture "crosshair/basic" looks for "crosshair/basic1.png", etc|
+|sar_record_at|-1|Start recording a demo at the tick specified. Will use sar_record_at_demo_name.|
+|sar_record_at_demo_name|chamber|Name of the demo automatically recorded.|
+|sar_record_at_increment|0|Increment automatically the demo name.|
+|sar_record_mkdir|1|Automatically create directories for demos if necessary.|
+|sar_record_prefix||A string to prepend to recorded demo names. Can include strftime format codes.|
+|sar_rename|cmd|sar_rename \ - changes your name|
+|sar_render_abitrate|160|Audio bitrate used in renders (kbit/s)|
+|sar_render_acodec|aac|Audio codec used in renders (aac, ac3, vorbis, opus, flac)|
+|sar_render_autostart|0|Whether to automatically start when demo playback begins|
+|sar_render_autostart_extension|mp4|The file extension (and hence container format) to use for automatically started renders.|
+|sar_render_autostop|1|Whether to automatically stop when `__END__` is seen in demo playback|
+|sar_render_blend|0|How many frames to blend for each output frame; 1 = do not blend, 0 = automatically determine based on host_framerate|
+|sar_render_blend_mode|1|What type of frameblending to use. 0 = linear, 1 = Gaussian|
+|sar_render_finish|cmd|sar_render_finish - stop rendering frames|
+|sar_render_fps|60|Render output FPS|
+|sar_render_merge|0|When set, merge all the renders until sar_render_finish is entered|
+|sar_render_quality|35|Render output quality, higher is better (50=lossless)|
+|sar_render_sample_rate|44100|Audio output sample rate|
+|sar_render_shutter_angle|360|The shutter angle to use for rendering in degrees.|
+|sar_render_skip_coop_videos|1|When set, don't include coop loading time in renders|
+|sar_render_start|cmd|sar_render_start \ - start rendering frames to the given video file|
+|sar_render_vbitrate|40000|Video bitrate used in renders (kbit/s)|
+|sar_render_vcodec|h264|Video codec used in renders (h264, hevc, vp8, vp9, dnxhd)|
+|sar_rhythmgame|0|Show a HUD indicating your groundframes as rhythm game like popups.|
+|sar_rng_load|cmd|sar_rng_load \ - load RNG seed data on next session start|
+|sar_rng_save|cmd|sar_rng_save \ - save RNG seed data to the specified file|
+|sar_ruler_add|cmd|sar_ruler_add \ \ \ \ \ \ - adds a ruler to a set of currently drawn rulers.|
+|sar_ruler_clear|cmd|sar_ruler_clear - clear all created rulers|
+|sar_ruler_creator|0|Enables or disables ruler creator
0 = Ruler creator disabled
1 = Point-to-point ruler creator
2 = Player-to-point ruler creator|
+|sar_ruler_creator_set|cmd|sar_ruler_creator_set - sets the point, progressing the ruler creation process.|
+|sar_ruler_draw|1|Sets the drawing mode of the ruler
0 = rulers are not drawn
1 = lines, length and angles are drawn (default)
2 = only lines and length are drawn
3 = only lines are drawn
4 = lines, deltas, angles and point origins are drawn|
+|sar_ruler_grid_align|1|Aligns ruler creation point to the grid of specified size.|
+|sar_ruler_max_trace_dist|16384|Sets maximum trace distance for placing ruler points.|
+|sar_scrollspeed|0|Show a HUD indicating your scroll speed for coop.
1 = bar and tiles,
2 = bar only,
3 = tiles only.|
+|sar_scrollspeed_bar_x|30|Scroll speed bar x offset.|
+|sar_scrollspeed_bar_y|210|Scroll speed bar y offset.|
+|sar_scrollspeed_x|0|Scroll speed HUD x offset.|
+|sar_scrollspeed_y|210|Scroll speed HUD y offset.|
+|sar_seamshot_finder|0|Enables or disables seamshot finder overlay.|
+|sar_session|cmd|sar_session - prints the current tick of the server since it has loaded|
+|sar_show_entinp|0|Print all entity inputs to console.|
+|sar_skiptodemo|cmd|sar_skiptodemo \ - skip demos in demo queue to this demo|
+|sar_speedrun_autoreset_clear|cmd|sar_speedrun_autoreset_clear - stop using the autoreset file|
+|sar_speedrun_autoreset_load|cmd|sar_speedrun_autoreset_load \ - load the given file of autoreset timestamps and use it while the speedrun timer is active|
+|sar_speedrun_autostop|0|Automatically stop recording demos when a speedrun finishes. If 2, automatically append the run time to the demo name.|
+|sar_speedrun_category|cmd|sar_speedrun_category [category] - get or set the speedrun category|
+|sar_speedrun_category_add_rule|cmd|sar_speedrun_category_add_rule \ \ - add a rule to a speedrun category|
+|sar_speedrun_category_create|cmd|sar_speedrun_category_create \ - create a new speedrun category with the given name|
+|sar_speedrun_category_remove|cmd|sar_speedrun_category_remove \ - delete the given speedrun category|
+|sar_speedrun_category_remove_rule|cmd|sar_speedrun_category_remove_rule \ \ - remove a rule from a speedrun category|
+|sar_speedrun_cc_finish|cmd|sar_speedrun_cc_finish - finish the category creator|
+|sar_speedrun_cc_place|cmd|sar_speedrun_cc_place - place a trigger-ey rule in the world|
+|sar_speedrun_cc_place_start|cmd|sar_speedrun_cc_place_start \ \ [options]... - start placing a trigger-ey rule in the world|
+|sar_speedrun_cc_rule|cmd|sar_speedrun_cc_rule \ \ [options]... - add a rule to the category currently being created|
+|sar_speedrun_cc_start|cmd|sar_speedrun_cc_start \ [default options]... - start the category creator|
+|sar_speedrun_draw_triggers|0|Draw the triggers associated with speedrun rules in the world.|
+|sar_speedrun_export|cmd|sar_speedrun_export \ - export the speedrun result to the specified CSV file|
+|sar_speedrun_export_all|cmd|sar_speedrun_export_all \ - export the results of many speedruns to the specified CSV file|
+|sar_speedrun_get_mtriggers|cmd|sar_speedrun_get_mtriggers \ - prints mtriggers of specific run.|
+|sar_speedrun_get_mtriggers_map|cmd|sar_speedrun_get_mtriggers_map \