Arma 3 enabling vote mission @calibaan

Post Reply
User avatar
J-English
This is my homepage
This is my homepage
Posts: 618
https://www.youtube.com/channel/UC40BgXanDqOYoVCYFDSTfHA
Joined: Thu Apr 15, 2010 4:06 am
Location: United Kingdom

Arma 3 enabling vote mission @calibaan

Post by J-English »

how do i enable voting in arma..and disabling vote admin?

i used a similar template here

my server cfg i have something like this similar :

Code: Select all

// MISSIONS CYCLE (see below)
class Missions {
	class ARMA3 {
		template = invade and annex;				
		difficulty = "Regular";					
		Respawn = "2";
};

	class ARMA3 {
		template = teamdeathmatch;				
		difficulty = "Regular";					
		Respawn = "2";
		
};
		
	class ARMA3 {
		template = examplemission3;				
		difficulty = "Regular";					
		Respawn = "2"; 
	};
};


allowedLoadFileExtensions[] = {"hpp","sqs","sqf","fsm","cpp","paa","txt","xml","inc","ext","sqm","ods","fxy","lip","csv","kb","bik","bikb","html","htm","biedi"}; //only allow files with those extensions to be loaded via loadFile command (since Arma 3 build 1.19.124216)
allowedPreprocessFileExtensions[] = {"hpp","sqs","sqf","fsm","cpp","paa","txt","xml","inc","ext","sqm","ods","fxy","lip","csv","kb","bik","bikb","html","htm","biedi"}; //only allow files with those extensions to be loaded via preprocessFile/preprocessFileLineNumber commands (since Arma 3 build 1.19.124323)
allowedHTMLLoadExtensions[] = {"htm","html","xml","txt"}; //only allow files with those extensions to be loaded via HTMLLoad command (since Arma 3 build 1.27.126715)
//allowedHTMLLoadURIs = {}; // Leave commented to let missions/campaigns/addons decide what URIs are supported. Uncomment to define server-level
allowedVoteCmds[] = {}; // disable voting
If i want to allow vote commads for players to vote for a new gamemode/map will this be correct instead? check if my brackets are ok?

Code: Select all

