-
Notifications
You must be signed in to change notification settings - Fork 1
Config
Config for this addon must be placed at:
$profile:V30/MapVoting/config.json
For example:
C:\Users\Vlad\Documents\My Games\ArmaReforger\profile\V30\MapVoting\config.json
{
"list": [
"#random",
"{DAA03C6E6099D50F}Missions/24_CombatOps.conf",
"{DFAC5FABD11F2390}Missions/26_CombatOpsEveron.conf"
]
}Limit number of avaible scenarios for voting after list has been defined acording to mode. Scenarios will be randomly excluded from list until it is reach defined limit. If defined should be greater than 1.
"count": 3Type: integer or null
Default: null
If set to true than #random option will never be removed (if presened) when applying count parameter, otherwise it can be randomly excluded.
"countPreserveRandom": trueType: boolean
Default: true
Defines who will be given the ability to vote for the scenario.
"giveVoteAbility": "game_masters"Type: string
Default: "all"
Avaiable options:
-
"administrators"- players with administrator role. -
"session_administrators"- players with session_administrators role or above. -
"game_masters"- players with session_administrators role or above and game masters. -
"all"- all players can vote. -
"none"- automatically giving vote ability is disabled, you should do this manually from scripts.
For manual adding ability to player use V30_MapVoting_GameModeComponent.GivePlayerVoteAbility(playerId) function.
Defines list of scenarios for some modes.
"list": [ "{DAA03C6E6099D50F}Missions/24_CombatOps.conf", "{DFAC5FABD11F2390}Missions/26_CombatOpsEveron.conf" ]Type: array of scenario (see below)
Default: []
Only scenarios specified in this list will be avaiable for voting.
Defines how the list of scenarios available for voting will be formed.
"mode": "whitelist"Type: string
Default: "whitelist"
Avaiable options:
-
"whitelist"- only scenarios defined in"list"parameter will be avaible for voting.
Skip scenario that has been voted last time.
"skipRepeats": trueType: boolean
Default: false
Last voted scenario is saved in $profile:V30/MapVoting/last.json.
For whitelist mode it is 0-based index of scenario in "list" parameter, except #random option.
Minimum number of players to apply threshold time.
"thresholdCount": 1Type: boolean or integer
If set to true then value defined in voting scenario will be used (Default: 1), otherwise this condition will not count.
"thresholdCount": falseNumber of player that should voted to apply threshold time.
"thresholdCount": 2Percentage of player that should voted to apply threshold time.
"thresholdPercentage": 100.0Type: boolean or number
Default: true
If set to true then value defined in voting scenario will be used (Default: 50%), otherwise this condition will not count.
"thresholdPercentage": falsePercentage value from 0.0 to 100.0.
"thresholdPercentage": 30.0Additional time limit that applies if conditions defined by thresholdPercentage or thresholdCount are meet.
Time defined by time parameter is continue to count, lower of both will be used.
If at some point condition will not meet then this addition time limit is no more applies and time returns to defined by time option.
"thresholdTime": 60Type: boolean or number
Default: true
If set to true then value defined in voting scenario will be used (Default: 30), otherwise it will be completely disabled.
"thresholdTime": falseTime in seconds.
"thresholdTime": 10Defines total time for voting.
"time": 300Type: number or boolean
Default: true
If set to true then time defined in voting scenario will be used (Default: 5 minutes), otherwise no time limit is applying.
"time": falseTime in seconds.
"time": 60Defines method to run voted scenario.
"runMethod": "ScriptedRestart"Type: string
Default: RequestScenarioChangeTransition
Avaialbe options:
-
"RequestScenarioChangeTransition"- using vanilasGameTransitions.RequestScenarioChangeTransitionmethod, don't require server to be restarted (Prefered, but currently generateJIP_ERROR) -
"Podval"- method used for Podval Community servers -
"ScriptedRestart"- voted scenario will be written into"$profile:V30/MapVoting/voted.json"file and game will be closed, so any external sript after exit from game executable can restart server with new config file with new scenario. (Example of these script can be found in External folder)
Randomly selects one of the remaining scenarios.
"#random"Specify scenario by it's header.
"{C41618FD18E9D714}Missions/23_Campaign_Arland.conf"{
"count": 3,
"countPreserveRandom": true,
"giveVoteAbility": "all",
"mode": "whitelist",
"skipRepeats": true,
"thresholdCount": 1,
"thresholdPercentage": 0.50,
"thresholdTime": 10,
"list": [
"#random",
"{C41618FD18E9D714}Missions/23_Campaign_Arland.conf",
"{28802845ADA64D52}Missions/23_Campaign_SWCoast.conf",
"{C700DB41F0C546E1}Missions/23_Campaign_NorthCentral.conf",
"{ECC61978EDCC2B5A}Missions/23_Campaign.conf"
],
"time": false
}