Vote controller: Difference between revisions
Jump to navigation
Jump to search
Warning:Killing this entity may crash the game.
(-removed irrelevant info) |
No edit summary |
||
(25 intermediate revisions by 6 users not shown) | |||
Line 1: | Line 1: | ||
{{stub}} | {{stub}} | ||
{{ | {{Ent not in fgd|codeonly=1}} | ||
{{code | {{Preserved entity}} | ||
{{CD|CVoteController|file1=vote_controller.cpp}} | |||
{{This is a|logical entity|except-multi={{asw}}{{portal2}}|name=vote_controller}} It controls the voting system in game. It's spawned automatically in games where voting by players is available such as {{l4ds|2}}, {{tf2|2}}, {{csgo|2}}. | |||
* In {{tf2}} 3 <code>vote_controllers</code> are spawned, one global, one for blue team and one for red team. | |||
* In {{l4ds}} 1 is spawned | |||
* In {{csgo}} 3 are spawned | |||
{{warning|Killing this entity may crash the game.}} | |||
== ConVars == | |||
{{varcom|start}} | |||
{{varcom|sv_vote_timer_duration|15||How long to allow voting on an issue}} | |||
{{varcom|sv_allow_votes|1||Allow voting?}} | |||
{{varcom|sv_vote_failure_timer|300 (0 in {{l4ds}})||A vote that fails cannot be re-submitted for this long}} | |||
{{varcom|sv_vote_creation_timer|150 (180 in {{l4d2}}, 30 in {{l4d}})||How long before a player can attempt to call another vote (in seconds).}} | |||
{{varcom|end}} | |||
=== {{tf2branch|1}} === | |||
{{varcom|start}} | |||
{{varcom|sv_vote_timer_allow_early_finish|1||If all votes are in, whether to end the vote (for debugging)}} | |||
{{varcom|sv_vote_failure_timer_mvm|120||A vote that fails in MvM cannot be re-submitted for this long}} | |||
{{varcom|sv_vote_quorum_ratio|0.6||The minimum ratio of eligible players needed to pass a vote. Min 0.1, Max 1.0.}} | |||
{{varcom|sv_vote_allow_spectators|0||Allow spectators to vote?}} | |||
{{varcom|sv_vote_ui_hide_disabled_issues|1||Suppress listing of disabled issues in the vote setup screen.}} | |||
{{varcom|sv_vote_holder_may_vote_no|0||1 {{=}} Vote caller is not forced to vote yes on yes/no votes.}} | |||
{{varcom|sv_vote_bots_allowed|0||Allow bots to vote or not.}} | |||
{{varcom|end}} | |||
=== Left 4 Dead / Left 4 Dead 2 === | |||
{{varcom|start}} | |||
{{varcom|sv_vote_command_delay|2||How long after a vote passes until the action happens}} | |||
{{varcom|sv_vote_issue_change_difficulty_allowed|1||Can people hold votes to change the difficulty?}} | |||
{{varcom|sv_vote_issue_change_map_later_allowed|1||Can people hold votes to change the map after this round?}} | |||
{{varcom|sv_vote_issue_change_map_now_allowed|1||Can people hold votes to immediately change the map?}} | |||
{{varcom|sv_vote_issue_change_mission_allowed|1||Can people hold votes to change missions?}} | |||
{{varcom|sv_vote_issue_kick_allowed|1||Can people hold votes to kick players from the server?}} | |||
{{varcom|sv_vote_issue_restart_game_allowed|1||Can people hold votes to restart the game?}} | |||
{{varcom|sv_vote_kick_ban_duration|5||How long should a kick vote ban someone from the server? (in minutes)}} | |||
{{varcom|sv_vote_plr_map_limit {{l4d2}}|3||Number of failed votes a user can call per map}} | |||
{{varcom|sv_vote_show_caller {{l4d2}}|1||Show the name of the person that called the vote? (1: Yes, 0: No)}} | |||
{{varcom|end}} | |||
== ConCommands == | |||
{{varcom|start}} | |||
{{varcom|callvote|string|issue to be voted on|Start a vote on an issue. If no parameters provided then it lists available issues if the game supports vote_controller .}} | |||
{{varcom|listissues|void|void|List all the issues that can be voted on.}} | |||
{{varcom|end}} | |||
== {{mono|listissues}} == | |||
=== Team Fortress 2 === | |||
{{todo}} | |||
=== Left 4 Dead / Left 4 Dead 2 === | |||
<pre> | |||
---Vote commands--- | |||
callvote ChangeDifficulty Impossible | |||
callvote ChangeDifficulty Expert | |||
callvote ChangeDifficulty Hard | |||
callvote ChangeDifficulty Normal | |||
callvote RestartGame | |||
callvote Kick <userID> | |||
callvote ChangeMission | |||
callvote ReturnToLobby | |||
callvote ChangeChapter | |||
callvote ChangeAllTalk | |||
--- End Vote commands---</pre> | |||
=== Counter-Strike: Global Offensive === | |||
<pre>---Vote commands--- | |||
callvote Kick <userID> | |||
--- End Vote commands--- | |||
---Vote commands--- | |||
callvote ChangeLevel <mapname> | |||
--- End Vote commands--- | |||
</pre> | |||
== See also == | |||
* {{ent|cs_team_manager}} | |||
* {{ent|terror_gamerules}} | |||
* {{ent|terror_player_manager}} | |||
* {{ent|scene_manager}} | |||
* {{ent|soundent}} |
Latest revision as of 03:06, 4 May 2025


This is a preserved entity in 



If the game has round restart mechanics this entity may not behave as expected.




If the game has round restart mechanics this entity may not behave as expected.
![]() |
---|
CVoteController |
![]() |
vote_controller
is a logical entity available in all Source games except
. It controls the voting system in game. It's spawned automatically in games where voting by players is available such as
Left 4 Dead series,
Team Fortress 2,
Counter-Strike: Global Offensive.
- In
3
vote_controllers
are spawned, one global, one for blue team and one for red team. - In
1 is spawned
- In
3 are spawned

ConVars
Team Fortress 2 branch
Cvar/Command | Parameters or default value | Descriptor | Effect |
---|---|---|---|
sv_vote_timer_allow_early_finish | 1 | If all votes are in, whether to end the vote (for debugging) | |
sv_vote_failure_timer_mvm | 120 | A vote that fails in MvM cannot be re-submitted for this long | |
sv_vote_quorum_ratio | 0.6 | The minimum ratio of eligible players needed to pass a vote. Min 0.1, Max 1.0. | |
sv_vote_allow_spectators | 0 | Allow spectators to vote? | |
sv_vote_ui_hide_disabled_issues | 1 | Suppress listing of disabled issues in the vote setup screen. | |
sv_vote_holder_may_vote_no | 0 | 1 = Vote caller is not forced to vote yes on yes/no votes. | |
sv_vote_bots_allowed | 0 | Allow bots to vote or not. |
Left 4 Dead / Left 4 Dead 2
ConCommands
Cvar/Command | Parameters or default value | Descriptor | Effect |
---|---|---|---|
callvote | string | issue to be voted on | Start a vote on an issue. If no parameters provided then it lists available issues if the game supports vote_controller . |
listissues | void | void | List all the issues that can be voted on. |
listissues
Team Fortress 2
[Todo]
Left 4 Dead / Left 4 Dead 2
---Vote commands--- callvote ChangeDifficulty Impossible callvote ChangeDifficulty Expert callvote ChangeDifficulty Hard callvote ChangeDifficulty Normal callvote RestartGame callvote Kick <userID> callvote ChangeMission callvote ReturnToLobby callvote ChangeChapter callvote ChangeAllTalk --- End Vote commands---
Counter-Strike: Global Offensive
---Vote commands--- callvote Kick <userID> --- End Vote commands--- ---Vote commands--- callvote ChangeLevel <mapname> --- End Vote commands---