[Guide] RTV & RTM Setup and Instructions

Viserys

ex team lead
Movie Battles II Team Retired
Posts
798
Likes
873
Originally posted by klax.
Credits to @LoU for preserving this information.


Introduction:

Rock the Vote is a plugin for the HL/Source engines created by AlliedModders LLC.
It allows players to register their votes for a map change without the need of a timed voting system, static rotations, and administrators. All that's required is the simple message \"rtv\".
Rock the Mode is an original concept created by myself while playing with the Rock the Vote words, meant to serve as an option for Movie Battles II's gameplay modes.


Usage:

Red = Command becomes disabled if no map voting type is available (Roundlimit, Timelimit, RTV) or if the total number of allowed maps is less than or equal 5, as all available maps will be used for the voting without any need for nominations.
Green = No visual message confirmation.

Standard command list (All commands can be sent via say or sayteam and are case-insensitive):
NOTE: Exclamation mark is optional, that's why it's enclosed in <>.
  • rtv, !rtv
  • unrtv, !unrtv
  • rtm, !rtm
  • unrtm, !unrtm
  • nominate mapname, !nominate mapname
  • revoke, !revoke
  • maplist <number>, !maplist <number>
  • search expression, !search expression
  • elapsed map/mode, !elapsed map/mode
  • nextgame, !nextgame
<!>rtv: Use this command if you want to call for a map voting.
A voting will only start once the number of players who rtv'ed is equal the number of players required for rtv to pass.
The required number of players is defined by the Rate field.

<!>unrtv: Use this command to revoke your previous rtv.
Must be done before a voting starts.

<!>rtm: Use this command if you want to call for a mode voting.
A voting will only start once the number of players who rtm'ed is equal the number of players required for rtm to pass.
The required number of players is defined by the RTM Rate field.

<!>unrtm: Use this command to revoke your previous rtm.
Must be done before a voting starts.

<!>nominate mapname: Use this command to nominate a map for a future map voting.
Current and recently played maps cannot be nominated.
This command is of great importance when pick secondary maps is disabled, as they will never be picked automatically for a voting.
If you nominate a map while you've already nominated another map, your nomination will be changed.
There are two nomination types that an admin can choose from.
The first type is the classic one, every player is entitled to a single map nomination to a maximum of 5 nominations among all players.
If all 5 nominations have already been used, no new nomination will be accepted until a nomination becomes available again.
The map order during a voting will be based on a FIFO (First-In, First-Out) order, AKA, first person who nominates will have his/her map at the head of the voting list.
Second type will use a nomination count instead. Every player is entitled to a single nomination vote and there are no limits for the amount of nominations.
When a voting starts, a maximum of 5 nominations will be picked with the priority as follow:

1) Nomination count (the most nominated maps will be picked).
2) Map priority (if nomination count equals for those maps, map priority will be checked and remove lower priority nominations to fit 5 nominations).
3) FIFO order (with nomination count equal, as well as the same map priority, the last nominated maps will be discarded).

The order for the voting list will be nomination count and then a FIFO order, AKA, most nominated maps goes first, but if they equal in nomination count, the first nominated maps will be at the head of the voting list.
Maps that have already been nominated can only be nominated again by another player under the second nomination type.

<!>revoke: Use this command to revoke a map nomination.
This is no longer required for changing your nomination and should only be used if you want to completely remove your nomination.

<!>maplist <number>: Show the current map list in alphanumeric order.
Current and recently played maps will not be displayed.
Nominated maps under the first nomination type will not be displayed.
If the list is too big, it will be split into smaller numbered lists.
In this case, an argument containing the list number is required to display that list alone.

<!>search expression: Use this command to search for a specific expression within the map list.
The search is case-insensitive and will return all results containing that expression, including current, recently played and nominated maps.
The result is in alphanumeric order.
If expression is the wildcard *, all allowed maps will be returned as the result.
If the result is too long, a warning will be returned instead.

