• 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

Status
Not open for further replies.

Ducky

Super Moderator
May 22, 2011
6,358
237
0
Netherlands
Final release of DynamicMapRotator mutator (Feb 9, 2012)

This mutator is replaced as of Jun 22, 2012. For that reason it has been removed from the white-list. A newer white-listed version is available. The newer version can be downloaded here.

On request I wrote a mutator to have a more dynamical map rotation without interaction of an admin (the development discussions can be found here).

The mutator allows a server admin to set up some rules to filter out maps depending on the number of players. This is how the mutator will do for you:

  1. At round end it looks up the number of players on the server
  2. Next it looks in the active Map Cycle list (the one set in the web-admin tool) to see what the next map would be
  3. After this it searches in the mutators filter list (can be set-up in the mutators ini file) for that map and it checks if the current number of players is in range of the MinPlayersCount and MaxPlayersCount for that map
  4. If it is, then the map will be loaded. If it isn't, then it will repeat from step 2.

This will give the map rotation are more dynamic behavior depending on the number of players on the server. The goal for this is to skip the larger maps in case the number of players is limited and to skip the smaller maps in case there are a lot of players.


The configuartion:
The next settings are the configuration settings of the mutator. The admin can play with it to set-up the server to his liking.

  • bRandomOrder:
    If set to True, then the mutator will not step from top to bottom through the active Map Cycle list, but it will step randomly through that list. The map order will be more random preventing that players will leave the server if they know that the next map will be a map that they do not like.
    Values: Default: false; Minimum: false; Maximum: true
  • bAlsoCountBots:
    If this is set to True, then the mutator will not only count the total number of human players but also the total number of bots. I introduced this option to make it easier to test the mutator.
    Values: Default: false; Minimum: false; Maximum: true
  • AdditionalUrlVariables:
    The mutator will cause the maps to be loaded with the URL variables as they are set in the actice Map Cycle. You can add additional URL variables to those map URLs by adding them to this AdditionalUrlVariables variable.
    Example: AdditionalUrlVariables=?MinPlayers=10?MaxPlayers=40
  • LastMapIndex:
    This is actually not a setting, but more a temporar storage for the mutator. It should not be tounched by the admins.
  • MapFilters:
    With these you can setup the filterring. Each entry has 3 variables:
    • MinPlayerCount: Default: 0; Minimum: 0; Maximum: 64
    • MaxPlayerCount: Default: 64; Minimum: MinPlayerCount; Maximum: 64
    • MapUrl: The URL of the map
      With the above settings you can define a filter for each map in which you specify the minimum number of players for that map (MinPlayerCount) and the maximum number of players for that map (MaxPlayerCount). In MapUrl you specify for which map these settings are valid. The next is an example for a filter for three maps:
      Code:
      MapFilters=(MinPlayerCount=0,MaxPlayerCount=40,MapURL="TE-Apartments")
      MapFilters=(MinPlayerCount=0,MaxPlayerCount=64,MapURL="TE-Barracks")
      MapFilters=(MinPlayerCount=40,MaxPlayerCount=64,MapURL="TE-CommissarsHouse")
      In the above example apartments will only show up in rotation if the number of players is 0 up to 40. Barracks will show up in rotation if the number of players is 0 up to 64 (so it will always be in rotation) and commissarshouse will only show up if there are 40 or more players on the server.
      It's also possible to use the same map more than once, but with different URL variables. Here is an example:
      Code:
      MapFilters=(MinPlayerCount=0,MaxPlayerCount=10,MapURL="TE-Ogledow_B9?MinPlayers=10")
      MapFilters=(MinPlayerCount=11,MaxPlayerCount=64,MapURL="TE-Ogledow_B9")
      With the above filter Ogledow will be selected if the number of players is less than or equal to 10. In that case there will also be 10 bots. If the round ends and there are more than 10 human players, then Ogledow will be loaded but then without any bots. This way you can make rules to fill up your server.

      Or if you want to select any of the three map variants (small, medium or large) depending on the number of players, then you could for example use:
      Code:
      MapFilters=(MinPlayerCount=0,MaxPlayerCount=14,MapURL="TE-RedOctoberFactory?MaxPlayers=16")
      MapFilters=(MinPlayerCount=15,MaxPlayerCount=30,MapURL="TE-RedOctoberFactory?MaxPlayers=32")
      MapFilters=(MinPlayerCount=31,MaxPlayerCount=64,MapURL="TE-RedOctoberFactory?MaxPlayers=64")
      In this example the RedOctoberFactory map for max 16 players will be loaded if the number of players is less then 15. The medium size map if the number of players is more than 14 and less than 31. And the large variant if the number of players is above 30. Please note that there is a 2 players offset between MaxPlayersCount and MaxPlayers to allow the larger maps to be selected.

Remark: The mutator can not be used together with map voting enabled!

Cients (players) do not need to install or download the mutator!!!

Where to download the mutator (for server admins):

The mutator can be downloaded from this location: http://forums.tripwireinteractive.com/showthread.php?t=80801

