Mission Voting – Arma 3

From Bohemia Interactive Community
Jump to navigation Jump to search
(percentSideVotingThreshold)
m (Some wiki formatting)
Line 1: Line 1:
==Server Voting==
{{SideTOC}}
Documentation for server-side voting settings (since 1.39 DEV)
Documentation for server-side voting settings (since {{arma3}} 1.39 DEV)
 
=== Global voting settings ===


===Global voting settings===
Global voting settings are used if no voting threshold defined in allowedVoteCmds or/and allowedVotedAdminCmds
Global voting settings are used if no voting threshold defined in allowedVoteCmds or/and allowedVotedAdminCmds
:voteThreshold = <number>; // Percentage of votes needed to confirm a vote.  
<syntaxhighlight lang="cpp>
:voteMissionPlayers = <number>; //Start mission-voting when ''X'' numberOfPlayers connect.
voteThreshold = <number>; // Percentage of votes needed to confirm a vote.  
voteMissionPlayers = <number>; // Start mission-voting when ''X'' numberOfPlayers connect.
</syntaxhighlight>


----
==== Format ====
<br>
: '''allowedVoteCmds[] = {{'''''<commandName>'', ''<preMissionStart>'', ''<postMissionStart>'', ''<votingThreshold>'''''}, ...};''', where:
'''FORMAT'''
<br>
:'''allowedVoteCmds[] = {{'''''<commandName>'', ''<preMissionStart>'', ''<postMissionStart>'', ''<votingThreshold>'''''}, ...};''', where:
:* ''<commandName>'': [[String]] - name of the command, for example <tt>"admin"</tt>
:* ''<commandName>'': [[String]] - name of the command, for example <tt>"admin"</tt>
:* ''<preMissionStart>'' (Optional): [[Boolean]] - [[true]] to allow command before mission start. Default: [[true]]
:* ''<preMissionStart>'' (Optional): [[Boolean]] - [[true]] to allow command before mission start. Default: [[true]]
Line 18: Line 18:
:* ''<percentSideVotingThreshold>'' (Optional): [[Number]] - percent side threshold 0...1. Default: 0.5 (since Arma 3 1.90+ PerformaceBranch)
:* ''<percentSideVotingThreshold>'' (Optional): [[Number]] - percent side threshold 0...1. Default: 0.5 (since Arma 3 1.90+ PerformaceBranch)


{{Informative|Not using/specifying '''allowedVoteCmds[]''' param at all means every voting command is allowed!}}
{{Informative|Not using/specifying ''allowedVoteCmds[]'' param at all means every voting command is allowed!}}


<u>Example1</u>:
=== Examples ===
<syntaxhighlight lang=cpp>
 
<syntaxhighlight lang="cpp">
allowedVoteCmds[] = {}; // voting is disabled (not a single command is allowed)
allowedVoteCmds[] = {}; // voting is disabled (not a single command is allowed)
</syntaxhighlight>
</syntaxhighlight>


<u>Example2</u>:
 
<syntaxhighlight lang=cpp>
<syntaxhighlight lang="cpp">
allowedVoteCmds[] =  
allowedVoteCmds[] =
{
{
{"admin"}, // will default to {"admin", true, true, 0.5}
{ "admin" }, // will default to {"admin", true, true, 0.5}
{"missions", true, false, 0.5}, // not available after mission start
{ "missions", true, false, 0.5 }, // not available after mission start
{"mission", true, true}, // will use global <tt>voteThreshold</tt>
{ "mission", true, true }, // will use global <tt>voteThreshold</tt>
{"kick", false, false, 0.75}, // not available at all
{ "kick", false, false, 0.75 }, // not available at all
{"restart", true, true, -1}, // invalid threshold value. Will default to global <tt>voteThreshold</tt>
{ "restart", true, true, -1 }, // invalid threshold value. Will default to global <tt>voteThreshold</tt>
{"reassign", false, true, 0.5}, // not available before mission start
{ "reassign", false, true, 0.5 }, // not available before mission start
    {"kick", true, true, 0.55, 0.55} // means kicked in case either 55% of all players or 55% of players from his side (west, east, resistance, civilian) voted to kick him
{ "kick", true, true, 0.55, 0.30 } // means kicked in case either 55% of all players
// or 30% of players from his side (west, east, resistance, civilian) voted to kick him
};
};
</syntaxhighlight>
</syntaxhighlight>