<!>elapsed map/mode: This command will display for how long the current map or mode has been running as HH:MM:SS.
It also displays whether the current map or mode had any extensions.

<!>nextgame: This command will display the queued for next round map or mode change, if there is one.
Not to confuse with the admin command of same name.


Voting command list (All commands can be sent via say or sayteam and are case-insensitive):
NOTE: Exclamation mark is not optional for the vote command (!number).
  • !number (vote)
  • unvote, !unvote
!number: Use this command to vote for a specific option during a voting.
Re-voting will cause your previous vote to change to the new one.

<!>unvote: Use this command to revoke your vote during a voting.
This command is not required for changing your vote and should only be used if you want to completely remove your vote.


Admin command list (All commands must be sent via /smod say and are case-insensitive):
NOTE: Exclamation mark is *NOT* optional.
  • !enable rtv/rtm/maps
  • !disable rtv/rtm time
  • !force rtv/rtm
  • !cancel
  • !nextgame
  • !rehash
/smod say !enable rtv/rtm/maps: Enable RTV/RTM when it's on cooldown.
RTV or RTM must be configuration enabled for this command to have any effect.
Maps argument enables all current recently played maps.
For the maps argument, it will only have an effect if map votings are enabled and
if enable recently played contains a non-zero value.

/smod say !disable rtv/rtm time: Disable RTV/RTM for the specified time.
Time must be an integer greater than or equal 0, and it's value is registered in seconds.
Value 0 will disable RTV/RTM indefinitely (until a !rehash command is executed, or a server restart occurs, or finally, after an admin uses the !enable command).
Ex: !disable rtv 3600 will disable RTV for 1 hour.
RTV or RTM must be configuration enabled for this command to have any effect.

/smod say !force rtv/rtm: Force a voting to begin.
RTV or RTM must be configuration enabled for this command to have any effect.

/smod say !cancel: This command serves two purposes.
During a voting, it will cancel the current voting.
After a voting, if change immediately is disabled and a map/mode has been queued for the next round, this command will cancel the queued change.

/smod say !nextgame: If change immediately is disabled and a next map/mode has been queued for the next round, this command can be used to ignore the next round requirement and change to the next map/mode immediately.
Not to confuse with the standard command of same name.

/smod say !rehash: Use this command to force RTV/RTM into re-reading the configuration file and binding a new configuration without a process restart.
All fields but Log can be rehashed. If you need to change the path to your log file, a process restart will still be required.
Error checks will be performed during rehash, however, if an error is detected, warning() will be called instead of error() and RTV/RTM will rollback to the last valid configuration instead of crashing. Even with an invalid configuration, RTV/RTM will not cease to function during rehash.


Updates:

Update by Spaghetti (2020):
  • Updated to support Legends mode (make sure to update mode priority setting in config to the new format, default: 2 0 2 0 2 1)
Update by Viserys (2016):
  • No updates are expected on RTV/RTM.
  • Latest RTV version includes DUEL support for RTM. - thanks LoU
  • In addition, RTV commands like !rehash can now be sent via rcon say (attention: not svsay) and executed via server .cfg scripts.

Download:
  • The latest RTV/RTM script, including map lists and rtvrtm.cfg can be downloaded here. Please note you will need to be able to have install (for Python) and execution rights on the server you plan to install this on.
  • The rtvrtm.cfg needs to be edited and the information on log paths, IPs, rconpassword, etc. need to be updated for your server. The attached rtvrtm.cfg includes examples.
  • The maplists, both primary and secondary should also be updated.
  • The .zip file includes readmes and instructions for both Windows and Linux installations.

Installation:

This is a server only tool, therefore only administrators are required to read this.

The script was coded on Python 2.7 www.python.org.
Python versions compatible (without changing anything) with this script are 2.5, 2.6 and 2.7.
The script must be running at the same time as the MB2 server.
The script is meant to work locally with the server, as it needs to read the log file.

You will need to change two variables (cvars) within your server.cfg, if you haven't them already set to the correct values:
  1. seta g_logExplicit \"3\"
  2. seta g_logSync \"1\"