How to install the mutator (for server admins):

  1. Download the mutator from above location
  2. Extract all files from the archive
  3. Place the config\defaultdynamicmaprotator.ini and config\RODynamicMapRotator.ini files in the rogame\config folder on your server
  4. Place the cookedpcserver\DynamicMapRotator.u file in the rogame\cookedpcserver folder on your server
  5. Restart your server(you need to do this or else the server will not find the mutator)

How to activate the mutator (for server admin):

  1. Open your servers web-admin tool
  2. Go to the Change Map page
  3. Select your game type and map
  4. At the Additional URL variables field you add ?mutator=DynamicMapRotator.DynamicMapRotator
  5. Now load the map

If you have more than one mutator running on your server, then you can load them with
Code:
?mutator=DynamicMapRotator.DynamicMapRotator,Mutator1.Mutator1,Mutator2.Mutator2
How to configure the settings (for server admins):

  1. Go to the rogame\config folder on your server
  2. Open the RODynamicMapRotator.ini file with a text editor
  3. Make your changes and save the file
  4. Restart your RO2 server

If you did it correctly, then DynamicMapRotator.DynamicMapRotator should be visible on the Current Game page of the web-admin tool.
 
Last edited:

GrimReality

FNG / Fresh Meat
Nov 8, 2009
242
97
0
www.deathb4dishonor.net
Question: Can this mutator support switching to a smaller/larger version of a map depending on server population? For example, if there are less than 16 players, can it switch to a 16-slot version of a map, and by the time the next map comes up say there are 24 players, can it then switch to a 32-slot version of that next map?
 

Ducky

Super Moderator
May 22, 2011
6,358
237
0
Netherlands
Question: Can this mutator support switching to a smaller/larger version of a map depending on server population? For example, if there are less than 16 players, can it switch to a 16-slot version of a map, and by the time the next map comes up say there are 24 players, can it then switch to a 32-slot version of that next map?
It will only switch map at the end of the round. It will not switch map in the middle of a round when more people join or people leave.

The main goal of this mutator is to select the next map to be more fitting to the number of players. So if more players did join, then the next map will be one that is more suitable for a larger number of players. How to set this up is explained in the configuration section in my OP.
 

-=THOR=-

FNG / Fresh Meat
Sep 20, 2011
1,050
50
0
The only problem when you put "maxplayers" in your map url, is that limits the number of slots of the server. I would prefer a variable that allows to select the small version, without modifying the number of slots. It is being discussed here:

http://forums.tripwireinteractive.com/showthread.php?t=75341

Very nice mutator btw! It will allow great flexibility for map rotations.
 

-=THOR=-

FNG / Fresh Meat
Sep 20, 2011
1,050
50
0
Mutator installed!

The server froze in a map change. I had previously forced a map change one or two maps earlier, I guess he didn't like this. After restarting the server I didn't changed maps manually and the rotator is working fine :D (gotta leave him alone ).

Is it possible to assign the "LastMapIndex" from the console?
What is the right way to force a map change? Do I need to leave a blank (call a map without the mutator, then call a map with the mutator) to erase the memory of the mutator?

Thanks!
 
Last edited:

Ducky

Super Moderator
May 22, 2011
6,358
237
0
Netherlands
Mutator installed!

The server froze in a map change. I had previously forced a map change one or two maps earlier, I guess he didn't like this. After restarting the server I didn't changed maps manually and the rotator is working fine :D (gotta leave him alone ).

Is it possible to assign the "LastMapIndex" from the console?
What is the right way to force a map change? Do I need to leave a blank (call a map without the mutator, then call a map with the mutator) to erase the memory of the mutator?

Thanks!
What command did you use to manually change the map?
 

-=THOR=-

FNG / Fresh Meat
Sep 20, 2011
1,050
50
0
The mutator had been running for a while, and we manually changed the map with this command:

Code:
TE-Apartments?minplayers=24?maxplayers=32?mutator=DynamicMapRotator.DynamicMapRotator
A few maps later (might be 1-2, dont remember), the server got stuck in the "changing maps" screen.
 
Last edited:

Ducky

Super Moderator
May 22, 2011
6,358
237
0
Netherlands
The mutator had been running for a while, and we manually changed the map with this command:

Code:
TE-Apartments?minplayers=24?maxplayers=32?mutator=DynamicMapRotator.DynamicMapRotator
A few maps later (might be 1-2, dont remember), the server got stuck in the "changing maps" screen.
Then it probably has no relation to the manually map change (I did those a lot during testing).

You have to understand that a mutator only stays on from map start 'till map end. After that the mutator will not be there anymore unless the next map is started with the mutator too. The mutator solves this by adding itself to the URL of the next map that it loads. In your case the server crashed a few maps later, at that time the manual map change was already forgotten. If correct, then there should be a closed server log file of that server crash. I'm interested in that one. It must be one of the server logs with "backup" in the file name. I'm interested in it, because the mutator will log each map URL that it loads. This way I can see what it tried to load.
 

-=THOR=-

FNG / Fresh Meat
Sep 20, 2011
1,050
50
0
Ok after reviewing the logs, it may not be related to changing maps manually.

