![]() |
![]() |
|
#1
|
||||
|
||||
|
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 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") 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 Consider the following manual map change URL: Code:
TE-FallenFighters?mutator=DynamicMapRotator.DynamicMapRotator 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_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 "" 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
Last edited by -=THOR=-; 08-21-2012 at 03:10 PM. |
|
#2
|
||||
|
||||
|
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.
__________________
|
|
#3
|
||||
|
||||
|
Good idea, thanks for the help, again
|
|
#4
|
||||
|
||||
|
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 by -=THOR=-; 08-21-2012 at 03:26 PM. |
![]() |
| Thread Tools | |
| Display Modes | |
|
|