• 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

Final release of white-listed DynamicMapRotator mutator (rev.31)

-=THOR=-

FNG / Fresh Meat
Sep 20, 2011
1,050
50
0
Final release of white-listed DynamicMapRotator mutator (rev.31)

This version of the DynamicMapRotator is based on first white-listed version (see the link below). Please read the thread about the previous version first.

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_Help
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 ""
All of these commands issue a confirmation message when a modification effectively occurred.

NOTES
*This mutator will prevent mutate commands from being reached by other mutators that follow the DMR in the URL 'mutator' list. As a workaround, just make sure that the DMR is the last that appears in the URL 'mutator' list. This will be fixed in a future release.
*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.
*To modders: if you make a mutator and want to add mutate commands, maybe you can reuse the "ParametersExtractor" class that I made for this mutator. It does all the syntax validation and extraction thing automatically. Just ask if you have questions ;)
 

Attachments

Last edited:

Ducky

Super Moderator
May 22, 2011
6,358
237
0
Netherlands
Great extension Thor :)

I've removed the download from the old DynamicMapRotator thread, because the old version will (or maybe already is) pushed from the white-list. I also did lock that thread to prevent confusion.
 

-=THOR=-

FNG / Fresh Meat
Sep 20, 2011
1,050
50
0
IMPORTANT NOTE: This mutator will prevent mutate commands from being reached by other mutators that follow the DMR in the URL 'mutator' list. As a workaround, just make sure that the DMR is the last that appears in the URL 'mutator' list. Also, make sure you specify the DMR at the end of AdditionalURLVariables. This issue will be fixed in a future release.
 
Last edited:

Cat_in_da_Hat

FNG / Fresh Meat
Dec 11, 2006
1,749
115
0
Does this mutator work if the server is set with map voting enabled?

I.e at the end of the map the mutator looks at the number of players and then it decides what maps should be on the map voting list based on the number of players ?
 

Krunch

FNG / Fresh Meat
Jul 10, 2012
17
0
0
www.2fjgclan.com
This mutator does not seem to work. I read the previous thread which says:

## 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.
And none of those cases work. If I manually change the map it will just go to the vanilla behaviour, same thing for server crashes.

Is this mutator supposed to be working still?

I am using SmartLoader and ServerEx with this.
 

mattlach

FNG / Fresh Meat
Oct 20, 2011
415
134
0
Massachusetts
This mutator does not seem to work. I read the previous thread which says:


And none of those cases work. If I manually change the map it will just go to the vanilla behaviour, same thing for server crashes.

Is this mutator supposed to be working still?

I am using SmartLoader and ServerEx with this.
Does anyone know the answer to this?