We had a crash at 21:00 yesterday. It crashed at the end of TE-CommissarsHouse, before TE-RedOctoberFactory. Here's the last lines:

Code:
[5332.90] Log: Server switch level: TE-CommissarsHouse?minplayers=16?maxplayers=16?Mutator=DynamicMapRotator.DynamicMapRotator
[...]
[6577.93] Warning: ROPawn::FitCollision() failed to find a good spot for ROAlliedPawnLevel1SquadLeaderW_32
[6596.28] Error: FBitWriter::SerializeInt(): Value out of bounds (Value: 3222274048, ValueMax: 2097152)
[6596.28] Error: FBitWriter::SerializeInt(): Value out of bounds (Value: 3222274048, ValueMax: 2097152)
[6596.28] Error: FBitWriter::SerializeInt(): Value out of bounds (Value: 3222274048, ValueMax: 2097152)
[6601.34] Error: FBitWriter::SerializeInt(): Value out of bounds (Value: 3222274048, ValueMax: 2097152)
[6601.34] Error: FBitWriter::SerializeInt(): Value out of bounds (Value: 3222274048, ValueMax: 2097152)
[6601.34] Error: FBitWriter::SerializeInt(): Value out of bounds (Value: 3222274048, ValueMax: 2097152)
[6601.67] DevSpawn: SpawnActor failed because of collision at the spawn location [X=3710.134 Y=-7464.697 Z=133.410] for [RODroppedPickup]
[6601.67] DevSpawn: SpawnActor failed because of collision at the spawn location [X=3710.134 Y=-7464.697 Z=133.410] for [RODroppedPickup]
[6601.67] DevSpawn: SpawnActor failed because of collision at the spawn location [X=3710.134 Y=-7464.697 Z=133.410] for [RODroppedPickup]
[6601.67] DevSpawn: Spa
Later at 3:00, we got another crash:

Code:
[11416.87] Log: Server switch level: TE-CommissarsHouse?minplayers=16?maxplayers=16?Mutator=DynamicMapRotator.DynamicMapRotator
[...]
[21911.68] Warning: ROPawn::FitCollision() failed to find a good spot for ROAlliedPawnLevel1SquadLeaderW_35
[21941.52] Warning: Failed to find function StandToProneComplete for timer in actor ROAlliedPawnLevel1RiflemanW_100
[21941.91] Warning: Failed to find notify Prone_TO_Stand_rifle on ROAlliedPawnLevel1RiflemanW_100
[21965.27] DynamicMapRotator: Changing to 'TE-RedOctoberFactory?minplayers=16?maxplayers=16?Mutator=DynamicMapRotator.DynamicMapRotator'
[21969.25] Log: Server switch level: TE-RedOctoberFactory?minplayers=16?maxplay
In the first case, it crashed during the loadscreen, but obviously the log was delayed and the application crashed before giving much information.

In the second case, it had time to tell us about RedOctoberFactory. Looks like the problem might be related to that specific map, and thus not related to the mutator...

But anyway here's my config file for RedOctoberFactory, note that there's a gap where we don't want it to play:
Code:
MapFilters=(MinPlayerCount=0,MaxPlayerCount=6,MapURL="TE-RedOctoberFactory?minplayers=16?maxplayers=16")
MapFilters=(MinPlayerCount=7,MaxPlayerCount=12,MapURL="TE-RedOctoberFactory?minplayers=12?maxplayers=16")
MapFilters=(MinPlayerCount=25,MaxPlayerCount=32,MapURL="TE-RedOctoberFactory?minplayers=28?maxplayers=32")
 
Last edited:

Ducky

Super Moderator
May 22, 2011
6,358
237
0
Netherlands
What you can try is swapping Comm.House and Red Oct. Fact. in your Map Cycle (web-admin tool) and then see if the problem will still happen at loading time of Red Oct. or at the end of Com. House.
 

-=THOR=-

FNG / Fresh Meat
Sep 20, 2011
1,050
50
0
The server rotated successfully this time :confused:. Maybe it was just a coicidence. I'll keep an eye on it. If it crashes again I'll try to switch them.
 

Ducky

Super Moderator
May 22, 2011
6,358
237
0
Netherlands
Which maps can be played in small, medium and large setup?

Seems to be working using a basic configuration right now, but would like to tweak it further.

Nice one D :)
To be honest, I do not know which one has small/medium/large versions. I know they do exist and that it depends on the number of MaxPlayers which one will be selected, but I really do not know if that counts for all maps or just a few. Sorry!
 

LordGleedo

FNG / Fresh Meat
Jul 18, 2010
800
74
0
Bucks, England
www.theoldgitsarmy.com
To be honest, I do not know which one has small/medium/large versions. I know they do exist and that it depends on the number of MaxPlayers which one will be selected, but I really do not know if that counts for all maps or just a few. Sorry!
Actually, I could open up the maps in the SDK and take a look at the kismet, as that has different workflow for differing numbers of players. I will report back my findings.
 

Serathis

FNG / Fresh Meat
Oct 25, 2009
473
84
0
Always thought that the dynamic map size didn't make it into the game. Only seen more squads open up as the player count increases.
 
Status
Not open for further replies.