Jump to content
Wiket

Sectors Cap Even if Numbers are Even

Recommended Posts

How come if I have only 1 bluefor and 1 opfor AI in a sector the sector is always captured by bluefor? Its almost as if the game favors bluefor when it comes to sectors. If there are = numbers bluefor always captures the sector, just sometimes really slowly. Anyone know whats going on here?

Share this post


Link to post
Share on other sites

Probably a higher or equal  comparison. What else? You need to decide in case of equality.

Did you test both sides as player? In single player, if you are OPFOR, the equality will run for OPFOR side.
With even players in MP, I don't know. Perhaps, for the last who enter the area?
 

Share this post


Link to post
Share on other sites

Just tested as me being opfor, same result. Bluefor even wins if the numbers are not even (more opfor than blue)

Share this post


Link to post
Share on other sites

Build a simple vanilla test mission and share it here.

Share this post


Link to post
Share on other sites

So I have actually determined that CUP Units is breaking sectors, not sure why, but it causes Blufor to win a sector every time. I have submitted a ticket with CUP, but its odd that this mod alone breaks sectors.

Share this post


Link to post
Share on other sites
1 hour ago, Wiket said:

So I have actually determined that CUP Units is breaking sectors, not sure why, but it causes Blufor to win a sector every time. I have submitted a ticket with CUP, but its odd that this mod alone breaks sectors.

Perhaps, there is some tweak for side logic or hidden units, along with CUP...

Try to find the real count for BLUFOR   :  WEST countSide allUnits

Try also: allunits select {isObjectHidden _x}

 

Share this post


Link to post
Share on other sites
7 hours ago, Wiket said:

CUP Units is breaking sectors, not sure why

Check their threat value in the config, this is the value used by sectors as the influence towards capturing a sector.

 

Taken from moduleSector code...

Spoiler

_fnc_threat = {
	private ["_veh","_coef","_scanCrew","_threat","_score"];
	_veh = _this select 0;
	_coef = _this select 1;
	_scanCrew = _this select 2;
	_threat = getarray (configfile >> "cfgvehicles" >> typeof _veh >> "threat");

	_score = 0.1; //--- Use non-zero value, so even objects with threat[]={0,0,0} can capture
	{_score = _score + _x} foreach _threat;
	_score = _score * _coef;
	if (isplayer _veh) then {_score = _score * _costPlayersLocal;};

	if (_scanCrew) then {
		{
			_score = _score + ([_x,_costInfantry,false] call _fnc_threat);
			if (isplayer _x) then {_score = _score * _costPlayersLocal;};
		} foreach (crew _veh - [_veh]);
	};
	_score
};


//SNIP


//--- Calculate side strengths for the next cycle
_costPlayersLocal = _costPlayers call bis_fnc_parsenumber;
{
	{
		if ({alive _x} count crew _x > 0) then {
			_side = side group _x;
			if (_side in _sides) then {
				_sideID = _side call bis_fnc_sideID;//_sides find _side;
				_units = _sideUnits select _sideID;
				if !(_x in _units) then {
					_score = _sectorScore select _sideID;

					_simulation = gettext (configfile >> "cfgvehicles" >> typeof _x >> "simulation");

					_xScore = switch (tolower _simulation) do {
						case "soldier": {
							[_x,_costInfantry,true] call _fnc_threat;
						};
						case "carx": {
							[_x,_costWheeled,true] call _fnc_threat;
						};
						case "tankx": {
							[_x,_costTracked,true] call _fnc_threat;
						};
						case "shipx";
						case "submarinex": {
							[_x,_costWater,true] call _fnc_threat;
						};
						case "helicopterrtd";
						case "airplanex";
						case "helicopterx": {
							[_x,_costAir,true] call _fnc_threat;
						};
						default {
							0
						};
					};
					_score = _score + _xScore;
					_sectorScore set [_sideID,_score];

					_units set [count _units,_x];
					_sideUnits set [_sideID,_units];
				};
			};
			sleep 0.05;
		};
	} foreach list _x;
	sleep 0.1;
} foreach _areas;

 

 

Share this post


Link to post
Share on other sites

Thanks for the ideas guys! Talking with CUP now!

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

×