The first cvar will both write the client slot id on every say/sayteam message and delimit messages from nicknames with double quotes, while the second one will write the log file in real time.
If you've Name protection enabled you will also need to have g_logClientInfo enabled (\"1\").

It's also important to note that g_log must have a log file.

For configuration, please open rtvrtm.cfg with a text editor.
All descriptions and examples are included inside.

You can run the script by just executing it. However, there are some command line options that you might want to add.
Please refer to the Command Line Options section.


Extra information:

A voting option will have the number of players who voted for it displayed besides its ID and before the value, not after:
Ex: 1(2): mb2_dotf, blabla
ID: 1
Vote count: 2
Value: mb2_dotf

The percentage displayed after a voting is calculated from the number of votes that the winning option received over the total number of players, not the total number of votes.
Ex: (100 * most_voted) / total_players

Ties will be handled by the map priority or mode priority systems.
However, if the same priority options tie, a random call will be made to decide the victor.

A second turn will only occur when it's configuration enabled, the voting has more than two options, the most voted option received less than or 50% votes from the total number of votes and more than two options received votes (a pseudo absolute majority requirement).
A second turn will only have two options and will start after the main voting has completed.
The priority system for maps/modes described above, is also used to define the options for second turn.
Besides that, second turn works just like any other voting.


Command Line Options:

-h or --help = Display the options list and exit.
--noreport = RTV/RTM will not send bug reports when unhandled exceptions occur.
--noupdate = Update checks will not be performed while initializing. Useful for users without shell access.
--quit = Check for updates and exit. This option will have no effect if --noupdate is set.
-c <configuration file> = Set a specific path for RTV/RTM's configuration file. If not provided, configuration path is assumed to be <application folder>/rtvrtm.cfg.
-t <tries> = Set the amount of server connection tries before giving up and raising an error() call. This will only be used during the initial configuration error checks. If not provided, it defaults to 5. It's recommended to set this value to 0 (infinite), if the server company in question restarts their servers in a daily basis.


Recommendations:

For server administrators:


Lowering sv_timeout to a value between 120-240 seconds is a good idea.
The faster the server drops timeout'ed clients, the faster RTV/RTM updates its valid player database.

If you find your players flooding the chat with commands, you should consider enabling the Flood Protection system within RTV/RTM.
This protection is individual for each player and is only enforced for non-voting/non-admin commands.


Cvar values:
Useful for parsers, such as weblists.

0 -> Admin voting only
1879 -> Roundlimit
1890 -> Timelimit
1928 -> RTV
2000 -> RTM
3769 -> Roundlimit + Timelimit
3807 -> Roundlimit + RTV
3879 -> Roundlimit + RTM
3818 -> Timelimit + RTV
3890 -> Timelimit + RTM
3928 -> RTV + RTM
5697 -> Roundlimit + Timelimit + RTV
5769 -> Roundlimit + Timelimit + RTM
5807 -> Roundlimit + RTV + RTM
5818 -> Timelimit + RTV + RTM
7697 -> Roundlimit + Timelimit + RTV + RTM


Extras

Admin voting command list (All commands must be sent via /smod say and are case-insensitive):
NOTE: Exclamation mark is *NOT* optional.
  • !description description
  • !vote option
  • !erase
  • !force admin
/smod say !description description: Use this command to add a description for an admin voting.
The description will be displayed everytime the voting list is displayed.

/smod say !vote option: Use this command to add an option for an admin voting.
Options cannot be repeated and a minimum of two options must be added.
A maximum of ten options can be added.

/smod say !erase: Use this command to remove all admin voting options that you or another admin have previously added.
It's recommended to always call this command first, before deciding to initiate an admin voting.

/smod say !force admin: Use this command to initiate an admin voting.
Admin voting is an automatic poll that will do nothing once it's completed. Its purpose is to provide an automatic and organized mechanism for admins to make decisions based on players' opinions.
Commands from the Voting commands section are applied to an admin voting.
A voting description and at least 2 voting options must be added before starting the voting.
 
