Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Advanced spectator controls //
- // by Anita (Octavia, u/iheartdisraptor)
- // Spectator controls in options will override these controls; if something doesn't work you must disable or change it in options.
- // This script belongs to the community. Feel free to extend and rerelease this script.
- // Directions:
- // 1. Enable the Dota 2 console: http://www.hattongames.com/2012/03/how-to-enable-the-console-in-dota-2
- // 2. Add this script to <Steam folder>/SteamApps/common/dota 2 beta/dota/cfg/autoexec.cfg.
- // 3. Restart Dota 2 or open the console and enter "exec autoexec.cfg".
- // 4. Review the key bindings below and change/disable in the UI options any spectator keys that conflict.
- // 5. Open a game in DotaTV or a replay and hit F7 to enable the controls.
- // Known issues:
- // - Controls set in the UI options (top left corner) will override these controls and must be changed/disabled
- // - Controls do not work during the drafting phase (UI still works)
- // - When using free camera and disabled UI bindings sometimes cause the game to not accept key presses. You must restart Dota to fix this.
- // Changelog:
- // 1.2, 13.11.13
- // - F6 additional display mode that shows minimap but disables the rest of the UI
- // 1.1, 13.11.12
- // - F6 also disables stats dropdown and replay panels
- // - F6 cycles between disabling replay UI, full UI, and none
- // 1.0, 13.11.11
- // - Initial version
- // The following are the key bindings created by pressing F7 (defined below):
- // F7 : Enable advanced spectator controls
- // 1-5 : Select Radiant heroes
- // QWERTY : Select Dire heroes
- // ASDFK : Select camera mode (directed, free, hero chase, player perspective, and directed player perspective accordingly)
- // Z : Rewind 10 seconds
- // X : Decelerate replay speed
- // C : Accelerate replay speed
- // V : Restore replay speed to normal (1x)
- // G : Select hero under mouse
- // N : Normal camera distance (1134) (you may have to move the camera for this to take effect)
- // M : Far camera distance (you may have to move the camera for this to take effect)
- // < : Zoom camera in
- // > : Zoom camera out
- // / : Free camera mode (allows turning of the camera; use in conjunction with hero chase and camera zoom in/out)
- // L : Toggle shoulder view
- // P : Toggle autospeed (directed camera only)
- // F6 : Toggle UI display
- // space : Pause
- // backspace : Clear chat (useful when seeking since replays tend to output all chat when seeking)
- // Clear chat (useful when seeking through replays since all chat tends to display itself in its entirety)
- bind "backspace" "chat_clear"
- // Enable spectator mode (special spectator commands listed above) with F7
- // If you use this in a normal game, you will have to disconnect/reconnect to fix your controls.
- bind F7 "spectator_enable"
- // Enable/disable the UI (credits to Cyborgmatt)
- bind "F6" "ui_mode"
- // Aliases used for implementing advanced spectator controls. See above.
- alias "spectator_enable" "developer 1; echo Enabling advanced spectator controls; say_team Enabling advanced spectator controls. Warning: You must disconnect/reconnect to undo this.; spectator_bind_heroes; spectator_bind_modes; spectator_bind_controls"
- // For 1080p, render_crop_height should be 166 and render_y_inset or else restoring the UI will not work quite right (you can change this below)
- // For 1200p, render_crop_height should be 148 and render_y_inset or else restoring the UI will not work quite right (you can change this below)
- alias "ui_mode" "ui_noreplay"
- alias "ui_noreplay" "echo Disabling replay UI; developer 0; dota_sf_hud_stats_dropdown 0; dota_sf_hud_force_spec -1; alias ui_mode ui_none"
- alias "ui_none" "echo Disabling UI; sv_cheats 1; dota_sf_hud_stats_dropdown 0; dota_sf_hud_force_spec -1; dota_sf_hud_actionpanel 0; dota_sf_hud_channelbar 0; dota_sf_hud_chat 0; dota_sf_hud_inventory 0; dota_sf_hud_top 0; dota_hud_healthbars 0; dota_no_minimap 1; cl_drawhud 0; dota_render_crop_height 0; dota_render_y_inset 0; developer 0; net_graph 0; alias ui_mode ui_full"
- alias "ui_full" "echo Enabling UI; sv_cheats 1; dota_sf_hud_stats_dropdown -1; dota_sf_hud_force_spec 0; dota_sf_hud_actionpanel 1; dota_sf_hud_channelbar 1; dota_sf_hud_chat 1; dota_sf_hud_inventory 1; dota_sf_hud_top 1; dota_hud_healthbars 1; dota_no_minimap 0; cl_drawhud 1; dota_render_crop_height 148; dota_render_y_inset 31; alias ui_mode ui_noreplay"alias "spectator_bind_heroes" "bind 1 dota_spectator_hero_index0; bind 2 dota_spectator_hero_index1; bind 3 dota_spectator_hero_index2; bind 4 dota_spectator_hero_index3; bind 5 dota_spectator_hero_index4; bind q dota_spectator_hero_index5; bind w dota_spectator_hero_index6; bind e dota_spectator_hero_index7; bind r dota_spectator_hero_index8; bind t dota_spectator_hero_index9"
- alias "spectator_bind_modes" "bind a dota_spectator_mode0; bind s dota_spectator_mode1; bind d dota_spectator_mode2; bind f dota_spectator_mode3; bind k dota_spectator_mode4; bind l dota_spectator_shoulder_toggle; bind p dota_spectator_autospeed_toggle"
- alias "spectator_bind_controls" "bind z dota_spectator_rewind; bind x dota_spectator_decreasereplayspeed; bind c dota_spectator_increasereplayspeed; bind v dota_spectator_resetreplayspeed; bind space dota_spectator_pausetoggle; bind n dota_camera_distance_normal; bind m dota_camera_distance_far; bind , spectator_zoom_in; bind . spectator_zoom_out; bind / dota_free_camera1; bind g dota_spectator_select_under_mouse"
- alias "dota_free_camera0" "echo Free camera disabled; dota_free_camera 0; dota_hud_healthbars 1; bind / dota_free_camera1"
- alias "dota_free_camera1" "echo Free camera enabled; dota_free_camera 1; dota_hud_healthbars 0; bind / dota_free_camera0"
- alias "spectator_zoom_out" "echo Zooming out by 200 units; sv_cheats 1; incrementvar dota_camera_distance 134 6134 200"
- alias "spectator_zoom_in" "echo Zooming in by 200 units; sv_cheats 1; incrementvar dota_camera_distance 134 6134 -200"
- alias "dota_spectator_hero_index0" "echo Selecting hero Radiant blue; dota_spectator_hero_index 0"
- alias "dota_spectator_hero_index1" "echo Selecting hero Radiant teal; dota_spectator_hero_index 1"
- alias "dota_spectator_hero_index2" "echo Selecting hero Radiant purple; dota_spectator_hero_index 2"
- alias "dota_spectator_hero_index3" "echo Selecting hero Radiant yellow; dota_spectator_hero_index 3"
- alias "dota_spectator_hero_index4" "echo Selecting hero Radiant orange; dota_spectator_hero_index 4"
- alias "dota_spectator_hero_index5" "echo Selecting hero Dire pink; dota_spectator_hero_index 5"
- alias "dota_spectator_hero_index6" "echo Selecting hero Dire dark yellow; dota_spectator_hero_index 6"
- alias "dota_spectator_hero_index7" "echo Selecting hero Dire light blue; dota_spectator_hero_index 7"
- alias "dota_spectator_hero_index8" "echo Selecting hero Dire dark green; dota_spectator_hero_index 8"
- alias "dota_spectator_hero_index9" "echo Selecting hero Dire brown; dota_spectator_hero_index 9"
- alias "dota_spectator_mode0" "echo Using directed camera; dota_spectator_mode 0"
- alias "dota_spectator_mode1" "echo Using free camera; dota_spectator_mode 1"
- alias "dota_spectator_mode2" "echo Using hero chase; dota_spectator_mode 2"
- alias "dota_spectator_mode3" "echo Using player perspective; dota_spectator_mode 3; dota_spectator_directed_player_perspective 0"
- alias "dota_spectator_mode4" "echo Using directed player perspective; dota_spectator_mode 3; dota_spectator_directed_player_perspective 1"
- alias "dota_camera_distance_normal" "echo Setting normal camera distance; dota_camera_distance 1134 +dota_camera_follow; -dota_camera_follow; +dota_camera_follow; -dota_camera_follow"
- alias "dota_camera_distance_far" "echo Setting far camera distance; dota_camera_distance 1900; +dota_camera_follow; -dota_camera_follow; +dota_camera_follow; -dota_camera_follow"
- alias "dota_spectator_autospeed_toggle" "echo Toggling directed autospeed; toggle dota_spectator_autospeed 0 1; dota_spectator_resetreplayspeed"
- alias "dota_spectator_shoulder_toggle" "echo Toggling directed shoulder view; toggle dota_spectator_shoulder_view 0 1"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement