Jump to content
pierremgi

Custom difficulty on dedicated server

Recommended Posts

Hi all and happy new year,

I know there are plenty of links about this topic, but I litterally spent hours trying to make it work with no success.

 

I can launch a dedicated server on my laptop and play straight the mission specified in my config server (.cfg) in MISSION CYCLE, on another PC as client.

 

my config looks like:

class Missions {

  class Mission1 {

   template="Chernarus_warlords.Chernarus_Winter";

   difficulty = "Custom" // this seems to be OK. I'm on a "custom" difficulty (but not those what I want). If I remove this line, it's regular by default. So Mission1 works.

  };

};

 

For customizing my difficulty, I tried:

Adding an hpp (included in description.ext)
 

Spoiler

 

class CfgDifficultyPresets
{
    defaultPreset = Custom;  // not regular

    // Parameters that affect difficulty and which are shared among presets
    myArmorCoef = 1.5;
    groupArmorCoef = 1.5;

    //Parameters that affect the Limited distance choice for Group Indicators, Friendly Name Tags, Enemy Name Tags and Detected Mines.
    //They determine on which distance the indicators are fully visible and how many more meters it takes until the indicator fades-out completely.
    fadeDistanceStart = 40.0;
    fadeDistanceSpan = 10.0;

    recoilCoef = 1;
    visionAidCoef = 0.8;
    divingLimitMultiplier = 1.0;        //Multiplier to limit capacity of lungs for soldiers.

    animSpeedCoef = 0;
    cancelThreshold = 0;            //Threshold used for interrupting action.
    showCadetHints = 0; // (0 = disabled, 1 = enabled)
    showCadetWP = 0; // (0 = disabled, 1 = enabled)

    class Custom
    {
        displayName = $STR_Difficulty_Custom;        //Name of the difficulty preset.
        optionDescription = "MGI custom difficulties";                                      //Description
        optionPicture = "\A3\Ui_f\data\Logos\arma3_white_ca.paa"; //Picture
        levelAI = "AILevelMedium";//Level of AI skill

                //All options of the Custom preset are set by the engine. The values in config
        class Options
        {
            // Simulation
            reducedDamage = 0;    // Reduced damage (0 = disabled, 1 = enabled)

            // Situational awareness
            groupIndicators = 1;      // Group indicators   (0 = never, 1 = limited distance, 2 = always)
            friendlyTags = 0;         // Friendly name tags (0 = never, 1 = limited distance, 2 = always)
            enemyTags = 0;            // Enemy name tags    (0 = never, 1 = limited distance, 2 = always)
            detectedMines = 0;        // Detected mines     (0 = never, 1 = limited distance, 2 = always)
            commands = 0;             // Commands           (0 = never, 1 = fade out, 2 = always)
            waypoints = 0;            // Waypoints          (0 = never, 1 = fade out, 2 = always)
            tacticalPing = 1;       //Tactical Ping (0 = disabled, 1 = enabled)

            // Personal awareness
            weaponInfo = 1;           // Weapon info        (0 = never, 1 = fade out, 2 = always)
            stanceIndicator = 1;      // Stance indicator   (0 = never, 1 = fade out, 2 = always)
            staminaBar = 0;       // Stamina bar (0 = disabled, 1 = enabled)
            weaponCrosshair = 0;  // Weapon crosshair (0 = disabled, 1 = enabled)
            visionAid = 0;        // Vision aid (0 = disabled, 1 = enabled)

            // View
            thirdPersonView = 1;  // 3rd person view (0 = disabled, 1 = enabled)
            cameraShake = 1;      // Camera shake (0 = disabled, 1 = enabled)

            // Multiplayer
            scoreTable = 0;       // Score table (0 = disabled, 1 = enabled)
            deathMessages = 1;    // Killed by (0 = disabled, 1 = enabled)
            vonID = 0;            // VON ID (0 = disabled, 1 = enabled)

            // Misc
            mapContent = 0;       // Extended map content (0 = disabled, 1 = enabled)
            autoReport = 1;       // Automatic reporting (0 = disabled, 1 = enabled)
            multipleSaves = 1;    // Multiple saves (0 = disabled, 1 = enabled)
        };
    };
};

 

 

or adding these presets in the server profile:  server.Arma3Profile in my ...Arma3\A3Master\users\server like this:
 

Spoiler

 

version=1;
blood=1;
singleVoice=0;
gamma=1;
brightness=1;
maxSamplesPlayed=96;
sceneComplexity=400000;
shadowZDistance=100;
viewDistance=1000;
preferredObjectViewDistance=800;
terrainGrid=25;
volumeCD=10;
volumeFX=10;
volumeSpeech=10;
volumeVoN=10;
vonRecThreshold=0.029999999;


class DifficultyPresets
{
    class CustomDifficulty
    {
        class Options
        {
            /* Simulation */

            reducedDamage = 0;        // Reduced damage

            /* Situational awareness */

            groupIndicators = 1;        // Group indicators (0 = never, 1 = limited distance, 2 = always)
            friendlyTags = 0;        // Friendly name tags (0 = never, 1 = limited distance, 2 = always)
            enemyTags = 0;            // Enemy name tags (0 = never, 1 = limited distance, 2 = always)
            detectedMines = 0;        // Detected mines (0 = never, 1 = limited distance, 2 = always)
            commands = 1;            // Commands (0 = never, 1 = fade out, 2 = always)
            waypoints = 0;            // Waypoints (0 = never, 1 = fade out, 2 = always)
            tacticalPing = 1;        // Tactical ping (0 = disable, 1 = enable)

            /* Personal awareness */

            weaponInfo = 1;            // Weapon info (0 = never, 1 = fade out, 2 = always)
            stanceIndicator = 1;        // Stance indicator (0 = never, 1 = fade out, 2 = always)
            staminaBar = 0;            // Stamina bar
            weaponCrosshair = 0;        // Weapon crosshair
            visionAid = 0;            // Vision aid

            /* View */

            thirdPersonView = 1;        // 3rd person view
            cameraShake = 1;        // Camera shake

            /* Multiplayer */

            scoreTable = 1;            // Score table
            deathMessages = 1;        // Killed by
            vonID = 1;            // VoN ID

            /* Misc */

            mapContent = 0;            // Extended map content
            autoReport = 1;            // (former autoSpot) Automatic reporting of spotted enemied by players only. This doesn't have any effect on AIs.
            multipleSaves = 1;        // Multiple saves
        };
        
        // aiLevelPreset defines AI skill level and is counted from 0 and can have following values: 0 (Low), 1 (Normal), 2 (High), 3 (Custom).
        // when 3 (Custom) is chosen, values of skill and precision are taken from the class CustomAILevel.
        aiLevelPreset = 3;
    };

    class CustomAILevel
    {
        skillAI = 0.5;
        precisionAI = 0.5;
    };
};

 

 

My server.bat is:

 

Spoiler

@echo off
start /high "" "C:\Program Files (x86)\Steam\steamapps\common\Arma 3\arma3server_x64.exe" -init=playMission["","C:\Program Files (x86)\Steam\steamapps\common\Arma 3\MPMissions\CHERNARUS_WARLORDS"] "-mod=C:\Program Files (x86)\Steam\steamapps\common\Arma 3\!Workshop\@CBA_A3;C:\Program Files (x86)\Steam\steamapps\common\Arma 3\!Workshop\@CUP Terrains - Core;C:\Program Files (x86)\Steam\steamapps\common\Arma 3\!Workshop\@CUP Terrains - Maps;C:\Program Files (x86)\Steam\steamapps\common\Arma 3\!Workshop\@CUP Terrains - CWA;C:\Program Files (x86)\Steam\steamapps\common\Arma 3\!Workshop\@CUP Weapons;C:\Program Files (x86)\Steam\steamapps\common\Arma 3\!Workshop\@CUP Units;C:\Program Files (x86)\Steam\steamapps\common\Arma 3\!Workshop\@CUP Vehicles" "-profiles=C:\Program Files (x86)\Steam\steamapps\common\Arma 3\A3Master" -port=2302  -world=chernarus_winter  -config=CONFIG_server_CUP_Warlord_chernarus.cfg

Note: Writing:

"-profiles=C:\Program Files (x86)\Steam\steamapps\common\Arma 3\A3Master\Users\server"

instead of

"-profiles=C:\Program Files (x86)\Steam\steamapps\common\Arma 3\A3Master"

just changes the .rpt and .log files locality but doesn't seem to matter for the  server.Arma3Profile...

 

I'm out of idea to make a working custom difficulty. Thanks for your help.

Share this post


Link to post
Share on other sites

Well i can give you my setup which is working well.

You can then search for differences ..

Share this post


Link to post
Share on other sites
13 minutes ago, davidoss said:

Well i can give you my setup which is working well.

You can then search for differences ..

If you succeeded in custom difficulty, fine! I could have a look at this. Tks.

Share this post


Link to post
Share on other sites

bat file

 

::Made by eRazeri  2 proc 4 - 5 = af 30 // 4 proc 4 - 7 = af F0
@echo off
:start
C:\Windows\System32\tasklist /FI "IMAGENAME eq arma3server_x64.exe" 2>NUL | C:\Windows\System32\find /I /N "arma3server_x64.exe">NUL
if "%ERRORLEVEL%"=="0" goto loop
echo  Monitored server is not running, will be started now 
start "" /wait /realtime /affinity AA arma3server_x64.exe -port=2302 -nobenchmark -nolauncher -noPause -nosplash -world=empty -noSound  -maxMem=8192 -cpuCount=4 -exThreads=7 -loadMissionToMemory -bandwidthAlg=2 -autoInit -name=geriatrykserver -profiles=C:\Arma3Server\serverdata\geriatrykserver -config=C:\Arma3Server\serverdata\server.cfg -cfg=C:\Arma3Server\serverdata\basic.cfg  -mod="C:\Arma3Server\@CBA_A3;C:\Arma3Server\@Chernarus 2035;C:\Arma3Server\@CUP Terrains - Core"
echo Server started succesfully
goto started
:loop
cls
echo Server is already running, running monitoring loop
:started
C:\Windows\System32\timeout /t 10
C:\Windows\System32\tasklist /FI "IMAGENAME eq arma3server_x64.exe" 2>NUL | C:\Windows\System32\find /I /N "arma3server_x64.exe">NUL
if "%ERRORLEVEL%"=="0" goto loop
goto start