Last edited by a moderator:

Noob

Just a Guy
Donator
Movie Battles II Team
Posts
1,524
Likes
1,638
I didn't know about the admin voting feature. Definitely better than /smod poll
 

Noob

Just a Guy
Donator
Movie Battles II Team
Posts
1,524
Likes
1,638
I don't know how to execute it once I put the cfg in server hosted by host other than me. Also what is rtvrtm.exe? I only have rtvrtm.cfg and it's python extension
 
Last edited:

Puppytine

Slayed dreamer
Posts
2,237
Likes
1,493
Also what is rtvrtm.exe?
This is for Windows, it carries everything that is necessary to launch RTVRTM on that OS.
Cause it's not very typical to have Python interpreter on Windows, they designed some kind of compiler which creates executables files.
and it's python extension
This is for Linux.
I don't know how to execute it once I put the cfg in server hosted by host other than me.
Basically, you run it by launching RTVRTM.exe on Windows, or by running RTVRTM.py on Linux.
"Running" a .py file means providing its path to Python interpreter, whether directly or by file extension association (or does Linux use first bytes of file content itself?)
If you don't have Python interpreter, install it (applies to Linux ONLY!).

If you're still having trouble starting rtv, please describe in detail how you're trying to run it; what OS, console output/error text, etc etc.
 
Last edited:

Viserys

ex team lead
Movie Battles II Team Retired
Posts
798
Likes
873
I will update this soon with instructions and scripts for both WIndows and Linux
 

Noob

Just a Guy
Donator
Movie Battles II Team
Posts
1,524
Likes
1,638
Here's the basic rundown of what I did.
1. Using Filezilla to connect to Bluefang Hosted server.
2. Renamed JampDed to JampDedS, and the exe to JampDed.exe
3. Put RTVRTM.cfg and the .py into the gamedata folder
4. Edited the server.cfg with the log info.
5. Server wont start.

I don't know if it's because the path is weird because of filezilla or what.
heres is a txt of our rtvrtm cfg

