Opened 10 years ago

Last modified 5 years ago

#2512 new enhancement

Voting system

Reported by: scythetwirler Owned by:
Priority: Should Have Milestone: Backlog
Component: UI – In-game Keywords: beta
Cc: Patch:

Description

A voting system (as used in Savage XR) would be very flexible and useful in 0 A.D.

When a vote is called, each player can vote yes or no and the results are tallied and the decision is made based on predetermined ratios for passing/failing. (Draws could be only 50% while kicking a player could take 80%).

Votes for conceding matches would be limited to one team only.

Change History (7)

comment:1 by Josh, 10 years ago

Voting for what? (I'm not familiar with Savage XR)

comment:2 by scythetwirler, 10 years ago

Offering draws (especially in team games), kicking verbally abusive players, etc.

comment:3 by Jia Henry, 10 years ago

I agree with this enhancement. I've played against a few bad players who pause the game if they are about to lose so you can't kill them. Making things like pausing into a vote would prevent this from happening

comment:4 by Rolf Sievers, 10 years ago

How should a system like this handle players not responding at all? E.g. Teeworlds counts them as “NO” votes and thus often fails to get useful results from a vote — Simply because most players don't bother to vote at all.

in reply to:  2 comment:5 by elexis, 9 years ago

Here my thoughts on a voting system:

Use cases: In my experience, votes have been used for two purposes: -voting on a map (nomad or not-nomad) -excluding overpowered civs like mauryans in a18 or persians in a17

Replying to scythetwirler:

Offering draws (especially in team games), kicking verbally abusive players, etc.

Draws can already be achieved if everyone allies everyone. If a player still wants to fight on, that shouldn't be overruled IMO. Same goes for team resign.

Kicking players should be implemented as a command for the host in #3241. I'm not sure if it is a good idea to allow the majority of people to kick/ban a minority by vote (maybe the best player).

Votes should be public and transparent. Therefore a chat message should be displayed, that displays who voted for which option, after the vote was closed.

In general observers shouldn't be allowed to vote, since they are not supposed to interact with the game by definition.

Implementation: If a player enters /vote question answer1 answer2 ... answerN in the gamesetup or session, the vote should be initiated. If there is another vote pending, then a chat notification should be displayed for the player that tried to open another vote. Every player might use that vote command (but not more than 5 total for spam protection, excluding the host).

A message boxwith all the defined answers should appear for all players (see messageBox function in JS). Every vote should be closed automatically after maybe 20 seconds.

After the voting finished, 0ad should execute the appropriate action (depending on the use case, like selecting a map, kicking a player or setup draw). It should be possible to vote without code execution afterwards, so that one can vote on miscellaneous things too (like banning a civ in the gamesetup).

Technical Requirements: Two new types of NetMessage should be defined: CVoteMessage and CVoteAnswerMessage, similar to attachment:t1950_show_who_paused_v1.patch:ticket:1950: CVoteMessage must contain a unique identifier of a vote, the question, possible answers and type of vote (in case of code execution afterwards). CVoteAnswerMessage must contain the unique identifier, the chosen answer and the player ID that voted. The question could be used as a unique ID.


Please discuss and decide on the the different use cases (selecting map, kicking player, draw, team resign). Maybe those functions are not even required and having a system that only counts votes is sufficient.

comment:6 by scythetwirler, 7 years ago

Keywords: beta added

comment:7 by Imarok, 5 years ago

Component: UI & SimulationIn-game UI

Move tickets to In-game UI as UI & Simulation got some sub components.

Note: See TracTickets for help on using tickets.