// VOTING
voteMissionPlayers=1;  // Tells the server how many people must connect so that it displays the mission selection screen.
voteThreshold=0.33; // 33% or more players need to vote for something, for example an admin or a new map, to become effective
allowedVoteCmds[] = {{"mission", true, true},
Caliban55
This is my homepage
This is my homepage
Posts: 439
Joined: Sat Sep 04, 2010 10:20 am
Location: Cologne, Gemany
Contact:

Re: Arma 3 enabling vote mission @calibaan

Post by Caliban55 »

Made a few correction there J-English. It is best to use unique names for the mission class arrays (ARMA3_m1, ...) and the respawn parameters have to be provided in the description.ext file, or you can apply an additional parameter array, if the mission support this.

The mission template name has to be wrapped in quotes to address it as type string.

Voting should be possible in the way you defined it for players.

Code: Select all

// MISSIONS CYCLE (see below)
class Missions 
	{
	   class ARMA3_m1 
		   {
			  template = "invade and annex";            
			  difficulty = "Regular";
				  class Params
					{
						Respawn = "2";
					};
			};

	   class ARMA3_m2 
			{
			  template = "teamdeathmatch";            
			  difficulty = "Regular";
			  
			};
		  
	   class ARMA3_m3 
		   {
			  template = "examplemission3";            
			  difficulty = "Regular";
		   };
	};


allowedLoadFileExtensions[] = {"hpp","sqs","sqf","fsm","cpp","paa","txt","xml","inc","ext","sqm","ods","fxy","lip","csv","kb","bik","bikb","html","htm","biedi"}; //only allow files with those extensions to be loaded via loadFile command (since Arma 3 build 1.19.124216)
allowedPreprocessFileExtensions[] = {"hpp","sqs","sqf","fsm","cpp","paa","txt","xml","inc","ext","sqm","ods","fxy","lip","csv","kb","bik","bikb","html","htm","biedi"}; //only allow files with those extensions to be loaded via preprocessFile/preprocessFileLineNumber commands (since Arma 3 build 1.19.124323)
allowedHTMLLoadExtensions[] = {"htm","html","xml","txt"}; //only allow files with those extensions to be loaded via HTMLLoad command (since Arma 3 build 1.27.126715)
//allowedHTMLLoadURIs = {}; // Leave commented to let missions/campaigns/addons decide what URIs are supported. Uncomment to define server-level

allowedVoteCmds[] = {{"mission", true, true}};
allowedVotedAdminCmds[] = {};
User avatar
J-English
This is my homepage
This is my homepage
Posts: 618
Joined: Thu Apr 15, 2010 4:06 am
Location: United Kingdom

Re: Arma 3 enabling vote mission @calibaan

Post by J-English »

Thanks for that calibaan55.
The vote mission tab is not showing when pressing M for map.The admin tab is disabled which is good.

As a player i also tried #vote missions in the chat.server responded with "voting disabled on this server"
Do i probably need to create a whitelist for my missions maybe?
Caliban55
This is my homepage
This is my homepage
Posts: 439
Joined: Sat Sep 04, 2010 10:20 am
Location: Cologne, Gemany
Contact:

Re: Arma 3 enabling vote mission @calibaan

Post by Caliban55 »

J-English wrote:Thanks for that calibaan55.
The vote mission tab is not showing when pressing M for map.The admin tab is disabled which is good.

As a player i also tried #vote missions in the chat.server responded with "voting disabled on this server"
Do i probably need to create a whitelist for my missions maybe?
I did not test the voting functions after the last updates, so try to define the mission whitelist option:

Code: Select all

missionWhitelist[] = {"mission1","mission2",...};
Also check your voteThreshold setting. Does it give you the optin to vote/select a mission on the server connection screen?
User avatar
J-English
This is my homepage
This is my homepage
Posts: 618
Joined: Thu Apr 15, 2010 4:06 am
Location: United Kingdom

Re: Arma 3 enabling vote mission @calibaan

Post by J-English »

#Login in as admin then typing in #missions work..but as a normal player there is no option for vote mission on connect..my votethreshold setting is left at 33% default
Caliban55
This is my homepage
This is my homepage
Posts: 439
Joined: Sat Sep 04, 2010 10:20 am
Location: Cologne, Gemany
Contact:

Re: Arma 3 enabling vote mission @calibaan

Post by Caliban55 »

J-English wrote:#Login in as admin then typing in #missions work..but as a normal player there is no option for vote mission on connect..my votethreshold setting is left at 33% default
The command #vote missions (issued as a standard player in group chat) works for me. Make sure that BattlEye is running correctly and als try to use the following command for allowedVoteCmds[] = {};

Code: Select all

allowedVoteCmds[] = {{"missions", true, "true", 0.1}, {"restart", true, true, 0.1}};
Please also post your server.cfg, so that I can take a look at it.
User avatar
J-English
This is my homepage
This is my homepage
Posts: 618
Joined: Thu Apr 15, 2010 4:06 am
Location: United Kingdom

Re: Arma 3 enabling vote mission @calibaan

Post by J-English »

Code: Select all

// JOINING RULES


kickDuplicate=1; // Each ArmA version has its own ID. If kickDuplicate is set to 1, a player will be kicked when he joins a server where another player with the same ID is playing.
verifySignatures=2; // Verifies the players files by checking them with the .bisign signatures. Works properly from 1.08 on
equalModRequired=0; // If set to 1, player has to use exactly the same -mod= startup parameter as the server.



// VOTING
voteMissionPlayers=1;  // Tells the server how many people must connect so that it displays the mission selection screen.
voteThreshold=0.33; // 33% or more players need to vote for something, for example an admin or a new map, to become effective








// INGAME SETTINGS
disableVoN=0; // If set to 1, Voice over Net will not be available
vonCodecQuality=8; // Quality from 1 to 10
persistent=0; // If 1, missions still run on even after the last player disconnected.



// SCRIPTING ISSUES
onUserConnected=""; // self-explaining
onUserDisconnected="";
doubleIdDetected="";
regularCheck="";




// some ArmA specific stuff - signature verification
onUnsignedData = "kick (_this select 0)"; // unsigned data detected
onHackedData = "ban (_this select 0)"; // tampering of the signature detected
//onDifferentData=""; // data with a valid signature, but different version than the one present on server detected
//BattlEye=1; //Server to use BattlEye system

// MISSIONS CYCLE (see below)
class Missions 
   {
      class ARMA3_m1 
         {
           template = "tdm50_altis-air-combat.altis";            
           difficulty = "Regular";
              class Params
               {
                  Respawn = "3";
               };
         };

      class ARMA3_m2 
         {
           template = "Paintball.Stratis";            
           difficulty = "Regular";
           
         };
        
      class ARMA3_m3 
         {
           template = "PaintBallArenaV1.0.Stratis";            
           difficulty = "Regular";
         };

       class ARMA3_m4
         {
           template = "tdm45_maze-runners.vr";            
           difficulty = "Regular";
           
         

       };
   };


allowedLoadFileExtensions[] = {"hpp","sqs","sqf","fsm","cpp","paa","txt","xml","inc","ext","sqm","ods","fxy","lip","csv","kb","bik","bikb","html","htm","biedi"}; //only allow files with those extensions to be loaded via loadFile command (since Arma 3 build 1.19.124216)
allowedPreprocessFileExtensions[] = {"hpp","sqs","sqf","fsm","cpp","paa","txt","xml","inc","ext","sqm","ods","fxy","lip","csv","kb","bik","bikb","html","htm","biedi"}; //only allow files with those extensions to be loaded via preprocessFile/preprocessFileLineNumber commands (since Arma 3 build 1.19.124323)
allowedHTMLLoadExtensions[] = {"htm","html","xml","txt"}; //only allow files with those extensions to be loaded via HTMLLoad command (since Arma 3 build 1.27.126715)
//allowedHTMLLoadURIs = {}; // Leave commented to let missions/campaigns/addons decide what URIs are supported. Uncomment to define server-level

allowedVoteCmds[] = {{"missions", true, "true", 0.1}, {"restart", true, true, 0.1}};
allowedVotedAdminCmds[] = {};



	


language="English";
adapter=-1;
3D_Performance=8021.000000;
Resolution_W=160;
Resolution_H=120;
Resolution_Bpp=32;
viewDistance=10000;
terrainGrid=10.000000;
MinBandwidth = 15000000;
MaxBandwidth = 100000000;
MaxMsgSend = 1024;
MaxSizeGuaranteed = 1024;
MaxSizeNonguaranteed = 64;
MinErrorToSend = 0.0025;
MaxCustomFileSize=0;


//-----------BIS Suggestions------------

//MinBandwidth = 320000;
//* Bandwidth the server is guaranteed to have (in bps). This value helps server to estimate bandwidth available. Increasing it to too optimistic values can increase lag and CPU load, as too many messages will be sent but discarded. Default: 131072

//MaxBandwidth = 10000000000;
//*Bandwidth the server is guaranteed to never have. This value helps the server to estimate bandwidth available.

//MaxMsgSend = 256;
//* Maximum number of messages that can be sent in one simulation cycle. Increasing this value can decrease lag on high upload bandwidth servers. Default: 128

//MaxSizeGuaranteed = 1024;
//*Maximum size of guaranteed packet in bytes (without headers). Small messages are packed to larger frames. Guaranteed messages are used for non-repetitive events like shooting. Default: 512

//MaxSizeNonguaranteed = 64;
//*Maximum size of non-guaranteed packet in bytes (without headers). Non-guaranteed messages are used for repetitive updates like soldier or vehicle position. Increasing this value may improve bandwidth requirement, but it may increase lag. Default: 256

//MinErrorToSend = 0.005;
//*Minimal error to send updates across network. Using a smaller value can make units observed by binoculars or sniper rifle to move smoother. Default: 0.01

//MaxCustomFileSize = 0;
//*Users with custom face or custom sound larger than this size are kicked when trying to connect.

Typing in #vote missions takes me to this page
Image
Caliban55
This is my homepage
This is my homepage
Posts: 439
Joined: Sat Sep 04, 2010 10:20 am
Location: Cologne, Gemany
Contact:

Re: Arma 3 enabling vote mission @calibaan

Post by Caliban55 »

That looks a bit strange. The network configuration should be in the basic.cfg, not in the server.cfg.

Try this instead:

Code: Select all

// GLOBAL SETTINGS
hostname = "Fun and Test Server";		// The name of the server that shall be displayed in the public server list
password = "";					// Password for joining, eg connecting to the server
passwordAdmin = "xyz";				// Password to become server admin. When you're in Arma MP and connected to the server, type '#login xyz'
serverCommandPassword = "xyzxyz";               // Password required by alternate syntax of [[serverCommand]] server-side scripting.
 
logFile = "arma3_server_console.log";			// Tells ArmA-server where the logfile should go and what it should be called
 
 
// WELCOME MESSAGE ("message of the day")
// It can be several lines, separated by comma
// Empty messages "" will not be displayed at all but are only for increasing the interval
motd[] = {
	"", "",  
	"Two empty lines above for increasing interval",
	"Welcome to our server",
	"", "",  
	"We are looking for fun - Join us Now !",
	"http://www.example.com",
	"One more empty line below for increasing interval",
	""
};
motdInterval = 5;				// Time interval (in seconds) between each message
 
 
// JOINING RULES
checkfiles[] = {};				// Outdated.
maxPlayers = 64;				// Maximum amount of players. Civilians and watchers, beholder, bystanders and so on also count as player.
kickDuplicate = 1;				// Each ArmA version has its own ID. If kickDuplicate is set to 1, a player will be kicked when he joins a server where another player with the same ID is playing.
verifySignatures = 2;				// Verifies .pbos against .bisign files. Valid values 0 (disabled), 1 (prefer v2 sigs but accept v1 too) and 2 (only v2 sigs are allowed). 
equalModRequired = 0;				// Outdated. If set to 1, player has to use exactly the same -mod= startup parameter as the server.
allowedFilePatching = 0;                        // Allow or prevent client using -filePatching to join the server. 0, is disallow, 1 is allow HC, 2 is allow all clients (since Arma 3 1.49+)
//requiredBuild = 12345				// Require clients joining to have at least build 12345 of game, preventing obsolete clients to connect
 
 
// VOTING
voteMissionPlayers = 1;				// Tells the server how many people must connect so that it displays the mission selection screen.
voteThreshold = 0.1;				// 33% or more players need to vote for something, for example an admin or a new map, to become effective

allowedVoteCmds[] = {{"missions", true, "true", 0.1}, {"restart", true, true, 0.1}};
allowedVotedAdminCmds[] = {};

 
// INGAME SETTINGS
disableVoN = 1;					// If set to 1, Voice over Net will not be available
vonCodecQuality = 0;				// since 1.62.95417 supports range 1-20 //since 1.63.x will supports range 1-30 //8kHz is 0-10, 16kHz is 11-20, 32kHz is 21-30
persistent = 1;					// If 1, missions still run on even after the last player disconnected.
timeStampFormat = "short";			// Set the timestamp format used on each report line in server-side RPT file. Possible values are "none" (default),"short","full".
BattlEye = 1;					// Server to use BattlEye system
allowedLoadFileExtensions[] = {"hpp","sqs","sqf","fsm","cpp","paa","txt","xml","inc","ext","sqm","ods","fxy","lip","csv","kb","bik","bikb","html","htm","biedi"}; //only allow files with those extensions to be loaded via loadFile command (since Arma 3 build 1.19.124216)
allowedPreprocessFileExtensions[] = {"hpp","sqs","sqf","fsm","cpp","paa","txt","xml","inc","ext","sqm","ods","fxy","lip","csv","kb","bik","bikb","html","htm","biedi"}; //only allow files with those extensions to be loaded via preprocessFile/preprocessFileLineNumber commands (since Arma 3 build 1.19.124323)
allowedHTMLLoadExtensions[] = {"htm","html","xml","txt"}; //only allow files with those extensions to be loaded via HTMLLoad command (since Arma 3 build 1.27.126715)
//allowedHTMLLoadURIs = {}; // Leave commented to let missions/campaigns/addons decide what URIs are supported. Uncomment to define server-level restrictions for URIs
 
 
// SCRIPTING ISSUES
onUserConnected = "";				//
onUserDisconnected = "";			//
doubleIdDetected = "";				//
//regularCheck = "{}";				//  Server checks files from time to time by hashing them and comparing the hash to the hash values of the clients. //deprecated
 
// SIGNATURE VERIFICATION
onUnsignedData = "kick (_this select 0)";	// unsigned data detected
onHackedData = "ban (_this select 0)";		// tampering of the signature detected
onDifferentData = "";				// data with a valid signature, but different version than the one present on server detected
 
 
// MISSIONS CYCLE (see below)
class Missions 
   {
      class ARMA3_m1 
         {
           template = "tdm50_altis-air-combat.altis";            
           difficulty = "Regular";
         };

      class ARMA3_m2 
         {
           template = "Paintball.Stratis";            
           difficulty = "Regular";
         };
        
      class ARMA3_m3 
         {
           template = "PaintBallArenaV1.0.Stratis";            
           difficulty = "Regular";
         };

       class ARMA3_m4
         {
           template = "tdm45_maze-runners.vr";            
           difficulty = "Regular";
       };
   };
 
missionWhitelist[] = {}; //an empty whitelist means there is no restriction on what missions' available
Are all missions correctly installed in the MPMissions folder on the server? And what does page 2 of the voting screen say?
User avatar
J-English
This is my homepage
This is my homepage
Posts: 618
Joined: Thu Apr 15, 2010 4:06 am
Location: United Kingdom

Re: Arma 3 enabling vote mission @calibaan

Post by J-English »

Page 2 i get this(screenshot1).Then after that you just get a background picture of altis if you hit disconnect or if you dont do anything.Just hangs there(screenshot2).Strange indeed old chap.
I used your server.cfg exampe.


screenshot1
Image

Hangs when you hit disconnect
screenshot2
Image
Caliban55
This is my homepage
This is my homepage
Posts: 439
Joined: Sat Sep 04, 2010 10:20 am
Location: Cologne, Gemany
Contact:

Re: Arma 3 enabling vote mission @calibaan

Post by Caliban55 »

I did a few more detailed test runs with the following results:

If you issue the #vote missions command and the vote treshold limit is met, the server changes from the "Game started" state to the "Created, waiting" state. The players who want to vote have now to disconnect and re-connect to the server and have access to the voting menu, where they can vote for a mission setup. Once the vote criteria are fullfilled, the server starts with the voted mission. Using teh missionWhitelist array also helps to order the available missions.

To sum it up: #vote missions -> disconnect from the server -> re-connect to the server
User avatar
J-English
This is my homepage
This is my homepage
Posts: 618
Joined: Thu Apr 15, 2010 4:06 am
Location: United Kingdom

Re: Arma 3 enabling vote mission @calibaan

Post by J-English »

Caliban55 wrote:I did a few more detailed test runs with the following results:

If you issue the #vote missions command and the vote treshold limit is met, the server changes from the "Game started" state to the "Created, waiting" state. The players who want to vote have now to disconnect and re-connect to the server and have access to the voting menu, where they can vote for a mission setup. Once the vote criteria are fullfilled, the server starts with the voted mission. Using teh missionWhitelist array also helps to order the available missions.

To sum it up: #vote missions -> disconnect from the server -> re-connect to the server
Weird,must be a bug that Bi have never fixed.What do you think of this script?
how would i implement his.

cheers calibaan

https://forums.bistudio.com/topic/15416 ... -missions/
Caliban55
This is my homepage
This is my homepage
Posts: 439
Joined: Sat Sep 04, 2010 10:20 am
Location: Cologne, Gemany
Contact:

Re: Arma 3 enabling vote mission @calibaan

Post by Caliban55 »

J-English wrote:
Caliban55 wrote:I did a few more detailed test runs with the following results:

If you issue the #vote missions command and the vote treshold limit is met, the server changes from the "Game started" state to the "Created, waiting" state. The players who want to vote have now to disconnect and re-connect to the server and have access to the voting menu, where they can vote for a mission setup. Once the vote criteria are fullfilled, the server starts with the voted mission. Using teh missionWhitelist array also helps to order the available missions.

To sum it up: #vote missions -> disconnect from the server -> re-connect to the server
Weird,must be a bug that Bi have never fixed.What do you think of this script?
how would i implement his.

cheers calibaan

https://forums.bistudio.com/topic/15416 ... -missions/
The script mentioned in the link only displays an action for the connected players to do a (basic) voting, it does not actually do anything after this point (switch to a voted map). For your purpose, it is not useful.

The best option would be to create a diary entry that would create a vote and then execute a server restart with the selected map, or directly link to the voting dialog that BI uses, or create a class mod for voting. But I fear that the ideal way for this would be a Finite State Machine script. The voting -> mission change is not so trivial anymore, as it requires a deep intergration into the core engine function and that has to be done in a efficient and secure way.

I would probably recommend to stick with the current voting system, though it is not really an optimal integration.
Post Reply