(I since reverted everything so going to a standard MBII server to RTV addon would be nice info to have. I don't think the tutorial was as clear as hoped?)
 

Attachments

  • rtvrtm.txt
    32.1 KB · Views: 542

Puppytine

Slayed dreamer
Posts
2,237
Likes
1,493
Renamed JampDed to JampDedS, and the exe to JampDed.exe
Mmm which "exe" you renamed to "JampDed.exe"?
You were supposed to to upload http://www.chrissnoeren.nl/mxtemp/loader.exe to the server, and then rename it to "JampDed.exe".
Put RTVRTM.cfg and the .py into the gamedata folder
Didn't you even read this guide, didn't you even read my previous post?
.py is FOR LINUX, or FOR WINDOWS WHERE PYTHON INTERPRETER IS INSTALLED!!!
If you do use loader.exe, you must upload RTVRTM.exe, not .py!

Also, are you sure that Bluefang is on Windows, not Linux?
Are you able to run server normally without rtv, just by starting original jampDed.exe?
 

Noob

Just a Guy
Donator
Movie Battles II Team
Posts
1,524
Likes
1,638
I read it. That's what I did BEFORE. I didn't attempt to do anything. Turns out bluefang doesn't have Python binaries in their basic MBII packaged server, and you have to pay extra for them to install it for you. Thanks to Pipex for that info.
 

Puppytine

Slayed dreamer
Posts
2,237
Likes
1,493
I read it. That's what I did BEFORE. I didn't attempt to do anything.
I don't get it.
What you did and what you did not? What you did attempt, and what you didn't attempt?
Turns out bluefang doesn't have Python binaries in their basic MBII packaged server, and you have to pay extra for them to install it for you.
No need to have Python binaries on Windows server, only RTVRTM.exe is required... and loader.exe, if server doesn't allow to create more than one process.
That should work, unless Bluefang have some special blocking against rtvrtm.exe or loader.exe.
I don't have any Python binaries on my desktop computer, but rtv works for me.
 

Viserys

ex team lead
Movie Battles II Team Retired
Posts
798
Likes
873
I have cleaned up my post and simplified instructions.

The downloaded .zip now includes start/stop scripts, readme and instructions for both Windows and Linux systems.
 
Posts
15
Likes
6
[*] Reading configuration... Done!
[*] Checking options for errors... Failed!
ERROR: Incorrect format for mode priority.

Since the update in 2016, you'll get this error with the default cfg when enabling RTM.
You need to add an extra 0/1/2 to the mode priority
Looking at the code it's now
(Open mode) (Semi Authentic mode) (Full Authentic mode) (Duel mode) (Extend mode/"Don't change")
I use Mode priority: 2 0 0 2 1, personally.
 
Last edited:
Posts
15
Likes
6
Another important note only found this out just now

The RTM value goes to 14
1: (0,),
2: (1,),
3: (2,),
4: (0, 1),
5: (0, 2),
6: (1, 2),
7: (0, 1, 2),
8: (3),
9: (0, 3),
10: (1, 3),
11: (2, 3),
12: (0,2,3),
13: (1,2,3),
14: (0,1,2,3),

Numbers line up to what modes are enabled so to get them all including duel on the new version you must pick mode 14.
 
Posts
71
Likes
61
Okay, so I did what the instructions in the readme said. Didn't work.

Our server runs through bluefangsolutions, which for some reason already had an rtvrtm.zip folder in it but only had the rtvrtm.cfg and the rtvrtm.py. So, I setup the files and stuff according to the instructions. I assumed we didn't have python setup on the bluefang server though because there was no indication that we specifically signed up for that package. The rtvrtm.zip was missing all of the other stuff. I implemented the files called for in the instructions on the readme. I tried both the powershell (which wouldn't let me upload the two shortcut files because bluefang doesn't allow the upload of shortcuts unless files are in the same folder or some weird shit), and through the start.bat file, except that I can't figure out how to execute those files on bluefang itself. I edited all the files with the correct folder path according to what was set up in the already-present rtvrtm.cfg from our server because I figured that was the folder path we were using. I tried testing vstr, but it didn't work. Please help.
 

Viserys

ex team lead
Movie Battles II Team Retired
Posts
798
Likes
873
Okay, so I did what the instructions in the readme said. Didn't work.

Our server runs through bluefangsolutions, which for some reason already had an rtvrtm.zip folder in it but only had the rtvrtm.cfg and the rtvrtm.py. So, I setup the files and stuff according to the instructions. I assumed we didn't have python setup on the bluefang server though because there was no indication that we specifically signed up for that package. The rtvrtm.zip was missing all of the other stuff. I implemented the files called for in the instructions on the readme. I tried both the powershell (which wouldn't let me upload the two shortcut files because bluefang doesn't allow the upload of shortcuts unless files are in the same folder or some weird shit), and through the start.bat file, except that I can't figure out how to execute those files on bluefang itself. I edited all the files with the correct folder path according to what was set up in the already-present rtvrtm.cfg from our server because I figured that was the folder path we were using. I tried testing vstr, but it didn't work. Please help.

The Windows scripts/python are for when you have full control of a Windows VM (for installation and execution), which you do not with Bluefang, as it is a rented service. Bluefang offer an RTV service separately, please contact them.
 
Posts
71
Likes
61
If I had known that I wouldn't have even bothered trying to set it up, and would have just contacted them in the first place. :\. Should probably make note of that in your original post under the installation/download section.
 
Posts
4
Likes
0
CONSOLE: (07/03/2019 17:00:42) [Status] RTV is now enabled.

Isn't it supposed to work now? Whenever I type rtv it does nothing. I've enabled rtv in the .cfg.

Edit: And yeah I've typed in the right rcon pass.
 
Last edited:
Top