Forum

> > CS2D > General > XVote - Extended Vote System
Forums overviewCS2D overviewGeneral overviewLog in to reply

English XVote - Extended Vote System

17 replies
To the start Previous 1 Next To the start

old XVote - Extended Vote System

Kiffer-Opa
User Off Offline

Quote
I just published the Lua script XVote 1.0. This script adds some more voting possibilities.
get > XVote - Extended Vote System 1.0 (with installation instructions)
Here is a part of the description:

Quote
This system extends the existing quite simple vote system by adding more voting options. With XVote, all humans can vote for:

• kick any player (not just from the same team)
• mapchange
• change of the game mode
• toggle Fog of War
• toggle Friendly Fire
• toggle infinite ammo
• restarting the round

All stuff is accessed by a Lua menu. By default, it can be accessed with [F4] or by saying "!xvote" (This text will be surpressed in the chat).

(full text here)
I also added a serverinfo template called "serverinfo_xvote.txt". Rename it to "serverinfo.txt" if you want to use it for your server.

Licence: You may change the source code as many times as you want, as long as you respect the author(s) by mention them.
---

get > XVote - Extended Vote System 1.0
Feel free to post here if you have any questions, comments or suggestions about XVote. I think this topic is too complex to discuss in the generic Lua thread, so I opened a thread.

old Re: XVote - Extended Vote System

CmDark
User Off Offline

Quote
Very nice script..

Kiffer also do you know how to use the save/load function in lua? i need it for my ghostmatch(still).

EDIT: ALSO

You have files missing that are necessary for your script to work =p

e.g. sys/norestrictions.cfg

yet you haven't included it in.

old Re: XVote - Extended Vote System

ohaz
User Off Offline

Quote
But can the server hoster toggle if "toggle Fog of War", "toggle Friendly Fire" and "toggle infinite ammo" is allowed or not?

old Re: XVote - Extended Vote System

Crazyx
User Off Offline

Quote
Nice! This is what I wanted the original CS2D voting system to be!

> Suggestion: When voting a player, map, etc., player should be able to give a reason.

Example has written
Player 1 votes Player 2
Reason: he is cheating.

old Re: XVote - Extended Vote System

Kiffer-Opa
User Off Offline

Quote
Quote
But can the server hoster toggle if "toggle Fog of War", "toggle Friendly Fire" and "toggle infinite ammo" is allowed or not?

Nope, not yet. I am not sure wheather I implement this or not.

Remember: I wrote XVote especially for servers without moderators.
If you want to keep control about the played map, Fog of War, and other gameplay stuff with your moderator/admin/operator powers then I don't recommend to use XVote. Okay, you still could activate XVote and after some successful votes you randomly change all settings again to annoy and confuse the players, but I don't recommend this ;-))

But if you just let the server run and have no or very seldom admins online (that maybe just change technical, non-gameplay relevant settings) then I recommend XVote. The players can moderate themselves then.


Quote
You have files missing that are necessary for your script to work =p

e.g. sys/norestrictions.cfg

Whoops, it will be included. I hope this is the only file which is missing. *g*

This file just turns off lots of automated restriction stuff, like:
• automated mapchanges
> it would be annoying to vote successfully for a mapchange and this map changes automatically to a map that nobody wanted after 5 minutes.

• automated kicks for suspected (!) speedhack, teamkills, hostage kills, high ping
> because the community should know best who is annoying and who's not and because the speedhack detection still seems to be error-prone

• auto teambalance
> it's annoying to switch to CT/T/CT/T within 1 round

• max. 5 teambuilding kills
> because you sometimes need to kill buildings of your team to reach a destination

xeNium has written
Suggestion: When voting a player, map, etc., player should be able to give a reason.

All players are able to give a reason. Via chat for example:
Quote
Player 1: Player 2 you speedhacker! I vote him
Player 1 votes to kick Player 2

I guess that the other players can see the context between the chat and the system message. So what exactly did you want?

old Re: XVote - Extended Vote System

Crazyx
User Off Offline

Quote
Kiffer-Opa has written
xeNium has written
Suggestion: When voting a player, map, etc., player should be able to give a reason.

All players are able to give a reason. Via chat for example:
Quote
Player 1: Player 2 you speedhacker! I vote him
Player 1 votes to kick Player 2

I guess that the other players can see the context between the chat and the system message. So what exactly did you want?


When voting, a Reason field should be there.
Instead of using chat, the vote message appears + a reason message.

old Re: XVote - Extended Vote System

Banaan
User Off Offline

Quote
Wow I haven't seen the system yet, but it sounds really cool! Just a question: should the maps the ppl can vote be in the mapcycle? coz on most servers, maps can't be voted because there is no (or a standard) mapcycle...

If players can just vote any map which is on the server, they don't only have the possibility of voting for like 6 maps, but for many more