server config  is located in:  C:\Arma3Server\serverdata\server.cfg

server basic.cfg  is located in :  C:\Arma3Server\serverdata\basic.cfg

profile is located in C:\Arma3Server\serverdata\geriatrykserver\Users\geriatrykserver\geriatrykserver.Arma3Profile

 

version=2;
difficulty="custom";
class DifficultyPresets
{
	defaultPreset="custom";
	class CustomDifficulty
	{
		class Options
		{
			mapContent=0;
			groupIndicators=1;
			friendlyTags=0;
			enemyTags=0;
			detectedMines=0;
			commands=2;
			waypoints=2;
			weaponInfo=1;
			stanceIndicator=1;
			reducedDamage=0;
			staminaBar=0;
			weaponCrosshair=0;
			visionAid=0;
			thirdPersonView=1;
			cameraShake=1;
			scoreTable=1;
			deathMessages=0;
			vonID=1;
			autoReport=1;
			multipleSaves=0;
			squadRadar=0;
			tacticalPing=1;
			mapContentFriendly=0;
			mapContentEnemy=0;
			mapContentMines=0;
		};
		aiLevelPreset=3;
	};
	class CustomAILevel
	{
		skillFriendly=1;
		skillEnemy=1;
		precisionFriendly=0.30000001;
		precisionEnemy=0.30000001;
	};
};
singleVoice=0;
maxSamplesPlayed=96;
blood=1;
gamma=1;
brightness=1;
activeKeys[]={};
soundEnableEAX=1;
soundEnableHW=0;
playedKeys[]={};
sceneComplexity=1000000;
shadowZDistance=100;
viewDistance=3400;
preferredObjectViewDistance=2000;
terrainGrid=3.125;
volumeCD=10;
volumeFX=10;
volumeSpeech=10;
volumeVoN=10;
vonRecThreshold=0.029999999;

All works ok.

 

ps there are missions class from  server.cfg

 

class Missions {
	
	class Mission_1
	{
		template = "survival.Chernarus_2035";
		difficulty = "Custom";
	};

};	

 

Share this post


Link to post
Share on other sites

Well, the questions are:

what's difference between:

-config=C:\Arma3Server\serverdata\server.cfg

and

-cfg=C:\Arma3Server\serverdata\basic.cfg

Is basic.cfg mandatory?

 

How do you named your server: geriatrykserver?

It seems -name is a string with profile name (which one is case of dedi server???)

and -profiles is just a path .. for profiles names.

It's truly a mess without any explanation. Is the server name a profile? Are the custom difficulties defined in a server profile or are they overwritten somewhere else?.... Mystery.

 

 

Who could explain the rule for writing parameters, like;

"-profiles=C:\Program Files (x86)\Steam\steamapps\common\Arma 3\A3Master\Users\server"

or

-profiles="C:\Program Files (x86)\Steam\steamapps\common\Arma 3\A3Master\Users\server"

or

-profiles=C:\Program Files (x86)\Steam\steamapps\common\Arma 3\A3Master\Users\server

???

Share this post


Link to post
Share on other sites

-name=geriatrykserver   means  directory name  created in  C:\Arma3Server\serverdata\geriatrykserver\Users\

If not exist will be created

Inside of  would be  profile generated if not exist with the same name -   geriatrykserver.Arma3Profile

 

Quote

How do you named your server: geriatrykserver?

It seems -name is a string with profile name (which one is case of dedi server???)

server name  can be defined only in server.cfg

 

Share this post


Link to post
Share on other sites

Ah OK. And if I'd like to save my servers somewhere else? (I don't have c:\arma3Server and I'd like to avoid the main disk root).

Share this post


Link to post
Share on other sites

You can write path whatever you like even in different place that server are if you not knew how just give me path i will create your init

 

what i need is

server executable path

path to your place for server data (configs,rpt,profiles)

Share this post


Link to post
Share on other sites

Thanks. Finally I got it. I placed my profile in A3master\users and set my custom difficulty in the Arma3profile file.

Share this post


Link to post
Share on other sites

Anyone has an idea to display the required mod (here CUP) in the server browser's server line?
At this time, I have the max number of players, if battleEye is required or not, allowed or not file patching and all Official Arma DLC/Expansions but nothing more. This could be useful to add the mandatory addons for the mission + the world (map). I don't understand also "time until mission ends: 15 min left". Seems to be a standard. What for???

Tks

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

×