DynamicMapRotator

  • Please make sure you are familiar with the forum rules. You can find them here: https://forums.tripwireinteractive.com/index.php?threads/forum-rules.2334636/
  • Weve updated the Tripwire Privacy Notice under our Policies to be clearer about our use of customer information to come in line with the EU General Data Protection Regulation (GDPR) rules that come into force today (25th May 2018). The following are highlights of our changes:


    We've incorporated the relevant concepts from the GDPR including joining the EU and Swiss Privacy Shield framework. We've added explanations for why and how Tripwire processes customer data and the types of data that we process, as well as information about your data protection rights.



    For more information about our privacy practices, please review the new Privacy Policy found here: https://tripwireinteractive.com/#/privacy-notice

-=THOR=-

FNG / Fresh Meat
Sep 20, 2011
1,050
50
0
The new beta of the DynamicMapRotator is based on the previous one. I won't go through the details of how it was used, because that part remains the same:
http://forums.tripwireinteractive.com/showthread.php?t=75372

SUMMARY

## Manual Map Changes ##
[BEFORE] After a manual map change, the mutator would go back to where it was before.
[NOW] After a manual map change, the mutator will seek the current map in the map rotation, and try to find the next map. In the manual map change command, it is possible to add a URL parameter to specify where the mutator should go after.

## Server Crash ##
[BEFORE] The server would start on the map specified in the command-line. The next map would be where the mutator was before. That could cause a problem of having the same map played twice.
[NOW] The server will start on the map specified in the command-line. However, the next map can be specified in the command-line, or the mutator can automatically seek for the next map in the normal rotation, like for the manual map change case.

## Dynamic Reconfiguration ##
[BEFORE] To modify the mutator parameters, a server restart was required. An access to the .ini file was required.
[NOW] Through console commands, it is possible to read and modify all the parameters of the mutator. A server restart is not necessary, and only an admin access to the game is required. It is not necessary to have access to the .ini file.

DETAILS

For the following examples, consider the following:

Map Rotation:
Code:
0: TE-Apartments
1: TE-Barracks
2: TE-PavlovsHouse
3: TE-FallenFighters

Configuration File:
Code:
bEnableLogging=false
bRandomOrder=false
bAlsoCountBots=false
AdditionalUrlVariables=
MapFilters=(MinPlayerCount=0,MaxPlayerCount=32,MapURL="TE-Apartments?minplayers=24")
MapFilters=(MinPlayerCount=0,MaxPlayerCount=8,MapURL="TE-Barracks?minplayers=6")
MapFilters=(MinPlayerCount=9,MaxPlayerCount=16,MapURL="TE-Barracks?minplayers=12")
MapFilters=(MinPlayerCount=0,MaxPlayerCount=32,MapURL="TE-PavlovsHouse")
MapFilters=(MinPlayerCount=0,MaxPlayerCount=32,MapURL="TE-FallenFighters?minplayers=24")

## URL Parameter ##
The URL Parameter ?DMR_NextMapIndex controls where the DynamicMapRotator should go in the map rotation, when the map is over.

Consider the following manual map change URL:
Code:
TE-FallenFighters?mutator=DynamicMapRotator.DynamicMapRotator?DMR_NextMapIndex=1

The map will change to TE-FallenFighters. The mutator has no control over it, it is a manual map change. The mutator is executed only at the end of the map. When the map ends, it will read DMR_NextMapIndex. Its value corresponds to the map TE-Barracks in the map rotation. This will be its start point. The mutator will look in the filters, and if it finds one with the correct players count range, it will use the specified URL. If there were 20 people in TE-FallenFighters, it will find no filter that matches, and will move on to the next map of the rotation. The next map is TE-PavlovsHouse, and there is a filter that allows that map. So the next map called will be "TE-FallenFighters?minplayers=24".

Consider the following manual map change URL:
Code:
TE-FallenFighters?mutator=DynamicMapRotator.DynamicMapRotator

Since DMR_NextMapIndex is not specified, its value is considered to be -1, which means, seek. When TE-FallenFighters is over, the mutator will inspect the map rotation, and pick the next map, which is TE-Apartments. A filter allows that map, so it will be used as the next map, that means: TE-Apartments?minplayers=24

Note: When bRandomOrder is 'true', DMR_NextMapIndex is always ignored, the next map is picked randomly from the map rotation.

## Console Commands ##
When in-game, authentify as an administrator, with one of these commands, with the in-game console:
AdminLogin <Login> <Password>
AdminLoginSilent <Login> <Password>

Once authentified, you can use these commands:
mutate DMR_Help
This command displays a help message.

mutate DMR_ShowConfig
This commands displays the current state of the mutator. You will get an output that looks like this, in your console:
Code:
Enable Logging: False
Random Order: False
Also Count Bots: False
Additional URL Variables: ""
Next Map Index: -1
Override URL: ""
[Map Filter 0] Minimum Players Count: 0  Maximum Players Count: 32   URL: "TE-Apartments?minplayers=24"
[Map Filter 1] Minimum Players Count: 0  Maximum Players Count: 8   URL: "TE-Barracks?minplayers=6")
[Map Filter 2] Minimum Players Count: 9  Maximum Players Count: 16   URL: "TE-Barracks?minplayers=12")
[Map Filter 3] Minimum Players Count: 0  Maximum Players Count: 32   URL: "TE-PavlovsHouse")
[Map Filter 4] Minimum Players Count: 0  Maximum Players Count: 32   URL: "TE-FallenFighters?minplayers=24")

mutate DMR_EnableLogging "true"
mutate DMR_RandomOrder "true"
mutate DMR_AlsoCountBots "true"
These commands allow to edit the parameters bEnableLogging, bRandomOrder and bAlsoCountBots of the configuration file. Refer to the previous version of the mutator for details about these options. They can be set to "true" or "false".