===allowedVotedAdminCmds===
=== allowedVotedAdminCmds ===
;Definition of available commands for voted-in admins (this doesn't affect abilities of normal server admins):
 
:allowedVotedAdminCmds[] = { { "CMD1", pre-init, post-init },{ "CMD2", pre-init, post-init }, ... ,{ "CMDn", pre-init, post-init }};
; Definition of available commands for voted-in admins (this doesn't affect abilities of normal server admins):
: allowedVotedAdminCmds[] = { { "CMD1", pre-init, post-init },{ "CMD2", pre-init, post-init }, ... ,{ "CMDn", pre-init, post-init }};


Second and third parameter are optional. If not specified otherwise, they are true by default. (pre-init means prior to mission start, post-init means after a mission started) <br>
Second and third parameter are optional. If not specified otherwise, they are true by default. (pre-init means prior to mission start, post-init means after a mission started) <br>
Line 48: Line 51:


Commands available for voted admins:
Commands available for voted admins:
<syntaxhighlight lang=cpp>
<syntaxhighlight lang="cpp">
allowedVotedAdminCmds[] =  
allowedVotedAdminCmds[] =
{
{
{"mission", true, true},
{ "mission", true, true },
{"missions", true, true},
{ "missions", true, true },
{"restart", true, true},
{ "restart", true, true },
{"reassign", true, true},
{ "reassign", true, true },
{"kick", true, true}
{ "kick", true, true }
};
};
</syntaxhighlight>
== See Also ==
* [[server.cfg]]
* [[ArmA: Server configuration|Server Configuration]]
* [[Armed Assault:Dedicated Server]]
* [[ArmA: Server Side Scripting]]
* [[Operation Flashpoint:Dedicated Server]]
* [[Arma 3 Headless Client]]
* [[Arma 3: Server Security]]
* [[Arma: Mission rotation]]
* [[Arma 2 Mission Rotation]]
* [[Arma 2 OA: Multiple Mission Parameters Configuration]]


</syntaxhighlight>
----
==See Also==
*[[server.cfg]]
*[[ArmA: Server configuration|Server Configuration]]
*[[Armed Assault:Dedicated Server]]
*[[ArmA: Server Side Scripting]]
*[[Operation Flashpoint:Dedicated Server]]
*[[Arma_3_Headless_Client]]
*[[Arma_3:_Server_Security]]
*[[Arma:_Mission_rotation]]
*[[Arma_2_Mission_Rotation]]
*[[Arma_2_OA:_Multiple_Mission_Parameters_Configuration]]


[[Category:Arma 3: Multiplayer]]
[[Category:Arma 3: Multiplayer]]

Revision as of 19:26, 22 June 2020

Template:SideTOC Documentation for server-side voting settings (since Arma 3 1.39 DEV)

Global voting settings

Global voting settings are used if no voting threshold defined in allowedVoteCmds or/and allowedVotedAdminCmds

voteThreshold = <number>;		// Percentage of votes needed to confirm a vote. 
voteMissionPlayers = <number>;	// Start mission-voting when ''X'' numberOfPlayers connect.

Format

allowedVoteCmds[] = {{<commandName>, <preMissionStart>, <postMissionStart>, <votingThreshold>}, ...};, where:
  • <commandName>: String - name of the command, for example "admin"
  • <preMissionStart> (Optional): Boolean - true to allow command before mission start. Default: true
  • <postMissionStart> (Optional): Boolean - true to allow command after mission start. Default: true
  • <votingThreshold> (Optional): Number - voting threshold 0...1. Default: value assigned to voteThreshold param. Otherwise 0.5
  • <percentSideVotingThreshold> (Optional): Number - percent side threshold 0...1. Default: 0.5 (since Arma 3 1.90+ PerformaceBranch)
Not using/specifying allowedVoteCmds[] param at all means every voting command is allowed!

Examples

allowedVoteCmds[] = {}; // voting is disabled (not a single command is allowed)


allowedVoteCmds[] =
{
	{ "admin" },								// will default to {"admin", true, true, 0.5}
	{ "missions",	true,	false, 0.5 },		// not available after mission start
	{ "mission",	true,	true },				// will use global <tt>voteThreshold</tt>
	{ "kick",		false,	false, 0.75 },		// not available at all
	{ "restart",	true,	true, -1 },			// invalid threshold value. Will default to global <tt>voteThreshold</tt>
	{ "reassign",	false,	true, 0.5 },		// not available before mission start
	{ "kick",		true,	true, 0.55, 0.30 }	// means kicked in case either 55% of all players
												// or 30% of players from his side (west, east, resistance, civilian) voted to kick him
};

allowedVotedAdminCmds

Definition of available commands for voted-in admins (this doesn't affect abilities of normal server admins)
allowedVotedAdminCmds[] = { { "CMD1", pre-init, post-init },{ "CMD2", pre-init, post-init }, ... ,{ "CMDn", pre-init, post-init }};

Second and third parameter are optional. If not specified otherwise, they are true by default. (pre-init means prior to mission start, post-init means after a mission started)

Not listing any command ( allowedVotedAdminCmds[] = {}; ) means such commands are disabled for voted-in admin.
Not specifing allowedVotedAdminCmds at all means everything is allowed anytime for voted-in admin!

Commands available for voted admins:

allowedVotedAdminCmds[] =
{
	{ "mission",	true, true },
	{ "missions",	true, true },
	{ "restart",	true, true },
	{ "reassign",	true, true },
	{ "kick",		true, true }
};


See Also