Advertisement
AnitaOctavia

Dota 2 Advanced Spectator Controls by Anita

Nov 11th, 2013
615
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 7.92 KB | None | 0 0
  1. // Advanced spectator controls //
  2.  
  3. // by Anita (Octavia, u/iheartdisraptor)
  4. // Spectator controls in options will override these controls; if something doesn't work you must disable or change it in options.
  5. // This script belongs to the community. Feel free to extend and rerelease this script.
  6.  
  7. // Directions:
  8. // 1. Enable the Dota 2 console: http://www.hattongames.com/2012/03/how-to-enable-the-console-in-dota-2
  9. // 2. Add this script to  <Steam folder>/SteamApps/common/dota 2 beta/dota/cfg/autoexec.cfg.
  10. // 3. Restart Dota 2 or open the console and enter "exec autoexec.cfg".
  11. // 4. Review the key bindings below and change/disable in the UI options any spectator keys that conflict.
  12. // 5. Open a game in DotaTV or a replay and hit F7 to enable the controls.
  13.  
  14. // Known issues:
  15. // - Controls set in the UI options (top left corner) will override these controls and must be changed/disabled
  16. // - Controls do not work during the drafting phase (UI still works)
  17. // - When using free camera and disabled UI bindings sometimes cause the game to not accept key presses. You must restart Dota to fix this.
  18.  
  19. // Changelog:
  20. // 1.2, 13.11.13
  21. // - F6 additional display mode that shows minimap but disables the rest of the UI
  22. // 1.1, 13.11.12
  23. // - F6 also disables stats dropdown and replay panels
  24. // - F6 cycles between disabling replay UI, full UI, and none
  25. // 1.0, 13.11.11
  26. // - Initial version
  27.  
  28. // The following are the key bindings created by pressing F7 (defined below):
  29. // F7 : Enable advanced spectator controls
  30. // 1-5 : Select Radiant heroes
  31. // QWERTY : Select Dire heroes
  32. // ASDFK : Select camera mode (directed, free, hero chase, player perspective, and directed player perspective accordingly)
  33. // Z : Rewind 10 seconds
  34. // X : Decelerate replay speed
  35. // C : Accelerate replay speed
  36. // V : Restore replay speed to normal (1x)
  37. // G : Select hero under mouse
  38. // N : Normal camera distance (1134) (you may have to move the camera for this to take effect)
  39. // M : Far camera distance (you may have to move the camera for this to take effect)
  40. // < : Zoom camera in
  41. // > : Zoom camera out
  42. // / : Free camera mode (allows turning of the camera; use in conjunction with hero chase and camera zoom in/out)
  43. // L : Toggle shoulder view
  44. // P : Toggle autospeed (directed camera only)
  45. // F6 : Toggle UI display
  46. // space : Pause
  47. // backspace : Clear chat (useful when seeking since replays tend to output all chat when seeking)
  48.  
  49. // Clear chat (useful when seeking through replays since all chat tends to display itself in its entirety)
  50. bind "backspace" "chat_clear"
  51.  
  52. // Enable spectator mode (special spectator commands listed above) with F7
  53. // If you use this in a normal game, you will have to disconnect/reconnect to fix your controls.
  54. bind F7 "spectator_enable"
  55.  
  56. // Enable/disable the UI (credits to Cyborgmatt)
  57. bind "F6" "ui_mode"
  58.  
  59. // Aliases used for implementing advanced spectator controls. See above.
  60.  
  61. 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"
  62.  
  63. // 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)
  64. // 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)
  65. alias "ui_mode" "ui_noreplay"
  66. 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"
  67. 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"
  68. 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"
  69. 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"
  70. 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"
  71.  
  72. alias "dota_free_camera0" "echo Free camera disabled; dota_free_camera 0; dota_hud_healthbars 1; bind / dota_free_camera1"
  73. alias "dota_free_camera1" "echo Free camera enabled; dota_free_camera 1; dota_hud_healthbars 0; bind / dota_free_camera0"
  74. alias "spectator_zoom_out" "echo Zooming out by 200 units; sv_cheats 1; incrementvar dota_camera_distance 134 6134 200"
  75. alias "spectator_zoom_in" "echo Zooming in by 200 units; sv_cheats 1; incrementvar dota_camera_distance 134 6134 -200"
  76. alias "dota_spectator_hero_index0" "echo Selecting hero Radiant blue; dota_spectator_hero_index 0"
  77. alias "dota_spectator_hero_index1" "echo Selecting hero Radiant teal; dota_spectator_hero_index 1"
  78. alias "dota_spectator_hero_index2" "echo Selecting hero Radiant purple; dota_spectator_hero_index 2"
  79. alias "dota_spectator_hero_index3" "echo Selecting hero Radiant yellow; dota_spectator_hero_index 3"
  80. alias "dota_spectator_hero_index4" "echo Selecting hero Radiant orange; dota_spectator_hero_index 4"
  81. alias "dota_spectator_hero_index5" "echo Selecting hero Dire pink; dota_spectator_hero_index 5"
  82. alias "dota_spectator_hero_index6" "echo Selecting hero Dire dark yellow; dota_spectator_hero_index 6"
  83. alias "dota_spectator_hero_index7" "echo Selecting hero Dire light blue; dota_spectator_hero_index 7"
  84. alias "dota_spectator_hero_index8" "echo Selecting hero Dire dark green; dota_spectator_hero_index 8"
  85. alias "dota_spectator_hero_index9" "echo Selecting hero Dire brown; dota_spectator_hero_index 9"
  86. alias "dota_spectator_mode0" "echo Using directed camera; dota_spectator_mode 0"
  87. alias "dota_spectator_mode1" "echo Using free camera; dota_spectator_mode 1"
  88. alias "dota_spectator_mode2" "echo Using hero chase; dota_spectator_mode 2"
  89. alias "dota_spectator_mode3" "echo Using player perspective; dota_spectator_mode 3; dota_spectator_directed_player_perspective 0"
  90. alias "dota_spectator_mode4" "echo Using directed player perspective; dota_spectator_mode 3; dota_spectator_directed_player_perspective 1"
  91. 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"
  92. 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"
  93. alias "dota_spectator_autospeed_toggle" "echo Toggling directed autospeed; toggle dota_spectator_autospeed 0 1; dota_spectator_resetreplayspeed"
  94. 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