Jump to content
Sign in to follow this  
ALPHIVE

Set difficulty on hosted serveur ? (Not dedicated, Through Multiplayer > Host )

Recommended Posts

Hi everybody,

 

Do you know how can i set difficulty on a serveur that i host directly through my game ?

 

(not dedicated server, when i mean host through my game, i mean : i launch the game, i go to Multiplayer, then Host, and i start my serveur)

 

thank your for your help 😉

Share this post


Link to post
Share on other sites

I believe that the difficulty of your server will be the difficulty you've got set on your client.

Share this post


Link to post
Share on other sites
6 hours ago, ALPHIVE said:

Do you know how can i set difficulty on a serveur that i host directly through my game ?

Hi ALPHIVE, heres something you can try:

 

For the mission that you plan to host, do the following:

1. Create a Description.ext (if you have one already then use that, if not then create one)  can be created using notepad,

make sure the title of it is exactly as spelled ----> Description.ext  and not Description.ext.txt

=================

 

2.  In the Description.ext add the following code:

class Params
    {
    
    class AISkill
        {
            title = "AI Skill"; // Param name visible in the list
            texts[] = {"Very Easy","Easy","Normal","Hard", "Very Hard"}; // AI difficulty
            values[] = {0,1,2,3,4}; // Description of each selectable item            
            default = 1; // Default value; must be listed in 'values' array, otherwise 0 is used
        };
        
    };    

Note in your Description.ext make sure you have a class header like this for example:

 

class Header
{
  gameType = Coop;
  minPlayers = 1;
  maxPlayers = 5;
};

respawn = "base";
respawndelay = 10;

onLoadName = "Server Difficulty";
onLoadMission = "test";
author = "your name";

 

So header above first or if you have one already, then add the params code above below the header.

=====================

 

3. Create a script (start notepad, or notepad++ and create a new document)

Name the new script this ---->   Skill.sqf

 

In this script put the following code:

//AI Skill  

_unit = _this select 0;
_level = _this select 1;

if (_level == 0) then {
	
	_unit setskill ["aimingAccuracy",0.01];
	_unit setskill ["aimingShake",0.02];
	_unit setskill ["aimingSpeed",0.01];
	_unit setskill ["spotDistance",0.3];
	_unit setskill ["spotTime",0.1];
	_unit setskill ["courage",0.03];
	_unit setskill ["reloadSpeed",0.2];
	_unit setskill ["commanding",0.5];
	_unit setskill ["general",0.3];
	vardebug2 = 0;
		
};
if (_level == 1) then {
	
	_unit setskill ["aimingAccuracy",0.02];
	_unit setskill ["aimingShake",0.02];
	_unit setskill ["aimingSpeed",0.1];
	_unit setskill ["spotDistance",0.3];
	_unit setskill ["spotTime",0.2];
	_unit setskill ["courage",0.1];
	_unit setskill ["reloadSpeed",0.3];
	_unit setskill ["commanding",0.5];
	_unit setskill ["general",0.3];
	vardebug2 = 1;
		
};
if (_level == 2) then {
	
	_unit setskill ["aimingAccuracy",0.2];
	_unit setskill ["aimingShake",0.2];
	_unit setskill ["aimingSpeed",0.2];
	_unit setskill ["spotDistance",0.2];
	_unit setskill ["spotTime",0.4];
	_unit setskill ["courage",0.3];
	_unit setskill ["reloadSpeed",0.5];
	_unit setskill ["commanding",0.6];
	_unit setskill ["general",0.7];
	vardebug2 = 2;
	

};
if (_level == 3) then {
	
	_unit setskill ["aimingAccuracy",0.02];
	_unit setskill ["aimingShake",0.02];
	_unit setskill ["aimingSpeed",0.05];
	_unit setskill ["spotDistance",0.3];
	_unit setskill ["spotTime",0.5];
	_unit setskill ["courage",0.4];
	_unit setskill ["reloadSpeed",0.4];
	_unit setskill ["commanding",0.7];
	_unit setskill ["general",0.7];
	vardebug2 = 3;

};

if (_level == 4) then {
	
	_unit setskill ["aimingAccuracy",0.4];
	_unit setskill ["aimingShake",0.4];
	_unit setskill ["aimingSpeed",0.4];
	_unit setskill ["spotDistance",0.4];
	_unit setskill ["spotTime",0.5];
	_unit setskill ["courage",0.7];
	_unit setskill ["reloadSpeed",0.5];
	_unit setskill ["commanding",0.9];
	_unit setskill ["general",0.9];
	vardebug2 = 4;

};

4. Put both Description.ext and the skill.sqf in your mission folder same place as the mission.sqm

 

5.  Test in MP Lan - When you go to MP Lan, and are in the lobby where you choose your player, you will see the word Parameters at the top right

click on it to open, and you will see on the top left AI Skill click on that and set your desired difficulty.

 

What this does is for the mission alone is set the AI skill, their difficulty level for the mission.

Now you can tweak or adjust the numbers per level if you want, so in the skill.sqf you have levels 0-4,  

0 being very easy, 

1 being easy etc,.

 

Each code for example in level 0 :

 

if (_level == 4) then {
    
    _unit setskill ["aimingAccuracy",0.4];
    _unit setskill ["aimingShake",0.4];
    _unit setskill ["aimingSpeed",0.4];
    _unit setskill ["spotDistance",0.4];
    _unit setskill ["spotTime",0.5];
    _unit setskill ["courage",0.7];
    _unit setskill ["reloadSpeed",0.5];
    _unit setskill ["commanding",0.9];
    _unit setskill ["general",0.9];
    vardebug2 = 4;

 

The numbers i bolded there are what you adjust, here is a reference on what these numbers mean:

https://community.bistudio.com/wiki/Arma_3_AI_Skill

 

If you want to go into it further and try other things, here is a good thread that goes into it,

and discusses aspects of it, as well as code to work with:

Hope that helps. Cheers!

 

Share this post


Link to post
Share on other sites

Hi and thank you for your help 😉

 

I want to set difficulty not for AI, but to remove killing message and crosshair, is it the same way ?

Share this post


Link to post
Share on other sites

Ah ok sorry about that, in the future suggest being more specific, but as far as difficulty goes,

that should be done through the options menu as Stanhope pointed out, so go to Options ---> Game ---> Difficulty

Everything you want will be under that.

 

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×