xeNium has written
When voting, a Reason field should be there.
Instead of using chat, the vote message appears + a reason message.

Wouldn't the message become too long then?

old Re: XVote - Extended Vote System

Crazyx
User Off Offline

Quote
Banaa

[quote=xeNium has written
When voting, a Reason field should be there.
Instead of using chat, the vote message appears + a reason message.

Wouldn't the message become too long then? [/quote]

The reason message would be above the voting message and have a character limit

old Re: XVote - Extended Vote System

Kiffer-Opa
User Off Offline

Quote
Quote
should the maps the ppl can vote be in the mapcycle? coz on most servers, maps can't be voted because there is no (or a standard) mapcycle...

By default, the maps listed in "sys/mapcycle.cfg" are available for vote. If unedited, this file only holds 6 maps which is pretty few.
You can choose another file which holds the map names if you edit the file "sys/lua/xvoteconfig.lua". I don't know how to find out what files are in a folder. If I knew, I'd add an option to make all maps in the "maps" folder available.

About the reason thing: Where should the user enter the reason?

old Re: XVote - Extended Vote System

Crazyx
User Off Offline

Quote
Kiffer-Opa has written
About the reason thing: Where should the user enter the reason?

To vote, when the command I entered, a menu should pop up and player writes reason there.

Another suggestion: voted player should receive the following message (msg2):
"voter voted to kick you!"
I recommend that in red, ©255000000.

old Re: XVote - Extended Vote System

Kiffer-Opa
User Off Offline

Quote
Quote
To vote, when the command I entered, a menu should pop up and player writes reason there.

Sorry, this is not possible. CS2D just supports button menus, but not menus where you can enter something :-/

CmDark has written
@kiffer-Opa errhh.. you kinda missing Tons of files
vote sound and stuff

The vote sound is in the CS2D standard installation, so every CS2D player should have it.
What is "stuff"?

"Voter voted to kick you": This is an good idea. I'll implement this.

old Re: XVote - Extended Vote System

Crazyx
User Off Offline

Quote
Kiffer-Opa has written
"Voter voted to kick you": This is an good idea. I'll implement this.



Thanks! It was a pleasure to suggest.

old XVote 2.0 beta

Kiffer-Opa
User Off Offline

Quote
After a long period of time I publish
XVote 2.0 beta
> Download

I rewrote almost all of the old code and it has one major change (that's why it took so long):
• You are able to add own vote topics
This is done by usage of so-called "modules". These are little tables which tell XVote what to do if
• how the topic is called
• what things can be voted ("options")
• what to do if any of this things reached majority
• many things more

for example, the map voting works this way:
• the topic is called "map"
• the options are all maps listed in the file "sys/mapcycle.cfg"
• the action on majority is a mapchange

These tabled are defined in Lua scripts stored in the folder "sys/lua/xvote", you can choose another folder in the configuration file.
What can you write, for example?
Maybe you make one of these hundrets server settings like "mp_turretdamage" votable, so players can vote for the damage level the Turrets do.
Maybe you can let the players vote about some setting in one of your own scripts. And so on.
XVote also has a pretty primitive "self-protection" which checks all modules for correct implementation. If there are mistakes, XVote prints out error messages in the console. I didn't test it very much so far, so don't expect too much from it.

To find out how to write a module exactly, read the file "README_xvote.txt". The best way to learn how this works is to take a view into one of the scripts in the folder "sys/lua/xvote". For beginners I suggest "sv_fow.lua".
If this is still too complicated for you, feel free to ask a question here.

• You are able to deactivate some vote topics. See the configuration file "xvoteconfig.lua"
• You can configure XVote. See configuration file: "sys/lua/voteconfig.lua"
• The kickvote message appears now red to the "victim"
• The current "state" of a topic is shown in the main menu (the "state" of the topic "map" is defined as the name of the current played map

I called this version "2.0 beta" because I didn't test the module test and two things are lost in comparision with version 1.0 because of the rewrite:
• compatibility with classic vote menu
• submenu for the map selection
I have some trouble to re-implement these features at the moment, the word "beta" will be removed if these features are implemented again and nobody finds bugs...

Again, you are encouraged to edit the source code for you own needs or to edit it and then publish it. If you wrote something useful, for instance, a new module or an implementation of one of my things on the TODO-list, post it.

TODO-list (things I or you could do):
• add submenus (you click on a button on main menu and get another menu which can have other submenus or vote topics)
• add compatibility for the classic vote menu again
• a menu with just 8 or 9 items should use 1 page instead of 2 pages
• resolve the redundancy between the functions "xvote.openMainMenu" and "xvote.openVoteMenu"
• There is a menu with just 1 item for topic with just two options because XVote removes the option which is the current state. A menu with 1 item is dumb, a better solution is needed.
To the start Previous 1 Next To the start
Log in to replyGeneral overviewCS2D overviewForums overview