•     Please make sure you check the Support FAQ and relevant Guides before you create a new thread in this section!

[SOLVED] Looking for the RTV/RTM Script

Status
Not open for further replies.

Cat Lady

Movie Battles II Team Retired
Posts
412
Likes
237
config files (included in the package, i hope?) should include super-heavy amount of comments explaining everything, inside.
 
Posts
296
Likes
216
The RTVRTM.cfg has a lot of detailed information to the settings such as time lapses and stuff like that, which I have already edited. I'm assuming I am missing an additional step because the server does not recognize that RTVRTM is enabled even though the option is enabled within the config. I feel like I am missing something obvious. To run the config, am I supposed to add it to the server.bat line or is it supposed to automatically pick up on it? (Windows server by the way) If it helps to send a copy of the config file, I can do so.
 

Cat Lady

Movie Battles II Team Retired
Posts
412
Likes
237
Hm, you need to enable separate python program (the actual rtvrtm.py or whatever it is called), that connects to server via rcon. There is nothing that server need to "Recognize" on server side - from server perspective, rtvrtm is just rcon admin saying funny stuff via svsay. Also, remember that server need detailed logging enabled, and rtvrtm.py need to know where to look for this config (it will complain on start if it doesn't).

To get output from rtmrtm.py (for example, errors, missing things, etc) you need to start it from terminal (command line). As for details of doing so in windows (esp.recent ones) I have no idea, I'm running Linux/Debian (Devuan) on all my work and home boxes, for many years, already.

/Cat Lady
 
Posts
296
Likes
216
Hm, you need to enable separate python program (the actual rtvrtm.py or whatever it is called), that connects to server via rcon. There is nothing that server need to "Recognize" on server side - from server perspective, rtvrtm is just rcon admin saying funny stuff via svsay. Also, remember that server need detailed logging enabled, and rtvrtm.py need to know where to look for this config (it will complain on start if it doesn't).

To get output from rtmrtm.py (for example, errors, missing things, etc) you need to start it from terminal (command line). As for details of doing so in windows (esp.recent ones) I have no idea, I'm running Linux/Debian (Devuan) on all my work and home boxes, for many years, already.

/Cat Lady

Yeah, I just need to do some more digging. I'm sure i'll figure it out. It's too bad http://community.moviebattles.com/t...the-Vote-and-Rock-the-Mode?highlight=RTV+Tool doesn't exist anymore. I had it favorited. Thanks for helping me get started anyway.
 

Cat Lady

Movie Battles II Team Retired
Posts
412
Likes
237
Maybe this will help you:
---


Originally posted by klax
Reposted by LoU
https://community.moviebattles.org/members/lou.1/

[align=center][size=xx-large]Introduction:[/size][/align]

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.
Â
[align=center][size=xx-large]Installation:[/size][/align]

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.
I have no interest in porting RTV/RTM to Python 3000 (3), so please don't ask.
For Windows users, you can download the exe version. In this case, you don't need to install or download anything else.
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.
Â
[align=center][size=xx-large]Usage:[/size][/align]

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 priorioty nominations to fit 5 nominations).
3) FIFO order (with nomination count equal, aswell 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.
---


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.
Â
[align=center][size=xx-large]Extra information:[/size][/align]

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.
Â
[align=center][size=xx-large]Command Line Options:[/size][/align]

-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.
Â
[align=center][size=xx-large]Recommendations:[/size][/align]

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.
Â
[align=center][size=xx-large]Cvar values:[/size][/align]

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
Â
[align=center][size=xx-large]Built-in Updater:[/size][/align]

As of version 3.3, a built-in updater was added.
A check for updates will be performed everytime RTV/RTM is executed, and if an update is found, it will ask whether you want to update or not.
Besides confirming your choice, all the updating process is automatic.

If you don't want to bother checking for updates or if you are running RTV/RTM automatically, the --noupdate option should be added into the command line.
In the other hand, if you just want to check for updates and do nothing else, the --quit option should be added into the command line.

Non essential updates that may include small time fixes and/or optimizations, will only be available through the updater.
These patches will have no changelog (if a semi important change is made, it will be listed in the changelog for the next public release) or public releases, and their version will follow the format:
(public version).(public revision)U(update number).
Ex: V3.3U1

NOTE: Hosting companies where customers have no shell access to their account should always set --noupdate for their customers.
If --noupdate is not set and an update is found, the process will deadlock waiting for an answer while the customer is unable to provide input to stdin.
Â
[align=center][size=xx-large]Download:[/size][/align]

V3.6:

Quick links (Gate To Games and TK-231):

Mirror 1: http://rtvrtm.gatetogames.net/rtvrtm36.zip
Mirror 2: http://www.chrissnoeren.nl/mxtemp/rtvrtm36.zip

(EXE) Mirror 1: http://rtvrtm.gatetogames.net/rtvrtm36-exe.zip
(EXE) Mirror 2: http://www.chrissnoeren.nl/mxtemp/rtvrtm36-exe.zip

(CFG) -> All the above zipfiles already contain the cfg, but here is a backup version for lookup:
(CFG) Mirror 1: http://rtvrtm.gatetogames.net/rtvrtm.cfg
(CFG) Mirror 2: http://www.chrissnoeren.nl/mxtemp/rtvrtm.cfg

If you just want pre-generated map list files including the most common maps, you can download them from the links below.
maps.txt includes all official non-duel maps.
secondary_maps.txt includes all official duel maps and non-duel CMP maps.

Primary maps: http://rtvrtm.gatetogames.net/maps.txt
Secondary maps: http://rtvrtm.gatetogames.net/secondary_maps.txt

For those running their servers on Windows and with a panel system that allows for a single process only, please follow these instructions:

1) Download http://rtvrtm.gatetogames.net/loader.exe or http://www.chrissnoeren.nl/mxtemp/loader.exe
2) Upload loader.exe to the same folder storing jampDed.exe.
3) Rename jampDed.exe to jampDedS.exe.
4) Rename loader.exe to jampDed.exe.
5) Upload rtvrtm.exe and rtvrtm.cfg to the same folder containing both jampDed.exe and jampDedS.exe.
6) Configure rtvrtm.cfg.
7) Start your server.

loader.exe is written in C and uses the Windows API. Therefore it should run in any Windows system and should not cause any performance hit.
The source code can be found here: http://rtvrtm.gatetogames.net/loader.c or http://www.chrissnoeren.nl/mxtemp/loader.c','SňI','1','0','4','1412776244','','1','0');
 
Posts
296
Likes
216
Cat Lady, I don't know you...but I love you. I was missing the rtvrtm.exe file and these instructions:

1) Download http://rtvrtm.gatetogames.net/loader.exe or http://www.chrissnoeren.nl/mxtemp/loader.exe
2) Upload loader.exe to the same folder storing jampDed.exe.
3) Rename jampDed.exe to jampDedS.exe.
4) Rename loader.exe to jampDed.exe.
5) Upload rtvrtm.exe and rtvrtm.cfg to the same folder containing both jampDed.exe and jampDedS.exe.
6) Configure rtvrtm.cfg.
7) Start your server.

Got it running smooth as butter. I thank you very much for you help, and LoU, and of course Klax.

Edit: you deserve a raise
 
Status
Not open for further replies.
Top