mutate DMR_AdditionalUrlVariables "?mutator=BotDetonator.BotDetonator"
This command allows to assign the AdditionalUrlVariables parameter of the configuration file.

mutate DMR_NextMapIndex "2"
You can change the value of NextMapIndex that was specified in the URL with this command.

mutate DMR_OverrideURL "TE-Apartments?minplayers=16?mutator=DynamicMapRotator.DynamicMapRotator"
To avoid making a manual map change in the middle of a ongoing match, use this command to program a manual map change at the end. Note that as soon as the value of this parameter is not an empty string, it will be used as the URL for the next map change, NO MATTER THE OTHER SETTINGS/FILTERS. This is a total override, nothing will prevent it from executing, except if you assign an empty string before the end of the map, of course. It is reset to an empty string at the beginning of each map.

mutate DMR_AddFilter at="2" min="16" max="32" url="TE-Apartments"
This command adds a filter. The parameter 'at' is optional, and zero-based. If not specified, the filter will be added at the end. All the other parameters are required.

mutate DMR_EditFilter at="2" min="12" max="28" url="TE-Apartments"
This command edits a filter. The parameter 'at' is required, and zero-based. The other parameters are optional.

mutate DMR_MoveFilter from="2" to="0"
This command moves a filter from one location to another. Both parameters are required.

mutate DMR_RemoveFilter at="2"
This command removes a filter. The parameter 'at' is required, and zero-based.

Concerning the syntax, please note that:
*mutate is mandatory
*DMR_CommandName is a command name! And is always followed by a space.
*Parameter values are between double quotes, ONE BEFORE, ONE AFTER.
*Make sure there is always one space between each parameter.

Here's a few examples of commands:
Code:
mutate DMR_ShowConfig
mutate DMR_EnableLogging "false"
mutate DMR_RandomOrder "true"
mutate DMR_AlsoCountBots "false"
mutate DMR_AdditionalUrlVariables "mutator=BotDetonator.BotDetonator"
mutate DMR_AdditionalUrlVariables ""
mutate DMR_AddFilter at="2" min="16" max="32" url="TE-Apartments"
mutate DMR_AddFilter min="16" max="32" url="TE-Apartments"
mutate DMR_EditFilter at="2" min="12" max="28" url="TE-Barracks"
mutate DMR_EditFilter at="2" max="28" url="TE-Barracks"
mutate DMR_EditFilter at="2" url="TE-Barracks"
mutate DMR_EditFilter at="2" min="12"
mutate DMR_EditFilter at="2" min="12" max="28"
mutate DMR_RemoveFilter at="2"
mutate DMR_MoveFilter from="2" to="0"
mutate DMR_MoveFilter from="1" to="2"
mutate DMR_NextMapIndex "2"
mutate DMR_NextMapIndex "-1"
mutate DMR_OverrideURL "TE-Spartanovka?mutator=DynamicMapRotator.DynamicMapRotator?DMR_NextMapIndex=2"
mutate DMR_OverrideURL "TE-Apartments?mutator=DynamicMapRotator.DynamicMapRotator"
mutate DMR_OverrideURL ""

NOTES
*The files attached to this message are the latest files of the beta. They have not been submitted for white-listing yet, so if you have suggestions it's not too late. However I can't guarantee that they will be integrated into the next release.
*To install, refer to the instructions given in the thread of the previous version of the mutator.
*Beware the this forum automatically insert spaces when a string of characters is too long, and it might create problems if you copy-paste them directly.
 

Attachments

  • DynamicMapRotator.zip
    26.3 KB · Views: 0
Last edited:

Major_Day

FNG / Fresh Meat
Feb 16, 2007
2,651
329
0
Glasgow, Scotland
Would it be possible to make a time based mutator that would look at the number of players on the server, and if within say half an hour nobody has joined the server,the mutator would load the next map in the rotation, and so on with each and every map, in other words an auto-rotate mutator that cuts in when the server is empty.
In Ostfront a map would load,run to its time limit and then the next map would be loaded and so on,with the maps continually rotating on the server.
The reason i ask is that sometimes when a custom map comes up,people leave,and the server can sit empty for hours on the same map,unless i manually bring up the next map.
 
Last edited:

Ducky

Super Moderator
May 22, 2011
6,358
237
0
Netherlands
Would it be possible to make a time based mutator that would look at the number of players on the server, and if within say half an hour nobody has joined the server,the mutator would load the next map in the rotation, and so on with each and every map, in other words an auto-rotate mutator that cuts in when the server is empty.
In Ostfront a map would load,run to its time limit and then the next map would be loaded and so on,with the maps continually rotating on the server.
The reason i ask is that sometimes when a custom map comes up,people leave,and the server can sit empty for hours on the same map,unless i manually bring up the next map.

That mutator does already exist. It's part of the BotDetonator mutator which allows one or more bots to start a server if there is still no human player after a configurable time. The bot(s) will then fight out the map and after that the next one will come in rotation.
This is a functionality which has just recently be added to BotDetonator and only earlier today it got white-listed by TWI. I'm currently in the process of writing the forum publications.
 

Cat_in_da_Hat

FNG / Fresh Meat
Dec 11, 2006
1,749
115
0
Would it be difficult to create a simila mutator to this one but have it modify the map cycle based on player numbers at the end of a map.

Think that it could then be used by servers that are using map voting.

The idea is that it would only offer up for map voting maps that are in the player number range in the mutator ini.

Just food for thought I guess.

This mutator was terrific when I was using a set map rotation but we are no using map voting most of the time now that the map repeat limit feautre was put in ServerEx.