diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000000..2ea0875a5f --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,8 @@ +{ + "logViewer.watch": [ + { + "title": "RPTs", + "pattern": "C:\\Users\\billw\\AppData\\Local\\Arma 3\\*.rpt" + } + ] +} \ No newline at end of file diff --git a/A3-Antistasi/AI/AAFKilledEH.sqf b/A3-Antistasi/AI/AAFKilledEH.sqf index 49b5eb9ca0..78939c6124 100644 --- a/A3-Antistasi/AI/AAFKilledEH.sqf +++ b/A3-Antistasi/AI/AAFKilledEH.sqf @@ -54,7 +54,8 @@ if (side (group _killer) == buenos) then { if (_lado == malos) then { - [0,-2,getPos _muerto] remoteExec ["A3A_fnc_citySupportChange",2]; + [-1, 0, "SDK Killed Unarmed Enemy"] remoteExec ["A3A_fnc_timingCA", 2]; + //[3,-3,getPos _muerto] remoteExec ["A3A_fnc_citySupportChange",2]; [1,0] remoteExec ["A3A_fnc_prestige",2]; } else @@ -64,7 +65,7 @@ if (side (group _killer) == buenos) then } else { - [-1,1,getPos _muerto] remoteExec ["A3A_fnc_citySupportChange",2]; + //[-3,3,getPos _muerto] remoteExec ["A3A_fnc_citySupportChange",2]; if (_lado == malos) then { [0.1,0] remoteExec ["A3A_fnc_prestige",2]; @@ -79,11 +80,11 @@ else { if (_lado == malos) then { - [-0.25,0,getPos _muerto] remoteExec ["A3A_fnc_citySupportChange",2]; + [-1,0,getPos _muerto, "AAFKilledEH"] remoteExec ["A3A_fnc_citySupportChange",2]; } else { - [0.25,0,getPos _muerto] remoteExec ["A3A_fnc_citySupportChange",2]; + //[0.25,0,getPos _muerto] remoteExec ["A3A_fnc_citySupportChange",2]; }; }; _marcador = _muerto getVariable "marcador"; diff --git a/A3-Antistasi/AI/airbomb.sqf b/A3-Antistasi/AI/airbomb.sqf index 926c6fdb57..1afdbbff96 100644 --- a/A3-Antistasi/AI/airbomb.sqf +++ b/A3-Antistasi/AI/airbomb.sqf @@ -6,6 +6,7 @@ _ammo = "Bomb_03_F"; _cuenta = 8; _cluster = false; _carpet = false; + if (_tipo != "HE") then { _ammo = "G_40mm_HEDP"; diff --git a/A3-Antistasi/AI/airstrike.sqf b/A3-Antistasi/AI/airstrike.sqf index d594570838..0c174db7ca 100644 --- a/A3-Antistasi/AI/airstrike.sqf +++ b/A3-Antistasi/AI/airstrike.sqf @@ -23,10 +23,10 @@ _origPos = []; _pos2 = []; _finPos = []; _exit = false; +sleep (120 + random(300)); if (_esMarcador) then { - _timeOut = time + 600; - waitUntil {sleep 1; (spawner getVariable _marcador == 0) or (time > _timeOut)}; + if (_marcador in aeropuertos) then { _size = [_marcador] call A3A_fnc_sizeMarker; @@ -90,6 +90,7 @@ else }; }; +// TODO: spawn this at an actual air port? if (_exit) exitWith {}; _planefn = [_origpos, _ang, _tipoavion, _lado] call bis_fnc_spawnvehicle; _plane = _planefn select 0; @@ -108,7 +109,8 @@ _wp1 setWaypointType "MOVE"; _wp1 setWaypointSpeed "LIMITED"; _wp1 setWaypointBehaviour "CARELESS"; _plane setCollisionLight true; -if ((_tipo == "NAPALM") and (napalmCurrent)) then {_tipo = "CLUSTER"}; +// Disabling NAPALM, it looks crap, and causes client crashes I think. +if (_tipo == "NAPALM") then {_tipo = "CLUSTER"}; if (_tipo == "HE") then {_wp1 setWaypointStatements ["true", "[this,""HE""] execVM 'AI\airbomb.sqf'"]} else {if (_tipo == "NAPALM") then {_wp1 setWaypointStatements ["true", "[this,""NAPALM""] execVM 'AI\airbomb.sqf'"]} else {_wp1 setWaypointStatements ["true", "[this,""CLUSTER""] execVM 'AI\airbomb.sqf'"]}}; _wp2 = _grupoplane addWaypoint [_pos2, 1]; diff --git a/A3-Antistasi/AI/mortyAI.sqf b/A3-Antistasi/AI/mortyAI.sqf index 38a0a3d970..edff4f607a 100644 --- a/A3-Antistasi/AI/mortyAI.sqf +++ b/A3-Antistasi/AI/mortyAI.sqf @@ -30,6 +30,7 @@ while {(alive _morty0) and (alive _morty1)} do _nul = [_mortero] call A3A_fnc_AIVEHinit; waitUntil {sleep 1; ({!(alive _x)} count units _grupo != 0) or !(unitReady _morty0)}; + _morty0 forceSpeed 0; if (({(alive _x)} count units _grupo == count units _grupo) and !(unitReady _morty0)) then { @@ -39,4 +40,7 @@ while {(alive _morty0) and (alive _morty1)} do moveOut _morty1; deleteVehicle _mortero; }; - }; \ No newline at end of file + + waitUntil {sleep 1; vehicle _morty1 != _morty1}; + _morty0 forceSpeed -1; + }; diff --git a/A3-Antistasi/AI/pedirAyuda.sqf b/A3-Antistasi/AI/pedirAyuda.sqf index db91d060af..c3ae17efcc 100644 --- a/A3-Antistasi/AI/pedirAyuda.sqf +++ b/A3-Antistasi/AI/pedirAyuda.sqf @@ -7,32 +7,33 @@ _enemy = _unit findNearestEnemy _unit; _distancia = 81; _medico = objNull; _units = units group _unit; +// if the nearest enemy can see the patient, or the nearest enemy is less than 100m away and the patient isn't the player if ((([objNull, "VIEW"] checkVisibility [eyePos _enemy, eyePos _unit]) > 0) or (_unit distance _enemy < 100) and (!isPlayer _unit)) then +{ { - { - if (!isPlayer _x) then + if (!isPlayer _x) then { - if (([_x] call A3A_fnc_canFight) and ("FirstAidKit" in (items _x)) and (vehicle _x == _x) and (_x distance _unit < _distancia) and !(_x getVariable ["maniobrando",false])) then + if (([_x] call A3A_fnc_canFight) and (("FirstAidKit" in (items _x)) or easyRevive) and (vehicle _x == _x) and (_x distance _unit < _distancia) and !(_x getVariable ["maniobrando",false])) then { - _medico == _unit; + _medico = _unit; }; }; } forEach _units; - } +} else +{ { - { - if (!isPlayer _x) then + if (!isPlayer _x) then { - if ([_x] call A3A_fnc_isMedic) then + if ([_x] call A3A_fnc_isMedic) then { - if (([_x] call A3A_fnc_canFight) and ("FirstAidKit" in (items _x)) and (vehicle _x == _x) and (_x distance _unit < 81) and !(_x getVariable ["maniobrando",false])) then + if (([_x] call A3A_fnc_canFight) and (("FirstAidKit" in (items _x)) or easyRevive) and (vehicle _x == _x) and (_x distance _unit < 81) and !(_x getVariable ["maniobrando",false])) then { - //_ayudando = _x getVariable "ayudando"; - if (!(_x getVariable ["ayudando",false]) and (!(_x getVariable ["rearming",false]))) then + //_ayudando = _x getVariable "ayudando"; + if (!(_x getVariable ["ayudando",false]) and (!(_x getVariable ["rearming",false]))) then { - _medico = _x; - _distancia = _x distance _unit; + _medico = _x; + _distancia = _x distance _unit; }; }; }; @@ -40,41 +41,41 @@ else } forEach _units; if (((isNull _medico) or (_unit getVariable ["INCAPACITATED",false])) and !([_unit] call A3A_fnc_fatalWound)) then + { { - { - if (!isPlayer _x) then + if (!isPlayer _x) then { - if !([_x] call A3A_fnc_isMedic) then + if !([_x] call A3A_fnc_isMedic) then { - if (([_x] call A3A_fnc_canFight) and ("FirstAidKit" in (items _x)) and (vehicle _x == _x) and (_x distance _unit < _distancia) and !(_x getVariable ["maniobrando",false])) then + if (([_x] call A3A_fnc_canFight) and (("FirstAidKit" in (items _x)) or easyRevive) and (vehicle _x == _x) and (_x distance _unit < _distancia) and !(_x getVariable ["maniobrando",false])) then { - //_ayudando = _x getVariable "ayudando"; - if (!(_x getVariable ["ayudando",false]) and (!(_x getVariable ["rearming",false]))) then + //_ayudando = _x getVariable "ayudando"; + if (!(_x getVariable ["ayudando",false]) and (!(_x getVariable ["rearming",false]))) then { - _medico = _x; - _distancia = _x distance _unit; + _medico = _x; + _distancia = _x distance _unit; }; }; }; }; } forEach _units; - }; + }; if (!isNull _medico) then - { + { if (isNull(_unit getVariable ["ayudado",objNull])) then {[_unit,_medico] spawn A3A_fnc_ayudar}; - } + } else - { + { _distancia = 81; { - if (!isPlayer _x) then + if (!isPlayer _x) then { - if (([_x] call A3A_fnc_canFight) and ("FirstAidKit" in (items _x)) and (vehicle _x == _x) and (_x distance _unit < _distancia)) then + if (([_x] call A3A_fnc_canFight) and (("FirstAidKit" in (items _x)) or easyRevive) and (vehicle _x == _x) and (_x distance _unit < _distancia)) then { - _medico == _unit; + _medico = _unit; }; }; } forEach _units; - }; }; -_medico \ No newline at end of file +}; +_medico diff --git a/A3-Antistasi/AI/surrenderAction.sqf b/A3-Antistasi/AI/surrenderAction.sqf index 3a1d22b01a..a239088753 100644 --- a/A3-Antistasi/AI/surrenderAction.sqf +++ b/A3-Antistasi/AI/surrenderAction.sqf @@ -8,11 +8,11 @@ _unit setVariable ["surrendered",true]; if (side _unit == malos) then { - _nul = [-2,0,getPos _unit] remoteExec ["A3A_fnc_citySupportChange",2]; + //_nul = [-2,0,getPos _unit] remoteExec ["A3A_fnc_citySupportChange",2]; } else { - _nul = [1,0,getPos _unit] remoteExec ["A3A_fnc_citySupportChange",2]; + _nul = [2,0,getPos _unit, "SDK Surrender"] remoteExec ["A3A_fnc_citySupportChange",2]; }; _armas = []; _municion = []; diff --git a/A3-Antistasi/CHVD/CfgFunctions.hpp b/A3-Antistasi/CHVD/CfgFunctions.hpp new file mode 100644 index 0000000000..c9a33ced9a --- /dev/null +++ b/A3-Antistasi/CHVD/CfgFunctions.hpp @@ -0,0 +1,27 @@ +class CHVD +{ + tag = "CHVD"; + class script + { + file = "CHVD"; + class onSliderChange {}; + class onLBSelChanged {}; + class onLBSelChanged_syncmode {}; + class onEBinput {}; + class onEBterrainInput {}; + class onEBinput_syncmode {}; + class selTerrainQuality {}; + class updateTerrain {}; + class updateSettings {}; + class updateVehType {}; + class fovViewDistance {}; + class UAVstatus {}; + class openDialog {}; + class localize {}; + class trueZoom {}; + class keyBindings {}; + class keyDown {}; + class keyDownTerrain {}; + class init {postInit = 1;}; + }; +}; \ No newline at end of file diff --git a/A3-Antistasi/CHVD/dialog.hpp b/A3-Antistasi/CHVD/dialog.hpp new file mode 100644 index 0000000000..70ffc2cd9a --- /dev/null +++ b/A3-Antistasi/CHVD/dialog.hpp @@ -0,0 +1,747 @@ +#define GUI_GRID_X (0) +#define GUI_GRID_Y (0) +#define GUI_GRID_W (0.025) +#define GUI_GRID_H (0.04) +#define GUI_GRID_WAbs (1) +#define GUI_GRID_HAbs (1) + +class CHVD_rscXSliderH +{ + style="0x400 + 0x10"; + shadow=0; + x=0; + y=0; + h=0.029412; + w=0.40000001; + color[]={1,1,1,0.60000002}; + colorActive[]={1,1,1,1}; + colorDisabled[]={1,1,1,0.2}; + arrowEmpty="\A3\ui_f\data\gui\cfg\slider\arrowEmpty_ca.paa"; + arrowFull="\A3\ui_f\data\gui\cfg\slider\arrowFull_ca.paa"; + border="\A3\ui_f\data\gui\cfg\slider\border_ca.paa"; + thumb="\A3\ui_f\data\gui\cfg\slider\thumb_ca.paa"; + tooltipColorText[]={1,1,1,1}; + tooltipColorBox[]={1,1,1,1}; + tooltipColorShade[]={0,0,0,0.64999998}; +}; +class CHVD_rscCheckbox +{ + type=77; + style=0; + checked=0; + x="0.375 * safezoneW + safezoneX"; + y="0.36 * safezoneH + safezoneY"; + w="0.025 * safezoneW"; + h="0.04 * safezoneH"; + color[]={1,1,1,0.69999999}; + colorFocused[]={1,1,1,1}; + colorHover[]={1,1,1,1}; + colorPressed[]={1,1,1,1}; + colorDisabled[]={1,1,1,0.2}; + colorBackground[]={0,0,0,0}; + colorBackgroundFocused[]={0,0,0,0}; + colorBackgroundHover[]={0,0,0,0}; + colorBackgroundPressed[]={0,0,0,0}; + colorBackgroundDisabled[]={0,0,0,0}; + textureChecked="\A3\Ui_f\data\GUI\RscCommon\RscCheckBox\CheckBox_checked_ca.paa"; + textureUnchecked="\A3\Ui_f\data\GUI\RscCommon\RscCheckBox\CheckBox_unchecked_ca.paa"; + textureFocusedChecked="\A3\Ui_f\data\GUI\RscCommon\RscCheckBox\CheckBox_checked_ca.paa"; + textureFocusedUnchecked="\A3\Ui_f\data\GUI\RscCommon\RscCheckBox\CheckBox_unchecked_ca.paa"; + textureHoverChecked="\A3\Ui_f\data\GUI\RscCommon\RscCheckBox\CheckBox_checked_ca.paa"; + textureHoverUnchecked="\A3\Ui_f\data\GUI\RscCommon\RscCheckBox\CheckBox_unchecked_ca.paa"; + texturePressedChecked="\A3\Ui_f\data\GUI\RscCommon\RscCheckBox\CheckBox_checked_ca.paa"; + texturePressedUnchecked="\A3\Ui_f\data\GUI\RscCommon\RscCheckBox\CheckBox_unchecked_ca.paa"; + textureDisabledChecked="\A3\Ui_f\data\GUI\RscCommon\RscCheckBox\CheckBox_checked_ca.paa"; + textureDisabledUnchecked="\A3\Ui_f\data\GUI\RscCommon\RscCheckBox\CheckBox_unchecked_ca.paa"; + tooltipColorText[]={1,1,1,1}; + tooltipColorBox[]={1,1,1,1}; + tooltipColorShade[]={0,0,0,0.64999998}; + soundEnter[]= + { + "", + 0.1, + 1 + }; + soundPush[]= + { + "", + 0.1, + 1 + }; + soundClick[]= + { + "", + 0.1, + 1 + }; + soundEscape[]= + { + "", + 0.1, + 1 + }; +}; +class CHVD_rscButton +{ + type=16; + style="0x02 + 0xC0"; + default=0; + shadow=0; + x=0; + y=0; + w=0.095588997; + h=0.039216001; + animTextureNormal="#(argb,8,8,3)color(1,1,1,1)"; + animTextureDisabled="#(argb,8,8,3)color(1,1,1,1)"; + animTextureOver="#(argb,8,8,3)color(1,1,1,1)"; + animTextureFocused="#(argb,8,8,3)color(1,1,1,1)"; + animTexturePressed="#(argb,8,8,3)color(1,1,1,1)"; + animTextureDefault="#(argb,8,8,3)color(1,1,1,1)"; + colorBackground[]={0,0,0,0.80000001}; + colorBackgroundFocused[]={1,1,1,1}; + colorBackground2[]={0.75,0.75,0.75,1}; + color[]={1,1,1,1}; + colorFocused[]={0,0,0,1}; + color2[]={0,0,0,1}; + colorText[]={1,1,1,1}; + colorDisabled[]={1,1,1,0.25}; + period=1.2; + periodFocus=1.2; + periodOver=1.2; + size="( ( ( ((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)"; + sizeEx="( ( ( ((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)"; + tooltipColorText[]={1,1,1,1}; + tooltipColorBox[]={1,1,1,1}; + tooltipColorShade[]={0,0,0,0.64999998}; + font="PuristaLight"; + class TextPos + { + left="0.25 * ( ((safezoneW / safezoneH) min 1.2) / 40)"; + top="( ( ( ((safezoneW / safezoneH) min 1.2) / 1.2) / 25) - ( ( ( ((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)) / 2"; + right=0.0049999999; + bottom=0; + }; + class Attributes + { + font="PuristaLight"; + color="#E5E5E5"; + align="left"; + shadow="false"; + }; + class ShortcutPos + { + left="(6.25 * ( ((safezoneW / safezoneH) min 1.2) / 40)) - 0.0225 - 0.005"; + top=0.0049999999; + w=0.022500001; + h=0.029999999; + }; + soundEnter[]= + { + "\A3\ui_f\data\sound\RscButtonMenu\soundEnter", + 0.090000004, + 1 + }; + soundPush[]= + { + "\A3\ui_f\data\sound\RscButtonMenu\soundPush", + 0.090000004, + 1 + }; + soundClick[]= + { + "\A3\ui_f\data\sound\RscButtonMenu\soundClick", + 0.090000004, + 1 + }; + soundEscape[]= + { + "\A3\ui_f\data\sound\RscButtonMenu\soundEscape", + 0.090000004, + 1 + }; + textureNoShortcut="#(argb,8,8,3)color(0,0,0,0)"; + class HitZone + { + left=0; + top=0; + right=0; + bottom=0; + }; + class AttributesImage + { + font="PuristaMedium"; + color="#E5E5E5"; + align="left"; + }; +}; +class CHVD_rscText +{ + type = 0; + x=0; + y=0; + h=0.037; + w=0.30000001; + style=0; + shadow=0; + colorShadow[]={0,0,0,0.5}; + font="PuristaMedium"; + size="( ( ( ((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)"; + SizeEx="( ( ( ((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)"; + colorText[]={1,1,1,1}; + colorBackground[]={0,0,0,0}; + linespacing=1; + tooltipColorText[]={1,1,1,1}; + tooltipColorBox[]={1,1,1,1}; + tooltipColorShade[]={0,0,0,0.64999998}; + text = ""; +}; +class CHVD_rscTextRight +{ + type = 0; + x=0; + y=0; + h=0.037; + w=0.30000001; + style=0x01; + shadow=0; + colorShadow[]={0,0,0,0.5}; + font="PuristaMedium"; + size="( ( ( ((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)"; + SizeEx="( ( ( ((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)"; + colorText[]={1,1,1,1}; + colorBackground[]={0,0,0,0}; + linespacing=1; + tooltipColorText[]={1,1,1,1}; + tooltipColorBox[]={1,1,1,1}; + tooltipColorShade[]={0,0,0,0.64999998}; + text = ""; +}; +class CHVD_rscFrame +{ + type = 0; + idc = -1; + style = 0; + shadow = 1; + colorBackground[] = + { + 0, + 0, + 0, + 0 + }; + colorText[] = + { + 1, + 1, + 1, + 1 + }; + font = "PuristaMedium"; + sizeEx = 0.02; + text = ""; +}; +class CHVD_rscXListBox +{ + deletable = 0; + fade = 0; + idc = -1; + type = 42; + x = 0.1; + y = 0.1; + color[] = {1, 1, 1, 0.6}; + colorActive[] = {1, 1, 1, 1}; + colorDisabled[] = {1, 1, 1, 0.25}; + colorSelect[] = {0.95, 0.95, 0.95, 1}; + colorText[] = {1, 1, 1, 1}; + soundSelect[] = {"\A3\ui_f\data\sound\RscListbox\soundSelect", 0.09, 1}; + colorPicture[] = {1, 1, 1, 1}; + colorPictureSelected[] = {1, 1, 1, 1}; + colorPictudeDisabled[] = {1, 1, 1, 0.25}; + tooltipColorText[] = {1, 1, 1, 1}; + tooltipColorBox[] = {1, 1, 1, 1}; + tooltipColorShade[] = {0, 0, 0, 0.65}; + style = "0x400 + 0x02 + 0x10"; + shadow = 2; + arrowEmpty = "\A3\ui_f\data\gui\cfg\slider\arrowEmpty_ca.paa"; + arrowFull = "\A3\ui_f\data\gui\cfg\slider\arrowFull_ca.paa"; + border = "\A3\ui_f\data\gui\cfg\slider\border_ca.paa"; + w = 0.14706; + h = 0.039216; + font = "PuristaMedium"; + sizeEx = "( ( ( ((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)"; + colorPictureDisabled[] = {1, 1, 1, 1}; +}; +class CHVD_rscEdit +{ + type=2; + style="0x40"; + autocomplete = ""; + font="PuristaMedium"; + shadow=2; + sizeEx="( ( ( ((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)"; + colorBackground[]={0,0,0,1}; + colorText[]={0.94999999,0.94999999,0.94999999,1}; + colorDisabled[]={1,1,1,0.25}; + colorSelection[]= + { + "(profilenamespace getvariable ['GUI_BCG_RGB_R',0.69])", + "(profilenamespace getvariable ['GUI_BCG_RGB_G',0.75])", + "(profilenamespace getvariable ['GUI_BCG_RGB_B',0.5])", + 1 + }; + canModify=1; + tooltipColorText[]={1,1,1,1}; + tooltipColorBox[]={1,1,1,1}; + tooltipColorShade[]={0,0,0,0.64999998}; + text = ""; +}; +class CHVD_dialog +{ + idd = 2900; + movingEnable = false; + moving = 1; + onLoad = "[_this] call CHVD_fnc_localize"; + onUnload = ""; + + class controlsBackground + { + class CHVD_rscBackground: CHVD_rscFrame + { + idc = 1800; + + x = 7 * GUI_GRID_W + GUI_GRID_X; + y = 1.1 * GUI_GRID_H + GUI_GRID_Y; + w = 24.5 * GUI_GRID_W; + h = 22.4 * GUI_GRID_H; + colorBackground[] = {0,0,0,0.7}; + }; + class CHVD_rscTitle: CHVD_rscText + { + idc = 1000; + + text = "VIEW DISTANCE SETTINGS"; //--- ToDo: Localize; + x = 7 * GUI_GRID_W + GUI_GRID_X; + y = 0 * GUI_GRID_H + GUI_GRID_Y; + w = 24.5 * GUI_GRID_W; + h = 1 * GUI_GRID_H; + colorBackground[] = {"(profilenamespace getvariable ['GUI_BCG_RGB_R',0.3843])","(profilenamespace getvariable ['GUI_BCG_RGB_G',0.7019])","(profilenamespace getvariable ['GUI_BCG_RGB_B',0.8862])","(profilenamespace getvariable ['GUI_BCG_RGB_A',0.7])"}; + }; + class CHVD_rscFootHeaderText: CHVD_rscTextRight + { + idc = 1001; + + text = "ON FOOT"; //--- ToDo: Localize; + x = 7 * GUI_GRID_W + GUI_GRID_X; + y = 1.4 * GUI_GRID_H + GUI_GRID_Y; + w = 7 * GUI_GRID_W; + h = 1 * GUI_GRID_H; + colorBackground[] = {0,0,0,1}; + }; + class CHVD_rscFootViewText: CHVD_rscTextRight + { + idc = 1002; + + text = "VIEW:"; //--- ToDo: Localize; + x = 7.5 * GUI_GRID_W + GUI_GRID_X; + y = 2.7 * GUI_GRID_H + GUI_GRID_Y; + w = 6.5 * GUI_GRID_W; + h = 1 * GUI_GRID_H; + }; + class CHVD_rscFootObjText: CHVD_rscTextRight + { + idc = 1003; + + text = "OBJECT:"; //--- ToDo: Localize; + x = 7.5 * GUI_GRID_W + GUI_GRID_X; + y = 4.2 * GUI_GRID_H + GUI_GRID_Y; + w = 6.5 * GUI_GRID_W; + h = 1 * GUI_GRID_H; + }; + class CHVD_rscFootTerrainText: CHVD_rscTextRight + { + idc = 1005; + + text = "TERRAIN:"; //--- ToDo: Localize; + x = 7.5 * GUI_GRID_W + GUI_GRID_X; + y = 7.2 * GUI_GRID_H + GUI_GRID_Y; + w = 6.5 * GUI_GRID_W; + h = 1 * GUI_GRID_H; + }; + class CHVD_rscCarHeaderText: CHVD_rscTextRight + { + idc = 1008; + + text = "IN CAR"; //--- ToDo: Localize; + x = 7 * GUI_GRID_W + GUI_GRID_X; + y = 8.7 * GUI_GRID_H + GUI_GRID_Y; + w = 7 * GUI_GRID_W; + h = 1 * GUI_GRID_H; + colorBackground[] = {0,0,0,1}; + }; + class CHVD_rscCarViewText: CHVD_rscTextRight + { + idc = 1010; + + text = "VIEW:"; //--- ToDo: Localize; + x = 7.5 * GUI_GRID_W + GUI_GRID_X; + y = 10 * GUI_GRID_H + GUI_GRID_Y; + w = 6.5 * GUI_GRID_W; + h = 1 * GUI_GRID_H; + }; + class CHVD_rscAirObjText: CHVD_rscTextRight + { + idc = 1011; + + text = "OBJECT:"; //--- ToDo: Localize; + x = 7.5 * GUI_GRID_W + GUI_GRID_X; + y = 18.9 * GUI_GRID_H + GUI_GRID_Y; + w = 6.5 * GUI_GRID_W; + h = 1 * GUI_GRID_H; + }; + class CHVD_rscCarTerrainText: CHVD_rscTextRight + { + idc = 1012; + + text = "TERRAIN:"; //--- ToDo: Localize; + x = 7.5 * GUI_GRID_W + GUI_GRID_X; + y = 14.5 * GUI_GRID_H + GUI_GRID_Y; + w = 6.5 * GUI_GRID_W; + h = 1 * GUI_GRID_H; + }; + class CHVD_rscAirHeaderText: CHVD_rscTextRight + { + idc = 1015; + + text = "IN AIR"; //--- ToDo: Localize; + x = 7 * GUI_GRID_W + GUI_GRID_X; + y = 16 * GUI_GRID_H + GUI_GRID_Y; + w = 7 * GUI_GRID_W; + h = 1 * GUI_GRID_H; + colorBackground[] = {0,0,0,1}; + }; + class CHVD_rscAirViewText: CHVD_rscTextRight + { + idc = 1016; + + text = "VIEW:"; //--- ToDo: Localize; + x = 7.5 * GUI_GRID_W + GUI_GRID_X; + y = 17.4 * GUI_GRID_H + GUI_GRID_Y; + w = 6.5 * GUI_GRID_W; + h = 1 * GUI_GRID_H; + }; + class CHVD_rscAirTerrainText: CHVD_rscTextRight + { + idc = 1019; + + text = "TERRAIN:"; //--- ToDo: Localize; + x = 7.5 * GUI_GRID_W + GUI_GRID_X; + y = 21.9 * GUI_GRID_H + GUI_GRID_Y; + w = 6.5 * GUI_GRID_W; + h = 1 * GUI_GRID_H; + }; + class CHVD_rscCarObjText: CHVD_rscTextRight + { + idc = 1021; + + text = "OBJECT:"; //--- ToDo: Localize; + x = 7.5 * GUI_GRID_W + GUI_GRID_X; + y = 11.5 * GUI_GRID_H + GUI_GRID_Y; + w = 6.5 * GUI_GRID_W; + h = 1 * GUI_GRID_H; + }; + class CHVD_rscFootSyncText: CHVD_rscTextRight + { + idc = 1403; + + text = "SYNC MODE:"; //--- ToDo: Localize; + x = 7.5 * GUI_GRID_W + GUI_GRID_X; + y = 5.7 * GUI_GRID_H + GUI_GRID_Y; + w = 6.5 * GUI_GRID_W; + h = 1 * GUI_GRID_H; + }; + class CHVD_rscCarSyncText: CHVD_rscTextRight + { + idc = 1405; + + text = "SYNC MODE:"; //--- ToDo: Localize; + x = 7.5 * GUI_GRID_W + GUI_GRID_X; + y = 13 * GUI_GRID_H + GUI_GRID_Y; + w = 6.5 * GUI_GRID_W; + h = 1 * GUI_GRID_H; + }; + class CHVD_rscAirSyncText: CHVD_rscTextRight + { + idc = 1407; + + text = "SYNC MODE:"; //--- ToDo: Localize; + x = 7.5 * GUI_GRID_W + GUI_GRID_X; + y = 20.4 * GUI_GRID_H + GUI_GRID_Y; + w = 6.5 * GUI_GRID_W; + h = 1 * GUI_GRID_H; + }; + }; + class controls + { + class CHVD_rscFootViewSlider: CHVD_rscXSliderH + { + idc = 1900; + type = 43; + onSliderPosChanged = "['CHVD_foot', _this select 0, _this select 1, 1006, 'CHVD_footObj', 1901, 1007, 'CHVD_footSyncMode', 'CHVD_footSyncPercentage'] call CHVD_fnc_onSliderChange"; + + x = 14 * GUI_GRID_W + GUI_GRID_X; + y = 2.7 * GUI_GRID_H + GUI_GRID_Y; + w = 12.5 * GUI_GRID_W; + h = 1 * GUI_GRID_H; + }; + class CHVD_rscFootObjSlider: CHVD_rscXSliderH + { + idc = 1901; + type = 43; + onSliderPosChanged = "['CHVD_footObj', _this select 0, _this select 1, 1007] call CHVD_fnc_onSliderChange"; + + x = 14 * GUI_GRID_W + GUI_GRID_X; + y = 4.2 * GUI_GRID_H + GUI_GRID_Y; + w = 12.5 * GUI_GRID_W; + h = 1 * GUI_GRID_H; + }; + class CHVD_rscCarViewSlider: CHVD_rscXSliderH + { + idc = 1902; + type = 43; + onSliderPosChanged = "['CHVD_car', _this select 0, _this select 1, 1013, 'CHVD_carObj', 1903, 1014, 'CHVD_carSyncMode', 'CHVD_carSyncPercentage'] call CHVD_fnc_onSliderChange"; + + x = 14 * GUI_GRID_W + GUI_GRID_X; + y = 10 * GUI_GRID_H + GUI_GRID_Y; + w = 12.5 * GUI_GRID_W; + h = 1 * GUI_GRID_H; + }; + class CHVD_rscCarObjSlider: CHVD_rscXSliderH + { + idc = 1903; + type = 43; + onSliderPosChanged = "['CHVD_carObj', _this select 0, _this select 1, 1014] call CHVD_fnc_onSliderChange"; + + x = 14 * GUI_GRID_W + GUI_GRID_X; + y = 11.5 * GUI_GRID_H + GUI_GRID_Y; + w = 12.5 * GUI_GRID_W; + h = 1 * GUI_GRID_H; + }; + class CHVD_rscAirViewSlider: CHVD_rscXSliderH + { + idc = 1904; + type = 43; + onSliderPosChanged = "['CHVD_air', _this select 0, _this select 1, 1017, 'CHVD_airObj', 1905, 1018, 'CHVD_airSyncMode', 'CHVD_airSyncPercentage'] call CHVD_fnc_onSliderChange"; + + x = 14 * GUI_GRID_W + GUI_GRID_X; + y = 17.4 * GUI_GRID_H + GUI_GRID_Y; + w = 12.5 * GUI_GRID_W; + h = 1 * GUI_GRID_H; + }; + class CHVD_rscAirObjSlider: CHVD_rscXSliderH + { + idc = 1905; + type = 43; + onSliderPosChanged = "['CHVD_airObj', _this select 0, _this select 1, 1018] call CHVD_fnc_onSliderChange"; + + x = 14 * GUI_GRID_W + GUI_GRID_X; + y = 18.9 * GUI_GRID_H + GUI_GRID_Y; + w = 12.5 * GUI_GRID_W; + h = 1 * GUI_GRID_H; + }; + class CHVD_rscFootViewDistance: CHVD_rscEdit + { + idc = 1006; + onKeyDown = "['CHVD_foot', 1900, _this select 0, 'CHVD_footObj', 1901, 1007, 'CHVD_footSyncMode', 'CHVD_footSyncPercentage'] call CHVD_fnc_onEBinput"; + maxChars = 5; + + x = 27 * GUI_GRID_W + GUI_GRID_X; + y = 2.7 * GUI_GRID_H + GUI_GRID_Y; + w = 3.5 * GUI_GRID_W; + h = 1 * GUI_GRID_H; + }; + class CHVD_rscFootObjDistance: CHVD_rscEdit + { + idc = 1007; + onKeyDown = "['CHVD_footObj', 1901, _this select 0] call CHVD_fnc_onEBinput"; + maxChars = 5; + + x = 27 * GUI_GRID_W + GUI_GRID_X; + y = 4.2 * GUI_GRID_H + GUI_GRID_Y; + w = 3.5 * GUI_GRID_W; + h = 1 * GUI_GRID_H; + }; + class CHVD_rscCarViewDistance: CHVD_rscEdit + { + idc = 1013; + onKeyDown = "['CHVD_car', 1902, _this select 0, 'CHVD_carObj', 1903, 1014, 'CHVD_carSyncMode', 'CHVD_carSyncPercentage'] call CHVD_fnc_onEBinput"; + maxChars = 5; + + x = 27 * GUI_GRID_W + GUI_GRID_X; + y = 10 * GUI_GRID_H + GUI_GRID_Y; + w = 3.5 * GUI_GRID_W; + h = 1 * GUI_GRID_H; + }; + class CHVD_rscCarObjDistance: CHVD_rscEdit + { + idc = 1014; + onKeyDown = "['CHVD_carObj', 1903, _this select 0] call CHVD_fnc_onEBinput"; + maxChars = 5; + + x = 27 * GUI_GRID_W + GUI_GRID_X; + y = 11.5 * GUI_GRID_H + GUI_GRID_Y; + w = 3.5 * GUI_GRID_W; + h = 1 * GUI_GRID_H; + }; + class CHVD_rscAirViewDistance: CHVD_rscEdit + { + idc = 1017; + onKeyDown = "['CHVD_air', 1904, _this select 0, 'CHVD_airObj', 1905, 1018, 'CHVD_airSyncMode', 'CHVD_airSyncPercentage'] call CHVD_fnc_onEBinput"; + maxChars = 5; + + x = 27 * GUI_GRID_W + GUI_GRID_X; + y = 17.4 * GUI_GRID_H + GUI_GRID_Y; + w = 3.5 * GUI_GRID_W; + h = 1 * GUI_GRID_H; + }; + class CHVD_rscAirObjDistance: CHVD_rscEdit + { + idc = 1018; + onKeyDown = "['CHVD_airObj', 1905, _this select 0] call CHVD_fnc_onEBinput"; + maxChars = 5; + + x = 27 * GUI_GRID_W + GUI_GRID_X; + y = 18.9 * GUI_GRID_H + GUI_GRID_Y; + w = 3.5 * GUI_GRID_W; + h = 1 * GUI_GRID_H; + }; + class CHVD_rscClose: CHVD_rscButton + { + idc = 1612; + onButtonClick = "closeDialog 2900"; + + text = "Close"; //--- ToDo: Localize; + x = 7 * GUI_GRID_W + GUI_GRID_X; + y = 23.53 * GUI_GRID_H + GUI_GRID_Y; + w = 24.5 * GUI_GRID_W; + h = 1 * GUI_GRID_H; + }; + class CHVD_footTerrainListbox: CHVD_rscXListBox + { + idc = 1500; + + x = 14 * GUI_GRID_W + GUI_GRID_X; + y = 7.2 * GUI_GRID_H + GUI_GRID_Y; + w = 12.5 * GUI_GRID_W; + h = 1 * GUI_GRID_H; + }; + class CHVD_carTerrainListbox: CHVD_rscXListBox + { + idc = 1501; + + x = 14 * GUI_GRID_W + GUI_GRID_X; + y = 14.5 * GUI_GRID_H + GUI_GRID_Y; + w = 12.5 * GUI_GRID_W; + h = 1 * GUI_GRID_H; + }; + class CHVD_airTerrainListbox: CHVD_rscXListBox + { + idc = 1502; + + x = 14 * GUI_GRID_W + GUI_GRID_X; + y = 21.9 * GUI_GRID_H + GUI_GRID_Y; + w = 12.5 * GUI_GRID_W; + h = 1 * GUI_GRID_H; + }; + + class CHVD_footTerrainEdit: CHVD_rscEdit + { + idc = 1400; + onKeyDown = "['CHVD_footTerrain', 1400, 1500] call CHVD_fnc_onEBterrainInput"; + maxChars = 5; + + x = 27 * GUI_GRID_W + GUI_GRID_X; + y = 7.2 * GUI_GRID_H + GUI_GRID_Y; + w = 3.5 * GUI_GRID_W; + h = 1 * GUI_GRID_H; + }; + class CHVD_carTerrainEdit: CHVD_rscEdit + { + idc = 1401; + onKeyDown = "['CHVD_carTerrain', 1401, 1501] call CHVD_fnc_onEBterrainInput"; + maxChars = 5; + + x = 27 * GUI_GRID_W + GUI_GRID_X; + y = 14.5 * GUI_GRID_H + GUI_GRID_Y; + w = 3.5 * GUI_GRID_W; + h = 1 * GUI_GRID_H; + }; + class CHVD_airTerrainEdit: CHVD_rscEdit + { + idc = 1402; + onKeyDown = "['CHVD_airTerrain', 1402, 1502] call CHVD_fnc_onEBterrainInput"; + maxChars = 5; + + x = 27 * GUI_GRID_W + GUI_GRID_X; + y = 21.9 * GUI_GRID_H + GUI_GRID_Y; + w = 3.5 * GUI_GRID_W; + h = 1 * GUI_GRID_H; + }; + class CHVD_footSyncListbox: CHVD_rscXListBox + { + idc = 1404; + + x = 14 * GUI_GRID_W + GUI_GRID_X; + y = 5.7 * GUI_GRID_H + GUI_GRID_Y; + w = 12.5 * GUI_GRID_W; + h = 1 * GUI_GRID_H; + }; + class CHVD_carSyncListbox: CHVD_rscXListBox + { + idc = 1406; + + x = 14 * GUI_GRID_W + GUI_GRID_X; + y = 13 * GUI_GRID_H + GUI_GRID_Y; + w = 12.5 * GUI_GRID_W; + h = 1 * GUI_GRID_H; + }; + class CHVD_airSyncListbox: CHVD_rscXListBox + { + idc = 1408; + + x = 14 * GUI_GRID_W + GUI_GRID_X; + y = 20.4 * GUI_GRID_H + GUI_GRID_Y; + w = 12.5 * GUI_GRID_W; + h = 1 * GUI_GRID_H; + }; + class CHVD_footSyncEdit: CHVD_rscEdit + { + idc = 1410; + maxChars = 4; + + x = 27 * GUI_GRID_W + GUI_GRID_X; + y = 5.7 * GUI_GRID_H + GUI_GRID_Y; + w = 3.5 * GUI_GRID_W; + h = 1 * GUI_GRID_H; + }; + class CHVD_carSyncEdit: CHVD_rscEdit + { + idc = 1409; + maxChars = 4; + + x = 27 * GUI_GRID_W + GUI_GRID_X; + y = 13 * GUI_GRID_H + GUI_GRID_Y; + w = 3.5 * GUI_GRID_W; + h = 1 * GUI_GRID_H; + }; + class CHVD_airSyncEdit: CHVD_rscEdit + { + idc = 1411; + maxChars = 4; + + x = 27 * GUI_GRID_W + GUI_GRID_X; + y = 20.4 * GUI_GRID_H + GUI_GRID_Y; + w = 3.5 * GUI_GRID_W; + h = 1 * GUI_GRID_H; + }; + }; +}; \ No newline at end of file diff --git a/A3-Antistasi/CHVD/fn_UAVstatus.sqf b/A3-Antistasi/CHVD/fn_UAVstatus.sqf new file mode 100644 index 0000000000..1c2f970e28 --- /dev/null +++ b/A3-Antistasi/CHVD/fn_UAVstatus.sqf @@ -0,0 +1,13 @@ +private ["_status"]; +_status = 0; + +switch (UAVControl (getConnectedUAV player) select 1) do { + case (""): { + _status = 0; + }; + default { + _status = 1; + }; +}; + +_status \ No newline at end of file diff --git a/A3-Antistasi/CHVD/fn_fovViewDistance.sqf b/A3-Antistasi/CHVD/fn_fovViewDistance.sqf new file mode 100644 index 0000000000..e4c224ccce --- /dev/null +++ b/A3-Antistasi/CHVD/fn_fovViewDistance.sqf @@ -0,0 +1,11 @@ +private ["_ret"]; +_minViewDistance = [_this, 0, 0, [0]] call BIS_fnc_param; +_ret = _minViewDistance; + +_zoom = call CHVD_fnc_trueZoom; +if (_zoom >= 1) then { + _ret = _minViewDistance + ((12000 / 74) * (_zoom - 1)) min viewDistance; +}; + +//systemChat str _ret; +_ret \ No newline at end of file diff --git a/A3-Antistasi/CHVD/fn_init.sqf b/A3-Antistasi/CHVD/fn_init.sqf new file mode 100644 index 0000000000..213ba6aa1d --- /dev/null +++ b/A3-Antistasi/CHVD/fn_init.sqf @@ -0,0 +1,101 @@ +[] spawn { + if (!hasInterface) exitWith {}; + //Wait for mission init, in case there are variables defined some place else + waitUntil {time > 0}; + + //Define variables, load from profileNamespace + CHVD_allowNoGrass = if (isNil "CHVD_allowNoGrass") then {true} else {CHVD_allowNoGrass}; + CHVD_maxView = if (isNil "CHVD_maxView") then {12000} else {CHVD_maxView}; + CHVD_maxObj = if (isNil "CHVD_maxObj") then {12000} else {CHVD_maxObj}; + + CHVD_footSyncMode = profileNamespace getVariable ["CHVD_footSyncMode",0]; + CHVD_footSyncPercentage = profileNamespace getVariable ["CHVD_footSyncPercentage",0.8]; + CHVD_carSyncMode = profileNamespace getVariable ["CHVD_carSyncMode",0]; + CHVD_carSyncPercentage = profileNamespace getVariable ["CHVD_carSyncPercentage",0.8]; + CHVD_airSyncMode = profileNamespace getVariable ["CHVD_airSyncMode",0]; + CHVD_airSyncPercentage = profileNamespace getVariable ["CHVD_airSyncPercentage",0.8]; + + CHVD_foot = (profileNamespace getVariable ["CHVD_foot",viewDistance]) min CHVD_maxView; + CHVD_car = (profileNamespace getVariable ["CHVD_car",viewDistance]) min CHVD_maxView; + CHVD_air = (profileNamespace getVariable ["CHVD_air",viewDistance]) min CHVD_maxView; + + CHVD_footObj = (profileNamespace getVariable ["CHVD_footObj",viewDistance]) min CHVD_maxObj min CHVD_maxView; + CHVD_footObj = if (CHVD_footSyncMode isEqualTo 1) then {CHVD_foot * CHVD_footSyncPercentage} else {CHVD_footObj}; + CHVD_carObj = (profileNamespace getVariable ["CHVD_carObj",viewDistance]) min CHVD_maxObj min CHVD_maxView; + CHVD_carObj = if (CHVD_carSyncMode isEqualTo 1) then {CHVD_car * CHVD_carSyncPercentage} else {CHVD_carObj}; + CHVD_airObj = (profileNamespace getVariable ["CHVD_airObj",viewDistance]) min CHVD_maxObj min CHVD_maxView; + CHVD_airObj = if (CHVD_airSyncMode isEqualTo 1) then {CHVD_air * CHVD_airSyncPercentage} else {CHVD_airObj}; + + CHVD_footTerrain = if (CHVD_allowNoGrass) then {profileNamespace getVariable ["CHVD_footTerrain",25]} else {(profileNamespace getVariable ["CHVD_footTerrain",25]) min 48.99 max 3.125}; + CHVD_carTerrain = if (CHVD_allowNoGrass) then {profileNamespace getVariable ["CHVD_carTerrain",25]} else {(profileNamespace getVariable ["CHVD_carTerrain",25]) min 48.99 max 3.125}; + CHVD_airTerrain = if (CHVD_allowNoGrass) then {profileNamespace getVariable ["CHVD_airTerrain",25]} else {(profileNamespace getVariable ["CHVD_airTerrain",25]) min 48.99 max 3.125}; + + CHVD_vehType = 0; // 0 = foot, 1 = car, 2 = air + + //Begin initialization + waitUntil {!isNull player}; + waitUntil {!isNull findDisplay 46}; + + if (isClass (configfile >> "CfgPatches" >> "cba_keybinding")) then { + call CHVD_fnc_keyBindings; + } else { + _actionText = if (isLocalized "STR_chvd_title") then {localize "STR_chvd_title"} else {"View Distance Settings"}; + player addAction [_actionText, CHVD_fnc_openDialog, [], -99, false, true, '', '_target isEqualTo _this']; + player addEventHandler ["Respawn", format ["player addAction ['%1', CHVD_fnc_openDialog, [], -99, false, true, '', '_target isEqualTo _this']", _actionText]]; + }; + (findDisplay 46) displayAddEventHandler ["Unload", {call CHVD_fnc_updateSettings}]; // Reset obj view distance so game doesn't lag when browsing menues and so on, if FOV method was used during the game + + [] call CHVD_fnc_updateVehType; + [] call CHVD_fnc_updateSettings; + + //Detect when to change setting type + [] spawn { + for "_i" from 0 to 1 step 0 do { + _currentVehicle = vehicle player; + waitUntil {_currentVehicle != vehicle player}; + [] call CHVD_fnc_updateVehType; + if ( + (CHVD_vehType isEqualTo 0 && CHVD_footSyncMode isEqualTo 2) || + (CHVD_vehType isEqualTo 1 && CHVD_carSyncMode isEqualTo 2) || + (CHVD_vehType isEqualTo 2 && CHVD_airSyncMode isEqualTo 2) + ) then { + [1] call CHVD_fnc_updateSettings; + [] call CHVD_fnc_updateTerrain; + [4] call CHVD_fnc_updateSettings + } else { + [] call CHVD_fnc_updateSettings; + }; + }; + }; + + [] spawn { + for "_i" from 0 to 1 step 0 do { + _UAVstatus = call CHVD_fnc_UAVstatus; + waitUntil {_UAVstatus != call CHVD_fnc_UAVstatus}; + [] call CHVD_fnc_updateVehType; + if ( + (CHVD_vehType isEqualTo 0 && CHVD_footSyncMode isEqualTo 2) || + (CHVD_vehType isEqualTo 1 && CHVD_carSyncMode isEqualTo 2) || + (CHVD_vehType isEqualTo 2 && CHVD_airSyncMode isEqualTo 2) + ) then { + [1] call CHVD_fnc_updateSettings; + [] call CHVD_fnc_updateTerrain; + [4] call CHVD_fnc_updateSettings + } else { + [] call CHVD_fnc_updateSettings; + }; + }; + }; + + [] spawn { + for "_i" from 0 to 1 step 0 do { + _currentZoom = call CHVD_fnc_trueZoom; + waitUntil {_currentZoom != call CHVD_fnc_trueZoom}; + if ( + (CHVD_vehType isEqualTo 0 && CHVD_footSyncMode isEqualTo 2) || + (CHVD_vehType isEqualTo 1 && CHVD_carSyncMode isEqualTo 2) || + (CHVD_vehType isEqualTo 2 && CHVD_airSyncMode isEqualTo 2) + ) then {[4] call CHVD_fnc_updateSettings}; + }; + }; +}; \ No newline at end of file diff --git a/A3-Antistasi/CHVD/fn_keyBindings.sqf b/A3-Antistasi/CHVD/fn_keyBindings.sqf new file mode 100644 index 0000000000..ef13c2f948 --- /dev/null +++ b/A3-Antistasi/CHVD/fn_keyBindings.sqf @@ -0,0 +1,24 @@ +#include "\a3\editor_f\Data\Scripts\dikCodes.h" + +_textDecreaseVD = if (isLocalized "STR_chvd_decreaseVD") then {localize "STR_chvd_decreaseVD"} else {"Decrease view distance"}; +_decViewdistKey = ["CH View Distance", "dec_viewdistance", _textDecreaseVD, {[0] call CHVD_fnc_keyDown}, "", [DIK_LBRACKET, [false, true, false]], true] call CBA_fnc_addKeybind; + +_textIncreaseVD = if (isLocalized "STR_chvd_increaseVD") then {localize "STR_chvd_increaseVD"} else {"Increase view distance"}; +_incViewdistKey = ["CH View Distance", "inc_viewdistance", _textIncreaseVD, {[1] call CHVD_fnc_keyDown}, "", [DIK_RBRACKET, [false, true, false]], true] call CBA_fnc_addKeybind; + +_textOpenSettings = if (isLocalized "STR_chvd_openSettings") then {localize "STR_chvd_openSettings"} else {"Open view distance settings"}; +_openSettingsKey = ["CH View Distance", "open_settings", _textOpenSettings, {call CHVD_fnc_openDialog}, "", [DIK_BACKSLASH, [false, true, false]], false] call CBA_fnc_addKeybind; + +_textDecreaseTerrain = if (isLocalized "STR_chvd_decreaseTerrain") then {localize "STR_chvd_decreaseTerrain"} else {"Decrease terrain quality"}; +_decTerrainKey = ["CH View Distance", "dec_terrain_quality", _textDecreaseTerrain, {[-1] call CHVD_fnc_keyDownTerrain}, "", [DIK_LBRACKET, [true, false, false]], true] call CBA_fnc_addKeybind; + +_textIncreaseTerrain = if (isLocalized "STR_chvd_increaseTerrain") then {localize "STR_chvd_increaseTerrain"} else {"Increase terrain quality"}; +_incTerrainKey = ["CH View Distance", "inc_terrain_quality", _textIncreaseTerrain, {[1] call CHVD_fnc_keyDownTerrain}, "", [DIK_RBRACKET, [true, false, false]], true] call CBA_fnc_addKeybind; + +_useShift = _openSettingsKey select 1 select 0; +_useCtrl = _openSettingsKey select 1 select 1; +_useAlt = _openSettingsKey select 1 select 2; + +_SCAstring = (if (_useShift) then {"Shift + "} else {""}) + (if (_useCtrl) then {"Ctrl + "} else {""}) + (if (_useAlt) then {"Alt + "} else {""}); + +systemChat format ["CH View Distance: CBA Keybindings activated. Press <%1%2> to open settings.", _SCAstring, [[_openSettingsKey select 0] call BIS_fnc_keyCode] call CBA_fnc_capitalize]; \ No newline at end of file diff --git a/A3-Antistasi/CHVD/fn_keyDown.sqf b/A3-Antistasi/CHVD/fn_keyDown.sqf new file mode 100644 index 0000000000..73535968a2 --- /dev/null +++ b/A3-Antistasi/CHVD/fn_keyDown.sqf @@ -0,0 +1,115 @@ +if (CHVD_keyDown) exitWith {}; +CHVD_keyDown = true; + +private ["_vehTypeString"]; +_updateType = [_this, 0, 0, [0]] call BIS_fnc_param; // 0 - decrease VD, 1 - increase VD +_updateValue = if (_updateType isEqualTo 0) then {-500} else {500}; + +if (!isNull (findDisplay 2900)) then {call CHVD_fnc_openDialog}; + +switch (CHVD_vehType) do { + case 1: { + _vehTypeString = "car"; + }; + case 2: { + _vehTypeString = "air"; + }; + default { + _vehTypeString = "foot"; + }; +}; + +_updateMode = call compile ("CHVD_" + _vehTypeString + "SyncMode"); +_viewDistVar = "CHVD_" + _vehTypeString; +_viewDist = call compile _viewDistVar; +_objViewDistVar = "CHVD_" + _vehTypeString + "Obj"; +_objViewDist = call compile _objViewDistVar; +_vdDiff = _viewDist - _objViewDist; + +switch (_updateMode) do { + case 1: { + _viewDistValue = _viewDist + _updateValue min CHVD_maxView max 500; + + _percentVar = "CHVD_" + _vehTypeString + "SyncPercentage"; + _percentValue = call compile _percentVar; + + _objViewDistValue = _viewDistValue * _percentValue min CHVD_maxObj; + + if (_objViewDistValue >= 500) then { + call compile format ["%1 = %2", _viewDistVar, _viewDistValue]; + call compile format ["profileNamespace setVariable ['%1',%1]", _viewDistVar]; + call compile format ["%1 = %2", _objViewDistVar, _objViewDistValue]; + call compile format ["profileNamespace setVariable ['%1',%1]", _objViewDistVar]; + + [3] call CHVD_fnc_updateSettings; + }; + }; + case 2: { + _objViewDistValue = _objViewDist + _updateValue min _viewDist min CHVD_maxObj max 500; + call compile format ["%1 = %2", _objViewDistVar, _objViewDistValue]; + call compile format ["profileNamespace setVariable ['%1',%1]", _objViewDistVar]; + + [4] call CHVD_fnc_updateSettings; + }; + default { + _viewDistValue = _viewDist + _updateValue min CHVD_maxView max (500 + _vdDiff); + _objViewDistValue = _objViewDist + _updateValue min (_viewDistValue - _vdDiff) min CHVD_maxObj max 500; + call compile format ["%1 = %2", _viewDistVar, _viewDistValue]; + call compile format ["profileNamespace setVariable ['%1',%1]", _viewDistVar]; + + call compile format ["%1 = %2", _objViewDistVar, _objViewDistValue]; + call compile format ["profileNamespace setVariable ['%1',%1]", _objViewDistVar]; + + [3] call CHVD_fnc_updateSettings; + }; +}; + +_vdString = ""; +for "_i" from 1 to (35) step 1 do { + if ((call compile _viewDistVar) < CHVD_maxView / 35 * _i) then { + _vdString = _vdString + "·"; + } else { + _vdString = _vdString + "I"; + }; +}; + +_ovdString = ""; +for "_i" from 1 to (35) step 1 do { + if ((call compile _objViewDistVar) < CHVD_maxObj / 35 * _i) then { + _ovdString = _ovdString + "·"; + } else { + _ovdString = _ovdString + "I"; + }; +}; + +_textViewDistance = if (isLocalized "STR_chvd_viewDistance") then {localize "STR_chvd_viewDistance"} else {"View Distance"}; +_textObjViewDistance = if (isLocalized "STR_chvd_objViewDistance") then {localize "STR_chvd_objViewDistance"} else {"View Distance"}; + +hintSilent parseText format [" +%2: %3 +
+%4 +
+%5: %6 +
+%7 +
", +[profilenamespace getvariable ['GUI_BCG_RGB_R',0.3843], profilenamespace getvariable ['GUI_BCG_RGB_G',0.7019], profilenamespace getvariable ['GUI_BCG_RGB_B',0.8862], profilenamespace getvariable ['GUI_BCG_RGB_A',0.7]] call BIS_fnc_colorRGBAtoHTML, +_textViewDistance, +call compile _viewDistVar, +_vdString, +_textObjViewDistance, +call compile _objViewDistVar, +_ovdString +]; + +terminate (missionNamespace getVariable ["CHVD_hintHandle", scriptNull]); +CHVD_hintHandle = [] spawn { + uiSleep 2; + hintSilent ""; +}; + +[] spawn { + uiSleep 0.05; + CHVD_keyDown = false; +}; \ No newline at end of file diff --git a/A3-Antistasi/CHVD/fn_keyDownTerrain.sqf b/A3-Antistasi/CHVD/fn_keyDownTerrain.sqf new file mode 100644 index 0000000000..3e140fa460 --- /dev/null +++ b/A3-Antistasi/CHVD/fn_keyDownTerrain.sqf @@ -0,0 +1,90 @@ +if (CHVD_keyDown) exitWith {}; +CHVD_keyDown = true; + +private ["_vehTypeString"]; +_updateType = [_this, 0, 0, [0]] call BIS_fnc_param; +if (_updateType isEqualTo 0) exitWith {}; +_terrainGridArray = [50, 48.99, 25, 12.5, 3.125]; + +if (!isNull (findDisplay 2900)) then {call CHVD_fnc_openDialog}; + +switch (CHVD_vehType) do { + case 1: { + _vehTypeString = "car"; + }; + case 2: { + _vehTypeString = "air"; + }; + default { + _vehTypeString = "foot"; + }; +}; + +_terrainGridVar = "CHVD_" + _vehTypeString + "Terrain"; +_terrainGrid = call compile _terrainGridVar; +_terrainIndex = switch (true) do { + case (_terrainGrid >= 49): {0}; + case (_terrainGrid >= 48.99): {1}; + case (_terrainGrid >= 25): {2}; + case (_terrainGrid >= 12.5): {3}; + case (_terrainGrid >= 3.125): {4}; + default {1}; +}; +_terrainIndex = (_terrainIndex + _updateType) max 0 min 4; +_terrainGrid = _terrainGridArray select _terrainIndex; + +if (!CHVD_allowNoGrass) then { + _terrainIndex = _terrainIndex max 1; + _terrainGrid = _terrainGrid min 48.99; +}; + +call compile format ["%1 = %2", _terrainGridVar, _terrainGrid]; +call compile format ["profileNamespace setVariable ['%1',%1]", _terrainGridVar]; + +call CHVD_fnc_updateTerrain; + +_terrainString = ""; +for "_i" from (37.125) to 3.125 step -1 do { + if (round ((sqrt _terrainGrid) * 10) -18 >= 53 / 37.125 * _i) then { + _terrainString = _terrainString + "·"; + } else { + _terrainString = _terrainString + "I"; + }; +}; + +_terrainQualityArray = [ + ["Low", localize "STR_chvd_low"] select (isLocalized "STR_chvd_low"), + ["Standart", localize "STR_chvd_standard"] select (isLocalized "STR_chvd_standard"), + ["High", localize "STR_chvd_high"] select (isLocalized "STR_chvd_high"), + ["Very High", localize "STR_chvd_veryHigh"] select (isLocalized "STR_chvd_veryHigh"), + ["Ultra", localize "STR_chvd_ultra"] select (isLocalized "STR_chvd_ultra") +]; +_terrainQuality = _terrainQualityArray select _terrainIndex; +_textTerrainQuality = if (isLocalized "STR_chvd_terrainQuality") then {localize "STR_chvd_terrainQuality"} else {"Terrain Quality"}; +_textTerrainGrid = if (isLocalized "STR_chvd_terrainGrid") then {localize "STR_chvd_terrainGrid"} else {"Terrain Grid"}; + +hintSilent parseText format [" +%2: %3 +
+%4: %5 +
+%6 +
", +[profilenamespace getvariable ['GUI_BCG_RGB_R',0.3843], profilenamespace getvariable ['GUI_BCG_RGB_G',0.7019], profilenamespace getvariable ['GUI_BCG_RGB_B',0.8862], profilenamespace getvariable ['GUI_BCG_RGB_A',0.7]] call BIS_fnc_colorRGBAtoHTML, +_textTerrainQuality, +_terrainQuality, +_textTerrainGrid, +_terrainGrid, +_terrainString +]; + +terminate (missionNamespace getVariable ["CHVD_hintHandle", scriptNull]); +CHVD_hintHandle = [] spawn { + uiSleep 2; + hintSilent ""; +}; + +[] spawn { + uiSleep 0.05; + CHVD_keyDown = false; +}; \ No newline at end of file diff --git a/A3-Antistasi/CHVD/fn_localize.sqf b/A3-Antistasi/CHVD/fn_localize.sqf new file mode 100644 index 0000000000..e3247b409c --- /dev/null +++ b/A3-Antistasi/CHVD/fn_localize.sqf @@ -0,0 +1,37 @@ +_display = (_this select 0) select 0; + +if (isLocalized "STR_chvd_title") then { + (_display displayCtrl 1000) ctrlSetText (toUpper (localize "STR_chvd_title")); +}; +if (isLocalized "STR_chvd_foot") then { + (_display displayCtrl 1001) ctrlSetText (localize "STR_chvd_foot"); +}; +if (isLocalized "STR_chvd_car") then { + (_display displayCtrl 1008) ctrlSetText (localize "STR_chvd_car"); +}; +if (isLocalized "STR_chvd_air") then { + (_display displayCtrl 1015) ctrlSetText (localize "STR_chvd_air"); +}; +if (isLocalized "STR_chvd_view") then { + (_display displayCtrl 1002) ctrlSetText (localize "STR_chvd_view"); + (_display displayCtrl 1010) ctrlSetText (localize "STR_chvd_view"); + (_display displayCtrl 1016) ctrlSetText (localize "STR_chvd_view"); +}; +if (isLocalized "STR_chvd_object") then { + (_display displayCtrl 1003) ctrlSetText (localize "STR_chvd_object"); + (_display displayCtrl 1011) ctrlSetText (localize "STR_chvd_object"); + (_display displayCtrl 1021) ctrlSetText (localize "STR_chvd_object"); +}; +if (isLocalized "STR_chvd_terrain") then { + (_display displayCtrl 1005) ctrlSetText (localize "STR_chvd_terrain"); + (_display displayCtrl 1012) ctrlSetText (localize "STR_chvd_terrain"); + (_display displayCtrl 1019) ctrlSetText (localize "STR_chvd_terrain"); +}; +if (isLocalized "STR_chvd_sync") then { + (_display displayCtrl 1403) ctrlSetText (localize "STR_chvd_sync"); + (_display displayCtrl 1405) ctrlSetText (localize "STR_chvd_sync"); + (_display displayCtrl 1407) ctrlSetText (localize "STR_chvd_sync"); +}; +if (isLocalized "STR_chvd_close") then { + (_display displayCtrl 1612) ctrlSetText (localize "STR_chvd_close"); +}; \ No newline at end of file diff --git a/A3-Antistasi/CHVD/fn_onEBinput.sqf b/A3-Antistasi/CHVD/fn_onEBinput.sqf new file mode 100644 index 0000000000..f6928f0228 --- /dev/null +++ b/A3-Antistasi/CHVD/fn_onEBinput.sqf @@ -0,0 +1,81 @@ +private ["_textValue","_updateType"]; +_varType1 = [_this, 0, "", [""]] call BIS_fnc_param; +_slider1 = [_this, 1, controlNull, [0, controlNull]] call BIS_fnc_param; +_text1 = [_this, 2, controlNull, [0, controlNull]] call BIS_fnc_param; +_varType2 = [_this, 3, "", [""]] call BIS_fnc_param; +_slider2 = [_this, 4, controlNull, [0, controlNull]] call BIS_fnc_param; +_text2 = [_this, 5, controlNull, [0, controlNull]] call BIS_fnc_param; +_modeVar = [_this, 6, "", [""]] call BIS_fnc_param; +_percentVar = [_this, 7, "", [""]] call BIS_fnc_param; + +if (count _this < 7) then { + _updateType = 2; +} else { + _modeVar = call compile _modeVar; + switch (_modeVar) do { + case 1: { + _updateType = 3; + }; + default { + _updateType = 1; + }; + }; +}; + + +_textValue = [ctrlText _text1, "0123456789"] call BIS_fnc_filterString; +_textValue = if (_textValue == "") then {1} else {call compile _textValue min 12000 max 0}; + +_viewDistValue = _textValue min CHVD_maxView; +_objViewDistValue = if (_modeVar isEqualTo 1) then {_textValue * (call compile _percentVar) min CHVD_maxObj} else {_textValue min CHVD_maxObj}; // Check if percentage sync mode is used, if so use a percentage coefficient + +switch (_updateType) do { // 1 - VIEW, 2 - OBJ, 3 - BOTH, 0 - BOTH AND TERRAIN + case 1: { + sliderSetPosition [_slider1, _viewDistValue]; + sliderSetRange [_slider2, 0, _viewDistValue]; + + call compile format ["%1 = %2", _varType1, _viewDistValue]; + call compile format ["profileNamespace setVariable ['%1',%1]", _varType1]; + + if ((call compile _varType2) > _viewDistValue) then { // Update object VD slider and text so it doesn't stay at higher value than VD slider + sliderSetPosition [_slider2, _objViewDistValue]; + ctrlSetText [_text2, str round _objViewDistValue]; + + call compile format ["%1 = %2", _varType2, _objViewDistValue]; + call compile format ["profileNamespace setVariable ['%1',%1]", _varType2]; + }; + + [_updateType] call CHVD_fnc_updateSettings; + }; + case 2: { + sliderSetPosition [_slider1, _objViewDistValue]; + + call compile format ["%1 = %2", _varType1, _objViewDistValue]; + call compile format ["profileNamespace setVariable ['%1',%1]", _varType1]; + + [_updateType] call CHVD_fnc_updateSettings; + }; + case 3: { + sliderSetPosition [_slider1, _viewDistValue]; + sliderSetRange [_slider2, 0, _viewDistValue]; + + call compile format ["%1 = %2", _varType1, _viewDistValue]; + call compile format ["profileNamespace setVariable ['%1',%1]", _varType1]; + + if ((call compile _varType2) > _viewDistValue) then { // Update object VD slider and text so it doesn't stay at higher value than VD slider + sliderSetPosition [_slider2, _objViewDistValue]; + ctrlSetText [_text2, str round _objViewDistValue]; + + call compile format ["%1 = %2", _varType2, _objViewDistValue]; + call compile format ["profileNamespace setVariable ['%1',%1]", _varType2]; + }; + + sliderSetPosition [_slider2, _objViewDistValue]; + ctrlSetText [_text2, str round _objViewDistValue]; + + call compile format ["%1 = %2", _varType2, _objViewDistValue]; + call compile format ["profileNamespace setVariable ['%1',%1]", _varType2]; + + [_updateType] call CHVD_fnc_updateSettings; + }; +}; \ No newline at end of file diff --git a/A3-Antistasi/CHVD/fn_onEBinput_syncmode.sqf b/A3-Antistasi/CHVD/fn_onEBinput_syncmode.sqf new file mode 100644 index 0000000000..96c5576cd1 --- /dev/null +++ b/A3-Antistasi/CHVD/fn_onEBinput_syncmode.sqf @@ -0,0 +1,27 @@ +_textBoxCtrl = [_this, 0, controlNull, [0, controlNull]] call BIS_fnc_param; +_varString = [_this, 1, "", [""]] call BIS_fnc_param; // type of variable to use: foot/car/air +_sliderCtrl = [_this, 2, controlNull, [0, controlNull]] call BIS_fnc_param; +_sliderTextboxCtrl = [_this, 3, controlNull, [0, controlNull]] call BIS_fnc_param; + +_inputValue = [ctrlText _textBoxCtrl, "0123456789"] call BIS_fnc_filterString; +_inputValue = if (_inputValue == "") then {1} else {call compile _inputValue min 100 max 1}; + +ctrlSetText [_textBoxCtrl, (str _inputValue + "%")]; + +_percentageVar = "CHVD_" + _varString + "SyncPercentage"; +_percentage = _inputValue / 100; +call compile format ["%1 = %2", _percentageVar, _percentage]; +call compile format ["profileNamespace setVariable ['%1',%1]", _percentageVar]; + +_viewDistVar = "CHVD_" + _varString; +_viewDist = call compile _viewDistVar; +_objVDVar = "CHVD_" + _varString + "Obj"; +_objVD = _viewDist * _percentage min CHVD_maxObj; + +sliderSetPosition [_sliderCtrl, _objVD]; +ctrlSetText [_sliderTextboxCtrl, str round _objVD]; + +call compile format ["%1 = %2", _objVDVar, _objVD]; +call compile format ["profileNamespace setVariable ['%1',%1]", _objVDVar]; + +[2] call CHVD_fnc_updateSettings; \ No newline at end of file diff --git a/A3-Antistasi/CHVD/fn_onEBterrainInput.sqf b/A3-Antistasi/CHVD/fn_onEBterrainInput.sqf new file mode 100644 index 0000000000..89250d5eaf --- /dev/null +++ b/A3-Antistasi/CHVD/fn_onEBterrainInput.sqf @@ -0,0 +1,33 @@ +private ["_textValue"]; +_varType = [_this, 0, "", [""]] call BIS_fnc_param; +_textCtrl = [_this, 1, controlNull, [0, controlNull]] call BIS_fnc_param; +_listbox = [_this, 2, controlNull, [0, controlNull]] call BIS_fnc_param; + +_textValue = [ctrlText _textCtrl, "0123456789."] call BIS_fnc_filterString; +_textValue = if (_textValue == "") then {50} else {call compile _textValue min 50 max 3.125}; + + +if (!CHVD_allowNoGrass) then { + _textValue = _textValue min 48.99; +}; + +//update listbox +_listboxCtrl = (finddisplay 2900) displayCtrl _listbox; +//remove EH not to cause huge lag +_listboxCtrl ctrlRemoveAllEventHandlers "LBSelChanged"; +_sel = [_textValue] call CHVD_fnc_selTerrainQuality; +if (CHVD_allowNoGrass) then { + _listboxCtrl lbSetCurSel _sel; +} else { + _listboxCtrl lbSetCurSel (_sel - 1); +}; +//add EH again +_listboxCtrl ctrlSetEventHandler ["LBSelChanged", + format ["[_this select 1, '%1', %2] call CHVD_fnc_onLBSelChanged", _varType, _textCtrl] +]; + +//ctrlSetText [_textCtrl, str _textValue]; +call compile format ["%1 = %2",_varType, _textValue]; +call compile format ["profileNamespace setVariable ['%1',%1]", _varType]; + +[] call CHVD_fnc_updateTerrain; \ No newline at end of file diff --git a/A3-Antistasi/CHVD/fn_onLBSelChanged.sqf b/A3-Antistasi/CHVD/fn_onLBSelChanged.sqf new file mode 100644 index 0000000000..60555892e3 --- /dev/null +++ b/A3-Antistasi/CHVD/fn_onLBSelChanged.sqf @@ -0,0 +1,24 @@ +private ["_index","_terrainGrid"]; +_index = _this select 0; +_varType = _this select 1; +_text = _this select 2; + +if (!CHVD_allowNoGrass) then { + _index = _index + 1; +}; + +switch (_index) do { + case 0: {_terrainGrid = 50}; + case 1: {_terrainGrid = 48.99}; + case 2: {_terrainGrid = 25}; + case 3: {_terrainGrid = 12.5}; + case 4: {_terrainGrid = 3.125}; +}; + +if (!CHVD_allowNoGrass) then { + _terrainGrid = _terrainGrid min 48.99; +}; +ctrlSetText [_text, str _terrainGrid]; +call compile format ["%1 = %2",_varType, _terrainGrid]; +call compile format ["profileNamespace setVariable ['%1',%1]", _varType]; +[] call CHVD_fnc_updateTerrain; \ No newline at end of file diff --git a/A3-Antistasi/CHVD/fn_onLBSelChanged_syncmode.sqf b/A3-Antistasi/CHVD/fn_onLBSelChanged_syncmode.sqf new file mode 100644 index 0000000000..efffe83447 --- /dev/null +++ b/A3-Antistasi/CHVD/fn_onLBSelChanged_syncmode.sqf @@ -0,0 +1,43 @@ +private ["_varString"]; +_mode = _this select 0; +_varString = [_this, 1, "", [""]] call BIS_fnc_param; // type of variable to use: foot/car/air +_textBoxCtrl = [_this, 2, controlNull, [0, controlNull]] call BIS_fnc_param; +_sliderCtrl = [_this, 3, controlNull, [0, controlNull]] call BIS_fnc_param; +_sliderTextboxCtrl = [_this, 4, controlNull, [0, controlNull]] call BIS_fnc_param; + +switch (_mode) do { + case 1: { + ctrlEnable [_textBoxCtrl, true]; + _percentageVar = "CHVD_" + _varString + "SyncPercentage"; + _percentage = call compile _percentageVar; + ctrlSetText [_textBoxCtrl, format ["%1",_percentage * 100] + "%"]; + + _viewDistVar = "CHVD_" + _varString; + _viewDist = call compile _viewDistVar; + _objVDVar = "CHVD_" + _varString + "Obj"; + _objVD = _viewDist * _percentage min CHVD_maxObj; + + //disable VD slider and textbox because they are not in use + ctrlEnable [_sliderCtrl, false]; + sliderSetPosition [_sliderCtrl, _objVD]; + ctrlEnable [_sliderTextboxCtrl, false]; + ctrlSetText [_sliderTextboxCtrl, str round _objVD]; + + call compile format ["%1 = %2", _objVDVar, _objVD]; + call compile format ["profileNamespace setVariable ['%1',%1]", _objVDVar]; + }; + default { + ctrlEnable [_textBoxCtrl, false]; + ctrlSetText [_textBoxCtrl, ""]; + + //enable VD slider and textbox in case they are disabled + ctrlEnable [_sliderCtrl, true]; + ctrlEnable [_sliderTextboxCtrl, true]; + }; +}; + +_modeVar = "CHVD_" + _varString + "SyncMode"; +call compile format ["%1 = %2", _modeVar, _mode]; +call compile format ["profileNamespace setVariable ['%1',%1]", _modeVar]; + +[2] call CHVD_fnc_updateSettings; \ No newline at end of file diff --git a/A3-Antistasi/CHVD/fn_onSliderChange.sqf b/A3-Antistasi/CHVD/fn_onSliderChange.sqf new file mode 100644 index 0000000000..0c24c79014 --- /dev/null +++ b/A3-Antistasi/CHVD/fn_onSliderChange.sqf @@ -0,0 +1,83 @@ +private ["_sliderPos","_updateType"]; +_varType1 = [_this, 0, "", [""]] call BIS_fnc_param; +_slider1 = ctrlIDC ([_this, 1, 0, [0, controlNull]] call BIS_fnc_param); +_sliderPos = [_this, 2, 0, [0]] call BIS_fnc_param; +_text1 = [_this, 3, 0, [0, controlNull]] call BIS_fnc_param; +_varType2 = [_this, 4, "", [""]] call BIS_fnc_param; +_slider2 = [_this, 5, 0, [0, controlNull]] call BIS_fnc_param; +_text2 = [_this, 6, 0, [0, controlNull]] call BIS_fnc_param; +_modeVar = [_this, 7, "", [""]] call BIS_fnc_param; +_percentVar = [_this, 8, "", [""]] call BIS_fnc_param; + +if (count _this < 8) then { + _updateType = 2; +} else { + _modeVar = call compile _modeVar; + switch (_modeVar) do { + case 1: { + _updateType = 3; + }; + default { + _updateType = 1; + }; + }; +}; + + +_viewDistValue = _sliderPos min CHVD_maxView max 0; +_objViewDistValue = if (_modeVar isEqualTo 1) then {_sliderPos * (call compile _percentVar) min CHVD_maxObj} else {_sliderPos min CHVD_maxObj}; // Check if percentage sync mode is used, if so use a percentage coefficient + + +switch (_updateType) do { // 1 - VIEW, 2 - OBJ, 3 - BOTH, 0 - BOTH AND TERRAIN + case 1: { + sliderSetPosition [_slider1, _viewDistValue]; + ctrlSetText [_text1, str round _viewDistValue]; + sliderSetRange [_slider2, 0, _viewDistValue]; + + call compile format ["%1 = %2", _varType1, _viewDistValue]; + call compile format ["profileNamespace setVariable ['%1',%1]", _varType1]; + + if ((call compile _varType2) > _viewDistValue) then { // Update object VD slider and text so it doesn't stay at higher value than VD slider + sliderSetPosition [_slider2, _objViewDistValue]; + ctrlSetText [_text2, str round _objViewDistValue]; + + call compile format ["%1 = %2", _varType2, _objViewDistValue]; + call compile format ["profileNamespace setVariable ['%1',%1]", _varType2]; + }; + + [_updateType] call CHVD_fnc_updateSettings; + }; + case 2: { + sliderSetPosition [_slider1, _objViewDistValue]; + ctrlSetText [_text1, str round _objViewDistValue]; + + call compile format ["%1 = %2", _varType1, _objViewDistValue]; + call compile format ["profileNamespace setVariable ['%1',%1]", _varType1]; + + [_updateType] call CHVD_fnc_updateSettings; + }; + case 3: { + sliderSetPosition [_slider1, _viewDistValue]; + ctrlSetText [_text1, str round _viewDistValue]; + sliderSetRange [_slider2, 0, _viewDistValue]; + + call compile format ["%1 = %2", _varType1, _viewDistValue]; + call compile format ["profileNamespace setVariable ['%1',%1]", _varType1]; + + if ((call compile _varType2) > _viewDistValue) then { // Update object VD slider and text so it doesn't stay at higher value than VD slider + sliderSetPosition [_slider2, _objViewDistValue]; + ctrlSetText [_text2, str round _objViewDistValue]; + + call compile format ["%1 = %2", _varType2, _objViewDistValue]; + call compile format ["profileNamespace setVariable ['%1',%1]", _varType2]; + }; + + sliderSetPosition [_slider2, _objViewDistValue]; + ctrlSetText [_text2, str round _objViewDistValue]; + + call compile format ["%1 = %2", _varType2, _objViewDistValue]; + call compile format ["profileNamespace setVariable ['%1',%1]", _varType2]; + + [_updateType] call CHVD_fnc_updateSettings; + }; +}; \ No newline at end of file diff --git a/A3-Antistasi/CHVD/fn_openDialog.sqf b/A3-Antistasi/CHVD/fn_openDialog.sqf new file mode 100644 index 0000000000..f807a71974 --- /dev/null +++ b/A3-Antistasi/CHVD/fn_openDialog.sqf @@ -0,0 +1,122 @@ +[] spawn { +if (missionNamespace getVariable ["CHVD_loadingDialog",false]) exitWith {true}; + +if (isNull (findDisplay 2900)) then { + _dialog = createDialog "CHVD_dialog"; + if (!_dialog) exitWith {systemChat "CH View Distance: Error: can't open dialog."}; +}; + +disableSerialization; +CHVD_loadingDialog = true; + +{ + ctrlSetText _x; +} forEach [[1006, str round CHVD_foot],[1007, str round CHVD_footObj],[1013, str round CHVD_car],[1014, str round CHVD_carObj],[1017, str round CHVD_air],[1018, str round CHVD_airObj],[1400, str CHVD_footTerrain],[1401, str CHVD_carTerrain],[1402, str CHVD_airTerrain]]; + +{ + sliderSetRange [_x select 0, 0, _x select 2]; + sliderSetRange [_x select 3, 0, (_x select 5) min (_x select 1)]; + sliderSetSpeed [_x select 0, 500, 500]; + sliderSetSpeed [_x select 3, 500, 500]; + sliderSetPosition [_x select 0, _x select 1]; + sliderSetPosition [_x select 3, (_x select 4) min (_x select 1)]; +} forEach [[1900,CHVD_foot,CHVD_maxView,1901,CHVD_footObj,CHVD_maxObj],[1902,CHVD_car,CHVD_maxView,1903,CHVD_carObj,CHVD_maxObj],[1904,CHVD_air,CHVD_maxView,1905,CHVD_airObj,CHVD_maxObj]]; + +{ + _ctrl = ((findDisplay 2900) displayCtrl (_x select 0)); + + _textDisabled = if (isLocalized "STR_chvd_disabled") then {localize "STR_chvd_disabled"} else {"Disabled"}; + _ctrl lbAdd _textDisabled; + + _textDynamic = if (isLocalized "STR_chvd_dynamic") then {localize "STR_chvd_dynamic"} else {"Dynamic"}; + _ctrl lbAdd _textDynamic; + + _textFov = if (isLocalized "STR_chvd_fov") then {localize "STR_chvd_fov"} else {"FOV"}; + _ctrl lbAdd _textFov; + + _mode = call compile ("CHVD_" + (_x select 1) + "SyncMode"); + _ctrl lbSetCurSel _mode; + //call compile format ["systemChat '%1 %2'",_ctrl, _x select 1]; + + _handle = _ctrl ctrlSetEventHandler ["LBSelChanged", + format ["[_this select 1, '%1',%2,%3,%4] call CHVD_fnc_onLBSelChanged_syncmode", _x select 1, _x select 2, _x select 3, _x select 4] + ]; +} forEach [[1404,"foot",1410,1901,1007], [1406,"car",1409,1903,1014], [1408,"air",1411,1905,1018]]; + +{ + _ctrl = _x select 0; + _mode = call compile ("CHVD_" + (_x select 1) + "SyncMode"); + + switch (_mode) do { + case 1: { + _percentage = call compile ("CHVD_" + (_x select 1) + "SyncPercentage"); + ctrlSetText [_ctrl, format ["%1",_percentage * 100] + "%"]; + ctrlEnable [_ctrl, true]; + }; + default { + ctrlEnable [_ctrl, false]; + }; + + }; + _ctrlDisplay = (findDisplay 2900) displayCtrl _ctrl; + _handle = _ctrlDisplay ctrlSetEventHandler ["keyDown", + format ["[_this select 0, '%1',%2,%3] call CHVD_fnc_onEBinput_syncmode", _x select 1, _x select 2, _x select 3] + ]; +} forEach [[1410,"foot",1901,1007], [1409,"car",1903,1014], [1411,"air",1905,1018]]; + +{ + _ctrl = ((findDisplay 2900) displayCtrl (_x select 0)); + if (CHVD_allowNoGrass) then { + _textLow = if (isLocalized "STR_chvd_low") then {localize "STR_chvd_low"} else {"Low"}; + _ctrl lbAdd _textLow; + }; + _textStandard = if (isLocalized "STR_chvd_standard") then {localize "STR_chvd_standard"} else {"Standard"}; + _ctrl lbAdd _textStandard; + _textHigh = if (isLocalized "STR_chvd_high") then {localize "STR_chvd_high"} else {"High"}; + _ctrl lbAdd _textHigh; + _textVeryHigh = if (isLocalized "STR_chvd_veryHigh") then {localize "STR_chvd_veryHigh"} else {"Very High"}; + _ctrl lbAdd _textVeryHigh; + _textUltra = if (isLocalized "STR_chvd_ultra") then {localize "STR_chvd_ultra"} else {"Ultra"}; + _ctrl lbAdd _textUltra; + + _sel = [_x select 1] call CHVD_fnc_selTerrainQuality; + if (CHVD_allowNoGrass) then { + _ctrl lbSetCurSel _sel; + } else { + _ctrl lbSetCurSel (_sel - 1); + }; +} forEach [[1500,CHVD_footTerrain],[1501,CHVD_carTerrain],[1502,CHVD_airTerrain]]; + +{ + _ctrl = ((findDisplay 2900) displayCtrl (_x select 0)); + _handle = _ctrl ctrlSetEventHandler ["LBSelChanged", + format ["[_this select 1, '%1', %2] call CHVD_fnc_onLBSelChanged", _x select 1, _x select 2] + ]; +} forEach [[1500,"CHVD_footTerrain",1400],[1501,"CHVD_carTerrain",1401],[1502,"CHVD_airTerrain",1402]]; + +if (CHVD_footSyncMode isEqualTo 1) then { + ctrlEnable [1901,false]; + ctrlEnable [1007,false]; +} else { + ctrlEnable [1901,true]; + ctrlEnable [1007,true]; +}; + +if (CHVD_carSyncMode isEqualTo 1) then { + ctrlEnable [1903,false]; + ctrlEnable [1014,false]; +} else { + ctrlEnable [1903,true]; + ctrlEnable [1014,true]; +}; + +if (CHVD_airSyncMode isEqualTo 1) then { + ctrlEnable [1905,false]; + ctrlEnable [1018,false]; +} else { + ctrlEnable [1905,true]; + ctrlEnable [1018,true]; +}; + +CHVD_loadingDialog = false; +}; \ No newline at end of file diff --git a/A3-Antistasi/CHVD/fn_selTerrainQuality.sqf b/A3-Antistasi/CHVD/fn_selTerrainQuality.sqf new file mode 100644 index 0000000000..6f8a8f38e8 --- /dev/null +++ b/A3-Antistasi/CHVD/fn_selTerrainQuality.sqf @@ -0,0 +1,11 @@ +private ["_output"]; +_terrainGrid = _this select 0; +_output = switch (true) do { + case (_terrainGrid >= 49): {0}; + case (_terrainGrid >= 48.99): {1}; + case (_terrainGrid >= 25): {2}; + case (_terrainGrid >= 12.5): {3}; + case (_terrainGrid >= 3.125): {4}; + default {1}; +}; +_output \ No newline at end of file diff --git a/A3-Antistasi/CHVD/fn_trueZoom.sqf b/A3-Antistasi/CHVD/fn_trueZoom.sqf new file mode 100644 index 0000000000..4e90839d0a --- /dev/null +++ b/A3-Antistasi/CHVD/fn_trueZoom.sqf @@ -0,0 +1,15 @@ +// Thanks to Killzone_Kid :* +// http://killzonekid.com/arma-scripting-tutorials-get-zoom/ + +round ( + ( + [0.5,0.5] + distance2D + worldToScreen + positionCameraToWorld + [0,3,4] + ) * ( + getResolution + select 5 + ) / 2 * 30 +) / 10 \ No newline at end of file diff --git a/A3-Antistasi/CHVD/fn_updateSettings.sqf b/A3-Antistasi/CHVD/fn_updateSettings.sqf new file mode 100644 index 0000000000..950bd83b55 --- /dev/null +++ b/A3-Antistasi/CHVD/fn_updateSettings.sqf @@ -0,0 +1,37 @@ +private ["_updateType"]; +_updateType = [_this, 0, 0, [0]] call BIS_fnc_param; // 1 - view, 2 - obj, 3 - both, 4 - FOV, 0 - both and terrain + +switch (_updateType) do { + case 1: { + switch (CHVD_vehType) do { + case 0: {setViewDistance CHVD_foot}; + case 1: {setViewDistance CHVD_car}; + case 2: {setViewDistance CHVD_air}; + }; + }; + case 2: { + switch (CHVD_vehType) do { + case 0: {setObjectViewDistance CHVD_footObj}; + case 1: {setObjectViewDistance CHVD_carObj}; + case 2: {setObjectViewDistance CHVD_airObj}; + }; + }; + case 4: { + switch (CHVD_vehType) do { + case 0: {setObjectViewDistance ([CHVD_footObj] call CHVD_fnc_fovViewDistance)}; + case 1: {setObjectViewDistance ([CHVD_carObj] call CHVD_fnc_fovViewDistance)}; + case 2: {setObjectViewDistance ([CHVD_airObj] call CHVD_fnc_fovViewDistance)}; + }; + }; + default { + switch (CHVD_vehType) do { + case 0: {setViewDistance CHVD_foot; setObjectViewDistance CHVD_footObj}; + case 1: {setViewDistance CHVD_car; setObjectViewDistance CHVD_carObj}; + case 2: {setViewDistance CHVD_air; setObjectViewDistance CHVD_airObj}; + }; + }; +}; + +if (_updateType isEqualTo 0) then { + [] call CHVD_fnc_updateTerrain; +}; \ No newline at end of file diff --git a/A3-Antistasi/CHVD/fn_updateTerrain.sqf b/A3-Antistasi/CHVD/fn_updateTerrain.sqf new file mode 100644 index 0000000000..7b3a5d40a4 --- /dev/null +++ b/A3-Antistasi/CHVD/fn_updateTerrain.sqf @@ -0,0 +1,5 @@ +switch (CHVD_vehType) do { + case 0: {setTerrainGrid CHVD_footTerrain}; + case 1: {setTerrainGrid CHVD_carTerrain}; + case 2: {setTerrainGrid CHVD_airTerrain}; +}; \ No newline at end of file diff --git a/A3-Antistasi/CHVD/fn_updateVehType.sqf b/A3-Antistasi/CHVD/fn_updateVehType.sqf new file mode 100644 index 0000000000..719a16bf1f --- /dev/null +++ b/A3-Antistasi/CHVD/fn_updateVehType.sqf @@ -0,0 +1,27 @@ +CHVD_inUAV = if ((call CHVD_fnc_UAVstatus) isEqualTo 0) then {false} else {true}; + +if (CHVD_inUAV) then { + switch (true) do { + case (getConnectedUAV player isKindOf "LandVehicle" || getConnectedUAV player isKindOf "Ship"): { + CHVD_vehType = 1; + }; + case (getConnectedUAV player isKindOf "Man"): { + CHVD_vehType = 0; + }; + default { + CHVD_vehType = 2; + }; + }; +} else { + switch (true) do { + case (vehicle player isKindOf "LandVehicle" || vehicle player isKindOf "Ship"): { + CHVD_vehType = 1; + }; + case (vehicle player isKindOf "Air"): { + CHVD_vehType = 2; + }; + default { + CHVD_vehType = 0; + }; + }; +}; diff --git a/A3-Antistasi/CREATE/AIVEHinit.sqf b/A3-Antistasi/CREATE/AIVEHinit.sqf index 8567c3659c..7536079866 100644 --- a/A3-Antistasi/CREATE/AIVEHinit.sqf +++ b/A3-Antistasi/CREATE/AIVEHinit.sqf @@ -43,7 +43,11 @@ if ((_tipo in vehNormal) or (_tipo in vehAttack) or (_tipo in vehBoats)) then _tipo = typeOf _veh; if (side (_this select 1) == buenos) then { - if (_tipo in vehNATOAPC) then {[-2,2,position (_veh)] remoteExec ["A3A_fnc_citySupportChange",2]}; + //if (_tipo in vehNATOAPC or _tipo) then + // { + [500, 0, "SDK Killed APC"] remoteExec ["A3A_fnc_timingCA", 2]; + //[-2,2,position (_veh)] remoteExec ["A3A_fnc_citySupportChange",2]; + // }; }; }]; _veh addEventHandler ["HandleDamage",{private ["_veh"]; _veh = _this select 0; if (!canFire _veh) then {[_veh] call A3A_fnc_smokeCoverAuto; _veh removeEventHandler ["HandleDamage",_thisEventHandler]};if (((_this select 1) find "wheel" != -1) and (_this select 4=="") and (!isPlayer driver (_veh))) then {0;} else {(_this select 2);}}]; @@ -62,7 +66,8 @@ if ((_tipo in vehNormal) or (_tipo in vehAttack) or (_tipo in vehBoats)) then _tipo = typeOf _veh; if (side (_this select 1) == buenos) then { - if (_tipo == vehNATOTank) then {[-5,5,position (_veh)] remoteExec ["A3A_fnc_citySupportChange",2]}; + [600, 0, "SDK Killed Tank"] remoteExec ["A3A_fnc_timingCA", 2]; + //if (_tipo in vehNATOAllTanks) then {[-5,5,position (_veh)] remoteExec ["A3A_fnc_citySupportChange",2]}; }; }]; _veh addEventHandler ["HandleDamage",{private ["_veh"]; _veh = _this select 0; if (!canFire _veh) then {[_veh] call A3A_fnc_smokeCoverAuto; _veh removeEventHandler ["HandleDamage",_thisEventHandler]}}]; @@ -114,7 +119,8 @@ else _tipo = typeOf _veh; if (side (_this select 1) == buenos) then { - if (_tipo in vehNATOAttackHelis) then {[-5,5,position (_veh)] remoteExec ["A3A_fnc_citySupportChange",2]}; + [300, 0, "SDK Killed Heli"] remoteExec ["A3A_fnc_timingCA", 2]; + //if (_tipo in vehNATOAttackHelis) then {[-5,5,position (_veh)] remoteExec ["A3A_fnc_citySupportChange",2]}; }; }]; }; @@ -128,7 +134,8 @@ else _tipo = typeOf _veh; if (side (_this select 1) == buenos) then { - if ((_tipo == vehNATOPlane) or (_tipo == vehNATOPlaneAA)) then {[-8,8,position (_veh)] remoteExec ["A3A_fnc_citySupportChange",2]}; + [900, 0, "SDK Killed Plane"] remoteExec ["A3A_fnc_timingCA", 2]; + //if ((_tipo == vehNATOPlane) or (_tipo == vehNATOPlaneAA)) then {[-8,8,position (_veh)] remoteExec ["A3A_fnc_citySupportChange",2]}; }; }]; }; @@ -138,9 +145,14 @@ else if (_veh isKindOf "StaticWeapon") then { _veh setCenterOfMass [(getCenterOfMass _veh) vectorAdd [0, 0, -1], 0]; + [_veh,"moveS"] remoteExec ["A3A_fnc_flagaction",[buenos,civilian],_veh]; if ((not (_veh in staticsToSave)) and (side gunner _veh != buenos)) then { - if (activeGREF and ((_tipo == staticATBuenos) or (_tipo == staticAABuenos))) then {[_veh,"moveS"] remoteExec ["A3A_fnc_flagaction",[buenos,civilian],_veh]} else {[_veh,"steal"] remoteExec ["A3A_fnc_flagaction",[buenos,civilian],_veh]}; + if (activeGREF and ((_tipo == staticATBuenos) or (_tipo == staticAABuenos))) then { + //[_veh,"moveS"] remoteExec ["A3A_fnc_flagaction",[buenos,civilian],_veh]; + } else { + [_veh,"steal"] remoteExec ["A3A_fnc_flagaction",[buenos,civilian],_veh]; + }; }; if (_tipo == SDKMortar) then { @@ -215,7 +227,8 @@ else _tipo = typeOf _veh; if (side (_this select 1) == buenos) then { - if (_tipo == vehNATOAA) then {[-5,5,position (_veh)] remoteExec ["A3A_fnc_citySupportChange",2]}; + [400, 0, "SDK Killed AA/MRLS"] remoteExec ["A3A_fnc_timingCA", 2]; + //if (_tipo == vehNATOAA) then {[-5,5,position (_veh)] remoteExec ["A3A_fnc_citySupportChange",2]}; }; _tipo call A3A_fnc_removeVehFromPool; }]; diff --git a/A3-Antistasi/CREATE/CIVinit.sqf b/A3-Antistasi/CREATE/CIVinit.sqf index d948278cc1..a507abdaa1 100644 --- a/A3-Antistasi/CREATE/CIVinit.sqf +++ b/A3-Antistasi/CREATE/CIVinit.sqf @@ -24,7 +24,7 @@ _EHkilledIdx = _unit addEventHandler ["killed", _killer = _this select 1; if (_muerto == _killer) then { - _nul = [-1,-1,getPos _muerto] remoteExec ["A3A_fnc_citySupportChange",2]; + _nul = [-1,-1,getPos _muerto, "Civ Killed"] remoteExec ["A3A_fnc_citySupportChange",2]; } else { @@ -46,21 +46,21 @@ _EHkilledIdx = _unit addEventHandler ["killed", if (side _killer == buenos) then { _nul = [1*_multiplicador,0] remoteExec ["A3A_fnc_prestige",2]; - _nul = [1,0,getPos _muerto] remoteExec ["A3A_fnc_citySupportChange",2]; + _nul = [5,-5,getPos _muerto, "Civ Killed by SDK"] remoteExec ["A3A_fnc_citySupportChange",2]; } else { if (side _killer == malos) then { //_nul = [-1*_multiplicador,0] remoteExec ["A3A_fnc_prestige",2]; - _nul = [0,1,getPos _muerto] remoteExec ["A3A_fnc_citySupportChange",2]; + //_nul = [0,1,getPos _muerto] remoteExec ["A3A_fnc_citySupportChange",2]; } else { if (side _killer == muyMalos) then { //_nul = [2*_multiplicador,0] remoteExec ["A3A_fnc_prestige",2]; - _nul = [-1,1,getPos _muerto] remoteExec ["A3A_fnc_citySupportChange",2]; + //_nul = [-1,1,getPos _muerto] remoteExec ["A3A_fnc_citySupportChange",2]; }; }; }; diff --git a/A3-Antistasi/CREATE/CSATpunish.sqf b/A3-Antistasi/CREATE/CSATpunish.sqf index d9642bea65..631d71e5e5 100644 --- a/A3-Antistasi/CREATE/CSATpunish.sqf +++ b/A3-Antistasi/CREATE/CSATpunish.sqf @@ -19,6 +19,45 @@ _nul = [_mrkOrigen,_mrkDestino,muyMalos] spawn A3A_fnc_artilleria; _lado = if (lados getVariable [_mrkDestino,sideUnknown] == malos) then {malos} else {buenos}; _tiempo = time + 3600; +_datos = server getVariable _mrkDestino; + +_numCiv = _datos select 0; +_numCiv = round (_numCiv /10); + +if (lados getVariable [_mrkDestino,sideUnknown] == malos) then {[[_posDestino,malos,"",false],"A3A_fnc_patrolCA"] remoteExec ["A3A_fnc_scheduler",2]}; + +if (_numCiv < 8) then {_numCiv = 8}; + +_size = [_mrkDestino] call A3A_fnc_sizeMarker; +//_grupoCivil = if (_lado == buenos) then {createGroup buenos} else {createGroup malos}; +_grupoCivil = createGroup buenos; +_grupos pushBack _grupoCivil; +//[muyMalos,[civilian,0]] remoteExec ["setFriend",2]; +_tipoUnit = if (_lado == buenos) then {SDKUnarmed} else {NATOUnarmed}; +for "_i" from 0 to _numCiv do + { + while {true} do + { + _pos = _posdestino getPos [random _size,random 360]; + if (!surfaceIsWater _pos) exitWith {}; + }; + _tipoUnit = selectRandom arrayCivs; + _civ = _grupoCivil createUnit [_tipoUnit,_pos, [],0,"NONE"]; + _civ forceAddUniform (selectRandom civUniforms); + _rnd = random 100; + if (_rnd < 90) then + { + if (_rnd < 25) then {[_civ, selectRandom arifles, 5, 0] call BIS_fnc_addWeapon;} else {[_civ, selectRandom hguns, 5, 0] call BIS_fnc_addWeapon;}; + }; + _civiles pushBack _civ; + [_civ] call A3A_fnc_civInit; + sleep 0.5; + }; + +_nul = [leader _grupoCivil, _mrkDestino, "AWARE","SPAWNED","NOVEH2"] execVM "scripts\UPSMON.sqf"; + +sleep (120 + random(300)); + for "_i" from 1 to 3 do { _tipoveh = if (_i != 3) then {selectRandom (vehCSATAir select {[_x] call A3A_fnc_vehAvailable})} else {selectRandom (vehCSATTransportHelis select {[_x] call A3A_fnc_vehAvailable})}; @@ -95,46 +134,9 @@ for "_i" from 1 to 3 do [_heli,_grupo,_posdestino,_posorigen,_grupoheli] spawn A3A_fnc_fastrope; }; }; - sleep 20; + sleep (10 + random(30)); }; -_datos = server getVariable _mrkDestino; - -_numCiv = _datos select 0; -_numCiv = round (_numCiv /10); - -if (lados getVariable [_mrkDestino,sideUnknown] == malos) then {[[_posDestino,malos,"",false],"A3A_fnc_patrolCA"] remoteExec ["A3A_fnc_scheduler",2]}; - -if (_numCiv < 8) then {_numCiv = 8}; - -_size = [_mrkDestino] call A3A_fnc_sizeMarker; -//_grupoCivil = if (_lado == buenos) then {createGroup buenos} else {createGroup malos}; -_grupoCivil = createGroup buenos; -_grupos pushBack _grupoCivil; -//[muyMalos,[civilian,0]] remoteExec ["setFriend",2]; -_tipoUnit = if (_lado == buenos) then {SDKUnarmed} else {NATOUnarmed}; -for "_i" from 0 to _numCiv do - { - while {true} do - { - _pos = _posdestino getPos [random _size,random 360]; - if (!surfaceIsWater _pos) exitWith {}; - }; - _tipoUnit = selectRandom arrayCivs; - _civ = _grupoCivil createUnit [_tipoUnit,_pos, [],0,"NONE"]; - _civ forceAddUniform (selectRandom civUniforms); - _rnd = random 100; - if (_rnd < 90) then - { - if (_rnd < 25) then {[_civ, "hgun_PDW2000_F", 5, 0] call BIS_fnc_addWeapon;} else {[_civ, "hgun_Pistol_heavy_02_F", 5, 0] call BIS_fnc_addWeapon;}; - }; - _civiles pushBack _civ; - [_civ] call A3A_fnc_civInit; - sleep 0.5; - }; - -_nul = [leader _grupoCivil, _mrkDestino, "AWARE","SPAWNED","NOVEH2"] execVM "scripts\UPSMON.sqf"; - _civilMax = {alive _x} count _civiles; _solMax = count _soldados; @@ -142,12 +144,19 @@ for "_i" from 0 to round random 2 do { if ([vehCSATPlane] call A3A_fnc_vehAvailable) then { - _nul = [_mrkdestino,muyMalos,"NAPALM"] spawn A3A_fnc_airstrike; + _nul = [_mrkdestino,muyMalos,"CLUSTER"] spawn A3A_fnc_airstrike; sleep 30; }; }; -waitUntil {sleep 5; (({not (captive _x)} count _soldados) < ({captive _x} count _soldados)) or ({alive _x} count _soldados < round (_solMax / 3)) or (({(_x distance _posdestino < _size*2) and (not(vehicle _x isKindOf "Air")) and (alive _x) and (!captive _x)} count _soldados) > 4*({(alive _x) and (_x distance _posdestino < _size*2)} count _civiles)) or (time > _tiempo)}; +waitUntil { + sleep 5; + (({not (captive _x)} count _soldados) < ({captive _x} count _soldados)) + or ({alive _x} count _soldados < round (_solMax / 3)) + or ({alive _x} count _civiles == 0) + //or (({(_x distance _posdestino < _size*2) and (not(vehicle _x isKindOf "Air")) and (alive _x) and (!captive _x)} count _soldados) > 4*({(alive _x) and (_x distance _posdestino < _size*2)} count _civiles)) + or (time > _tiempo) +}; if ((({not (captive _x)} count _soldados) < ({captive _x} count _soldados)) or ({alive _x} count _soldados < round (_solMax / 3)) or (time > _tiempo)) then { @@ -156,24 +165,32 @@ if ((({not (captive _x)} count _soldados) < ({captive _x} count _soldados)) or ( ["AtaqueAAF",[format ["%2 is making a punishment expedition to %1. They will kill everybody there. Defend the city at all costs",_nombredest,nameMuyMalos],format ["%1 Punishment",nameMuyMalos],_mrkDestino],getMarkerPos _mrkDestino,"SUCCEEDED"] call A3A_fnc_taskUpdate; if ({(side _x == buenos) and (_x distance _posDestino < _size * 2)} count allUnits >= {(side _x == malos) and (_x distance _posDestino < _size * 2)} count allUnits) then { - if (lados getVariable [_mrkDestino,sideUnknown] == malos) then {[-15,15,_posdestino] remoteExec ["A3A_fnc_citySupportChange",2]} else {[-5,15,_posdestino] remoteExec ["A3A_fnc_citySupportChange",2]}; + if (lados getVariable [_mrkDestino,sideUnknown] == malos) then { + [-15,15,_posdestino, "CSAT Punish/CSAT Lose to SDK: NATO Town"] remoteExec ["A3A_fnc_citySupportChange",2]; + } else { + [-5,15,_posdestino, "CSAT Punish/CSAT Lose to SDK: SDK Town"] remoteExec ["A3A_fnc_citySupportChange",2]; + }; [-5,0] remoteExec ["A3A_fnc_prestige",2]; - {[-10,10,_x] remoteExec ["A3A_fnc_citySupportChange",2]} forEach ciudades; + {[-2,2,_x, "CSAT Punish/CSAT Lose to SDK: Other Towns"] remoteExec ["A3A_fnc_citySupportChange",2]} forEach ciudades; {if (isPlayer _x) then {[10,_x] call A3A_fnc_playerScoreAdd}} forEach ([500,0,_posdestino,buenos] call A3A_fnc_distanceUnits); [10,theBoss] call A3A_fnc_playerScoreAdd; } else { - if (lados getVariable [_mrkDestino,sideUnknown] == malos) then {[15,-5,_posdestino] remoteExec ["A3A_fnc_citySupportChange",2]} else {[15,-15,_posdestino] remoteExec ["A3A_fnc_citySupportChange",2]}; - {[10,-10,_x] remoteExec ["A3A_fnc_citySupportChange",2]} forEach ciudades; + if (lados getVariable [_mrkDestino,sideUnknown] == malos) then { + [15,-5,_posdestino, "CSAT Punish/CSAT Lose to NATO: NATO Town"] remoteExec ["A3A_fnc_citySupportChange",2]; + } else { + [15,-15,_posdestino, "CSAT Punish/CSAT Lose to NATO: SDK Town"] remoteExec ["A3A_fnc_citySupportChange",2]; + }; + {[2,-2,_x, "CSAT Punish/CSAT Lose to NATO: Other Towns"] remoteExec ["A3A_fnc_citySupportChange",2]} forEach ciudades; }; } else { ["AtaqueAAF",[format ["%2 is making a punishment expedition to %1. They will kill everybody there. Defend the city at all costs",_nombredest,nameMuyMalos],format ["%1 Punishment",nameMuyMalos],_mrkDestino],getMarkerPos _mrkDestino,"FAILED"] call A3A_fnc_taskUpdate; //["AtaqueAAF", "FAILED",true] spawn BIS_fnc_taskSetState; - [-20,-20,_posdestino] remoteExec ["A3A_fnc_citySupportChange",2]; - {[-10,-10,_x] remoteExec ["A3A_fnc_citySupportChange",2]} forEach ciudades; + [-20,-20,_posdestino,"CSAT Punish/CSAT Win: Target Town"] remoteExec ["A3A_fnc_citySupportChange",2]; + {[-2,-2,_x,"CSAT Punish/CSAT Win: Other Towns"] remoteExec ["A3A_fnc_citySupportChange",2]} forEach ciudades; destroyedCities = destroyedCities + [_mrkDestino]; publicVariable "destroyedCities"; for "_i" from 1 to 60 do @@ -187,7 +204,7 @@ else sleep 15; //[muyMalos,[civilian,1]] remoteExec ["setFriend",2]; _nul = [0,"AtaqueAAF"] spawn A3A_fnc_borrarTask; -[7200] remoteExec ["A3A_fnc_timingCA",2]; +[2400, 1200, "CSAT Punish"] remoteExec ["A3A_fnc_timingCA",2]; { _veh = _x; if (!([distanciaSPWN,1,_veh,buenos] call A3A_fnc_distanceUnits) and (({_x distance _veh <= distanciaSPWN} count (allPlayers - (entities "HeadlessClient_F"))) == 0)) then {deleteVehicle _x}; diff --git a/A3-Antistasi/CREATE/FIAinitBASES.sqf b/A3-Antistasi/CREATE/FIAinitBASES.sqf index c404c1674b..6320bb4133 100644 --- a/A3-Antistasi/CREATE/FIAinitBASES.sqf +++ b/A3-Antistasi/CREATE/FIAinitBASES.sqf @@ -25,7 +25,7 @@ if (count _this > 1) then _unit allowFleeing 0; _tipo = typeOf _unit; //_skill = if (_tipo in sdkTier1) then {0.1 + (skillFIA * 0.2)} else {if (_tipo in sdkTier2) then {0.2 + (skillFIA * 0.2)} else {0.3 + (skillFIA * 0.2)}}; -_skill = 0.1 + (skillFIA * 0.05 * skillMult); +_skill = 0.1 + (skillFIA * 0.05); if ((_marcador == "Synd_HQ") and (isMultiplayer)) then {_skill = 1}; _unit setSkill _skill; if (!activeGREF) then {if (not((uniform _unit) in uniformsSDK)) then {[_unit] call A3A_fnc_reDress}}; @@ -61,7 +61,7 @@ else if ((random 20 < skillFIA) and (count unlockedAA > 0)) then { _unit addbackpack (unlockedBackpacks select 0); - [_unit, selectRandom unlockedAA, 2, 0] call BIS_fnc_addWeapon; + [_unit, selectRandom unlockedAA, 0, 0] call BIS_fnc_addWeapon; //removeBackpack _unit; }; }; @@ -115,7 +115,7 @@ else _magazines = getArray (configFile / "CfgWeapons" / (secondaryWeapon _unit) / "magazines"); {_unit removeMagazines _x} forEach _magazines; _unit removeWeaponGlobal (secondaryWeapon _unit); - [_unit, _rlauncher, 4, 0] call BIS_fnc_addWeapon; + [_unit, _rlauncher, 0, 0] call BIS_fnc_addWeapon; }; } else @@ -140,7 +140,21 @@ else }; }; - +// Ensure any launcher has ammo in the tube, and in the backpack if they have one. +if !(secondaryWeapon _unit == "") then + { + _magazines = getArray (configFile / "CfgWeapons" / (secondaryWeapon _unit) / "magazines"); + if !(_magazines isEqualTo []) then + { + // Put ammo in the tube + _unit addSecondaryWeaponItem (_magazines select 0); + if !(isNull unitBackpack _unit) then + { + // Force add ammo to backpack + (unitBackpack _unit) addItemCargoGlobal [_magazines select 0, 3]; + }; + }; + }; _unit selectWeapon (primaryWeapon _unit); if (!haveRadio) then {_unit unlinkItem "ItemRadio"}; @@ -212,7 +226,7 @@ _EHkilledIdx = _unit addEventHandler ["killed", { }; if (side _killer == malos) then { - [0,-0.25,getPos _muerto] remoteExec ["A3A_fnc_citySupportChange",2]; + [0,-0.25,getPos _muerto,"SDK Unit Killed"] remoteExec ["A3A_fnc_citySupportChange",2]; [-0.25,0] remoteExec ["A3A_fnc_prestige",2]; } else diff --git a/A3-Antistasi/CREATE/NATOinit.sqf b/A3-Antistasi/CREATE/NATOinit.sqf index 2b73131b9b..276c8af8fb 100644 --- a/A3-Antistasi/CREATE/NATOinit.sqf +++ b/A3-Antistasi/CREATE/NATOinit.sqf @@ -89,7 +89,7 @@ else _magazines = getArray (configFile / "CfgWeapons" / _rifleFinal / "magazines"); {_unit removeMagazines _x} forEach _magazines; _unit removeWeaponGlobal (_rifleFinal); - if (tierWar < 5) then {[_unit, "arifle_MX_Black_F", 6, 0] call BIS_fnc_addWeapon} else {[_unit, "arifle_AK12_F", 6, 0] call BIS_fnc_addWeapon}; + if (tierWar < 5) then {[_unit, rifleTier1NATO, 6, 0] call BIS_fnc_addWeapon} else {[_unit, rifleTier2NATO, 6, 0] call BIS_fnc_addWeapon}; _unit selectWeapon (primaryWeapon _unit); }; }; diff --git a/A3-Antistasi/CREATE/VEHdespawner.sqf b/A3-Antistasi/CREATE/VEHdespawner.sqf index d9aef57de3..4488e4e111 100644 --- a/A3-Antistasi/CREATE/VEHdespawner.sqf +++ b/A3-Antistasi/CREATE/VEHdespawner.sqf @@ -8,7 +8,7 @@ _veh setVariable ["inDespawner",true,true]; if ((typeOf _veh in arrayCivVeh) and ({(_x getVariable ["spawner",false]) and (side group _x == buenos)} count crew _veh > 0) and (_veh distance getMarkerPos respawnBuenos > 50)) then { _pos = position _veh; - [0,-1,_pos] remoteExec ["A3A_fnc_citySupportChange",2]; + [0,-1,_pos,"SDK Stole Car"] remoteExec ["A3A_fnc_citySupportChange",2]; _ciudad = [ciudades, _pos] call BIS_fnc_nearestPosition; _datos = server getVariable _ciudad; _prestigeOPFOR = _datos select 2; diff --git a/A3-Antistasi/CREATE/ambientCivs.sqf b/A3-Antistasi/CREATE/ambientCivs.sqf index f30a363bd1..f84155471a 100644 --- a/A3-Antistasi/CREATE/ambientCivs.sqf +++ b/A3-Antistasi/CREATE/ambientCivs.sqf @@ -1,7 +1,7 @@ private _casas = []; -private _mrk = createMarkerLocal ["ambientCiv", position player]; +private _mrk = createMarkerLocal["ambientCiv", position player]; _mrk setMarkerShapeLocal "RECTANGLE"; -_mrk setMarkerSizeLocal [300,300]; +_mrk setMarkerSizeLocal[300, 300]; _mrk setMarkerTypeLocal "hd_warning"; _mrk setMarkerColorLocal "ColorRed"; _mrk setMarkerBrushLocal "DiagGrid"; @@ -10,57 +10,62 @@ private _grupo = grpNull; private _reset = true; private _civs = []; -while {true} do - { - if (player distance getMarkerPos _mrk > 300) then - { - _mrk setMarkerPosLocal (position player); - _reset = true; - _aborrar = []; - { - _civ = _x; - if (!(alive _civ) or ({_civ distance _x <= 300} count (allPlayers - (entities "HeadlessClient_F")) == 0)) then - { - _grupo = group _x; - _aborrar pushBack _x; - deleteVehicle _x; - if ({alive _x} count (units _grupo) == 0) then {deleteGroup _grupo}; - }; - } forEach _civs; - _civs = _civs - _aborrar; - }; - _allCivs = allUnits select {(alive _x) and (side _x == civilian)}; - if ((count _allCivs < civPerc) and ({(local _x) and (simulationEnabled _x) and (alive _x)} count allUnits < maxUnits)) then - { - if (_reset) then {_casas = (nearestTerrainObjects [player, ["House"], 300]) select {(count (_x buildingPos -1) > 0)}}; - _casas = _casas select {!((typeOf _x) in listMilBld)}; - _numCasas = count _casas; - if (_numCasas > 0) then - { - _reset = false; - if ((daytime < 8) or (daytime > 21)) then {_numCasas = round (_numCasas / 2)}; - if ({_x distance player < 300} count _allCivs <= _numCasas) then - { - _casa = selectRandom _casas; - if ({_x distance _casa < 20} count (allPlayers - (entities "HeadlessClient_F")) == 0) then - { - if (isNull _grupo) then - { - _grupo = createGroup civilian; - } - else - { - if (count units _grupo > 2) then {_grupo = createGroup civilian}; - }; - _posCasa = selectRandom (_casa buildingPos -1); - _civ = _grupo createUnit [selectRandom arrayCivs, _posCasa, [],0, "NONE"]; - _civ setPosATL _posCasa; - [_civ] spawn A3A_fnc_CIVinit; - _civs pushBack _civ; - if (_civ == leader _civ) then {_nul = [_civ, "ambientCiv", "SAFE", "SPAWNED","NOFOLLOW", "NOVEH2","NOSHARE","DoRelax"] execVM "scripts\UPSMON.sqf"}; - }; - }; - }; - }; - sleep 5; - }; \ No newline at end of file +while { true } do { + if (player distance getMarkerPos _mrk > 300) then { + _mrk setMarkerPosLocal(position player); + _reset = true; + _aborrar = []; + { + _civ = _x; + if (!(alive _civ) or ({ _civ distance _x <= 300 } count ( allPlayers - (entities "HeadlessClient_F")) == 0)) then { + _grupo = group _x; + _aborrar pushBack _x; + deleteVehicle _x; + if ({alive _x} count (units _grupo) == 0) then { + deleteGroup _grupo; + }; + }; + } forEach _civs; + _civs = _civs - _aborrar; + }; + _allCivs = allUnits select {(alive _x) and (side _x == civilian)}; + if ((count _allCivs < civPerc) and + ({(local _x) and (simulationEnabled _x) and (alive _x)} count allUnits < maxUnits)) then { + if (_reset) then { + _casas = (nearestTerrainObjects[player, ["House"], 300]) select { + (count(_x buildingPos - 1) > 0) + } + }; + _casas = _casas select { !((typeOf _x) in listMilBld) }; + + _numCasas = count _casas; + if (_numCasas > 0) then { + _reset = false; + if ((daytime < 8) or (daytime > 21)) then { + _numCasas = round(_numCasas / 2); + }; + if ({ _x distance player < 300 } count _allCivs <= _numCasas) then { + _casa = selectRandom _casas; + if ({ _x distance _casa < 20 } count(allPlayers - (entities "HeadlessClient_F")) == 0) then { + if (isNull _grupo) then { + _grupo = createGroup civilian; + } + else { + if (count units _grupo > 2) then { + _grupo = createGroup civilian; + }; + }; + _posCasa = selectRandom(_casa buildingPos - 1); + _civ = _grupo createUnit[selectRandom arrayCivs, _posCasa, [], 0, "NONE"]; + _civ setPosATL _posCasa; + [_civ] spawn A3A_fnc_CIVinit; + _civs pushBack _civ; + if (_civ == leader _civ) then { + _nul = [_civ, "ambientCiv", "SAFE", "SPAWNED", "NOFOLLOW", "NOVEH2", "NOSHARE", "DoRelax"] execVM "scripts\UPSMON.sqf" + }; + }; + }; + }; + }; + sleep 5; +}; \ No newline at end of file diff --git a/A3-Antistasi/CREATE/createAIcontroles.sqf b/A3-Antistasi/CREATE/createAIcontroles.sqf index 7aa6cb3eef..e61e4b2687 100644 --- a/A3-Antistasi/CREATE/createAIcontroles.sqf +++ b/A3-Antistasi/CREATE/createAIcontroles.sqf @@ -229,7 +229,7 @@ if (spawner getVariable _marcador != 2) then { if (_winner == muyMalos) then { - _nul = [-5,0,_posicion] remoteExec ["A3A_fnc_citySupportChange",2]; + //_nul = [-5,0,_posicion] remoteExec ["A3A_fnc_citySupportChange",2]; lados setVariable [_marcador,muyMalos,true]; } else @@ -243,12 +243,13 @@ if (spawner getVariable _marcador != 2) then if (_winner == malos) then { lados setVariable [_marcador,malos,true]; - _nul = [5,0,_posicion] remoteExec ["A3A_fnc_citySupportChange",2]; + _nul = [5,0,_posicion, "SDK Roadblock Destroyed"] remoteExec ["A3A_fnc_citySupportChange",2]; } else { lados setVariable [_marcador,buenos,true]; - _nul = [0,5,_posicion] remoteExec ["A3A_fnc_citySupportChange",2]; + [300, 300, "SDK Destroyed Roadblock"] remoteExec ["A3A_fnc_timingCA", 2]; + //_nul = [0,5,_posicion] remoteExec ["A3A_fnc_citySupportChange",2]; }; }; if (_winner == buenos) then {[[_posicion,_lado,"",false],"A3A_fnc_patrolCA"] remoteExec ["A3A_fnc_scheduler",2]}; diff --git a/A3-Antistasi/CREATE/createAIpuestos.sqf b/A3-Antistasi/CREATE/createAIpuestos.sqf index bacf17a695..758d3173e9 100644 --- a/A3-Antistasi/CREATE/createAIpuestos.sqf +++ b/A3-Antistasi/CREATE/createAIpuestos.sqf @@ -1,300 +1,380 @@ -if (!isServer and hasInterface) exitWith{}; -private ["_marcador","_vehiculos","_grupos","_soldados","_posicion","_pos","_size","_frontera","_lado","_cfg","_esFIA","_garrison","_antena","_tam","_buildings","_mrk","_cuenta","_tipoGrupo","_grupo","_tipoUnit","_tipoVeh","_veh","_unit","_bandera","_caja","_roads","_mrkMar","_vehicle","_vehCrew","_grupoVeh","_dist","_road","_roadCon","_dirVeh","_bunker","_dir","_posF"]; +if (!isServer and hasInterface) exitWith {}; +private ["_marcador", "_vehiculos", "_grupos", "_soldados", "_posicion", "_pos", "_size", "_frontera", "_lado", "_cfg", "_esFIA", "_garrison", "_antena", "_tam", "_buildings", "_mrk", "_cuenta", "_tipoGrupo", "_grupo", "_tipoUnit", "_tipoVeh", "_veh", "_unit", "_bandera", "_caja", "_roads", "_mrkMar", "_vehicle", "_vehCrew", "_grupoVeh", "_dist", "_road", "_roadCon", "_dirVeh", "_bunker", "_dir", "_posF"]; _marcador = _this select 0; _vehiculos = []; _grupos = []; _soldados = []; -_posicion = getMarkerPos (_marcador); +_posicion = getMarkerPos(_marcador); _pos = []; - _size = [_marcador] call A3A_fnc_sizeMarker; _frontera = [_marcador] call A3A_fnc_isFrontline; _lado = muyMalos; _esFIA = false; -if (lados getVariable [_marcador,sideUnknown] == malos) then - { - _lado = malos; - if ((random 10 >= (tierWar + difficultyCoef)) and !(_frontera) and !(_marcador in forcedSpawn)) then - { - _esFIA = true; - }; - }; +if (lados getVariable[_marcador, sideUnknown] == malos) then { + _lado = malos; + if ((random 10 >= (tierWar + difficultyCoef)) and !(_frontera) and !(_marcador in forcedSpawn)) then { + _esFIA = true; + }; +}; _antena = objNull; -if (_lado == malos) then - { - if (_marcador in puestos) then - { - _buildings = nearestObjects [_posicion,["Land_TTowerBig_1_F","Land_TTowerBig_2_F","Land_Communication_F"], _size]; - if (count _buildings > 0) then - { - _antena = _buildings select 0; - }; - }; - }; +if (_lado == malos) then { + if (_marcador in puestos) then { + _buildings = nearestObjects[_posicion, ["Land_TTowerBig_1_F", "Land_TTowerBig_2_F", "Land_Communication_F"], _size]; + if (count _buildings > 0) then { + _antena = _buildings select 0; + }; + }; +}; -_mrk = createMarkerLocal [format ["%1patrolarea", random 100], _posicion]; +_mrk = createMarkerLocal[format["%1patrolarea", random 100], _posicion]; _mrk setMarkerShapeLocal "RECTANGLE"; -_mrk setMarkerSizeLocal [(distanciaSPWN/2),(distanciaSPWN/2)]; +_mrk setMarkerSizeLocal[(distanciaSPWN / 2), (distanciaSPWN / 2)]; _mrk setMarkerTypeLocal "hd_warning"; _mrk setMarkerColorLocal "ColorRed"; _mrk setMarkerBrushLocal "DiagGrid"; _ang = markerDir _marcador; _mrk setMarkerDirLocal _ang; -if (!debug) then {_mrk setMarkerAlphaLocal 0}; -_garrison = garrison getVariable [_marcador,[]]; +if (!debug) then { + _mrk setMarkerAlphaLocal 0 +}; +_garrison = garrison getVariable[_marcador, []]; _garrison = _garrison call A3A_fnc_garrisonReorg; _tam = count _garrison; private _patrol = true; -if (_tam < ([_marcador] call A3A_fnc_garrisonSize)) then - { - _patrol = false; - } -else - { - if ({if ((getMarkerPos _x inArea _mrk) and (lados getVariable [_x,sideUnknown] != _lado)) exitWIth {1}} count marcadores > 0) then {_patrol = false}; - }; -if (_patrol) then - { - _cuenta = 0; - while {(spawner getVariable _marcador !=2) and (_cuenta < 4)} do - { - _arrayGrupos = if (_lado == malos) then - { - if (!_esFIA) then {gruposNATOsmall} else {gruposFIASmall}; - } - else - { - gruposCSATsmall - }; - if ([_marcador,false] call A3A_fnc_fogCheck < 0.3) then {_arrayGrupos = _arrayGrupos - sniperGroups}; - _tipoGrupo = selectRandom _arrayGrupos; +if (_tam < ([_marcador] call A3A_fnc_garrisonSize)) then { + _patrol = false; +} else { + if ({if ((getMarkerPos _x inArea _mrk) and (lados getVariable[_x, sideUnknown] != _lado)) exitWith {1} } count marcadores > 0) then { + _patrol = false + }; +}; +if (_patrol) then { + _cuenta = 0; + while { (spawner getVariable _marcador != 2) and (_cuenta < 4) } do { + _arrayGrupos = + if (_lado == malos) then { + if (!_esFIA) then { + gruposNATOsmall + } else { + gruposFIASmall + }; + } else { + gruposCSATsmall + }; + if ([_marcador, false] call A3A_fnc_fogCheck < 0.3) then { + _arrayGrupos = _arrayGrupos - sniperGroups + }; + _tipoGrupo = selectRandom _arrayGrupos; - _grupo = [_posicion,_lado, _tipoGrupo,false,true] call A3A_fnc_spawnGroup; - if !(isNull _grupo) then - { - sleep 1; - if ((random 10 < 2.5) and (not(_tipogrupo in sniperGroups))) then - { - _perro = _grupo createUnit ["Fin_random_F",_posicion,[],0,"FORM"]; - [_perro] spawn A3A_fnc_guardDog; - sleep 1; - }; - [leader _grupo, _mrk, "SAFE","SPAWNED", "RANDOM","NOVEH2"] execVM "scripts\UPSMON.sqf"; - _grupos pushBack _grupo; - {[_x,_marcador] call A3A_fnc_NATOinit; _soldados pushBack _x} forEach units _grupo; - }; - _cuenta = _cuenta +1; - }; - }; + _grupo = [_posicion, _lado, _tipoGrupo, false, true] call A3A_fnc_spawnGroup; + if !(isNull _grupo) then { + sleep 1; + if (random 10 < 2.5 and not(_tipogrupo in sniperGroups)) then { + _perro = _grupo createUnit["Fin_random_F", _posicion, [], 0, "FORM"]; + [_perro] spawn A3A_fnc_guardDog; + sleep 1; + }; + [leader _grupo, _mrk, "SAFE", "SPAWNED", "RANDOM", "NOVEH2"] execVM "scripts\UPSMON.sqf"; + _grupos pushBack _grupo; + { + [_x, _marcador] call A3A_fnc_NATOinit; + _soldados pushBack _x + } forEach units _grupo; + }; + _cuenta = _cuenta + 1; + }; +}; -if ((_frontera) and (spawner getVariable _marcador!=2) and (_marcador in puestos)) then - { - _grupo = createGroup _lado; - _tipoUnit = if (_lado==malos) then {staticCrewmalos} else {staticCrewMuyMalos}; - _tipoVeh = if (_lado == malos) then {NATOMortar} else {CSATMortar}; - _pos = [_posicion] call A3A_fnc_mortarPos; - _veh = _tipoVeh createVehicle _pos; - _nul=[_veh] execVM "scripts\UPSMON\MON_artillery_add.sqf"; - _unit = _grupo createUnit [_tipoUnit, _posicion, [], 0, "NONE"]; - [_unit,_marcador] call A3A_fnc_NATOinit; - _unit moveInGunner _veh; - _soldados pushBack _unit; - _vehiculos pushBack _veh; - sleep 1; - }; +if ((_frontera) and (spawner getVariable _marcador != 2) and (_marcador in puestos)) then { + _grupo = createGroup _lado; + _tipoUnit = + if (_lado == malos) then { + staticCrewmalos + } else { + staticCrewMuyMalos + }; + _tipoVeh = + if (_lado == malos) then { + NATOMortar + } else { + CSATMortar + }; + _pos = [_posicion] call A3A_fnc_mortarPos; + _veh = _tipoVeh createVehicle _pos; + _nul = [_veh] execVM "scripts\UPSMON\MON_artillery_add.sqf"; + _unit = _grupo createUnit[_tipoUnit, _posicion, [], 0, "NONE"]; + [_unit, _marcador] call A3A_fnc_NATOinit; + _unit moveInGunner _veh; + _soldados pushBack _unit; + _vehiculos pushBack _veh; + sleep 1; +}; -_ret = [_marcador,_size,_lado,_frontera] call A3A_fnc_milBuildings; -_grupos pushBack (_ret select 0); -_vehiculos append (_ret select 1); -_soldados append (_ret select 2); +_ret = [_marcador, _size, _lado, _frontera] call A3A_fnc_milBuildings; +_grupos pushBack(_ret select 0); +_vehiculos append(_ret select 1); +_soldados append(_ret select 2); -_tipoVeh = if (_lado == malos) then {NATOFlag} else {CSATFlag}; -_bandera = createVehicle [_tipoVeh, _posicion, [],0, "CAN_COLLIDE"]; +_tipoVeh = + if (_lado == malos) then { + NATOFlag + } else { + CSATFlag + }; +_bandera = createVehicle[_tipoVeh, _posicion, [], 0, "CAN_COLLIDE"]; _bandera allowDamage false; -[_bandera,"take"] remoteExec ["A3A_fnc_flagaction",[buenos,civilian],_bandera]; +[_bandera, "take"] remoteExec["A3A_fnc_flagaction", [buenos, civilian], _bandera]; _vehiculos pushBack _bandera; _caja = objNull; -if (_lado == malos) then - { - _caja = NATOAmmoBox createVehicle _posicion; - _nul = [_caja] call A3A_fnc_NATOcrate; - } -else - { - _caja = CSATAmmoBox createVehicle _posicion; - _nul = [_caja] call A3A_fnc_CSATcrate; - }; +if (_lado == malos) then { + _caja = NATOAmmoBox createVehicle _posicion; + _nul = [_caja] call A3A_fnc_NATOcrate; +} +else { + _caja = CSATAmmoBox createVehicle _posicion; + _nul = [_caja] call A3A_fnc_CSATcrate; +}; _vehiculos pushBack _caja; _caja call jn_fnc_logistics_addAction; -{_nul = [_x] call A3A_fnc_AIVEHinit;} forEach _vehiculos; -_roads = _posicion nearRoads _size; -if ((_marcador in puertos) and (spawner getVariable _marcador!=2) and !hayIFA) then - { - _tipoVeh = if (_lado == malos) then {vehNATOBoat} else {vehCSATBoat}; - if ([_tipoVeh] call A3A_fnc_vehAvailable) then - { - _mrkMar = seaSpawn select {getMarkerPos _x inArea _marcador}; - _pos = (getMarkerPos (_mrkMar select 0)) findEmptyPosition [0,20,_tipoVeh]; - _vehicle=[_pos, 0,_tipoVeh, _lado] call bis_fnc_spawnvehicle; - _veh = _vehicle select 0; - [_veh] call A3A_fnc_AIVEHinit; - _vehCrew = _vehicle select 1; - {[_x,_marcador] call A3A_fnc_NATOinit} forEach _vehCrew; - _grupoVeh = _vehicle select 2; - _soldados = _soldados + _vehCrew; - _grupos pushBack _grupoVeh; - _vehiculos pushBack _veh; - sleep 1; - }; - {_caja addItemCargoGlobal [_x,2]} forEach swoopShutUp; - } -else - { - if (_frontera) then - { - if (spawner getVariable _marcador!=2) then - { - if (count _roads != 0) then - { - _dist = 0; - _road = objNull; - {if ((position _x) distance _posicion > _dist) then {_road = _x;_dist = position _x distance _posicion}} forEach _roads; - _roadscon = roadsConnectedto _road; - _roadcon = objNull; - {if ((position _x) distance _posicion > _dist) then {_roadcon = _x}} forEach _roadscon; - _dirveh = [_roadcon, _road] call BIS_fnc_DirTo; - if (!_esFIA) then - { - _grupo = createGroup _lado; - _grupos pushBack _grupo; - _pos = [getPos _road, 7, _dirveh + 270] call BIS_Fnc_relPos; - _bunker = "Land_BagBunker_01_Small_green_F" createVehicle _pos; - _vehiculos pushBack _bunker; - _bunker setDir _dirveh; - _pos = getPosATL _bunker; - _tipoVeh = if (_lado==malos) then {staticATmalos} else {staticATmuyMalos}; - _veh = _tipoVeh createVehicle _posicion; - _vehiculos pushBack _veh; - _veh setPos _pos; - _veh setDir _dirVeh + 180; - _tipoUnit = if (_lado==malos) then {staticCrewmalos} else {staticCrewMuyMalos}; - _unit = _grupo createUnit [_tipoUnit, _posicion, [], 0, "NONE"]; - [_unit,_marcador] call A3A_fnc_NATOinit; - [_veh] call A3A_fnc_AIVEHinit; - _unit moveInGunner _veh; - _soldados pushBack _unit; - } - else - { - _tipogrupo = selectRandom gruposFIAMid; - _grupo = [_posicion, _lado, _tipoGrupo,false,true] call A3A_fnc_spawnGroup; - if !(isNull _grupo) then - { - _veh = vehFIAArmedCar createVehicle getPos _road; - _veh setDir _dirveh + 90; - _nul = [_veh] call A3A_fnc_AIVEHinit; - _vehiculos pushBack _veh; - sleep 1; - _unit = _grupo createUnit [FIARifleman, _posicion, [], 0, "NONE"]; - _unit moveInGunner _veh; - {_soldados pushBack _x; [_x,_marcador] call A3A_fnc_NATOinit} forEach units _grupo; - }; - }; - }; - }; - }; - }; +{ + _nul = [_x] call A3A_fnc_AIVEHinit; +} forEach _vehiculos; +_roads = _posicion nearRoads (_size * 2) max (200); + +if ((_marcador in puertos) and (spawner getVariable _marcador != 2) and !hayIFA) then { + _tipoVeh = + if (_lado == malos) then { + vehNATOBoat + } else { + vehCSATBoat + }; + if ([_tipoVeh] call A3A_fnc_vehAvailable) then { + _mrkMar = seaSpawn select { + getMarkerPos _x inArea _marcador + }; + _pos = (getMarkerPos(_mrkMar select 0)) findEmptyPosition[0, 20, _tipoVeh]; + _vehicle = [_pos, 0, _tipoVeh, _lado] call bis_fnc_spawnvehicle; + _veh = _vehicle select 0; + [_veh] call A3A_fnc_AIVEHinit; + _vehCrew = _vehicle select 1; + { + [_x, _marcador] call A3A_fnc_NATOinit + } forEach _vehCrew; + _grupoVeh = _vehicle select 2; + _soldados = _soldados + _vehCrew; + _grupos pushBack _grupoVeh; + _vehiculos pushBack _veh; + sleep 1; + }; { + _caja addItemCargoGlobal[_x, 2] + } + forEach swoopShutUp; +} else { + //if (_frontera) then { + if (spawner getVariable _marcador != 2) then { + if (count _roads != 0) then { + _roads_remaining = _roads apply { [position _x distance _posicion, _x] }; + _roads_remaining sort false; + private _itr = 0; + while {count _roads_remaining > 0 and _itr < 4} do { + _dist = _roads_remaining select 0 select 0; + _road = _roads_remaining select 0 select 1; + // objNull; + // { + // if ((position _x) distance _posicion > _dist) then { + // _road = _x; + // _dist = position _x distance _posicion + // } + // } forEach _roads_remaining; + _roadscon = (roadsConnectedto _road) apply { [position _x distance _posicion, _x] }; + _roadscon sort false; + if (count _roadscon > 0) then { + _roadcon = _roadscon select 0 select 1; + // { + // if ((position _x) distance _posicion > _dist) then { + // _roadcon = _x + // } + // } forEach _roadscon; + _dirveh = _roadcon getDir _road; + if (!_esFIA) then { + private _offs = [7, -7]; + { + _grupo = createGroup _lado; + _grupos pushBack _grupo; + _pos = [getPos _road, _x, _dirveh + 270] call BIS_Fnc_relPos; + _bunker = (selectRandom ["Land_BagBunker_Small_F", "Land_BagFence_Round_F"]) createVehicle _pos; + // _bunker createVehicle _pos; + _vehiculos pushBack _bunker; + _bunker setDir _dirveh; + _pos = getPosATL _bunker; + _tipoVeh = + if (_lado == malos) then { + selectRandom [staticATmalos, NATOMG] + } else { + selectRandom [staticATmuyMalos, CSATMG] + }; + _veh = _tipoVeh createVehicle _posicion; + _vehiculos pushBack _veh; + _veh setPos _pos; + _veh setDir _dirVeh + 180; + _tipoUnit = + if (_lado == malos) then { + staticCrewmalos + } else { + staticCrewMuyMalos + }; + _unit = _grupo createUnit[_tipoUnit, _posicion, [], 0, "NONE"]; + [_unit, _marcador] call A3A_fnc_NATOinit; + [_veh] call A3A_fnc_AIVEHinit; + _unit moveInGunner _veh; + _soldados pushBack _unit; + } forEach _offs; + } else { + _tipogrupo = selectRandom gruposFIAMid; + _grupo = [_posicion, _lado, _tipoGrupo, false, true] call A3A_fnc_spawnGroup; + if !(isNull _grupo) then { + _veh = vehFIAArmedCar createVehicle getPos _road; + _veh setDir _dirveh + 90; + _nul = [_veh] call A3A_fnc_AIVEHinit; + _vehiculos pushBack _veh; + sleep 1; + _unit = _grupo createUnit[FIARifleman, _posicion, [], 0, "NONE"]; + _unit moveInGunner _veh; { + _soldados pushBack _x; + [_x, _marcador] call A3A_fnc_NATOinit + } + forEach units _grupo; + }; + }; + }; + _roads_remaining = _roads_remaining select { + ((getPos _road) vectorDiff _posicion) vectorCos ((getPos (_x select 1)) vectorDiff _posicion) < 0.3 + }; + _itr = _itr + 1; + }; + }; + }; + //}; +}; -if (count _roads != 0) then - { - _pos = _posicion findEmptyPosition [5,_size,"I_Truck_02_covered_F"];//donde pone 5 antes ponía 10 - if (count _pos > 0) then - { - _tipoVeh = if (_lado == malos) then {if (!_esFIA) then {vehNATOTrucks} else {[vehFIATruck]}} else {vehCSATTrucks}; - _veh = createVehicle [selectRandom _tipoVeh, _pos, [], 0, "NONE"]; - _veh setDir random 360; - _vehiculos pushBack _veh; - _nul = [_veh] call A3A_fnc_AIVEHinit; - sleep 1; - }; - }; +if (count _roads != 0) then { + _pos = _posicion findEmptyPosition[5, _size, "I_Truck_02_covered_F"]; //donde pone 5 antes ponía 10 + if (count _pos > 0) then { + _tipoVeh = + if (_lado == malos) then { + if (!_esFIA) then { + vehNATOTrucks + } else { + [vehFIATruck] + } + } else { + vehCSATTrucks + }; + _veh = createVehicle[selectRandom _tipoVeh, _pos, [], 0, "NONE"]; + _veh setDir random 360; + _vehiculos pushBack _veh; + _nul = [_veh] call A3A_fnc_AIVEHinit; + sleep 1; + }; +}; _cuenta = 0; -if ((!isNull _antena) and (spawner getVariable _marcador!=2)) then - { - if ((typeOf _antena == "Land_TTowerBig_1_F") or (typeOf _antena == "Land_TTowerBig_2_F")) then - { - _grupo = createGroup _lado; - _pos = getPosATL _antena; - _dir = getDir _antena; - _posF = _pos getPos [2,_dir]; - _posF set [2,23.1]; - if (typeOf _antena == "Land_TTowerBig_2_F") then - { - _posF = _pos getPos [1,_dir]; - _posF set [2,24.3]; - }; - _tipoUnit = if (_lado == malos) then {if (!_esFIA) then {NATOMarksman} else {FIAMarksman}} else {CSATMarksman}; - _unit = _grupo createUnit [_tipoUnit, _posicion, [], _dir, "NONE"]; - _unit setPosATL _posF; - _unit forceSpeed 0; - //_unit disableAI "MOVE"; - //_unit disableAI "AUTOTARGET"; - _unit setUnitPos "UP"; - [_unit,_marcador] call A3A_fnc_NATOinit; - _soldados pushBack _unit; - _grupos pushBack _grupo; - }; - }; +if ((!isNull _antena) and (spawner getVariable _marcador != 2)) then { + if ((typeOf _antena == "Land_TTowerBig_1_F") or(typeOf _antena == "Land_TTowerBig_2_F")) then { + _grupo = createGroup _lado; + _pos = getPosATL _antena; + _dir = getDir _antena; + _posF = _pos getPos[2, _dir]; + _posF set[2, 23.1]; + if (typeOf _antena == "Land_TTowerBig_2_F") then { + _posF = _pos getPos[1, _dir]; + _posF set[2, 24.3]; + }; + _tipoUnit = + if (_lado == malos) then { + if (!_esFIA) then { + NATOMarksman + } else { + FIAMarksman + } + } else { + CSATMarksman + }; + _unit = _grupo createUnit[_tipoUnit, _posicion, [], _dir, "NONE"]; + _unit setPosATL _posF; + _unit forceSpeed 0; + //_unit disableAI "MOVE"; + //_unit disableAI "AUTOTARGET"; + _unit setUnitPos "UP"; + [_unit, _marcador] call A3A_fnc_NATOinit; + _soldados pushBack _unit; + _grupos pushBack _grupo; + }; +}; _array = []; _subArray = []; _cuenta = 0; -_tam = _tam -1; -while {_cuenta <= _tam} do - { - _array pushBack (_garrison select [_cuenta,7]); - _cuenta = _cuenta + 8; - }; -for "_i" from 0 to (count _array - 1) do - { - _grupo = if (_i == 0) then {[_posicion,_lado, (_array select _i),true,false] call A3A_fnc_spawnGroup} else {[_posicion,_lado, (_array select _i),false,true] call A3A_fnc_spawnGroup}; - _grupos pushBack _grupo; - {[_x,_marcador] call A3A_fnc_NATOinit; _soldados pushBack _x} forEach units _grupo; - if (_i == 0) then {_nul = [leader _grupo, _marcador, "SAFE", "RANDOMUP","SPAWNED", "NOVEH2", "NOFOLLOW"] execVM "scripts\UPSMON.sqf"} else {_nul = [leader _grupo, _marcador, "SAFE","SPAWNED", "RANDOM","NOVEH2", "NOFOLLOW"] execVM "scripts\UPSMON.sqf"}; - }; +_tam = _tam - 1; +while { _cuenta <= _tam } do { + _array pushBack(_garrison select[_cuenta, 7]); + _cuenta = _cuenta + 8; +}; +for "_i" from 0 to(count _array - 1) do { + _grupo = + if (_i == 0) then { + [_posicion, _lado, (_array select _i), true, false] call A3A_fnc_spawnGroup + } else { + [_posicion, _lado, (_array select _i), false, true] call A3A_fnc_spawnGroup + }; -if (_marcador in puertos) then - { - _caja addItemCargo ["V_RebreatherIA",round random 5]; - _caja addItemCargo ["G_I_Diving",round random 5]; - }; + _grupos pushBack _grupo; -waitUntil {sleep 1; (spawner getVariable _marcador == 2)}; + { + [_x, _marcador] call A3A_fnc_NATOinit; + _soldados pushBack _x + } forEach units _grupo; + if (_i == 0) then { + _nul = [leader _grupo, _marcador, "SAFE", "RANDOMUP", "SPAWNED", "NOVEH2", "NOFOLLOW"] execVM "scripts\UPSMON.sqf" + } else { + _nul = [leader _grupo, _marcador, "SAFE", "SPAWNED", "RANDOM", "NOVEH2", "NOFOLLOW"] execVM "scripts\UPSMON.sqf" + }; +}; + +if (_marcador in puertos) then { + _caja addItemCargo["V_RebreatherIA", round random 5]; + _caja addItemCargo["G_I_Diving", round random 5]; +}; + +waitUntil { + sleep 1; + (spawner getVariable _marcador == 2) +}; deleteMarker _mrk; //{if ((!alive _x) and (not(_x in destroyedBuildings))) then {destroyedBuildings = destroyedBuildings + [position _x]; publicVariableServer "destroyedBuildings"}} forEach _buildings; { -if (alive _x) then - { - deleteVehicle _x - }; + if (alive _x) then { + deleteVehicle _x + }; } forEach _soldados; //if (!isNull _periodista) then {deleteVehicle _periodista}; -{deleteGroup _x} forEach _grupos; { -if (!(_x in staticsToSave)) then - { - if ((!([distanciaSPWN-_size,1,_x,buenos] call A3A_fnc_distanceUnits))) then {deleteVehicle _x} - }; -} forEach _vehiculos; + deleteGroup _x +} forEach _grupos; { + if (!(_x in staticsToSave)) then { + if ((!([distanciaSPWN - _size, 1, _x, buenos] call A3A_fnc_distanceUnits))) then { + deleteVehicle _x + } + }; +} forEach _vehiculos; \ No newline at end of file diff --git a/A3-Antistasi/CREATE/createCIV.sqf b/A3-Antistasi/CREATE/createCIV.sqf index 42f8359886..e8a67400f3 100644 --- a/A3-Antistasi/CREATE/createCIV.sqf +++ b/A3-Antistasi/CREATE/createCIV.sqf @@ -36,150 +36,181 @@ _area = [_marcador] call A3A_fnc_sizeMarker; _roads = _roads call BIS_fnc_arrayShuffle; -_numVeh = round (_numVeh * (civPerc/200) * civTraffic); +_numVeh = round (_numVeh * (civPerc/200)); if (_numVeh < 1) then {_numVeh = 1}; _numCiv = round (_numCiv * (civPerc/250)); if ((daytime < 8) or (daytime > 21)) then {_numCiv = round (_numCiv/4); _numVeh = round (_numVeh * 1.5)}; if (_numCiv < 1) then {_numCiv = 1}; _cuenta = 0; +private _road_idx = 0; _max = count _roads; -while {(spawner getVariable _marcador != 2) and (_cuenta < _numVeh) and (_cuenta < _max)} do - { - _p1 = _roads select _cuenta; - _road = roadAt _p1; - if (!isNull _road) then - { - if ((count (nearestObjects [_p1, ["Car", "Truck"], 5]) == 0) and !([50,1,_road,buenos] call A3A_fnc_distanceUnits)) then - { - _roadcon = roadsConnectedto (_road); - _p2 = getPos (_roadcon select 0); - _dirveh = [_p1,_p2] call BIS_fnc_DirTo; - _pos = [_p1, 3, _dirveh + 90] call BIS_Fnc_relPos; - _tipoveh = selectRandom arrayCivVeh; - /* - _mrk = createmarker [format ["%1", count vehicles], _p1]; - _mrk setMarkerSize [5, 5]; - _mrk setMarkerShape "RECTANGLE"; - _mrk setMarkerBrush "SOLID"; - _mrk setMarkerColor colorBuenos; - //_mrk setMarkerText _nombre; - */ - _veh = _tipoveh createVehicle _pos; - _veh setDir _dirveh; - _vehiculos pushBack _veh; - _nul = [_veh] spawn A3A_fnc_civVEHinit; - }; - }; - sleep 0.5; - _cuenta = _cuenta + 1; - }; +while {(spawner getVariable _marcador != 2) and (_cuenta < _numVeh) and (_road_idx < _max)} do { + _p1 = _roads select _road_idx; + _road = roadAt _p1; + if (!isNull _road) then { + if ((count (nearestObjects [_p1, ["Car", "Truck"], 5]) == 0) and !([50,1,_road,buenos] call A3A_fnc_distanceUnits)) then { + _roadcon = roadsConnectedto (_road); + _p2 = getPos (_roadcon select 0); + _dirveh = [_p1,_p2] call BIS_fnc_DirTo; + _pos = [_p1, 8, _dirveh + 90] call BIS_Fnc_relPos; + //if(_pos isFlatEmpty [5, -1, 0.4, 3]) then { + _tipoveh = selectRandom arrayCivVeh; + /* + _mrk = createmarker [format ["%1", count vehicles], _p1]; + _mrk setMarkerSize [5, 5]; + _mrk setMarkerShape "RECTANGLE"; + _mrk setMarkerBrush "SOLID"; + _mrk setMarkerColor colorBuenos; + //_mrk setMarkerText _nombre; + */ + _veh = _tipoveh createVehicle _pos; + _veh setDir _dirveh; + _vehiculos pushBack _veh; + private _spawnCheckEv = _veh addEventHandler ["EpeContactStart", { + params ["_object1", "_object2", "_selection1", "_selection2", "_force"]; + diag_log format ["[createCiv] vehicle %1 failed spawn check, collided with %2 force %3!", _object1, _object2, _force]; + deleteVehicle _object1; + }]; + sleep 1; + // If it survived spawning + if (alive _veh) then { + _nul = [_veh] spawn A3A_fnc_civVEHinit; + diag_log format ["[createCiv] vehicle %1 passed spawn check, did not explode!", _veh]; + _veh removeEventHandler ["EpeContactStart", _spawnCheckEv]; + _cuenta = _cuenta + 1; + }; + //}; + }; + }; + _road_idx = _road_idx + 1; + +}; _mrkMar = if !(hayIFA) then {seaSpawn select {getMarkerPos _x inArea _marcador}} else {[]}; if (count _mrkMar > 0) then - { - for "_i" from 0 to (round (random 3)) do - { - if (spawner getVariable _marcador != 2) then - { - _tipoVeh = selectRandom civBoats; - _pos = (getMarkerPos (_mrkMar select 0)) findEmptyPosition [0,20,_tipoVeh]; - _veh = _tipoveh createVehicle _pos; - _veh setDir (random 360); - _vehiculos pushBack _veh; - [_veh] spawn A3A_fnc_civVEHinit; - sleep 0.5; - }; - }; - }; + { + for "_i" from 0 to (round (random 3)) do + { + if (spawner getVariable _marcador != 2) then + { + _tipoVeh = selectRandom civBoats; + _pos = (getMarkerPos (_mrkMar select 0)) findEmptyPosition [0,20,_tipoVeh]; + _veh = _tipoveh createVehicle _pos; + _veh setDir (random 360); + _vehiculos pushBack _veh; + [_veh] spawn A3A_fnc_civVEHinit; + sleep 0.5; + }; + }; + }; if ((random 100 < ((prestigeNATO) + (prestigeCSAT))) and (spawner getVariable _marcador != 2)) then - { - _pos = []; - while {true} do - { - _pos = [_posicion, round (random _area), random 360] call BIS_Fnc_relPos; - if (!surfaceIsWater _pos) exitWith {}; - }; - _grupo = createGroup civilian; - _grupos pushBack _grupo; - _civ = _grupo createUnit ["C_journalist_F", _pos, [],0, "NONE"]; - _nul = [_civ] spawn A3A_fnc_CIVinit; - _civs pushBack _civ; - _nul = [_civ, _marcador, "SAFE", "SPAWNED","NOFOLLOW", "NOVEH2","NOSHARE","DoRelax"] execVM "scripts\UPSMON.sqf"; - }; + { + _pos = []; + while {true} do + { + _pos = [_posicion, round (random _area), random 360] call BIS_Fnc_relPos; + if (!surfaceIsWater _pos) exitWith {}; + }; + _grupo = createGroup civilian; + _grupos pushBack _grupo; + _civ = _grupo createUnit ["C_journalist_F", _pos, [],0, "NONE"]; + _nul = [_civ] spawn A3A_fnc_CIVinit; + _civs pushBack _civ; + _nul = [_civ, _marcador, "SAFE", "SPAWNED","NOFOLLOW", "NOVEH2","NOSHARE","DoRelax"] execVM "scripts\UPSMON.sqf"; + }; if ([_marcador,false] call A3A_fnc_fogCheck > 0.2) then - { - _patrolCiudades = [_marcador] call A3A_fnc_citiesToCivPatrol; - - _cuentaPatrol = 0; - - _andanadas = round (_numCiv / 60); - if (_andanadas < 1) then {_andanadas = 1}; - - for "_i" from 1 to _andanadas do - { - while {(spawner getVariable _marcador != 2) and (_cuentaPatrol < (count _patrolCiudades - 1) and (_cuenta < _max))} do - { - //_p1 = getPos (_roads select _cuenta); - _p1 = _roads select _cuenta; - //_road = (_p1 nearRoads 5) select 0; - _road = roadAt _p1; - if (!isNull _road) then - //if (!isNil "_road") then - { - if (count (nearestObjects [_p1, ["Car", "Truck"], 5]) == 0) then - { - _grupoP = createGroup civilian; - _gruposPatrol = _gruposPatrol + [_grupoP]; - _roadcon = roadsConnectedto _road; - //_p1 = getPos (_roads select _cuenta); - _p2 = getPos (_roadcon select 0); - _dirveh = [_p1,_p2] call BIS_fnc_DirTo; - _tipoveh = arrayCivVeh call BIS_Fnc_selectRandom; - _veh = _tipoveh createVehicle _p1; - _veh setDir _dirveh; - _veh addEventHandler ["HandleDamage",{if (((_this select 1) find "wheel" != -1) and (_this select 4=="") and (!isPlayer driver (_this select 0))) then {0;} else {(_this select 2);};}]; - _veh addEventHandler ["HandleDamage", - { - _veh = _this select 0; - if (side(_this select 3) == buenos) then - { - _condu = driver _veh; - if (side _condu == civilian) then {_condu leaveVehicle _veh}; - }; - } - ]; - //_veh forceFollowRoad true; - _vehPatrol = _vehPatrol + [_veh]; - _tipociv = selectRandom arrayCivs; - _civ = _grupoP createUnit [_tipociv, _p1, [],0, "NONE"]; - _nul = [_civ] spawn A3A_fnc_CIVinit; - _civsPatrol = _civsPatrol + [_civ]; - _civ moveInDriver _veh; - _grupoP addVehicle _veh; - _grupoP setBehaviour "CARELESS"; - _posDestino = selectRandom (carreteras getVariable (_patrolCiudades select _cuentaPatrol)); - _wp = _grupoP addWaypoint [_posDestino,0]; - _wp setWaypointType "MOVE"; - _wp setWaypointSpeed "FULL"; - _wp setWaypointTimeout [30, 45, 60]; - _wp = _grupoP addWaypoint [_posicion,1]; - _wp setWaypointType "MOVE"; - _wp setWaypointTimeout [30, 45, 60]; - _wp1 = _grupoP addWaypoint [_posicion,2]; - _wp1 setWaypointType "CYCLE"; - _wp1 synchronizeWaypoint [_wp]; - }; - }; - _cuentaPatrol = _cuentaPatrol + 1; - sleep 5; - }; - }; - }; + { + _patrolCiudades = [_marcador] call A3A_fnc_citiesToCivPatrol; + + _cuentaPatrol = 0; + + _andanadas = round (_numCiv / 60); + if (_andanadas < 1) then {_andanadas = 1}; + + for "_i" from 1 to _andanadas do + { + while {(spawner getVariable _marcador != 2) and (_cuentaPatrol < (count _patrolCiudades - 1) and (_cuenta < _max))} do + { + //_p1 = getPos (_roads select _cuenta); + _p1 = _roads select _cuenta; + //_road = (_p1 nearRoads 5) select 0; + _road = roadAt _p1; + if (!isNull _road) then + //if (!isNil "_road") then + { + if (count (nearestObjects [_p1, ["Car", "Truck"], 5]) == 0) then + { + _grupoP = createGroup civilian; + _gruposPatrol = _gruposPatrol + [_grupoP]; + _roadcon = roadsConnectedto _road; + //_p1 = getPos (_roads select _cuenta); + _p2 = getPos (_roadcon select 0); + _dirveh = [_p1,_p2] call BIS_fnc_DirTo; + _tipoveh = arrayCivVeh call BIS_Fnc_selectRandom; + _veh = _tipoveh createVehicle _p1; + _veh setDir _dirveh; + _veh addEventHandler ["HandleDamage",{if (((_this select 1) find "wheel" != -1) and (_this select 4=="") and (!isPlayer driver (_this select 0))) then {0;} else {(_this select 2);};}]; + _veh addEventHandler ["HandleDamage", + { + _veh = _this select 0; + if (side(_this select 3) == buenos) then + { + _condu = driver _veh; + if (side _condu == civilian) then {_condu leaveVehicle _veh}; + }; + } + ]; + _veh limitSpeed 30; + _veh spawn { + params ["_veh"]; + while {alive _veh} do { + sleep(2); + if(side driver _veh == civilian) then { + if (count ((getPos _veh) nearEntities ["Man", 20]) > 0) then { + _veh limitSpeed 10; + } else { + if (count ((getPos _veh) nearObjects ["House", 50]) >= 3) then { + _veh limitSpeed 30; + } else { + _veh limitSpeed 60; + }; + }; + }; + }; + }; + //_veh forceFollowRoad true; + _vehPatrol = _vehPatrol + [_veh]; + _tipociv = selectRandom arrayCivs; + _civ = _grupoP createUnit [_tipociv, _p1, [],0, "NONE"]; + _nul = [_civ] spawn A3A_fnc_CIVinit; + _civsPatrol = _civsPatrol + [_civ]; + _civ moveInDriver _veh; + _grupoP addVehicle _veh; + _grupoP setBehaviour "SAFE"; + _grupoP setSpeedMode "LIMITED"; + _posDestino = selectRandom (carreteras getVariable (_patrolCiudades select _cuentaPatrol)); + _wp = _grupoP addWaypoint [_posDestino,0]; + _wp setWaypointType "MOVE"; + //_wp setWaypointSpeed "LIMITED"; + _wp setWaypointTimeout [30, 45, 60]; + _wp = _grupoP addWaypoint [_posicion,1]; + _wp setWaypointType "MOVE"; + _wp setWaypointTimeout [30, 45, 60]; + _wp1 = _grupoP addWaypoint [_posicion,2]; + _wp1 setWaypointType "CYCLE"; + _wp1 synchronizeWaypoint [_wp]; + }; + }; + _cuentaPatrol = _cuentaPatrol + 1; + sleep 5; + }; + }; + }; waitUntil {sleep 1;(spawner getVariable _marcador == 2)}; @@ -187,23 +218,23 @@ waitUntil {sleep 1;(spawner getVariable _marcador == 2)}; {deleteGroup _x} forEach _grupos; { if (!([distanciaSPWN-_size,1,_x,buenos] call A3A_fnc_distanceUnits)) then - { - if (_x in reportedVehs) then {reportedVehs = reportedVehs - [_x]; publicVariable "reportedVehs"}; - deleteVehicle _x; - } + { + if (_x in reportedVehs) then {reportedVehs = reportedVehs - [_x]; publicVariable "reportedVehs"}; + deleteVehicle _x; + } } forEach _vehiculos; { waitUntil {sleep 1; !([distanciaSPWN,1,_x,buenos] call A3A_fnc_distanceUnits)}; deleteVehicle _x} forEach _civsPatrol; { if (!([distanciaSPWN,1,_x,buenos] call A3A_fnc_distanceUnits)) then - { - if (_x in reportedVehs) then {reportedVehs = reportedVehs - [_x]; publicVariable "reportedVehs"}; - deleteVehicle _x - } + { + if (_x in reportedVehs) then {reportedVehs = reportedVehs - [_x]; publicVariable "reportedVehs"}; + deleteVehicle _x + } else - { - [_x] spawn A3A_fnc_civVEHinit - }; + { + [_x] spawn A3A_fnc_civVEHinit + }; } forEach _vehPatrol; {deleteGroup _x} forEach _gruposPatrol; \ No newline at end of file diff --git a/A3-Antistasi/CREATE/createFIApuestos2.sqf b/A3-Antistasi/CREATE/createFIApuestos2.sqf index 558732a758..94343d66a3 100644 --- a/A3-Antistasi/CREATE/createFIApuestos2.sqf +++ b/A3-Antistasi/CREATE/createFIApuestos2.sqf @@ -63,14 +63,15 @@ if ({alive _x} count units _grupo == 0) then puestosFIA = puestosFIA - [_marcador]; publicVariable "puestosFIA"; marcadores = marcadores - [_marcador]; publicVariable "marcadores"; lados setVariable [_marcador,nil,true]; - _nul = [5,-5,_posicion] remoteExec ["A3A_fnc_citySupportChange",2]; deleteMarker _marcador; if (_escarretera) then { + _nul = [5,-5,_posicion, "SDK Roadblock Lost"] remoteExec ["A3A_fnc_citySupportChange",2]; [["TaskFailed", ["", "Roadblock Lost"]],"BIS_fnc_showNotification"] call BIS_fnc_MP; } else { + _nul = [5,-5,_posicion, "SDK Watchpost Lost"] remoteExec ["A3A_fnc_citySupportChange",2]; [["TaskFailed", ["", "Watchpost Lost"]],"BIS_fnc_showNotification"] call BIS_fnc_MP; }; }; diff --git a/A3-Antistasi/CREATE/createSDKgarrisons.sqf b/A3-Antistasi/CREATE/createSDKgarrisons.sqf index ed2dca3a93..da685086ec 100644 --- a/A3-Antistasi/CREATE/createSDKgarrisons.sqf +++ b/A3-Antistasi/CREATE/createSDKgarrisons.sqf @@ -1,6 +1,6 @@ if (!isServer and hasInterface) exitWith{}; -private ["_marcador","_vehiculos","_grupos","_soldados","_posicion","_pos","_size","_veh","_estaticas","_garrison","_tam","_cuenta","_grupo","_grupoMort","_tipo","_unit"]; +private ["_marcador","_vehiculos","_grupos","_soldados","_posicion","_pos","_size","_veh","_garrison","_tam","_cuenta","_grupo","_cuentaGrupo","_garrisonGroups","_grupoMort","_tipo","_unit"]; _marcador = _this select 0; @@ -16,140 +16,157 @@ _veh = objNull; _size = [_marcador] call A3A_fnc_sizeMarker; if (_marcador != "Synd_HQ") then - { - if (!(_marcador in ciudades)) then - { - _veh = createVehicle [SDKFlag, _posicion, [],0, "CAN_COLLIDE"]; - if (hayIFA) then {_veh setFlagTexture SDKFlagTexture}; - _veh allowDamage false; - _vehiculos pushBack _veh; - [_veh,"SDKFlag"] remoteExec ["A3A_fnc_flagaction",0,_veh]; - //[_veh,"unit"] remoteExec ["A3A_fnc_flagaction",[buenos,civilian],_veh]; - //[_veh,"vehicle"] remoteExec ["A3A_fnc_flagaction",[buenos,civilian],_veh]; - //[_veh,"garage"] remoteExec ["A3A_fnc_flagaction",[buenos,civilian],_veh]; - }; - if ((_marcador in recursos) or (_marcador in fabricas)) then - { - if (not(_marcador in destroyedCities)) then - { - if ((daytime > 8) and (daytime < 18)) then - { - _grupo = createGroup civilian; - _grupos pushBack _grupo; - for "_i" from 1 to 4 do - { - if (spawner getVariable _marcador != 2) then - { - _civ = _grupo createUnit ["C_man_w_worker_F", _posicion, [],0, "NONE"]; - _nul = [_civ] spawn A3A_fnc_CIVinit; - _civs pushBack _civ; - _civ setVariable ["marcador",_marcador,true]; - sleep 0.5; - _civ addEventHandler ["Killed", - { - if (({alive _x} count units group (_this select 0)) == 0) then - { - _marcador = (_this select 0) getVariable "marcador"; - _nombre = [_marcador] call A3A_fnc_localizar; - destroyedCities pushBackUnique _marcador; - publicVariable "destroyedCities"; - ["TaskFailed", ["", format ["%1 Destroyed",_nombre]]] remoteExec ["BIS_fnc_showNotification",[buenos,civilian]]; - }; - }]; - }; - }; - //_nul = [_marcador,_civs] spawn destroyCheck; - _nul = [leader _grupo, _marcador, "SAFE", "SPAWNED","NOFOLLOW", "NOSHARE","DORELAX","NOVEH2"] execVM "scripts\UPSMON.sqf"; - }; - }; - }; - if (_marcador in puertos) then - { - [_veh,"seaport"] remoteExec ["A3A_fnc_flagaction",[buenos,civilian],_veh]; - }; - }; -_estaticas = staticsToSave select {_x distance _posicion < _size}; + { + if (!(_marcador in ciudades)) then + { + _veh = createVehicle [SDKFlag, _posicion, [],0, "CAN_COLLIDE"]; + if (hayIFA) then {_veh setFlagTexture SDKFlagTexture}; + _veh allowDamage false; + _vehiculos pushBack _veh; + [_veh,"SDKFlag"] remoteExec ["A3A_fnc_flagaction",0,_veh]; + //[_veh,"unit"] remoteExec ["A3A_fnc_flagaction",[buenos,civilian],_veh]; + //[_veh,"vehicle"] remoteExec ["A3A_fnc_flagaction",[buenos,civilian],_veh]; + //[_veh,"garage"] remoteExec ["A3A_fnc_flagaction",[buenos,civilian],_veh]; + }; + if ((_marcador in recursos) or (_marcador in fabricas)) then + { + if (not(_marcador in destroyedCities)) then + { + if ((daytime > 8) and (daytime < 18)) then + { + _grupo = createGroup civilian; + _grupos pushBack _grupo; + for "_i" from 1 to 4 do + { + if (spawner getVariable _marcador != 2) then + { + _civ = _grupo createUnit ["C_man_w_worker_F", _posicion, [],0, "NONE"]; + _nul = [_civ] spawn A3A_fnc_CIVinit; + _civs pushBack _civ; + _civ setVariable ["marcador",_marcador,true]; + sleep 0.5; + _civ addEventHandler ["Killed", + { + if (({alive _x} count units group (_this select 0)) == 0) then + { + _marcador = (_this select 0) getVariable "marcador"; + _nombre = [_marcador] call A3A_fnc_localizar; + destroyedCities pushBackUnique _marcador; + publicVariable "destroyedCities"; + ["TaskFailed", ["", format ["%1 Destroyed",_nombre]]] remoteExec ["BIS_fnc_showNotification",[buenos,civilian]]; + }; + }]; + }; + }; + //_nul = [_marcador,_civs] spawn destroyCheck; + _nul = [leader _grupo, _marcador, "SAFE", "SPAWNED","NOFOLLOW", "NOSHARE","DORELAX","NOVEH2"] execVM "scripts\UPSMON.sqf"; + }; + }; + }; + if (_marcador in puertos) then + { + [_veh,"seaport"] remoteExec ["A3A_fnc_flagaction",[buenos,civilian],_veh]; + }; + }; + +//_estaticas = staticsToSave select {(_x distance _posicion) < _size and count (allTurrets _x) > 0}; _garrison = []; _garrison = _garrison + (garrison getVariable [_marcador,[]]); -_grupo = createGroup buenos; _grupoEst = createGroup buenos; _grupoMort = createGroup buenos; + { -_index = _garrison findIf {_x in SDKMil}; -if (_index == -1) exitWith {}; -if (typeOf _x == SDKMortar) then - { - _unit = _grupoMort createUnit [(_garrison select _index), _posicion, [], 0, "NONE"]; - _unit moveInGunner _x; - _nul=[_x] execVM "scripts\UPSMON\MON_artillery_add.sqf"; - } -else - { - _unit = _grupoEst createUnit [(_garrison select _index), _posicion, [], 0, "NONE"]; - _unit moveInGunner _x; - }; -[_unit,_marcador] call A3A_fnc_FIAinitBases; -_soldados pushBack _unit; -_garrison deleteAT _index; -} forEach _estaticas; + _index = _garrison findIf {_x in SDKMil}; + if (_index == -1) exitWith {}; + if (typeOf _x == SDKMortar) then { + _unit = _grupoMort createUnit [_garrison select _index, _posicion, [], 0, "NONE"]; + _unit moveInGunner _x; + _nul=[_x] execVM "scripts\UPSMON\MON_artillery_add.sqf"; + } else { + _unit = _grupoEst createUnit [_garrison select _index, _posicion, [], 0, "NONE"]; + _unit moveInGunner _x; + }; + [_unit,_marcador] call A3A_fnc_FIAinitBases; + _soldados pushBack _unit; + _garrison deleteAT _index; +} forEach (staticsToSave select {(_x distance _posicion) < _size and count (allTurrets _x) > 0}); -if (staticCrewBuenos in _garrison) then - { - { - _unit = _grupoMort createUnit [staticCrewBuenos, _posicion, [], 0, "NONE"]; - _pos = [_posicion] call A3A_fnc_mortarPos; - _veh = SDKMortar createVehicle _pos; - _vehiculos pushBack _veh; - _nul=[_veh] execVM "scripts\UPSMON\MON_artillery_add.sqf"; - _unit assignAsGunner _veh; - _unit moveInGunner _veh; - [_veh] call A3A_fnc_AIVEHinit; - _soldados pushBack _unit; - } forEach (_garrison select {_x == staticCrewBuenos}); - _garrison = _garrison - [staticCrewBuenos]; - }; +if (staticCrewBuenos in _garrison) then { + { + _unit = _grupoMort createUnit [staticCrewBuenos, _posicion, [], 0, "NONE"]; + _pos = [_posicion] call A3A_fnc_mortarPos; + _veh = SDKMortar createVehicle _pos; + _vehiculos pushBack _veh; + _nul=[_veh] execVM "scripts\UPSMON\MON_artillery_add.sqf"; + _unit assignAsGunner _veh; + _unit moveInGunner _veh; + [_veh] call A3A_fnc_AIVEHinit; + _soldados pushBack _unit; + } forEach (_garrison select {_x == staticCrewBuenos}); + _garrison = _garrison - [staticCrewBuenos]; +}; + +// Create the remaining garrison that weren't assigned to statics +_grupo = createGroup buenos; _garrison = _garrison call A3A_fnc_garrisonReorg; _tam = count _garrison; _cuenta = 0; _cuentaGrupo = 0; +_garrisonGroups = 0; while {(spawner getVariable _marcador != 2) and (_cuenta < _tam)} do - { - _tipo = _garrison select _cuenta; - _unit = _grupo createUnit [_tipo, _posicion, [], 0, "NONE"]; - if (_tipo in SDKSL) then {_grupo selectLeader _unit}; - [_unit,_marcador] call A3A_fnc_FIAinitBases; - _soldados pushBack _unit; - _cuenta = _cuenta + 1; - sleep 0.5; - if (_cuentaGrupo == 8) then - { - _grupo = createGroup buenos; - _grupos pushBack _grupo; - _cuentaGrupo = 0; - }; - }; + { + _tipo = _garrison select _cuenta; + + private _centre = [ _posicion , _size * 0.25 + random (_size * 0.25) , random 360 ] call BIS_fnc_relPos; + private _unit_spawn_pos = _centre findEmptyPosition [0, _size * 0.25]; + if (_unit_spawn_pos isEqualTo []) then { + _unit_spawn_pos = _posicion; + }; + + _unit = _grupo createUnit [_tipo, _unit_spawn_pos, [], 0, "NONE"]; + if (_tipo in SDKSL) then {_grupo selectLeader _unit}; + [_unit,_marcador] call A3A_fnc_FIAinitBases; + _soldados pushBack _unit; + _cuenta = _cuenta + 1; + sleep 0.5; + _cuentaGrupo = _cuentaGrupo + 1; + + // Split into groups of 8 + if (_cuentaGrupo == 8) then + { + // First group garrison upstairs positions + if (_garrisonGroups == 0) then { + _nul = [leader _grupo, _marcador, "AWARE","SPAWNED","FORTIFY","NOVEH2","NOFOLLOW"] execVM "scripts\UPSMON.sqf"; + } else { + _nul = [leader _grupo, _marcador, "SAFE","SPAWNED","ORIGINAL","NOVEH2","NOFOLLOW"] execVM "scripts\UPSMON.sqf"; + }; + // Add the group to the stack and create a new one + _grupos pushBack _grupo; + _grupo = createGroup buenos; + _cuentaGrupo = 0; + _garrisonGroups = _garrisonGroups + 1; + }; + }; + +if (_cuentaGrupo > 0) then { + // First group garrison upstairs positions + if (_garrisonGroups == 0) then { + _nul = [leader _grupo, _marcador, "AWARE","SPAWNED","FORTIFY","NOVEH2","NOFOLLOW"] execVM "scripts\UPSMON.sqf"; + } else { + _nul = [leader _grupo, _marcador, "SAFE","SPAWNED","ORIGINAL","NOVEH2","NOFOLLOW"] execVM "scripts\UPSMON.sqf"; + }; + _grupos pushBack _grupo; +}; -for "_i" from 0 to (count _grupos) - 1 do - { - _grupo = _grupos select _i; - if (_i == 0) then - { - _nul = [leader _grupo, _marcador, "SAFE","SPAWNED","RANDOMUP","NOVEH2","NOFOLLOW"] execVM "scripts\UPSMON.sqf"; - } - else - { - _nul = [leader _grupo, _marcador, "SAFE","SPAWNED","RANDOM","NOVEH2","NOFOLLOW"] execVM "scripts\UPSMON.sqf"; - }; - }; waitUntil {sleep 1; (spawner getVariable _marcador == 2)}; { _soldado = _x; if (alive _soldado) then - { - deleteVehicle _x - }; + { + deleteVehicle _x + }; } forEach _soldados; {deleteVehicle _x} forEach _civs; //if (!isNull _periodista) then {deleteVehicle _periodista}; diff --git a/A3-Antistasi/CREATE/createSDKgarrisonsTemp.sqf b/A3-Antistasi/CREATE/createSDKgarrisonsTemp.sqf index 17c425970e..4e56dbd3dd 100644 --- a/A3-Antistasi/CREATE/createSDKgarrisonsTemp.sqf +++ b/A3-Antistasi/CREATE/createSDKgarrisonsTemp.sqf @@ -1,43 +1,89 @@ -_marcador = _this select 0; -_tipo = _this select 1; -_posicion = getMarkerPos _marcador; -if (_tipo isEqualType "") then - { - _grupos = if (_tipo == staticCrewBuenos) then {[]} else {allGroups select {(leader _x getVariable ["marcador",""] == _marcador) and (count units _x < 8) and (vehicle (leader _x) == leader _x)}}; - _grupo = if (_grupos isEqualTo []) then - { - createGroup buenos - } - else - { - _grupos select 0; - }; - _unit = _grupo createUnit [_tipo, _posicion, [], 0, "NONE"]; - //if (_tipo in SDKSL) then {_grupo selectLeader _unit}; - [_unit,_marcador] call A3A_fnc_FIAinitBases; - if (_tipo == staticCrewBuenos) then - { - private _veh = SDKMortar createVehicle _posicion; - _nul=[_veh] execVM "scripts\UPSMON\MON_artillery_add.sqf"; - _unit assignAsGunner _veh; - _unit moveInGunner _veh; - [_veh] call A3A_fnc_AIVEHinit; - }; - if (_grupos isEqualTo []) then - { - _nul = [leader _grupo, _marcador, "SAFE","SPAWNED","NOVEH2","NOFOLLOW"] execVM "scripts\UPSMON.sqf"; - }; - [_unit,_marcador] spawn - { - private _unit = _this select 0; - private _marcador = _this select 1; - waitUntil {sleep 1; (spawner getVariable _marcador == 2)}; - if (alive _unit) then - { - private _grupo = group _unit; - if (typeOf _unit == staticCrewBuenos) then {deleteVehicle (vehicle _unit)}; - deleteVehicle _unit; - if (count units _grupo == 0) then {deleteGroup _grupo}; - }; - }; - }; \ No newline at end of file +private _marcador = _this select 0; +private _tipo = _this select 1; + +if (_tipo isEqualType "") then { + diag_log format ["[createSDKgarrisonsTemp] Spawning %1 now", _tipo]; + + private _posicion = getMarkerPos _marcador; + private _size = [_marcador] call A3A_fnc_sizeMarker; + private _unit = objNull; + private _veh = objNull; + private _grupos = []; + private _grupo = objNull; + if (_tipo == staticCrewBuenos) then { + diag_log format ["[createSDKgarrisonsTemp] %1 is mortar crew", _tipo]; + _grupos = allGroups select {(leader _x getVariable ["marcador",""] == _marcador) and ((typeOf (vehicle (leader _x)) == SDKMortar) && (typeOf (leader _x) == staticCrewBuenos)) and (side leader _x == buenos)}; + _pos = [_posicion] call A3A_fnc_mortarPos; + _veh = SDKMortar createVehicle _pos; + _nul = [_veh] execVM "scripts\UPSMON\MON_artillery_add.sqf"; + [_veh] call A3A_fnc_AIVEHinit; + } else { + if(_tipo in SDKMil) then { + diag_log format ["[createSDKgarrisonsTemp] Unit type %1 is SDKMil, looking for a static for them to gun", _tipo]; + + private _statics = staticsToSave select {_x distance _posicion < _size and count (allTurrets _x) > 0}; + + // Clear the dead from statics + { + private _gunner = gunner _x; + if (!isNull _gunner and !alive _gunner) then { + diag_log format ["[createSDKgarrisonsTemp] Removing dead gunner %1 from %2", _gunner, _x]; + unassignVehicle _gunner; + deleteVehicle _gunner; + }; + } forEach _statics; + + // Get empty statics + private _emptyStatics = _statics select {isNull (assignedGunner _x)}; + + if(count _emptyStatics > 0) then { + _veh = _emptyStatics select 0; + diag_log format ["[createSDKgarrisonsTemp] Found a static %1 for unit to gun", _veh]; + }; + }; + // If the unit isn't going to be getting in a vehicle then we try to add them to an existing group + if (isNull _veh) then { + _grupos = allGroups select {(leader _x getVariable ["marcador",""] == _marcador) and (count units _x < 8) and (vehicle (leader _x) == leader _x) and (side (leader _x) == buenos)}; + }; + }; + + // Create new group if we didn't find one + _grupo = if (_grupos isEqualTo []) then { createGroup buenos } else { _grupos select 0 }; + + private _centre = [ _posicion , _size * 0.25 + random (_size * 0.25) , random 360 ] call BIS_fnc_relPos; + private _unit_spawn_pos = _centre findEmptyPosition [0, _size * 0.25]; + if (_unit_spawn_pos isEqualTo []) then { + _unit_spawn_pos = _posicion; + }; + + // Create the unit + _unit = _grupo createUnit [_tipo, _unit_spawn_pos, [], 0, "NONE"]; + // IF the unit type is a leader then make it the leader of the group + if (_tipo in SDKSL) then {_grupo selectLeader _unit}; + [_unit,_marcador] call A3A_fnc_FIAinitBases; + + // Assign to a vehicle if one was specified + if (!isNull _veh) then { + diag_log format ["[createSDKgarrisonsTemp] Moving new unit %1 into static %2 as gunner", _unit, _veh]; + _unit assignAsGunner _veh; + _unit moveInGunner _veh; + } else { + // We created a new group and it wasn't for a static vehicle, so add it to USPMON. + if (_grupos isEqualTo []) then { + _nul = [leader _grupo, _marcador, "SAFE","SPAWNED","ORIGINAL","NOVEH2","NOFOLLOW"] execVM "scripts\UPSMON.sqf"; + }; + }; + + // Watch the unit for when we despawn the garrison, so we can clean it up. + [_unit,_marcador] spawn { + private _unit = _this select 0; + private _marcador = _this select 1; + waitUntil {sleep 1; (spawner getVariable _marcador == 2)}; + if (alive _unit) then { + private _grupo = group _unit; + if (typeOf _unit == staticCrewBuenos) then {deleteVehicle (vehicle _unit)}; + deleteVehicle _unit; + if (count units _grupo == 0) then {deleteGroup _grupo}; + }; + }; +}; \ No newline at end of file diff --git a/A3-Antistasi/CREATE/milBuildings.sqf b/A3-Antistasi/CREATE/milBuildings.sqf index e77ccb2c21..075c5aa5ac 100644 --- a/A3-Antistasi/CREATE/milBuildings.sqf +++ b/A3-Antistasi/CREATE/milBuildings.sqf @@ -31,10 +31,10 @@ for "_i" from 0 to (count _buildings) - 1 do ]; };*/ _tipoB = typeOf _building; - if ((_tipoB == "Land_HelipadSquare_F") and (!_frontera)) then + if (_tipoB == "Land_HelipadSquare_F" or _tipoB == "Land_HelipadCircle_F" or _tipoB == "Land_HelipadCircle_F") then { _tipoVeh = if (_lado == malos) then {vehNATOPatrolHeli} else {vehCSATPatrolHeli}; - _veh = createVehicle [_tipoVeh, position _building, [],0, "CAN_COLLIDE"]; + _veh = createVehicle [_tipoVeh, position _building, [], 0, "CAN_COLLIDE"]; _veh setDir (getDir _building); _vehiculos pushBack _veh; } diff --git a/A3-Antistasi/CREATE/patrolCA.sqf b/A3-Antistasi/CREATE/patrolCA.sqf index 9fd4cc59ad..2a27f922ee 100644 --- a/A3-Antistasi/CREATE/patrolCA.sqf +++ b/A3-Antistasi/CREATE/patrolCA.sqf @@ -62,7 +62,7 @@ if ((!_esMarcador) and (_typeOfAttack != "Air") and (!_super) and ({lados getVar _amigos = if (_lado == malos) then {allUnits select {(_x distance _posDestino < 200) and (alive _x) and ((side (group _x) == _lado) or (side (group _x) == civilian))}} else {allUnits select {(_x distance _posDestino < 100) and ([_x] call A3A_fnc_canFight) and (side (group _x) == _lado)}}; if (count _amigos == 0) then { - _tipo = "NAPALM"; + _tipo = "CLUSTER"; { if (vehicle _x isKindOf "Tank") then { @@ -96,7 +96,7 @@ if (!_inWaves) then { _threatEvalLand = [_posDestino,_lado] call A3A_fnc_landThreatEval; _aeropuertos = aeropuertos select {(lados getVariable [_x,sideUnknown] == _lado) and ([_x,true] call A3A_fnc_airportCanAttack) and (getMarkerPos _x distance2D _posDestino < distanceForAirAttack)}; - if (hayIFA and (_threatEvalLand <= 15)) then {_aeropuertos = _areopuertos select {(getMarkerPos _x distance2D _posDestino < distanceForLandAttack)}}; + if (hayIFA and (_threatEvalLand <= 15)) then {_aeropuertos = _aeropuertos select {(getMarkerPos _x distance2D _posDestino < distanceForLandAttack)}}; _puestos = if (_threatEvalLand <= 15) then {puestos select {(lados getVariable [_x,sideUnknown] == _lado) and ([_posDestino,getMarkerPos _x] call A3A_fnc_isTheSameIsland) and (getMarkerPos _x distance _posDestino < distanceForLandAttack) and ([_x,true] call A3A_fnc_airportCanAttack)}} else {[]}; _aeropuertos = _aeropuertos + _puestos; if (_esMarcador) then @@ -227,14 +227,14 @@ if (_base != "") then { if (_rnd > prestigeNATO) then { - _vehPool = _vehPool - [vehNATOTank]; + _vehPool = _vehPool - vehNATOAllTanks; }; } else { if (_rnd > prestigeCSAT) then { - _vehPool = _vehPool - [vehCSATTank]; + _vehPool = _vehPool - vehCSATAllTanks; }; }; }; @@ -266,11 +266,11 @@ if (_base != "") then { if (_lado == malos) then { - if ([vehNATOTank] call A3A_fnc_vehAvailable) then {vehNATOTank} else {selectRandom _vehPool} + if ([vehNATOTank] call A3A_fnc_vehAvailable) then {selectRandom vehNATOAllTanks} else {selectRandom _vehPool} } else { - if ([vehCSATTank] call A3A_fnc_vehAvailable) then {vehCSATTank} else {selectRandom _vehPool} + if ([vehCSATTank] call A3A_fnc_vehAvailable) then {selectRandom vehCSATAllTanks} else {selectRandom _vehPool} }; }; }; diff --git a/A3-Antistasi/CREATE/reinforcementsAI.sqf b/A3-Antistasi/CREATE/reinforcementsAI.sqf index 5a66a85e80..18f7f41371 100644 --- a/A3-Antistasi/CREATE/reinforcementsAI.sqf +++ b/A3-Antistasi/CREATE/reinforcementsAI.sqf @@ -6,7 +6,7 @@ _reinfPlaces = []; _aeropuerto = _x; _numero = 8; _numGarr = [_aeropuerto] call A3A_fnc_garrisonSize; -_numReal = count (garrison getVariable _aeropuerto); +_numReal = count (garrison getVariable [_aeropuerto, []]); _lado = lados getVariable [_aeropuerto,sideUnknown]; if (_numReal + 4 <= _numGarr) then { @@ -36,7 +36,7 @@ if ((_numero >= 4) and (reinfPatrols <= 4)) then _sitio = ""; { _numGarr = [_x] call A3A_fnc_garrisonSize; - _numReal = count (garrison getVariable _x); + _numReal = count (garrison getVariable [_x, []]); if (_numGarr - _numReal > _cuenta) then { _cuenta = _numGarr - _numReal; diff --git a/A3-Antistasi/CREATE/remoteBattle.sqf b/A3-Antistasi/CREATE/remoteBattle.sqf index 7d7aa2cbff..8288374a25 100644 --- a/A3-Antistasi/CREATE/remoteBattle.sqf +++ b/A3-Antistasi/CREATE/remoteBattle.sqf @@ -1,46 +1,64 @@ private _soldados = _this; +// Wait until no soldiers in vehicles waitUntil {sleep 10;{([_x] call A3A_fnc_canFight) and (vehicle _x == _x)} count _soldados == {[_x] call A3A_fnc_canFight} count _soldados}; -if ({[_x] call A3A_fnc_canFight} count _soldados == 0) exitWith {}; + +// If there are no soldiers we can early out +if ({[_x] call A3A_fnc_canFight} count _soldados == 0) exitWith { + diag_log format["[remoteBattle] No soldiers can fight, exiting"]; +}; + +// SDK join the other side always. private _lado = side (group (_soldados select 0)); private _eny = [buenos]; if (_lado == malos) then {_eny pushBack muyMalos} else {_eny pushBack malos}; -while {true} do - { - sleep 10;//poner 10 +diag_log format["[remoteBattle] Starting %1 attacking %2", _lado, _eny]; +// TODO: improve this simulation by looking at unit proximities. + + +// Loop until either the player arrives or all the soldiers are dead +while {true} do { + // TODO: calculate sleep based on proximities of forces. + sleep (10 + random(60)); //poner 10 + //sleep(1); + _soldados = _soldados select {[_x] call A3A_fnc_canFight}; if (_soldados isEqualTo []) exitWith {}; _exit = false; _enemigos = []; { - _soldado = _x; - { - if ((_x distance _soldado < (2*distanciaSPWN)) and (isPlayer _x)) then - { - _exit = true - } - else + _soldado = _x; + + // For all existing units except the attackers + // TODO: this is n*m operation, quite inefficient. { - if ((_x distance _soldado < (distanciaSPWN/2)) and {[_x] call A3A_fnc_canFight} and {side group _x in _eny} and {vehicle _x == _x}) then - { - _enemigos pushBackUnique _x; + // Stop remote battle simulation if player is nearish. + if ((isPlayer _x) and (_x distance _soldado < (2*distanciaSPWN))) then { + _exit = true + } else { + // If the unit is enemy to the soldier, on foot and in proximity then add them to the list for combat simulation. + if (([_x] call A3A_fnc_canFight) + and (side group _x in _eny) + and (vehicle _x == _x) + and (_x distance _soldado < (distanciaSPWN/2))) then { + _enemigos pushBackUnique _x; + }; }; - }; - } forEach (allUnits - _soldados); + } forEach (allUnits - _soldados); } forEach _soldados; + if (_exit) exitWith {}; - if !(_enemigos isEqualTo []) then - { + + diag_log format["[remoteBattle] %1 %2 vs %3 %4", count _soldados, _lado, count _enemigos, _eny]; + + if !(_enemigos isEqualTo []) then { _chanceToKill = 50 * ((count _soldados) / (count _enemigos)); - if (random 100 <= _chanceToKill) then - { + if (random 100 <= _chanceToKill) then { (selectRandom _enemigos) setDamage 1; - } - else - { + } else { (selectRandom _soldados) setDamage 1; - }; }; - }; \ No newline at end of file + }; +}; \ No newline at end of file diff --git a/A3-Antistasi/CREATE/wavedCA.sqf b/A3-Antistasi/CREATE/wavedCA.sqf index 2d6c2330c4..e3aae8808f 100644 --- a/A3-Antistasi/CREATE/wavedCA.sqf +++ b/A3-Antistasi/CREATE/wavedCA.sqf @@ -53,8 +53,8 @@ forcedSpawn pushBack _mrkDestino; publicVariable "forcedSpawn"; diag_log format ["Antistasi: Side attacker: %1. Side defender (false, the other AI side): %2",_lado,_esSDK]; _nombreDest = [_mrkDestino] call A3A_fnc_localizar; -[_ladosTsk,"AtaqueAAF",[format ["%2 Is attacking from the %1. Intercept them or we may loose a sector",_nombreorig,_nombreEny],format ["%1 Attack",_nombreEny],_mrkOrigen],getMarkerPos _mrkOrigen,false,0,true,"Defend",true] call BIS_fnc_taskCreate; -[_ladosTsk1,"AtaqueAAF1",[format ["We are attacking %2 from the %1. Help the operation if you can",_nombreorig,_nombreDest],format ["%1 Attack",_nombreEny],_mrkDestino],getMarkerPos _mrkDestino,false,0,true,"Attack",true] call BIS_fnc_taskCreate; +[_ladosTsk,"AtaqueAAF",[format ["%2 is attacking from the %1. Intercept them or we may loose a sector!",_nombreorig,_nombreEny],format ["%1 Attack",_nombreEny],_mrkOrigen],getMarkerPos _mrkOrigen,false,0,true,"Defend",true] call BIS_fnc_taskCreate; +[_ladosTsk1,"AtaqueAAF1",[format ["We are attacking %2 from the %1. Help with the operation if you can!",_nombreorig,_nombreDest],format ["%1 Attack",_nombreEny],_mrkDestino],getMarkerPos _mrkDestino,false,0,true,"Attack",true] call BIS_fnc_taskCreate; //_tsk = ["AtaqueAAF",_ladosTsk,[format ["%2 Is attacking from the %1. Intercept them or we may loose a sector",_nombreorig,_nombreEny],format ["%1 Attack",_nombreEny],_mrkOrigen],getMarkerPos _mrkOrigen,"CREATED",10,true,true,"Defend"] call BIS_fnc_setTask; //misiones pushbackUnique "AtaqueAAF"; publicVariable "misiones"; //_tsk1 = ["AtaqueAAF1",_ladosTsk1,[format ["We are attacking %2 from the %1. Help the operation if you can",_nombreorig,_nombreDest],format ["%1 Attack",_nombreEny],_mrkDestino],getMarkerPos _mrkDestino,"CREATED",10,true,true,"Attack"] call BIS_fnc_setTask; @@ -105,14 +105,14 @@ while {(_waves > 0)} do { if (_rnd > prestigeNATO) then { - _vehPool = _vehPool - [vehNATOTank]; + _vehPool = _vehPool - vehNATOAllTanks; }; } else { if (_rnd > prestigeCSAT) then { - _vehPool = _vehPool - [vehCSATTank]; + _vehPool = _vehPool - vehCSATAllTanks; }; }; }; @@ -128,7 +128,7 @@ while {(_waves > 0)} do if (_lado == malos) then {_vehPool = vehNATOTrucks} else {_vehPool = vehCSATTrucks}; }; _tipoVeh = selectRandom _vehPool; - if ((_cuenta == _nVeh) and (_tipoVeh in vehTanks)) then + if (_cuenta == _nVeh) then { _tipoVeh = if (_lado == malos) then {selectRandom vehNATOTrucks} else {selectRandom vehCSATTrucks}; }; @@ -393,10 +393,9 @@ while {(_waves > 0)} do _posSuelo = [_posOrigen select 0,_posorigen select 1,0]; _posOrigen set [2,300]; _grupoUav = grpNull; - if !(hayIFA) then + _tipoVeh = if (_lado == malos) then {vehNATOUAV} else {vehCSATUAV}; + if (!hayIFA and _tipoVeh != "not_supported") then { - _tipoVeh = if (_lado == malos) then {vehNATOUAV} else {vehCSATUAV}; - _uav = createVehicle [_tipoVeh, _posOrigen, [], 0, "FLY"]; _vehiculos pushBack _uav; //[_uav,"UAV"] spawn A3A_fnc_inmuneConvoy; @@ -560,7 +559,7 @@ while {(_waves > 0)} do else { {_x disableAI "TARGET"; _x disableAI "AUTOTARGET"} foreach units _grupoVeh; - if ((_tipoVeh in vehFastRope) and ((count(garrison getVariable _mrkDestino)) < 10)) then + if ((_tipoVeh in vehFastRope) and ((count(garrison getVariable [_mrkDestino, []])) < 10)) then { //_grupo setVariable ["mrkAttack",_mrkDestino]; [_veh,_grupo,_posDestino,_posOrigen,_grupoVeh] spawn A3A_fnc_fastrope; @@ -603,12 +602,12 @@ while {(_waves > 0)} do } else { - _nul = [_mrkdestino,_lado,selectRandom ["HE","CLUSTER","NAPALM"]] spawn A3A_fnc_airstrike; + _nul = [_mrkdestino,_lado,selectRandom ["HE","CLUSTER"]] spawn A3A_fnc_airstrike; }; } else { - _nul = [_mrkdestino,_lado,selectRandom ["HE","CLUSTER","NAPALM"]] spawn A3A_fnc_airstrike; + _nul = [_mrkdestino,_lado,selectRandom ["HE","CLUSTER"]] spawn A3A_fnc_airstrike; }; sleep 30; }; @@ -639,12 +638,12 @@ while {(_waves > 0)} do } else { - _nul = [_mrkdestino,_lado,selectRandom ["HE","CLUSTER","NAPALM"]] spawn A3A_fnc_airstrike; + _nul = [_mrkdestino,_lado,selectRandom ["HE","CLUSTER"]] spawn A3A_fnc_airstrike; }; } else { - _nul = [_posDestino,_lado,selectRandom ["HE","CLUSTER","NAPALM"]] spawn A3A_fnc_airstrike; + _nul = [_posDestino,_lado,selectRandom ["HE","CLUSTER"]] spawn A3A_fnc_airstrike; }; sleep 30; }; @@ -655,11 +654,13 @@ while {(_waves > 0)} do if (!_SDKShown) then { - if !([true] call A3A_fnc_FIAradio) then {sleep 100}; + sleep 30; + // if !([true] call A3A_fnc_FIAradio) then {sleep 100}; _SDKShown = true; ["TaskSucceeded", ["", "Attack Destination Updated"]] remoteExec ["BIS_fnc_showNotification",buenos]; ["AtaqueAAF",[format ["%2 Is attacking from the %1. Intercept them or we may loose a sector",_nombreorig,_nombreEny],format ["%1 Attack",_nombreEny],_mrkDestino],getMarkerPos _mrkDestino,"CREATED"] call A3A_fnc_taskUpdate; }; + _solMax = round ((count _soldados)*0.6); _waves = _waves -1; _firstWave = false; @@ -676,7 +677,7 @@ while {(_waves > 0)} do ["AtaqueAAF1",[format ["We are attacking an %2 from the %1. Help the operation if you can",_nombreorig,_nombreDest],format ["%1 Attack",_nombreEny],_mrkDestino],getMarkerPos _mrkDestino,"SUCEEDED"] call A3A_fnc_taskUpdate; if (_mrkDestino in ciudades) then { - [0,-100,_mrkDestino] remoteExec ["A3A_fnc_citySupportChange",2]; + [0,-100,_mrkDestino,"wavedCA City Lost"] remoteExec ["A3A_fnc_citySupportChange",2]; ["TaskFailed", ["", format ["%1 joined %2",[_mrkDestino, false] call A3A_fnc_fn_location,nameMalos]]] remoteExec ["BIS_fnc_showNotification",buenos]; lados setVariable [_mrkDestino,malos,true]; _nul = [-5,0] remoteExec ["A3A_fnc_prestige",2]; @@ -715,8 +716,8 @@ while {(_waves > 0)} do {_x doMove _posorigen} forEach _soldadosTotal; if (_waves <= 0) then {[_mrkDestino,_mrkOrigen] call A3A_fnc_minefieldAAF}; - ["AtaqueAAF",[format ["%2 Is attacking from the %1. Intercept them or we may loose a sector",_nombreorig,_nombreEny],format ["%1 Attack",_nombreEny],_mrkOrigen],getMarkerPos _mrkOrigen,"SUCCEEDED"] call A3A_fnc_taskUpdate; - ["AtaqueAAF1",[format ["We are attacking an %2 from the %1. Help the operation if you can",_nombreorig,_nombreDest],format ["%1 Attack",_nombreEny],_mrkDestino],getMarkerPos _mrkDestino,"FAILED"] call A3A_fnc_taskUpdate; + ["AtaqueAAF",[format ["%2 is attacking from the %1. Intercept them or we may lose a sector!",_nombreorig,_nombreEny],format ["%1 Attack",_nombreEny],_mrkOrigen],getMarkerPos _mrkOrigen,"SUCCEEDED"] call A3A_fnc_taskUpdate; + ["AtaqueAAF1",[format ["We are attacking an %2 from the %1. Help the operation if you can!",_nombreorig,_nombreDest],format ["%1 Attack",_nombreEny],_mrkDestino],getMarkerPos _mrkDestino,"FAILED"] call A3A_fnc_taskUpdate; }; }; } @@ -728,8 +729,8 @@ while {(_waves > 0)} do { _waves = 0; if (not(lados getVariable [_mrkDestino,sideUnknown] == muyMalos)) then {[muyMalos,_mrkDestino] remoteExec ["A3A_fnc_markerChange",2]}; - ["AtaqueAAF",[format ["%2 Is attacking from the %1. Intercept them or we may loose a sector",_nombreorig,_nombreEny],format ["%1 Attack",_nombreEny],_mrkOrigen],getMarkerPos _mrkOrigen,"FAILED"] call A3A_fnc_taskUpdate; - ["AtaqueAAF1",[format ["We are attacking an %2 from the %1. Help the operation if you can",_nombreorig,_nombreDest],format ["%1 Attack",_nombreEny],_mrkDestino],getMarkerPos _mrkDestino,"SUCCEEDED"] call A3A_fnc_taskUpdate; + ["AtaqueAAF",[format ["%2 is attacking from the %1. Intercept them or we may lose a sector!",_nombreorig,_nombreEny],format ["%1 Attack",_nombreEny],_mrkOrigen],getMarkerPos _mrkOrigen,"FAILED"] call A3A_fnc_taskUpdate; + ["AtaqueAAF1",[format ["We are attacking an %2 from the %1. Help the operation if you can!",_nombreorig,_nombreDest],format ["%1 Attack",_nombreEny],_mrkDestino],getMarkerPos _mrkDestino,"SUCCEEDED"] call A3A_fnc_taskUpdate; }; sleep 10; if (!(lados getVariable [_mrkDestino,sideUnknown] == muyMalos)) then @@ -761,8 +762,8 @@ while {(_waves > 0)} do { {_x doMove _posorigen} forEach _soldadosTotal; if (_waves <= 0) then {[_mrkDestino,_mrkOrigen] call A3A_fnc_minefieldAAF}; - ["AtaqueAAF",[format ["%2 Is attacking from the %1. Intercept them or we may loose a sector",_nombreorig,_nombreEny],format ["%1 Attack",_nombreEny],_mrkOrigen],getMarkerPos _mrkOrigen,"SUCCEEDED"] call A3A_fnc_taskUpdate; - ["AtaqueAAF1",[format ["We are attacking an %2 from the %1. Help the operation if you can",_nombreorig,_nombreDest],format ["%1 Attack",_nombreEny],_mrkDestino],getMarkerPos _mrkDestino,"FAILED"] call A3A_fnc_taskUpdate; + ["AtaqueAAF",[format ["%2 is attacking from the %1. Intercept them or we may lose a sector!",_nombreorig,_nombreEny],format ["%1 Attack",_nombreEny],_mrkOrigen],getMarkerPos _mrkOrigen,"SUCCEEDED"] call A3A_fnc_taskUpdate; + ["AtaqueAAF1",[format ["We are attacking an %2 from the %1. Help the operation if you can!",_nombreorig,_nombreDest],format ["%1 Attack",_nombreEny],_mrkDestino],getMarkerPos _mrkDestino,"FAILED"] call A3A_fnc_taskUpdate; }; }; }; @@ -794,7 +795,7 @@ _nul = [0,"AtaqueAAF1"] spawn A3A_fnc_borrarTask; bigAttackInProgress = false; publicVariable "bigAttackInProgress"; //forcedSpawn = forcedSpawn - _forced; publicVariable "forcedSpawn"; forcedSpawn = forcedSpawn - [_mrkDestino]; publicVariable "forcedSpawn"; -[3600] remoteExec ["A3A_fnc_timingCA",2]; +[2400, 1200, "Waved CA"] remoteExec ["A3A_fnc_timingCA",2]; { _veh = _x; diff --git a/A3-Antistasi/Dialogs/difficultyMenu.sqf b/A3-Antistasi/Dialogs/difficultyMenu.sqf index f635c275d3..eb039b1708 100644 --- a/A3-Antistasi/Dialogs/difficultyMenu.sqf +++ b/A3-Antistasi/Dialogs/difficultyMenu.sqf @@ -2,41 +2,41 @@ _nul=createDialog "diff_menu"; waitUntil {dialog}; hint "Choose a difficulty level"; waitUntil {!dialog}; -if !(skillMult == 1) then +if (skillMult <= 0.5) then { - if (skillMult == 0.5) then + server setVariable ["hr",25,true]; + server setVariable ["resourcesFIA",5000,true]; + vehInGarage = [vehSDKTruck,vehSDKTruck,SDKMortar,SDKMGStatic,staticAABuenos]; + minWeaps = 15; + _index = sniperRifle call jn_fnc_arsenal_itemType; + [_index,sniperRifle,-1] call jn_fnc_arsenal_addItem; + unlockedSN pushBack sniperRifle; + _magazine = (getArray (configFile / "CfgWeapons" / sniperRifle / "magazines") select 0); + if (!isNil "_magazine") then { - server setVariable ["hr",25,true]; - server setVariable ["resourcesFIA",5000,true]; - vehInGarage = [vehSDKTruck,vehSDKTruck,SDKMortar,SDKMGStatic,staticAABuenos]; - minWeaps = 15; - _index = sniperRifle call jn_fnc_arsenal_itemType; - [_index,sniperRifle,-1] call jn_fnc_arsenal_addItem; - unlockedSN pushBack sniperRifle; - _magazine = (getArray (configFile / "CfgWeapons" / sniperRifle / "magazines") select 0); - if (!isNil "_magazine") then - { - unlockedMagazines pushBack _magazine; - _index = _magazine call jn_fnc_arsenal_itemType; - [_index,_magazine,-1] call jn_fnc_arsenal_addItem; - }; - unlockedWeapons pushBack sniperRifle; - if !(hayTFAR) then - { - _index = "ItemRadio" call jn_fnc_arsenal_itemType; - [_index,"ItemRadio",-1] call jn_fnc_arsenal_addItem; - unlockedItems pushBack "ItemRadio"; - haveRadio = true; - }; - } - else + unlockedMagazines pushBack _magazine; + _index = _magazine call jn_fnc_arsenal_itemType; + [_index,_magazine,-1] call jn_fnc_arsenal_addItem; + }; + unlockedWeapons pushBack sniperRifle; + if !(hayTFAR) then + { + _index = "ItemRadio" call jn_fnc_arsenal_itemType; + [_index,"ItemRadio",-1] call jn_fnc_arsenal_addItem; + unlockedItems pushBack "ItemRadio"; + haveRadio = true; + }; + } +else + { + if (skillMult >= 2) then { server setVariable ["hr",0,true]; server setVariable ["resourcesFIA",200,true]; minWeaps = 40; }; - [] call A3A_fnc_statistics; }; +[] call A3A_fnc_statistics; _nul= createDialog "gameMode_menu"; waitUntil {dialog}; hint "Choose a Game Mode"; diff --git a/A3-Antistasi/GOM_VTsounds.hpp b/A3-Antistasi/GOM_VTsounds.hpp new file mode 100644 index 0000000000..1b66d6f638 --- /dev/null +++ b/A3-Antistasi/GOM_VTsounds.hpp @@ -0,0 +1,31 @@ + +class GOM_VT_valve1 +{ + name = "GOM_VT_valve1"; + sound[] = { "sounds\VehicleTuning\valve1.ogg", 1, 1, 300 }; + titles[] = {}; +}; + +class GOM_VT_valve2 +{ + name = "GOM_VT_valve2"; + sound[] = { "sounds\VehicleTuning\valve2.ogg", 1, 1, 300 }; + titles[] = {}; + +}; + +class GOM_VT_valve3 +{ + name = "GOM_VT_valve3"; + sound[] = { "sounds\VehicleTuning\valve3.ogg", 1, 1, 300 }; + titles[] = {}; + +}; + +class GOM_VT_valve4 +{ + name = "GOM_VT_valve4"; + sound[] = { "sounds\VehicleTuning\valve4.ogg", 1, 1, 300 }; + titles[] = {}; + +}; \ No newline at end of file diff --git a/A3-Antistasi/GOM_defines.hpp b/A3-Antistasi/GOM_defines.hpp new file mode 100644 index 0000000000..d9b56c634c --- /dev/null +++ b/A3-Antistasi/GOM_defines.hpp @@ -0,0 +1,1582 @@ +//GOM_defines.hpp +//by Grumpy Old Man +//V0.9 +/////////////////////////////////////////////////////////////////////////// +/// Styles +/////////////////////////////////////////////////////////////////////////// + +// Control types +#define CT_STATIC 0 +#define CT_BUTTON 1 +#define CT_EDIT 2 +#define CT_SLIDER 3 +#define CT_COMBO 4 +#define CT_LISTBOX 5 +#define CT_TOOLBOX 6 +#define CT_CHECKBOXES 7 +#define CT_PROGRESS 8 +#define CT_HTML 9 +#define CT_STATIC_SKEW 10 +#define CT_ACTIVETEXT 11 +#define CT_TREE 12 +#define CT_STRUCTURED_TEXT 13 +#define CT_CONTEXT_MENU 14 +#define CT_CONTROLS_GROUP 15 +#define CT_SHORTCUTBUTTON 16 +#define CT_XKEYDESC 40 +#define CT_XBUTTON 41 +#define CT_XLISTBOX 42 +#define CT_XSLIDER 43 +#define CT_XCOMBO 44 +#define CT_ANIMATED_TEXTURE 45 +#define CT_OBJECT 80 +#define CT_OBJECT_ZOOM 81 +#define CT_OBJECT_CONTAINER 82 +#define CT_OBJECT_CONT_ANIM 83 +#define CT_LINEBREAK 98 +#define CT_USER 99 +#define CT_MAP 100 +#define CT_MAP_MAIN 101 +#define CT_LISTNBOX 102 +#define CT_CHECKBOX 77 + +// Static styles +#define ST_POS 0x0F +#define ST_HPOS 0x03 +#define ST_VPOS 0x0C +#define ST_LEFT 0x00 +#define ST_RIGHT 0x01 +#define ST_CENTER 0x02 +#define ST_DOWN 0x04 +#define ST_UP 0x08 +#define ST_VCENTER 0x0C + +#define ST_TYPE 0xF0 +#define ST_SINGLE 0x00 +#define ST_MULTI 0x10 +#define ST_TITLE_BAR 0x20 +#define ST_PICTURE 0x30 +#define ST_FRAME 0x40 +#define ST_BACKGROUND 0x50 +#define ST_GROUP_BOX 0x60 +#define ST_GROUP_BOX2 0x70 +#define ST_HUD_BACKGROUND 0x80 +#define ST_TILE_PICTURE 0x90 +#define ST_WITH_RECT 0xA0 +#define ST_LINE 0xB0 + +#define ST_SHADOW 0x100 +#define ST_NO_RECT 0x200 +#define ST_KEEP_ASPECT_RATIO 0x800 + +#define ST_TITLE ST_TITLE_BAR + ST_CENTER + +// Slider styles +#define SL_DIR 0x400 +#define SL_VERT 0 +#define SL_HORZ 0x400 + +#define SL_TEXTURES 0x10 + +// progress bar +#define ST_VERTICAL 0x01 +#define ST_HORIZONTAL 0 + +// Listbox styles +#define LB_TEXTURES 0x10 +#define LB_MULTI 0x20 + +// Tree styles +#define TR_SHOWROOT 1 +#define TR_AUTOCOLLAPSE 2 + +// MessageBox styles +#define MB_BUTTON_OK 1 +#define MB_BUTTON_CANCEL 2 +#define MB_BUTTON_USER 4 + + +/////////////////////////////////////////////////////////////////////////// +/// Base Classes +/////////////////////////////////////////////////////////////////////////// +class RscText +{ + deletable = 0; + fade = 0; + access = 0; + type = 0; + idc = -1; + colorBackground[] = + { + 0, + 0, + 0, + 0 + }; + colorText[] = + { + 1, + 1, + 1, + 1 + }; + text = ""; + fixedWidth = 0; + x = 0; + y = 0; + h = 0.037; + w = 0.3; + style = 0; + shadow = 1; + colorShadow[] = + { + 0, + 0, + 0, + 0.5 + }; + font = "RobotoCondensed"; + SizeEx = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)"; + linespacing = 1; + tooltipColorText[] = + { + 1, + 1, + 1, + 1 + }; + tooltipColorBox[] = + { + 1, + 1, + 1, + 1 + }; + tooltipColorShade[] = + { + 0, + 0, + 0, + 0.65 + }; +}; +class RscStructuredText +{ + deletable = 0; + fade = 0; + access = 0; + type = 13; + idc = -1; + style = 0; + colorText[] = + { + 1, + 1, + 1, + 1 + }; + class Attributes + { + font = "RobotoCondensed"; + color = "#ffffff"; + colorLink = "#D09B43"; + align = "left"; + shadow = 1; + }; + x = 0; + y = 0; + h = 0.035; + w = 0.1; + text = ""; + size = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)"; + shadow = 1; +}; +class RscPicture +{ + deletable = 0; + fade = 0; + access = 0; + colorBackground[] = + { + 0, + 0, + 0, + 0 + }; + colorText[] = + { + 1, + 1, + 1, + 1 + }; + lineSpacing = 0; + fixedWidth = 0; + type = 0; + idc = -1; + style = 48; + sizeEx = "(((100/36 )/100)*0.9)"; + font = "TahomaB"; + text = ""; + shadow = 0; + x = 0; + y = 0; + w = 0.2; + h = 0.15; + tooltipColorText[] = + { + 1, + 1, + 1, + 1 + }; + tooltipColorBox[] = + { + 1, + 1, + 1, + 1 + }; + tooltipColorShade[] = + { + 0, + 0, + 0, + 0.65 + }; +}; +class RscEdit +{ + deletable = 0; + fade = 0; + access = 0; + type = 2; + x = 0; + y = 0; + h = 0.04; + w = 0.2; + colorBackground[] = + { + 0, + 0, + 0, + 0 + }; + colorText[] = + { + 0.95, + 0.95, + 0.95, + 1 + }; + colorDisabled[] = + { + 1, + 1, + 1, + 0.25 + }; + colorSelection[] = + { + "(profilenamespace getvariable ['GUI_BCG_RGB_R',0.77])", + "(profilenamespace getvariable ['GUI_BCG_RGB_G',0.51])", + "(profilenamespace getvariable ['GUI_BCG_RGB_B',0.08])", + 1 + }; + autocomplete = ""; + text = ""; + size = 0.2; + style = "0x00 + 0x40"; + font = "RobotoCondensed"; + shadow = 2; + sizeEx = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)"; + canModify = 1; + tooltipColorText[] = + { + 1, + 1, + 1, + 1 + }; + tooltipColorBox[] = + { + 1, + 1, + 1, + 1 + }; + tooltipColorShade[] = + { + 0, + 0, + 0, + 0.65 + }; +}; +class RscCombo +{ + deletable = 0; + fade = 0; + access = 0; + type = 4; + colorSelect[] = + { + 0, + 0, + 0, + 1 + }; + colorText[] = + { + 1, + 1, + 1, + 1 + }; + colorBackground[] = + { + 0, + 0, + 0, + 1 + }; + colorScrollbar[] = + { + 1, + 0, + 0, + 1 + }; + colorDisabled[] = + { + 1, + 1, + 1, + 0.25 + }; + colorPicture[] = + { + 1, + 1, + 1, + 1 + }; + colorPictureSelected[] = + { + 1, + 1, + 1, + 1 + }; + colorPictureDisabled[] = + { + 1, + 1, + 1, + 0.25 + }; + colorPictureRight[] = + { + 1, + 1, + 1, + 1 + }; + colorPictureRightSelected[] = + { + 1, + 1, + 1, + 1 + }; + colorPictureRightDisabled[] = + { + 1, + 1, + 1, + 0.25 + }; + colorTextRight[] = + { + 1, + 1, + 1, + 1 + }; + colorSelectRight[] = + { + 0, + 0, + 0, + 1 + }; + colorSelect2Right[] = + { + 0, + 0, + 0, + 1 + }; + tooltipColorText[] = + { + 1, + 1, + 1, + 1 + }; + tooltipColorBox[] = + { + 1, + 1, + 1, + 1 + }; + tooltipColorShade[] = + { + 0, + 0, + 0, + 0.65 + }; + soundSelect[] = + { + "\A3\ui_f\data\sound\RscCombo\soundSelect", + 0.1, + 1 + }; + soundExpand[] = + { + "\A3\ui_f\data\sound\RscCombo\soundExpand", + 0.1, + 1 + }; + soundCollapse[] = + { + "\A3\ui_f\data\sound\RscCombo\soundCollapse", + 0.1, + 1 + }; + maxHistoryDelay = 1; + class ComboScrollBar + { + color[] = + { + 1, + 1, + 1, + 1 + }; + }; + style = "0x10 + 0x200"; + font = "RobotoCondensed"; + sizeEx = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)"; + shadow = 0; + x = 0; + y = 0; + w = 0.12; + h = 0.035; + colorSelectBackground[] = + { + 1, + 1, + 1, + 0.7 + }; + arrowEmpty = "\A3\ui_f\data\GUI\RscCommon\rsccombo\arrow_combo_ca.paa"; + arrowFull = "\A3\ui_f\data\GUI\RscCommon\rsccombo\arrow_combo_active_ca.paa"; + wholeHeight = 0.45; + colorActive[] = + { + 1, + 0, + 0, + 1 + }; +}; +class RscListBox +{ + deletable = 0; + fade = 0; + access = 0; + type = 5; + rowHeight = 0; + colorText[] = + { + 1, + 1, + 1, + 1 + }; + colorDisabled[] = + { + 1, + 1, + 1, + 0.25 + }; + colorScrollbar[] = + { + 1, + 0, + 0, + 0 + }; + colorSelect[] = + { + 0, + 0, + 0, + 1 + }; + colorSelect2[] = + { + 0, + 0, + 0, + 1 + }; + colorSelectBackground[] = + { + 0.95, + 0.95, + 0.95, + 1 + }; + colorSelectBackground2[] = + { + 1, + 1, + 1, + 0.5 + }; + colorBackground[] = + { + 0, + 0, + 0, + 0.3 + }; + soundSelect[] = + { + "\A3\ui_f\data\sound\RscListbox\soundSelect", + 0.09, + 1 + }; + autoScrollSpeed = -1; + autoScrollDelay = 5; + autoScrollRewind = 0; + arrowEmpty = "#(argb,8,8,3)color(1,1,1,1)"; + arrowFull = "#(argb,8,8,3)color(1,1,1,1)"; + colorPicture[] = + { + 1, + 1, + 1, + 1 + }; + colorPictureSelected[] = + { + 1, + 1, + 1, + 1 + }; + colorPictureDisabled[] = + { + 1, + 1, + 1, + 0.25 + }; + colorPictureRight[] = + { + 1, + 1, + 1, + 1 + }; + colorPictureRightSelected[] = + { + 1, + 1, + 1, + 1 + }; + colorPictureRightDisabled[] = + { + 1, + 1, + 1, + 0.25 + }; + colorTextRight[] = + { + 1, + 1, + 1, + 1 + }; + colorSelectRight[] = + { + 0, + 0, + 0, + 1 + }; + colorSelect2Right[] = + { + 0, + 0, + 0, + 1 + }; + tooltipColorText[] = + { + 1, + 1, + 1, + 1 + }; + tooltipColorBox[] = + { + 1, + 1, + 1, + 1 + }; + tooltipColorShade[] = + { + 0, + 0, + 0, + 0.65 + }; + class ListScrollBar + { + color[] = + { + 1, + 1, + 1, + 1 + }; + autoScrollEnabled = 1; + }; + x = 0; + y = 0; + w = 0.3; + h = 0.3; + style = 16; + font = "RobotoCondensed"; + sizeEx = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)"; + shadow = 0; + colorShadow[] = + { + 0, + 0, + 0, + 0.5 + }; + period = 1.2; + maxHistoryDelay = 1; +}; +class RscButton +{ + deletable = 0; + fade = 0; + access = 0; + type = 1; + text = ""; + colorText[] = + { + 1, + 1, + 1, + 1 + }; + colorDisabled[] = + { + 1, + 1, + 1, + 0.25 + }; + colorBackground[] = + { + 0, + 0, + 0, + 0.5 + }; + colorBackgroundDisabled[] = + { + 0, + 0, + 0, + 0.5 + }; + colorBackgroundActive[] = + { + 0, + 0, + 0, + 1 + }; + colorFocused[] = + { + 0, + 0, + 0, + 1 + }; + colorShadow[] = + { + 0, + 0, + 0, + 0 + }; + colorBorder[] = + { + 0, + 0, + 0, + 1 + }; + soundEnter[] = + { + "\A3\ui_f\data\sound\RscButton\soundEnter", + 0.09, + 1 + }; + soundPush[] = + { + "\A3\ui_f\data\sound\RscButton\soundPush", + 0.09, + 1 + }; + soundClick[] = + { + "\A3\ui_f\data\sound\RscButton\soundClick", + 0.09, + 1 + }; + soundEscape[] = + { + "\A3\ui_f\data\sound\RscButton\soundEscape", + 0.09, + 1 + }; + style = 2; + x = 0; + y = 0; + w = 0.095589; + h = 0.039216; + shadow = 2; + font = "RobotoCondensed"; + sizeEx = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)"; + offsetX = 0; + offsetY = 0; + offsetPressedX = 0; + offsetPressedY = 0; + borderSize = 0; +}; +class RscShortcutButton +{ + deletable = 0; + fade = 0; + type = 16; + x = 0.1; + y = 0.1; + class HitZone + { + left = 0; + top = 0; + right = 0; + bottom = 0; + }; + class ShortcutPos + { + left = 0; + top = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 20) - (((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)) / 2"; + w = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1) * (3/4)"; + h = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)"; + }; + class TextPos + { + left = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1) * (3/4)"; + top = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 20) - (((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)) / 2"; + right = 0.005; + bottom = 0; + }; + shortcuts[] = + { + }; + textureNoShortcut = "#(argb,8,8,3)color(0,0,0,0)"; + color[] = + { + 1, + 1, + 1, + 1 + }; + colorFocused[] = + { + 1, + 1, + 1, + 1 + }; + color2[] = + { + 0.95, + 0.95, + 0.95, + 1 + }; + colorDisabled[] = + { + 1, + 1, + 1, + 0.25 + }; + colorBackground[] = + { + "(profilenamespace getvariable ['GUI_BCG_RGB_R',0.77])", + "(profilenamespace getvariable ['GUI_BCG_RGB_G',0.51])", + "(profilenamespace getvariable ['GUI_BCG_RGB_B',0.08])", + 1 + }; + colorBackgroundFocused[] = + { + "(profilenamespace getvariable ['GUI_BCG_RGB_R',0.77])", + "(profilenamespace getvariable ['GUI_BCG_RGB_G',0.51])", + "(profilenamespace getvariable ['GUI_BCG_RGB_B',0.08])", + 1 + }; + colorBackground2[] = + { + 1, + 1, + 1, + 1 + }; + soundEnter[] = + { + "\A3\ui_f\data\sound\RscButton\soundEnter", + 0.09, + 1 + }; + soundPush[] = + { + "\A3\ui_f\data\sound\RscButton\soundPush", + 0.09, + 1 + }; + soundClick[] = + { + "\A3\ui_f\data\sound\RscButton\soundClick", + 0.09, + 1 + }; + soundEscape[] = + { + "\A3\ui_f\data\sound\RscButton\soundEscape", + 0.09, + 1 + }; + class Attributes + { + font = "RobotoCondensed"; + color = "#E5E5E5"; + align = "left"; + shadow = "true"; + }; + idc = -1; + style = 0; + default = 0; + shadow = 1; + w = 0.183825; + h = "((((safezoneW / safezoneH) min 1.2) / 1.2) / 20)"; + textSecondary = ""; + colorSecondary[] = + { + 1, + 1, + 1, + 1 + }; + colorFocusedSecondary[] = + { + 1, + 1, + 1, + 1 + }; + color2Secondary[] = + { + 0.95, + 0.95, + 0.95, + 1 + }; + colorDisabledSecondary[] = + { + 1, + 1, + 1, + 0.25 + }; + sizeExSecondary = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)"; + fontSecondary = "RobotoCondensed"; + animTextureDefault = "\A3\ui_f\data\GUI\RscCommon\RscShortcutButton\normal_ca.paa"; + animTextureNormal = "\A3\ui_f\data\GUI\RscCommon\RscShortcutButton\normal_ca.paa"; + animTextureDisabled = "\A3\ui_f\data\GUI\RscCommon\RscShortcutButton\normal_ca.paa"; + animTextureOver = "\A3\ui_f\data\GUI\RscCommon\RscShortcutButton\over_ca.paa"; + animTextureFocused = "\A3\ui_f\data\GUI\RscCommon\RscShortcutButton\focus_ca.paa"; + animTexturePressed = "\A3\ui_f\data\GUI\RscCommon\RscShortcutButton\down_ca.paa"; + periodFocus = 1.2; + periodOver = 0.8; + period = 0.4; + font = "RobotoCondensed"; + size = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)"; + sizeEx = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)"; + text = ""; + action = ""; + class AttributesImage + { + font = "RobotoCondensed"; + color = "#E5E5E5"; + align = "left"; + }; +}; +class RscShortcutButtonMain +{ + idc = -1; + style = 0; + default = 0; + w = 0.313726; + h = 0.104575; + color[] = + { + 1, + 1, + 1, + 1 + }; + colorDisabled[] = + { + 1, + 1, + 1, + 0.25 + }; + class HitZone + { + left = 0; + top = 0; + right = 0; + bottom = 0; + }; + class ShortcutPos + { + left = 0.0145; + top = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 20) - (((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1.2)) / 2"; + w = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1.2) * (3/4)"; + h = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1.2)"; + }; + class TextPos + { + left = "(((safezoneW / safezoneH) min 1.2) / 32) * 1.5"; + top = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 20)*2 - (((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1.2)) / 2"; + right = 0.005; + bottom = 0; + }; + animTextureNormal = "\A3\ui_f\data\GUI\RscCommon\RscShortcutButtonMain\normal_ca.paa"; + animTextureDisabled = "\A3\ui_f\data\GUI\RscCommon\RscShortcutButtonMain\disabled_ca.paa"; + animTextureOver = "\A3\ui_f\data\GUI\RscCommon\RscShortcutButtonMain\over_ca.paa"; + animTextureFocused = "\A3\ui_f\data\GUI\RscCommon\RscShortcutButtonMain\focus_ca.paa"; + animTexturePressed = "\A3\ui_f\data\GUI\RscCommon\RscShortcutButtonMain\down_ca.paa"; + animTextureDefault = "\A3\ui_f\data\GUI\RscCommon\RscShortcutButtonMain\normal_ca.paa"; + period = 0.5; + font = "RobotoCondensed"; + size = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1.2)"; + sizeEx = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1.2)"; + text = ""; + action = ""; + class Attributes + { + font = "RobotoCondensed"; + color = "#E5E5E5"; + align = "left"; + shadow = "false"; + }; + class AttributesImage + { + font = "RobotoCondensed"; + color = "#E5E5E5"; + align = "false"; + }; +}; +class RscFrame +{ + type = 0; + idc = -1; + style = 64; + shadow = 2; + colorBackground[] = + { + 0, + 0, + 0, + 0 + }; + colorText[] = + { + 1, + 1, + 1, + 1 + }; + font = "RobotoCondensed"; + sizeEx = 0.02; + text = ""; + x = 0; + y = 0; + w = 0.3; + h = 0.3; +}; +class RscSlider +{ + deletable = 0; + fade = 0; + access = 0; + type = 3; + style = 1024; + color[] = + { + 1, + 1, + 1, + 0.8 + }; + colorActive[] = + { + 1, + 1, + 1, + 1 + }; + shadow = 0; + x = 0; + y = 0; + w = 0.3; + h = 0.025; +}; +class IGUIBack +{ + type = 0; + idc = 124; + style = 128; + text = ""; + colorText[] = + { + 0, + 0, + 0, + 0 + }; + font = "RobotoCondensed"; + sizeEx = 0; + shadow = 0; + x = 0.1; + y = 0.1; + w = 0.1; + h = 0.1; + colorbackground[] = + { + "(profilenamespace getvariable ['IGUI_BCG_RGB_R',0])", + "(profilenamespace getvariable ['IGUI_BCG_RGB_G',1])", + "(profilenamespace getvariable ['IGUI_BCG_RGB_B',1])", + "(profilenamespace getvariable ['IGUI_BCG_RGB_A',0.8])" + }; +}; +class RscCheckBox +{ + idc = -1; + type = 77; + style = 0; + checked = 0; + x = "0.375 * safezoneW + safezoneX"; + y = "0.36 * safezoneH + safezoneY"; + w = "0.025 * safezoneW"; + h = "0.04 * safezoneH"; + color[] = + { + 1, + 1, + 1, + 0.7 + }; + colorFocused[] = + { + 1, + 1, + 1, + 1 + }; + colorHover[] = + { + 1, + 1, + 1, + 1 + }; + colorPressed[] = + { + 1, + 1, + 1, + 1 + }; + colorDisabled[] = + { + 1, + 1, + 1, + 0.2 + }; + colorBackground[] = + { + 0, + 0, + 0, + 0 + }; + colorBackgroundFocused[] = + { + 0, + 0, + 0, + 0 + }; + colorBackgroundHover[] = + { + 0, + 0, + 0, + 0 + }; + colorBackgroundPressed[] = + { + 0, + 0, + 0, + 0 + }; + colorBackgroundDisabled[] = + { + 0, + 0, + 0, + 0 + }; + textureChecked = "A3\Ui_f\data\GUI\RscCommon\RscCheckBox\CheckBox_checked_ca.paa"; + textureUnchecked = "A3\Ui_f\data\GUI\RscCommon\RscCheckBox\CheckBox_unchecked_ca.paa"; + textureFocusedChecked = "A3\Ui_f\data\GUI\RscCommon\RscCheckBox\CheckBox_checked_ca.paa"; + textureFocusedUnchecked = "A3\Ui_f\data\GUI\RscCommon\RscCheckBox\CheckBox_unchecked_ca.paa"; + textureHoverChecked = "A3\Ui_f\data\GUI\RscCommon\RscCheckBox\CheckBox_checked_ca.paa"; + textureHoverUnchecked = "A3\Ui_f\data\GUI\RscCommon\RscCheckBox\CheckBox_unchecked_ca.paa"; + texturePressedChecked = "A3\Ui_f\data\GUI\RscCommon\RscCheckBox\CheckBox_checked_ca.paa"; + texturePressedUnchecked = "A3\Ui_f\data\GUI\RscCommon\RscCheckBox\CheckBox_unchecked_ca.paa"; + textureDisabledChecked = "A3\Ui_f\data\GUI\RscCommon\RscCheckBox\CheckBox_checked_ca.paa"; + textureDisabledUnchecked = "A3\Ui_f\data\GUI\RscCommon\RscCheckBox\CheckBox_unchecked_ca.paa"; + tooltipColorText[] = + { + 1, + 1, + 1, + 1 + }; + tooltipColorBox[] = + { + 1, + 1, + 1, + 1 + }; + tooltipColorShade[] = + { + 0, + 0, + 0, + 0.65 + }; + soundEnter[] = + { + "", + 0.1, + 1 + }; + soundPush[] = + { + "", + 0.1, + 1 + }; + soundClick[] = + { + "", + 0.1, + 1 + }; + soundEscape[] = + { + "", + 0.1, + 1 + }; +}; +class RscTextCheckbox +{ + idc = -1; + type = 7; + style = 0; + x = "0.375 * safezoneW + safezoneX"; + y = "0.36 * safezoneH + safezoneY"; + w = "0.025 * safezoneW"; + h = "0.04 * safezoneH"; + colorText[] = + { + 1, + 0, + 0, + 1 + }; + color[] = + { + 0, + 0, + 0, + 0 + }; + colorBackground[] = + { + 0, + 0, + 0, + 0 + }; + colorTextSelect[] = + { + 0, + 0.8, + 0, + 1 + }; + colorSelectedBg[] = + { + "(profilenamespace getvariable ['GUI_BCG_RGB_R',0.77])", + "(profilenamespace getvariable ['GUI_BCG_RGB_G',0.51])", + "(profilenamespace getvariable ['GUI_BCG_RGB_B',0.08])", + 1 + }; + colorSelect[] = + { + 0, + 0, + 0, + 1 + }; + colorTextDisable[] = + { + 0.4, + 0.4, + 0.4, + 1 + }; + colorDisable[] = + { + 0.4, + 0.4, + 0.4, + 1 + }; + tooltipColorText[] = + { + 1, + 1, + 1, + 1 + }; + tooltipColorBox[] = + { + 1, + 1, + 1, + 1 + }; + tooltipColorShade[] = + { + 0, + 0, + 0, + 0.65 + }; + font = "RobotoCondensed"; + sizeEx = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 0.8)"; + rows = 1; + columns = 1; + strings[] = + { + "UNCHECKED" + }; + checked_strings[] = + { + "CHECKED" + }; +}; +class RscButtonMenu +{ + idc = -1; + type = 16; + style = "0x02 + 0xC0"; + default = 0; + shadow = 0; + x = 0; + y = 0; + w = 0.095589; + h = 0.039216; + animTextureNormal = "#(argb,8,8,3)color(1,1,1,1)"; + animTextureDisabled = "#(argb,8,8,3)color(1,1,1,1)"; + animTextureOver = "#(argb,8,8,3)color(1,1,1,1)"; + animTextureFocused = "#(argb,8,8,3)color(1,1,1,1)"; + animTexturePressed = "#(argb,8,8,3)color(1,1,1,1)"; + animTextureDefault = "#(argb,8,8,3)color(1,1,1,1)"; + colorBackground[] = + { + 0, + 0, + 0, + 0.8 + }; + colorBackgroundFocused[] = + { + 1, + 1, + 1, + 1 + }; + colorBackground2[] = + { + 0.75, + 0.75, + 0.75, + 1 + }; + color[] = + { + 1, + 1, + 1, + 1 + }; + colorFocused[] = + { + 0, + 0, + 0, + 1 + }; + color2[] = + { + 0, + 0, + 0, + 1 + }; + colorText[] = + { + 1, + 1, + 1, + 1 + }; + colorDisabled[] = + { + 1, + 1, + 1, + 0.25 + }; + textSecondary = ""; + colorSecondary[] = + { + 1, + 1, + 1, + 1 + }; + colorFocusedSecondary[] = + { + 0, + 0, + 0, + 1 + }; + color2Secondary[] = + { + 0, + 0, + 0, + 1 + }; + colorDisabledSecondary[] = + { + 1, + 1, + 1, + 0.25 + }; + sizeExSecondary = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)"; + fontSecondary = "PuristaLight"; + period = 1.2; + periodFocus = 1.2; + periodOver = 1.2; + size = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)"; + sizeEx = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)"; + tooltipColorText[] = + { + 1, + 1, + 1, + 1 + }; + tooltipColorBox[] = + { + 1, + 1, + 1, + 1 + }; + tooltipColorShade[] = + { + 0, + 0, + 0, + 0.65 + }; + class TextPos + { + left = "0.25 * (((safezoneW / safezoneH) min 1.2) / 40)"; + top = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) - (((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)) / 2"; + right = 0.005; + bottom = 0; + }; + class Attributes + { + font = "PuristaLight"; + color = "#E5E5E5"; + align = "left"; + shadow = "false"; + }; + class ShortcutPos + { + left = "5.25 * (((safezoneW / safezoneH) min 1.2) / 40)"; + top = 0; + w = "1 * (((safezoneW / safezoneH) min 1.2) / 40)"; + h = "1 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)"; + }; + soundEnter[] = + { + "\A3\ui_f\data\sound\RscButtonMenu\soundEnter", + 0.09, + 1 + }; + soundPush[] = + { + "\A3\ui_f\data\sound\RscButtonMenu\soundPush", + 0.09, + 1 + }; + soundClick[] = + { + "\A3\ui_f\data\sound\RscButtonMenu\soundClick", + 0.09, + 1 + }; + soundEscape[] = + { + "\A3\ui_f\data\sound\RscButtonMenu\soundEscape", + 0.09, + 1 + }; +}; +class RscButtonMenuOK +{ + idc = 1; + shortcuts[] = + { + "0x00050000 + 0", + 28, + 57, + 156 + }; + default = 1; + text = "OK"; + soundPush[] = + { + "\A3\ui_f\data\sound\RscButtonMenuOK\soundPush", + 0.09, + 1 + }; +}; +class RscButtonMenuCancel +{ + idc = 2; + shortcuts[] = + { + "0x00050000 + 1" + }; + text = "Cancel"; +}; +class RscControlsGroup +{ + deletable = 0; + fade = 0; + class VScrollbar + { + color[] = + { + 1, + 1, + 1, + 1 + }; + width = 0.021; + autoScrollEnabled = 1; + }; + class HScrollbar + { + color[] = + { + 1, + 1, + 1, + 1 + }; + height = 0.028; + }; + class Controls + { + }; + type = 15; + idc = -1; + x = 0; + y = 0; + w = 1; + h = 1; + shadow = 0; + style = 16; +}; diff --git a/A3-Antistasi/GOM_dialogs.hpp b/A3-Antistasi/GOM_dialogs.hpp new file mode 100644 index 0000000000..00331c9402 --- /dev/null +++ b/A3-Antistasi/GOM_dialogs.hpp @@ -0,0 +1,244 @@ +//GOM_dialogs.hpp +//by Grumpy Old Man +//V0.9 +#define GUI_GRID_X (0) +#define GUI_GRID_Y (0) +#define GUI_GRID_W (0.025) +#define GUI_GRID_H (0.04) +#define GUI_GRID_WAbs (1) +#define GUI_GRID_HAbs (1) + +class GOM_veh_tuning { +idd = 66; +movingEnable = 0; +class controls { + + +//////////////////////////////////////////////////////// +// GUI EDITOR OUTPUT START (by Grumpy Old Man, v1.063, #Doxyki) +//////////////////////////////////////////////////////// + +class RscButton_1612: RscButton +{ + idc = 1612; + + text = "Confirm"; //--- ToDo: Localize; + x = 3 * GUI_GRID_W + GUI_GRID_X; + y = 17 * GUI_GRID_H + GUI_GRID_Y; + w = 8 * GUI_GRID_W; + h = 1 * GUI_GRID_H; +}; +class RscButton_1613: RscButton +{ + idc = 1613; + + text = "Cancel"; //--- ToDo: Localize; + x = 29 * GUI_GRID_W + GUI_GRID_X; + y = 17 * GUI_GRID_H + GUI_GRID_Y; + w = 8 * GUI_GRID_W; + h = 1 * GUI_GRID_H; +}; +class IGUIBack_2200: IGUIBack +{ + idc = 2200; + + x = 2.5 * GUI_GRID_W + GUI_GRID_X; + y = 0.5 * GUI_GRID_H + GUI_GRID_Y; + w = 35 * GUI_GRID_W; + h = 18 * GUI_GRID_H; + colorBackground[] = {-1,-1,-1,0.3}; +}; +class RscButton_1620: RscButton +{ + idc = 1620; + + text = "Repair"; //--- ToDo: Localize; + x = 15 * GUI_GRID_W + GUI_GRID_X; + y = 17 * GUI_GRID_H + GUI_GRID_Y; + w = 4 * GUI_GRID_W; + h = 1 * GUI_GRID_H; +}; +class RscButton_1621: RscButton +{ + idc = 1621; + + text = "Refuel"; //--- ToDo: Localize; + x = 21 * GUI_GRID_W + GUI_GRID_X; + y = 17 * GUI_GRID_H + GUI_GRID_Y; + w = 4 * GUI_GRID_W; + h = 1 * GUI_GRID_H; +}; +class RscStructuredText_1101: RscStructuredText +{ + idc = 1101; + + text = "--- Grumpy Old Mans Vehicle Workshop ---"; //--- ToDo: Localize; + x = 3 * GUI_GRID_W + GUI_GRID_X; + y = 1 * GUI_GRID_H + GUI_GRID_Y; + w = 34 * GUI_GRID_W; + h = 1 * GUI_GRID_H; +}; +class RscStructuredText_1102: RscStructuredText +{ + idc = 1102; + + text = "Select Vehicle"; //--- ToDo: Localize; + x = 3 * GUI_GRID_W + GUI_GRID_X; + y = 3 * GUI_GRID_H + GUI_GRID_Y; + w = 10 * GUI_GRID_W; + h = 1 * GUI_GRID_H; +}; +class RscListbox_1500: RscListBox +{ + idc = 1500; + + x = 3 * GUI_GRID_W + GUI_GRID_X; + y = 4 * GUI_GRID_H + GUI_GRID_Y; + w = 10 * GUI_GRID_W; + h = 4 * GUI_GRID_H; +}; +class RscStructuredText_1100: RscStructuredText +{ + idc = 1100; + + text = "Upgrade Category"; //--- ToDo: Localize; + x = 3 * GUI_GRID_W + GUI_GRID_X; + y = 9 * GUI_GRID_H + GUI_GRID_Y; + w = 10 * GUI_GRID_W; + h = 1 * GUI_GRID_H; +}; +class RscListbox_1501: RscListBox +{ + idc = 1501; + + x = 3 * GUI_GRID_W + GUI_GRID_X; + y = 10 * GUI_GRID_H + GUI_GRID_Y; + w = 10 * GUI_GRID_W; + h = 6.5 * GUI_GRID_H; +}; +class RscStructuredText_1103: RscStructuredText +{ + idc = 1103; + + text = "Select Upgrade"; //--- ToDo: Localize; + x = 15 * GUI_GRID_W + GUI_GRID_X; + y = 9 * GUI_GRID_H + GUI_GRID_Y; + w = 10 * GUI_GRID_W; + h = 1 * GUI_GRID_H; +}; +class RscListbox_1502: RscListBox +{ + idc = 1502; + + x = 15 * GUI_GRID_W + GUI_GRID_X; + y = 10 * GUI_GRID_H + GUI_GRID_Y; + w = 10 * GUI_GRID_W; + h = 6 * GUI_GRID_H; +}; +class RscButton_1604: RscButton +{ + idc = 1604; + + text = "Install"; //--- ToDo: Localize; + x = 15 * GUI_GRID_W + GUI_GRID_X; + y = 16 * GUI_GRID_H + GUI_GRID_Y; + w = 10 * GUI_GRID_W; + h = 1 * GUI_GRID_H; +}; +class RscStructuredText_1104: RscStructuredText +{ + idc = 1104; + + text = "Select Vehicle"; //--- ToDo: Localize; + x = 15 * GUI_GRID_W + GUI_GRID_X; + y = 3 * GUI_GRID_H + GUI_GRID_Y; + w = 22 * GUI_GRID_W; + h = 5 * GUI_GRID_H; +}; +class PlateEdit: RscEdit +{ + idc = 1400; + + x = 26.5 * GUI_GRID_W + GUI_GRID_X; + y = 10.5 * GUI_GRID_H + GUI_GRID_Y; + w = 10 * GUI_GRID_W; + h = 1 * GUI_GRID_H; + tooltip = "15 Characters max.! For Karts use 2 digit numbers. (05, etc)"; //--- ToDo: Localize; +}; +class RscButton_1605: RscButton +{ + idc = 1605; + + text = "Set"; //--- ToDo: Localize; + x = 34 * GUI_GRID_W + GUI_GRID_X; + y = 12 * GUI_GRID_H + GUI_GRID_Y; + w = 2.5 * GUI_GRID_W; + h = 1 * GUI_GRID_H; +}; +class RscText_1010: RscText +{ + idc = 1010; + + text = "Plate:"; //--- ToDo: Localize; + x = 30 * GUI_GRID_W + GUI_GRID_X; + y = 9 * GUI_GRID_H + GUI_GRID_Y; + w = 2.5 * GUI_GRID_W; + h = 1 * GUI_GRID_H; +}; +class RscButton_1606: RscButton +{ + idc = 1606; + + text = "Stock Plate"; //--- ToDo: Localize; + x = 26.5 * GUI_GRID_W + GUI_GRID_X; + y = 12 * GUI_GRID_H + GUI_GRID_Y; + w = 6.5 * GUI_GRID_W; + h = 1 * GUI_GRID_H; +}; +//////////////////////////////////////////////////////// +// GUI EDITOR OUTPUT END +//////////////////////////////////////////////////////// + + +}; + + + + + + + + + +}; +/* #Kygoce + $[ + 1.063, + ["GOM_Veh_Tuning",[[0,0,1,1],0.025,0.04,"GUI_GRID"],0,0,0], + [1600,"RscButton_1612",[2,"Confirm",["3 * GUI_GRID_W + GUI_GRID_X","17 * GUI_GRID_H + GUI_GRID_Y","8 * GUI_GRID_W","1 * GUI_GRID_H"],[-1,-1,-1,-1],[-1,-1,-1,-1],[-1,-1,-1,-1],"","-1"],["idc = 1612;"]], + [1601,"RscButton_1613",[2,"Cancel",["29 * GUI_GRID_W + GUI_GRID_X","17 * GUI_GRID_H + GUI_GRID_Y","8 * GUI_GRID_W","1 * GUI_GRID_H"],[-1,-1,-1,-1],[-1,-1,-1,-1],[-1,-1,-1,-1],"","-1"],["idc = 1613;"]], + [2200,"IGUIBack_2200",[2,"",["2.5 * GUI_GRID_W + GUI_GRID_X","0.5 * GUI_GRID_H + GUI_GRID_Y","35 * GUI_GRID_W","18 * GUI_GRID_H"],[-1,-1,-1,-1],[-1,-1,-1,0.3],[-1,-1,-1,-1],"","-1"],["idc = 2200;"]], + [1602,"RscButton_1620",[2,"Repair",["15 * GUI_GRID_W + GUI_GRID_X","17 * GUI_GRID_H + GUI_GRID_Y","4 * GUI_GRID_W","1 * GUI_GRID_H"],[-1,-1,-1,-1],[-1,-1,-1,-1],[-1,-1,-1,-1],"","-1"],["idc = 1620;"]], + [1603,"RscButton_1621",[2,"Refuel",["21 * GUI_GRID_W + GUI_GRID_X","17 * GUI_GRID_H + GUI_GRID_Y","4 * GUI_GRID_W","1 * GUI_GRID_H"],[-1,-1,-1,-1],[-1,-1,-1,-1],[-1,-1,-1,-1],"","-1"],["idc = 1621;"]], + [1100,"RscStructuredText_1101",[2,"--- Grumpy Old Mans Vehicle Workshop ---",["3 * GUI_GRID_W + GUI_GRID_X","1 * GUI_GRID_H + GUI_GRID_Y","34 * GUI_GRID_W","1 * GUI_GRID_H"],[-1,-1,-1,-1],[-1,-1,-1,-1],[-1,-1,-1,-1],"","-1"],["idc = 1101;"]], + [1101,"RscStructuredText_1102",[2,"Select Vehicle",["3 * GUI_GRID_W + GUI_GRID_X","3 * GUI_GRID_H + GUI_GRID_Y","10 * GUI_GRID_W","1 * GUI_GRID_H"],[-1,-1,-1,-1],[-1,-1,-1,-1],[-1,-1,-1,-1],"","-1"],["idc = 1102;"]], + [1000,"RscListbox_1500: RscListBox",[2,"",["3 * GUI_GRID_W + GUI_GRID_X","4 * GUI_GRID_H + GUI_GRID_Y","10 * GUI_GRID_W","4 * GUI_GRID_H"],[-1,-1,-1,-1],[-1,-1,-1,-1],[-1,-1,-1,-1],"","-1"],["idc = 1500;"]], + [1102,"RscStructuredText_1100",[2,"Upgrade Category",["15 * GUI_GRID_W + GUI_GRID_X","3 * GUI_GRID_H + GUI_GRID_Y","10 * GUI_GRID_W","1 * GUI_GRID_H"],[-1,-1,-1,-1],[-1,-1,-1,-1],[-1,-1,-1,-1],"","-1"],["idc = 1100;"]], + [1001,"RscListbox_1501: RscListBox",[2,"",["15 * GUI_GRID_W + GUI_GRID_X","4 * GUI_GRID_H + GUI_GRID_Y","10 * GUI_GRID_W","4 * GUI_GRID_H"],[-1,-1,-1,-1],[-1,-1,-1,-1],[-1,-1,-1,-1],"","-1"],["idc = 1501;"]], + [1103,"RscStructuredText_1103",[2,"Select Upgrade",["27 * GUI_GRID_W + GUI_GRID_X","3 * GUI_GRID_H + GUI_GRID_Y","10 * GUI_GRID_W","1 * GUI_GRID_H"],[-1,-1,-1,-1],[-1,-1,-1,-1],[-1,-1,-1,-1],"","-1"],["idc = 1103;"]], + [1002,"RscListbox_1502: RscListBox",[2,"",["27 * GUI_GRID_W + GUI_GRID_X","4 * GUI_GRID_H + GUI_GRID_Y","10 * GUI_GRID_W","4 * GUI_GRID_H"],[-1,-1,-1,-1],[-1,-1,-1,-1],[-1,-1,-1,-1],"","-1"],["idc = 1502;"]], + [1900,"RscSlider_1900",[2,"low threshold",["9 * GUI_GRID_W + GUI_GRID_X","14.3 * GUI_GRID_H + GUI_GRID_Y","8 * GUI_GRID_W","1 * GUI_GRID_H"],[-1,-1,-1,-1],[-1,-1,-1,-1],[-1,-1,-1,-1],"","-1"],["idc = 1900;"]], + [1901,"RscSlider_1901",[2,"low threshold",["9 * GUI_GRID_W + GUI_GRID_X","15.6 * GUI_GRID_H + GUI_GRID_Y","8 * GUI_GRID_W","1 * GUI_GRID_H"],[-1,-1,-1,-1],[-1,-1,-1,-1],[-1,-1,-1,-1],"","-1"],["idc = 1901;"]], + [1904,"RscSlider_1904",[2,"low threshold",["23 * GUI_GRID_W + GUI_GRID_X","15.6 * GUI_GRID_H + GUI_GRID_Y","10 * GUI_GRID_W","1 * GUI_GRID_H"],[-1,-1,-1,-1],[-1,-1,-1,-1],[-1,-1,-1,-1],"","-1"],["idc = 1904;"]], + [1604,"RscButton_1604",[2,"Install",["27 * GUI_GRID_W + GUI_GRID_X","8 * GUI_GRID_H + GUI_GRID_Y","10 * GUI_GRID_W","1 * GUI_GRID_H"],[-1,-1,-1,-1],[-1,-1,-1,-1],[-1,-1,-1,-1],"","-1"],["idc = 1604;"]], + [1104,"RscStructuredText_1104",[2,"Select Vehicle",["3 * GUI_GRID_W + GUI_GRID_X","9 * GUI_GRID_H + GUI_GRID_Y","34 * GUI_GRID_W","4 * GUI_GRID_H"],[-1,-1,-1,-1],[-1,-1,-1,-1],[-1,-1,-1,-1],"","-1"],["idc = 1104;"]], + [1003,"",[2,"High Threshold:",["3 * GUI_GRID_W + GUI_GRID_X","14 * GUI_GRID_H + GUI_GRID_Y","6 * GUI_GRID_W","1 * GUI_GRID_H"],[-1,-1,-1,-1],[-1,-1,-1,-1],[-1,-1,-1,-1],"","-1"],[]], + [1004,"",[2,"Low Threshold:",["3 * GUI_GRID_W + GUI_GRID_X","15.3 * GUI_GRID_H + GUI_GRID_Y","6 * GUI_GRID_W","1 * GUI_GRID_H"],[-1,-1,-1,-1],[-1,-1,-1,-1],[-1,-1,-1,-1],"","-1"],[]], + [1005,"",[2,"km/h",["17.5 * GUI_GRID_W + GUI_GRID_X","14 * GUI_GRID_H + GUI_GRID_Y","5 * GUI_GRID_W","1 * GUI_GRID_H"],[-1,-1,-1,-1],[-1,-1,-1,-1],[-1,-1,-1,-1],"","-1"],[]], + [1006,"",[2,"km/h",["17.5 * GUI_GRID_W + GUI_GRID_X","15.3 * GUI_GRID_H + GUI_GRID_Y","5 * GUI_GRID_W","1 * GUI_GRID_H"],[-1,-1,-1,-1],[-1,-1,-1,-1],[-1,-1,-1,-1],"","-1"],[]], + [1007,"",[2,"boost",["33 * GUI_GRID_W + GUI_GRID_X","15.9 * GUI_GRID_H + GUI_GRID_Y","5 * GUI_GRID_W","1 * GUI_GRID_H"],[-1,-1,-1,-1],[-1,-1,-1,-1],[-1,-1,-1,-1],"","-1"],[]], + [1008,"",[2,"Nitro Power at Speed:",["23.5 * GUI_GRID_W + GUI_GRID_X","14.5 * GUI_GRID_H + GUI_GRID_Y","8 * GUI_GRID_W","1 * GUI_GRID_H"],[-1,-1,-1,-1],[-1,-1,-1,-1],[-1,-1,-1,-1],"","-1"],[]], + [1009,"",[2,"km/h",["33 * GUI_GRID_W + GUI_GRID_X","14.9 * GUI_GRID_H + GUI_GRID_Y","5 * GUI_GRID_W","1 * GUI_GRID_H"],[-1,-1,-1,-1],[-1,-1,-1,-1],[-1,-1,-1,-1],"","-1"],[]] + ] + */ + diff --git a/A3-Antistasi/GOM_functions.hpp b/A3-Antistasi/GOM_functions.hpp new file mode 100644 index 0000000000..3d4c296070 --- /dev/null +++ b/A3-Antistasi/GOM_functions.hpp @@ -0,0 +1,42 @@ +//GOM_functions.hpp +//by Grumpy Old Man +//V0.9 +class CfgFunctions +{ + + class GOM + { + + class VehicleTuning + { + + class roundNum{file = "Scripts\GOM\functions\VehicleTuning\GOM_fnc_roundNum.sqf"}; + class killHint{file = "Scripts\GOM\functions\VehicleTuning\GOM_fnc_killHint.sqf"}; + class updateBoostDisplay{file = "Scripts\GOM\functions\VehicleTuning\GOM_fnc_updateBoostDisplay.sqf"}; + class updateSlider1{file = "Scripts\GOM\functions\VehicleTuning\GOM_fnc_updateSlider1.sqf"}; + class updateSlider2{file = "Scripts\GOM\functions\VehicleTuning\GOM_fnc_updateSlider2.sqf"}; + class updateLB{file = "Scripts\GOM\functions\VehicleTuning\GOM_fnc_updateLB.sqf"}; + class installFromLB{file = "Scripts\GOM\functions\VehicleTuning\GOM_fnc_installFromLB.sqf"}; + class FOGmachine{file = "Scripts\GOM\functions\VehicleTuning\GOM_fnc_FOGmachine.sqf"}; + class ejectionSeat{file = "Scripts\GOM\functions\VehicleTuning\GOM_fnc_ejectionSeat.sqf"}; + class vehTuning{file = "Scripts\GOM\functions\VehicleTuning\GOM_fnc_vehTuning.sqf"}; + class vehicleTuning{file = "Scripts\GOM\functions\VehicleTuning\GOM_fnc_vehicleTuning.sqf"}; + class bulletproofTyres{file = "Scripts\GOM\functions\VehicleTuning\GOM_fnc_bulletproofTyres.sqf"}; + class GPSTracker{file = "Scripts\GOM\functions\VehicleTuning\GOM_fnc_GPSTracker.sqf"}; + class boost{file = "Scripts\GOM\functions\VehicleTuning\GOM_fnc_boost.sqf"}; + class licensePlate{file = "Scripts\GOM\functions\VehicleTuning\GOM_fnc_licensePlate.sqf"}; + class initParams{file = "Scripts\GOM\functions\VehicleTuning\GOM_fnc_initParams.sqf";preInit = 1}; + class setKartNumber{file = "Scripts\GOM\functions\VehicleTuning\GOM_fnc_setKartNumber.sqf";}; + class getKartNumber{file = "Scripts\GOM\functions\VehicleTuning\GOM_fnc_getKartNumber.sqf";}; + class blowOff{file = "Scripts\GOM\functions\VehicleTuning\GOM_fnc_blowOff.sqf";}; + + + }; + + + + }; + + + +}; diff --git a/A3-Antistasi/Missions/AS_Oficial.sqf b/A3-Antistasi/Missions/AS_Oficial.sqf index aa3fbbb076..20eb77fbf3 100644 --- a/A3-Antistasi/Missions/AS_Oficial.sqf +++ b/A3-Antistasi/Missions/AS_Oficial.sqf @@ -49,7 +49,7 @@ if (not alive _oficial) then if (_dificil) then { [0,600] remoteExec ["A3A_fnc_resourcesFIA",2]; - [2400] remoteExec ["A3A_fnc_timingCA",2]; + [1200, 600, "Mission: Kill Officer Hard Won"] remoteExec ["A3A_fnc_timingCA",2]; {if (isPlayer _x) then {[20,_x] call A3A_fnc_playerScoreAdd}} forEach ([500,0,_posicion,buenos] call A3A_fnc_distanceUnits); [10,theBoss] call A3A_fnc_playerScoreAdd; [_marcador,60] call A3A_fnc_addTimeForIdle; @@ -57,7 +57,7 @@ if (not alive _oficial) then else { [0,300] remoteExec ["A3A_fnc_resourcesFIA",2]; - [1800] remoteExec ["A3A_fnc_timingCA",2]; + [1200, 1200, "Mission: Kill Officer Won"] remoteExec ["A3A_fnc_timingCA",2]; {if (isPlayer _x) then {[10,_x] call A3A_fnc_playerScoreAdd}} forEach ([500,0,_posicion,buenos] call A3A_fnc_distanceUnits); [5,theBoss] call A3A_fnc_playerScoreAdd; [_marcador,30] call A3A_fnc_addTimeForIdle; @@ -69,13 +69,13 @@ else ["AS",[format ["A %4 officer is inspecting %1. Go there and kill him before %2:%3.",_nombredest,numberToDate [2035,_fechalimnum] select 3,numberToDate [2035,_fechalimnum] select 4,_nombreBando],"Kill the Officer",_marcador],_posicion,"FAILED"] call A3A_fnc_taskUpdate; if (_dificil) then { - [-1200] remoteExec ["A3A_fnc_timingCA",2]; + [-1800, 600, "Mission: Kill Officer Hard Lost"] remoteExec ["A3A_fnc_timingCA",2]; [-20,theBoss] call A3A_fnc_playerScoreAdd; [_marcador,-60] call A3A_fnc_addTimeForIdle; } else { - [-600] remoteExec ["A3A_fnc_timingCA",2]; + [-900, 600, "Mission: Kill Officer Lost"] remoteExec ["A3A_fnc_timingCA",2]; [-10,theBoss] call A3A_fnc_playerScoreAdd; [_marcador,-30] call A3A_fnc_addTimeForIdle; }; diff --git a/A3-Antistasi/Missions/AS_specOP.sqf b/A3-Antistasi/Missions/AS_specOP.sqf index fe3ce4b681..d934ab9412 100644 --- a/A3-Antistasi/Missions/AS_specOP.sqf +++ b/A3-Antistasi/Missions/AS_specOP.sqf @@ -26,14 +26,14 @@ if (dateToNumber date > _fechalimnum) then ["AS",[format ["We have spotted a %4 SpecOp team patrolling around an %1. Ambush them and we will have one less problem. Do this before %2:%3. Be careful, they are tough boys.",_nombredest,numberToDate [2035,_fechalimnum] select 3,numberToDate [2035,_fechalimnum] select 4,_nombreBando],"SpecOps",_marcador],_posicion,"FAILED"] call A3A_fnc_taskUpdate; if (_dificil) then { - [10,0,_posicion] remoteExec ["A3A_fnc_citySupportChange",2]; - [-1200] remoteExec ["A3A_fnc_timingCA",2]; + [10,0,_posicion,"Mission: Kill Spec Ops Hard Lost"] remoteExec ["A3A_fnc_citySupportChange",2]; + [-1200, 600, "Mission: Kill Spec Ops Hard Lost"] remoteExec ["A3A_fnc_timingCA",2]; [-20,theBoss] call A3A_fnc_playerScoreAdd; } else { - [5,0,_posicion] remoteExec ["A3A_fnc_citySupportChange",2]; - [-600] remoteExec ["A3A_fnc_timingCA",2]; + [5,0,_posicion,"Mission: Kill Spec Ops Lost"] remoteExec ["A3A_fnc_citySupportChange",2]; + [-600, 300, "Mission: Kill Spec Ops Lost"] remoteExec ["A3A_fnc_timingCA",2]; [-10,theBoss] call A3A_fnc_playerScoreAdd; }; } @@ -43,16 +43,16 @@ else if (_dificil) then { [0,400] remoteExec ["A3A_fnc_resourcesFIA",2]; - [0,10,_posicion] remoteExec ["A3A_fnc_citySupportChange",2]; - [1200] remoteExec ["A3A_fnc_timingCA",2]; + [0,10,_posicion,"Mission: Kill Spec Ops Hard Won"] remoteExec ["A3A_fnc_citySupportChange",2]; + [1200, 1200, "Mission: Kill Spec Ops Hard Won"] remoteExec ["A3A_fnc_timingCA",2]; {if (isPlayer _x) then {[20,_x] call A3A_fnc_playerScoreAdd}} forEach ([500,0,_posicion,buenos] call A3A_fnc_distanceUnits); [20,theBoss] call A3A_fnc_playerScoreAdd; } else { [0,200] remoteExec ["A3A_fnc_resourcesFIA",2]; - [0,5,_posicion] remoteExec ["A3A_fnc_citySupportChange",2]; - [600] remoteExec ["A3A_fnc_timingCA",2]; + [0,5,_posicion,"Mission: Kill Spec Ops Won"] remoteExec ["A3A_fnc_citySupportChange",2]; + [1200, 1200, "Mission: Kill Spec Ops Won"] remoteExec ["A3A_fnc_timingCA",2]; {if (isPlayer _x) then {[10,_x] call A3A_fnc_playerScoreAdd}} forEach ([500,0,_posicion,buenos] call A3A_fnc_distanceUnits); [10,theBoss] call A3A_fnc_playerScoreAdd; }; diff --git a/A3-Antistasi/Missions/CONVOY.sqf b/A3-Antistasi/Missions/CONVOY.sqf index 8bb72d595a..029158eeef 100644 --- a/A3-Antistasi/Missions/CONVOY.sqf +++ b/A3-Antistasi/Missions/CONVOY.sqf @@ -179,14 +179,14 @@ if (!_esFIA) then { if (_rnd > prestigeNATO) then { - _vehPool = _vehPool - [vehNATOTank]; + _vehPool = _vehPool - vehNATOAllTanks; }; } else { if (_rnd > prestigeCSAT) then { - _vehPool = _vehPool - [vehCSATTank]; + _vehPool = _vehPool - vehCSATAllTanks; }; }; if (count _vehPool == 0) then {if (_lado == malos) then {_vehPool = vehNATOTrucks} else {_vehPool = vehCSATTrucks}}; @@ -393,7 +393,7 @@ if (_tipoConvoy == "Municion") then { _taskState = "FAILED"; _taskState1 = "SUCCEEDED"; - [-1200*_bonus] remoteExec ["A3A_fnc_timingCA",2]; + [-1800*_bonus, 600, "Misson: Ammo Convoy Failed"] remoteExec ["A3A_fnc_timingCA",2]; [-10*_bonus,theBoss] call A3A_fnc_playerScoreAdd; clearMagazineCargoGlobal _vehObj; clearWeaponCargoGlobal _vehObj; @@ -405,7 +405,7 @@ if (_tipoConvoy == "Municion") then _taskState = "SUCCEEDED"; _taskState1 = "FAILED"; [0,300*_bonus] remoteExec ["A3A_fnc_resourcesFIA",2]; - [1800*_bonus] remoteExec ["A3A_fnc_timingCA",2]; + [1800*_bonus, 600, "Misson: Ammo Convoy Won"] remoteExec ["A3A_fnc_timingCA",2]; {if (isPlayer _x) then {[10*_bonus,_x] call A3A_fnc_playerScoreAdd}} forEach ([500,0,_vehObj,buenos] call A3A_fnc_distanceUnits); [5*_bonus,theBoss] call A3A_fnc_playerScoreAdd; [getPosASL _vehObj,_lado,"",false] spawn A3A_fnc_patrolCA; @@ -427,7 +427,7 @@ if (_tipoConvoy == "Armor") then _taskState = "FAILED"; _taskState1 = "SUCCEEDED"; server setVariable [_destino,dateToNumber date,true]; - [-1200*_bonus] remoteExec ["A3A_fnc_timingCA",2]; + [-1800*_bonus, 600, "Misson: Armor Convoy Failed"] remoteExec ["A3A_fnc_timingCA",2]; [-10*_bonus,theBoss] call A3A_fnc_playerScoreAdd; } else @@ -435,8 +435,8 @@ if (_tipoConvoy == "Armor") then _taskState = "SUCCEEDED"; _taskState1 = "FAILED"; [5,0] remoteExec ["A3A_fnc_prestige",2]; - [0,5*_bonus,_posdestino] remoteExec ["A3A_fnc_citySupportChange",2]; - [1800*_bonus] remoteExec ["A3A_fnc_timingCA",2]; + [0,5*_bonus,_posdestino, "Mission: Convoy Won"] remoteExec ["A3A_fnc_citySupportChange",2]; + [1200*_bonus, 600, "Misson: Ammo Convoy Won"] remoteExec ["A3A_fnc_timingCA",2]; {if (isPlayer _x) then {[10*_bonus,_x] call A3A_fnc_playerScoreAdd}} forEach ([500,0,_vehObj,buenos] call A3A_fnc_distanceUnits); [5*_bonus,theBoss] call A3A_fnc_playerScoreAdd; [getPosASL _vehObj,_lado,"",false] spawn A3A_fnc_patrolCA; @@ -486,7 +486,7 @@ if (_tipoConvoy == "Prisoners") then _hr = _cuenta; _resourcesFIA = 300 * _cuenta; [_hr,_resourcesFIA*_bonus] remoteExec ["A3A_fnc_resourcesFIA",2]; - [0,10*_bonus,_posbase] remoteExec ["A3A_fnc_citySupportChange",2]; + [0,10*_bonus,_posbase, "Mission: POW Rescue Won"] remoteExec ["A3A_fnc_citySupportChange",2]; if (_lado == malos) then {[3,0] remoteExec ["A3A_fnc_prestige",2]} else {[-2*_cuenta,3] remoteExec ["A3A_fnc_prestige",2]}; {[_x] join _grppow; [_x] orderGetin false} forEach _POWs; {[_cuenta,_x] call A3A_fnc_playerScoreAdd} forEach (allPlayers - (entities "HeadlessClient_F")); @@ -502,7 +502,7 @@ if (_tipoConvoy == "Refuerzos") then { _taskState = "SUCCEEDED"; _taskState1 = "FAILED"; - [0,10*_bonus,_posbase] remoteExec ["A3A_fnc_citySupportChange",2]; + [0,10*_bonus,_posbase, "Mission: Refugee Rescue Won"] remoteExec ["A3A_fnc_citySupportChange",2]; if (_lado == malos) then {[3,0] remoteExec ["A3A_fnc_prestige",2]} else {[0,3] remoteExec ["A3A_fnc_prestige",2]}; {if (_x distance _vehObj < 500) then {[10*_bonus,_x] call A3A_fnc_playerScoreAdd}} forEach (allPlayers - (entities "HeadlessClient_F")); [5*_bonus,theBoss] call A3A_fnc_playerScoreAdd; @@ -534,14 +534,14 @@ if (_tipoConvoy == "Money") then _taskState = "FAILED"; if ((dateToNumber date > _fechafinNum) or (_vehObj distance _posdestino < 100)) then { - [-1200*_bonus] remoteExec ["A3A_fnc_timingCA",2]; + [-1800*_bonus, 600, "Misson: Money Convoy Failed"] remoteExec ["A3A_fnc_timingCA",2]; [-10*_bonus,theBoss] call A3A_fnc_playerScoreAdd; _taskState1 = "SUCCEEDED"; } else { [getPosASL _vehObj,_lado,"",false] spawn A3A_fnc_patrolCA; - [1200*_bonus] remoteExec ["A3A_fnc_timingCA",2]; + [1200*_bonus, 600, "Misson: Money Convoy Won"] remoteExec ["A3A_fnc_timingCA",2]; _taskState1 = "FAILED"; _killZones = killZones getVariable [_base,[]]; _killZones = _killZones + [_destino,_destino]; @@ -556,16 +556,15 @@ if (_tipoConvoy == "Money") then { _taskState = "FAILED"; _taskState1 = "FAILED"; - [1200*_bonus] remoteExec ["A3A_fnc_timingCA",2]; }; if (_vehObj distance _posHQ < 50) then { _taskState = "SUCCEEDED"; _taskState1 = "FAILED"; - [10*_bonus,-20*_bonus,_posdestino] remoteExec ["A3A_fnc_citySupportChange",2]; + [10*_bonus,-20*_bonus,_posdestino, "Mission: Money Convoy Won"] remoteExec ["A3A_fnc_citySupportChange",2]; [3,0] remoteExec ["A3A_fnc_prestige",2]; [0,5000*_bonus] remoteExec ["A3A_fnc_resourcesFIA",2]; - [-120*_bonus] remoteExec ["A3A_fnc_timingCA",2]; + [-180*_bonus, 60, "Mission: Money Convoy Won"] remoteExec ["A3A_fnc_timingCA",2]; {if (_x distance _vehObj < 500) then {[10*_bonus,_x] call A3A_fnc_playerScoreAdd}} forEach (allPlayers - (entities "HeadlessClient_F")); [5*_bonus,theBoss] call A3A_fnc_playerScoreAdd; waitUntil {sleep 1; speed _vehObj < 1}; @@ -601,7 +600,7 @@ if (_tipoConvoy == "Supplies") then { _taskState = "SUCCEEDED"; _taskState1 = "FAILED"; - [0,15*_bonus,_destino] remoteExec ["A3A_fnc_citySupportChange",2]; + [0,15*_bonus,_destino, "Mission: Supplies Convoy Won, Delivered"] remoteExec ["A3A_fnc_citySupportChange",2]; {if (_x distance _vehObj < 500) then {[10*_bonus,_x] call A3A_fnc_playerScoreAdd}} forEach (allPlayers - (entities "HeadlessClient_F")); [5*_bonus,theBoss] call A3A_fnc_playerScoreAdd; } @@ -609,7 +608,7 @@ if (_tipoConvoy == "Supplies") then { _taskState = "FAILED"; _taskState1 = "FAILED"; - [5*_bonus,-10*_bonus,_destino] remoteExec ["A3A_fnc_citySupportChange",2]; + [5*_bonus,-10*_bonus,_destino, "Mission: Supplies Convoy Failed"] remoteExec ["A3A_fnc_citySupportChange",2]; [3,0] remoteExec ["A3A_fnc_prestige",2]; [-10*_bonus,theBoss] call A3A_fnc_playerScoreAdd; }; @@ -619,7 +618,7 @@ if (_tipoConvoy == "Supplies") then _taskState = "FAILED"; _taskState1 = "SUCCEEDED"; [-3,0] remoteExec ["A3A_fnc_prestige",2]; - [15*_bonus,0,_destino] remoteExec ["A3A_fnc_citySupportChange",2]; + [15*_bonus,0,_destino, "Mission: Supplies Convoy Failed, Delivered"] remoteExec ["A3A_fnc_citySupportChange",2]; [-10*_bonus,theBoss] call A3A_fnc_playerScoreAdd; }; }; diff --git a/A3-Antistasi/Missions/CON_Puestos.sqf b/A3-Antistasi/Missions/CON_Puestos.sqf index be72bf891a..cd81bacc35 100644 --- a/A3-Antistasi/Missions/CON_Puestos.sqf +++ b/A3-Antistasi/Missions/CON_Puestos.sqf @@ -39,14 +39,14 @@ if (dateToNumber date > _fechalimnum) then ["CON",[_texto,_taskName,_marcador],_posicion,"FAILED"] call A3A_fnc_taskUpdate; if (_dificil) then { - [10,0,_posicion] remoteExec ["A3A_fnc_citySupportChange",2]; - [-1200] remoteExec ["A3A_fnc_timingCA",2]; + [10,0,_posicion,"Mission: Capture/Take Hard Failed"] remoteExec ["A3A_fnc_citySupportChange",2]; + [-1800, 600, "Mission: Capture/Take Hard Failed"] remoteExec ["A3A_fnc_timingCA",2]; [-20,theBoss] call A3A_fnc_playerScoreAdd; } else { - [5,0,_posicion] remoteExec ["A3A_fnc_citySupportChange",2]; - [-600] remoteExec ["A3A_fnc_timingCA",2]; + [5,0,_posicion,"Mission: Capture/Take Failed"] remoteExec ["A3A_fnc_citySupportChange",2]; + [-1200, 600, "Mission: Capture/Take Hard Failed"] remoteExec ["A3A_fnc_timingCA",2]; [-10,theBoss] call A3A_fnc_playerScoreAdd; }; } @@ -57,16 +57,16 @@ else if (_dificil) then { [0,400] remoteExec ["A3A_fnc_resourcesFIA",2]; - [-10,0,_posicion] remoteExec ["A3A_fnc_citySupportChange",2]; - [1200] remoteExec ["A3A_fnc_timingCA",2]; + [-10,0,_posicion,"Mission: Capture/Take Hard Won"] remoteExec ["A3A_fnc_citySupportChange",2]; + [1200, 600, "Mission: Capture/Take Hard Won"] remoteExec ["A3A_fnc_timingCA",2]; {if (isPlayer _x) then {[20,_x] call A3A_fnc_playerScoreAdd}} forEach ([500,0,_posicion,buenos] call A3A_fnc_distanceUnits); [20,theBoss] call A3A_fnc_playerScoreAdd; } else { [0,200] remoteExec ["A3A_fnc_resourcesFIA",2]; - [-5,0,_posicion] remoteExec ["A3A_fnc_citySupportChange",2]; - [600] remoteExec ["A3A_fnc_timingCA",2]; + [-5,0,_posicion,"Mission: Capture/Take Won"] remoteExec ["A3A_fnc_citySupportChange",2]; + [1200, 600, "Mission: Capture/Take Won"] remoteExec ["A3A_fnc_timingCA",2]; {if (isPlayer _x) then {[10,_x] call A3A_fnc_playerScoreAdd}} forEach ([500,0,_posicion,buenos] call A3A_fnc_distanceUnits); [10,theBoss] call A3A_fnc_playerScoreAdd; }; diff --git a/A3-Antistasi/Missions/DES_Antena.sqf b/A3-Antistasi/Missions/DES_Antena.sqf index 27263d4af2..eaafaa57e7 100644 --- a/A3-Antistasi/Missions/DES_Antena.sqf +++ b/A3-Antistasi/Missions/DES_Antena.sqf @@ -38,9 +38,10 @@ else { sleep 15; ["DES",[format ["We need to destroy or take a Radio Tower in %1. This will interrupt %4 Propaganda Nework. Do it before %2:%3.",_nombredest,numberToDate [2035,_fechalimnum] select 3,numberToDate [2035,_fechalimnum] select 4,nameMalos],"Destroy Radio Tower",_mrkfin],_posicion,"SUCCEEDED","Destroy"] call A3A_fnc_taskUpdate; + //[-5,0,_posicion] remoteExec ["A3A_fnc_citySupportChange",2]; [5,-5] remoteExec ["A3A_fnc_prestige",2]; - [600*_bonus] remoteExec ["A3A_fnc_timingCA",2]; + [600*_bonus, 600, "Mission: Destroy Antenna Won"] remoteExec ["A3A_fnc_timingCA",2]; {if (_x distance _posicion < 500) then {[10*_bonus,_x] call A3A_fnc_playerScoreAdd}} forEach (allPlayers - (entities "HeadlessClient_F")); [5*_bonus,theBoss] call A3A_fnc_playerScoreAdd; [3,0] remoteExec ["A3A_fnc_prestige",2] diff --git a/A3-Antistasi/Missions/DES_Heli.sqf b/A3-Antistasi/Missions/DES_Heli.sqf index 43800c3cd1..dbe54da07a 100644 --- a/A3-Antistasi/Missions/DES_Heli.sqf +++ b/A3-Antistasi/Missions/DES_Heli.sqf @@ -167,8 +167,8 @@ if (not alive _heli) then ["DES",[format ["We have downed air vehicle. It is a good chance to destroy it before it is recovered. Do it before a recovery team from the %1 reaches the place. MOVE QUICKLY",_nombrebase],"Destroy Air",_mrkfin],_posCrashMrk,"SUCCEEDED","Destroy"] call A3A_fnc_taskUpdate; [0,300*_bonus] remoteExec ["A3A_fnc_resourcesFIA",2]; if (typeOf _heli in vehCSATAir) then {[0,3] remoteExec ["A3A_fnc_prestige",2]} else {[3,0] remoteExec ["A3A_fnc_prestige",2]}; + //TODO: sort timingCA here //[-3,3,_posicion] remoteExec ["A3A_fnc_citySupportChange",2]; - [1800*_bonus] remoteExec ["A3A_fnc_timingCA",2]; {if (_x distance _heli < 500) then {[10*_bonus,_x] call A3A_fnc_playerScoreAdd}} forEach (allPlayers - (entities "HeadlessClient_F")); [5*_bonus,theBoss] call A3A_fnc_playerScoreAdd; ["DES1",[format ["The rebels managed to shot down a helicopter. A recovery team departing from the %1 is inbound to recover it. Cover them while they perform the whole operation",_nombrebase],"Helicopter Down",_mrkfin],_posCrash,"FAILED","Defend"] call A3A_fnc_taskUpdate; @@ -177,8 +177,8 @@ else { ["DES",[format ["We have downed air vehicle. It is a good chance to destroy it before it is recovered. Do it before a recovery team from the %1 reaches the place. MOVE QUICKLY",_nombrebase],"Destroy Air",_mrkfin],_posCrashMrk,"FAILED","Destroy"] call A3A_fnc_taskUpdate; ["DES1",[format ["The rebels managed to shot down a helicopter. A recovery team departing from the %1 is inbound to recover it. Cover them while they perform the whole operation",_nombrebase],"Helicopter Down",_mrkfin],_posCrash,"SUCCEEDED","Defend"] call A3A_fnc_taskUpdate; + // TODO: sort timingCA here //[3,0,_posicion] remoteExec ["A3A_fnc_citySupportChange",2]; - [-600*_bonus] remoteExec ["A3A_fnc_timingCA",2]; [-10*_bonus,theBoss] call A3A_fnc_playerScoreAdd; }; diff --git a/A3-Antistasi/Missions/DES_Vehicle.sqf b/A3-Antistasi/Missions/DES_Vehicle.sqf index 2affc9cbd0..959c64a253 100644 --- a/A3-Antistasi/Missions/DES_Vehicle.sqf +++ b/A3-Antistasi/Missions/DES_Vehicle.sqf @@ -69,8 +69,14 @@ if (spawner getVariable _marcador == 0) then ["TaskFailed", ["", format ["AA Stolen in %1",_nombreDest]]] remoteExec ["BIS_fnc_showNotification",_lado]; }; [0,300*_bonus] remoteExec ["A3A_fnc_resourcesFIA",2]; - if (_lado == muyMalos) then {[0,3] remoteExec ["A3A_fnc_prestige",2]; [0,10*_bonus,_posicion] remoteExec ["A3A_fnc_citySupportChange",2]} else {[3,0] remoteExec ["A3A_fnc_prestige",2];[0,5*_bonus,_posicion] remoteExec ["A3A_fnc_citySupportChange",2]}; - [1200*_bonus] remoteExec ["A3A_fnc_timingCA",2]; + if (_lado == muyMalos) then { + [0,3] remoteExec ["A3A_fnc_prestige",2]; + [0,10*_bonus,_posicion,"Mission: Destroy/Capture Armor vs CSAT Won"] remoteExec ["A3A_fnc_citySupportChange",2]; + } else { + [3,0] remoteExec ["A3A_fnc_prestige",2]; + [0,5*_bonus,_posicion,"Mission: Destroy/Capture Armor vs NATO Won"] remoteExec ["A3A_fnc_citySupportChange",2]; + }; + [1200*_bonus, 600, "Mission: Destroy/Capture Armor Won"] remoteExec ["A3A_fnc_timingCA",2]; {if (_x distance _veh < 500) then {[10*_bonus,_x] call A3A_fnc_playerScoreAdd}} forEach (allPlayers - (entities "HeadlessClient_F")); [5*_bonus,theBoss] call A3A_fnc_playerScoreAdd; }; @@ -79,8 +85,8 @@ else { ["DES",[format ["We know an enemy armor (%4) is stationed in a %1. It is a good chance to steal or destroy it before it causes more damage. Do it before %2:%3.",_nombredest,numberToDate [2035,_fechalimnum] select 3,numberToDate [2035,_fechalimnum] select 4,getText (configFile >> "CfgVehicles" >> (_tipoVeh) >> "displayName")],"Steal or Destroy Armor",_marcador],_posicion,"FAILED","Destroy"] call A3A_fnc_taskUpdate; [-5*_bonus,-100*_bonus] remoteExec ["A3A_fnc_resourcesFIA",2]; - [5*_bonus,0,_posicion] remoteExec ["A3A_fnc_citySupportChange",2]; - [-600*_bonus] remoteExec ["A3A_fnc_timingCA",2]; + [5*_bonus,0,_posicion,"Mission: Destroy/Capture Armor Failed"] remoteExec ["A3A_fnc_citySupportChange",2]; + [-1200*_bonus, 600, "Mission: Destroy/Capture Armor Failed"] remoteExec ["A3A_fnc_timingCA",2]; [-10*_bonus,theBoss] call A3A_fnc_playerScoreAdd; }; diff --git a/A3-Antistasi/Missions/LOG_Ammo.sqf b/A3-Antistasi/Missions/LOG_Ammo.sqf index dc257e44ae..fba48408a5 100644 --- a/A3-Antistasi/Missions/LOG_Ammo.sqf +++ b/A3-Antistasi/Missions/LOG_Ammo.sqf @@ -71,7 +71,7 @@ if ((spawner getVariable _marcador != 2) and !(lados getVariable [_marcador,side if (dateToNumber date > _fechalimnum) then { ["LOG",[format ["We've spotted an Ammotruck in an %1. Go there and destroy or steal it before %2:%3.",_nombredest,numberToDate [2035,_fechalimnum] select 3,numberToDate [2035,_fechalimnum] select 4],"Steal or Destroy Ammotruck",_marcador],_posicion,"FAILED","rearm"] call A3A_fnc_taskUpdate; - [-1200*_bonus] remoteExec ["A3A_fnc_timingCA",2]; + [-1500*_bonus, 600, "Misson: Destroy Ammotruck Failed"] remoteExec ["A3A_fnc_timingCA",2]; [-10*_bonus,theBoss] call A3A_fnc_playerScoreAdd; }; if ((not alive _camion) or ({(_x getVariable ["spawner",false]) and (side group _x == buenos)} count crew _camion > 0)) then @@ -83,7 +83,7 @@ if ((spawner getVariable _marcador != 2) and !(lados getVariable [_marcador,side [getPosASL _camion,_lado,"",false] spawn A3A_fnc_patrolCA; ["LOG",[format ["We've spotted an Ammotruck in an %1. Go there and destroy or steal it before %2:%3.",_nombredest,numberToDate [2035,_fechalimnum] select 3,numberToDate [2035,_fechalimnum] select 4],"Steal or Destroy Ammotruck",_marcador],_posicion,"SUCCEEDED","rearm"] call A3A_fnc_taskUpdate; [0,300*_bonus] remoteExec ["A3A_fnc_resourcesFIA",2]; - [1200*_bonus] remoteExec ["A3A_fnc_timingCA",2]; + [900*_bonus, 600, "Misson: Destroy Ammotruck Won"] remoteExec ["A3A_fnc_timingCA",2]; {if (_x distance _camion < 500) then {[10*_bonus,_x] call A3A_fnc_playerScoreAdd}} forEach (allPlayers - (entities "HeadlessClient_F")); [5*_bonus,theBoss] call A3A_fnc_playerScoreAdd; }; @@ -91,7 +91,7 @@ if ((spawner getVariable _marcador != 2) and !(lados getVariable [_marcador,side else { ["LOG",[format ["We've spotted an Ammotruck in an %1. Go there and destroy or steal it before %2:%3.",_nombredest,numberToDate [2035,_fechalimnum] select 3,numberToDate [2035,_fechalimnum] select 4],"Steal or Destroy Ammotruck",_marcador],_posicion,"FAILED","rearm"] call A3A_fnc_taskUpdate; - [-1200*_bonus] remoteExec ["A3A_fnc_timingCA",2]; + [-1200*_bonus, 900, "Misson: Destroy Ammotruck Failed"] remoteExec ["A3A_fnc_timingCA",2]; [-10*_bonus,theBoss] call A3A_fnc_playerScoreAdd; }; diff --git a/A3-Antistasi/Missions/LOG_Bank.sqf b/A3-Antistasi/Missions/LOG_Bank.sqf index 945ded30ac..dcdc4dd4c9 100644 --- a/A3-Antistasi/Missions/LOG_Bank.sqf +++ b/A3-Antistasi/Missions/LOG_Bank.sqf @@ -71,14 +71,14 @@ _bonus = if (_dificil) then {2} else {1}; if ((dateToNumber date > _fechalimnum) or (!alive _camion)) then { ["LOG",[format ["We know Gendarmes is guarding a big amount of money in the bank of %1. Take this truck and go there before %2:%3, hold the truck close to tha bank's main entrance for 2 minutes and the money will be transferred to the truck. Bring it back to HQ and the money will be ours.",_nombredest,numberToDate [2035,_fechalimnum] select 3,numberToDate [2035,_fechalimnum] select 4],"Bank Robbery",_mrkfin],_posicion,"FAILED","Interact"] call A3A_fnc_taskUpdate; - [-1800*_bonus] remoteExec ["A3A_fnc_timingCA",2]; + // TODO: sort timingCA here [-10*_bonus,theBoss] call A3A_fnc_playerScoreAdd; } else { _cuenta = 120*_bonus;//120 [[_posicion,malos,"",true],"A3A_fnc_patrolCA"] remoteExec ["A3A_fnc_scheduler",2]; - [10*_bonus,-20*_bonus,_marcador] remoteExec ["A3A_fnc_citySupportChange",2]; + [10*_bonus,-20*_bonus,_marcador,"Mission: Steal From Bank Started"] remoteExec ["A3A_fnc_citySupportChange",2]; ["TaskFailed", ["", format ["Bank of %1 being assaulted",_nombredest]]] remoteExec ["BIS_fnc_showNotification",malos]; {_amigo = _x; if (_amigo distance _camion < 300) then @@ -124,7 +124,7 @@ if ((_camion distance _posbase < 50) and (dateToNumber date < _fechalimnum)) the ["LOG",[format ["We know Gendarmes is guarding a big amount of money in the bank of %1. Take this truck and go there before %2:%3, hold the truck close to tha bank's main entrance for 2 minutes and the money will be transferred to the truck. Bring it back to HQ and the money will be ours.",_nombredest,numberToDate [2035,_fechalimnum] select 3,numberToDate [2035,_fechalimnum] select 4],"Bank Robbery",_mrkfin],_posicion,"SUCCEEDED","Interact"] call A3A_fnc_taskUpdate; [0,5000*_bonus] remoteExec ["A3A_fnc_resourcesFIA",2]; [10*_bonus,0] remoteExec ["A3A_fnc_prestige",2]; - [1800*_bonus] remoteExec ["A3A_fnc_timingCA",2]; + // TODO: timingCA here {if (_x distance _camion < 500) then {[10*_bonus,_x] call A3A_fnc_playerScoreAdd}} forEach (allPlayers - (entities "HeadlessClient_F")); [5*_bonus,theBoss] call A3A_fnc_playerScoreAdd; waitUntil {sleep 1; speed _camion == 0}; @@ -134,7 +134,7 @@ if ((_camion distance _posbase < 50) and (dateToNumber date < _fechalimnum)) the if (!alive _camion) then { ["LOG",[format ["We know Gendarmes is guarding a big amount of money in the bank of %1. Take this truck and go there before %2:%3, hold the truck close to tha bank's main entrance for 2 minutes and the money will be transferred to the truck. Bring it back to HQ and the money will be ours.",_nombredest,numberToDate [2035,_fechalimnum] select 3,numberToDate [2035,_fechalimnum] select 4],"Bank Robbery",_mrkfin],_posicion,"FAILED","Interact"] call A3A_fnc_taskUpdate; - [1800*_bonus] remoteExec ["A3A_fnc_timingCA",2]; + // TODO: timingCA here. [-10*_bonus,theBoss] call A3A_fnc_playerScoreAdd; }; diff --git a/A3-Antistasi/Missions/LOG_Suministros.sqf b/A3-Antistasi/Missions/LOG_Suministros.sqf index 50d448d4db..b0c64cafb4 100644 --- a/A3-Antistasi/Missions/LOG_Suministros.sqf +++ b/A3-Antistasi/Missions/LOG_Suministros.sqf @@ -48,7 +48,7 @@ _bonus = if (_dificil) then {2} else {1}; if ((dateToNumber date > _fechalimnum) or (isNull _camion)) then { ["LOG",[_taskDescription,"City Supplies",_marcador],_posicion,"FAILED","Heal"] call A3A_fnc_taskUpdate; - [5*_bonus,-5*_bonus,_posicion] remoteExec ["A3A_fnc_citySupportChange",2]; + [5*_bonus,-5*_bonus,_posicion,"Mission: Supplies Failed"] remoteExec ["A3A_fnc_citySupportChange",2]; [-10*_bonus,theBoss] call A3A_fnc_playerScoreAdd; } else @@ -94,13 +94,13 @@ else {if (_x distance _posicion < 500) then {[10*_bonus,_x] call A3A_fnc_playerScoreAdd}} forEach (allPlayers - (entities "HeadlessClient_F")); [5*_bonus,theBoss] call A3A_fnc_playerScoreAdd; if (!isMultiplayer) then {_bonus = _bonus + ((20-skillFIA)*0.1)}; - [-1*(20-skillFIA),15*_bonus,_marcador] remoteExec ["A3A_fnc_citySupportChange",2]; + [-1*(20-skillFIA),15*_bonus,_marcador,"Mission: Supplies Won"] remoteExec ["A3A_fnc_citySupportChange",2]; [-3,0] remoteExec ["A3A_fnc_prestige",2]; } else { ["LOG",[_taskDescription,"City Supplies",_marcador],_posicion,"FAILED","Heal"] call A3A_fnc_taskUpdate; - [5*_bonus,-5*_bonus,_posicion] remoteExec ["A3A_fnc_citySupportChange",2]; + [5*_bonus,-5*_bonus,_posicion,"Mission: Supplies Failed"] remoteExec ["A3A_fnc_citySupportChange",2]; [-10*_bonus,theBoss] call A3A_fnc_playerScoreAdd; }; }; diff --git a/A3-Antistasi/Missions/REP_Antena.sqf b/A3-Antistasi/Missions/REP_Antena.sqf index 3880c6947f..399cabce80 100644 --- a/A3-Antistasi/Missions/REP_Antena.sqf +++ b/A3-Antistasi/Missions/REP_Antena.sqf @@ -45,7 +45,7 @@ if (spawner getVariable _marcador != 2) then { ["REP",[format ["%4 is rebuilding a radio tower in %1. If we want to keep up the enemy comms breakdown, the work must be stopped. Destroy the repair truck parked nearby or capture the zone. Work will be finished on %2:%3.",_nombredest,numberToDate [2035,_fechalimnum] select 3,numberToDate [2035,_fechalimnum] select 4,nameMalos],"Tower Rebuild Disrupt",_marcador],_posicion,"SUCCEEDED","Destroy"] call A3A_fnc_taskUpdate; [2,0] remoteExec ["A3A_fnc_prestige",2]; - [1200] remoteExec ["A3A_fnc_timingCA",2]; + [1200, 600, "Misson: Stop rebuilding Antenna Won"] remoteExec ["A3A_fnc_timingCA",2]; {if (_x distance _veh < 500) then {[10,_x] call A3A_fnc_playerScoreAdd}} forEach (allPlayers - (entities "HeadlessClient_F")); [5,theBoss] call A3A_fnc_playerScoreAdd; }; @@ -56,7 +56,7 @@ if (dateToNumber date > _fechalimnum) then { ["REP",[format ["%4 is rebuilding a radio tower in %1. If we want to keep up the enemy comms breakdown, the work must be stopped. Destroy the repair truck parked nearby or capture the zone. Work will be finished on %2:%3.",_nombredest,numberToDate [2035,_fechalimnum] select 3,numberToDate [2035,_fechalimnum] select 4,nameMalos],"Tower Rebuild Disrupt",_marcador],_posicion,"SUCCEEDED","Destroy"] call A3A_fnc_taskUpdate; [2,0] remoteExec ["A3A_fnc_prestige",2]; - [1200] remoteExec ["A3A_fnc_timingCA",2]; + [1200, 600, "Misson: Stop rebuilding Antenna Won"] remoteExec ["A3A_fnc_timingCA",2]; {if (_x distance _veh < 500) then {[10,_x] call A3A_fnc_playerScoreAdd}} forEach (allPlayers - (entities "HeadlessClient_F")); [5,theBoss] call A3A_fnc_playerScoreAdd; } @@ -64,7 +64,7 @@ if (dateToNumber date > _fechalimnum) then { ["REP",[format ["%4 is rebuilding a radio tower in %1. If we want to keep up the enemy comms breakdown, the work must be stopped. Destroy the repair truck parked nearby or capture the zone. Work will be finished on %2:%3.",_nombredest,numberToDate [2035,_fechalimnum] select 3,numberToDate [2035,_fechalimnum] select 4,nameMalos],"Tower Rebuild Disrupt",_marcador],_posicion,"FAILED","Destroy"] call A3A_fnc_taskUpdate; //[5,0,_posicion] remoteExec ["A3A_fnc_citySupportChange",2]; - [-600] remoteExec ["A3A_fnc_timingCA",2]; + [-2400, 600, "Misson: Stop rebuilding Antenna Failed"] remoteExec ["A3A_fnc_timingCA",2]; [-10,theBoss] call A3A_fnc_playerScoreAdd; }; antenasMuertas = antenasMuertas - [_posicion]; publicVariable "antenasMuertas"; diff --git a/A3-Antistasi/Missions/RES_Prisioneros.sqf b/A3-Antistasi/Missions/RES_Prisioneros.sqf index e92aff294c..f57fd44f05 100644 --- a/A3-Antistasi/Missions/RES_Prisioneros.sqf +++ b/A3-Antistasi/Missions/RES_Prisioneros.sqf @@ -124,7 +124,7 @@ else _hr = 2 * (_cuenta); _resourcesFIA = 100 * _cuenta*_bonus; [_hr,_resourcesFIA] remoteExec ["A3A_fnc_resourcesFIA",2]; - [0,10*_bonus,_posicion] remoteExec ["A3A_fnc_citySupportChange",2]; + [0,10*_bonus,_posicion,"Mission: Rescue Won"] remoteExec ["A3A_fnc_citySupportChange",2]; //[_cuenta,0] remoteExec ["A3A_fnc_prestige",2]; {if (_x distance getMarkerPos respawnBuenos < 500) then {[_cuenta,_x] call A3A_fnc_playerScoreAdd}} forEach (allPlayers - (entities "HeadlessClient_F")); [round (_cuenta*_bonus/2),theBoss] call A3A_fnc_playerScoreAdd; diff --git a/A3-Antistasi/Missions/ataqueHQ.sqf b/A3-Antistasi/Missions/ataqueHQ.sqf index 0f58a66954..6ed0a130ef 100644 --- a/A3-Antistasi/Missions/ataqueHQ.sqf +++ b/A3-Antistasi/Missions/ataqueHQ.sqf @@ -84,6 +84,8 @@ else ["DEF_HQ1",[format ["We know %2 HQ coordinates. We have sent a SpecOp Squad in order to kill his leader %1. Help the SpecOp team",name petros,nameBuenos],format ["Kill %1",name petros],respawnBuenos],_posicion,"FAILED"] call A3A_fnc_taskUpdate; [0,3] remoteExec ["A3A_fnc_prestige",2]; [0,300] remoteExec ["A3A_fnc_resourcesFIA",2]; + // TODO: sort timingCA here + //[1200, 1200, "Mission: Kill Spec Ops Won"] remoteExec ["A3A_fnc_timingCA",2]; //[-5,5,_posicion] remoteExec ["A3A_fnc_citySupportChange",2]; {if (isPlayer _x) then {[10,_x] call A3A_fnc_playerScoreAdd}} forEach ([500,0,_posicion,buenos] call A3A_fnc_distanceUnits); }; diff --git a/A3-Antistasi/Missions/underAttack.sqf b/A3-Antistasi/Missions/underAttack.sqf index 6b455fdd00..f8eebc143f 100644 --- a/A3-Antistasi/Missions/underAttack.sqf +++ b/A3-Antistasi/Missions/underAttack.sqf @@ -13,7 +13,7 @@ _nombreEny = if (_sideEny == buenos) then _lado = _this select 2; if (_lado == buenos) then {_lado = [buenos,civilian]}; -[_lado,_marcador,[format ["%2 is attacking us in %1. Help the defense if you can",_nombreDest,_nombreEny],format ["%1 Contact Rep",_nombreEny],_marcador],getMarkerPos _marcador,false,0,true,"Defend",true] call BIS_fnc_taskCreate; +[_lado,_marcador,[format ["Contact with %2 reported at %1.",_nombreDest,_nombreEny],format ["%1 Contact Report",_nombreEny],_marcador],getMarkerPos _marcador,false,0,true,"Defend",true] call BIS_fnc_taskCreate; if (_lado isEqualType []) then {_lado = buenos}; diff --git a/A3-Antistasi/Municion/arsenalManage.sqf b/A3-Antistasi/Municion/arsenalManage.sqf index 7811844d75..42a52549c0 100644 --- a/A3-Antistasi/Municion/arsenalManage.sqf +++ b/A3-Antistasi/Municion/arsenalManage.sqf @@ -1,157 +1,140 @@ if (!isServer) exitWith {}; #include "\A3\Ui_f\hpp\defineResinclDesign.inc" -private ["_armas","_mochis","_items","_magazines","_arma","_magazine","_index","_mochi","_item","_optics","_nv"]; -_updated = ""; /* (jna_dataList select IDC_RSCDISPLAYARSENAL_TAB_UNIFORM) - IDC_RSCDISPLAYARSENAL_TAB_CARGOMISC\ + IDC_RSCDISPLAYARSENAL_TAB_CARGOMISC\ */ ["buttonInvToJNA"] call jn_fnc_arsenal; -_armas = ((jna_dataList select IDC_RSCDISPLAYARSENAL_TAB_PRIMARYWEAPON) + (jna_dataList select IDC_RSCDISPLAYARSENAL_TAB_HANDGUN) + (jna_dataList select IDC_RSCDISPLAYARSENAL_TAB_CARGOTHROW) + /*(jna_dataList select IDC_RSCDISPLAYARSENAL_TAB_CARGOPUT) + */(jna_dataList select IDC_RSCDISPLAYARSENAL_TAB_SECONDARYWEAPON)) select {_x select 1 != -1}; +private _armas = ((jna_dataList select IDC_RSCDISPLAYARSENAL_TAB_PRIMARYWEAPON) + (jna_dataList select IDC_RSCDISPLAYARSENAL_TAB_HANDGUN) + (jna_dataList select IDC_RSCDISPLAYARSENAL_TAB_CARGOTHROW) + /*(jna_dataList select IDC_RSCDISPLAYARSENAL_TAB_CARGOPUT) + */(jna_dataList select IDC_RSCDISPLAYARSENAL_TAB_SECONDARYWEAPON)) select {_x select 1 != -1}; //_magazines = ((jna_dataList select IDC_RSCDISPLAYARSENAL_TAB_CARGOMAG) + (jna_dataList select IDC_RSCDISPLAYARSENAL_TAB_CARGOMAGALL)) select {_x select 1 == -1}; -_mochis = (jna_dataList select IDC_RSCDISPLAYARSENAL_TAB_BACKPACK) select {_x select 1 != -1}; -_items = ((jna_dataList select IDC_RSCDISPLAYARSENAL_TAB_HEADGEAR) + (jna_dataList select IDC_RSCDISPLAYARSENAL_TAB_VEST) + (jna_dataList select IDC_RSCDISPLAYARSENAL_TAB_GOGGLES) + (jna_dataList select IDC_RSCDISPLAYARSENAL_TAB_MAP) + (jna_dataList select IDC_RSCDISPLAYARSENAL_TAB_GPS) + (jna_dataList select IDC_RSCDISPLAYARSENAL_TAB_RADIO) + (jna_dataList select IDC_RSCDISPLAYARSENAL_TAB_COMPASS) + (jna_dataList select IDC_RSCDISPLAYARSENAL_TAB_WATCH) + (jna_dataList select IDC_RSCDISPLAYARSENAL_TAB_ITEMACC) + (jna_dataList select IDC_RSCDISPLAYARSENAL_TAB_ITEMMUZZLE) + (jna_dataList select IDC_RSCDISPLAYARSENAL_TAB_ITEMBIPOD) + (jna_dataList select IDC_RSCDISPLAYARSENAL_TAB_BINOCULARS)) select {_x select 1 != -1}; -_optics = (jna_dataList select IDC_RSCDISPLAYARSENAL_TAB_ITEMOPTIC) select {_x select 1 != -1}; -_nv = (jna_dataList select IDC_RSCDISPLAYARSENAL_TAB_NVGS) select {_x select 1 != -1}; +private _mochis = (jna_dataList select IDC_RSCDISPLAYARSENAL_TAB_BACKPACK) select {_x select 1 != -1}; +private _items = ((jna_dataList select IDC_RSCDISPLAYARSENAL_TAB_HEADGEAR) + (jna_dataList select IDC_RSCDISPLAYARSENAL_TAB_VEST) + (jna_dataList select IDC_RSCDISPLAYARSENAL_TAB_GOGGLES) + (jna_dataList select IDC_RSCDISPLAYARSENAL_TAB_MAP) + (jna_dataList select IDC_RSCDISPLAYARSENAL_TAB_GPS) + (jna_dataList select IDC_RSCDISPLAYARSENAL_TAB_RADIO) + (jna_dataList select IDC_RSCDISPLAYARSENAL_TAB_COMPASS) + (jna_dataList select IDC_RSCDISPLAYARSENAL_TAB_WATCH) + (jna_dataList select IDC_RSCDISPLAYARSENAL_TAB_ITEMACC) + (jna_dataList select IDC_RSCDISPLAYARSENAL_TAB_ITEMMUZZLE) + (jna_dataList select IDC_RSCDISPLAYARSENAL_TAB_ITEMBIPOD) + (jna_dataList select IDC_RSCDISPLAYARSENAL_TAB_BINOCULARS)) select {_x select 1 != -1}; +private _optics = (jna_dataList select IDC_RSCDISPLAYARSENAL_TAB_ITEMOPTIC) select {_x select 1 != -1}; +private _nv = (jna_dataList select IDC_RSCDISPLAYARSENAL_TAB_NVGS) select {_x select 1 != -1}; -_check = false; +private _updated = ""; +private _check = false; { -if (_x select 1 >= minWeaps) then - { - _arma = _x select 0; - if !(_arma in mlaunchers) then - { - _magazine = (getArray (configFile / "CfgWeapons" / _arma / "magazines") select 0); - if (!isNil "_magazine") then - { - if (not(_magazine in unlockedMagazines)) then - { - unlockedMagazines pushBack _magazine; - _updated = format ["%1%2
",_updated,getText (configFile >> "CfgMagazines" >> _magazine >> "displayName")]; - _index = _magazine call jn_fnc_arsenal_itemType; - [_index,_magazine,-1] call jn_fnc_arsenal_addItem; - }; - }; - unlockedWeapons pushBack _arma; - //lockedWeapons = lockedWeapons - [_arma]; - if (_arma in arifles) then - { - unlockedRifles pushBack _arma; publicVariable "unlockedRifles"; - if (count (getArray (configfile >> "CfgWeapons" >> _arma >> "muzzles")) == 2) then - { - unlockedGL pushBack _arma; publicVariable "unlockedGL"; - }; - } - else - { - if (_arma in mguns) then - { - unlockedMG pushBack _arma; publicVariable "unlockedMG"; - } - else - { - if (_arma in srifles) then - { - unlockedSN pushBack _arma; publicVariable "unlockedSN"; - } - else - { - if (_arma in ((rlaunchers + mlaunchers) select {(getNumber (configfile >> "CfgWeapons" >> _x >> "lockAcquire") == 0)})) then - { - unlockedAT pushBack _arma; publicVariable "unlockedAT"; - } - else - { - if (_arma in (mlaunchers select {(getNumber (configfile >> "CfgWeapons" >> _x >> "lockAcquire") == 1)})) then {unlockedAA pushBack _arma; publicVariable "unlockedAA"}; - }; - }; - }; - }; - _updated = format ["%1%2
",_updated,getText (configFile >> "CfgWeapons" >> _arma >> "displayName")]; - _index = _arma call jn_fnc_arsenal_itemType; - [_index,_arma,-1] call jn_fnc_arsenal_addItem; - }; - }; + if (_x select 1 >= minWeaps) then { + private _arma = _x select 0; + if !(_arma in mlaunchers) then { + // Unlock all mags, could unlock based on numbers instead? + private _mags = getArray (configFile / "CfgWeapons" / _arma / "magazines"); + { + private _magazine = _x; + if (not(_magazine in unlockedMagazines)) then { + unlockedMagazines pushBack _magazine; + _updated = format ["%1%2
", _updated, getText (configFile >> "CfgMagazines" >> _magazine >> "displayName")]; + private _index = _magazine call jn_fnc_arsenal_itemType; + [_index,_magazine,-1] call jn_fnc_arsenal_addItem; + }; + } forEach _mags; + + unlockedWeapons pushBack _arma; + + if (_arma in arifles) then { + unlockedRifles pushBack _arma; publicVariable "unlockedRifles"; + if (count (getArray (configfile >> "CfgWeapons" >> _arma >> "muzzles")) == 2) then { + unlockedGL pushBack _arma; publicVariable "unlockedGL"; + }; + } else { + if (_arma in mguns) then { + unlockedMG pushBack _arma; publicVariable "unlockedMG"; + } else { + if (_arma in srifles) then { + unlockedSN pushBack _arma; publicVariable "unlockedSN"; + } else { + if (_arma in ((rlaunchers + mlaunchers) select {(getNumber (configfile >> "CfgWeapons" >> _x >> "lockAcquire") == 0)})) then { + unlockedAT pushBack _arma; publicVariable "unlockedAT"; + } else { + if (_arma in (mlaunchers select {(getNumber (configfile >> "CfgWeapons" >> _x >> "lockAcquire") == 1)})) then { + unlockedAA pushBack _arma; publicVariable "unlockedAA"; + }; + }; + }; + }; + }; + _updated = format ["%1%2
",_updated,getText (configFile >> "CfgWeapons" >> _arma >> "displayName")]; + private _index = _arma call jn_fnc_arsenal_itemType; + [_index,_arma,-1] call jn_fnc_arsenal_addItem; + }; + }; } forEach _armas; -if (_check) then - { - publicVariable "unlockedWeapons"; - publicVariable "unlockedMagazines"; - _check = false; - }; +if (_check) then { + publicVariable "unlockedWeapons"; + publicVariable "unlockedMagazines"; + _check = false; +}; { -if (_x select 1 >= minWeaps) then - { - _mochi = _x select 0; - _index = _mochi call jn_fnc_arsenal_itemType; - [_index,_mochi,-1] call jn_fnc_arsenal_addItem; - _updated = format ["%1%2
",_updated,getText (configFile >> "CfgVehicles" >> _mochi >> "displayName")]; - unlockedBackpacks pushBack _mochi; - publicVariable "unlockedBackpacks"; - }; + if (_x select 1 >= minWeaps) then { + private _mochi = _x select 0; + private _index = _mochi call jn_fnc_arsenal_itemType; + [_index,_mochi,-1] call jn_fnc_arsenal_addItem; + _updated = format ["%1%2
",_updated,getText (configFile >> "CfgVehicles" >> _mochi >> "displayName")]; + unlockedBackpacks pushBack _mochi; + publicVariable "unlockedBackpacks"; + }; } forEach _mochis; { -if (_x select 1 >= minWeaps) then - { - _item = _x select 0; - unlockedItems pushBack _item; - _updated = format ["%1%2
",_updated,getText (configFile >> "CfgWeapons" >> _item >> "displayName")]; - _check = true; - _index = _item call jn_fnc_arsenal_itemType; - [_index,_item,-1] call jn_fnc_arsenal_addItem; - }; + if (_x select 1 >= minWeaps) then { + private _item = _x select 0; + unlockedItems pushBack _item; + _updated = format ["%1%2
",_updated,getText (configFile >> "CfgWeapons" >> _item >> "displayName")]; + _check = true; + private _index = _item call jn_fnc_arsenal_itemType; + [_index,_item,-1] call jn_fnc_arsenal_addItem; + }; } forEach _items; -if (_check) then - { - publicVariable "unlockedItems"; - if (!haveRadio) then {if ("ItemRadio" in unlockedItems) then {haveRadio = true; publicVariable "haveRadio"}}; - _check = false; - }; +if (_check) then { + publicVariable "unlockedItems"; + if (!haveRadio and "ItemRadio" in unlockedItems) then { + haveRadio = true; publicVariable "haveRadio"; + }; + _check = false; +}; + { -if (_x select 1 >= minWeaps) then - { - _item = _x select 0; - unlockedOptics pushBack _item; - unlockedOptics = [unlockedOptics,[],{getNumber (configfile >> "CfgWeapons" >> _x >> "ItemInfo" >> "mass")},"DESCEND"] call BIS_fnc_sortBy; - unlockedItems pushBack _item; - _updated = format ["%1%2
",_updated,getText (configFile >> "CfgWeapons" >> _item >> "displayName")]; - _check = true; - _index = _item call jn_fnc_arsenal_itemType; - [_index,_item,-1] call jn_fnc_arsenal_addItem; - }; + if (_x select 1 >= minWeaps) then { + private _item = _x select 0; + unlockedOptics pushBack _item; + unlockedOptics = [unlockedOptics,[],{getNumber (configfile >> "CfgWeapons" >> _x >> "ItemInfo" >> "mass")},"DESCEND"] call BIS_fnc_sortBy; + unlockedItems pushBack _item; + _updated = format ["%1%2
",_updated,getText (configFile >> "CfgWeapons" >> _item >> "displayName")]; + _check = true; + private _index = _item call jn_fnc_arsenal_itemType; + [_index,_item,-1] call jn_fnc_arsenal_addItem; + }; } forEach _optics; -if (_check) then - { - publicVariable "unlockedOptics"; - publicVariable "unlockedItems"; - _check = false; - }; +if (_check) then { + publicVariable "unlockedOptics"; + publicVariable "unlockedItems"; + _check = false; +}; + +if (!haveNV) then { + private _cuenta = 0; + { + _cuenta = _cuenta + (_x select 1); + } forEach _nv; -if (!haveNV) then - { - _cuenta = 0; - { - _cuenta = _cuenta + (_x select 1); - } forEach _nv; - if (_cuenta >= minWeaps) then - { - unlockedItems = unlockedItems + NVGoggles; - haveNV = true; publicVariable "haveNV"; - publicVariable "unlockedItems"; - _updated = format ["%1%2
",_updated,getText (configFile >> "CfgWeapons" >> "NVGoggles" >> "displayName")]; - { - _index = _x call jn_fnc_arsenal_itemType; - [_index,_x,-1] call jn_fnc_arsenal_addItem; - }foreach NVGoggles; - }; - }; + if (_cuenta >= minWeaps) then { + unlockedItems = unlockedItems + NVGoggles; + haveNV = true; publicVariable "haveNV"; + publicVariable "unlockedItems"; + _updated = format ["%1%2
",_updated,getText (configFile >> "CfgWeapons" >> "NVGoggles" >> "displayName")]; + { + private _index = _x call jn_fnc_arsenal_itemType; + [_index,_x,-1] call jn_fnc_arsenal_addItem; + }foreach NVGoggles; + }; +}; _updated \ No newline at end of file diff --git a/A3-Antistasi/REINF/FIAinit.sqf b/A3-Antistasi/REINF/FIAinit.sqf index 36344ea2dc..6effe93571 100644 --- a/A3-Antistasi/REINF/FIAinit.sqf +++ b/A3-Antistasi/REINF/FIAinit.sqf @@ -8,7 +8,7 @@ _unit setVariable ["spawner",true,true]; _unit allowFleeing 0; _tipo = typeOf _unit; //_skill = if (_tipo in sdkTier1) then {(skillFIA * 0.2)} else {if (_tipo in sdkTier2) then {0.1 + (skillFIA * 0.2)} else {0.1 + (skillFIA * 0.2)}}; -_skill = skillFIA * 0.05 * skillMult; +_skill = skillFIA * 0.05; if (!activeGREF) then {if (not((uniform _unit) in uniformsSDK)) then {[_unit] call A3A_fnc_reDress}}; if ((!isMultiplayer) and (leader _unit == theBoss)) then {_skill = _skill + 0.1}; @@ -219,7 +219,7 @@ if (player == leader _unit) then if !(hayIFA) then {arrayids pushBackUnique (name _muerto)}; if (side _killer == malos) then { - _nul = [0.25,0,getPos _muerto] remoteExec ["A3A_fnc_citySupportChange",2]; + _nul = [0.25,0,getPos _muerto,"SDK Unit Killed"] remoteExec ["A3A_fnc_citySupportChange",2]; [-0.25,0] remoteExec ["A3A_fnc_prestige",2]; } else @@ -288,7 +288,7 @@ else { if (side _killer == malos) then { - _nul = [0.25,0,getPos _muerto] remoteExec ["A3A_fnc_citySupportChange",2]; + _nul = [0.25,0,getPos _muerto,"SDK Unit Killed"] remoteExec ["A3A_fnc_citySupportChange",2]; [-0.25,0] remoteExec ["A3A_fnc_prestige",2]; } else diff --git a/A3-Antistasi/REINF/addFIAveh.sqf b/A3-Antistasi/REINF/addFIAveh.sqf index 59eced51d8..fa060c9427 100644 --- a/A3-Antistasi/REINF/addFIAveh.sqf +++ b/A3-Antistasi/REINF/addFIAveh.sqf @@ -49,12 +49,12 @@ garageKeys = (findDisplay 46) displayAddEventHandler ["KeyDown", }; if (_this select 1 == 205) then { - garageVeh setDir (getDir garageVeh + 1); + garageVeh setDir (getDir garageVeh + 10); _handled = true; }; if (_this select 1 == 203) then { - garageVeh setDir (getDir garageVeh - 1); + garageVeh setDir (getDir garageVeh - 10); _handled = true; }; if (_salir) then @@ -92,7 +92,6 @@ onEachFrame if (_ins isEqualTo []) exitWith {}; _pos = (_ins select 0 select 0); if (_pos distance posicionSel < 0.1) exitWith {}; - posicionSel = _pos; _barco = false; if (garageVeh isKindOf "Ship") then {_pos set [2,0]; _barco = true}; if (count (_pos findEmptyPosition [0, 0, typeOf garageVeh])== 0) exitWith {garageVeh setPosASL [0,0,0]}; @@ -100,6 +99,7 @@ onEachFrame _agua = surfaceIsWater _pos; if (_barco and {!_agua}) exitWith {garageVeh setPosASL [0,0,0]}; if (!_barco and {_agua}) exitWith {garageVeh setPosASL [0,0,0]}; + posicionSel = _pos; garageVeh setPosASL _pos; garageVeh setVectorUp (_ins select 0 select 1); }; diff --git a/A3-Antistasi/REINF/addToGarrison.sqf b/A3-Antistasi/REINF/addToGarrison.sqf index e6196d0712..3867020bdd 100644 --- a/A3-Antistasi/REINF/addToGarrison.sqf +++ b/A3-Antistasi/REINF/addToGarrison.sqf @@ -145,7 +145,7 @@ else { if (side _killer == malos) then { - _nul = [0.25,0,getPos _muerto] remoteExec ["A3A_fnc_citySupportChange",2]; + _nul = [0.25,0,getPos _muerto,"SDK Garrison Unit Killed"] remoteExec ["A3A_fnc_citySupportChange",2]; [-0.25,0] remoteExec ["A3A_fnc_prestige",2]; } else diff --git a/A3-Antistasi/REINF/garrisonAdd.sqf b/A3-Antistasi/REINF/garrisonAdd.sqf index 522966227d..874500b9d6 100644 --- a/A3-Antistasi/REINF/garrisonAdd.sqf +++ b/A3-Antistasi/REINF/garrisonAdd.sqf @@ -39,9 +39,9 @@ _garrison = _garrison + (garrison getVariable [_marcador,[]]); _garrison pushBack _tipo; garrison setVariable [_marcador,_garrison,true]; //[_marcador] call A3A_fnc_mrkUpdate;*/ -_cuenta = count (garrison getVariable _marcador); +_cuenta = count (garrison getVariable [_marcador,[]]); [_tipo,buenos,_marcador,1] remoteExec ["A3A_fnc_garrisonUpdate",2]; -waitUntil {(_cuenta < count (garrison getVariable _marcador)) or (lados getVariable [_marcador,sideUnknown] != buenos)}; +waitUntil {(_cuenta < count (garrison getVariable [_marcador,[]])) or (lados getVariable [_marcador,sideUnknown] != buenos)}; if (lados getVariable [_marcador,sideUnknown] == buenos) then { diff --git a/A3-Antistasi/Revive/actionRevive.sqf b/A3-Antistasi/Revive/actionRevive.sqf index c56b476eb4..6403b82ae8 100644 --- a/A3-Antistasi/Revive/actionRevive.sqf +++ b/A3-Antistasi/Revive/actionRevive.sqf @@ -18,24 +18,28 @@ if !(alive _curado) exitWith _healed }; if !([_curandero] call A3A_fnc_canFight) exitWith {if (_player) then {hint "You are not able to revive anyone"};_healed}; -if ((not("FirstAidKit" in (items _curandero))) and (not("FirstAidKit" in (items _curado)))) exitWith - { - if (_player) then {hint format ["You or %1 need a First Aid Kit to be able to revive",name _curado]}; - if (_inPlayerGroup) then {_curandero groupChat "I'm out of FA kits!"}; - _healed - }; -if ((not("FirstAidKit" in (items _curandero))) and !(_curandero canAdd "FirstAidKit")) exitWith - { - if (_player) then {hint format ["%1 has a First Aid Kit but you do not have enough space in your inventory to use it",name _curado]}; - if (_inPlayerGroup) then {_curandero groupChat "I'm out of FA kits!"}; - _healed - }; -if ((([_curado] call A3A_fnc_fatalWound)) and !([_curandero] call A3A_fnc_isMedic)) exitWith - { - if (_player) then {hint format ["%1 is injured by a fatal wound, only a medic can revive him",name _curado]}; - if (_inPlayerGroup) then {_curandero groupChat format ["%1 is injured by a fatal wound, only a medic can revive him",name _curado]}; - _healed - }; + +if !(easyRevive) then { + if ((not("FirstAidKit" in (items _curandero))) and (not("FirstAidKit" in (items _curado)))) exitWith + { + if (_player) then {hint format ["You or %1 need a First Aid Kit to be able to revive",name _curado]}; + if (_inPlayerGroup) then {_curandero groupChat "I'm out of FA kits!"}; + _healed + }; + if ((not("FirstAidKit" in (items _curandero))) and !(_curandero canAdd "FirstAidKit")) exitWith + { + if (_player) then {hint format ["%1 has a First Aid Kit but you do not have enough space in your inventory to use it",name _curado]}; + if (_inPlayerGroup) then {_curandero groupChat "I'm out of FA kits!"}; + _healed + }; + if ((([_curado] call A3A_fnc_fatalWound)) and !([_curandero] call A3A_fnc_isMedic)) exitWith + { + if (_player) then {hint format ["%1 is injured by a fatal wound, only a medic can revive him",name _curado]}; + if (_inPlayerGroup) then {_curandero groupChat format ["%1 is injured by a fatal wound, only a medic can revive him",name _curado]}; + _healed + }; +}; + if !(isNull attachedTo _curado) exitWith { if (_player) then {hint format ["%1 is being carried or transported and you cannot heal him",name _curado]}; @@ -54,27 +58,29 @@ if (_player) then _curado setVariable ["ayudado",_curandero,true]; }; _curandero setVariable ["ayudando",true]; -if (not("FirstAidKit" in (items _curandero))) then +if (!(easyRevive) and (not("FirstAidKit" in (items _curandero)))) then { _curandero addItem "FirstAidKit"; _curado removeItem "FirstAidKit"; }; -_timer = if ([_curado] call A3A_fnc_fatalWound) then + +_reviveDuration = if ([_curado] call A3A_fnc_fatalWound) then { - time + 35 + (random 20) + 35 + (random 20) } else { if ((!isMultiplayer and (isPlayer _curado)) or ([_curandero] call A3A_fnc_isMedic)) then { - time + 10 + (random 5) + 10 + (random 5) } else { - time + 15 + (random 10) + 15 + (random 10) }; }; +_timer = time + (_reviveDuration * reviveTimeMul); _curandero setVariable ["timeToHeal",_timer]; _curandero playMoveNow selectRandom medicAnims; diff --git a/A3-Antistasi/Revive/handleDamage.sqf b/A3-Antistasi/Revive/handleDamage.sqf index bac0e8e755..062f7d31c8 100644 --- a/A3-Antistasi/Revive/handleDamage.sqf +++ b/A3-Antistasi/Revive/handleDamage.sqf @@ -20,6 +20,7 @@ if (_part == "") then { _unit setVariable ["INCAPACITATED",true,true]; _unit setUnconscious true; + // ACE allows pulling people out of vehicles, so leave them in there if (vehicle _unit != _unit) then { moveOut _unit; @@ -110,6 +111,7 @@ else { _unit setVariable ["INCAPACITATED",true,true]; _unit setUnconscious true; + // ACE allows pulling people out of vehicles, so leave them in there if (vehicle _unit != _unit) then { //_unit action ["getOut", vehicle _unit]; @@ -128,6 +130,7 @@ else { _unit setVariable ["INCAPACITATED",true,true]; _unit setUnconscious true; + // ACE allows pulling people out of vehicles, so leave them in there if (vehicle _unit != _unit) then { moveOut _unit; diff --git a/A3-Antistasi/Revive/inconsciente.sqf b/A3-Antistasi/Revive/inconsciente.sqf index 53ca542e26..2c97393b8d 100644 --- a/A3-Antistasi/Revive/inconsciente.sqf +++ b/A3-Antistasi/Revive/inconsciente.sqf @@ -4,17 +4,17 @@ _unit = _this select 0; //if (damage _unit < 0.9) exitWith {}; //if (!local _unit) exitWith {}; //_unit setVariable ["inconsciente",true,true]; -_bleedOut = time + 300;//300 + +_bleedOutDuration = 300 * bleedoutTimeMul; _isPlayer = false; _jugadores = false; _inPlayerGroup = false; -_unit setBleedingremaining 300; _injurer = _this select 1; if (isPlayer _unit) then { _isPlayer = true; - if (!isMultiplayer) then {_bleedOut = time + 600};//50 + if (!isMultiplayer) then {_bleedOutDuration = 600 * bleedoutTimeMul};//50 _unit spawn { sleep 5; @@ -92,6 +92,8 @@ if (_isPlayer) then }; }; +_bleedOut = time + _bleedOutDuration; +_unit setBleedingremaining _bleedOutDuration; while {(time < _bleedOut) and (_unit getVariable ["INCAPACITATED",false]) and (alive _unit) and (!(_unit getVariable ["respawning",false]))} do { diff --git a/A3-Antistasi/Revive/inconscienteAAF.sqf b/A3-Antistasi/Revive/inconscienteAAF.sqf index ce63550f85..bf28398cf4 100644 --- a/A3-Antistasi/Revive/inconscienteAAF.sqf +++ b/A3-Antistasi/Revive/inconscienteAAF.sqf @@ -5,7 +5,7 @@ _injurer = _this select 1; //if (damage _unit < 0.9) exitWith {}; //if (!local _unit) exitWith {}; //_unit setVariable ["inconsciente",true,true]; -_bleedOut = if (surfaceIsWater (position _unit)) then {time + 60} else {time + 300};//300 +_bleedOut = if (surfaceIsWater (position _unit)) then {time + (60 * bleedoutTimeMul)} else {time + (300 * bleedoutTimeMul)};//300 _jugadores = false; _lado = side (group _unit); if ((side _injurer == buenos) and (_lado == malos)) then @@ -58,7 +58,7 @@ if (time >= _bleedOut) exitWith _skill = skill _injurer; [_injurer,_skill + 0.05] remoteExec ["setSkill",_injurer]; }; - [-1,1,getPos _unit] remoteExec ["A3A_fnc_citySupportChange",2]; + //[-1,1,getPos _unit] remoteExec ["A3A_fnc_citySupportChange",2]; switch (_lado) do { case malos: diff --git a/A3-Antistasi/Revive/respawn.sqf b/A3-Antistasi/Revive/respawn.sqf index 670548824b..ddd6c1eca3 100644 --- a/A3-Antistasi/Revive/respawn.sqf +++ b/A3-Antistasi/Revive/respawn.sqf @@ -29,7 +29,7 @@ _unit setVariable ["disfrazado",false]; _unit setVariable ["INCAPACITATED",false]; if (rating _unit < 0) then {_unit addRating (rating _unit * -1)}; -_nul = [0,-1,getPos _unit] remoteExec ["A3A_fnc_citySupportChange",2]; +_nul = [0,-1,getPos _unit,"Player Respawned"] remoteExec ["A3A_fnc_citySupportChange",2]; _hr = round ((server getVariable "hr") * 0.1); _resourcesFIA = round ((server getVariable "resourcesFIA") * 0.05); diff --git a/A3-Antistasi/Scripts/GOM/functions/VehicleTuning/GOM_fnc_FOGmachine.sqf b/A3-Antistasi/Scripts/GOM/functions/VehicleTuning/GOM_fnc_FOGmachine.sqf new file mode 100644 index 0000000000..194a5a6711 --- /dev/null +++ b/A3-Antistasi/Scripts/GOM/functions/VehicleTuning/GOM_fnc_FOGmachine.sqf @@ -0,0 +1,44 @@ +//GOM_fnc_FOGmachine.sqf +//by Grumpy Old Man +//V0.9 +params ["_veh"]; + +_rounds = _veh getVariable ['GOM_fnc_FogMachineRounds',0]; +if (_rounds <= 0) exitWith {true}; + _rounds = _rounds - 1; + _actionID = _veh getvariable ["GOM_fnc_FOGactionID",-1]; + _veh setUserActionText [_actionID, format ["Engage 'Fog' Machine (%1 Charges)",_rounds]]; + _veh setVariable ['GOM_fnc_FogMachineRounds',_rounds,true]; + + for "_i" from 0 to random [8,10,12] do { + + if !(alive _veh) exitWith {true}; + sleep 0.3; + _vel = velocity _veh; + _vel params ["_velX","_velY","_velZ"]; + _pos = getposatl _veh; + _rndsmoke = selectRandom ["SmokeShellBlue","SmokeShellGreen","SmokeShellOrange","SmokeShellYellow","SmokeShellPurple","SmokeShellRed","SmokeShell"]; + _pos set [2,((_pos select 2) + 3)]; + _smoke = _rndSmoke createVehicle _pos; + _delete = [_smoke] spawn { + params ["_smoke"]; + _deleteTime = time + 15; + waituntil {time > _deleteTime}; + if !(alive _smoke) exitWith {true}; + deletevehicle _smoke; + true + }; + _smoke setposatl _pos; + _smoke say3D "SN_Flare_Weapon_Fired"; + + _dir = random 360; + _smoke setVelocity [ + + _velX + (random [2,3,4] * (sin _dir)), + _velY + (random [2,3,4] * (cos _dir)), + _velZ + 15 + + ]; + + }; +true \ No newline at end of file diff --git a/A3-Antistasi/Scripts/GOM/functions/VehicleTuning/GOM_fnc_GPSTracker.sqf b/A3-Antistasi/Scripts/GOM/functions/VehicleTuning/GOM_fnc_GPSTracker.sqf new file mode 100644 index 0000000000..82c36fdbaf --- /dev/null +++ b/A3-Antistasi/Scripts/GOM/functions/VehicleTuning/GOM_fnc_GPSTracker.sqf @@ -0,0 +1,60 @@ +//GOM_fnc_GPSTracker.sqf +//by Grumpy Old Man +//V0.9 +params ["_car"]; + +_check = _car getvariable ["GOM_fnc_GPSTracker",true]; +_counter = 0; +_markers = []; +_markerTimes = []; + +while {alive _car} do { + + _lastmarkerpos = _car getvariable ["GOM_fnc_lastmarker",[0,0,0]]; + + if (getposATL _car distancesqr _lastmarkerpos > 5^2) then { + _markertype = ""; + + _text = format ["%1: %2km/h.",[((daytime)),"HH:MM"] call bis_fnc_timetostring,round speed _car]; + _car setvariable ["GOM_fnc_lastmarker",getposATL _car,true]; + _markertype = "hd_arrow"; + _marker = createMarker [str time,getPosATLVisual _car]; + _marker setMarkerShape "ICON"; + _marker setMarkerSize [1,1]; + _marker setMarkerType "hd_arrow"; + _marker setMarkerAlpha 1; + _marker setMarkerColor "ColorCiv"; + _marker setMarkerDir getdir _car; + + if (_counter isEqualTo 10) then {_counter = 0}; + if !(_counter isequalto 0) then {_text = ""}; + + _counter = _counter + 1; + _marker setmarkertext _text; + _markers pushback _marker; + _markerTimes pushback time; + + }; + + { + + _index = _markerTimes find _x; + + if (time - _x > 300) then { + + _marker = _markers select _index; + deleteMarkerLocal _marker; + _markers deleteAt _index; + _markerTimes deleteAT _index; + + }; + + + } foreach _markerTimes; + + _sleep = time + 2; + + waituntil {time > _sleep}; + +}; +true \ No newline at end of file diff --git a/A3-Antistasi/Scripts/GOM/functions/VehicleTuning/GOM_fnc_blowOff.sqf b/A3-Antistasi/Scripts/GOM/functions/VehicleTuning/GOM_fnc_blowOff.sqf new file mode 100644 index 0000000000..ec81680df8 --- /dev/null +++ b/A3-Antistasi/Scripts/GOM/functions/VehicleTuning/GOM_fnc_blowOff.sqf @@ -0,0 +1,18 @@ +params ["_veh"]; +_lockoutTime = 0.4; +_blowOffLockout = _veh getVariable ["GOM_fnc_blowOffLockout",0]; +if (time < _blowOffLockout + _lockoutTime) exitWith {false}; +_veh setVariable ["GOM_fnc_blowOffLockout",time]; +_sounds = ["GOM_VT_valve1","GOM_VT_valve2","GOM_VT_valve3","GOM_VT_valve4"]; +_crewPlayers = ((crew _veh) select {isPlayer _x}); +_rest = (allPlayers - [_crewPlayers]) select {_x distance2D _veh < 300}; + +_sound = selectRandom _sounds; + +//play 2d sound for everyone in the car +[_sound] remoteExec ["playSound",_crewPlayers]; + +//play 3d sound for those poor peasants outside the car +_pitch = 0.95 + random 0.1; +[_veh,[_sound,300,_pitch]] remoteExec ["say3D",_rest]; +true \ No newline at end of file diff --git a/A3-Antistasi/Scripts/GOM/functions/VehicleTuning/GOM_fnc_boost.sqf b/A3-Antistasi/Scripts/GOM/functions/VehicleTuning/GOM_fnc_boost.sqf new file mode 100644 index 0000000000..f1659e2f46 --- /dev/null +++ b/A3-Antistasi/Scripts/GOM/functions/VehicleTuning/GOM_fnc_boost.sqf @@ -0,0 +1,117 @@ +//this file is called by engine eventhandler and remoteexecd on the player client who's driving it +// + +_ID = addMissionEventHandler ["Draw3D",{ + + + _veh = vehicle player; + if (!isEngineOn _veh OR !alive _veh OR isNull driver _veh) exitWith {removeMissionEventHandler ["Draw3D",_thisEventHandler];}; + + if (player isEqualTo _veh OR {!isTouchingGround _veh}) exitWith {false}; + + _initMass = _veh getVariable ["GOM_fnc_initMass",1000]; + _boostMulti = _veh getvariable ['GOM_fnc_boostMulti',0]; + + _force = (_initMass * (_boostMulti / 9)) max 0; + _baseForce = _force; + + _maxSpeedMulti = _veh getvariable ["GOM_fnc_MaxSpeed",1]; + _maxSpeed = getNumber (configfile >> "CfgVehicles" >> typeOf _veh >> + "maxSpeed") * _maxSpeedMulti; + + _prefersRoads = (getNumber (configfile >> "CfgVehicles" >> typeOf _veh >> "preferRoads") > 0); + _isOnRoad = isOnRoad _veh; + + _forward = (["CarForward","CarFastForward","CarSlowForward"] findIf {inputAction _x > 0} >= 0); + + + + + if (inputAction "CarSlowForward" > 0) then { + + _force = _baseForce * 0.25; + + }; + + if (inputAction "CarForward" > 0) then { + + _force = _baseForce * 0.5; + + }; + + if (inputAction "CarFastForward" > 0) then { + + _force = _baseForce; + + }; + + + + _boost = inputAction "vehicleTurbo" > 0 AND _forward; + //add nitro option here + if (_boost) then { + + _force = _baseForce; + + }; + + + //surfaceCoefficient: + _surf = (surfaceType getPosATLVisual _veh); + _surfaceType = _surf select [1,count _surf]; + _surfaceCoef = getNumber (configfile >> "CfgSurfaces" >> _surfaceType >> "maxSpeedCoef"); + + _force = _force * _surfaceCoef; + + //now we tie force to rpm: + _idleRPM = getNumber (configfile >> "CfgVehicles" >> typeof _veh >> "idleRpm"); + _redRPM = getNumber (configfile >> "CfgVehicles" >> typeof _veh >> "redRpm"); + _currentRPM = _veh getSoundController "rpm"; + + _force = linearConversion [_idleRPM,_redRPM,_currentRPM,_force / 3,_force,true]; + _rpmForce = _force; + //also tie force to speed to emulate air resistance + _force = linearConversion [100,_maxSpeed,speed _veh,_force,_force * 0.65,true]; + _airForce = _force; + + if (_forward AND round speed _veh > 0 AND round speed _veh <= _maxSpeed) then { + _veh addForce [_veh vectorModelToWorldVisual [0,_force,0],[0,0,-1]]; + + }; + + if (inputAction "CarBack" > 0 AND speed _veh >= 1) then { + _brakeMulti = GOM_fnc_brakeParams apply {_x#1}; + _brakeForce = -75 * (_brakeMulti select (_veh getVariable ["GOM_fnc_brakeType",0])); + _veh addForce [_veh vectorModelToWorldVisual [0,_brakeForce,0],[0,0,-1]]; + + }; + + + //hintsilent format ["Boost Active: %1\nBase force: %2\nRPM force: %3\nAir+RPM force: %4\nForce applied: %5\nSurface Coef: %6",_boost,_baseForce,_rpmForce,_airForce,_force,_surfaceCoef]; + + //blowOff valve + + _lastFrameRPM = _veh getVariable ["GOM_fnc_lastFrameRPM",_redRPM]; + + + _blowOffToggle = _veh getVariable ["GOM_fnc_blowOffToggle",true]; + + if (_blowOffToggle AND {_currentRPM < (_lastFrameRPM)} AND (_veh getSoundController "thrust" > 0.3)) then { + + [_veh] spawn GOM_fnc_blowOff; + _veh setVariable ["GOM_fnc_blowOffToggle",false]; + }; + + if (_currentRPM > (_lastFrameRPM)) then { + + _veh setVariable ["GOM_fnc_blowOffToggle",true]; + + }; + + + _veh setVariable ["GOM_fnc_lastFrameRPM",_currentRPM]; + + + +}]; +_ID \ No newline at end of file diff --git a/A3-Antistasi/Scripts/GOM/functions/VehicleTuning/GOM_fnc_bulletProofTyres.sqf b/A3-Antistasi/Scripts/GOM/functions/VehicleTuning/GOM_fnc_bulletProofTyres.sqf new file mode 100644 index 0000000000..be459ad960 --- /dev/null +++ b/A3-Antistasi/Scripts/GOM/functions/VehicleTuning/GOM_fnc_bulletProofTyres.sqf @@ -0,0 +1,24 @@ +//GOM_fnc_bulletProofTyres.sqf +//by Grumpy Old Man +//V0.9 +params ["_car"]; +_car setvariable ["GOM_fnc_bulletProofTyres",true,true]; +_ID = _car addEventHandler ["HandleDamage",{ + + params ["_veh","_selection","_damage","_src","_projectile"]; + _check = false; + _roundthings = ["wheel","tyre","tire"]; + + { + + if (toUpper _selection find toUpper _x >= 0) then {_check = true;}; + + } foreach _roundthings; + + + if (_projectile isKindOf "BulletCore" AND _check) then {_damage = 0}; + + _damage +}]; +_car setvariable ["GOM_fnc_bulletProofTyresEHID",_ID,true]; +true \ No newline at end of file diff --git a/A3-Antistasi/Scripts/GOM/functions/VehicleTuning/GOM_fnc_ejectionSeat.sqf b/A3-Antistasi/Scripts/GOM/functions/VehicleTuning/GOM_fnc_ejectionSeat.sqf new file mode 100644 index 0000000000..69d1762b1e --- /dev/null +++ b/A3-Antistasi/Scripts/GOM/functions/VehicleTuning/GOM_fnc_ejectionSeat.sqf @@ -0,0 +1,57 @@ +//GOM_fnc_ejectionSeat.sqf +//by Grumpy Old Man +//V0.9 +params ["_unit"]; + +_veh = vehicle _unit; +_usedEjectionSeats = _veh getVariable ["GOM_fnc_usedEjectionSeats",[]]; +_check = false; +_seat = -1; + +{ + + if (_x select 0 isEqualTo _unit AND !(_x select 2 in _usedEjectionSeats)) then {_check = true; _seat = _x select 2;}; + +} foreach fullCrew _veh; + +if !(_check) exitWith { + + hintsilent "You can only eject once from each seat!"; + _killHint = [] spawn GOM_fnc_killHint; + true + +}; + +_usedEjectionSeats pushbackUnique _seat; +_veh setVariable ["GOM_fnc_usedEjectionSeats",_usedEjectionSeats,true]; +_unit allowdamage false; +_pos = getposatl _unit; +_pos set [2,(_pos select 2) + 2]; +_unit setposatl _pos; +_unit say "SN_Flare_Weapon_Fired"; +_unit switchMove "afalpercmstpsnonwnondnon"; +_vel = velocityModelSpace _veh; +_vel = _vel vectorAdd [0,0,35]; +_unit setVelocityModelSpace _vel; +_descend = [_unit] spawn { + + params ["_unit"]; + + waituntil {((velocity _unit) select 2) < -1}; + + _unit playmove "HaloFreeFall_non"; + _sleep = random [2,2.5,3] + time; + waituntil {time > _sleep OR ((getposatl _unit) select 2) < 15}; + _pos = getPosASL _unit; + _pos set [2,(_pos select 2) + 4]; + _chute = "Steerable_Parachute_F" createVehicle [0,0,500]; + _chute setdir getdir _unit; + _unit allowdamage false; + _chute setposASL _pos; + _vel = velocityModelSpace _unit; + _chute setVelocityModelSpace _vel; + _unit moveindriver _chute; + _unit allowdamage true; + +}; +true \ No newline at end of file diff --git a/A3-Antistasi/Scripts/GOM/functions/VehicleTuning/GOM_fnc_getKartNumber.sqf b/A3-Antistasi/Scripts/GOM/functions/VehicleTuning/GOM_fnc_getKartNumber.sqf new file mode 100644 index 0000000000..03f4aa2e3e --- /dev/null +++ b/A3-Antistasi/Scripts/GOM/functions/VehicleTuning/GOM_fnc_getKartNumber.sqf @@ -0,0 +1,12 @@ +//GOM_fnc_getKartNumber +//0.0112ms, may be possible to increase this if needed +params ["_veh"]; +_textures = (getObjectTextures _veh); +_textures params ["","","_tens","_single"]; +_first = _tens splitString ""; +_second = _single splitString ""; + +_firstNum = _first#(count _first - 8); +_secondNum = _second#(count _second - 8); +_result = _firstNum + _secondNum; +_result \ No newline at end of file diff --git a/A3-Antistasi/Scripts/GOM/functions/VehicleTuning/GOM_fnc_initParams.sqf b/A3-Antistasi/Scripts/GOM/functions/VehicleTuning/GOM_fnc_initParams.sqf new file mode 100644 index 0000000000..a1c9f4ac65 --- /dev/null +++ b/A3-Antistasi/Scripts/GOM/functions/VehicleTuning/GOM_fnc_initParams.sqf @@ -0,0 +1,44 @@ + +//contains array of ["NAME",performance multiplier,cost,description] +_engineBoostParams = [ +//stock multi should be 0, so no boost is applied +["Stock Engine",0,5000,"Run of the mill engine that comes with the vehicle."], +["Engine Kit 1",1.1,15000,"Custom exhaust and air intake."], +["Engine Kit 2",1.2,30000,"Same as Engine Kit 1 + custom ECM and valve timings."], +["Engine Kit 3",1.3,60000,"Same as Engine Kit 2 + racing exhaust and custom manifold."], +["NASCAR Kit",2.2,150000,"Big bore V8 engine with all the bells and whistles."], +["Drag Racing Kit",4,500000,"The whole package, reduces lifespan of driver."] +]; + +_transmissionParams = [ +["Stock Transmission",1,2500,"Run of the mill transmission that comes with the vehicle."], +["Transmission Kit 1",1.1,7500, "Slight increase of maximum speed."], +["Transmission Kit 2",1.2,15000, "Medium increase of maximum speed."], +["Transmission Kit 3",1.3,30000, "Decent increase of maximum speed."], +["NASCAR Transmission",2,75000, "Only use if the Transmission Kit 3 isn't cutting it."], +["Drag Racing Transmission",4,250000, "Way beyond legal at this point."] +]; + +_brakeParams = [ +["Stock Brakes",1,2000,""], +["Brake Kit 1",1.1,7000,""], +["Brake Kit 2",1.2,10000,""], +["Brake Kit 3",1.3,25000,""], +["Ceramic Brakes",1.5,40000,""], +["NASCAR Brakes",1.8,70000,""], +["Drag Racing Brakes",2.5,200000,""] +]; + +_chassisParams = [ +["Stock Chassis",1,8000,""], +["Chassis Kit 1",0.9,24000,""], +["Chassis Kit 2",0.8,48000,""], +["Chassis Kit 3",0.7,80000,""], +["Carbon Chassis",0.55,150000,""] +]; + + +missionNamespace setVariable ["GOM_fnc_engineBoostParams",_engineBoostParams,true]; +missionNamespace setVariable ["GOM_fnc_transmissionParams",_transmissionParams,true]; +missionNamespace setVariable ["GOM_fnc_brakeParams",_brakeParams,true]; +missionNamespace setVariable ["GOM_fnc_chassisParams",_chassisParams,true]; \ No newline at end of file diff --git a/A3-Antistasi/Scripts/GOM/functions/VehicleTuning/GOM_fnc_installFromLB.sqf b/A3-Antistasi/Scripts/GOM/functions/VehicleTuning/GOM_fnc_installFromLB.sqf new file mode 100644 index 0000000000..f96e81bff8 --- /dev/null +++ b/A3-Antistasi/Scripts/GOM/functions/VehicleTuning/GOM_fnc_installFromLB.sqf @@ -0,0 +1,196 @@ +//GOM_fnc_installFromLB.sqf +//by Grumpy Old Man +//V0.9 +_cars = (findDisplay 66) getvariable ['GOM_fnc_vehTuningCars',[]]; +(findDisplay 66) displayCtrl 1604 ctrlSetTextColor [0,1,0,1]; +if (_Cars isEqualTo []) exitwith {true}; + _car = _cars select (lbCurSel 1500); + + if (_car getVariable ["GOM_fnc_NitroVolume",-1] <= 0) then { + + { + + ctrlShow [_x,false]; + + } foreach [1900,1901,1902,1003,1004,1005,1006,1007,1008,1009]; + +}; + +if (_car getVariable ["GOM_fnc_NitroVolume",-1] > 0) then { + + { + + ctrlShow [_x,true]; + + } foreach [1900,1901,1902,1003,1004,1005,1006,1007,1008,1009]; + +}; + +_carName = getText (configfile >> "CfgVehicles" >> typeOf _car >> "displayName"); +_confirmed = false; + + +if (lbCurSel 1501 isEqualTo 0 AND lbCurSel 1502 > -1) then { + _confirmed = true; + _engineMultis = GOM_fnc_engineBoostParams apply {_x#1}; + _engineKitName = GOM_fnc_engineBoostParams apply {_x#0}; + + _car setvariable ['GOM_fnc_boostMulti',_engineMultis # (lbCurSel 1502),true]; + _car setVariable ['GOM_fnc_boostStage',lbCursel 1502]; + _car setvariable ['GOM_fnc_nitroSize',(lbCurSel 1502),true]; + _car setvariable ['GOM_fnc_NitroVolume',1,true]; + systemchat format ['%2: Engine Upgrade %1 installed.',_engineKitName # (lbCurSel 1502),_carName]; + lbSetCurSel [1502, -1]; + lbClear 1502; + +}; + +if (lbCurSel 1501 isEqualTo 1 AND lbCurSel 1502 > -1) then { + _confirmed = true; + _multi = GOM_fnc_transmissionParams apply {_x#1}; + _car setVariable ['GOM_fnc_MaxSpeed',(_multi select (lbCurSel 1502)),true]; + _car setvariable ['GOM_fnc_MaxSpeedType',lbCurSel 1502,true]; + systemchat format ['%2: Transmission Upgrade %1 installed.',lbCurSel 1502,_carName]; + lbSetCurSel [1502, -1]; + + _getmaxspeed = getnumber (configfile >> "CfgVehicles" >> typeOf _car >> "maxSpeed"); + _maxspeedMulti = _car getvariable ["GOM_fnc_MaxSpeed",1]; + _maxspeed = _getmaxspeed * _maxspeedMulti; + + { + sliderSetRange [_x, 0, _maxspeed]; + } foreach [1900,1901,1902]; + lbClear 1502; + +}; + +if (lbCurSel 1501 isEqualTo 2 AND lbCurSel 1502 > -1) then { + + _confirmed = true; + _car setvariable ['GOM_fnc_brakeType',lbCurSel 1502,true]; + systemchat format ['%2: Brake Upgrade %1 installed.',lbCurSel 1502,_carName]; + lbSetCurSel [1502, -1]; + lbClear 1502; + +}; + +if (lbCurSel 1501 isEqualTo 3 AND lbCurSel 1502 > -1) then { + + _confirmed = true; + _massMulti = GOM_fnc_chassisParams apply {_x#1}; + _reduction = _massMulti select (lbCurSel 1502); + if (lbCurSel 1502 isEqualTo 0) then {_reduction = 1}; + _car setmass ((_car getvariable ['GOM_fnc_initMass',1000]) * _reduction); + _car setvariable ['GOM_fnc_ChassisKit',1,true]; + systemchat format ['%2: Chassis Upgrade %1 installed.',lbCurSel 1502,_carName]; + lbSetCurSel [1502, -1]; + lbClear 1502; + + }; + + if (lbCurSel 1501 isEqualTo 4 AND lbCurSel 1502 > -1) then { + + _confirmed = true; + + if (lbCurSel 1502 isEqualto 0) then { + + _car setVariable ['GOM_fnc_CruiseControlInstalled',true,true]; + systemchat format ['%2: Cruise Control installed.',lbCurSel 1502,_carName]; + + }; + + if (lbCurSel 1502 isEqualto 1) then { + + _car setVariable ['GOM_fnc_FogMachineInstalled',true,true]; + _car setVariable ['GOM_fnc_FogMachineRounds',3,true]; + systemchat format ['%2: F.O.G. Machine (3 Charges) installed.',lbCurSel 1502,_carName]; + + }; + + if (lbCurSel 1502 isEqualto 2) then { + + _car setVariable ['GOM_fnc_EjectionSeatsInstalled',true,true]; + systemchat format ['%2: Ejection Seats installed.',lbCurSel 1502,_carName]; + + }; + + if (lbCurSel 1502 isEqualto 3) then { + + _check = _car getvariable ["GOM_fnc_bulletProofTyres",false]; + if !(_check) then { + _car call GOM_fnc_bulletProofTyres; + systemchat format ['%2: Bulletproof Tyres installed.',lbCurSel 1502,_carName]; + }; + + }; + + if (lbCurSel 1502 isEqualto 4) then { + + _check = _car getvariable ["GOM_fnc_GPSTracker",false]; + if !(_check) then { + _car spawn GOM_fnc_GPSTracker; + systemchat format ['%2: GPS Tracker installed.',lbCurSel 1502,_carName]; + }; + + }; + lbSetCurSel [1502, -1]; + }; + + if (lbCurSel 1501 isEqualTo 5 AND lbCurSel 1502 > -1) then { + + _colorConfigs = "true" configClasses (configfile >> "CfgVehicles" >> typeof _car >> "textureSources"); + _colorTextures = []; + if (count _colorConfigs > 0) then { + + _colorNames = []; + { + _colorNames pushback (getText (configfile >> "CfgVehicles" >> typeof _car >> "textureSources" >> configName _x >> "displayName")); + _colorTextures pushback (getArray (configfile >> "CfgVehicles" >> typeof _car >> "textureSources" >> configName _x >> "textures")); + } foreach _colorConfigs; + + { + _index = (_colorTextures select (lbCurSel 1502)) find _x; + _car setObjectTextureGlobal [_index, (_colorTextures select (lbCurSel 1502)) select _index]; + } foreach (_colorTextures select (lbCurSel 1502)); + + systemchat format ['%2: Changed color to %1.',(_colorNames select (lbCurSel 1502)),_carName]; + +}; + +}; + + if (lbCurSel 1501 isEqualTo 6 AND lbCurSel 1502 > -1) then { + _confirmed = true; + _animConfigs = "(getText (configfile >> 'CfgVehicles' >> typeof _car >> 'AnimationSources' >> configName _x >> 'displayName')) != ''" configClasses (configfile >> "CfgVehicles" >> typeof _car >> "AnimationSources"); + if (count _animConfigs > 0) then { + + _anim = configname (_animconfigs select (lbcursel 1502)); + _forceAnim = getArray (configfile >> "CfgVehicles" >> typeof _car >> "AnimationSources" >> _anim >> "forceAnimate"); + _state = _car animationPhase _anim; + + if (_state isEqualTo 0) then {_state = 1} else {_state = 0}; + + _car animate [_anim,_state]; + + { + + if (typename _x isEqualTo "STRING") then { + + _index = _forceAnim find _x; + _car animate [_x,_forceanim select (_index + 1)]; + + }; + + } foreach _forceAnim; + + }; + +}; +if (_confirmed) then { + playsound selectRandom ['FD_Target_PopDown_Large_F','FD_Target_PopDown_Small_F','FD_Target_PopUp_Small_F']; + (( findDisplay 66) displayCtrl 1104) ctrlSetStructuredText parsetext format ["
Modification Installed.
Select another one or confirm.
",""]; + + (findDisplay 66) displayCtrl 1604 ctrlSetTextColor [1,1,1,1]; + +}; +true \ No newline at end of file diff --git a/A3-Antistasi/Scripts/GOM/functions/VehicleTuning/GOM_fnc_killHint.sqf b/A3-Antistasi/Scripts/GOM/functions/VehicleTuning/GOM_fnc_killHint.sqf new file mode 100644 index 0000000000..a1e9ecc254 --- /dev/null +++ b/A3-Antistasi/Scripts/GOM/functions/VehicleTuning/GOM_fnc_killHint.sqf @@ -0,0 +1,6 @@ +//GOM_fnc_killHint.sqf +//by Grumpy Old Man +//V0.9 +sleep 6; +hintsilent ""; +true \ No newline at end of file diff --git a/A3-Antistasi/Scripts/GOM/functions/VehicleTuning/GOM_fnc_licensePlate.sqf b/A3-Antistasi/Scripts/GOM/functions/VehicleTuning/GOM_fnc_licensePlate.sqf new file mode 100644 index 0000000000..08d05ac877 --- /dev/null +++ b/A3-Antistasi/Scripts/GOM/functions/VehicleTuning/GOM_fnc_licensePlate.sqf @@ -0,0 +1,17 @@ +_world = worldName; +_plateFormat = getText (configfile >> "CfgWorlds" >> _world >> "plateFormat"); +_plateLetters = (getText (configfile >> "CfgWorlds" >> _world >> "plateLetters") splitString ""); +_plateArray = _plateFormat splitString ""; + +_result = _plateArray apply { + +_return = _x; +if (_x isEqualTo "$") then {_return = selectRandom _plateLetters}; +if (_x isEqualTo "#") then {_return = round random 9}; +_return + +}; + +_licensePlate = _result joinString ""; + +_licensePlate \ No newline at end of file diff --git a/A3-Antistasi/Scripts/GOM/functions/VehicleTuning/GOM_fnc_roundNum.sqf b/A3-Antistasi/Scripts/GOM/functions/VehicleTuning/GOM_fnc_roundNum.sqf new file mode 100644 index 0000000000..9c7df57b48 --- /dev/null +++ b/A3-Antistasi/Scripts/GOM/functions/VehicleTuning/GOM_fnc_roundNum.sqf @@ -0,0 +1,6 @@ +//GOM_fnc_roundNum.sqf +//by Grumpy Old Man +//V0.9 +params ["_input","_decimals"]; +_whoopdeedoo = (10 ^ _decimals); +round (_input * _whoopdeedoo) / _whoopdeedoo \ No newline at end of file diff --git a/A3-Antistasi/Scripts/GOM/functions/VehicleTuning/GOM_fnc_setKartNumber.sqf b/A3-Antistasi/Scripts/GOM/functions/VehicleTuning/GOM_fnc_setKartNumber.sqf new file mode 100644 index 0000000000..7033c30330 --- /dev/null +++ b/A3-Antistasi/Scripts/GOM/functions/VehicleTuning/GOM_fnc_setKartNumber.sqf @@ -0,0 +1,11 @@ +params ["_veh",["_num","",[""]]]; + +if !(_num select [0,1] in ["0","1","2","3","4","5","6","7","8","9"]) exitWith {false}; +if (_num isEqualTo "" OR call compile _num > 99 OR {call compile _num < 0}) exitWith {false}; + +_numArray = _num splitString ""; +_texture2 = format ["\A3\Soft_F_Kart\Kart_01\Data\Kart_num_%1_CA.paa",_numArray#0]; +_texture3 = format ["\A3\Soft_F_Kart\Kart_01\Data\Kart_num_%1_CA.paa",_numArray#1]; +_veh setObjectTextureGlobal [2,_texture2]; +_veh setObjectTextureGlobal [3,_texture3]; +true \ No newline at end of file diff --git a/A3-Antistasi/Scripts/GOM/functions/VehicleTuning/GOM_fnc_updateBoostDisplay.sqf b/A3-Antistasi/Scripts/GOM/functions/VehicleTuning/GOM_fnc_updateBoostDisplay.sqf new file mode 100644 index 0000000000..c0b315b41d --- /dev/null +++ b/A3-Antistasi/Scripts/GOM/functions/VehicleTuning/GOM_fnc_updateBoostDisplay.sqf @@ -0,0 +1,42 @@ +//GOM_fnc_updateBoostDisplay.sqf +//by Grumpy Old Man +//V0.9 +params ["_ctrl","_speed"]; +if (lbCurSel 1500 < 0) exitwith {true}; +_cars = (findDisplay 66) getvariable ['GOM_fnc_vehTuningCars',[]]; +_car = _cars select (lbCurSel 1500); + +_getmaxspeed = getnumber (configfile >> "CfgVehicles" >> typeOf _car >> "maxSpeed"); +if (_getmaxspeed <= 300) then {_getmaxspeed = 300}; +_maxspeedMulti = _car getvariable ["GOM_fnc_MaxSpeed",1]; +_maxspeed = _getmaxspeed * _maxspeedMulti; +_maxspeed = [_maxspeed,2] call GOM_fnc_roundNum; +_speed = [_speed,2] call GOM_fnc_roundNum; + +_speedMulti = _car getvariable ["GOM_fnc_speedMulti",1]; +_finalMulti = _speedMulti; +_lowThreshold = call compile (_car getvariable ["GOM_fnc_nitroLowThreshold","100"]); +_highThreshold = call compile (_car getvariable ["GOM_fnc_nitroHighThreshold","300"]); + +if (_speed > 0) then { + + if (_speed <= _lowThreshold) then { + + _finalMulti = _speedMulti / (_lowThreshold / _speed); + + }; + + if (_speed >= _highThreshold) then { + + _finalMulti = _speedMulti / (_speed / _highThreshold); + + }; + + _boostpercent = [((_finalmulti / _speedmulti) * 100),2] call GOM_fnc_roundNum; + + sliderSetRange [1902, 0, _maxspeed]; + ctrlSetText [1007,format ["%1km/h",_speed]]; + ctrlSetText [1009,format ["%1%2",_boostpercent,"%"]]; +}; +(( findDisplay 66) displayCtrl 1104) ctrlSetStructuredText parsetext format ["
This slider displays the boost provided by the nitro injection at the specified speed.
",""]; +true \ No newline at end of file diff --git a/A3-Antistasi/Scripts/GOM/functions/VehicleTuning/GOM_fnc_updateLB.sqf b/A3-Antistasi/Scripts/GOM/functions/VehicleTuning/GOM_fnc_updateLB.sqf new file mode 100644 index 0000000000..5a96a607a2 --- /dev/null +++ b/A3-Antistasi/Scripts/GOM/functions/VehicleTuning/GOM_fnc_updateLB.sqf @@ -0,0 +1,193 @@ + +ctrlSetText [1604,"Install"]; +(findDisplay 66) displayCtrl 1604 ctrlSetTextColor [1,1,1,1]; + +ctrlEnable [1604,false]; +ctrlEnable [1620,false]; +ctrlEnable [1621,false]; +if (lbCurSel 1500 < 0) then { + + ctrlSetText [1604,"Select Vehicle"]; + lbclear 1501; lbAdd [1501, "Select Vehicle"]; + lbclear 1502; lbAdd [1502, "Select Vehicle"]; + (( findDisplay 66) displayCtrl 1104) ctrlSetStructuredText parsetext format ["
Select Vehicle
",""]; + true + +}; + +if (lbCurSel 1500 >= 0) then { + ctrlEnable [1620,true]; + ctrlEnable [1621,true]; + + _cars = (findDisplay 66) getvariable ['GOM_fnc_vehTuningCars',[]]; + _car = _cars select (lbCurSel 1500); + _number = getPlateNumber _car; + + if (typeof _car isKindOf 'Kart_01_Base_F') exitWith { + + _number = [_car] call GOM_fnc_getKartNumber; + ctrlSetText [1400,_number]; + + }; + + ctrlSetText [1400,_number]; +}; + +if (lbCurSel 1501 >= 0) then { + ctrlSetText [1604,"Install"]; + ctrlEnable [1604,true]; +}; + +if (lbCurSel 1501 < 0) then { + (findDisplay 66) displayCtrl 1604 ctrlSetTextColor [1,0,0,1]; + + + ctrlSetText [1604,"Select Category"]; + lbclear 1502; lbAdd [1502, "Select Category"]; + (( findDisplay 66) displayCtrl 1104) ctrlSetStructuredText parsetext format ["
Select Category
",""]; + true + +}; + + + +_categoryArray = ["Engine Performance","Transmission","Brakes","Chassis","Luxuries","Color","Accessories"]; + +if (lbSize 1501 < 1) then { + { + lbAdd [1501, _x]; +} foreach _categoryArray; +}; + +//taken out, some texts are too long for 4 rows, maybe add a scrollbar later +if (lbCurSel 1500 >= 0 AND lbCurSel 1501 < 0 AND lbCurSel 1502 < 0) then { + + _car = (((findDisplay 66) getvariable ['GOM_fnc_vehTuningCars',[]]) select (lbCurSel 1500)); + + + _text = getText (configfile >> "CfgVehicles" >> typeOf _car >> "Library" >> "libTextDesc"); + (( findDisplay 66) displayCtrl 1104) ctrlSetStructuredText parsetext format ["%1",_text]; + +}; +_followUpInfo = ["Engine Performance","Transmission","Brakes","Chassis","Luxuries","Colors","Accessories"]; +_followUpTextArray = ["Increases the engines performance. Can lead to a higher fuel consumption and engine wear.","Increases the vehicles top speed.","Increases the vehicles negative acceleration.","Reduces the vehicles weight.","James Bond would be jealous.","Changes the vehicles Colors.","Adds or removes Accessories."]; +_valueArray = [["High Threshold","Low Threshold"],[],[],[]]; + +_engineNames = GOM_fnc_engineBoostParams apply {_x#0}; +_transmissionNames = GOM_fnc_transmissionParams apply {_x#0}; +_brakeNames = GOM_fnc_brakeParams apply {_x#0}; +_chassisNames = GOM_fnc_chassisParams apply {_x#0}; + +_enginePrices = GOM_fnc_engineBoostParams apply {_x#2}; +_transmissionPrices = GOM_fnc_transmissionParams apply {_x#2}; +_brakePrices = GOM_fnc_brakeParams apply {_x#2}; +_chassisPrices = GOM_fnc_chassisParams apply {_x#2}; + +_componentInfo = [ + +GOM_fnc_engineBoostParams apply {_x#3}, +GOM_fnc_transmissionParams apply {_x#3}, +GOM_fnc_brakeParams apply {_x#3}, +GOM_fnc_chassisParams apply {_x#3} + +]; + +_upgradeArray = [_engineNames,_transmissionNames,_brakeNames,_chassisNames,["Cruise Control","F.O.G. Machine","Ejection Seats","Bulletproof Tyres","GPS Tracker"],["Stock Color"],["No Accessories"]]; +_luxuryInfo = ["Locks the vehicles speed at the time of engaging Cruise Control.
For proper operation release gas and brakes before engaging Cruise Control.","Installs a F.O.G. machine with 3 charges.
Use at own risk.","James Bond style ejection seats for every passenger.
Parachutes may or may not be included.","Adds bulletproof tyres.","Installs cutting edge GPS tracking technology.
Tracks position and speed for the last 5 minutes."]; + +_car = (((findDisplay 66) getvariable ['GOM_fnc_vehTuningCars',[]]) select (lbCurSel 1500)); + +if (_car getVariable ["GOM_fnc_NitroVolume",-1] <= 0) then { + + { + + ctrlShow [_x,false]; + +} foreach [1900,1901,1902,1003,1004,1005,1006,1007,1008,1009]; + +}; + +if (_car getVariable ["GOM_fnc_NitroVolume",-1] > 0) then { + + { + + ctrlShow [_x,true]; + +} foreach [1900,1901,1902,1003,1004,1005,1006,1007,1008,1009]; + +}; + +//add textures to dialog +_colorConfigs = "true" configClasses (configfile >> "CfgVehicles" >> typeof _car >> "textureSources"); +_colorTextures = []; +if (count _colorConfigs > 0) then { + + _colorNames = []; + { + _colorNames pushback (getText (configfile >> "CfgVehicles" >> typeof _car >> "textureSources" >> configName _x >> "displayName")); + _colorTextures pushback (getArray (configfile >> "CfgVehicles" >> typeof _car >> "textureSources" >> configName _x >> "textures")); +} foreach _colorConfigs; +_upgradeArray set [5,_colornames]; + +}; + +//add hidden animations to dialog +_animConfigs = "(getText (configfile >> 'CfgVehicles' >> typeof _car >> 'AnimationSources' >> configName _x >> 'displayName')) != ''" configClasses (configfile >> "CfgVehicles" >> typeof _car >> "AnimationSources"); +_animSources = []; +if (count _animConfigs > 0) then { + + _animNames = []; + { + _animNames pushback (getText (configfile >> "CfgVehicles" >> typeof _car >> "AnimationSources" >> configName _x >> "displayName")); + +} foreach _animConfigs; +_upgradeArray set [6,_animNames]; + +}; + + + + + +if !(lbCurSel 1501 isEqualTo -1) then { + + + lbclear 1502; +//set text for followup listbox +_followUpInfoText = (_followUpInfo select (lbCurSel 1501)); +_followUpText = (_followUpTextArray select (lbCurSel 1501)); +(( findDisplay 66) displayCtrl 1103) ctrlSetStructuredText parsetext format ["%1",_followUpInfoText]; + +(( findDisplay 66) displayCtrl 1104) ctrlSetStructuredText parsetext format ["
%1
",_followUpText]; + + +//display component info +if (lbCurSel 1502 >= 0 AND lbCurSel 1501 <= 3) then { +_info = _componentInfo#(lbcursel 1501)#(lbcursel 1502); +(( findDisplay 66) displayCtrl 1104) ctrlSetStructuredText parsetext format ["
%1
",_info]; + + +}; + + + +{ + + lbAdd [1502, _x]; + +} foreach ((_upgradeArray select (lbCurSel 1501))); + +}; + +if (lbCurSel 1501 isEqualTo 4) then { + + + (( findDisplay 66) displayCtrl 1104) ctrlSetStructuredText parsetext format ["
%1
",_luxuryInfo select lbCurSel 1502]; + + +}; +if (lbCurSel 1501 isEqualTo 6 AND lbCurSel 1502 >= 0) then { + + ctrlSetText [1604,"Toggle"]; + +}; diff --git a/A3-Antistasi/Scripts/GOM/functions/VehicleTuning/GOM_fnc_updateSlider1.sqf b/A3-Antistasi/Scripts/GOM/functions/VehicleTuning/GOM_fnc_updateSlider1.sqf new file mode 100644 index 0000000000..750dbb1ec5 --- /dev/null +++ b/A3-Antistasi/Scripts/GOM/functions/VehicleTuning/GOM_fnc_updateSlider1.sqf @@ -0,0 +1,20 @@ +//GOM_fnc_updateSlider1.sqf +//by Grumpy Old Man +//V0.9 +params ["_ctrl","_speed"]; + +if (lbCurSel 1500 < 0) exitwith {true}; +_cars = (findDisplay 66) getvariable ['GOM_fnc_vehTuningCars',[]]; +_car = _cars select (lbCurSel 1500); +_getmaxspeed = getnumber (configfile >> "CfgVehicles" >> typeOf _car >> "maxSpeed"); +if (_getmaxspeed <= 300) then {_getmaxspeed = 300}; +_maxspeedMulti = _car getvariable ["GOM_fnc_MaxSpeed",1]; +_maxspeed = _getmaxspeed * _maxspeedMulti; +_maxspeed = [_maxspeed,2] call GOM_fnc_roundNum; +_speed = [_speed,2] call GOM_fnc_roundNum; +sliderSetRange [1901, 0, _maxspeed]; +ctrlSetText [1006,format ["%1 km/h",_speed]]; +_car setvariable ["GOM_fnc_nitroHighThreshold",str _speed,true]; +(( findDisplay 66) displayCtrl 1104) ctrlSetStructuredText parsetext format ["
After the vehicle reached this speed the nitro boost will slowly decrease to 0%1.
","%"]; +if (sliderPosition 1900 > 0 AND sliderPosition 1900 >= _speed) then {sliderSetPosition [1900,_speed]}; +true \ No newline at end of file diff --git a/A3-Antistasi/Scripts/GOM/functions/VehicleTuning/GOM_fnc_updateSlider2.sqf b/A3-Antistasi/Scripts/GOM/functions/VehicleTuning/GOM_fnc_updateSlider2.sqf new file mode 100644 index 0000000000..990e578333 --- /dev/null +++ b/A3-Antistasi/Scripts/GOM/functions/VehicleTuning/GOM_fnc_updateSlider2.sqf @@ -0,0 +1,21 @@ +//GOM_fnc_updateSlider2.sqf +//by Grumpy Old Man +//V0.9 +params ["_ctrl","_speed"]; +if (lbCurSel 1500 < 0) exitwith {true}; +_cars = (findDisplay 66) getvariable ['GOM_fnc_vehTuningCars',[]]; +_car = _cars select (lbCurSel 1500); + +_getmaxspeed = getnumber (configfile >> "CfgVehicles" >> typeOf _car >> "maxSpeed"); +if (_getmaxspeed <= 300) then {_getmaxspeed = 300}; +_maxspeedMulti = _car getvariable ["GOM_fnc_MaxSpeed",1]; +_maxspeed = _getmaxspeed * _maxspeedMulti; +_maxspeed = [_maxspeed,2] call GOM_fnc_roundNum; +_speed = [_speed,2] call GOM_fnc_roundNum; +sliderSetRange [1900, 0, _maxspeed]; +ctrlSetText [1005,format ["%1 km/h",_speed]]; +_car setvariable ["GOM_fnc_nitroLowThreshold",str _speed,true]; +(( findDisplay 66) displayCtrl 1104) ctrlSetStructuredText parsetext format ["
Until the vehicle reaches this speed, the nitro boost will slowly increase up to 100%1.
","%"]; + +if (sliderPosition 1901 > 0 AND sliderPosition 1901 <= _speed) then {sliderSetPosition [1901,_speed]}; +true \ No newline at end of file diff --git a/A3-Antistasi/Scripts/GOM/functions/VehicleTuning/GOM_fnc_vehTuning.sqf b/A3-Antistasi/Scripts/GOM/functions/VehicleTuning/GOM_fnc_vehTuning.sqf new file mode 100644 index 0000000000..7c33e8cfd7 --- /dev/null +++ b/A3-Antistasi/Scripts/GOM/functions/VehicleTuning/GOM_fnc_vehTuning.sqf @@ -0,0 +1,238 @@ +//GOM_fnc_vehTuning.sqf +//by Grumpy Old Man +//V0.9 +params ["_vehicle"]; +_IDs = _vehicle getvariable ["GOM_fnc_nitroActionIDs",[-1]]; + +if (_IDs select 0 > -1) exitWith {}; + + {_vehicle removeAction _x} foreach _IDs; + + + _displayEHs = player getvariable ["GOM_fnc_displayEHs",[]]; + if !(_displayEHs isEqualTo []) then { + + (findDisplay 46) displayRemoveEventHandler ["KeyDown",(_displayEHs select 0)]; + (findDisplay 46) displayRemoveEventHandler ["KeyUp",(_displayEHs select 1)]; + + }; + _stackedID = _vehicle getVariable ["GOM_fnc_stackedEH",""]; + if !(_stackedID isEqualTo "") then { + + [_stackedID, "onEachFrame"] call BIS_fnc_removeStackedEventHandler; + + }; + + _engineID = _vehicle getVariable ["GOM_fnc_nitroEngineEH",-1]; + _vehicle removeEventHandler ["Engine",_engineID]; + + + + _nitroActionIDs = []; + + _ID = _vehicle addAction ["Ejection Seat",{(_this select 1) call GOM_fnc_ejectionSeat;},nil,0,false,true,"","_this in crew _target AND _target getvariable [""GOM_fnc_EjectionSeatsInstalled"",false]"]; + _nitroActionIDs pushBack _ID; + + + _ID = _vehicle addAction ["'Fog' Machine (3 Charges)",{(_this select 0) spawn GOM_fnc_fogMachine;},nil,0,false,true,"","_this isequalto driver _target AND _target getvariable [""GOM_fnc_FogMachineInstalled"",false] AND _target getvariable [""GOM_fnc_FogMachineRounds"",0] > 0"]; + _nitroActionIDs pushBack _ID; + _vehicle setvariable ["GOM_fnc_FOGactionID",_ID]; + _ID = _vehicle addaction ["Cruise-Control On",{(_this select 0) setvariable ["GOM_fnc_CruiseControl",speed (_this select 0)]},nil,0,false,true,"","((vehicle _target getvariable [""GOM_fnc_CruiseControl"",-1])< 0) AND _this isEqualTo driver _target AND isEngineOn _target AND _target getvariable [""GOM_fnc_CruiseControlInstalled"",false]"]; + _nitroActionIDs pushBack _ID; + + _ID = _vehicle addaction ["Cruise-Control Off",{_this select 0 setvariable ["GOM_fnc_CruiseControl",-1]},nil,0,false,true,"","((vehicle _target getvariable [""GOM_fnc_CruiseControl"",-1])> 0) AND _this isEqualTo driver _target AND isEngineOn _target AND _target getvariable [""GOM_fnc_CruiseControlInstalled"",false]"]; + _nitroActionIDs pushBack _ID; + + + +_ID = _vehicle addaction ["Measure Performance",{ + +params ["_veh"]; +_veh setvariable ["GOM_fnc_nitroMeasuring",true]; +playSound "Topic_Selection"; +_acc = [_veh] spawn GOM_fnc_acceleration; +_qm = [_veh] spawn GOM_fnc_quartermile + +},nil,0,false,true,"","(!(vehicle _target getvariable [""GOM_fnc_nitroMeasuring"",false])) AND _this isEqualTo driver _target"]; +_nitroActionIDs pushBack _ID; + + +_vehicle setvariable ["GOM_fnc_nitroActionIDs",_nitroActionIDs]; +disableSerialization; +_display = (findDisplay 46); +_displayEHs = []; +_ID = _display displayAddEventHandler ["KeyDown","_veh = vehicle player;if ((_this select 1) isEqualTo 31) then {_veh setvariable ['GOM_fnc_CruiseControl',-1];_veh setvariable ['GOM_fnc_braking',true]}"]; + +_displayEHs pushBack _ID; + +_ID =_display displayAddEventHandler ["KeyUp","_veh = vehicle player;if ((_this select 1) isEqualTo 31) then {_veh setvariable ['GOM_fnc_braking',false]}"]; +_displayEHs pushBack _ID; +player setvariable ["GOM_fnc_displayEHs",_displayEHs]; +_stackedEHID = "GOM_fnc_nitroOnEachFrameID"; +_vehicle setVariable ["GOM_fnc_stackedEH",_stackedEHID]; + + +GOM_fnc_acceleration = { + + +params ["_veh"]; +_texts = []; +_maxG = 0;//using gmeterz soundcontroller to grab g value +waituntil {_veh getvariable ["GOM_fnc_nitroMeasuring",false]}; + +_getmaxspeed = getnumber (configfile >> "CfgVehicles" >> typeOf _veh >> "maxSpeed"); + + + _maxspeedMulti = _veh getvariable ["GOM_fnc_MaxSpeed",1]; + _maxspeed = _getmaxspeed * _maxspeedMulti; + _vehName = getText (configfile >> "CfgVehicles" >> typeOf _veh >> "displayName"); + _vehDifferential = getText (configfile >> "CfgVehicles" >> typeOf _veh >> "differentialType"); + _diffTypes = ["","all_open", "all_limited", "front_open", "front_limited", "rear_open", "rear_limited"]; + _diffReferences = ["N/A","4WD","4WD, limited-slip differential","FWD","FWD, limited-slip differential","RWD","RWD, limited-slip differential"]; + + _vehDiffText = if (_vehDifferential in _diffTypes) then {_diffReferences select (_diffTypes find _vehDifferential)} else {_diffReferences select 0}; + + _mass = getMass _veh; + + _nitroIndex = _veh getVariable ["GOM_fnc_boostStage",0]; + _nitroTypes = GOM_fnc_engineBoostParams apply {_x#0}; + _nitroStageText = format ["%1",_nitroTypes # _nitroIndex]; + + _transmissionIndex = _veh getVariable ["GOM_fnc_MaxSpeedType",0]; + _transmissionTypes = GOM_fnc_transmissionParams apply {_x#0}; + _transmissionText = format ["%1",_transmissionTypes # _transmissionIndex]; + + _brakeIndex = _veh getVariable ["GOM_fnc_brakeType",0]; + _braketypes = GOM_fnc_brakeParams apply {_x#0}; + _braketext = format ["%1",_braketypes # _brakeIndex]; + + _chassisIndex = _veh getVariable ["GOM_fnc_ChassisKit",0]; + _chassistypes = GOM_fnc_chassisParams apply {_x#0}; + _chassistext = format ["%1",_chassistypes # _chassisIndex]; + + _text = format ["--- NEW RUN ---
Run start time: %1.
%2 in %3 - %4kg.
Max. Speed: %5km/h.
%6
%7
%8
%9",[daytime] call BIS_fnc_timeToString,name player,_vehName,[getmass _veh,2] call GOM_fnc_roundNum,[_maxspeed,2] call GOM_fnc_roundNum,_nitroStageText,_transmissionText,_braketext,_chassistext]; + _log = _veh getvariable ["GOM_fnc_performanceLog",[]]; + _log set [0,_text]; + _veh setVariable ["GOM_fnc_performanceLog",_log]; + + waituntil {player != _veh}; + + hintsilent "Ready to measure, accelerate!"; _killHint = [] spawn GOM_fnc_killHint; + + playsound "FD_Start_F"; + + waituntil {speed _veh > 0}; + + _vInit = 0; + _starttime = time; + _kmhToMphMulti = 0.278; + + waituntil { + _g = _veh getSoundController "gmeterz"; + if (_g > _maxG) then {_maxG = _g}; + + speed _veh >= 96.5606};//0-60 mph + + + _accel = (((speed _veh * _kmhToMphMulti) - _vInit) / (time - _starttime)); + _text = format ["0 - 60mph: %1s.
Avg. Accel.: %2m/s² - %3g.
Max. Accel. %4m/s² - %5g.",[(time - _starttime),2] call GOM_fnc_roundNum,[_accel,2] call GOM_fnc_roundNum,[(_accel / 9.807),2] call GOM_fnc_roundNum,[(_maxG * 9.807),2] call GOM_fnc_roundNum,[_maxG,2] call GOM_fnc_roundNum]; + _g = 0; + _maxG = 0; + _log = _veh getvariable ["GOM_fnc_performanceLog",[]]; + _log set [1,_text]; + _veh setVariable ["GOM_fnc_performanceLog",_log]; + + waituntil { + _g = _veh getSoundController "gmeterz"; + if (_g > _maxG) then {_maxG = _g}; + speed _veh >= 100};//0-100 kmh + + _accel = (((speed _veh * _kmhToMphMulti) - _vInit) / (time - _starttime)); + _text = format ["0 - 100kmh: %1s.
Avg. Accel.: %2m/s² - %3g.
Max. Accel. %4m/s² - %5g.",[(time - _starttime),2] call GOM_fnc_roundNum,[_accel,2] call GOM_fnc_roundNum,[(_accel / 9.807),2] call GOM_fnc_roundNum,[(_maxG * 9.807),2] call GOM_fnc_roundNum,[_maxG,2] call GOM_fnc_roundNum]; + _g = 0; + _maxG = 0; + + _log = _veh getvariable ["GOM_fnc_performanceLog",[]]; + _log set [2,_text]; + _veh setVariable ["GOM_fnc_performanceLog",_log]; + + waituntil {speed _veh isEqualto 0}; + + sleep 3; + + waituntil {!(_veh getvariable ["GOM_fnc_nitroMeasuring",false])}; + + + +}; + +GOM_fnc_quartermile = { + +params ["_veh"]; +_maxG = 0; +_texts = []; +_kmhToMphMulti = 0.278; +waituntil {_veh getvariable ["GOM_fnc_nitroMeasuring",false]}; + +waituntil {speed _veh > 0}; + +_vInit = 0; +_startpos = getposATL _veh; +_starttime = time; + +waituntil { +_g = _veh getSoundController "gmeterz"; + if (_g > _maxG) then {_maxG = _g}; + +getposatl _veh distance2d _startpos >= 201};//1/8 mile + +_accel = (((speed _veh * _kmhToMphMulti) - _vInit) / (time - _starttime)); + _text = format ["Eigth mile: %1s - %2km/h.
Avg. Accel.: %3m/s² - %4g.
Max. Accel. %5m/s² - %6g.",[(time - _starttime),2] call GOM_fnc_roundNum,[speed _veh,2] call GOM_fnc_roundNum,[_accel,2] call GOM_fnc_roundNum,[(_accel / 9.807),2] call GOM_fnc_roundNum,[(_maxG * 9.807),2] call GOM_fnc_roundNum,[_maxG,2] call GOM_fnc_roundNum]; + _g = 0; + _maxG = 0; +_log = _veh getvariable ["GOM_fnc_performanceLog",[]]; +_log set [3,_text]; +_veh setVariable ["GOM_fnc_performanceLog",_log]; + +waituntil { +_g = _veh getSoundController "gmeterz"; + if (_g > _maxG) then {_maxG = _g}; + +getposatl _veh distance2d _startpos >= 402};//1/4 mile + +_accel = (((speed _veh * _kmhToMphMulti) - _vInit) / (time - _starttime)); + _text = format ["Quarter mile: %1s - %2km/h.
Avg. Accel.: %3m/s² - %4g.
Max. Accel. %5m/s² - %6g.",[(time - _starttime),2] call GOM_fnc_roundNum,[speed _veh,2] call GOM_fnc_roundNum,[_accel,2] call GOM_fnc_roundNum,[(_accel / 9.807),2] call GOM_fnc_roundNum,[(_maxG * 9.807),2] call GOM_fnc_roundNum,[_maxG,2] call GOM_fnc_roundNum]; + _g = 0; + _maxG = 0; +_log = _veh getvariable ["GOM_fnc_performanceLog",[]]; +_log set [4,_text]; +_veh setVariable ["GOM_fnc_performanceLog",_log]; +_horsepower = (getmass _veh * 2.20462)/(((time - _starttime)/5.825)^3); +_text = format ["Calculated power: %1hp - %2kW.",[_horsepower,2] call GOM_fnc_roundNum,[(_horsepower * 0.7457),2] call GOM_fnc_roundNum]; +_log = _veh getvariable ["GOM_fnc_performanceLog",[]]; +_log set [0,format ["%1
%2",_log select 0,_text]]; +_veh setVariable ["GOM_fnc_performanceLog",_log]; +playsound "FD_Finish_F"; +hintsilent "Measuring finished. Logging results to Diary."; +_killHint = [] spawn GOM_fnc_killHint; + +waituntil {speed _veh isEqualto 0}; + +sleep 3; + +_log = _veh getvariable ["GOM_fnc_performanceLog",[]]; +reverse _log; + +{ + + player createDiaryRecord ["GOM_veh_records",["Records",_x]]; + +} foreach _log; + +_veh setvariable ["GOM_fnc_nitroMeasuring",false]; + +}; + + + +true \ No newline at end of file diff --git a/A3-Antistasi/Scripts/GOM/functions/VehicleTuning/GOM_fnc_vehicleTuning.sqf b/A3-Antistasi/Scripts/GOM/functions/VehicleTuning/GOM_fnc_vehicleTuning.sqf new file mode 100644 index 0000000000..5b9c5f7ee5 --- /dev/null +++ b/A3-Antistasi/Scripts/GOM/functions/VehicleTuning/GOM_fnc_vehicleTuning.sqf @@ -0,0 +1,190 @@ +//GOM_fnc_vehicleTuning.sqf +//by Grumpy Old Man +//V0.9 +// Allows player to upgrade and modify vehicles. +// Usage: +// _tuning = [player] call GOM_fnc_vehicleTuning; + +//parameters to tweak are found in scripts\GOM\functions\VehicleTuning\GOM_fnc_initParams.sqf + + +params ["_object"]; + +[_object,["Tune Vehicles", { + + params ["_object","_activator"]; + +if !(_activator getVariable ["GOM_fnc_VTdiary",false]) then { + _activator setVariable ["GOM_fnc_VTdiary",true,true]; + systemchat "'GOM Vehicle Tuning' manual added."; + systemchat "Check diary for more details."; +_activator createDiarySubject ["GOM_veh_tuning", "GOM - Vehicle Tuning"]; +_activator createDiarySubject ["GOM_veh_records", "Drag Racing Records"]; + +_activator createDiaryRecord ["GOM_veh_tuning", ["Guide", "Use this at your own risk.

Usage:

Use the scroll menu to open the tuning window.
Choose your options.
Click on OK.
Use the 'measure performance' action to retrieve various values, just do a quarter mile drag and you'll see.
Activate Nitro with Primary Weapon button.
Deactivate Nitro by releasing the forward button or by using the brake.
NOTE: You need to activate the Nitro manually after engaging the brake.
This is a safety measure.
Some vehicles are capable of reaching speeds above 400km/h. Expect airplane - like behaviour.
Try not to crash.

Acceleration and top speed values depend on the vehicle.

General guidance:

When the vehicle slips, get off the gas or tip the brakes.
This will give you control over your vehicle.
Also try to countersteer when possible and only use nitro on straights.

Some vehicles work better than others, seems to be caused by PhysX.

The Powerband feature works as follows:

If you set the thresholds to 100km/h and 300km/h, the nitro will be most efficient between those two speeds.
The low threshold sets the limit until the nitro reaches 100% efficiency.
The high threshold sets the limit before the nitro starts losing efficiency.
Choosing awkward numbers might break the nitro.
It's best to set them to values between 100 for the lower, and 300 for the upper threshold.
NOTE: Setting the lower threshold to a higher value could possibly lead to a better acceleration due to the vehicle being easier to control.
Strongly depends on the vehicle, so best experiment with these values.
Average horsepower is being calculated with the elapsed time over quarter mile formula, taking vehicle mass into account.

Enjoy"]]; +}; + + createDialog "GOM_veh_tuning"; + playsound "Simulation_Restart"; + + { + ctrlShow [_x, false]; + } foreach [1900, 1901, 1902, 1003, 1004, 1005, 1006, 1007, 1008, 1009]; +ctrlEnable [1604,false]; +ctrlEnable [1620,false]; +ctrlEnable [1621,false]; + _cars = _object nearEntities [ ["Car", "Motorcycle", "Tank", "Armor"], 25]; + (findDisplay 66)setvariable ["GOM_fnc_vehTuningCars", _cars]; + if (count _cars isEqualTo 0) exitwith { + + hint "No valid vehicle found. Get within 25m of a valid vehicle first."; + _killHint = [] spawn GOM_fnc_killHint; + playsound "Simulation_Restart"; + }; + + // set listbox entries + { + + _vehName = getText (configfile >> "CfgVehicles" >> typeOf _x >> "displayName"); + + _driver = assignedDriver _x; + _driverName = if (_driver isEqualTo objnull) then {"No owner."} else {name _driver}; + + lbAdd [1500, format ["%1 - %2", _vehName, _driverName]]; + + if (_x getvariable ["GOM_fnc_initMass", "init"] isEqualTo "init") then { + + _x setvariable ["GOM_fnc_initMass", getmass _x,true]; + }; + + + + } foreach _cars; + + // listbox EH: + sliderSetPosition [1900, 0]; + sliderSetPosition [1901, 1]; + sliderSetPosition [1902, 0]; + + buttonSetAction [1604, " + _nul = call GOM_fnc_InstallFromLB + "]; + + + _EHs = []; + _ID = findDisplay 66 displayCtrl 1500 ctrlAddEventhandler ["lbSelChanged", GOM_fnc_updateLB]; + _EHs pushBack _ID; + + _ID = findDisplay 66 displayCtrl 1501 ctrlAddEventhandler ["lbSelChanged", GOM_fnc_updateLB]; + _EHs pushBack _ID; + + _ID = findDisplay 66 displayCtrl 1502 ctrlAddEventhandler ["lbSelChanged", GOM_fnc_updateLB]; + _EHs pushBack _ID; + + (findDisplay 66) setVariable ["GOM_fnc_lbEHs", _EHs]; + _EHs = []; + _ID = findDisplay 66 displayCtrl 1900 ctrlAddEventhandler ["SliderPosChanged", GOM_fnc_updateSlider2]; + _EHs pushBack _ID; + + _ID = findDisplay 66 displayCtrl 1901 ctrlAddEventhandler ["SliderPosChanged", GOM_fnc_updateSlider1]; + _EHs pushBack _ID; + + _ID = findDisplay 66 displayCtrl 1902 ctrlAddEventhandler ["SliderPosChanged", GOM_fnc_updateBoostDisplay]; + _EHs pushBack _ID; + (findDisplay 66) setVariable ["GOM_fnc_sliderEHs", _EHs]; + + playsound "Simulation_Restart"; + disableSerialization; + buttonSetAction [1620, " + _car = (((findDisplay 66) getvariable ['GOM_fnc_vehTuningCars',[]]) select (lbCurSel 1500)); + + ctrlEnable [1620, false]; + _car setdamage 0; + ctrlSetText [1620, 'Repaired']; + + playsound selectRandom ['FD_Target_PopDown_Large_F','FD_Target_PopDown_Small_F','FD_Target_PopUp_Small_F']; + "]; + + buttonSetAction [1621, " + ctrlEnable [1621, false]; + ctrlSetText [1621, 'Full']; + _car = (((findDisplay 66) getvariable ['GOM_fnc_vehTuningCars',[]]) select (lbCurSel 1500)); + _car setfuel 1; + _car setvariable ['GOM_fnc_NitroVolume',1,true]; + hintsilent 'Vehicle refuelled.'; + _killHint = [] spawn GOM_fnc_killHint; + + "]; + + + GOM_fnc_confirmButton = { + + + _cars = (findDisplay 66) getvariable ['GOM_fnc_vehTuningCars',[]]; + if (_Cars isEqualTo []) exitwith {true}; + _car = _cars select (lbCurSel 1500); + _run = [_car] call GOM_fnc_vehTuning; + + //add engine EH + _engineEH = _car getVariable ['GOM_fnc_engineEH',-1]; + if (_engineEH isEqualTo -1) then { + + _engineEH = _car addEventHandler ['Engine',{ + params ['_veh','_engineState']; + If (_engineState) then {[_veh] remoteExec ['GOM_fnc_boost',driver _veh]}; + + }]; + _car setVariable ['GOM_fnc_engineEH',_engineEH]; + + }; + + closeDialog 0; + playsound 'Topic_Selection'; + + }; + + buttonSetAction [1612, " +call GOM_fnc_confirmButton; + "]; + buttonSetAction [1613, "closeDialog 0;playsound 'Topic_Deselection';"]; + + buttonSetAction [1605, " + + _cars = (findDisplay 66) getvariable ['GOM_fnc_vehTuningCars',[]]; + if (_Cars isEqualTo []) exitwith {true}; + _car = _cars select (lbCurSel 1500); + + if (typeof _car isKindOf 'Kart_01_Base_F') exitWith { + + + [_car,(ctrlText 1400 select [0,2])] call GOM_fnc_setKartNumber; + + }; + + _plate = toUpper (ctrlText 1400 select [0,15]); + [_car,_plate] remoteExec ['setPlateNumber',_car,true]; + + "]; + + buttonSetAction [1606, " + _cars = (findDisplay 66) getvariable ['GOM_fnc_vehTuningCars',[]]; + if (_Cars isEqualTo []) exitwith {true}; + _car = _cars select (lbCurSel 1500); + + _plate = [] call GOM_fnc_licensePlate; + ctrlSetText [1400,_plate]; + [_car,_plate] remoteExec ['setPlateNumber',_car,true]; + + "]; + + _color = [0,0,0,0.6]; + _dark = [1500,1010,1606,1400,1605,1604,1603,1602,1601,1600,1501,1502,1103,1102,1101,1100,1620,1621,1612,1613,2200]; + { + + findDisplay 66 displayCtrl _x ctrlSetBackgroundColor _color; + + + } forEach _dark; + +},[],0,true,true,"","_this isEqualTo vehicle _this and _this getVariable ['GOM_fnc_qualifiedMechanic',false]",15]] remoteExec ["addAction",[0,-2] select isDedicated,true]; +true \ No newline at end of file diff --git a/A3-Antistasi/Scripts/canOpenerAction.sqf b/A3-Antistasi/Scripts/canOpenerAction.sqf new file mode 100644 index 0000000000..a6b50df99a --- /dev/null +++ b/A3-Antistasi/Scripts/canOpenerAction.sqf @@ -0,0 +1,11 @@ +private _veh = cursorObject; +if (_veh isKindOf "landVehicle") then { + _veh spawn { + sleep 5 + random(15); + { + unassignvehicle _x; + _x action["Eject", _this]; + } forEach (crew _this); + doGetOut (crew _this); + }; +}; diff --git a/A3-Antistasi/Scripts/flipAction.sqf b/A3-Antistasi/Scripts/flipAction.sqf new file mode 100644 index 0000000000..25eda9f8b8 --- /dev/null +++ b/A3-Antistasi/Scripts/flipAction.sqf @@ -0,0 +1,5 @@ +private _veh = cursorObject; +if (_veh isKindOf "landVehicle") then { + _veh setVectorUp [0,0,1]; + _veh setPosATL [(getPosATL _veh) select 0, (getPosATL _veh) select 1, 0]; +}; \ No newline at end of file diff --git a/A3-Antistasi/Scripts/init_canOpener.sqf b/A3-Antistasi/Scripts/init_canOpener.sqf new file mode 100644 index 0000000000..1f13aa391a --- /dev/null +++ b/A3-Antistasi/Scripts/init_canOpener.sqf @@ -0,0 +1,38 @@ +// From here, thanks iceman77!: https://forums.bohemia.net/forums/topic/157916-vehicle-flip-script-to-share/ +if (!isDedicated) then { + waitUntil {!isNull player && {time > 0}}; + + player addAction [ + "Get out now!", + "Scripts\canOpenerAction.sqf", + [], + 0, + false, + true, + "", + "_this == (vehicle _target) && " + + "cursorObject isKindOf 'landVehicle' && " + + "(_this distance cursorObject) < 5 && " + + "count (crew cursorObject) > 0 && " + + "(side ((crew cursorObject) select 0)) != (side _this) && " + + "(!(canMove cursorObject) or (cursorObject getHitPointDamage 'hitengine') > 0.5)" + ]; + + player addEventHandler ["Respawn", { + (_this select 0) addAction [ + "Get out now!", + "Scripts\canOpenerAction.sqf", + [], + 0, + false, + true, + "", + "_this == (vehicle _target) && " + + "cursorObject isKindOf 'landVehicle' && " + + "(_this distance cursorObject) < 5 && " + + "count (crew cursorObject) > 0 && " + + "(side ((crew cursorObject) select 0)) != (side _this) && " + + "(!(canMove cursorObject) or (cursorObject getHitPointDamage 'hitengine') > 0.5)" + ]; + }]; +}; diff --git a/A3-Antistasi/Scripts/init_flipAction.sqf b/A3-Antistasi/Scripts/init_flipAction.sqf new file mode 100644 index 0000000000..243a854a1f --- /dev/null +++ b/A3-Antistasi/Scripts/init_flipAction.sqf @@ -0,0 +1,33 @@ +// From here, thanks iceman77!: https://forums.bohemia.net/forums/topic/157916-vehicle-flip-script-to-share/ +if (!isDedicated) then { + waitUntil {!isNull player && {time > 0}}; + + player addAction [ + "Flip Vehicle", + "Scripts\FlipAction.sqf", + [], + 0, + false, + true, + "", + "_this == (vehicle _target) && " + + "cursorObject isKindOf 'landVehicle' && " + + "(_this distance cursorObject) < 5 && " + + "(vectorUp cursorTarget) select 2 < 0" + ]; + player addEventHandler ["Respawn", { + (_this select 0) addAction [ + "Flip Vehicle", + "Scripts\FlipAction.sqf", + [], + 0, + false, + true, + "", + "_this == (vehicle _target) && " + + "cursorObject isKindOf 'landVehicle' && " + + "(_this distance cursorObject) < 5 && " + + "(vectorUp cursorTarget) select 2 < 0" + ]; + }]; +}; diff --git a/A3-Antistasi/Scripts/mechanic.sqf b/A3-Antistasi/Scripts/mechanic.sqf new file mode 100644 index 0000000000..5860589d75 --- /dev/null +++ b/A3-Antistasi/Scripts/mechanic.sqf @@ -0,0 +1,7 @@ +_uid = getplayerUID player; +_mechanic = ["xxxxxx"]; +if (_uid in _mechanic) then { + hint format ["%1 Mechanic\n ID = %2",(name player),_uid]; + _allowed = true; + player setVariable ["GOM_fnc_qualifiedMechanic",_allowed,true]; +}; diff --git a/A3-Antistasi/Templates/A3-AA-BLUFORTemplate.Altis/mission.sqm b/A3-Antistasi/Templates/A3-AA-BLUFORTemplate.Altis/mission.sqm index 2f2427f77a..e283c3d9fc 100644 --- a/A3-Antistasi/Templates/A3-AA-BLUFORTemplate.Altis/mission.sqm +++ b/A3-Antistasi/Templates/A3-AA-BLUFORTemplate.Altis/mission.sqm @@ -1384,8 +1384,8 @@ class Mission name="Synd_HQ"; markerType="RECTANGLE"; type="rectangle"; - a=50; - b=50; + a=100; + b=100; id=933; atlOffset=1.6032429; }; diff --git a/A3-Antistasi/Templates/A3-AATemplate.Altis/description.ext b/A3-Antistasi/Templates/A3-AATemplate.Altis/description.ext index 6072e07cce..b2a5eec823 100644 --- a/A3-Antistasi/Templates/A3-AATemplate.Altis/description.ext +++ b/A3-Antistasi/Templates/A3-AATemplate.Altis/description.ext @@ -39,10 +39,14 @@ class CfgTaskEnhancements propagate = 1; //0: do not propagate (default), 1: propagate shared tasks to subordinates }; +#include "CHVD\dialog.hpp" + class CfgFunctions { #include "functions.hpp" #include "JeroenArsenal\functions.hpp" + #include "CHVD\CfgFunctions.hpp" }; + class Header { gameType = COOP; @@ -62,6 +66,7 @@ class CfgSounds class Params { + // 0 class loadSave { title = "Load last Persistent Save"; // Param name visible in the list @@ -70,6 +75,7 @@ class Params default = 1; // Default value; must be listed in 'values' array, otherwise 0 is used // Default values that are not whole numbers do not work. Param will default to 0 (or 1 if defined) }; + // 1 class gameMode { title = "Game Mode"; // Param name visible in the list @@ -78,6 +84,7 @@ class Params default = 1; // Default value; must be listed in 'values' array, otherwise 0 is used // Default values that are not whole numbers do not work. Param will default to 0 (or 1 if defined) }; + // 2 class autoSave { title = "Enable Autosave (every hour)"; // Param name visible in the list @@ -86,31 +93,35 @@ class Params default = 1; // Default value; must be listed in 'values' array, otherwise 0 is used // Default values that are not whole numbers do not work. Param will default to 0 (or 1 if defined) }; + // 3 class membership { title = "Enable Server Membership"; texts[] = {"Yes","No"}; values[] = {1,0}; - default = 1; + default = 0; //function = "BIS_fnc_paramDaytime"; // (Optional) [[Functions_Library_(Arma_3)|Function]] [[call]]ed when player joins, selected value is passed as an argument //isGlobal = 1; // (Optional) 1 to execute script / function locally for every player who joins, 0 to do it only on server }; + // 4 class switchComm { title = "Enable Commander Switch (highest ranked player)"; values[] = {1,0}; texts[] = {"Yes","No"}; - default = 1; + default = 0; //file = "setViewDistance.sqf"; // (Optional) Script [[call]]ed when player joins, selected value is passed as an argument }; + // 5 class tkPunish { title = "Enable Teamkill Punish"; values[] = {1,0}; texts[] = {"Yes","No"}; - default = 1; + default = 0; //file = "setViewDistance.sqf"; // (Optional) Script [[call]]ed when player joins, selected value is passed as an argument }; + // 6 class mRadius { title = "Distance from HQ for Sidemissions"; @@ -119,14 +130,16 @@ class Params default = 4000; //file = "setViewDistance.sqf"; // (Optional) Script [[call]]ed when player joins, selected value is passed as an argument }; + // 7 class allowPvP { title = "Allow PvP Slots"; values[] = {1,0}; texts[] = {"Yes","No"}; - default = 1; + default = 0; //file = "setViewDistance.sqf"; // (Optional) Script [[call]]ed when player joins, selected value is passed as an argument }; + // 8 class pMarkers { title = "Allow Friendly Player Markers"; @@ -135,6 +148,7 @@ class Params default = 1; //file = "setViewDistance.sqf"; // (Optional) Script [[call]]ed when player joins, selected value is passed as an argument }; + // 9 class AISkill { title = "AI Skill"; @@ -143,6 +157,7 @@ class Params default = 1; //file = "setViewDistance.sqf"; // (Optional) Script [[call]]ed when player joins, selected value is passed as an argument }; + // 10 class unlockItem { title = "Number of the same weapons required to unlock"; @@ -150,6 +165,7 @@ class Params default = 25; //file = "setViewDistance.sqf"; // (Optional) Script [[call]]ed when player joins, selected value is passed as an argument }; + // 11 class civTraffic { title = "Rate of Civ Traffic"; @@ -158,31 +174,44 @@ class Params default = 1; //file = "setViewDistance.sqf"; // (Optional) Script [[call]]ed when player joins, selected value is passed as an argument }; + // 12 class memberSlots { title = "Percentage of Reserved Slots for Members"; values[] = {0,20,40,60,80,100}; texts[] = {"None","20%","40%","60%","80%","All"}; - default = 20; + default = 0; //file = "setViewDistance.sqf"; // (Optional) Script [[call]]ed when player joins, selected value is passed as an argument }; + // 13 class memberDistance { title = "Max distance non members can be from the closest member or HQ (they will be teleported to HQ after some timeout)"; values[] = {4000,5000,6000,7000,8000,16000}; texts[] = {"4 Kmts","5 Kmts","6 Kmts","7 Kmts","8 Kmts","Unlimited"}; - default = 5000; + default = 16000; //file = "setViewDistance.sqf"; // (Optional) Script [[call]]ed when player joins, selected value is passed as an argument }; + // 14 class allowFT { title = "Limited Fast Travel"; values[] = {0,1}; texts[] = {"No","Yes"}; - default = 1; + default = 0; + }; + // 15 + class reviveSystemDifficulty + { + title = "Revive system difficulty (Easy means: revive doesn't require items or skills, bleedout time is longer, time to revive is shorter)"; + values[] = {0, 1}; + texts[] = {"Easier", "Normal"}; + default = 0; }; }; + + class CfgIdentities { class protagonista @@ -360,7 +389,7 @@ class CfgDebriefing { title = "V I C T O R Y"; subtitle = "Altis is Ours!"; - description = "The population of Altis loves you!
The brave soldiers prooved their valour, and Barbolani, Altis new Prime Minister, could at last to have a nice holidays. A deserved rest in a Greek island, drinking with Petros, his war master."; + description = "The population of Altis loves you!
The brave soldiers prooved their valour, and Von Dakia, Altis new Prime Minister, could at last to have a nice holidays. A deserved rest in a Greek island, drinking with Petros, his war master."; picture = "n_inf"; pictureColor[] = {0.0,0.5,0.0,1}; }; diff --git a/A3-Antistasi/Templates/A3-AATemplate.Altis/mission.sqm b/A3-Antistasi/Templates/A3-AATemplate.Altis/mission.sqm index 4c44817855..1e2ce06636 100644 --- a/A3-Antistasi/Templates/A3-AATemplate.Altis/mission.sqm +++ b/A3-Antistasi/Templates/A3-AATemplate.Altis/mission.sqm @@ -8,7 +8,7 @@ class EditorData toggles=1538; class ItemIDProvider { - nextID=1542; + nextID=1580; }; class MarkerIDProvider { @@ -20,10 +20,10 @@ class EditorData }; class Camera { - pos[]={3609.3936,29.259756,10248.38}; - dir[]={0.082914516,-0.51718152,0.85185391}; - up[]={0.050102774,0.85587496,0.51474941}; - aside[]={0.99529862,-2.5591362e-008,-0.096877024}; + pos[]={11742.37,215.24641,9910.1797}; + dir[]={-0.55659485,-0.81826609,0.1439155}; + up[]={-0.79220617,0.57484245,0.20483615}; + aside[]={0.25033665,-1.0571675e-006,0.96819007}; }; }; binarizationWanted=0; @@ -31,10 +31,15 @@ addons[]= { "A3_Ui_F", "A3_Weapons_F_Ammoboxes", + "ace_rearm", + "ace_dragging", "A3_Modules_F", "A3_Characters_F", "A3_Modules_F_Hc", + "ace_cargo", "A3_Structures_F_EPB_Civ_Camping", + "ace_interaction", + "ace_explosives", "A3_Structures_F_EPC_Civ_InfoBoards", "A3_Structures_F_Ind_AirPort", "A3_Structures_F_Mil_Cargo", @@ -44,13 +49,28 @@ addons[]= "A3_Ui_F_Exp", "A3_Characters_F_Patrol", "A3_Characters_F_Exp", - "A3_Structures_F_Exp_Military_Flags" + "A3_Structures_F_Exp_Military_Flags", + "A3_Modules_F_Curator_Curator", + "A3_Structures_F_Households_Stone_Big", + "A3_Structures_F_Households_Stone_Small", + "A3_Structures_F_Households_Stone_Shed", + "A3_Structures_F_Households_Slum", + "A3_Structures_F_Households_House_Small02", + "A3_Structures_F_Households_Addons", + "A3_Structures_F_Civ_Chapels", + "A3_Props_F_Exp_Naval_Boats", + "A3_Structures_F_Naval_RowBoats", + "A3_Structures_F_Walls", + "A3_Props_F_Exp_Civilian_Garbage", + "A3_Structures_F_Civ_Garbage", + "A3_Props_F_Exp_Commercial_Market", + "A3_Structures_F_Heli_Furniture" }; class AddonsMetaData { class List { - items=13; + items=23; class Item0 { className="A3_Ui_F"; @@ -66,82 +86,152 @@ class AddonsMetaData url="https://www.arma3.com"; }; class Item2 + { + className="ace_rearm"; + name="ACE3 - Rearm"; + author="ACE-Team"; + url="http://ace3mod.com/"; + }; + class Item3 + { + className="ace_dragging"; + name="ACE3 - Dragging"; + author="ACE-Team"; + url="http://ace3mod.com/"; + }; + class Item4 { className="A3_Modules_F"; name="Arma 3 Alpha - Scripted Modules"; author="Bohemia Interactive"; url="https://www.arma3.com"; }; - class Item3 + class Item5 { className="A3_Characters_F"; name="Arma 3 Alpha - Characters and Clothing"; author="Bohemia Interactive"; url="https://www.arma3.com"; }; - class Item4 + class Item6 + { + className="ace_cargo"; + name="ACE3 - Cargo"; + author="ACE-Team"; + url="http://ace3mod.com/"; + }; + class Item7 { className="A3_Structures_F_EPB"; name="Arma 3 Adapt Episode - Buildings and Structures"; author="Bohemia Interactive"; url="https://www.arma3.com"; }; - class Item5 + class Item8 + { + className="ace_interaction"; + name="ACE3 - Interaction"; + author="ACE-Team"; + url="http://ace3mod.com/"; + }; + class Item9 + { + className="ace_explosives"; + name="ACE3 - Explosives"; + author="ACE-Team"; + url="http://ace3mod.com/"; + }; + class Item10 { className="A3_Structures_F_EPC"; name="Arma 3 Win Episode - Buildings and Structures"; author="Bohemia Interactive"; url="https://www.arma3.com"; }; - class Item6 + class Item11 { className="A3_Structures_F_Ind"; name="Arma 3 - Industrial Structures"; author="Bohemia Interactive"; url="https://www.arma3.com"; }; - class Item7 + class Item12 { className="A3_Structures_F_Mil"; name="Arma 3 - Military Buildings and Structures"; author="Bohemia Interactive"; url="https://www.arma3.com"; }; - class Item8 + class Item13 { className="A3_Structures_F_Exp_Infrastructure"; name="Arma 3 Apex - Infrastructure Objects"; author="Bohemia Interactive"; url="https://www.arma3.com"; }; - class Item9 + class Item14 { className="A3_Ui_F_Exp"; name="Arma 3 Apex - User Interface"; author="Bohemia Interactive"; url="https://www.arma3.com"; }; - class Item10 + class Item15 { className="A3_Characters_F_Patrol"; name="Arma 3 Patrol - Characters and Clothing"; author="Bohemia Interactive"; url="https://www.arma3.com"; }; - class Item11 + class Item16 { className="A3_Characters_F_Exp"; name="Arma 3 Apex - Characters and Clothing"; author="Bohemia Interactive"; url="https://www.arma3.com"; }; - class Item12 + class Item17 { className="A3_Structures_F_Exp"; name="Arma 3 Apex - Buildings and Structures"; author="Bohemia Interactive"; url="https://www.arma3.com"; }; + class Item18 + { + className="A3_Modules_F_Curator"; + name="Arma 3 Zeus Update - Scripted Modules"; + author="Bohemia Interactive"; + url="https://www.arma3.com"; + }; + class Item19 + { + className="A3_Structures_F_Households"; + name="Arma 3 - Houses"; + author="Bohemia Interactive"; + url="https://www.arma3.com"; + }; + class Item20 + { + className="A3_Structures_F"; + name="Arma 3 - Buildings and Structures"; + author="Bohemia Interactive"; + url="https://www.arma3.com"; + }; + class Item21 + { + className="A3_Props_F_Exp"; + name="Arma 3 Apex - Decorative and Mission Objects"; + author="Bohemia Interactive"; + url="https://www.arma3.com"; + }; + class Item22 + { + className="A3_Structures_F_Heli"; + name="Arma 3 Helicopters - Buildings and Structures"; + author="Bohemia Interactive"; + url="https://www.arma3.com"; + }; }; }; randomSeed=8109385; @@ -172,7 +262,7 @@ class Mission }; class Entities { - items=356; + items=377; class Item0 { dataType="Marker"; @@ -677,8 +767,8 @@ class Mission markerType="RECTANGLE"; type="Empty"; colorName="ColorEAST"; - a=210; - b=130; + a=391.32083; + b=140.95642; angle=307; id=45; atlOffset=-23.902853; @@ -910,16 +1000,16 @@ class Mission class Item55 { dataType="Marker"; - position[]={6840,0,16106}; + position[]={6840.9565,0,16101.389}; name="puesto_22"; markerType="RECTANGLE"; type="Empty"; colorName="ColorGreen"; a=60; - b=60; - angle=147.99994; + b=76.675362; + angle=143.78416; id=69; - atlOffset=-69.301735; + atlOffset=-67.655495; }; class Item56 { @@ -1393,8 +1483,8 @@ class Mission name="Synd_HQ"; markerType="RECTANGLE"; type="rectangle"; - a=50; - b=50; + a=100; + b=100; id=933; atlOffset=1.6032429; }; @@ -4754,7 +4844,7 @@ class Mission name="seaSpawn_8"; type="mil_objective"; id=1186; - atlOffset=5.0577831; + atlOffset=4.5166793; }; class Item230 { @@ -4985,7 +5075,7 @@ class Mission dataType="Object"; class PositionInfo { - position[]={9170.5498,22.457399,21446.398}; + position[]={9171.5527,22.455708,21447.127}; angles[]={0,5.6333933,0}; }; side="Empty"; @@ -7038,7 +7128,7 @@ class Mission position[]={8780.8975,35.592316,12043.754}; name="road_1"; type="hd_arrow"; - angle=223.50812; + angle=223.50795; id=1441; }; class Item289 @@ -7276,7 +7366,7 @@ class Mission position[]={21706.1,22.576994,17678.889}; name="road_27"; type="hd_arrow"; - angle=213.26994; + angle=213.26985; id=1470; }; class Item315 @@ -7384,7 +7474,7 @@ class Mission position[]={26280.432,40.25845,21788.68}; name="road_39"; type="hd_arrow"; - angle=52.545017; + angle=52.54501; id=1482; }; class Item327 @@ -7393,7 +7483,7 @@ class Mission position[]={26493.066,20.179955,21324.83}; name="road_40"; type="hd_arrow"; - angle=113.11627; + angle=113.11604; id=1483; }; class Item328 @@ -9024,6 +9114,419 @@ class Mission type="HeadlessClient_F"; atlOffset=5.0544739e-005; }; + class Item356 + { + dataType="Marker"; + position[]={13815.541,20.028564,18955.861}; + name="puesto_43"; + markerType="RECTANGLE"; + type="Empty"; + colorName="ColorGUER"; + a=75.43679; + b=39.137062; + angle=135.83093; + id=1542; + }; + class Item357 + { + dataType="Marker"; + position[]={10084.281,121.61914,15919.795}; + name="control_59"; + markerType="RECTANGLE"; + type="rectangle"; + a=15; + b=15; + angle=107.78888; + id=1543; + atlOffset=3.1758423; + }; + class Item358 + { + dataType="Logic"; + class PositionInfo + { + position[]={3596.521,16.916224,10285.647}; + }; + init="call{if (isServer) then { " \n " [] spawn { " \n " sleep 5; " \n " while {true} do { " \n " { " \n " _x addCuratorEditableObjects [allUnits, true]; " \n " _x addCuratorEditableObjects [vehicles, true]; " \n " sleep 10; " \n " } forEach allCurators; " \n " }; " \n " }; " \n "};}"; + id=1544; + type="ModuleCurator_F"; + class CustomAttributes + { + class Attribute0 + { + property="ModuleCurator_F_Owner"; + expression="_this setVariable ['Owner',_value,true];"; + class Value + { + class data + { + class type + { + type[]= + { + "STRING" + }; + }; + value="comandante"; + }; + }; + }; + class Attribute1 + { + property="ModuleCurator_F_Forced"; + expression="_this setVariable ['Forced',_value,true];"; + class Value + { + class data + { + class type + { + type[]= + { + "SCALAR" + }; + }; + value=0; + }; + }; + }; + class Attribute2 + { + property="ModuleCurator_F_Name"; + expression="_this setVariable ['Name',_value,true];"; + class Value + { + class data + { + class type + { + type[]= + { + "STRING" + }; + }; + value=""; + }; + }; + }; + class Attribute3 + { + property="ModuleCurator_F_Addons"; + expression="_this setVariable ['Addons',_value,true];"; + class Value + { + class data + { + class type + { + type[]= + { + "SCALAR" + }; + }; + value=3; + }; + }; + }; + nAttributes=4; + }; + }; + class Item359 + { + dataType="Object"; + class PositionInfo + { + position[]={13190.694,16.576828,7467.9263}; + angles[]={0,3.2864559,0}; + }; + side="Empty"; + flags=1; + class Attributes + { + }; + id=1545; + type="Land_i_Stone_HouseBig_V3_F"; + atlOffset=0.94796085; + }; + class Item360 + { + dataType="Object"; + class PositionInfo + { + position[]={13121.111,4.6019192,7687.8599}; + angles[]={0,4.1157827,0}; + }; + side="Empty"; + flags=1; + class Attributes + { + }; + id=1546; + type="Land_i_Stone_HouseSmall_V3_F"; + atlOffset=0.39949965; + }; + class Item361 + { + dataType="Object"; + class PositionInfo + { + position[]={13193.359,11.858495,7488.8154}; + angles[]={0,4.878859,0}; + }; + side="Empty"; + flags=1; + class Attributes + { + }; + id=1547; + type="Land_i_Stone_Shed_V3_F"; + atlOffset=0.78066349; + }; + class Item362 + { + dataType="Object"; + class PositionInfo + { + position[]={13237.171,14.23805,7449.6274}; + angles[]={0,0.45719621,0}; + }; + side="Empty"; + flags=5; + class Attributes + { + }; + id=1548; + type="Land_Slum_House02_F"; + }; + class Item363 + { + dataType="Object"; + class PositionInfo + { + position[]={13183.077,6.1436625,7595.9121}; + angles[]={0,2.6628659,0}; + }; + side="Empty"; + flags=1; + class Attributes + { + }; + id=1551; + type="Land_d_House_Small_02_V1_F"; + atlOffset=0.31288385; + }; + class Item364 + { + dataType="Object"; + class PositionInfo + { + position[]={13210.114,13.42211,7470.0781}; + angles[]={0,0.060864948,0}; + }; + side="Empty"; + flags=1; + class Attributes + { + }; + id=1552; + type="Land_i_Garage_V2_F"; + atlOffset=0.44539928; + }; + class Item365 + { + dataType="Object"; + class PositionInfo + { + position[]={13138.445,22.280085,7492.1909}; + angles[]={0,5.2581692,0}; + }; + side="Empty"; + flags=5; + class Attributes + { + }; + id=1553; + type="Land_Chapel_Small_V2_F"; + }; + class Item366 + { + dataType="Object"; + class PositionInfo + { + position[]={13310.415,1.980855,7481.7446}; + angles[]={0.12468291,0,6.2033553}; + }; + side="Empty"; + flags=4; + class Attributes + { + }; + id=1558; + type="Land_Boat_06_wreck_F"; + atlOffset=-0.44497919; + }; + class Item367 + { + dataType="Object"; + class PositionInfo + { + position[]={13287.561,0.93185067,7498.0796}; + angles[]={0.1986773,0,6.1453972}; + }; + side="Empty"; + flags=4; + class Attributes + { + }; + id=1559; + type="Land_RowBoat_V3_F"; + atlOffset=-0.011489272; + }; + class Item368 + { + dataType="Object"; + class PositionInfo + { + position[]={13190.222,12.531134,7477.4038}; + angles[]={0,0.20644054,0}; + }; + side="Empty"; + flags=5; + class Attributes + { + }; + id=1560; + type="Land_Addon_02_V1_ruins_F"; + }; + class Item369 + { + dataType="Object"; + class PositionInfo + { + position[]={13191.947,14.690594,7457.7695}; + angles[]={0,1.4763675,0}; + }; + side="Empty"; + flags=5; + class Attributes + { + }; + id=1564; + type="Land_Stone_8m_F"; + }; + class Item370 + { + dataType="Object"; + class PositionInfo + { + position[]={13192.78,14.830365,7450.9893}; + angles[]={0,1.4210305,0}; + }; + side="Empty"; + flags=5; + class Attributes + { + }; + id=1565; + type="Land_Stone_Gate_F"; + }; + class Item371 + { + dataType="Object"; + class PositionInfo + { + position[]={13193.838,15.057616,7446.5254}; + angles[]={0,4.3518586,0}; + }; + side="Empty"; + flags=5; + class Attributes + { + }; + id=1566; + type="Land_Stone_4m_F"; + }; + class Item372 + { + dataType="Object"; + class PositionInfo + { + position[]={13182.7,14.513972,7471.3721}; + angles[]={0.10890111,0,6.1519442}; + }; + side="Empty"; + flags=4; + class Attributes + { + }; + id=1568; + type="Land_GarbageHeap_02_F"; + }; + class Item373 + { + dataType="Object"; + class PositionInfo + { + position[]={13188.78,15.120153,7460.0552}; + angles[]={0.14301692,0,6.1180367}; + }; + side="Empty"; + flags=4; + class Attributes + { + }; + id=1569; + type="Land_GarbageWashingMachine_F"; + }; + class Item374 + { + dataType="Object"; + class PositionInfo + { + position[]={13193.583,13.282237,7470.499}; + angles[]={0.10890055,0,6.2020307}; + }; + side="Empty"; + flags=4; + class Attributes + { + }; + id=1570; + type="Land_Tyre_F"; + }; + class Item375 + { + dataType="Object"; + class PositionInfo + { + position[]={13193.317,14.813199,7460.1924}; + angles[]={0.073202357,0,6.2020307}; + }; + side="Empty"; + flags=4; + class Attributes + { + }; + id=1571; + type="Land_WoodenCrate_01_stack_x5_F"; + }; + class Item376 + { + dataType="Object"; + class PositionInfo + { + position[]={13193.372,14.53396,7456.5234}; + angles[]={0,4.6888628,0}; + }; + side="Empty"; + flags=4; + class Attributes + { + }; + id=1573; + type="Land_RattanChair_01_F"; + atlOffset=-0.00043582916; + }; }; class Connections { diff --git a/A3-Antistasi/Templates/A3-ArmiaKrajowaTemplate.chernarus_summer/mission.sqm b/A3-Antistasi/Templates/A3-ArmiaKrajowaTemplate.chernarus_summer/mission.sqm index 774d4ab9f3..4b55a19bf6 100644 --- a/A3-Antistasi/Templates/A3-ArmiaKrajowaTemplate.chernarus_summer/mission.sqm +++ b/A3-Antistasi/Templates/A3-ArmiaKrajowaTemplate.chernarus_summer/mission.sqm @@ -1321,8 +1321,8 @@ class Mission name="Synd_HQ"; markerType="RECTANGLE"; type="rectangle"; - a=50; - b=50; + a=100; + b=100; id=97; }; class Item89 diff --git a/A3-Antistasi/Templates/A3-WotPTemplate.Tanoa/PIC.jpg b/A3-Antistasi/Templates/A3-WotPTemplate.Tanoa/PIC.jpg index 00fa929b3b..64c7c49300 100644 Binary files a/A3-Antistasi/Templates/A3-WotPTemplate.Tanoa/PIC.jpg and b/A3-Antistasi/Templates/A3-WotPTemplate.Tanoa/PIC.jpg differ diff --git a/A3-Antistasi/Templates/A3-WotPTemplate.Tanoa/description.ext b/A3-Antistasi/Templates/A3-WotPTemplate.Tanoa/description.ext index c5c1f2f8c9..168c12639e 100644 --- a/A3-Antistasi/Templates/A3-WotPTemplate.Tanoa/description.ext +++ b/A3-Antistasi/Templates/A3-WotPTemplate.Tanoa/description.ext @@ -1,8 +1,8 @@ #include "defines.hpp" #include "dialogs.hpp" -author="Barbolani"; -OnLoadName = "Warlords of the Pacific"; +author="Barbolani Cleaned and fixed by duke"; +OnLoadName = "Tropical Vacation"; OnLoadMission = "Business and War..."; loadScreen = "pic.JPG"; @@ -359,7 +359,7 @@ class CfgDebriefing { title = "V I C T O R Y"; subtitle = "Tanoa is Ours!"; - description = "The population of Tanoa loves you!
The SDK brave soldiers prooved their valour, and Barbolani, Tanoa new Prime Minister, could at last to have a nice holliday. A deserved rest in a Greek island, drinking with Petros, his war master."; + description = "The population of Tanoa loves you!
You have proved their valour, and The Tanoa new Dictatorship, could at last to have a nice holliday. A deserved rest in a Greek island, drinking with his buddies."; picture = "n_inf"; pictureColor[] = {0.0,0.5,0.0,1}; }; diff --git a/A3-Antistasi/Templates/A3-WotPTemplate.Tanoa/mission.sqm b/A3-Antistasi/Templates/A3-WotPTemplate.Tanoa/mission.sqm index e257be6b37..ae7a24a129 100644 --- a/A3-Antistasi/Templates/A3-WotPTemplate.Tanoa/mission.sqm +++ b/A3-Antistasi/Templates/A3-WotPTemplate.Tanoa/mission.sqm @@ -8,7 +8,7 @@ class EditorData toggles=513; class ItemIDProvider { - nextID=695; + nextID=696; }; class MarkerIDProvider { @@ -16,11 +16,11 @@ class EditorData }; class LayerIndexProvider { - nextID=291; + nextID=292; }; class Camera { - pos[]={9198.2207,242.95657,8703.8613}; + pos[]={9207.1104,269.21509,8685.9375}; dir[]={0.10632855,-0.76741201,0.63228494}; up[]={0.12726608,0.64115059,0.75678736}; aside[]={0.98615962,3.4484037e-007,-0.16583975}; @@ -32,21 +32,27 @@ addons[]= "A3_Characters_F_Exp", "A3_Ui_F", "A3_Weapons_F_Ammoboxes", + "ace_rearm", + "ace_dragging", "A3_Structures_F_EPC_Civ_InfoBoards", "A3_Modules_F", "A3_Characters_F", "A3_Modules_F_Hc", "A3_Structures_F_Exp_Military_Flags", + "ace_cargo", "A3_Structures_F_Mil_Flags", "A3_Ui_F_Exp", + "ace_explosives", "A3_Structures_F_Ind_Transmitter_Tower", - "A3_Structures_F_EPB_Civ_Camping" + "A3_Structures_F_EPB_Civ_Camping", + "ace_interaction", + "A3_Modules_F_Curator_Curator" }; class AddonsMetaData { class List { - items=11; + items=17; class Item0 { className="A3_Characters_F_Exp"; @@ -69,61 +75,103 @@ class AddonsMetaData url="https://www.arma3.com"; }; class Item3 + { + className="ace_rearm"; + name="ACE3 - Rearm"; + author="ACE-Team"; + url="http://ace3mod.com/"; + }; + class Item4 + { + className="ace_dragging"; + name="ACE3 - Dragging"; + author="ACE-Team"; + url="http://ace3mod.com/"; + }; + class Item5 { className="A3_Structures_F_EPC"; name="Arma 3 Win Episode - Buildings and Structures"; author="Bohemia Interactive"; url="https://www.arma3.com"; }; - class Item4 + class Item6 { className="A3_Modules_F"; name="Arma 3 Alpha - Scripted Modules"; author="Bohemia Interactive"; url="https://www.arma3.com"; }; - class Item5 + class Item7 { className="A3_Characters_F"; name="Arma 3 Alpha - Characters and Clothing"; author="Bohemia Interactive"; url="https://www.arma3.com"; }; - class Item6 + class Item8 { className="A3_Structures_F_Exp"; name="Arma 3 Apex - Buildings and Structures"; author="Bohemia Interactive"; url="https://www.arma3.com"; }; - class Item7 + class Item9 + { + className="ace_cargo"; + name="ACE3 - Cargo"; + author="ACE-Team"; + url="http://ace3mod.com/"; + }; + class Item10 { className="A3_Structures_F_Mil"; name="Arma 3 - Military Buildings and Structures"; author="Bohemia Interactive"; url="https://www.arma3.com"; }; - class Item8 + class Item11 { className="A3_Ui_F_Exp"; name="Arma 3 Apex - User Interface"; author="Bohemia Interactive"; url="https://www.arma3.com"; }; - class Item9 + class Item12 + { + className="ace_explosives"; + name="ACE3 - Explosives"; + author="ACE-Team"; + url="http://ace3mod.com/"; + }; + class Item13 { className="A3_Structures_F_Ind"; name="Arma 3 - Industrial Structures"; author="Bohemia Interactive"; url="https://www.arma3.com"; }; - class Item10 + class Item14 { className="A3_Structures_F_EPB"; name="Arma 3 Adapt Episode - Buildings and Structures"; author="Bohemia Interactive"; url="https://www.arma3.com"; }; + class Item15 + { + className="ace_interaction"; + name="ACE3 - Interaction"; + author="ACE-Team"; + url="http://ace3mod.com/"; + }; + class Item16 + { + className="A3_Modules_F_Curator"; + name="Arma 3 Zeus Update - Scripted Modules"; + author="Bohemia Interactive"; + url="https://www.arma3.com"; + }; }; }; randomSeed=11834268; @@ -440,7 +488,7 @@ class Mission }; class Entities { - items=255; + items=256; class Item0 { dataType="Group"; @@ -503,8 +551,8 @@ class Mission name="Synd_HQ"; markerType="RECTANGLE"; type="rectangle"; - a=50; - b=50; + a=100; + b=100; id=2; }; class Item2 @@ -6654,6 +6702,97 @@ class Mission type="HeadlessClient_F"; atlOffset=-0.040466309; }; + class Item255 + { + dataType="Logic"; + class PositionInfo + { + position[]={9230.4902,218.21608,8736.458}; + }; + id=695; + type="ModuleCurator_F"; + atlOffset=-1.5258789e-005; + class CustomAttributes + { + class Attribute0 + { + property="ModuleCurator_F_Owner"; + expression="_this setVariable ['Owner',_value,true];"; + class Value + { + class data + { + class type + { + type[]= + { + "STRING" + }; + }; + value="#adminLogged"; + }; + }; + }; + class Attribute1 + { + property="ModuleCurator_F_Forced"; + expression="_this setVariable ['Forced',_value,true];"; + class Value + { + class data + { + class type + { + type[]= + { + "SCALAR" + }; + }; + value=0; + }; + }; + }; + class Attribute2 + { + property="ModuleCurator_F_Name"; + expression="_this setVariable ['Name',_value,true];"; + class Value + { + class data + { + class type + { + type[]= + { + "STRING" + }; + }; + value=""; + }; + }; + }; + class Attribute3 + { + property="ModuleCurator_F_Addons"; + expression="_this setVariable ['Addons',_value,true];"; + class Value + { + class data + { + class type + { + type[]= + { + "SCALAR" + }; + }; + value=3; + }; + }; + }; + nAttributes=4; + }; + }; }; class Connections { diff --git a/A3-Antistasi/Templates/malosIFA.sqf b/A3-Antistasi/Templates/malosIFA.sqf index 7926c57188..dc6ba00edb 100644 --- a/A3-Antistasi/Templates/malosIFA.sqf +++ b/A3-Antistasi/Templates/malosIFA.sqf @@ -19,8 +19,9 @@ vehNATORepairTruck = "LIB_OpelBlitz_Parm"; vehNATOLight = vehNATOLightArmed + vehNATOLightUnarmed; vehNATOAPC = ["LIB_SdKfz251","LIB_SdKfz234_4","LIB_SdKfz234_3","LIB_SdKfz234_2"]; vehNATOTank = "LIB_PzKpfwVI_B_tarn51d"; +vehNATOAllTanks = [vehNATOTank]; vehNATOAA = "LIB_FlakPanzerIV_Wirbelwind"; -vehNATOAttack = vehNATOAPC + [vehNATOTank]; +vehNATOAttack = vehNATOAPC + vehNATOAllTanks; vehNATOBoat = "B_T_Boat_Armed_01_minigun_F"; vehNATORBoat = "B_T_Boat_Transport_01_F"; vehNATOBoats = [vehNATOBoat,vehNATORBoat]; @@ -67,4 +68,7 @@ flagNATOmrk = "LIB_faction_WEHRMACHT"; nameMalos = "Wehrmacht"; if (isServer) then {"NATO_carrier" setMarkerText "Wehrmacht Reinforcements"}; -{cascos pushBackUnique (getUnitLoadout _x select 6)} forEach NATOSquad; \ No newline at end of file +{cascos pushBackUnique (getUnitLoadout _x select 6)} forEach NATOSquad; + +rifleTier1NATO = "LIB_MP40"; +rifleTier2NATO = "LIB_MP44"; \ No newline at end of file diff --git a/A3-Antistasi/Templates/malosRHSGREF.sqf b/A3-Antistasi/Templates/malosRHSGREF.sqf index ff773a96d6..63f20d1e4a 100644 --- a/A3-Antistasi/Templates/malosRHSGREF.sqf +++ b/A3-Antistasi/Templates/malosRHSGREF.sqf @@ -21,8 +21,9 @@ vehNATORepairTruck = "rhsgref_ins_g_ural_repair"; vehNATOLight = vehNATOLightArmed + vehNATOLightUnarmed; vehNATOAPC = ["rhsgref_ins_g_btr60","rhsgref_ins_g_btr70","rhsgref_BRDM2_ins_g","rhsgref_ins_g_bmp2k"];//"B_T_APC_Tracked_01_CRV_F" has no cargo seats vehNATOTank = "rhsgref_ins_g_t72bc"; +vehNATOAllTanks = [vehNATOTank]; vehNATOAA = "rhsgref_ins_g_zsu234"; -vehNATOAttack = vehNATOAPC + [vehNATOTank]; +vehNATOAttack = vehNATOAPC + vehNATOAllTanks; vehNATOBoat = "I_Boat_Armed_01_minigun_F"; vehNATORBoat = "I_Boat_Transport_01_F"; vehNATOBoats = [vehNATOBoat,vehNATORBoat]; @@ -32,8 +33,8 @@ vehNATOPatrolHeli = "rhsgref_ins_g_Mi8amt"; vehNATOTransportHelis = ["rhsgref_ins_g_Mi8amt","rhsgref_cdf_reg_Mi8amt"]; vehNATOAttackHelis = ["rhsgref_cdf_Mi24D","rhsgref_cdf_Mi35","rhsgref_cdf_reg_Mi17Sh"]; vehNATOAir = vehNATOTransportHelis + vehNATOAttackHelis + [vehNATOPlane,vehNATOPlaneAA]; -vehNATOUAV = "I_UAV_02_dynamicLoadout_F"; -vehNATOUAVSmall = "I_UAV_01_F"; +vehNATOUAV = "not_supported"; +vehNATOUAVSmall = "not_supported"; vehNATOMRLS = "rhsgref_ins_g_BM21"; vehNATOMRLSMags = "rhs_mag_40Rnd_122mm_rockets";//[R Alpha 1-1:1 (Alberto),"rhs_weap_grad","rhs_weap_grad","Close_salvo","rhs_ammo_m21OF_HE",,73: rocket_230mm_f.p3d,R Alpha 1-1:1 (Alberto)] vehNATONormal = vehNATOLight + vehNATOTrucks + [vehNATOAmmoTruck, "rhsgref_BRDM2_ATGM_ins_g", vehNATORepairTruck]; @@ -73,3 +74,6 @@ flagNATOmrk = "rhs_flag_insurgents";//ok lamparaMalos = "rhs_acc_2dpZenit"; nameMalos = "ChDKZ"; if (isServer) then {"NATO_carrier" setMarkerText "ChDKZ Carrier"}; + +rifleTier1NATO = "rhs_weap_akm"; +rifleTier2NATO = "rhs_weap_akm_gp25"; \ No newline at end of file diff --git a/A3-Antistasi/Templates/malosRHSUSAF.sqf b/A3-Antistasi/Templates/malosRHSUSAF.sqf index fc1cdbbdcd..7b1bb009d4 100644 --- a/A3-Antistasi/Templates/malosRHSUSAF.sqf +++ b/A3-Antistasi/Templates/malosRHSUSAF.sqf @@ -13,16 +13,31 @@ NATOMortar = "RHS_M252_USMC_WD"; staticATmalos = "RHS_TOW_TriPod_USMC_WD"; staticAAmalos = "RHS_Stinger_AA_pod_D"; -vehNATOLightArmed = ["rhsusf_m1025_w_s_m2","rhsusf_rg33_m2_usmc_wd"]; -vehNATOLightUnarmed = ["rhsusf_m1025_w_s","rhsusf_m998_w_s_2dr","rhsusf_m998_w_s_2dr_fulltop","rhsusf_m998_w_s_4dr"]; -vehNATOTrucks = ["rhsusf_M1078A1P2_wd_open_fmtv_usarmy","rhsusf_M1078A1P2_B_wd_fmtv_usarmy","rhsusf_M1078A1P2_B_wd_open_fmtv_usarmy","rhsusf_M1083A1P2_wd_fmtv_usarmy"]; +// vehNATOLightArmed = ["rhsusf_m1025_w_s_m2","rhsusf_rg33_m2_usmc_wd"]; +vehNATOLightArmed = ["rhsusf_m1043_w_s_m2","rhsusf_m1025_w_s_m2", "rhsusf_CGRCAT1A2_M2_usmc_wd", "rhsusf_M1232_MC_M2_usmc_wd", "rhsusf_M1220_M153_M2_usarmy_wd", "rhsusf_M1220_M2_usarmy_wd", "rhsusf_M1230_M2_usarmy_wd", "rhsusf_M1232_M2_usarmy_wd", "rhsusf_M1237_M2_usarmy_wd"]; +//vehNATOLightUnarmed = ["rhsusf_m1025_w_s","rhsusf_m998_w_s_2dr","rhsusf_m998_w_s_2dr_fulltop","rhsusf_m998_w_s_4dr"]; +vehNATOLightUnarmed = ["rhsusf_M1230a1_usarmy_wd", "rhsusf_M1232_usarmy_wd", "rhsusf_CGRCAT1A2_usmc_wd", "rhsusf_mrzr4_d", "rhsusf_m1025_w", "rhsusf_m1043_w", "rhsusf_m998_w_2dr_fulltop", "rhsusf_m998_w_2dr_halftop", "rhsusf_m998_w_2dr", "rhsusf_m998_w_4dr_fulltop", "rhsusf_m998_w_4dr_halftop", "rhsusf_m998_w_4dr", "rhsusf_M1220_usarmy_wd"]; + +vehNATOLight = vehNATOLightArmed + vehNATOLightUnarmed; + +//vehNATOTrucks = ["rhsusf_M1078A1P2_wd_open_fmtv_usarmy","rhsusf_M1078A1P2_B_wd_fmtv_usarmy","rhsusf_M1078A1P2_B_wd_open_fmtv_usarmy","rhsusf_M1083A1P2_wd_fmtv_usarmy"]; +vehNATOTrucks = ["rhsusf_M1078A1P2_WD_fmtv_usarmy", "rhsusf_M1078A1P2_B_WD_fmtv_usarmy", "rhsusf_M1078A1P2_B_M2_WD_fmtv_usarmy", "rhsusf_M1083A1P2_WD_fmtv_usarmy", "rhsusf_M1083A1P2_B_WD_fmtv_usarmy", "rhsusf_M1083A1P2_B_M2_WD_fmtv_usarmy", "rhsusf_M1078A1R_SOV_M2_D_fmtv_socom"]; + vehNATOAmmoTruck = "rhsusf_M977A4_AMMO_BKIT_usarmy_wd"; vehNATORepairTruck = "rhsusf_M977A4_REPAIR_BKIT_usarmy_wd"; -vehNATOLight = vehNATOLightArmed + vehNATOLightUnarmed; -vehNATOAPC = ["RHS_M2A3_BUSKIII_wd","RHS_M2A3_BUSKI_wd","RHS_M2A3_wd","RHS_M2A3_wd","RHS_M2A2_BUSKI_WD","RHS_M2A2_wd","rhsusf_m113_usarmy_M240","rhsusf_m113_usarmy_MK19"];//"B_T_APC_Tracked_01_CRV_F" has no cargo seats + + +//vehNATOAPC = ["RHS_M2A3_BUSKIII_wd","RHS_M2A3_BUSKI_wd","RHS_M2A3_wd","RHS_M2A3_wd","RHS_M2A2_BUSKI_WD","RHS_M2A2_wd","rhsusf_m113_usarmy_M240","rhsusf_m113_usarmy_MK19"];//"B_T_APC_Tracked_01_CRV_F" has no cargo seats +vehNATOAPC = ["rhsusf_m113_usarmy_supply", "rhsusf_m113_usarmy", "rhsusf_m113_usarmy_M2_90", "rhsusf_m113_usarmy_M240", "rhsusf_m113_usarmy_medical", "rhsusf_m113_usarmy_MK19", "rhsusf_m113_usarmy_MK19_90", "rhsusf_m113_usarmy_unarmed", "RHS_M2A2_wd", "RHS_M2A2_BUSKI_WD", "RHS_M2A3_wd", "RHS_M2A3_BUSKI_wd", "RHS_M2A3_BUSKIII_wd", "RHS_M6_wd", "rhsusf_M1117_W"]; + vehNATOTank = "rhsusf_m1a1fep_wd"; + +vehNATOAllTanks = ["rhsusf_m1a1fep_wd", "rhsusf_m1a1aimwd_usarmy", "rhsusf_m1a1aim_tuski_wd", "rhsusf_m1a2sep1wd_usarmy", "rhsusf_m1a2sep1tuskiwd_usarmy", "rhsusf_m1a2sep1tuskiiwd_usarmy", "rhsusf_m1a1fep_wd", "rhsusf_m1a1fep_od", "rhsusf_m1a1hc_wd"]; + vehNATOAA = "RHS_M6"; -vehNATOAttack = vehNATOAPC + [vehNATOTank]; + +vehNATOAttack = vehNATOAPC + vehNATOAllTanks; + vehNATOBoat = "rhsusf_mkvsoc"; vehNATORBoat = "B_T_Boat_Transport_01_F"; vehNATOBoats = [vehNATOBoat,vehNATORBoat,"rhsusf_m113_usarmy_MK19"]; @@ -32,8 +47,8 @@ vehNATOPatrolHeli = "RHS_MELB_MH6M"; vehNATOTransportHelis = ["RHS_UH60M_d","RHS_CH_47F",vehNATOPatrolHeli,"RHS_C130J"]; vehNATOAttackHelis = ["RHS_MELB_AH6M_L","RHS_AH64D_wd","RHS_UH1Y"]; vehNATOAir = vehNATOTransportHelis + vehNATOAttackHelis + [vehNATOPlane,vehNATOPlaneAA]; -vehNATOUAV = "B_UAV_02_F";//ok -vehNATOUAVSmall = "B_UAV_01_F"; +vehNATOUAV = "not_supported";//ok +vehNATOUAVSmall = "not_supported"; vehNATOMRLS = "rhsusf_m109_usarmy"; vehNATOMRLSMags = "rhs_mag_155mm_m795_28";//["Sh_155mm_AMOS","rhs_mag_155mm_m795_28",,B Alpha 1-1:3 (Alberto)] vehNATONormal = vehNATOLight + vehNATOTrucks + [vehNATOAmmoTruck, "rhsusf_M978A4_BKIT_usarmy_wd","rhsusf_m113_usarmy_medical", vehNATORepairTruck]; @@ -70,4 +85,7 @@ flagNATOmrk = "flag_USA";//ok lamparaMalos = "acc_flashlight"; nameMalos = "USAF"; -if (isServer) then {"NATO_carrier" setMarkerText "USMC Carrier"}; \ No newline at end of file +if (isServer) then {"NATO_carrier" setMarkerText "USMC Carrier"}; + +rifleTier1NATO = "rhsusf_weap_MP7A2"; +rifleTier2NATO = "rhs_weap_hk416d10"; \ No newline at end of file diff --git a/A3-Antistasi/Templates/malosVanilla.sqf b/A3-Antistasi/Templates/malosVanilla.sqf index ed2aae0818..92b32676be 100644 --- a/A3-Antistasi/Templates/malosVanilla.sqf +++ b/A3-Antistasi/Templates/malosVanilla.sqf @@ -21,8 +21,9 @@ vehNATORepairTruck = "B_T_Truck_01_repair_F"; vehNATOLight = vehNATOLightArmed + vehNATOLightUnarmed; vehNATOAPC = ["B_T_APC_Wheeled_01_cannon_F","B_T_APC_Tracked_01_rcws_F"];//"B_T_APC_Tracked_01_CRV_F" has no cargo seats vehNATOTank = "B_T_MBT_01_cannon_F"; +vehNATOAllTanks = [vehNATOTank]; vehNATOAA = "B_T_APC_Tracked_01_AA_F"; -vehNATOAttack = vehNATOAPC + [vehNATOTank]; +vehNATOAttack = vehNATOAPC + vehNATOAllTanks; vehNATOBoat = "B_T_Boat_Armed_01_minigun_F"; vehNATORBoat = "B_T_Boat_Transport_01_F"; vehNATOBoats = [vehNATOBoat,vehNATORBoat,"B_T_APC_Wheeled_01_cannon_F"]; @@ -66,4 +67,7 @@ municionNATO append ["30Rnd_65x39_Caseless_mag","30Rnd_65x39_caseless_mag_Tracer flagNATOmrk = "flag_NATO"; nameMalos = "NATO"; -if (isServer) then {"NATO_carrier" setMarkerText "NATO Carrier"}; \ No newline at end of file +if (isServer) then {"NATO_carrier" setMarkerText "NATO Carrier"}; + +rifleTier1NATO = "arifle_MX_F"; +rifleTier2NATO = "arifle_AK12_F"; \ No newline at end of file diff --git a/A3-Antistasi/Templates/malosVanillaAltis.sqf b/A3-Antistasi/Templates/malosVanillaAltis.sqf index 0ba917f1b2..756a2298a8 100644 --- a/A3-Antistasi/Templates/malosVanillaAltis.sqf +++ b/A3-Antistasi/Templates/malosVanillaAltis.sqf @@ -21,8 +21,9 @@ vehNATORepairTruck = "B_Truck_01_repair_F"; vehNATOLight = vehNATOLightArmed + vehNATOLightUnarmed; vehNATOAPC = ["B_APC_Wheeled_01_cannon_F","B_APC_Tracked_01_rcws_F"];//"B_T_APC_Tracked_01_CRV_F" has no cargo seats vehNATOTank = "B_MBT_01_cannon_F"; +vehNATOAllTanks = [vehNATOTank]; vehNATOAA = "B_APC_Tracked_01_AA_F"; -vehNATOAttack = vehNATOAPC + [vehNATOTank]; +vehNATOAttack = vehNATOAPC + vehNATOAllTanks; vehNATOBoat = "B_Boat_Armed_01_minigun_F"; vehNATORBoat = "B_Boat_Transport_01_F"; vehNATOBoats = [vehNATOBoat,vehNATORBoat,"B_APC_Wheeled_01_cannon_F"]; @@ -66,4 +67,7 @@ municionNATO append ["30Rnd_65x39_Caseless_mag","30Rnd_65x39_caseless_mag_Tracer flagNATOmrk = "flag_NATO"; nameMalos = "NATO"; -if (isServer) then {"NATO_carrier" setMarkerText "NATO Carrier"}; \ No newline at end of file +if (isServer) then {"NATO_carrier" setMarkerText "NATO Carrier"}; + +rifleTier1NATO = "arifle_MX_F"; +rifleTier2NATO = "arifle_AK12_F"; \ No newline at end of file diff --git a/A3-Antistasi/Templates/malosVanillaAltisB.sqf b/A3-Antistasi/Templates/malosVanillaAltisB.sqf index f12f35ac37..6fb3e73709 100644 --- a/A3-Antistasi/Templates/malosVanillaAltisB.sqf +++ b/A3-Antistasi/Templates/malosVanillaAltisB.sqf @@ -19,8 +19,9 @@ vehNATORepairTruck = "I_Truck_02_box_F"; vehNATOLight = vehNATOLightArmed + vehNATOLightUnarmed; vehNATOAPC = ["I_APC_Wheeled_03_cannon_F"]; vehNATOTank = "I_MBT_03_cannon_F"; +vehNATOAllTanks = [vehNATOTank]; vehNATOAA = "I_LT_01_AA_F"; -vehNATOAttack = vehNATOAPC + [vehNATOTank]; +vehNATOAttack = vehNATOAPC + vehNATOAllTanks; vehNATOBoat = "I_Boat_Armed_01_minigun_F"; vehNATORBoat = "I_Boat_Transport_01_F"; vehNATOBoats = [vehNATOBoat,vehNATORBoat]; @@ -65,4 +66,7 @@ municionNATO append ["30Rnd_556x45_Stanag","200Rnd_65x39_cased_Box","20Rnd_556x4 flagNATOmrk = "flag_AltisColonial"; nameMalos = "AAF"; -if (isServer) then {"NATO_carrier" setMarkerText "AAF Carrier"}; \ No newline at end of file +if (isServer) then {"NATO_carrier" setMarkerText "AAF Carrier"}; + +rifleTier1NATO = "arifle_Mk20_F"; +rifleTier2NATO = "arifle_Mk20_GL_F"; \ No newline at end of file diff --git a/A3-Antistasi/Templates/muyMalosIFA.sqf b/A3-Antistasi/Templates/muyMalosIFA.sqf index 25738e8989..c8c1343583 100644 --- a/A3-Antistasi/Templates/muyMalosIFA.sqf +++ b/A3-Antistasi/Templates/muyMalosIFA.sqf @@ -18,8 +18,9 @@ vehCSATAmmoTruck = "LIB_US6_Ammo"; vehCSATLight = vehCSATLightArmed + vehCSATLightUnarmed; vehCSATAPC = ["LIB_SdKfz251_captured","LIB_SU85","LIB_T34_76","LIB_T34_85"]; vehCSATTank = "LIB_JS2_43"; +vehCSATAllTanks = [vehCSATTank]; vehCSATAA = "LIB_Zis5v_61K"; -vehCSATAttack = vehCSATAPC + [vehCSATTank]; +vehCSATAttack = vehCSATAPC + vehCSATAllTanks; vehCSATBoat = "O_T_Boat_Armed_01_hmg_F"; vehCSATRBoat = "O_T_Boat_Transport_01_F"; vehCSATBoats = [vehCSATBoat,vehCSATRBoat]; diff --git a/A3-Antistasi/Templates/muyMalosRHSAFRF.sqf b/A3-Antistasi/Templates/muyMalosRHSAFRF.sqf index cf2c773232..f6fef04e2c 100644 --- a/A3-Antistasi/Templates/muyMalosRHSAFRF.sqf +++ b/A3-Antistasi/Templates/muyMalosRHSAFRF.sqf @@ -11,15 +11,27 @@ CSATMG = "rhs_KORD_high_VMF"; staticATmuyMalos = "rhs_Kornet_9M133_2_vmf"; staticAAmuyMalos = "RHS_ZU23_MSV"; -vehCSATLightArmed = ["rhsgref_BRDM2_vdv","rhsgref_BRDM2_HQ_vdv","rhsgref_BRDM2_ATGM_vdv","rhs_tigr_sts_vdv"]; -vehCSATLightUnarmed = ["rhs_tigr_vdv","rhs_uaz_vdv"]; -vehCSATTrucks = ["rhs_kamaz5350_vdv","rhs_kamaz5350_open_vdv","RHS_Ural_Open_VDV_01","rhs_gaz66_vdv"]; -vehCSATAmmoTruck = "rhs_gaz66_ammo_vmf"; +//vehCSATLightArmed = ["rhsgref_BRDM2_vdv","rhsgref_BRDM2_HQ_vdv","rhsgref_BRDM2_ATGM_vdv","rhs_tigr_sts_vdv"]; +vehCSATLightArmed = ["rhsgref_BRDM2_HQ_msv", "rhs_tigr_sts_3camo_vdv", "rhs_tigr_sts_vdv", "rhsgref_BRDM2_ATGM_vdv"]; +//vehCSATLightUnarmed = ["rhs_tigr_vdv","rhs_uaz_vdv"]; +vehCSATLightUnarmed = ["rhs_tigr_vdv", "rhs_tigr_3camo_vdv", "rhs_tigr_m_vdv", "rhs_tigr_m_3camo_vdv", "rhs_uaz_vdv", "rhs_uaz_open_vdv", "rhsgref_BRDM2UM_vdv"]; + vehCSATLight = vehCSATLightArmed + vehCSATLightUnarmed; -vehCSATAPC = ["rhs_bmp2d_vdv","rhs_bmp1p_vdv"]; + +//vehCSATTrucks = ["rhs_kamaz5350_vdv","rhs_kamaz5350_open_vdv","RHS_Ural_Open_VDV_01","rhs_gaz66_vdv"]; +vehCSATTrucks = ["rhs_gaz66_vdv", "rhs_gaz66o_vdv", "rhs_kamaz5350_vdv", "rhs_kamaz5350_open_vdv", "RHS_Ural_VDV_01", "RHS_Ural_Open_VDV_01", "rhs_zil131_vdv", "rhs_zil131_open_vdv"]; + +vehCSATAmmoTruck = "rhs_gaz66_ammo_vmf"; + +// vehCSATAPC = ["rhs_bmp2d_vdv","rhs_bmp1p_vdv"]; +vehCSATAPC = ["rhs_bmd1", "rhs_bmd1k", "rhs_bmd1p", "rhs_bmd1pk", "rhs_bmd1r", "rhs_bmd2", "rhs_bmd2k", "rhs_bmd2m", "rhs_bmd4_vdv", "rhs_bmd4m_vdv", "rhs_bmd4ma_vdv", "rhs_bmp1_vdv", "rhs_bmp1d_vdv", "rhs_bmp1k_vdv", "rhs_bmp1p_vdv", "rhs_bmp2e_vdv", "rhs_bmp2_vdv", "rhs_bmp2d_vdv", "rhs_bmp2k_vdv", "rhs_brm1k_vdv", "rhs_prp3_vdv"]; + vehCSATTank = "rhs_sprut_vdv"; +vehCSATAllTanks = ["rhs_sprut_vdv", "rhs_t72ba_tv", "rhs_t72bb_tv", "rhs_t72bc_tv", "rhs_t72bd_tv", "rhs_t72be_tv", "rhs_t80", "rhs_t80a", "rhs_t80b", "rhs_t80bk", "rhs_t80bv", "rhs_t80bvk", "rhs_t80u", "rhs_t80u45m", "rhs_t80ue1", "rhs_t80uk", "rhs_t80um", "rhs_t90_tv", "rhs_t90a_tv"]; + vehCSATAA = "rhs_zsu234_aa"; -vehCSATAttack = vehCSATAPC + [vehCSATTank]; +vehCSATAttack = vehCSATAPC + vehCSATAllTanks; + vehCSATBoat = "O_T_Boat_Armed_01_hmg_F"; vehCSATRBoat = "O_T_Boat_Transport_01_F"; vehCSATBoats = [vehCSATBoat,vehCSATRBoat,"rhs_btr80a_vdv"]; @@ -29,8 +41,8 @@ vehCSATPatrolHeli = "rhs_ka60_c"; vehCSATTransportHelis = ["RHS_Mi8mt_vdv","RHS_Mi8mt_vv","RHS_Mi8mt_Cargo_vv",vehCSATPatrolHeli]; vehCSATAttackHelis = ["RHS_Mi24V_vdv","RHS_Mi8MTV3_FAB_vdv"]; vehCSATAir = vehCSATTransportHelis + vehCSATAttackHelis + [vehCSATPlane,vehCSATPlaneAA]; -vehCSATUAV = "rhs_pchela1t_vvs"; -vehCSATUAVSmall = "O_UAV_01_F"; +vehCSATUAV = "not_supported"; +vehCSATUAVSmall = "not_supported"; vehCSATMRLS = "rhs_2s3_tv"; vehCSATMRLSMags = "rhs_mag_HE_2a33"; vehCSATNormal = vehCSATLight + vehCSATTrucks + [vehCSATAmmoTruck, "rhs_gaz66_repair_vdv","RHS_Ural_Fuel_VDV_01"]; diff --git a/A3-Antistasi/Templates/muyMalosVanilla.sqf b/A3-Antistasi/Templates/muyMalosVanilla.sqf index 9532f883b8..853a56b066 100644 --- a/A3-Antistasi/Templates/muyMalosVanilla.sqf +++ b/A3-Antistasi/Templates/muyMalosVanilla.sqf @@ -20,8 +20,9 @@ vehCSATAmmoTruck = "O_T_Truck_03_ammo_ghex_F"; vehCSATLight = vehCSATLightArmed + vehCSATLightUnarmed; vehCSATAPC = ["O_T_APC_Wheeled_02_rcws_ghex_F","O_T_APC_Tracked_02_cannon_ghex_F"]; vehCSATTank = "O_T_MBT_02_cannon_ghex_F"; +vehCSATAllTanks = [vehCSATTank]; vehCSATAA = "O_T_APC_Tracked_02_AA_ghex_F"; -vehCSATAttack = vehCSATAPC + [vehCSATTank]; +vehCSATAttack = vehCSATAPC + vehCSATAllTanks; vehCSATBoat = "O_T_Boat_Armed_01_hmg_F"; vehCSATRBoat = "O_T_Boat_Transport_01_F"; vehCSATBoats = [vehCSATBoat,vehCSATRBoat,"O_T_APC_Wheeled_02_rcws_ghex_F"]; diff --git a/A3-Antistasi/Templates/muyMalosVanillaAltis.sqf b/A3-Antistasi/Templates/muyMalosVanillaAltis.sqf index 92430e3883..a95aca3ed0 100644 --- a/A3-Antistasi/Templates/muyMalosVanillaAltis.sqf +++ b/A3-Antistasi/Templates/muyMalosVanillaAltis.sqf @@ -18,8 +18,9 @@ vehCSATAmmoTruck = "O_Truck_03_ammo_F"; vehCSATLight = vehCSATLightArmed + vehCSATLightUnarmed; vehCSATAPC = ["O_APC_Wheeled_02_rcws_v2_F","O_APC_Tracked_02_cannon_F"]; vehCSATTank = "O_MBT_02_cannon_F"; +vehCSATAllTanks = [vehCSATTank]; vehCSATAA = "O_APC_Tracked_02_AA_F"; -vehCSATAttack = vehCSATAPC + [vehCSATTank]; +vehCSATAttack = vehCSATAPC + vehCSATAllTanks; vehCSATBoat = "O_Boat_Armed_01_hmg_F"; vehCSATRBoat = "O_Boat_Transport_01_F"; vehCSATBoats = [vehCSATBoat,vehCSATRBoat,"O_APC_Wheeled_02_rcws_v2_F"]; diff --git a/A3-Antistasi/ataqueAAF.sqf b/A3-Antistasi/ataqueAAF.sqf index 0517e637af..c13a4f2485 100644 --- a/A3-Antistasi/ataqueAAF.sqf +++ b/A3-Antistasi/ataqueAAF.sqf @@ -1,367 +1,510 @@ +params [ + ["_notBuenos", false] +]; + //if ([0.5] call A3A_fnc_fogCheck) exitWith {}; -private ["_objetivos","_marcadores","_base","_objetivo","_cuenta","_aeropuerto","_datos","_prestigeOPFOR","_scoreLand","_scoreAir","_analizado","_garrison","_size","_estaticas","_salir"]; +private ["_objetivos", "_marcadores", "_base", "_objetivo", "_cuenta", "_aeropuerto", "_datos", "_prestigeOPFOR", "_scoreLand", "_scoreAir", "_analizado", "_garrison", "_size", "_estaticas", "_salir"]; + +diag_log format ["[ataqueAAF] Starting"]; _objetivos = []; _marcadores = []; _cuentaFacil = 0; _natoIsFull = false; _csatIsFull = false; -_aeropuertos = aeropuertos select {([_x,false] call A3A_fnc_airportCanAttack) and (lados getVariable [_x,sideUnknown] != buenos)}; -_objetivos = marcadores - controles - puestosFIA - ["Synd_HQ","NATO_carrier","CSAT_carrier"] - destroyedCities; -if (gameMode != 1) then {_objetivos = _objetivos select {lados getVariable [_x,sideUnknown] == buenos}}; + +_aeropuertos = aeropuertos select { + ([_x, false] call A3A_fnc_airportCanAttack) and (lados getVariable[_x, sideUnknown] != buenos) +}; + +diag_log format ["[ataqueAAF] Initial airport list %1", _aeropuertos]; + +_objetivos = marcadores - controles - puestosFIA - ["Synd_HQ", "NATO_carrier", "CSAT_carrier"] - destroyedCities; + +diag_log format ["[ataqueAAF] Initial object list %1", _objetivos]; + +if (_notBuenos) then { + diag_log format ["[ataqueAAF] CSAT vs NATO mode"]; + if (gameMode != 1 or tierWar < 2) exitWith { + diag_log format ["[ataqueAAF] Aborted as game mode or tierWar is not correct for CSAT vs NATO attacks"]; + false + }; + + _objetivos = _objetivos select { + lados getVariable[_x, sideUnknown] != buenos + }; + diag_log format ["[ataqueAAF] Filtered objective list for CSAT vs NATO mode: %1", _objetivos]; + +} else { + if (gameMode != 1) then { + diag_log format ["[ataqueAAF] vs SDK mode"]; + _objetivos = _objetivos select { + lados getVariable[_x, sideUnknown] == buenos + }; + diag_log format ["[ataqueAAF] Filtered objective list for vs SDK mode: %1", _objetivos]; + }; +}; + //_objetivosSDK = _objetivos select {lados getVariable [_x,sideUnknown] == buenos}; -if ((tierWar < 2) and (gameMode <= 2)) then - { - _aeropuertos = _aeropuertos select {(lados getVariable [_x,sideUnknown] == malos)}; - //_objetivos = _objetivosSDK; - _objetivos = _objetivos select {lados getVariable [_x,sideUnknown] == buenos}; - } -else - { - if (gameMode != 4) then {if ({lados getVariable [_x,sideUnknown] == malos} count _aeropuertos == 0) then {_aeropuertos pushBack "NATO_carrier"}}; - if (gameMode != 3) then {if ({lados getVariable [_x,sideUnknown] == muyMalos} count _aeropuertos == 0) then {_aeropuertos pushBack "CSAT_carrier"}}; - if (([vehNATOPlane] call A3A_fnc_vehAvailable) and ([vehNATOMRLS] call A3A_fnc_vehAvailable) and ([vehNATOTank] call A3A_fnc_vehAvailable)) then {_natoIsFull = true}; - if (([vehCSATPlane] call A3A_fnc_vehAvailable) and ([vehCSATMRLS] call A3A_fnc_vehAvailable) and ([vehCSATTank] call A3A_fnc_vehAvailable)) then {_csatIsFull = true}; - }; -if (gameMode != 4) then - { - if (tierWar < 3) then {_objetivos = _objetivos - ciudades}; - } -else - { - if (tierWar < 5) then {_objetivos = _objetivos - ciudades}; - }; +if ((tierWar < 2) and (gameMode <= 2)) then { + diag_log format ["[ataqueAAF] NATO vs SDK mode due to tierWar or game mode"]; + _aeropuertos = _aeropuertos select { lados getVariable[_x, sideUnknown] == malos }; + //_objetivos = _objetivosSDK; + _objetivos = _objetivos select { lados getVariable[_x, sideUnknown] == buenos }; +} else { + if (gameMode != 4) then { + if ({ lados getVariable[_x, sideUnknown] == malos } count _aeropuertos == 0) then { + diag_log format ["[ataqueAAF] Adding NATO carrier to airports as NATO ran out of real ones"]; + _aeropuertos pushBack "NATO_carrier"; + } + }; + if (gameMode != 3) then { + if ({lados getVariable[_x, sideUnknown] == muyMalos} count _aeropuertos == 0) then { + diag_log format ["[ataqueAAF] Adding CSAT carrier to airports as CSAT ran out of real ones"]; + _aeropuertos pushBack "CSAT_carrier" + } + }; + if (([vehNATOPlane] call A3A_fnc_vehAvailable) and ([vehNATOMRLS] call A3A_fnc_vehAvailable) and ([vehNATOTank] call A3A_fnc_vehAvailable)) then { + diag_log format ["[ataqueAAF] NATO is fully stocked"]; + _natoIsFull = true + }; + if (([vehCSATPlane] call A3A_fnc_vehAvailable) and ([vehCSATMRLS] call A3A_fnc_vehAvailable) and ([vehCSATTank] call A3A_fnc_vehAvailable)) then { + diag_log format ["[ataqueAAF] CSAT is fully stocked"]; + _csatIsFull = true + }; +}; + +if (gameMode != 4) then { + if (tierWar < 3) then { + _objetivos = _objetivos - ciudades; + diag_log format ["[ataqueAAF] Removing cities due to tierWar, new object list: %1", _objetivos]; + }; +} +else { + if (tierWar < 5) then { + _objetivos = _objetivos - ciudades; + diag_log format ["[ataqueAAF] Removing cities due to tierWar, new object list: %1", _objetivos]; + }; +}; + //lets keep the nearest targets for each AI airbase in the target list, so we ensure even when they are surrounded of friendly zones, they remain as target _nearestObjectives = []; + { -_lado = lados getVariable [_x,sideUnknown]; -_tmpTargets = _objetivos select {lados getVariable [_x,sideUnknown] != _lado}; -if !(_tmpTargets isEqualTo []) then - { - _nearestTarget = [_tmpTargets,getMarkerPos _x] call BIS_fnc_nearestPosition; - _nearestObjectives pushBack _nearestTarget; - }; + _lado = lados getVariable[_x, sideUnknown]; + _tmpTargets = _objetivos select {lados getVariable[_x, sideUnknown] != _lado}; + if !(_tmpTargets isEqualTo[]) then { + _nearestTarget = [_tmpTargets, getMarkerPos _x] call BIS_fnc_nearestPosition; + _nearestObjectives pushBack _nearestTarget; + }; } forEach _aeropuertos; + +diag_log format ["[ataqueAAF] Nearest Objectives to airports list: %1", _nearestObjectives]; + //the following discards targets which are surrounded by friendly zones, excluding airbases and the nearest targets -_objetivosProv = _objetivos - aeropuertos - _nearestObjectives; +_objetivosProv = _objetivos - aeropuertos - _nearestObjectives; + +private _zones_of_control = marcadores - controles - ciudades - puestosFIA; { -_posObj = getMarkerPos _x; -_ladoObj = lados getVariable [_x,sideUnknown]; -if (((marcadores - controles - ciudades - puestosFIA) select {lados getVariable [_x,sideUnknown] != _ladoObj}) findIf {getMarkerPos _x distance2D _posObj < 2000} == -1) then {_objetivos = _objetivos - [_x]}; + _posObj = getMarkerPos _x; + _ladoObj = lados getVariable[_x, sideUnknown]; + + if ((_zones_of_control select { lados getVariable[_x, sideUnknown] != _ladoObj }) findIf { + getMarkerPos _x distance2D _posObj < 3000 + } == -1) then { + _objetivos = _objetivos - [_x] + }; } forEach _objetivosProv; -if (_objetivos isEqualTo []) exitWith {}; + +if (_objetivos isEqualTo[]) exitWith { + diag_log format ["[ataqueAAF] Aborting as objective list is empty", _objetivos]; +}; + +diag_log format ["[ataqueAAF] Filtered Objectives list: %1", _objetivos]; + +// if(_notBuenos && gameMode == 1) then { +// if(random(1) < 0.5 && {lados getVariable[_x, sideUnknown] == muyMalos} count _objetivos > 0) then { +// _objetivos = _objetivos select {lados getVariable[_x, sideUnknown] == muyMalos}; +// diag_log format ["[ataqueAAF] Not buenos mode, selecting %1 %2 targets only", count _objetivos, muyMalos]; +// } else { +// _objetivos = _objetivos select {lados getVariable[_x, sideUnknown] == malos}; +// diag_log format ["[ataqueAAF] Not buenos mode, selecting %1 %2 targets only", count _objetivos, malos]; +// }; +// }; + +diag_log format ["[ataqueAAF] Filtered Objectives list 2: %1", _objetivos]; + _objetivosFinal = []; _basesFinal = []; _cuentasFinal = []; _objetivoFinal = []; _faciles = []; _facilesArr = []; -_puertoCSAT = if ({(lados getVariable [_x,sideUnknown] == muyMalos)} count puertos >0) then {true} else {false}; -_puertoNATO = if ({(lados getVariable [_x,sideUnknown] == malos)} count puertos >0) then {true} else {false}; +_puertoCSAT = ({ lados getVariable[_x, sideUnknown] == muyMalos } count puertos > 0); +_puertoNATO = ({ lados getVariable[_x, sideUnknown] == malos } count puertos > 0); _waves = 1; { -_base = _x; -_posBase = getMarkerPos _base; -_killZones = killZones getVariable [_base,[]]; -_tmpObjetivos = []; -_baseNATO = true; -if (lados getVariable [_base,sideUnknown] == malos) then - { - _tmpObjetivos = _objetivos select {lados getVariable [_x,sideUnknown] != malos}; - _tmpObjetivos = _tmpObjetivos - (ciudades select {([_x] call A3A_fnc_powerCheck) == buenos}); - } -else - { - _baseNATO = false; - _tmpObjetivos = _objetivos select {lados getVariable [_x,sideUnknown] != muyMalos}; - _tmpObjetivos = _tmpObjetivos - (ciudades select {(((server getVariable _x) select 2) + ((server getVariable _x) select 3) < 90) and ([_x] call A3A_fnc_powerCheck != malos)}); - }; - -_tmpObjetivos = _tmpObjetivos select {getMarkerPos _x distance2D _posBase < distanceForAirAttack}; -if !(_tmpObjetivos isEqualTo []) then - { - _cercano = [_tmpObjetivos,_base] call BIS_fnc_nearestPosition; - { - _esCiudad = if (_x in ciudades) then {true} else {false}; - _proceder = true; - _posSitio = getMarkerPos _x; - _esSDK = false; - _isTheSameIsland = [_x,_base] call A3A_fnc_isTheSameIsland; - if ([_x,true] call A3A_fnc_fogCheck >= 0.3) then - { - if (lados getVariable [_x,sideUnknown] == buenos) then - { - _esSDK = true; - /* - _valor = if (_baseNATO) then {prestigeNATO} else {prestigeCSAT}; - if (random 100 > _valor) then - { - _proceder = false - } - */ - }; - if (!_isTheSameIsland and (not(_x in aeropuertos))) then - { - if (!_esSDK) then {_proceder = false}; - }; - } - else - { - _proceder = false; - }; - if (_proceder) then - { - if (!_esCiudad) then - { - if !(_x in _killZones) then - { - if !(_x in _facilesArr) then - { - _sitio = _x; - if (((!(_sitio in aeropuertos)) or (_esSDK)) and !(_base in ["NATO_carrier","CSAT_carrier"])) then - { - _ladoEny = if (_baseNATO) then {muyMalos} else {malos}; - if ({(lados getVariable [_x,sideUnknown] == _ladoEny) and (getMarkerPos _x distance _posSitio < distanciaSPWN)} count aeropuertos == 0) then - { - _garrison = garrison getVariable [_sitio,[]]; - _estaticas = staticsToSave select {_x distance _posSitio < distanciaSPWN}; - _puestos = puestosFIA select {getMarkerPos _x distance _posSitio < distanciaSPWN}; - _cuenta = ((count _garrison) + (count _puestos) + (2*(count _estaticas))); - if (_cuenta <= 8) then - { - if (!hayIFA or (_posSitio distance _posBase < distanceForLandAttack)) then - { - _proceder = false; - _faciles pushBack [_sitio,_base]; - _facilesArr pushBackUnique _sitio; - }; - }; - }; - }; - }; - }; - }; - }; - if (_proceder) then - { - _times = 1; - if (_baseNATO) then - { - if ({lados getVariable [_x,sideUnknown] == malos} count aeropuertos <= 1) then {_times = 2}; - if (!_esCiudad) then - { - if ((_x in puestos) or (_x in puertos)) then - { - if (!_esSDK) then - { - if (({[_x] call A3A_fnc_vehAvailable} count vehNATOAttack > 0) or ({[_x] call A3A_fnc_vehAvailable} count vehNATOAttackHelis > 0)) then {_times = 2*_times} else {_times = 0}; - } - else - { - _times = 2*_times; - }; - } - else - { - if (_x in aeropuertos) then - { - if (!_esSDK) then - { - if (([vehNATOPlane] call A3A_fnc_vehAvailable) or (!([vehCSATAA] call A3A_fnc_vehAvailable))) then {_times = 5*_times} else {_times = 0}; - } - else - { - if (!_isTheSameIsland) then {_times = 5*_times} else {_times = 2*_times}; - }; - } - else - { - if ((!_esSDK) and _natoIsFull) then {_times = 0}; - }; - }; - }; - if (_times > 0) then - { - _aeropCercano = [aeropuertos,_posSitio] call bis_fnc_nearestPosition; - if ((lados getVariable [_aeropCercano,sideUnknown] == muyMalos) and (_x != _aeropCercano)) then {_times = 0}; - }; - } - else - { - _times = 2; - if (!_esCiudad) then - { - if ((_x in puestos) or (_x in puertos)) then - { - if (!_esSDK) then - { - if (({[_x] call A3A_fnc_vehAvailable} count vehCSATAttack > 0) or ({[_x] call A3A_fnc_vehAvailable} count vehCSATAttackHelis > 0)) then {_times = 2*_times} else {_times = 0}; - } - else - { - _times = 2*_times; - }; - } - else - { - if (_x in aeropuertos) then - { - if (!_esSDK) then - { - if (([vehCSATPlane] call A3A_fnc_vehAvailable) or (!([vehNATOAA] call A3A_fnc_vehAvailable))) then {_times = 5*_times} else {_times = 0}; - } - else - { - if (!_isTheSameIsland) then {_times = 5*_times} else {_times = 2*_times}; - }; - } - else - { - if ((!_esSDK) and _csatIsFull) then {_times = 0}; - }; - } - }; - if (_times > 0) then - { - _aeropCercano = [aeropuertos,_posSitio] call bis_fnc_nearestPosition; - if ((lados getVariable [_aeropCercano,sideUnknown] == malos) and (_x != _aeropCercano)) then {_times = 0}; - }; - }; - if (_times > 0) then - { - if ((!_esSDK) and (!_esCiudad)) then - { - //_times = _times + (floor((garrison getVariable [_x,0])/8)) - _numGarr = [_x] call A3A_fnc_garrisonSize; - if ((_numGarr/2) < count (garrison getVariable [_x,[]])) then {if ((_numGarr/3) < count (garrison getVariable [_x,[]])) then {_times = _times + 6} else {_times = _times +2}}; - }; - if (_isTheSameIsland) then - { - if (_posSitio distance _posBase < distanceForLandAttack) then - { - if (!_esCiudad) then - { - _times = _times * 4 - }; - }; - }; - if (!_esCiudad) then - { - _esMar = false; - if ((_baseNATO and _puertoNATO) or (!_baseNATO and _puertoCSAT)) then - { - for "_i" from 0 to 3 do - { - _pos = _posSitio getPos [1000,(_i*90)]; - if (surfaceIsWater _pos) exitWith {_esMar = true}; - }; - }; - if (_esMar) then {_times = _times * 2}; - }; - if (_x == _cercano) then {_times = _times * 5}; - if (_x in _killZones) then - { - _sitio = _x; - _times = _times / (({_x == _sitio} count _killZones) + 1); - }; - _times = round (_times); - _index = _objetivosFinal find _x; - if (_index == -1) then - { - _objetivosFinal pushBack _x; - _basesFinal pushBack _base; - _cuentasFinal pushBack _times; - } - else - { - if ((_times > (_cuentasFinal select _index)) or ((_times == (_cuentasFinal select _index)) and (random 1 < 0.5))) then - { - _objetivosFinal deleteAt _index; - _basesFinal deleteAt _index; - _cuentasFinal deleteAt _index; - _objetivosFinal pushBack _x; - _basesFinal pushBack _base; - _cuentasFinal pushBack _times; - }; - }; - }; - }; - if (count _faciles == 4) exitWith {}; - } forEach _tmpObjetivos; - }; -if (count _faciles == 4) exitWith {}; + _base = _x; + _posBase = getMarkerPos _base; + _killZones = killZones getVariable[_base, []]; + _tmpObjetivos = []; + _baseNATO = true; + if (lados getVariable[_base, sideUnknown] == malos) then { + _tmpObjetivos = _objetivos select { + lados getVariable[_x, sideUnknown] != malos + }; + _tmpObjetivos = _tmpObjetivos - (ciudades select { + ([_x] call A3A_fnc_powerCheck) == buenos + }); + diag_log format ["[ataqueAAF] Calculating objective ratings for %1 base %2, killzones %3", malos, _base, _killZones]; + } else { + _baseNATO = false; + _tmpObjetivos = _objetivos select { + lados getVariable[_x, sideUnknown] != muyMalos + }; + _tmpObjetivos = _tmpObjetivos - (ciudades select { + (((server getVariable _x) select 2) + ((server getVariable _x) select 3) < 90) and ([_x] call A3A_fnc_powerCheck != malos) + }); + diag_log format ["[ataqueAAF] Calculating objective ratings for %1 base %2, killzones %3", muyMalos, _base, _killZones]; + }; + + diag_log format ["[ataqueAAF] Initial objectives: %1", _tmpObjetivos]; + + _tmpObjetivos = _tmpObjetivos select { + getMarkerPos _x distance2D _posBase < distanceForAirAttack + }; + diag_log format ["[ataqueAAF] Objectives culled against air attack distance: %1", _tmpObjetivos]; + + if !(_tmpObjetivos isEqualTo[]) then { + _cercano = [_tmpObjetivos, _base] call BIS_fnc_nearestPosition; + { + diag_log format ["[ataqueAAF] Evaluating %1", _x]; + _esCiudad = + if (_x in ciudades) then { + true + } else { + false + }; + _proceder = true; + _posSitio = getMarkerPos _x; + _esSDK = false; + _isTheSameIsland = [_x, _base] call A3A_fnc_isTheSameIsland; + if ([_x, true] call A3A_fnc_fogCheck >= 0.3) then { + if (lados getVariable[_x, sideUnknown] == buenos) then { + _esSDK = true; + /* + _valor = if (_baseNATO) then {prestigeNATO} else {prestigeCSAT}; + if (random 100 > _valor) then + { + _proceder = false + } + */ + }; + if (!_isTheSameIsland and (not(_x in aeropuertos))) then { + if (!_esSDK) then { + diag_log format ["[ataqueAAF] Rejected: not same island, not airport, not SDK"]; + _proceder = false; + }; + }; + } else { + diag_log format ["[ataqueAAF] Rejected: too foggy"]; + _proceder = false; + }; + if (_proceder) then { + if (!_esCiudad) then { + if !(_x in _killZones) then { + if !(_x in _facilesArr) then { + _sitio = _x; + if ((!(_sitio in aeropuertos) or _esSDK) and !(_base in ["NATO_carrier", "CSAT_carrier"])) then { + _ladoEny = + if (_baseNATO) then { + muyMalos + } else { + malos + }; + if ({ + (lados getVariable[_x, sideUnknown] == _ladoEny) and (getMarkerPos _x distance _posSitio < distanciaSPWN) + } count aeropuertos == 0) then { + _garrison = garrison getVariable[_sitio, []]; + _estaticas = staticsToSave select { + _x distance _posSitio < distanciaSPWN + }; + _puestos = puestosFIA select { + getMarkerPos _x distance _posSitio < distanciaSPWN + }; + _cuenta = ((count _garrison) + (count _puestos) + (2 * (count _estaticas))); + if (_cuenta <= 8) then { + if (!hayIFA or (_posSitio distance _posBase < distanceForLandAttack)) then { + diag_log format ["[ataqueAAF] Rejected: too far for land attack %1 < %2", _posSitio distance _posBase, distanceForLandAttack]; + _proceder = false; + _faciles pushBack [_sitio, _base]; + _facilesArr pushBackUnique _sitio; + }; + }; + }; + }; + }; + }; + }; + }; + if (_proceder) then { + _times = 1; + if (_baseNATO) then { + if ({ + lados getVariable[_x, sideUnknown] == malos + } count aeropuertos <= 1) then { + diag_log format ["[ataqueAAF] x2: Attacking from NATO with airports <= 1"]; + _times = 2; + }; + if (!_esCiudad) then { + if ((_x in puestos) or (_x in puertos)) then { + if (!_esSDK) then { + private _NATOattackVeh = {[_x] call A3A_fnc_vehAvailable} count vehNATOAttack; + private _NATOhelis = {[_x] call A3A_fnc_vehAvailable} count vehNATOAttackHelis; + if (_NATOattackVeh > 0 or _NATOhelis > 0) then { + diag_log format ["[ataqueAAF] x2: Attacking OP or port with %1 NATO attack vehicles/%2 helis available", _NATOattackVeh, _NATOhelis]; + _times = 2 * _times; + } else { + diag_log format ["[ataqueAAF] Rejected: Attacking OP or port with %1 NATO attack vehicles/%2 helis available", _NATOattackVeh, _NATOhelis]; + _times = 0; + }; + } else { + diag_log format ["[ataqueAAF] x2: Attacking SDK OP or port"]; + _times = 2 * _times; + }; + } else { + if (_x in aeropuertos) then { + if (!_esSDK) then { + if (([vehNATOPlane] call A3A_fnc_vehAvailable) or (!([vehCSATAA] call A3A_fnc_vehAvailable))) then { + diag_log format ["[ataqueAAF] x5: Attacking non SDK airport with NATO planes or no CSAT AA"]; + _times = 5 * _times; + } else { + diag_log format ["[ataqueAAF] Rejected: is airport and can't get NATO planes, or CSAT AA"]; + _times = 0; + }; + } else { + if (!_isTheSameIsland) then { + diag_log format ["[ataqueAAF] x5: SDK Airport on different island"]; + _times = 5 * _times; + } else { + diag_log format ["[ataqueAAF] x2: SDK Airport on same island"]; + _times = 2 * _times; + }; + }; + } else { + if ((!_esSDK) and _natoIsFull) then { + diag_log format ["[ataqueAAF] Rejected: not SDK, not airport, NATO is full"]; + _times = 0; + }; + }; + }; + }; + if (_times > 0) then { + _aeropCercano = [aeropuertos, _posSitio] call bis_fnc_nearestPosition; + if ((lados getVariable[_aeropCercano, sideUnknown] == muyMalos) and (_x != _aeropCercano)) then { + diag_log format ["[ataqueAAF] x0.5: nearest airport to target is %1", muyMalos]; + _times = _times / 2; + }; + }; + } else { + _times = 2; + if (!_esCiudad) then { + if ((_x in puestos) or(_x in puertos)) then { + if (!_esSDK) then { + if (({ + [_x] call A3A_fnc_vehAvailable + } + count vehCSATAttack > 0) or({ + [_x] call A3A_fnc_vehAvailable + } + count vehCSATAttackHelis > 0)) then { + _times = 2 * _times; + } else { + _times = 0; + }; + } else { + _times = 2 * _times; + }; + } else { + if (_x in aeropuertos) then { + if (!_esSDK) then { + if (([vehCSATPlane] call A3A_fnc_vehAvailable) or(!([vehNATOAA] call A3A_fnc_vehAvailable))) then { + _times = 5 * _times; + } else { + _times = 0; + }; + } + else { + if (!_isTheSameIsland) then { + _times = 5 * _times; + } else { + _times = 2 * _times; + }; + }; + } + else { + if ((!_esSDK) and _csatIsFull) then { + _times = 0; + }; + }; + } + }; + if (_times > 0) then { + _aeropCercano = [aeropuertos, _posSitio] call bis_fnc_nearestPosition; + if ((lados getVariable[_aeropCercano, sideUnknown] == malos) and (_x != _aeropCercano)) then { + _times = 0; + }; + }; + }; + if (_times > 0) then { + if ((!_esSDK) and (!_esCiudad)) then { + //_times = _times + (floor((garrison getVariable [_x,0])/8)) + _numGarr = [_x] call A3A_fnc_garrisonSize; + if ((_numGarr / 2) < count(garrison getVariable[_x, []])) then { + if ((_numGarr / 3) < count(garrison getVariable[_x, []])) then { + _times = _times + 6; + } else { + _times = _times + 2; + }; + }; + }; + if (_isTheSameIsland) then { + if (_posSitio distance _posBase < distanceForLandAttack) then { + if (!_esCiudad) then { + _times = _times * 4; + }; + }; + }; + if (!_esCiudad) then { + _esMar = false; + if ((_baseNATO and _puertoNATO) or (!_baseNATO and _puertoCSAT)) then { + for "_i" from 0 to 3 do { + _pos = _posSitio getPos[1000, (_i * 90)]; + if (surfaceIsWater _pos) exitWith { + _esMar = true; + }; + }; + }; + if (_esMar) then { + _times = _times * 2; + }; + }; + if (_x == _cercano) then { + _times = _times * 5; + }; + if (_x in _killZones) then { + _sitio = _x; + // TODO: Not sure what this count in killZones is meant to achieve, surely it is a set of unique elements? + _times = _times / (({_x == _sitio} count _killZones) + 1); + }; + _times = round(_times); + _index = _objetivosFinal find _x; + if (_index == -1) then { + diag_log format ["[ataqueAAF] Adding (%1, %2, %3) to the final objectives list", _x, _base, _times]; + _objetivosFinal pushBack _x; + _basesFinal pushBack _base; + _cuentasFinal pushBack _times; + } else { + if ((_times > (_cuentasFinal select _index)) or ((_times == (_cuentasFinal select _index)) and (random 1 < 0.5))) then { + diag_log format ["[ataqueAAF] Replacing (%1, %2, %3) with (%4, %5, %6) in the final objectives list", + _objetivosFinal select _index, _basesFinal select _index, _cuentasFinal select _index, _x, _base, _times + ]; + _objetivosFinal deleteAt _index; + _basesFinal deleteAt _index; + _cuentasFinal deleteAt _index; + _objetivosFinal pushBack _x; + _basesFinal pushBack _base; + _cuentasFinal pushBack _times; + }; + }; + }; + }; + if (count _faciles == 4) exitWith {}; + } forEach _tmpObjetivos; + }; + if (count _faciles == 4) exitWith {}; } forEach _aeropuertos; -if (count _faciles == 4) exitWith - { - {[[_x select 0,_x select 1,"",false],"A3A_fnc_patrolCA"] remoteExec ["A3A_fnc_scheduler",2];sleep 30} forEach _faciles; - }; -if (hayIFA and (sunOrMoon < 1)) exitWith {}; -if ((count _objetivosFinal > 0) and (count _faciles < 3)) then - { - _arrayFinal = []; - /*{ - for "_i" from 1 to _x do - { - _arrayFinal pushBack [(_objetivosFinal select _forEachIndex),(_basesFinal select _forEachIndex)]; - }; - } forEach _cuentasFinal;*/ - for "_i" from 0 to (count _objetivosFinal) - 1 do - { - _arrayFinal pushBack [_objetivosFinal select _i,_basesFinal select _i]; - }; - //_objetivoFinal = selectRandom _arrayFinal; - _objetivoFinal = _arrayFinal selectRandomWeighted _cuentasFinal; - _destino = _objetivoFinal select 0; - _origen = _objetivoFinal select 1; - ///aquí decidimos las oleadas - if (_waves == 1) then - { - if (lados getVariable [_destino,sideUnknown] == buenos) then - { - _waves = (round (random tierWar)); - if (_waves == 0) then {_waves = 1}; - } - else - { - if (lados getVariable [_origen,sideUnknown] == muyMalos) then - { - if (_destino in aeropuertos) then - { - _waves = 2 + round (random tierWar); - } - else - { - if (!(_destino in ciudades)) then - { - _waves = 1 + round (random (tierWar)/2); - }; - }; - } - else - { - if (!(_destino in ciudades)) then - { - _waves = 1 + round (random ((tierWar - 3)/2)); - }; - }; - }; - }; - if (not(_destino in ciudades)) then - { - ///[[_destino,_origen,_waves],"A3A_fnc_wavedCA"] call A3A_fnc_scheduler; - [_destino,_origen,_waves] spawn A3A_fnc_wavedCA; - } - else - { - //if (lados getVariable [_origen,sideUnknown] == malos) then {[[_destino,_origen,_waves],"A3A_fnc_wavedCA"] call A3A_fnc_scheduler} else {[[_destino,_origen],"A3A_fnc_CSATpunish"] call A3A_fnc_scheduler}; - if (lados getVariable [_origen,sideUnknown] == malos) then {[_destino,_origen,_waves] spawn A3A_fnc_wavedCA} else {[_destino,_origen] spawn A3A_fnc_CSATpunish}; - }; - }; - -if (_waves == 1) then - { - {[[_x select 0,_x select 1,"",false],"A3A_fnc_patrolCA"] remoteExec ["A3A_fnc_scheduler",2]} forEach _faciles; - }; \ No newline at end of file +diag_log format ["[ataqueAAF] %1 final objectives, %2 secondaries", count _objetivoFinal, count _faciles]; + +if (count _faciles == 4) exitWith { + diag_log format ["[resourceCheck] Cancelling large attack, sending out patrols to secondaries %1", _faciles]; + + { + [ + [_x select 0, _x select 1, "", false], "A3A_fnc_patrolCA" + ] remoteExec["A3A_fnc_scheduler", 2]; + sleep 30 + } forEach _faciles; +}; + +if (hayIFA and (sunOrMoon < 1)) exitWith { + diag_log format ["[ataqueAAF] Cancelling due to night time"]; +}; + + +if ((count _objetivosFinal > 0) and (count _faciles < 3)) then { + diag_log format ["[resourceCheck] Final objectives %1, secondaries %2", _objetivosFinal, _faciles]; + _arrayFinal = []; + /*{ + for "_i" from 1 to _x do + { + _arrayFinal pushBack [(_objetivosFinal select _forEachIndex),(_basesFinal select _forEachIndex)]; + }; + } forEach _cuentasFinal;*/ + for "_i" from 0 to (count _objetivosFinal) - 1 do { + _arrayFinal pushBack[_objetivosFinal select _i, _basesFinal select _i]; + }; + //_objetivoFinal = selectRandom _arrayFinal; + _objetivoFinal = _arrayFinal selectRandomWeighted _cuentasFinal; + _destino = _objetivoFinal select 0; + _origen = _objetivoFinal select 1; + ///aquí decidimos las oleadas + if (_waves == 1) then { + if (lados getVariable[_destino, sideUnknown] == buenos) then { + _waves = (round(random tierWar)); + if (_waves == 0) then { + _waves = 1; + }; + } + else { + if (lados getVariable[_origen, sideUnknown] == muyMalos) then { + if (_destino in aeropuertos) then { + _waves = 2 + round(random tierWar); + } + else { + if (!(_destino in ciudades)) then { + _waves = 1 + round(random(tierWar) / 2); + }; + }; + } + else { + if (!(_destino in ciudades)) then { + _waves = 1 + round(random((tierWar - 3) / 2)); + }; + }; + }; + }; + if (not(_destino in ciudades)) then { + ///[[_destino,_origen,_waves],"A3A_fnc_wavedCA"] call A3A_fnc_scheduler; + [_destino, _origen, _waves] spawn A3A_fnc_wavedCA; + } + else { + //if (lados getVariable [_origen,sideUnknown] == malos) then {[[_destino,_origen,_waves],"A3A_fnc_wavedCA"] call A3A_fnc_scheduler} else {[[_destino,_origen],"A3A_fnc_CSATpunish"] call A3A_fnc_scheduler}; + if (lados getVariable[_origen, sideUnknown] == malos) then { + [_destino, _origen, _waves] spawn A3A_fnc_wavedCA + } else { + [_destino, _origen] spawn A3A_fnc_CSATpunish + }; + }; +}; + +if (_waves == 1) then { + { + [ + [_x select 0, _x select 1, "", false], "A3A_fnc_patrolCA" + ] remoteExec["A3A_fnc_scheduler", 2] + } forEach _faciles; +}; \ No newline at end of file diff --git a/A3-Antistasi/citySupportChange.sqf b/A3-Antistasi/citySupportChange.sqf index d63a78ebec..d8ef00a70f 100644 --- a/A3-Antistasi/citySupportChange.sqf +++ b/A3-Antistasi/citySupportChange.sqf @@ -1,37 +1,68 @@ -private ["_opfor","_blufor","_pos","_ciudad","_datos","_numCiv","_numVeh","_roads","_prestigeOPFOR","_prestigeBLUFOR"]; +private ["_opfor","_blufor","_pos","_i","_datos","_numCiv","_numVeh","_roads","_prestigeOPFOR","_prestigeBLUFOR"]; + +params [ + "_opfor", + "_blufor", + "_pos", + ["_reason", "unknown"] +]; + +diag_log format ["[citySupportChange] %1 at %2: Base modification %3 NATO, %4 SDK", _reason, _pos, _opfor, _blufor]; waitUntil {!cityIsSupportChanging}; cityIsSupportChanging = true; -_opfor = _this select 0; -_blufor = _this select 1; -_pos = _this select 2; -if (typeName _pos == typeName "") then {_ciudad = _pos} else {_ciudad = [ciudades, _pos] call BIS_fnc_nearestPosition}; -_datos = server getVariable _ciudad; -if (!(_datos isEqualType [])) exitWith {citySupportChanging = true; diag_log format ["Antistasi Error in citysupportchange.sqf. Passed %1 as reference",_pos]}; -_numCiv = _datos select 0; -_numVeh = _datos select 1; -_prestigeOPFOR = _datos select 2; -_prestigeBLUFOR = _datos select 3; - -if (_prestigeOPFOR + _prestigeBLUFOR + _opfor > 100) then + +private _cities = []; +if (typeName _pos == typeName "") then { + // if a city name was passed in directly + _cities = [[_pos, 1]]; +} else { + // else if it is a position we calculate effect on nearby towns. + _cities = []; { - _opfor = (_prestigeOPFOR + _prestigeBLUFOR) - 100; + private _distKm = ((getMarkerPos _x) distance _pos) / 1000; + private _effect = 1/(1 + 3 * _distKm); + // This effect terminates at 8km + if (_effect > 0.04) then { + _cities pushback [_x, _effect]; + }; + } forEach ciudades; +}; + +{ + private _ciudad = _x select 0; + private _effect = _x select 1; + private _opforAdjusted = _effect * _opfor; + private _bluforAdjusted = _effect * _blufor; + + _datos = server getVariable _ciudad; + if (!(_datos isEqualType [])) exitWith {citySupportChanging = true; diag_log format ["Antistasi Error in citysupportchange.sqf. Passed %1 as reference",_pos]}; + _numCiv = _datos select 0; + _numVeh = _datos select 1; + _prestigeOPFOR = _datos select 2; + _prestigeBLUFOR = _datos select 3; + + if (_prestigeOPFOR + _prestigeBLUFOR + _opforAdjusted > 100) then { + _opforAdjusted = (_prestigeOPFOR + _prestigeBLUFOR) - 100; }; -_prestigeOPFOR = _prestigeOPFOR + _opfor; -if (_prestigeOPFOR + _prestigeBLUFOR + _blufor > 100) then - { - _blufor = (_prestigeOPFOR + _prestigeBLUFOR) - 100; + _prestigeOPFOR = _prestigeOPFOR + _opforAdjusted; + if (_prestigeOPFOR + _prestigeBLUFOR + _bluforAdjusted > 100) then { + _bluforAdjusted = (_prestigeOPFOR + _prestigeBLUFOR) - 100; }; -_prestigeBLUFOR = _prestigeBLUFOR + _blufor; + _prestigeBLUFOR = _prestigeBLUFOR + _bluforAdjusted; + + + if (_prestigeOPFOR > 100) then {_prestigeOPFOR = 100}; + if (_prestigeBLUFOR > 100) then {_prestigeBLUFOR = 100}; + if (_prestigeOPFOR < 0) then {_prestigeOPFOR = 0}; + if (_prestigeBLUFOR < 0) then {_prestigeBLUFOR = 0}; + _datos = [_numCiv, _numVeh,_prestigeOPFOR,_prestigeBLUFOR]; -if (_prestigeOPFOR > 100) then {_prestigeOPFOR = 100}; -if (_prestigeBLUFOR > 100) then {_prestigeBLUFOR = 100}; -if (_prestigeOPFOR < 0) then {_prestigeOPFOR = 0}; -if (_prestigeBLUFOR < 0) then {_prestigeBLUFOR = 0}; + server setVariable [_ciudad,_datos,true]; -_datos = [_numCiv, _numVeh,_prestigeOPFOR,_prestigeBLUFOR]; + diag_log format ["[citySupportChange] %1: %2 is modified %3 NATO [now %4], %5 SDK [now %6]", _reason, _ciudad, _opforAdjusted, _prestigeOPFOR, _bluforAdjusted, _prestigeBLUFOR]; +} forEach _cities; -server setVariable [_ciudad,_datos,true]; cityIsSupportChanging = false; true \ No newline at end of file diff --git a/A3-Antistasi/cityinfo.sqf b/A3-Antistasi/cityinfo.sqf index 5dec27d156..57a92f8a70 100644 --- a/A3-Antistasi/cityinfo.sqf +++ b/A3-Antistasi/cityinfo.sqf @@ -86,7 +86,7 @@ while {visibleMap} do _texto = format ["%1 Airport",_nameFaction]; _busy = [_sitio,true] call A3A_fnc_airportCanAttack; if (_busy) then {_texto = format ["%1\nStatus: Idle",_texto]} else {_texto = format ["%1\nStatus: Busy",_texto]}; - _garrison = count (garrison getVariable _sitio); + _garrison = count (garrison getVariable [_sitio, []]); if (_garrison >= 40) then {_texto = format ["%1\nGarrison: Good",_texto]} else {if (_garrison >= 20) then {_texto = format ["%1\nGarrison: Weakened",_texto]} else {_texto = format ["%1\nGarrison: Decimated",_texto]}}; } else @@ -99,7 +99,7 @@ while {visibleMap} do if (not(lados getVariable [_sitio,sideUnknown] == buenos)) then { _texto = format ["%1 Resources",_nameFaction]; - _garrison = count (garrison getVariable _sitio); + _garrison = count (garrison getVariable [_sitio, []]); if (_garrison >= 30) then {_texto = format ["%1\nGarrison: Good",_texto]} else {if (_garrison >= 10) then {_texto = format ["%1\nGarrison: Weakened",_texto]} else {_texto = format ["%1\nGarrison: Decimated",_texto]}}; } else @@ -113,7 +113,7 @@ while {visibleMap} do if (not(lados getVariable [_sitio,sideUnknown] == buenos)) then { _texto = format ["%1 Factory",_nameFaction]; - _garrison = count (garrison getVariable _sitio); + _garrison = count (garrison getVariable [_sitio, []]); if (_garrison >= 16) then {_texto = format ["%1\nGarrison: Good",_texto]} else {if (_garrison >= 8) then {_texto = format ["%1\nGarrison: Weakened",_texto]} else {_texto = format ["%1\nGarrison: Decimated",_texto]}}; } else @@ -129,7 +129,7 @@ while {visibleMap} do _texto = format ["%1 Grand Outpost",_nameFaction]; _busy = [_sitio,true] call A3A_fnc_airportCanAttack; if (_busy) then {_texto = format ["%1\nStatus: Idle",_texto]} else {_texto = format ["%1\nStatus: Busy",_texto]}; - _garrison = count (garrison getVariable _sitio); + _garrison = count (garrison getVariable [_sitio, []]); if (_garrison >= 16) then {_texto = format ["%1\nGarrison: Good",_texto]} else {if (_garrison >= 8) then {_texto = format ["%1\nGarrison: Weakened",_texto]} else {_texto = format ["%1\nGarrison: Decimated",_texto]}}; } else @@ -142,7 +142,7 @@ while {visibleMap} do if (not(lados getVariable [_sitio,sideUnknown] == buenos)) then { _texto = format ["%1 Seaport",_nameFaction]; - _garrison = count (garrison getVariable _sitio); + _garrison = count (garrison getVariable [_sitio, []]); if (_garrison >= 20) then {_texto = format ["%1\nGarrison: Good",_texto]} else {if (_garrison >= 8) then {_texto = format ["%1\nGarrison: Weakened",_texto]} else {_texto = format ["%1\nGarrison: Decimated",_texto]}}; } else diff --git a/A3-Antistasi/crearPuestosFIA.sqf b/A3-Antistasi/crearPuestosFIA.sqf index 0d5ca82d7a..8d1216ca17 100644 --- a/A3-Antistasi/crearPuestosFIA.sqf +++ b/A3-Antistasi/crearPuestosFIA.sqf @@ -66,7 +66,7 @@ if ({(alive _x) and (_x distance _posicionTel < 10)} count units _grupo > 0) the spawner setVariable [_mrk,2,true]; ["PuestosFIA",["We are sending a team to establish a Watchpost/Roadblock. Use HC to send the team to their destination","Post \ Roadblock Deploy",_mrk],_posicionTel,"SUCCEEDED"] call A3A_fnc_taskUpdate; //["PuestosFIA", "SUCCEEDED",true] spawn BIS_fnc_taskSetState; - _nul = [-5,5,_posiciontel] remoteExec ["A3A_fnc_citySupportChange",2]; + //_nul = [-5,5,_posiciontel] remoteExec ["A3A_fnc_citySupportChange",2]; _mrk setMarkerType "loc_bunker"; _mrk setMarkerColor colorBuenos; _mrk setMarkerText _texto; diff --git a/A3-Antistasi/description.ext b/A3-Antistasi/description.ext deleted file mode 100644 index 6072e07cce..0000000000 --- a/A3-Antistasi/description.ext +++ /dev/null @@ -1,424 +0,0 @@ -#include "defines.hpp" -#include "dialogs.hpp" - -author="Barbolani"; -OnLoadName = "Antistasi Altis"; -OnLoadMission = "Be a Resistance leader, be a hero"; -loadScreen = "pic.JPG"; - -overviewText = "Be the Resistance Leader. Fight against a superior enemy in technology, number, assets and vehicles. Use guerrilla tactics in a totally dynamic world, with around 18 sidemissions, everywhere, anytime, anything."; -overviewPicture = "pic.jpg"; - -allowFunctionsLog = 1; -enableDebugConsole = 1; - -respawn = "BASE"; -respawnDelay = 15; -respawnVehicleDelay = 120; -respawnDialog = 1; -aiKills = 0; -disabledAI=1; -Saving = 0; -showCompass=1; -showRadio=1; -showGPS=1; -showMap=1; -showBinocular=1; -showNotepad=1; -showWatch=1; -debriefing=1; - -//showGroupIndicator = 1; - -class CfgTaskEnhancements - { - enable = 1; //0: disable new task features (default), 1: enable new task features & add new task markers and task widgets into the map - 3d = 1; //0: do not use new 3D markers (default), 1: replace task waypoints with new 3D markers - 3dDrawDist = 3500; //3d marker draw distance (default: 2000) - share = 1; //0: do not count assigned players (default), 1: count how many players have the task assigned - propagate = 1; //0: do not propagate (default), 1: propagate shared tasks to subordinates - }; - -class CfgFunctions { - #include "functions.hpp" - #include "JeroenArsenal\functions.hpp" -}; -class Header -{ -gameType = COOP; -minplayers=1; -maxplayers=32; -}; - -class CfgSounds -{ - class fire - { - name="fire"; - sound[]={"Music\fire.ogg",db+12,1.0}; - titles[]={}; - }; -}; - -class Params -{ - class loadSave - { - title = "Load last Persistent Save"; // Param name visible in the list - values[] = {1,0}; // Values; must be integers; has to have the same number of elements as 'texts' - texts[] = {"Yes","No"}; // Description of each selectable item - default = 1; // Default value; must be listed in 'values' array, otherwise 0 is used - // Default values that are not whole numbers do not work. Param will default to 0 (or 1 if defined) - }; - class gameMode - { - title = "Game Mode"; // Param name visible in the list - values[] = {1,2,3,4}; // Values; must be integers; has to have the same number of elements as 'texts' - texts[] = {"Reb vs Gov vs Inv","Reb vs Gov & Inv","Reb vs Gov","Reb vs Inv"}; // Description of each selectable item - default = 1; // Default value; must be listed in 'values' array, otherwise 0 is used - // Default values that are not whole numbers do not work. Param will default to 0 (or 1 if defined) - }; - class autoSave - { - title = "Enable Autosave (every hour)"; // Param name visible in the list - values[] = {1,0}; // Values; must be integers; has to have the same number of elements as 'texts' - texts[] = {"Yes","No"}; // Description of each selectable item - default = 1; // Default value; must be listed in 'values' array, otherwise 0 is used - // Default values that are not whole numbers do not work. Param will default to 0 (or 1 if defined) - }; - class membership - { - title = "Enable Server Membership"; - texts[] = {"Yes","No"}; - values[] = {1,0}; - default = 1; - //function = "BIS_fnc_paramDaytime"; // (Optional) [[Functions_Library_(Arma_3)|Function]] [[call]]ed when player joins, selected value is passed as an argument - //isGlobal = 1; // (Optional) 1 to execute script / function locally for every player who joins, 0 to do it only on server - }; - class switchComm - { - title = "Enable Commander Switch (highest ranked player)"; - values[] = {1,0}; - texts[] = {"Yes","No"}; - default = 1; - //file = "setViewDistance.sqf"; // (Optional) Script [[call]]ed when player joins, selected value is passed as an argument - }; - class tkPunish - { - title = "Enable Teamkill Punish"; - values[] = {1,0}; - texts[] = {"Yes","No"}; - default = 1; - //file = "setViewDistance.sqf"; // (Optional) Script [[call]]ed when player joins, selected value is passed as an argument - }; - class mRadius - { - title = "Distance from HQ for Sidemissions"; - values[] = {4000,8000,12000}; - // When 'texts' are missing, values will be displayed directly instead - default = 4000; - //file = "setViewDistance.sqf"; // (Optional) Script [[call]]ed when player joins, selected value is passed as an argument - }; - class allowPvP - { - title = "Allow PvP Slots"; - values[] = {1,0}; - texts[] = {"Yes","No"}; - default = 1; - //file = "setViewDistance.sqf"; // (Optional) Script [[call]]ed when player joins, selected value is passed as an argument - }; - class pMarkers - { - title = "Allow Friendly Player Markers"; - values[] = {1,0}; - texts[] = {"Yes","No"}; - default = 1; - //file = "setViewDistance.sqf"; // (Optional) Script [[call]]ed when player joins, selected value is passed as an argument - }; - class AISkill - { - title = "AI Skill"; - values[] = {0.5,1,2}; - texts[] = {"Easy","Normal","Hard"}; - default = 1; - //file = "setViewDistance.sqf"; // (Optional) Script [[call]]ed when player joins, selected value is passed as an argument - }; - class unlockItem - { - title = "Number of the same weapons required to unlock"; - values[] = {15,25,40}; - default = 25; - //file = "setViewDistance.sqf"; // (Optional) Script [[call]]ed when player joins, selected value is passed as an argument - }; - class civTraffic - { - title = "Rate of Civ Traffic"; - values[] = {0.5,1,3}; - texts[] = {"Low","Medium","JAM"}; - default = 1; - //file = "setViewDistance.sqf"; // (Optional) Script [[call]]ed when player joins, selected value is passed as an argument - }; - class memberSlots - { - title = "Percentage of Reserved Slots for Members"; - values[] = {0,20,40,60,80,100}; - texts[] = {"None","20%","40%","60%","80%","All"}; - default = 20; - //file = "setViewDistance.sqf"; // (Optional) Script [[call]]ed when player joins, selected value is passed as an argument - }; - class memberDistance - { - title = "Max distance non members can be from the closest member or HQ (they will be teleported to HQ after some timeout)"; - values[] = {4000,5000,6000,7000,8000,16000}; - texts[] = {"4 Kmts","5 Kmts","6 Kmts","7 Kmts","8 Kmts","Unlimited"}; - default = 5000; - //file = "setViewDistance.sqf"; // (Optional) Script [[call]]ed when player joins, selected value is passed as an argument - }; - class allowFT - { - title = "Limited Fast Travel"; - values[] = {0,1}; - texts[] = {"No","Yes"}; - default = 1; - }; -}; - -class CfgIdentities -{ - class protagonista - { - name = "Stavros"; - nameSound = "Stavrou"; - face="GreekHead_A3_01"; - glasses="None"; - speaker="Male01GRE"; - pitch=1.1; - }; - class amiguete - { - name = "Petros"; - nameSound = "Petros"; - face="GreekHead_A3_01"; - glasses="None"; - speaker="Male01GRE"; - pitch=1.1; - }; - class Anthis - { - name = "Anthis"; - nameSound = "Anthis"; - face="GreekHead_A3_02"; - glasses="None"; - speaker="Male01GRE"; - pitch=1.1; - }; - class Costa - { - name = "Costa"; - nameSound = "Costa"; - face="GreekHead_A3_03"; - glasses="None"; - speaker="Male02GRE"; - pitch=1.1; - }; - class Dimitirou - { - name = "Dimitirou"; - nameSound = "Dimitirou"; - face="GreekHead_A3_04"; - glasses="None"; - speaker="Male03GRE"; - pitch=1.1; - }; - class Elias - { - name = "Elias"; - nameSound = "Elias"; - face="GreekHead_A3_05"; - glasses="None"; - speaker="Male04GRE"; - pitch=1.1; - }; - class Gekas - { - name = "Gekas"; - nameSound = "Gekas"; - face="GreekHead_A3_06"; - glasses="None"; - speaker="Male01GRE"; - pitch=1.1; - }; - class Kouris - { - name = "Kouris"; - nameSound = "Kouris"; - face="GreekHead_A3_07"; - glasses="None"; - speaker="Male02GRE"; - pitch=1.1; - }; - class Leventis - { - name = "Leventis"; - nameSound = "Leventis"; - face="GreekHead_A3_08"; - glasses="None"; - speaker="Male03GRE"; - pitch=1.1; - }; - class Markos - { - name = "Markos"; - nameSound = "Markos"; - face="GreekHead_A3_09"; - glasses="None"; - speaker="Male04GRE"; - pitch=1.1; - }; - class Nikas - { - name = "Nikas"; - nameSound = "Nikas"; - face="WhiteHead_02"; - glasses="None"; - speaker="Male01GRE"; - pitch=1.1; - }; - class Nicolo - { - name = "Nicolo"; - nameSound = "Nicolo"; - face="WhiteHead_03"; - glasses="None"; - speaker="Male02GRE"; - pitch=1.1; - }; - class Panas - { - name = "Panas"; - nameSound = "Panas"; - face="WhiteHead_04"; - glasses="None"; - speaker="Male03GRE"; - pitch=1.1; - }; - class Rosi - { - name = "Rosi"; - nameSound = "Rosi"; - face="WhiteHead_05"; - glasses="None"; - speaker="Male04GRE"; - pitch=1.1; - }; - class Samaras - { - name = "Samaras"; - nameSound = "Samaras"; - face="WhiteHead_06"; - glasses="None"; - speaker="Male01GRE"; - pitch=1.1; - }; - class Thanos - { - name = "Thanos"; - nameSound = "Thanos"; - face="WhiteHead_07"; - glasses="None"; - speaker="Male02GRE"; - pitch=1.1; - }; - class Vega - { - name = "Vega"; - nameSound = "Vega"; - face="WhiteHead_08"; - glasses="None"; - speaker="Male03GRE"; - pitch=1.1; - }; -}; - - -/* -class CfgMusic -{ - tracks[]={}; - - class DBS - { - name = ""; - sound[] = {"\music\dbs.ogg", db+5, 1.0}; - }; - -}; -*/ -class CfgDebriefing -{ - class End1 - { - title = "V I C T O R Y"; - subtitle = "Altis is Ours!"; - description = "The population of Altis loves you!
The brave soldiers prooved their valour, and Barbolani, Altis new Prime Minister, could at last to have a nice holidays. A deserved rest in a Greek island, drinking with Petros, his war master."; - picture = "n_inf"; - pictureColor[] = {0.0,0.5,0.0,1}; - }; - class petrosDead - { - title = "Petros is Dead"; - subtitle = "Petros is Dead"; - description = "Congratulations!: Petros is Dead. Now with rebels without a leader, you may think about joining them, and free Altis"; - picture = "b_unknown"; - pictureColor[] = {0.5,0.0,0.0,1}; - }; - class destroyedCities - { - title = "Altis is Destroyed"; - subtitle = "Altis got Destroyed by OPFOR"; - description = "One third of the population in Altis has been murdered by the OPFOR.
Altis no longer exists, nobody wants to live here."; - picture = "b_unknown"; - pictureColor[] = {0.5,0.0,0.0,1}; - }; - class modUnautorized - { - title = "Incompatible Mods"; - subtitle = "Incompatible Mods detected"; - description = "An incompatible mod installed on the server or your PC has been detected. To avoid support problems the mission is finished. Please uninstall unsupported (ASR AI, aLIVE, MCC or any AI behaviour) mods from your computer or server to be able to play Antistasi."; - picture = "b_unknown"; - pictureColor[] = {0.0,0.5,0.0,1}; - }; - class serverFull - { - title = "Reserved Slot"; - subtitle = "This slot is reserved"; - description = "Sorry, but this slot is reserved for a Server Member. To become member, please contact to the server admin or clan."; - picture = "b_unknown"; - pictureColor[] = {0.0,0.5,0.0,1}; - }; - class noPvP - { - title = "Slot Unavailable"; - subtitle = "This slot is unavailable"; - description = "Sorry, but this slot is unavailable for some reason: player not member, match not initialized, lack of rebel commander or recent role as rebel."; - picture = "b_unknown"; - pictureColor[] = {0.0,0.5,0.0,1}; - }; - class hcDown - { - title = "HC Disconnected"; - subtitle = "Some Headless Client has been disconnected and mission has to stop to avoid malfunctions."; - picture = "b_unknown"; - pictureColor[] = {0.0,0.5,0.0,1}; - }; - /* - class asshole - { - title = "Forbidden"; - subtitle = "You are not allowed to run Antistasi"; - description = "Sorry, but you cannot play Antistasi in your server. Please contact author to discuss your situation."; - picture = "b_unknown"; - pictureColor[] = {0.0,0.5,0.0,1}; - }; - */ -}; diff --git a/A3-Antistasi/dialogs.hpp b/A3-Antistasi/dialogs.hpp index 1d4a7b6a06..4aafb67cbb 100644 --- a/A3-Antistasi/dialogs.hpp +++ b/A3-Antistasi/dialogs.hpp @@ -1852,13 +1852,13 @@ class carpet_bombing { class 4slots_L2: RscButton { idc = -1; - text = "NAPALM Bomb"; //--- ToDo: Localize; + text = "NAPALM Bomb (disabled)"; //--- ToDo: Localize; x = 0.272481 * safezoneW + safezoneX; y = 0.415981 * safezoneH + safezoneY; w = 0.175015 * safezoneW; h = 0.0560125 * safezoneH; tooltip = "Cost: 1 point"; - action = "closeDialog 0;[""NAPALM""] spawn A3A_fnc_NATObomb;"; + action = "closeDialog 0;"; }; class 4slots_R2: RscButton { @@ -2473,13 +2473,13 @@ class tu_madre { class HQ_button_Gremove: RscButton { idc = -1; - text = "NAPALM Bomb"; //--- ToDo: Localize; + text = "NAPALM Bomb (disabled)"; //--- ToDo: Localize; x = 0.37749 * safezoneW + safezoneX; y = 0.415981 * safezoneH + safezoneY; w = 0.175015 * safezoneW; h = 0.0560125 * safezoneH; tooltip = "Cost: 10 points"; - action = "closeDialog 0;[""NAPALM""] spawn A3A_fnc_NATObomb;"; + action = "closeDialog 0;"; }; }; }; diff --git a/A3-Antistasi/distancias4.sqf b/A3-Antistasi/distancias4.sqf index da66a4f873..e68c7fa760 100644 --- a/A3-Antistasi/distancias4.sqf +++ b/A3-Antistasi/distancias4.sqf @@ -137,7 +137,10 @@ else if (({if ((isPlayer _x) and (_x distance2D _posicionMRK < distanciaSPWN)) exitWith {1};false} count allUnits > 0) or (_marcador in forcedSpawn)) then {[[_marcador],"A3A_fnc_createCIV"] call A3A_fnc_scheduler}; }; }; - if (_marcador in puestosFIA) then {[[_marcador],"A3A_fnc_createFIApuestos2"] call A3A_fnc_scheduler} else {if (not(_marcador in controles)) then {[[_marcador],"A3A_fnc_createSDKGarrisons"] call A3A_fnc_scheduler}}; + if (_marcador in puestosFIA) then {[[_marcador],"A3A_fnc_createFIApuestos2"] call A3A_fnc_scheduler} else {if (not(_marcador in controles)) then { + [_marcador] remoteExec ["A3A_fnc_createSDKGarrisons", 2]; + //[[_marcador],"A3A_fnc_createSDKGarrisons"] call A3A_fnc_scheduler; + }}; }; } else diff --git a/A3-Antistasi/distancias5.sqf b/A3-Antistasi/distancias5.sqf index 789835bd18..defb036528 100644 --- a/A3-Antistasi/distancias5.sqf +++ b/A3-Antistasi/distancias5.sqf @@ -147,7 +147,10 @@ else if (({if ((isPlayer _x) and (_x distance2D _posicionMRK < distanciaSPWN)) exitWith {1};false} count allUnits > 0) or (_marcador in forcedSpawn)) then {[[_marcador],"A3A_fnc_createCIV"] call A3A_fnc_scheduler}; }; }; - if (_marcador in puestosFIA) then {[[_marcador],"A3A_fnc_createFIApuestos2"] call A3A_fnc_scheduler} else {if (not(_marcador in controles)) then {[[_marcador],"A3A_fnc_createSDKGarrisons"] call A3A_fnc_scheduler}}; + if (_marcador in puestosFIA) then {[[_marcador],"A3A_fnc_createFIApuestos2"] call A3A_fnc_scheduler} else {if (not(_marcador in controles)) then { + [_marcador] remoteExec ["A3A_fnc_createSDKGarrisons", 2]; + //[[_marcador],"A3A_fnc_createSDKGarrisons"] call A3A_fnc_scheduler; + }}; }; } else diff --git a/A3-Antistasi/economicsAI.sqf b/A3-Antistasi/economicsAI.sqf index 07fe1e3613..2a071507ac 100644 --- a/A3-Antistasi/economicsAI.sqf +++ b/A3-Antistasi/economicsAI.sqf @@ -34,7 +34,7 @@ if !(_tipo isEqualTo []) then }; //tanks _maxItems = (_puestos * 0.5) + (_airbases * 2); -_tipo = if (_lado == malos) then {vehNATOTank} else {vehCSATTank}; +_tipo = if (_lado == malos) then {selectRandom vehNATOAllTanks} else {selectRandom vehCSATAllTanks}; _currentItems = timer getVariable [_tipo,0]; if (_currentItems < _maxItems) then { diff --git a/A3-Antistasi/fastTravelRadio.sqf b/A3-Antistasi/fastTravelRadio.sqf index 1296fa7259..6bf1a1c053 100644 --- a/A3-Antistasi/fastTravelRadio.sqf +++ b/A3-Antistasi/fastTravelRadio.sqf @@ -18,7 +18,7 @@ if (player != player getVariable ["owner",player]) exitWith {hint "You cannot Fa _chequeo = false; //_distancia = 500 - (([_jefe,false] call A3A_fnc_fogCheck) * 450); -_distancia = 500; +_distancia = 400; {if ([_x,_distancia] call A3A_fnc_enemyNearCheck) exitWith {_chequeo = true}} forEach units _grupo; @@ -52,7 +52,7 @@ if (count _posicionTel > 0) then //if (_base in puestosFIA) exitWith {hint "You cannot Fast Travel to roadblocks and watchposts"; openMap [false,false]}; - if ([getMarkerPos _base,500] call A3A_fnc_enemyNearCheck) exitWith {Hint "You cannot Fast Travel to an area under attack or with enemies in the surrounding"; openMap [false,false]}; + if ([getMarkerPos _base,400] call A3A_fnc_enemyNearCheck) exitWith {Hint "You cannot Fast Travel to an area under attack or with enemies in the surrounding"; openMap [false,false]}; if (_posicionTel distance getMarkerPos _base < 50) then { diff --git a/A3-Antistasi/findBasesForConvoy.sqf b/A3-Antistasi/findBasesForConvoy.sqf index 25027bdbb4..15aaa2e5f1 100644 --- a/A3-Antistasi/findBasesForConvoy.sqf +++ b/A3-Antistasi/findBasesForConvoy.sqf @@ -13,5 +13,5 @@ _base = _x; _posbase = getMarkerPos _base; if ((_pos distance _posbase < distanceForLandAttack) and (({_x == _marcador} count (killZones getVariable [_base,[]])) < 3)) then {_aeropuertos pushBack _base} } forEach _aeropuertosAAF; -if (count _aeropuertos > 0) then {_base = [_aeropuertos,_pos] call BIS_fnc_nearestPosition} else {_base = ""}; +if (count _aeropuertos > 0) then {_base = selectRandom _aeropuertos} else {_base = ""}; _base \ No newline at end of file diff --git a/A3-Antistasi/flagaction.sqf b/A3-Antistasi/flagaction.sqf index 441ed12d70..6d746dded1 100644 --- a/A3-Antistasi/flagaction.sqf +++ b/A3-Antistasi/flagaction.sqf @@ -5,31 +5,33 @@ if (!hasInterface) exitWith {}; _flag = _this select 0; _tipo = _this select 1; +private _radius = 50; + switch _tipo do { case "take": { removeAllActions _flag; - _accion = _flag addAction ["Take the Flag ", {[_this select 0, _this select 1] call A3A_fnc_mrkWIN},nil,6,true,true,"","(isPlayer _this) and (_this == _this getVariable ['owner',objNull])",4]; - _flag setUserActionText [_accion,"Take the Flag",""]; + _accion = _flag addAction ["Take the Flag ", {[_this select 0, _this select 1] call A3A_fnc_mrkWIN},nil,6,true,true,"","(isPlayer _this) and (_this == _this getVariable ['owner',objNull])",4]; + _flag setUserActionText [_accion,"Take the Flag",""]; }; - case "unit": {_flag addAction ["Unit Recruitment", {if ([player,300] call A3A_fnc_enemyNearCheck) then {hint "You cannot recruit units while there are enemies near you"} else {nul=[] execVM "Dialogs\unit_recruit.sqf"}},nil,0,false,true,"","(isPlayer _this) and (_this == _this getVariable ['owner',objNull])",4]}; - case "vehicle": {_flag addAction ["Buy Vehicle", {if ([player,300] call A3A_fnc_enemyNearCheck) then {hint "You cannot buy vehicles while there are enemies near you"} else {nul = createDialog "vehicle_option"}},nil,0,false,true,"","(isPlayer _this) and (_this == _this getVariable ['owner',objNull])",4]}; - case "mission": {petros addAction ["Mission Request", {nul=CreateDialog "mission_menu";},nil,0,false,true,"","(isPlayer _this) and (_this == _this getVariable ['owner',objNull])",4]}; - case "camion": {accion = _flag addAction ["Transfer Ammobox to Truck ", "Municion\transfer.sqf",nil,6,true,true,"","(isPlayer _this) and (_this == _this getVariable ['owner',objNull])"]}; + case "unit": {_flag addAction ["Unit Recruitment", {if ([player,300] call A3A_fnc_enemyNearCheck) then {hint "You cannot recruit units while there are enemies near you"} else {nul=[] execVM "Dialogs\unit_recruit.sqf"}},nil,0,false,true,"","(isPlayer _this) and (_this == _this getVariable ['owner',objNull])",_radius]}; + case "vehicle": {_flag addAction ["Buy Vehicle", {if ([player,300] call A3A_fnc_enemyNearCheck) then {hint "You cannot buy vehicles while there are enemies near you"} else {nul = createDialog "vehicle_option"}},nil,0,false,true,"","(isPlayer _this) and (_this == _this getVariable ['owner',objNull])",_radius]}; + case "mission": {petros addAction ["Mission Request", {nul=CreateDialog "mission_menu";},nil,0,false,true,"","(isPlayer _this) and (_this == _this getVariable ['owner',objNull])",4]}; + case "camion": {accion = _flag addAction ["Transfer Ammobox to Truck ", "Municion\transfer.sqf",nil,6,true,true,"","(isPlayer _this) and (_this == _this getVariable ['owner',objNull])"]}; //case "heal": {if (player != _flag) then {_flag addAction [format ["Revive %1",name _flag], "Revive\actionRevive.sqf",nil,0,false,true,"","(isPlayer _this) and (_this == _this getVariable ['owner',objNull])"]}}; case "heal": { if (player != _flag) then { if ([_flag] call A3A_fnc_fatalWound) then { - _accion = _flag addAction [format ["Revive %1 ",name _flag], "Revive\actionRevive.sqf",nil,6,true,true,"","!(_this getVariable [""ayudando"",false]) and (isNull attachedTo _target)",4]; - _flag setUserActionText [_accion,format ["Revive %1",name _flag],""]; + _accion = _flag addAction [format ["Revive %1 ",name _flag], "Revive\actionRevive.sqf",nil,6,true,true,"","!(_this getVariable [""ayudando"",false]) and (isNull attachedTo _target)",4]; + _flag setUserActionText [_accion,format ["Revive %1",name _flag],""]; } else { - _accion = _flag addAction [format ["Revive %1 ",name _flag], "Revive\actionRevive.sqf",nil,6,true,true,"","!(_this getVariable [""ayudando"",false]) and (isNull attachedTo _target)",4]; - _flag setUserActionText [_accion,format ["Revive %1",name _flag],""]; + _accion = _flag addAction [format ["Revive %1 ",name _flag], "Revive\actionRevive.sqf",nil,6,true,true,"","!(_this getVariable [""ayudando"",false]) and (isNull attachedTo _target)",4]; + _flag setUserActionText [_accion,format ["Revive %1",name _flag],""]; }; }; }; @@ -39,23 +41,23 @@ switch _tipo do { if ([_flag] call A3A_fnc_fatalWound) then { - _accion = _flag addAction [format ["Revive %1 ",name _flag], "Revive\actionRevive.sqf",nil,6,true,false,"","!(_this getVariable [""ayudando"",false]) and (isNull attachedTo _target)",4]; + _accion = _flag addAction [format ["Revive %1 ",name _flag], "Revive\actionRevive.sqf",nil,6,true,false,"","!(_this getVariable [""ayudando"",false]) and (isNull attachedTo _target)",4]; - _flag setUserActionText [_accion,format ["Revive %1",name _flag],""]; + _flag setUserActionText [_accion,format ["Revive %1",name _flag],""]; } else { - _accion = _flag addAction [format ["Revive %1 ",name _flag], "Revive\actionRevive.sqf",nil,6,true,false,"","!(_this getVariable [""ayudando"",false]) and (isNull attachedTo _target)",4]; - _flag setUserActionText [_accion,format ["Revive %1",name _flag],""]; + _accion = _flag addAction [format ["Revive %1 ",name _flag], "Revive\actionRevive.sqf",nil,6,true,false,"","!(_this getVariable [""ayudando"",false]) and (isNull attachedTo _target)",4]; + _flag setUserActionText [_accion,format ["Revive %1",name _flag],""]; }; //_flag addAction [format ["Revive %1",name _flag], "Revive\actionRevive.sqf",nil,0,false,true,"","!(_this getVariable [""ayudando"",false]) and (isNull attachedTo _target)"]; - _accion = _flag addAction [format ["Carry %1 ",name _flag], "Revive\carry.sqf",nil,5,true,false,"","(isPlayer _this) and (_this == _this getVariable ['owner',objNull]) and (isNull attachedTo _target) and !(_this getVariable [""ayudando"",false]);",4]; - _flag setUserActionText [_accion,format ["Carry %1",name _flag],""]; + _accion = _flag addAction [format ["Carry %1 ",name _flag], "Revive\carry.sqf",nil,5,true,false,"","(isPlayer _this) and (_this == _this getVariable ['owner',objNull]) and (isNull attachedTo _target) and !(_this getVariable [""ayudando"",false]);",4]; + _flag setUserActionText [_accion,format ["Carry %1",name _flag],""]; [_flag] call jn_fnc_logistics_addActionLoad; }; }; - case "moveS": {_flag addAction ["Move this asset", "moveHQObject.sqf",nil,0,false,true,"","(_this == theBoss)"]}; + case "moveS": {_flag addAction ["Move this asset", "moveHQObject.sqf",nil,0,false,true,"","(_this == theBoss)"]}; case "remove": { if (player == _flag) then @@ -75,46 +77,46 @@ switch _tipo do removeAllActions _flag }; }; - case "refugiado": {_flag addAction ["Liberate ", "AI\liberaterefugee.sqf",nil,6,true,true,"","(isPlayer _this) and (_this == _this getVariable ['owner',objNull])",4]};//"\a3\ui_f\data\IGUI\Cfg\holdactions\holdAction_unbind_ca.paa" - case "prisionero": {_flag addAction ["Liberate POW ", "AI\liberatePOW.sqf",nil,6,true,true,"","(isPlayer _this) and (_this == _this getVariable ['owner',objNull])",4]}; - case "interrogar": {_flag addAction ["Interrogate", "AI\interrogar.sqf",nil,0,false,true,"","(isPlayer _this) and (_this == _this getVariable ['owner',objNull])",4]}; - case "capturar": {_flag addAction ["Release POW ", "AI\capturar.sqf",nil,6,true,true,"","(isPlayer _this) and (_this == _this getVariable ['owner',objNull])",4]}; - case "buildHQ": {_flag addAction ["Build HQ here", {[] spawn A3A_fnc_buildHQ},nil,0,false,true,"","(isPlayer _this) and (_this == _this getVariable ['owner',objNull])",4]}; - case "seaport": {_flag addAction ["Buy Boat", {[vehSDKBoat] spawn A3A_fnc_addFIAVeh},nil,0,false,true,"","(isPlayer _this) and (_this == _this getVariable ['owner',objNull])",4]}; - case "steal": {_flag addAction ["Steal Static", "REINF\stealStatic.sqf",nil,0,false,true,"","(isPlayer _this) and (_this == _this getVariable ['owner',objNull])",4]}; + case "refugiado": {_flag addAction ["Liberate ", "AI\liberaterefugee.sqf",nil,6,true,true,"","(isPlayer _this) and (_this == _this getVariable ['owner',objNull])",4]};//"\a3\ui_f\data\IGUI\Cfg\holdactions\holdAction_unbind_ca.paa" + case "prisionero": {_flag addAction ["Liberate POW ", "AI\liberatePOW.sqf",nil,6,true,true,"","(isPlayer _this) and (_this == _this getVariable ['owner',objNull])",4]}; + case "interrogar": {_flag addAction ["Interrogate", "AI\interrogar.sqf",nil,0,false,true,"","(isPlayer _this) and (_this == _this getVariable ['owner',objNull])",4]}; + case "capturar": {_flag addAction ["Release POW ", "AI\capturar.sqf",nil,6,true,true,"","(isPlayer _this) and (_this == _this getVariable ['owner',objNull])",4]}; + case "buildHQ": {_flag addAction ["Build HQ here", {[] spawn A3A_fnc_buildHQ},nil,0,false,true,"","(isPlayer _this) and (_this == _this getVariable ['owner',objNull])",4]}; + case "seaport": {_flag addAction ["Buy Boat", {[vehSDKBoat] spawn A3A_fnc_addFIAVeh},nil,0,false,true,"","(isPlayer _this) and (_this == _this getVariable ['owner',objNull])",4]}; + case "steal": {_flag addAction ["Steal Static", "REINF\stealStatic.sqf",nil,0,false,true,"","(isPlayer _this) and (_this == _this getVariable ['owner',objNull])",4]}; case "garage": { if (isMultiplayer) then { - _flag addAction ["Personal Garage", {nul = [true] spawn A3A_fnc_garage},nil,0,false,true,"","(isPlayer _this) and (_this == _this getVariable ['owner',objNull])"]; - _flag addAction ["Faction Garage", {nul = [false] spawn A3A_fnc_garage},nil,0,false,true,"","(isPlayer _this) and (_this == _this getVariable ['owner',objNull])"]; + _flag addAction ["Personal Garage", {nul = [true] spawn A3A_fnc_garage},nil,0,false,true,"","(isPlayer _this) and (_this == _this getVariable ['owner',objNull])", _radius]; + _flag addAction ["Faction Garage", {nul = [false] spawn A3A_fnc_garage},nil,0,false,true,"","(isPlayer _this) and (_this == _this getVariable ['owner',objNull])", _radius]; } else { - _flag addAction ["Faction Garage", {nul = [false] spawn A3A_fnc_garage},nil,0,false,true,"","(isPlayer _this) and (_this == _this getVariable ['owner',objNull])"] + _flag addAction ["Faction Garage", {nul = [false] spawn A3A_fnc_garage},nil,0,false,true,"","(isPlayer _this) and (_this == _this getVariable ['owner',objNull])", _radius] }; }; case "fuego": { - fuego addAction ["Rest for 8 Hours", "skiptime.sqf",nil,0,false,true,"","(_this == theBoss)",4]; - fuego addAction ["Clear Nearby Forest", "clearForest.sqf",nil,0,false,true,"","(_this == theBoss)",4]; - fuego addAction ["On\Off Lamp", "onOffLamp.sqf",nil,0,false,true,"","(isPlayer _this)",4]; - fuego addAction ["I hate the fog", "[10,0] remoteExec [""setFog"",2]",nil,0,false,true,"","(_this == theBoss)",4]; + fuego addAction ["Rest for 8 Hours", "skiptime.sqf",nil,0,false,true,"","(_this == theBoss)",4]; + fuego addAction ["Clear Nearby Forest", "clearForest.sqf",nil,0,false,true,"","(_this == theBoss)",4]; + fuego addAction ["On\Off Lamp", "onOffLamp.sqf",nil,0,false,true,"","(isPlayer _this)",4]; + fuego addAction ["I hate the fog", "[10,0] remoteExec [""setFog"",2]",nil,0,false,true,"","(_this == theBoss)",4]; }; case "SDKFlag": { removeAllActions _flag; - _flag addAction ["Unit Recruitment", {if ([player,300] call A3A_fnc_enemyNearCheck) then {hint "You cannot recruit units while there are enemies near you"} else {nul=[] execVM "Dialogs\unit_recruit.sqf"}},nil,0,false,true,"","(isPlayer _this) and (_this == _this getVariable ['owner',objNull])",4]; - _flag addAction ["Buy Vehicle", {if ([player,300] call A3A_fnc_enemyNearCheck) then {hint "You cannot buy vehicles while there are enemies near you"} else {nul = createDialog "vehicle_option"}},nil,0,false,true,"","(isPlayer _this) and (_this == _this getVariable ['owner',objNull])",4]; + _flag addAction ["Unit Recruitment", {if ([player,300] call A3A_fnc_enemyNearCheck) then {hint "You cannot recruit units while there are enemies near you"} else {nul=[] execVM "Dialogs\unit_recruit.sqf"}},nil,0,false,true,"","(isPlayer _this) and (_this == _this getVariable ['owner',objNull])", _radius]; + _flag addAction ["Buy Vehicle", {if ([player,300] call A3A_fnc_enemyNearCheck) then {hint "You cannot buy vehicles while there are enemies near you"} else {nul = createDialog "vehicle_option"}},nil,0,false,true,"","(isPlayer _this) and (_this == _this getVariable ['owner',objNull])",_radius]; if (isMultiplayer) then { - _flag addAction ["Personal Garage", {nul = [true] spawn A3A_fnc_garage},nil,0,false,true,"","(isPlayer _this) and (_this == _this getVariable ['owner',objNull])",4]; - _flag addAction ["Faction Garage", {nul = [false] spawn A3A_fnc_garage},nil,0,false,true,"","(isPlayer _this) and (_this == _this getVariable ['owner',objNull])",4]; + _flag addAction ["Personal Garage", {nul = [true] spawn A3A_fnc_garage},nil,0,false,true,"","(isPlayer _this) and (_this == _this getVariable ['owner',objNull])",_radius]; + _flag addAction ["Faction Garage", {nul = [false] spawn A3A_fnc_garage},nil,0,false,true,"","(isPlayer _this) and (_this == _this getVariable ['owner',objNull])",_radius]; } else { - _flag addAction ["Faction Garage", {nul = [false] spawn A3A_fnc_garage},nil,0,false,true,"","(isPlayer _this) and (_this == _this getVariable ['owner',objNull])",4] + _flag addAction ["Faction Garage", {nul = [false] spawn A3A_fnc_garage},nil,0,false,true,"","(isPlayer _this) and (_this == _this getVariable ['owner',objNull])",_radius] }; }; }; \ No newline at end of file diff --git a/A3-Antistasi/functions.hpp b/A3-Antistasi/functions.hpp index 71bfa577ea..3ee09d33bc 100644 --- a/A3-Antistasi/functions.hpp +++ b/A3-Antistasi/functions.hpp @@ -49,6 +49,7 @@ class A3A class puestoDialog {file="puestoDialog.sqf";}; class radioCheck {file="radioCheck.sqf";}; class rebuildAssets {file="rebuildAssets.sqf";}; + class resetCities {file="resetCities.sqf";}; class resourceCheckSkipTime {file="resourcecheckSkipTime.sqf";}; class resourcesFIA {file="resourcesFIA.sqf";}; class returnMuzzle {file="returnMuzzle.sqf";}; @@ -63,10 +64,9 @@ class A3A class unlockVehicle {file="unlockVehicle.sqf";}; class zoneCheck {file="zoneCheck.sqf";}; //class tempMoveMrk {file="tempMoveMrk.sqf";}; - } - - class AI - { + }; + class AI + { class AAFKilledEH {file="AI\AAFKilledEH.sqf";}; class airdrop {file="AI\airdrop.sqf";}; class AIreactOnKill {file="AI\AIreactOnKill.sqf";}; @@ -118,10 +118,10 @@ class A3A class vehicleMarkers {file="AI\vehicleMarkers.sqf";}; //class AAthreatEval {file="AI\AAthreatEval.sqf";}; //class hayLOS {file="AI\hayLOS.sqf";}; - } - - class CREATE - { + }; + + class CREATE + { class AAFroadPatrol {file="CREATE\AAFroadpatrol.sqf";}; class airportCanAttack {file="CREATE\airportCanAttack.sqf";}; class AIVEHinit {file="CREATE\AIVEHinit.sqf";}; @@ -157,25 +157,25 @@ class A3A class vehAvailable {file="CREATE\vehAvailable.sqf";}; class VEHdespawner {file="CREATE\VEHdespawner.sqf";}; class wavedCA {file="CREATE\wavedCA.sqf";}; - } - - class Dialogs - { - class mineDialog {file="Dialogs\mineDialog.sqf";}; - } - - class Missions - { + }; + + class Dialogs + { + class mineDialog {file="Dialogs\mineDialog.sqf";}; + }; + + class Missions + { class ataqueHQ {file="Missions\ataqueHQ.sqf";}; class borrarTask {file="Missions\borrarTask.sqf";}; class missionRequest {file="Missions\missionrequest.sqf";}; class missionRequestAUTO {file="Missions\missionrequestAUTO.sqf";}; class taskUpdate {file="Missions\taskUpdate.sqf";}; class underAttack {file="Missions\underAttack.sqf";}; - } + }; - class Municion - { + class Municion + { class ACEpvpReDress {file="Municion\ACEpvpReDress.sqf";}; class arsenalManage {file="Municion\arsenalManage.sqf";}; class CSATCrate {file="Municion\CSATCrate.sqf";}; @@ -185,10 +185,10 @@ class A3A class RHSdress {file="Municion\RHSdress.sqf";}; class vaciar {file="Municion\vaciar.sqf";}; //class cajaAAF {file="Municion\cajaAAF.sqf";}; - } + }; - class OrgPlayers - { + class OrgPlayers + { class assigntheBoss {file="orgPlayers\assignStavros.sqf";}; class donateMoney {file="orgPlayers\donateMoney.sqf";}; class isMember {file="orgPlayers\isMember.sqf";}; @@ -200,10 +200,10 @@ class A3A class theBossInit {file="orgPlayers\stavrosInit.sqf";}; class theBossSteal {file="orgPlayers\stavrosSteal.sqf";}; class tierCheck {file="orgPlayers\tierCheck.sqf";}; - } + }; - class REINF - { + class REINF + { class addBombRun {file="REINF\addBombRun.sqf";}; class addFIAsquadHC {file="REINF\addFIAsquadHC.sqf";}; class addFIAveh {file="REINF\addFIAveh.sqf";}; @@ -223,10 +223,10 @@ class A3A class reinfPlayer {file="REINF\reinfplayer.sqf";}; class vehiclePrice {file="REINF\vehiclePrice.sqf";}; class vehStats {file="REINF\vehStats.sqf";}; - } + }; - class Revive - { + class Revive + { class actionRevive {file="Revive\actionRevive.sqf";}; class fatalWound {file="Revive\fatalWound.sqf";}; class handleDamage {file="Revive\handleDamage.sqf";}; @@ -236,5 +236,5 @@ class A3A class initRevive {file="Revive\initRevive.sqf";}; class isMedic {file="Revive\isMedic.sqf";}; class respawn {file="Revive\respawn.sqf";}; - } -} \ No newline at end of file + }; +}; \ No newline at end of file diff --git a/A3-Antistasi/garage2.sqf b/A3-Antistasi/garage2.sqf index 16191cb766..3faaf2fe66 100644 --- a/A3-Antistasi/garage2.sqf +++ b/A3-Antistasi/garage2.sqf @@ -62,12 +62,12 @@ garageKeys = (findDisplay 46) displayAddEventHandler ["KeyDown", }; if (_this select 1 == 205) then { - garageVeh setDir (getDir garageVeh + 1); + garageVeh setDir (getDir garageVeh + 10); _handled = true; }; if (_this select 1 == 203) then { - garageVeh setDir (getDir garageVeh - 1); + garageVeh setDir (getDir garageVeh - 10); _handled = true; }; if (_cambio) then @@ -119,7 +119,6 @@ onEachFrame if (_ins isEqualTo []) exitWith {}; _pos = (_ins select 0 select 0); if (_pos distance posicionSel < 0.1) exitWith {}; - posicionSel = _pos; _barco = false; if (garageVeh isKindOf "Ship") then {_pos set [2,0]; _barco = true}; if (count (_pos findEmptyPosition [0, 0, typeOf garageVeh])== 0) exitWith {garageVeh setPosASL [0,0,0]}; @@ -127,6 +126,7 @@ onEachFrame _agua = surfaceIsWater _pos; if (_barco and {!_agua}) exitWith {garageVeh setPosASL [0,0,0]}; if (!_barco and {_agua}) exitWith {garageVeh setPosASL [0,0,0]}; + posicionSel = _pos; garageVeh setPosASL _pos; garageVeh setVectorUp (_ins select 0 select 1); }; diff --git a/A3-Antistasi/init.sqf b/A3-Antistasi/init.sqf index 95770682e9..236f4172c1 100644 --- a/A3-Antistasi/init.sqf +++ b/A3-Antistasi/init.sqf @@ -43,6 +43,9 @@ if (!isMultiPlayer) then minWeaps = 24; civTraffic = 1; limitedFT = false; + easyRevive = true; + bleedoutTimeMul = 4; + reviveTimeMul = 4; { private _index = _x call jn_fnc_arsenal_itemType; [_index,_x,-1] call jn_fnc_arsenal_addItem; @@ -52,17 +55,17 @@ if (!isMultiPlayer) then distancias = [] spawn A3A_fnc_distancias4; resourcecheck = [] execVM "resourcecheck.sqf"; [] execVM "Scripts\fn_advancedTowingInit.sqf"; - addMissionEventHandler ["BuildingChanged", - { - _building = _this select 0; - if !(_building in antenas) then - { - if (_this select 2) then - { - destroyedBuildings pushBack (getPosATL _building); - }; - }; - }]; + // addMissionEventHandler ["BuildingChanged", + // { + // _building = _this select 0; + // if !(_building in antenas) then + // { + // if (_this select 2) then + // { + // destroyedBuildings pushBack (getPosATL _building); + // }; + // }; + // }]; deleteMarker "respawn_east"; if (buenos == independent) then {deleteMarker "respawn_west"} else {deleteMarker "respawn_guerrila"}; }; diff --git a/A3-Antistasi/initPetros.sqf b/A3-Antistasi/initPetros.sqf index 82397a1ec1..630dad3ba7 100644 --- a/A3-Antistasi/initPetros.sqf +++ b/A3-Antistasi/initPetros.sqf @@ -58,7 +58,7 @@ petros addMPEventHandler ["mpkilled", garrison setVariable ["Synd_HQ",[],true]; _hrT = server getVariable "hr"; _resourcesFIAT = server getVariable "resourcesFIA"; - [-1*(round(_hrT*0.9)),-1*(round(_resourcesFIAT*0.9))] remoteExec ["A3A_fnc_resourcesFIA",2]; + [-1*(round(_hrT*0.75)),-1*(round(_resourcesFIAT*0.75))] remoteExec ["A3A_fnc_resourcesFIA",2]; waitUntil {sleep 6; isPlayer theBoss}; [] remoteExec ["A3A_fnc_placementSelection",theBoss]; }; diff --git a/A3-Antistasi/initPlayerLocal.sqf b/A3-Antistasi/initPlayerLocal.sqf index bc8f5536b2..5c4dd0ad82 100644 --- a/A3-Antistasi/initPlayerLocal.sqf +++ b/A3-Antistasi/initPlayerLocal.sqf @@ -577,13 +577,9 @@ if (hayTFAR or hayACE or hayRHS or hayACRE or hayFFAA) then { sleep 0.5; _texto = _this select 0; - "Integrated Mods Detected" hintC _texto; - hintC_arr_EH = findDisplay 72 displayAddEventHandler ["unload", { - 0 = _this spawn { - _this select 0 displayRemoveEventHandler ["unload", hintC_arr_EH]; - hintSilent ""; - }; - }]; + private _final_text = ""; + { _final_text = _final_text + "\n\n" + _x } forEach _texto; + hint _final_text; }; }; waituntil {!isnull (finddisplay 46)}; @@ -593,28 +589,28 @@ gameMenu = (findDisplay 46) displayAddEventHandler ["KeyDown",A3A_fnc_teclas]; if ((!isServer) and (isMultiplayer)) then {caja call jn_fnc_arsenal_init}; caja allowDamage false; -caja addAction ["Transfer Vehicle cargo to Ammobox", "[] call A3A_fnc_vaciar"]; -caja addAction ["Move this asset", "moveHQObject.sqf",nil,0,false,true,"","(_this == theBoss)"]; -bandera addAction ["HQ Management", {[] execVM "Dialogs\dialogHQ.sqf"},nil,0,false,true,"","(_this == theBoss) and (petros == leader group petros)"]; +caja addAction ["Transfer Vehicle cargo to Ammobox", "[] call A3A_fnc_vaciar"]; +caja addAction ["Move this asset", "moveHQObject.sqf",nil,0,false,true,"","(_this == theBoss)"]; +bandera addAction ["HQ Management", {[] execVM "Dialogs\dialogHQ.sqf"},nil,0,false,true,"","(_this == theBoss) and (petros == leader group petros)"]; bandera allowDamage false; -bandera addAction ["Unit Recruitment", {if ([player,300] call A3A_fnc_enemyNearCheck) then {hint "You cannot recruit units while there are enemies near you"} else {nul=[] execVM "Dialogs\unit_recruit.sqf"}},nil,0,false,true,"","(isPlayer _this) and (_this == _this getVariable ['owner',objNull]) and (side (group _this) == buenos)"]; -bandera addAction ["Buy Vehicle", {if ([player,300] call A3A_fnc_enemyNearCheck) then {hint "You cannot buy vehicles while there are enemies near you"} else {nul = createDialog "vehicle_option"}},nil,0,false,true,"","(isPlayer _this) and (_this == _this getVariable ['owner',objNull]) and (side (group _this) == buenos)"]; -if (isMultiplayer) then {bandera addAction ["Personal Garage", {nul = [true] spawn A3A_fnc_garage},nil,0,false,true,"","(isPlayer _this) and (_this == _this getVariable ['owner',objNull]) and (side (group _this) == buenos)"]}; -bandera addAction ["Move this asset", "moveHQObject.sqf",nil,0,false,true,"","(_this == theBoss)"]; +bandera addAction ["Unit Recruitment", {if ([player,300] call A3A_fnc_enemyNearCheck) then {hint "You cannot recruit units while there are enemies near you"} else {nul=[] execVM "Dialogs\unit_recruit.sqf"}},nil,0,false,true,"","(isPlayer _this) and (_this == _this getVariable ['owner',objNull]) and (side (group _this) == buenos)"]; +bandera addAction ["Buy Vehicle", {if ([player,300] call A3A_fnc_enemyNearCheck) then {hint "You cannot buy vehicles while there are enemies near you"} else {nul = createDialog "vehicle_option"}},nil,0,false,true,"","(isPlayer _this) and (_this == _this getVariable ['owner',objNull]) and (side (group _this) == buenos)"]; +if (isMultiplayer) then {bandera addAction ["Personal Garage", {nul = [true] spawn A3A_fnc_garage},nil,0,false,true,"","(isPlayer _this) and (_this == _this getVariable ['owner',objNull]) and (side (group _this) == buenos)"]}; +bandera addAction ["Move this asset", "moveHQObject.sqf",nil,0,false,true,"","(_this == theBoss)"]; cajaVeh allowDamage false; -cajaveh addAction ["Heal, Repair and Rearm", "healandrepair.sqf",nil,0,false,true,"","(isPlayer _this) and (_this == _this getVariable ['owner',objNull]) and (side (group _this) == buenos)"]; -cajaveh addAction ["Move this asset", "moveHQObject.sqf",nil,0,false,true,"","(_this == theBoss)"]; +cajaveh addAction ["Heal, Repair and Rearm", "healandrepair.sqf",nil,0,false,true,"","(isPlayer _this) and (_this == _this getVariable ['owner',objNull]) and (side (group _this) == buenos)"]; +cajaveh addAction ["Move this asset", "moveHQObject.sqf",nil,0,false,true,"","(_this == theBoss)"]; fuego allowDamage false; -fuego addAction ["Rest for 8 Hours", "skiptime.sqf",nil,0,false,true,"","(_this == theBoss)"]; -fuego addAction ["Clear Nearby Forest", "clearForest.sqf",nil,0,false,true,"","_this == theBoss"]; -fuego addAction ["On\Off Lamp", "onOffLamp.sqf",nil,0,false,true,"","(isPlayer _this) and (side (group _this) == buenos)"]; -fuego addAction ["I hate the fog", "[10,0] remoteExec [""setFog"",2]",nil,0,false,true,"","(_this == theBoss)"]; +fuego addAction ["Rest for 8 Hours", "skiptime.sqf",nil,0,false,true,"","(_this == theBoss)"]; +fuego addAction ["Clear Nearby Forest", "clearForest.sqf",nil,0,false,true,"","_this == theBoss"]; +fuego addAction ["On\Off Lamp", "onOffLamp.sqf",nil,0,false,true,"","(isPlayer _this) and (side (group _this) == buenos)"]; +fuego addAction ["Game Options", {hint format ["Antistasi - %2\n\nVersion: %1\n\nDifficulty: %3\nUnlock Weapon Number: %4\nLimited Fast Travel: %5\nRevive difficulty: %6",antistasiVersion,worldName,if (skillMult >= 2) then {"Hard"} else {if (skillMult >= 1) then {"Normal"} else {"Easy"}},minWeaps,if (limitedFT) then {"Yes"} else {"No"},if (easyRevive) then {"Easy"} else {"Normal"}]; nul=CreateDialog "game_options";},nil,0,false,true,"","(isPlayer _this) and (_this == _this getVariable ['owner',objNull]) and (side (group _this) == buenos)"]; +mapa addAction ["Map Info", {nul = [] execVM "cityinfo.sqf";},nil,0,false,true,"","(isPlayer _this) and (_this == _this getVariable ['owner',objNull]) and (side (group _this) == buenos)"]; +mapa addAction ["Move this asset", "moveHQObject.sqf",nil,0,false,true,"","(_this == theBoss)"]; +if (isMultiplayer) then {mapa addAction ["AI Load Info", "[] remoteExec [""A3A_fnc_AILoadInfo"",2]",nil,0,false,true,"","(_this == theBoss)"]}; _nul = [player] execVM "OrgPlayers\unitTraits.sqf"; grupoPetros = group petros; grupoPetros setGroupIdGlobal ["Petros","GroupColor4"]; @@ -628,4 +624,12 @@ disableSerialization; //1 cutRsc ["H8erHUD","PLAIN",0,false]; _layer = ["estadisticas"] call bis_fnc_rscLayer; _layer cutRsc ["H8erHUD","PLAIN",0,false]; -[] spawn A3A_fnc_statistics; \ No newline at end of file +[] spawn A3A_fnc_statistics; + +player setUnitTrait ["Medic", true]; +player setUnitTrait ["Engineer", true]; +player enableStamina false; +player setCustomAimCoef 0.35; + +_nul = [] execVM "Scripts\init_flipAction.sqf"; +_nul = [] execVM "Scripts\init_canOpener.sqf"; diff --git a/A3-Antistasi/initServer.sqf b/A3-Antistasi/initServer.sqf index ea51f46cda..ff3d6d5431 100644 --- a/A3-Antistasi/initServer.sqf +++ b/A3-Antistasi/initServer.sqf @@ -29,10 +29,16 @@ minWeaps = paramsArray select 10; publicVariable "minWeaps"; civTraffic = paramsArray select 11; publicVariable "civTraffic"; memberDistance = paramsArray select 13; publicVariable "memberDistance"; limitedFT = if (paramsArray select 14 == 1) then {true} else {false}; publicVariable "limitedFT"; + +// Revive parameters +easyRevive = if (paramsArray select 15 == 1) then {false} else {true}; publicVariable "easyRevive"; +bleedoutTimeMul = if (paramsArray select 15 == 1) then {1} else {4}; publicVariable "bleedoutTimeMul"; +reviveTimeMul = if (paramsArray select 15 == 1) then {1} else {0.25}; publicVariable "reviveTimeMul"; + _nul = call compile preprocessFileLineNumbers "initVar.sqf"; initVar = true; publicVariable "initVar"; savingServer = true; -diag_log format ["Antistasi MP. InitVar done. Version: %1",antistasiVersion]; +diag_log format ["Antistasi MP. InitVar done. Version: %1", antistasiVersion]; bookedSlots = floor (((paramsArray select 12)/100) * (playableSlotsNumber buenos)); publicVariable "bookedSlots"; _nul = call compile preprocessFileLineNumbers "initFuncs.sqf"; diag_log "Antistasi MP Server. Funcs init finished"; @@ -142,17 +148,17 @@ diag_log "Antistasi MP Server. Arsenal config finished"; [[petros,"hint","Server Init Completed"],"A3A_fnc_commsMP"] call BIS_fnc_MP; addMissionEventHandler ["HandleDisconnect",{_this call A3A_fnc_onPlayerDisconnect;false}]; -addMissionEventHandler ["BuildingChanged", - { - _building = _this select 0; - if !(_building in antenas) then - { - if (_this select 2) then - { - destroyedBuildings pushBack (getPosATL _building); - }; - }; - }]; +// addMissionEventHandler ["BuildingChanged", +// { +// _building = _this select 0; +// if !(_building in antenas) then +// { +// if (_this select 2) then +// { +// destroyedBuildings pushBack (getPosATL _building); +// }; +// }; +// }]; serverInitDone = true; publicVariable "serverInitDone"; diag_log "Antistasi MP Server. serverInitDone set to true."; diff --git a/A3-Antistasi/initVar.sqf b/A3-Antistasi/initVar.sqf index 23bcad1ef4..535c4aa2af 100644 --- a/A3-Antistasi/initVar.sqf +++ b/A3-Antistasi/initVar.sqf @@ -5,7 +5,7 @@ //Not commented lines cannot be changed. //Don't touch them. -antistasiVersion = "v 1.4.0.2"; +antistasiVersion = "v 1.5.1.9"; debug = false;//debug variable, not useful for everything.. @@ -43,15 +43,14 @@ posHQ = getMarkerPos respawnBuenos; allMagazines = []; _cfgmagazines = configFile >> "cfgmagazines"; -for "_i" from 0 to (count _cfgMagazines) -1 do - { - _magazine = _cfgMagazines select _i; - if (isClass _magazine) then - { - _nombre = configName (_magazine); - allMagazines pushBack _nombre; - }; - }; + +for "_i" from 0 to (count _cfgMagazines) -1 do { + _magazine = _cfgMagazines select _i; + if (isClass _magazine) then { + _nombre = configName (_magazine); + allMagazines pushBack _nombre; + }; +}; arifles = []; srifles = []; @@ -99,29 +98,29 @@ _allItems = " " configClasses ( configFile >> "cfgWeapons" ); _yaMetidos = []; + { -_nombre = configName _x; -_nombre = [_nombre] call BIS_fnc_baseWeapon; -if (not(_nombre in _yaMetidos)) then - { - _magazines = getArray (configFile / "CfgWeapons" / _nombre / "magazines"); - _yaMetidos pushBack _nombre; - _weapon = [_nombre] call BIS_fnc_itemType; - _weaponType = _weapon select 1; - switch (_weaponType) do - { - case "AssaultRifle": {arifles pushBack _nombre}; - case "MachineGun": {mguns pushBack _nombre}; - case "SniperRifle": {srifles pushBack _nombre}; - case "Handgun": {hguns pushBack _nombre}; - case "MissileLauncher": {mlaunchers pushBack _nombre}; - case "RocketLauncher": {rlaunchers pushBack _nombre}; - case "Headgear": {cascos pushBack _nombre}; - //case "Vest": {vests pushBack _nombre}; - }; - - }; + _nombre = configName _x; + _nombre = [_nombre] call BIS_fnc_baseWeapon; + + if (not(_nombre in _yaMetidos)) then { + _magazines = getArray (configFile / "CfgWeapons" / _nombre / "magazines"); + _yaMetidos pushBack _nombre; + _weapon = [_nombre] call BIS_fnc_itemType; + _weaponType = _weapon select 1; + switch (_weaponType) do { + case "AssaultRifle": {arifles pushBack _nombre}; + case "MachineGun": {mguns pushBack _nombre}; + case "SniperRifle": {srifles pushBack _nombre}; + case "Handgun": {hguns pushBack _nombre}; + case "MissileLauncher": {mlaunchers pushBack _nombre}; + case "RocketLauncher": {rlaunchers pushBack _nombre}; + case "Headgear": {cascos pushBack _nombre}; + //case "Vest": {vests pushBack _nombre}; + }; + }; } forEach _allPrimaryWeapons + _allHandGuns + _allLaunchers + _allItems; + //vests = vests select {getNumber (configfile >> "CfgWeapons" >> _x >> "ItemInfo" >> "HitpointsProtectionInfo" >> "Chest" >> "armor") > 5}; activeAFRF = false; activeUSAF = false; @@ -130,119 +129,99 @@ hayFFAA = false; hayIFA = false; myCustomMod = false; -if ("LIB_PTRD" in arifles) then - { - hayIFA = true; - cascos = []; - humo = ["LIB_RDG","LIB_NB39"]; - } -else - { - if ("rhs_weap_akms" in arifles) then {activeAFRF = true; hayRHS = true}; - if ("ffaa_armas_hkg36k_normal" in arifles) then {hayFFAA = true}; - if ("rhs_weap_m4a1_d" in arifles) then {activeUSAF = true; hayRHS = true}; - if ("rhs_weap_m92" in arifles) then {activeGREF = true; hayRHS = true} else {mguns pushBack "LMG_Mk200_BI_F"}; - cascos = cascos select {getNumber (configfile >> "CfgWeapons" >> _x >> "ItemInfo" >> "HitpointsProtectionInfo" >> "Head" >> "armor") > 2}; - humo = ["SmokeShell","SmokeShellRed","SmokeShellGreen","SmokeShellBlue","SmokeShellYellow","SmokeShellPurple","SmokeShellOrange"]; - }; - -titanLaunchers = if ((!hayRHS) and !hayIFA and !myCustomMod) then - { - ["launch_B_Titan_F","launch_I_Titan_F","launch_O_Titan_ghex_F","launch_O_Titan_F","launch_B_Titan_tna_F"] - } -else - { - [] - }; -antitanqueAAF = if ((!hayRHS) and !hayIFA and !myCustomMod) then - { - ["launch_I_Titan_F","launch_I_Titan_short_F"] - } -else - { - []; - };//possible Titan weapons that spawn in ammoboxes -MantitanqueAAF = if ((!hayRHS) and !hayIFA and !myCustomMod) then - { - ["Titan_AT", "Titan_AP", "Titan_AA"] - } -else - { - if (hayIFA) then {["LIB_Shg24"]} else {[]}; - };//possible Titan rockets that spawn in ammoboxes -minasAAF = if ((!hayRHS) and !hayIFA and !myCustomMod) then - { - ["SLAMDirectionalMine_Wire_Mag","SatchelCharge_Remote_Mag","ClaymoreDirectionalMine_Remote_Mag", "ATMine_Range_Mag","APERSTripMine_Wire_Mag","APERSMine_Range_Mag", "APERSBoundingMine_Range_Mag"] - } -else - { - if (hayRHS) then - { - ["rhsusf_m112_mag","rhsusf_mine_m14_mag","rhs_mine_M19_mag","rhs_mine_tm62m_mag","rhs_mine_pmn2_mag"] - } - else - { - if (hayIFA and !myCustomMod) then {["LIB_PMD6_MINE_mag","LIB_TM44_MINE_mag","LIB_US_TNT_4pound_mag"]} else {[]}; - } - };//possible mines that spawn in AAF ammoboxescomment "Exported from Arsenal by Alberto"; -itemsAAF = if ((!hayRHS) and !hayIFA and !myCustomMod) then - { - ["FirstAidKit","Medikit","MineDetector","NVGoggles","ToolKit","muzzle_snds_H","muzzle_snds_L","muzzle_snds_M","muzzle_snds_B","muzzle_snds_H_MG","muzzle_snds_acp","bipod_03_F_oli","muzzle_snds_338_green","muzzle_snds_93mmg_tan","Rangefinder","Laserdesignator","ItemGPS","acc_pointer_IR","ItemRadio"] - } -else - { - if (hayRHS) then - { - ["FirstAidKit","Medikit","MineDetector","ToolKit","ItemGPS","acc_pointer_IR","ItemRadio"] - } - else - { - if (hayIFA and !myCustomMod) then {["FirstAidKit","Medikit","ToolKit","LIB_ToolKit"]} else {["FirstAidKit","Medikit","ToolKit"]}; - } - }; -NVGoggles = if (!hayIFA) then {["NVGoggles_OPFOR","NVGoggles_INDEP","O_NVGoggles_hex_F","O_NVGoggles_urb_F","O_NVGoggles_ghex_F","NVGoggles_tna_F","NVGoggles"]} else {[]}; - -arrayCivVeh = if !(hayIFA) then - { - ["C_Hatchback_01_F","C_Hatchback_01_sport_F","C_Offroad_01_F","C_SUV_01_F","C_Van_01_box_F","C_Van_01_fuel_F","C_Van_01_transport_F","C_Truck_02_transport_F","C_Truck_02_covered_F","C_Offroad_02_unarmed_F"]; - } -else - { - ["LIB_DAK_OpelBlitz_Open","LIB_GazM1","LIB_GazM1_dirty","LIB_DAK_Kfz1","LIB_DAK_Kfz1_hood"]; - }; +if ("LIB_PTRD" in arifles) then { + hayIFA = true; + cascos = []; + humo = ["LIB_RDG","LIB_NB39"]; +} else { + if ("rhs_weap_akms" in arifles) then {activeAFRF = true; hayRHS = true}; + if ("ffaa_armas_hkg36k_normal" in arifles) then {hayFFAA = true}; + if ("rhs_weap_m4a1_d" in arifles) then {activeUSAF = true; hayRHS = true}; + if ("rhs_weap_m92" in arifles) then {activeGREF = true; hayRHS = true} else {mguns pushBack "LMG_Mk200_BI_F"}; + cascos = cascos select {getNumber (configfile >> "CfgWeapons" >> _x >> "ItemInfo" >> "HitpointsProtectionInfo" >> "Head" >> "armor") > 2}; + humo = ["SmokeShell","SmokeShellRed","SmokeShellGreen","SmokeShellBlue","SmokeShellYellow","SmokeShellPurple","SmokeShellOrange"]; +}; + +titanLaunchers = if ((!hayRHS) and !hayIFA and !myCustomMod) then { + ["launch_B_Titan_F","launch_I_Titan_F","launch_O_Titan_ghex_F","launch_O_Titan_F","launch_B_Titan_tna_F"] +} else { + [] +}; + +antitanqueAAF = if ((!hayRHS) and !hayIFA and !myCustomMod) then { + ["launch_I_Titan_F","launch_I_Titan_short_F"] +} else { + []; +};//possible Titan weapons that spawn in ammoboxes +MantitanqueAAF = if ((!hayRHS) and !hayIFA and !myCustomMod) then { + ["Titan_AT", "Titan_AP", "Titan_AA"] +} else { + if (hayIFA) then {["LIB_Shg24"]} else {[]}; +};//possible Titan rockets that spawn in ammoboxes + +minasAAF = if ((!hayRHS) and !hayIFA and !myCustomMod) then { + ["SLAMDirectionalMine_Wire_Mag","SatchelCharge_Remote_Mag","ClaymoreDirectionalMine_Remote_Mag", "ATMine_Range_Mag","APERSTripMine_Wire_Mag","APERSMine_Range_Mag", "APERSBoundingMine_Range_Mag"] +} else { + if (hayRHS) then { + ["rhsusf_m112_mag","rhsusf_mine_m14_mag","rhs_mine_M19_mag","rhs_mine_tm62m_mag","rhs_mine_pmn2_mag"] + } else { + if (hayIFA and !myCustomMod) then {["LIB_PMD6_MINE_mag","LIB_TM44_MINE_mag","LIB_US_TNT_4pound_mag"]} else {[]}; + } +};//possible mines that spawn in AAF ammoboxescomment "Exported from Arsenal by Alberto"; + +itemsAAF = if ((!hayRHS) and !hayIFA and !myCustomMod) then { + ["FirstAidKit","Medikit","MineDetector","NVGoggles","ToolKit","muzzle_snds_H","muzzle_snds_L","muzzle_snds_M","muzzle_snds_B","muzzle_snds_H_MG","muzzle_snds_acp","bipod_03_F_oli","muzzle_snds_338_green","muzzle_snds_93mmg_tan","Rangefinder","Laserdesignator","ItemGPS","acc_pointer_IR","ItemRadio"] +} else { + if (hayRHS) then { + ["FirstAidKit","Medikit","MineDetector","ToolKit","ItemGPS","acc_pointer_IR","ItemRadio"] + } else { + if (hayIFA and !myCustomMod) then {["FirstAidKit","Medikit","ToolKit","LIB_ToolKit"]} else {["FirstAidKit","Medikit","ToolKit"]}; + } +}; + +NVGoggles = if (!hayIFA) then { + ["NVGoggles_OPFOR","NVGoggles_INDEP","O_NVGoggles_hex_F","O_NVGoggles_urb_F","O_NVGoggles_ghex_F","NVGoggles_tna_F","NVGoggles"] +} else { + [] +}; + +arrayCivVeh = if !(hayIFA) then { + ["C_Hatchback_01_F","C_Hatchback_01_sport_F","C_Offroad_01_F","C_SUV_01_F","C_Van_01_box_F","C_Van_01_fuel_F","C_Van_01_transport_F","C_Truck_02_transport_F","C_Truck_02_covered_F","C_Offroad_02_unarmed_F"]; +} else { + ["LIB_DAK_OpelBlitz_Open","LIB_GazM1","LIB_GazM1_dirty","LIB_DAK_Kfz1","LIB_DAK_Kfz1_hood"]; +}; municionNATO = []; armasNATO = []; municionCSAT = []; armasCSAT = []; -if (!hayIFA) then - { - if (!activeUSAF) then - { - call compile preProcessFileLineNumbers "Templates\malosVanilla.sqf"; - } - else - { - if (buenos == independent) then {call compile preProcessFileLineNumbers "Templates\malosRHSUSAF.sqf"} else {call compile preProcessFileLineNumbers "Templates\buenosRHSUSAF.sqf"}; - }; - if (!activeAFRF) then {call compile preProcessFileLineNumbers "Templates\muyMalosVanilla.sqf"} else {call compile preProcessFileLineNumbers "Templates\muyMalosRHSAFRF.sqf"}; - - if (!activeGREF) then - { - call compile preProcessFileLineNumbers "Templates\buenosVanilla.sqf" - } - else - { - if (buenos == independent) then {call compile preProcessFileLineNumbers "Templates\buenosRHSGREF.sqf"} else {call compile preProcessFileLineNumbers "Templates\malosRHSGREF.sqf"}; - }; - } -else - { - call compile preProcessFileLineNumbers "Templates\buenosIFA.sqf"; - call compile preProcessFileLineNumbers "Templates\muyMalosIFA.sqf"; - call compile preProcessFileLineNumbers "Templates\malosIFA.sqf"; - }; +if (!hayIFA) then { + if (!activeUSAF) then { + call compile preProcessFileLineNumbers "Templates\malosVanilla.sqf"; + } else { + if (buenos == independent) then { + call compile preProcessFileLineNumbers "Templates\malosRHSUSAF.sqf"; + } else { + call compile preProcessFileLineNumbers "Templates\buenosRHSUSAF.sqf"; + }; + }; + if (!activeAFRF) then { + call compile preProcessFileLineNumbers "Templates\muyMalosVanilla.sqf"; + } else { + call compile preProcessFileLineNumbers "Templates\muyMalosRHSAFRF.sqf"; + }; + + if (!activeGREF) then { + call compile preProcessFileLineNumbers "Templates\buenosVanilla.sqf" + } else { + if (buenos == independent) then {call compile preProcessFileLineNumbers "Templates\buenosRHSGREF.sqf"} else {call compile preProcessFileLineNumbers "Templates\malosRHSGREF.sqf"}; + }; +} else { + call compile preProcessFileLineNumbers "Templates\buenosIFA.sqf"; + call compile preProcessFileLineNumbers "Templates\muyMalosIFA.sqf"; + call compile preProcessFileLineNumbers "Templates\malosIFA.sqf"; +}; squadLeaders = SDKSL + [(NATOSquad select 0),(NATOSpecOp select 0),(CSATSquad select 0),(CSATSpecOp select 0),(FIASquad select 0)]; medics = SDKMedic + [(FIAsquad select ((count FIAsquad)-1)),(NATOSquad select ((count NATOSquad)-1)),(NATOSpecOp select ((count NATOSpecOp)-1)),(CSATSquad select ((count CSATSquad)-1)),(CSATSpecOp select ((count CSATSpecOp)-1))]; @@ -261,98 +240,93 @@ gruposSDKSniper = [SDKSniper,SDKSniper]; gruposSDKSentry = [SDKGL,SDKMil]; banditUniforms = []; uniformsSDK = []; + { -_unit = _x select 0; -_uniform = (getUnitLoadout _unit select 3) select 0; -banditUniforms pushBackUnique _uniform; -uniformsSDK pushBackUnique _uniform; -if (count _x > 1) then - { - _unit = _x select 1; - _uniform = (getUnitLoadout _unit select 3) select 0; - uniformsSDK pushBackUnique _uniform; - }; + _unit = _x select 0; + _uniform = (getUnitLoadout _unit select 3) select 0; + banditUniforms pushBackUnique _uniform; + uniformsSDK pushBackUnique _uniform; + if (count _x > 1) then + { + _unit = _x select 1; + _uniform = (getUnitLoadout _unit select 3) select 0; + uniformsSDK pushBackUnique _uniform; + }; } forEach [SDKSniper,SDKATman,SDKMedic,SDKMG,SDKExp,SDKGL,SDKMil,SDKSL,SDKEng,[SDKUnarmed],[staticCrewBuenos]]; + _checked = []; + { -{ -_tipo = _x; -if !(_tipo in _checked) then - { - _checked pushBack _tipo; - _loadout = getUnitLoadout _tipo; - for "_i" from 0 to 2 do - { - _weapon = [((_loadout select _i) select 0)] call BIS_fnc_baseWeapon; - if !(_weapon in armasCSAT) then {armasCSAT pushBack _weapon}; - }; - }; -} forEach _x; + { + _tipo = _x; + if !(_tipo in _checked) then { + _checked pushBack _tipo; + _loadout = getUnitLoadout _tipo; + for "_i" from 0 to 2 do { + _weapon = [((_loadout select _i) select 0)] call BIS_fnc_baseWeapon; + if !(_weapon in armasCSAT) then {armasCSAT pushBack _weapon}; + }; + }; + } forEach _x; } forEach gruposCSATmid + [CSATSpecOp] + gruposCSATSquad; + _checked = []; + { -{ -_tipo = _x; -if !(_tipo in _checked) then - { - _checked pushBack _tipo; - _loadout = getUnitLoadout _tipo; - for "_i" from 0 to 2 do - { - _weapon = [((_loadout select _i) select 0)] call BIS_fnc_baseWeapon; - if !(_weapon in armasNATO) then {armasNATO pushBack _weapon}; - }; - }; -} forEach _x; + { + _tipo = _x; + if !(_tipo in _checked) then { + _checked pushBack _tipo; + _loadout = getUnitLoadout _tipo; + for "_i" from 0 to 2 do { + _weapon = [((_loadout select _i) select 0)] call BIS_fnc_baseWeapon; + if !(_weapon in armasNATO) then {armasNATO pushBack _weapon}; + }; + }; + } forEach _x; } forEach gruposNATOmid + [NATOSpecOp] + gruposNATOSquad; { -_nombre = [_x] call BIS_fnc_baseWeapon; -_magazines = getArray (configFile / "CfgWeapons" / _nombre / "magazines"); -municionNATO pushBack (_magazines select 0); + _nombre = [_x] call BIS_fnc_baseWeapon; + _magazines = getArray (configFile / "CfgWeapons" / _nombre / "magazines"); + municionNATO pushBack (_magazines select 0); } forEach armasNATO; + { -_nombre = [_x] call BIS_fnc_baseWeapon; -_magazines = getArray (configFile / "CfgWeapons" / _nombre / "magazines"); -municionCSAT pushBack (_magazines select 0); + _nombre = [_x] call BIS_fnc_baseWeapon; + _magazines = getArray (configFile / "CfgWeapons" / _nombre / "magazines"); + municionCSAT pushBack (_magazines select 0); } forEach armasCSAT; + //optic, pointer and flashlight automated detection opticasAAF = []; flashLights = []; pointers = []; -{ -{ -_item = _x; -if !(_item in (opticasAAF + flashLights + pointers)) then - { - if (((_item call BIS_fnc_itemType) select 1) == "AccessorySights") then - { - opticasAAF pushBack _item - } - else - { - if (isClass (configfile >> "CfgWeapons" >> _item >> "ItemInfo" >> "FlashLight" >> "Attenuation")) then - { - flashLights pushBack _item; - } - else - { - if (isClass (configfile >> "CfgWeapons" >> "acc_pointer_IR" >> "ItemInfo" >> "Pointer")) then - { - pointers pushBack _item; - }; - }; - }; - }; -} forEach (_x call BIS_fnc_compatibleItems); +{ + { + _item = _x; + if !(_item in (opticasAAF + flashLights + pointers)) then { + if (((_item call BIS_fnc_itemType) select 1) == "AccessorySights") then { + opticasAAF pushBack _item; + } else { + if (isClass (configfile >> "CfgWeapons" >> _item >> "ItemInfo" >> "FlashLight" >> "Attenuation")) then { + flashLights pushBack _item; + } else { + if (isClass (configfile >> "CfgWeapons" >> "acc_pointer_IR" >> "ItemInfo" >> "Pointer")) then { + pointers pushBack _item; + }; + }; + }; + }; + } forEach (_x call BIS_fnc_compatibleItems); } forEach (armasNATO + armasCSAT); -if (hayRHS) then - { - opticasAAF = opticasAAF select {getText (configfile >> "CfgWeapons" >> _x >> "author") == "Red Hammer Studios"}; - flashlights = flashlights select {getText (configfile >> "CfgWeapons" >> _x >> "author") == "Red Hammer Studios"}; - pointers = pointers select {getText (configfile >> "CfgWeapons" >> _x >> "author") == "Red Hammer Studios"}; - }; + +if (hayRHS) then { + opticasAAF = opticasAAF select {getText (configfile >> "CfgWeapons" >> _x >> "author") == "Red Hammer Studios"}; + flashlights = flashlights select {getText (configfile >> "CfgWeapons" >> _x >> "author") == "Red Hammer Studios"}; + pointers = pointers select {getText (configfile >> "CfgWeapons" >> _x >> "author") == "Red Hammer Studios"}; +}; vehNormal = vehNATONormal + vehCSATNormal + [vehFIATruck,vehSDKTruck,vehSDKLightArmed,vehSDKBike,vehSDKRepair]; vehBoats = [vehNATOBoat,vehCSATBoat,vehSDKBoat]; @@ -363,7 +337,7 @@ vehFixedWing = [vehNATOPlane,vehNATOPlaneAA,vehCSATPlane,vehCSATPlaneAA,vehSDKPl vehUAVs = [vehNATOUAV,vehCSATUAV]; vehAmmoTrucks = [vehNATOAmmoTruck,vehCSATAmmoTruck]; vehAPCs = vehNATOAPC + vehCSATAPC; -vehTanks = [vehNATOTank,vehCSATTank]; +vehTanks = vehNATOAllTanks + vehCSATAllTanks; vehTrucks = vehNATOTrucks + vehCSATTrucks + [vehSDKTruck,vehFIATruck]; vehAA = [vehNATOAA,vehCSATAA]; vehMRLS = [vehCSATMRLS, vehNATOMRLS]; @@ -374,34 +348,30 @@ sniperGroups = [gruposNATOSniper,gruposCSATSniper]; sniperUnits = ["O_T_Soldier_M_F","O_T_Sniper_F","O_T_ghillie_tna_F","O_V_Soldier_M_ghex_F","B_CTRG_Soldier_M_tna_F","B_T_soldier_M_F","B_T_Sniper_F","B_T_ghillie_tna_F"] + SDKSniper + [FIAMarksman,NATOMarksman,CSATMarksman]; if (hayRHS) then {sniperUnits = sniperUnits + ["rhsusf_socom_marsoc_sniper","rhs_vdv_marksman_asval"]}; -arrayCivs = if (worldName == "Tanoa") then - { - ["C_man_1","C_man_1_1_F","C_man_1_2_F","C_man_1_3_F","C_man_hunter_1_F","C_man_p_beggar_F","C_man_p_beggar_F_afro","C_man_p_fugitive_F","C_man_p_shorts_1_F","C_man_polo_1_F","C_man_polo_2_F","C_man_polo_3_F","C_man_polo_4_F","C_man_polo_5_F","C_man_polo_6_F","C_man_shorts_1_F","C_man_shorts_2_F","C_man_shorts_3_F","C_man_shorts_4_F","C_scientist_F","C_Orestes","C_Nikos","C_Nikos_aged","C_Man_casual_1_F_tanoan","C_Man_casual_2_F_tanoan","C_Man_casual_3_F_tanoan","C_man_sport_1_F_tanoan","C_man_sport_2_F_tanoan","C_man_sport_3_F_tanoan","C_Man_casual_4_F_tanoan","C_Man_casual_5_F_tanoan","C_Man_casual_6_F_tanoan"] - } -else - { - if !(hayIFA) then - { - ["C_man_1","C_man_1_1_F","C_man_1_2_F","C_man_1_3_F","C_man_hunter_1_F","C_man_p_beggar_F","C_man_p_beggar_F_afro","C_man_p_fugitive_F","C_man_p_shorts_1_F","C_man_polo_1_F","C_man_polo_2_F","C_man_polo_3_F","C_man_polo_4_F","C_man_polo_5_F","C_man_polo_6_F","C_man_shorts_1_F","C_man_shorts_2_F","C_man_shorts_3_F","C_man_shorts_4_F","C_scientist_F","C_Orestes","C_Nikos","C_Nikos_aged"] - } - else - { - ["LIB_CIV_Assistant","LIB_CIV_Assistant_2","LIB_CIV_Citizen_1","LIB_CIV_Citizen_2","LIB_CIV_Citizen_3","LIB_CIV_Citizen_4","LIB_CIV_Citizen_5","LIB_CIV_Citizen_6","LIB_CIV_Citizen_7","LIB_CIV_Citizen_8","LIB_CIV_Priest","LIB_CIV_Doctor","LIB_CIV_Functionary_3","LIB_CIV_Functionary_2","LIB_CIV_Functionary_4","LIB_CIV_Villager_4","LIB_CIV_Villager_1","LIB_CIV_Villager_2","LIB_CIV_Villager_3","LIB_CIV_Woodlander_1","LIB_CIV_Woodlander_3","LIB_CIV_Woodlander_2","LIB_CIV_Woodlander_4","LIB_CIV_SchoolTeacher","LIB_CIV_SchoolTeacher_2","LIB_CIV_Rocker","LIB_CIV_Worker_3","LIB_CIV_Worker_1","LIB_CIV_Worker_4","LIB_CIV_Worker_2"] - }; - };//array of possible civs. Only euro types picked (this is Greece). Add any civ classnames you wish here +arrayCivs = if (worldName == "Tanoa") then { + ["C_man_1","C_man_1_1_F","C_man_1_2_F","C_man_1_3_F","C_man_hunter_1_F","C_man_p_beggar_F","C_man_p_beggar_F_afro","C_man_p_fugitive_F","C_man_p_shorts_1_F","C_man_polo_1_F","C_man_polo_2_F","C_man_polo_3_F","C_man_polo_4_F","C_man_polo_5_F","C_man_polo_6_F","C_man_shorts_1_F","C_man_shorts_2_F","C_man_shorts_3_F","C_man_shorts_4_F","C_scientist_F","C_Orestes","C_Nikos","C_Nikos_aged","C_Man_casual_1_F_tanoan","C_Man_casual_2_F_tanoan","C_Man_casual_3_F_tanoan","C_man_sport_1_F_tanoan","C_man_sport_2_F_tanoan","C_man_sport_3_F_tanoan","C_Man_casual_4_F_tanoan","C_Man_casual_5_F_tanoan","C_Man_casual_6_F_tanoan"] +} else { + if !(hayIFA) then { + ["C_man_1","C_man_1_1_F","C_man_1_2_F","C_man_1_3_F","C_man_hunter_1_F","C_man_p_beggar_F","C_man_p_beggar_F_afro","C_man_p_fugitive_F","C_man_p_shorts_1_F","C_man_polo_1_F","C_man_polo_2_F","C_man_polo_3_F","C_man_polo_4_F","C_man_polo_5_F","C_man_polo_6_F","C_man_shorts_1_F","C_man_shorts_2_F","C_man_shorts_3_F","C_man_shorts_4_F","C_scientist_F","C_Orestes","C_Nikos","C_Nikos_aged"] + } else { + ["LIB_CIV_Assistant","LIB_CIV_Assistant_2","LIB_CIV_Citizen_1","LIB_CIV_Citizen_2","LIB_CIV_Citizen_3","LIB_CIV_Citizen_4","LIB_CIV_Citizen_5","LIB_CIV_Citizen_6","LIB_CIV_Citizen_7","LIB_CIV_Citizen_8","LIB_CIV_Priest","LIB_CIV_Doctor","LIB_CIV_Functionary_3","LIB_CIV_Functionary_2","LIB_CIV_Functionary_4","LIB_CIV_Villager_4","LIB_CIV_Villager_1","LIB_CIV_Villager_2","LIB_CIV_Villager_3","LIB_CIV_Woodlander_1","LIB_CIV_Woodlander_3","LIB_CIV_Woodlander_2","LIB_CIV_Woodlander_4","LIB_CIV_SchoolTeacher","LIB_CIV_SchoolTeacher_2","LIB_CIV_Rocker","LIB_CIV_Worker_3","LIB_CIV_Worker_1","LIB_CIV_Worker_4","LIB_CIV_Worker_2"] + }; +};//array of possible civs. Only euro types picked (this is Greece). Add any civ classnames you wish here + civBoats = if !(hayIFA) then {["C_Boat_Civil_01_F","C_Scooter_Transport_01_F","C_Boat_Transport_02_F","C_Rubberboat"]} else {[]}; lamptypes = ["Lamps_Base_F", "PowerLines_base_F","Land_LampDecor_F","Land_LampHalogen_F","Land_LampHarbour_F","Land_LampShabby_F","Land_NavigLight","Land_runway_edgelight","Land_PowerPoleWooden_L_F"]; -if !(hayIFA) then - { - arrayids = ["Anthis","Costa","Dimitirou","Elias","Gekas","Kouris","Leventis","Markos","Nikas","Nicolo","Panas","Rosi","Samaras","Thanos","Vega"]; - if (isMultiplayer) then {arrayids = arrayids + ["protagonista"]}; - }; +if !(hayIFA) then { + arrayids = ["Anthis","Costa","Dimitirou","Elias","Gekas","Kouris","Leventis","Markos","Nikas","Nicolo","Panas","Rosi","Samaras","Thanos","Vega"]; + if (isMultiplayer) then { + arrayids = arrayids + ["protagonista"]; + }; +}; //civUniforms = ["U_C_Poloshirt_blue","U_C_Poloshirt_burgundy","U_C_Poloshirt_stripped","U_C_Poloshirt_tricolour","U_C_Poloshirt_salmon","U_C_Poloshirt_redwhite","U_C_Commoner1_1","U_C_Commoner1_2","U_C_Commoner1_3","U_Rangemaster","U_NikosBody","U_C_Poor_1","U_C_Poor_2","U_C_WorkerCoveralls","U_C_Poor_shorts_1","U_C_Commoner_shorts","U_C_ShirtSurfer_shorts","U_C_TeeSurfer_shorts_1","U_C_TeeSurfer_shorts_2","U_C_Man_casual_5_F","U_C_Man_casual_4_F","U_C_Man_casual_6_F","U_C_man_sport_3_F","U_C_man_sport_2_F","U_C_man_sport_1_F","U_C_Man_casual_2_F","U_C_Man_casual_1_F","U_C_Man_casual_3_F","U_Marshal"]; civUniforms = []; { -_uniform = (getUnitLoadout _x select 3) select 0; -civUniforms pushBackUnique _uniform; + _uniform = (getUnitLoadout _x select 3) select 0; + civUniforms pushBackUnique _uniform; } forEach arrayCivs; @@ -409,9 +379,9 @@ civUniforms pushBackUnique _uniform; injuredSounds = [ - "a3\sounds_f\characters\human-sfx\Person0\P0_moan_13_words.wss","a3\sounds_f\characters\human-sfx\Person0\P0_moan_14_words.wss","a3\sounds_f\characters\human-sfx\Person0\P0_moan_15_words.wss","a3\sounds_f\characters\human-sfx\Person0\P0_moan_16_words.wss","a3\sounds_f\characters\human-sfx\Person0\P0_moan_17_words.wss","a3\sounds_f\characters\human-sfx\Person0\P0_moan_18_words.wss","a3\sounds_f\characters\human-sfx\Person0\P0_moan_19_words.wss","a3\sounds_f\characters\human-sfx\Person0\P0_moan_20_words.wss", - "a3\sounds_f\characters\human-sfx\Person1\P1_moan_19_words.wss","a3\sounds_f\characters\human-sfx\Person1\P1_moan_20_words.wss","a3\sounds_f\characters\human-sfx\Person1\P1_moan_21_words.wss","a3\sounds_f\characters\human-sfx\Person1\P1_moan_22_words.wss","a3\sounds_f\characters\human-sfx\Person1\P1_moan_23_words.wss","a3\sounds_f\characters\human-sfx\Person1\P1_moan_24_words.wss","a3\sounds_f\characters\human-sfx\Person1\P1_moan_25_words.wss","a3\sounds_f\characters\human-sfx\Person1\P1_moan_26_words.wss","a3\sounds_f\characters\human-sfx\Person1\P1_moan_27_words.wss","a3\sounds_f\characters\human-sfx\Person1\P1_moan_28_words.wss","a3\sounds_f\characters\human-sfx\Person1\P1_moan_29_words.wss","a3\sounds_f\characters\human-sfx\Person1\P1_moan_30_words.wss","a3\sounds_f\characters\human-sfx\Person1\P1_moan_31_words.wss","a3\sounds_f\characters\human-sfx\Person1\P1_moan_32_words.wss","a3\sounds_f\characters\human-sfx\Person1\P1_moan_33_words.wss", - "a3\sounds_f\characters\human-sfx\Person2\P2_moan_19_words.wss" + "a3\sounds_f\characters\human-sfx\Person0\P0_moan_13_words.wss","a3\sounds_f\characters\human-sfx\Person0\P0_moan_14_words.wss","a3\sounds_f\characters\human-sfx\Person0\P0_moan_15_words.wss","a3\sounds_f\characters\human-sfx\Person0\P0_moan_16_words.wss","a3\sounds_f\characters\human-sfx\Person0\P0_moan_17_words.wss","a3\sounds_f\characters\human-sfx\Person0\P0_moan_18_words.wss","a3\sounds_f\characters\human-sfx\Person0\P0_moan_19_words.wss","a3\sounds_f\characters\human-sfx\Person0\P0_moan_20_words.wss", + "a3\sounds_f\characters\human-sfx\Person1\P1_moan_19_words.wss","a3\sounds_f\characters\human-sfx\Person1\P1_moan_20_words.wss","a3\sounds_f\characters\human-sfx\Person1\P1_moan_21_words.wss","a3\sounds_f\characters\human-sfx\Person1\P1_moan_22_words.wss","a3\sounds_f\characters\human-sfx\Person1\P1_moan_23_words.wss","a3\sounds_f\characters\human-sfx\Person1\P1_moan_24_words.wss","a3\sounds_f\characters\human-sfx\Person1\P1_moan_25_words.wss","a3\sounds_f\characters\human-sfx\Person1\P1_moan_26_words.wss","a3\sounds_f\characters\human-sfx\Person1\P1_moan_27_words.wss","a3\sounds_f\characters\human-sfx\Person1\P1_moan_28_words.wss","a3\sounds_f\characters\human-sfx\Person1\P1_moan_29_words.wss","a3\sounds_f\characters\human-sfx\Person1\P1_moan_30_words.wss","a3\sounds_f\characters\human-sfx\Person1\P1_moan_31_words.wss","a3\sounds_f\characters\human-sfx\Person1\P1_moan_32_words.wss","a3\sounds_f\characters\human-sfx\Person1\P1_moan_33_words.wss", + "a3\sounds_f\characters\human-sfx\Person2\P2_moan_19_words.wss" ]; medicAnims = ["AinvPknlMstpSnonWnonDnon_medic_1","AinvPknlMstpSnonWnonDnon_medic0","AinvPknlMstpSnonWnonDnon_medic1","AinvPknlMstpSnonWnonDnon_medic2"]; @@ -431,55 +401,61 @@ smallCAmrk = []; smallCApos = []; bigAttackInProgress = false; chopForest = false; -distanceForAirAttack = 10000; -distanceForLandAttack = if (hayIFA) then {5000} else {3000}; - -if (worldName == "Tanoa") then - { - roadsMrk = ["road","road_1","road_2","road_3","road_4","road_5","road_6","road_7","road_8","road_9","road_10","road_11","road_12","road_13","road_14","road_15","road_16"]; - roadsCentral = ["road","road_1","road_2","road_3","road_4"]; - roadsCE = ["road_5","road_6"]; - roadsCSE = ["road_7"]; - roadsSE = ["road_8","road_9","road_10","road_11"]; - roadsSW = ["road_12"]; - roadsCW = ["road_13","road_14"]; - roadsNW = ["road_15"]; - roadsNE = ["road_16"]; - carreteras setVariable ["airport",[[[6988.38,7135.59,10.0673],17.0361,"MG"],[[6873.83,7472,3.19066],262.634,"MG"],[[6902.09,7427.71,13.0559],359.999,"MG"],[[6886.75,7445.52,0.0368803],360,"Mort"],[[6888.47,7440.31,0.0368826],0.000531628,"Mort"],[[6882.14,7445.42,0.0368817],360,"Mort"],[[6886.49,7436.58,0.0368807],360,"Mort"],[[6970.32,7188.49,-0.0339937],359.999,"Tank"],[[6960.98,7188.49,-0.0339937],359.999,"Tank"],[[6950.71,7187.42,-0.033505],359.999,"Tank"]]]; +distanceForAirAttack = 20000; +distanceForLandAttack = 10000; //if (hayIFA) then {5000} else {3000}; + +if (worldName == "Tanoa") then { + roadsMrk = ["road","road_1","road_2","road_3","road_4","road_5","road_6","road_7","road_8","road_9","road_10","road_11","road_12","road_13","road_14","road_15","road_16"]; + roadsCentral = ["road","road_1","road_2","road_3","road_4"]; + roadsCE = ["road_5","road_6"]; + roadsCSE = ["road_7"]; + roadsSE = ["road_8","road_9","road_10","road_11"]; + roadsSW = ["road_12"]; + roadsCW = ["road_13","road_14"]; + roadsNW = ["road_15"]; + roadsNE = ["road_16"]; + carreteras setVariable ["airport",[[[6988.38,7135.59,10.0673],17.0361,"MG"],[[6873.83,7472,3.19066],262.634,"MG"],[[6902.09,7427.71,13.0559],359.999,"MG"],[[6886.75,7445.52,0.0368803],360,"Mort"],[[6888.47,7440.31,0.0368826],0.000531628,"Mort"],[[6882.14,7445.42,0.0368817],360,"Mort"],[[6886.49,7436.58,0.0368807],360,"Mort"],[[6970.32,7188.49,-0.0339937],359.999,"Tank"],[[6960.98,7188.49,-0.0339937],359.999,"Tank"],[[6950.71,7187.42,-0.033505],359.999,"Tank"]]]; carreteras setVariable ["airport_1",[[[2175.14,13402.4,-0.01863],138.861,"Tank"],[[2183.31,13409.7,-0.0184679],139.687,"Tank"],[[2211.39,13434.4,0.0164337],141.512,"Tank"],[[2221.62,13440.6,0.016408],142.886,"Tank"],[[2221.31,13195,0.0368757],0.000337857,"Mort"],[[2224.09,13197.6,0.038271],1.30051e-005,"Mort"],[[2218.96,13199.1,0.0382385],0.00923795,"Mort"],[[2071.1,13308.5,14.4943],133.738,"MG"]]]; carreteras setVariable ["airport_2",[[[11803,13051.6,0.0368805],360,"Mort"],[[11813.5,13049.2,0.0368915],0.000145629,"Mort"],[[11799.5,13043.2,0.0368919],360,"Mort"],[[11723.3,13114.6,18.1545],300.703,"MG"],[[11782.3,13058.1,0.0307827],19.6564,"Tank"],[[11810.6,13040.2,0.0368905],360,"Tank"],[[11832.9,13042.1,0.0283785],16.3683,"Tank"]]]; carreteras setVariable ["airport_3",[[[11658,3055.02,0.036881],360,"Mort"],[[11662.6,3060.14,0.0368819],0.000294881,"Mort"],[[11664.8,3049.94,0.0368805],360,"Mort"],[[11668.9,3055.64,0.0368805],2.08056e-005,"Mort"],[[11747.8,2982.95,18.1513],249.505,"MG"],[[11784.1,3132.77,0.183631],214.7,"Tank"],[[11720.3,3176.15,0.112019],215.055,"Tank"]]]; carreteras setVariable ["airport_4",[[[2092.87,3412.98,0.0372648],0.00414928,"Mort"],[[2091.5,3420.69,0.0369596],360,"Mort"],[[2099.93,3422.53,0.0373936],0.00215797,"Mort"],[[2100.13,3416.28,0.0394554],0.0043371,"Mort"],[[2198.24,3471.03,18.0123],0.00187816,"MG"],[[2133.01,3405.88,-0.0156536],315.528,"Tank"],[[2145.82,3416.83,-0.00544548],316.441,"Tank"],[[2163.9,3432.18,-0.0256157],318.777,"Tank"]]]; - } -else - { - if (worldName == "Altis") then - { - roadsMrk = ["road","road_1","road_2","road_3","road_4","road_5","road_6","road_7","road_8","road_9","road_10","road_11","road_12","road_13","road_14","road_15","road_16","road_17","road_18","road_19","road_20","road_21","road_22","road_23","road_24","road_25","road_26","road_27","road_28","road_29","road_30","road_31","road_32","road_33","road_34","road_35","road_36","road_37","road_38","road_39","road_40","road_41","road_42"]; - {_x setMarkerAlpha 0} forEach roadsMrk; - carreteras setVariable ["airport",[[[21175.06,7369.336,0],62.362,"Tank"],[[21178.89,7361.573,0.421],62.36,"Tank"],[[20961.332,7295.678,0],0,"Mort"],[[20956.143,7295.142,0],0,"Mort"],[[20961.1,7290.02,0.262632],0,"Mort"]]]; +} else { + if (worldName == "Altis") then { + roadsMrk = ["road","road_1","road_2","road_3","road_4","road_5","road_6","road_7","road_8","road_9","road_10","road_11","road_12","road_13","road_14","road_15","road_16","road_17","road_18","road_19","road_20","road_21","road_22","road_23","road_24","road_25","road_26","road_27","road_28","road_29","road_30","road_31","road_32","road_33","road_34","road_35","road_36","road_37","road_38","road_39","road_40","road_41","road_42"]; + {_x setMarkerAlpha 0} forEach roadsMrk; + carreteras setVariable ["airport",[[[21175.06,7369.336,0],62.362,"Tank"],[[21178.89,7361.573,0.421],62.36,"Tank"],[[20961.332,7295.678,0],0,"Mort"],[[20956.143,7295.142,0],0,"Mort"],[[20961.1,7290.02,0.262632],0,"Mort"]]]; carreteras setVariable ["airport_1",[[[23044.8,18745.7,0.0810001],88.275,"Tank"],[[23046.8,18756.8,0.0807302],88.275,"Tank"],[[23214.8,18859.5,0],267.943,"Tank"],[[22981.2,18903.9,0],0,"Mort"],[[22980.1,18907.5,0.553066],0,"Mort"]]]; carreteras setVariable ["airport_2",[[[26803.1,24727.7,0.0629988],359.958,"Mort"],[[26809,24728.2,0.03755],359.986,"Mort"],[[26815.2,24729,0.0384922],359.972,"Mort"],[[26821.3,24729.1,0.0407047],359.965,"Mort"],[[26769.1,24638.7,0.290344],131.324,"Tank"],[[26774.2,24643.9,0.282555],134.931,"Tank"]]]; carreteras setVariable ["airport_3",[[[14414.9,16327.8,-0.000991821],207.397,"Tank"],[[14471.9,16383.2,0.0378571],359.939,"Mort"],[[14443,16379.2,0.0369205],359.997,"Mort"],[[14449.4,16376.9,0.0369892],359.996,"Mort"],[[14458,16375.9,0.0369167],359.997,"Mort"],[[14447.2,16397.1,3.71081],269.525,"MG"],[[14472.3,16312,12.1993],317.315,"MG"],[[14411,16229,0.000303268],40.6607,"Tank"],[[14404.4,16235,-0.0169964],50.5741,"Tank"],[[14407.2,16331.7,0.0305004],204.588,"Tank"]]]; carreteras setVariable ["airport_4",[[[11577.4,11953.6,0.241838],122.274,"Tank"],[[11577.8,11964.3,0.258125],124.324,"Tank"],[[11633.3,11762,0.0372791],359.996,"Mort"],[[11637.3,11768.1,0.043232],0.0110098,"Mort"],[[11637.1,11763.1,0.0394402],0.00529677,"Mort"]],true]; carreteras setVariable ["airport_5",[[[9064.02,21531.3,0.00117016],138.075,"Tank"],[[9095.12,21552.8,0.614614],157.935,"Tank"],[[9030.28,21531.1,0.261349],157.935,"Mort"],[[9033.91,21534.7,0.295588],157.935,"Mort"]]]; - } - else - { - roadsMrk = ["road","road_1","road_2","road_3","road_4","road_5","road_6","road_7","road_8","road_9","road_10","road_11","road_12","road_13","road_14","road_15","road_16","road_17","road_18","road_19","road_20","road_21","road_22","road_23","road_24","road_25","road_26","road_27","road_28","road_29","road_30","road_31","road_32","road_33","road_34","road_35","road_36","road_37","road_38"]; - {_x setMarkerAlpha 0} forEach roadsMrk; - carreteras setVariable ["airport",[[[12191.2,12605.8,9.43077],0,"MG"],[[12194.2,12599.4,13.3954],0,"AA"],[[12141,12609,0.00088501],0,"Mort"],[[12144.3,12615.9,0],0,"Mort"],[[12156.5,12614.3,0],0,"Mort"],[[12170,12595.9,0.000305176],250.234,"AT"],[[12070.4,12656,0.0098114],23.5329,"Tank"],[[12022.5,12670.9,0.0098114],18.9519,"Tank"]]]; + } else { + roadsMrk = ["road","road_1","road_2","road_3","road_4","road_5","road_6","road_7","road_8","road_9","road_10","road_11","road_12","road_13","road_14","road_15","road_16","road_17","road_18","road_19","road_20","road_21","road_22","road_23","road_24","road_25","road_26","road_27","road_28","road_29","road_30","road_31","road_32","road_33","road_34","road_35","road_36","road_37","road_38"]; + {_x setMarkerAlpha 0} forEach roadsMrk; + carreteras setVariable ["airport",[[[12191.2,12605.8,9.43077],0,"MG"],[[12194.2,12599.4,13.3954],0,"AA"],[[12141,12609,0.00088501],0,"Mort"],[[12144.3,12615.9,0],0,"Mort"],[[12156.5,12614.3,0],0,"Mort"],[[12170,12595.9,0.000305176],250.234,"AT"],[[12070.4,12656,0.0098114],23.5329,"Tank"],[[12022.5,12670.9,0.0098114],18.9519,"Tank"]]]; carreteras setVariable ["airport_1",[[[4782.75,10251.4,18],0,"AA"],[[4716.17,10215.3,13.1149],278.308,"AA"],[[4713.94,10209.3,9.12177],188.973,"MG"],[[4787.34,10248.9,4.99982],188.303,"MG"],[[4740.75,10333.2,20.3206],232.414,"MG"],[[4818.39,10200.1,0.00982666],239.625,"Tank"],[[4765.22,10330.8,0],0,"Mort"],[[4758.21,10328.1,0],0,"Mort"],[[4751.45,10324.4,0],0,"Mort"],[[4745.39,10320.6,0],0,"Mort"],[[4739.97,10283.2,0.00567627],291.41,"AT"],[[4814.19,10245.1,0.00567627],211.414,"AT"],[[4841.34,10158.9,0.0102844],240.137,"Tank"],[[4865.7,10116.7,0.00970459],239.499,"Tank"],[[4888.33,10074.2,0.00982666],235.077,"Tank"]]]; carreteras setVariable ["airport_2",[[[4717.95,2595.24,12.9766],0,"AA"],[[4714.27,2590.97,8.97349],176.197,"MG"],[[4743.55,2567.69,0.0130215],207.155,"Tank"],[[4775.62,2547.37,0.00691605],210.579,"Tank"],[[4719.88,2582.34,0.00566483],261.79,"AT"],[[4826.5,2558.35,0.00150108],0,"Mort"],[[4821.12,2550.32,0.00147152],0,"Mort"],[[4816.59,2543.65,0.00147247],0,"Mort"],[[4812.77,2518.77,0.00566483],150.397,"AT"]]]; - }; - }; + }; +}; + listMilBld = ["Land_Cargo_Tower_V1_F","Land_Cargo_Tower_V1_No1_F","Land_Cargo_Tower_V1_No2_F","Land_Cargo_Tower_V1_No3_F","Land_Cargo_Tower_V1_No4_F","Land_Cargo_Tower_V1_No5_F","Land_Cargo_Tower_V1_No6_F","Land_Cargo_Tower_V1_No7_F","Land_Cargo_Tower_V2_F", "Land_Cargo_Tower_V3_F","Land_Cargo_HQ_V1_F","Land_Cargo_HQ_V2_F","Land_Cargo_HQ_V3_F","Land_Cargo_Patrol_V1_F","Land_Cargo_Patrol_V2_F","Land_Cargo_Patrol_V3_F","Land_HelipadSquare_F"]; listbld = ["Land_Cargo_Tower_V1_F","Land_Cargo_Tower_V1_No1_F","Land_Cargo_Tower_V1_No2_F","Land_Cargo_Tower_V1_No3_F","Land_Cargo_Tower_V1_No4_F","Land_Cargo_Tower_V1_No5_F","Land_Cargo_Tower_V1_No6_F","Land_Cargo_Tower_V1_No7_F","Land_Cargo_Tower_V2_F", "Land_Cargo_Tower_V3_F"]; swoopShutUp = ["V_RebreatherIA","G_Diving"]; -difficultyCoef = if !(isMultiplayer) then {0} else {floor ((({side group _x == buenos} count playableUnits) - ({side group _x != buenos} count playableUnits)) / 5)}; -if (side (group petros) == west) then {swoopShutUp pushBack "U_B_Wetsuit"} else {swoopShutUp pushBack "U_I_Wetsuit"}; + +difficultyCoef = if !(isMultiplayer) then { + 0 +} else { + // TODO: Fix this, it needs to be done whenever player leave/join + floor ((({side group _x == buenos} count playableUnits) - ({side group _x != buenos} count playableUnits)) / 5) +}; + +if (side (group petros) == west) then { + swoopShutUp pushBack "U_B_Wetsuit" +} else { + swoopShutUp pushBack "U_I_Wetsuit" +}; //Pricing values for soldiers, vehicles if (!isServer) exitWith {}; @@ -528,8 +504,12 @@ prestigeNATO = 5;//Initial Prestige NATO prestigeCSAT = 5;//Initial Prestige CSAT prestigeOPFOR = 50;//Initial % support for NATO on each city if (not cadetMode) then {prestigeOPFOR = 75};//if you play on vet, this is the number -prestigeBLUFOR = 0;//Initial % FIA support on each city -cuentaCA = 600;//600 +// Initial % FIA support on each city +prestigeBLUFOR = 0; +cuentaCA = 1200 + random(1200); +timeSinceLastAttack = 0; +cuentaCANonBuenos = 1800 + random(1800); +nextTick = 0; bombRuns = 0; cityIsSupportChanging = false; resourcesIsChanging = false; @@ -547,74 +527,60 @@ garrisonIsChanging = false; playerHasBeenPvP = []; misiones = []; publicVariable "misiones"; movingMarker = false; -if !(hayIFA) then - { - unlockedItems = ["ItemMap","ItemWatch","ItemCompass","FirstAidKit","Medikit","ToolKit","H_Booniehat_khk","H_Booniehat_oli","H_Booniehat_grn","H_Booniehat_dirty","H_Cap_oli","H_Cap_blk","H_MilCap_rucamo","H_MilCap_gry","H_BandMask_blk","H_Bandanna_khk","H_Bandanna_gry","H_Bandanna_camo","H_Shemag_khk","H_Shemag_tan","H_Shemag_olive","H_ShemagOpen_tan","H_Beret_grn","H_Beret_grn_SF","H_Watchcap_camo","H_TurbanO_blk","H_Hat_camo","H_Hat_tan","H_Beret_blk","H_Beret_red","H_Watchcap_khk","G_Balaclava_blk","G_Balaclava_combat","G_Balaclava_lowprofile","G_Balaclava_oli","G_Bandanna_beast","G_Tactical_Black","G_Aviator","G_Shades_Black","acc_flashlight"] + uniformsSDK + civUniforms;//Initial Arsenal available items - if (side group petros == independent) then {unlockedItems pushBack "I_UavTerminal"} else {unlockedItems pushBack "B_UavTerminal"}; - } -else - { - unlockedItems = ["ItemMap","ItemWatch","ItemCompass","FirstAidKit","Medikit","ToolKit","LIB_ToolKit","H_LIB_CIV_Villager_Cap_1","H_LIB_CIV_Worker_Cap_2","G_LIB_Scarf2_B","G_LIB_Mohawk"] + uniformsSDK + civUniforms; - }; +if !(hayIFA) then { + unlockedItems = ["ItemMap","ItemWatch","ItemCompass","FirstAidKit","Medikit","ToolKit","H_Booniehat_khk","H_Booniehat_oli","H_Booniehat_grn","H_Booniehat_dirty","H_Cap_oli","H_Cap_blk","H_MilCap_rucamo","H_MilCap_gry","H_BandMask_blk","H_Bandanna_khk","H_Bandanna_gry","H_Bandanna_camo","H_Shemag_khk","H_Shemag_tan","H_Shemag_olive","H_ShemagOpen_tan","H_Beret_grn","H_Beret_grn_SF","H_Watchcap_camo","H_TurbanO_blk","H_Hat_camo","H_Hat_tan","H_Beret_blk","H_Beret_red","H_Watchcap_khk","G_Balaclava_blk","G_Balaclava_combat","G_Balaclava_lowprofile","G_Balaclava_oli","G_Bandanna_beast","G_Tactical_Black","G_Aviator","G_Shades_Black","acc_flashlight"] + uniformsSDK + civUniforms;//Initial Arsenal available items + if (side group petros == independent) then {unlockedItems pushBack "I_UavTerminal"} else {unlockedItems pushBack "B_UavTerminal"}; +} else { + unlockedItems = ["ItemMap","ItemWatch","ItemCompass","FirstAidKit","Medikit","ToolKit","LIB_ToolKit","H_LIB_CIV_Villager_Cap_1","H_LIB_CIV_Worker_Cap_2","G_LIB_Scarf2_B","G_LIB_Mohawk"] + uniformsSDK + civUniforms; +}; //The following are the initial weapons and mags unlocked and available in the Arsenal, vanilla or RHS -if (!activeGREF) then - { - if !(hayIFA) then - { - unlockedWeapons = ["hgun_PDW2000_F","hgun_Pistol_01_F","hgun_ACPC2_F","Binocular","SMG_05_F","SMG_02_F"];//"LMG_03_F" - unlockedRifles = ["hgun_PDW2000_F","arifle_AKM_F","arifle_AKS_F","SMG_05_F","SMG_02_F"];//standard rifles for AI riflemen, medics engineers etc. are picked from this array. Add only rifles. - unlockedMagazines = ["9Rnd_45ACP_Mag","30Rnd_9x21_Mag","30Rnd_762x39_Mag_F","MiniGrenade","1Rnd_HE_Grenade_shell","30Rnd_545x39_Mag_F","30Rnd_9x21_Mag_SMG_02","10Rnd_9x21_Mag","200Rnd_556x45_Box_F","IEDLandBig_Remote_Mag","IEDUrbanBig_Remote_Mag","IEDLandSmall_Remote_Mag","IEDUrbanSmall_Remote_Mag"]; - initialRifles = ["hgun_PDW2000_F","arifle_AKM_F","arifle_AKS_F","SMG_05_F","SMG_02_F"]; - //unlockedItems = unlockedItems + ["V_Chestrig_khk","V_BandollierB_cbr","V_BandollierB_rgr","U_C_HunterBody_grn"]; - if !(isMultiplayer) then - { - unlockedWeapons append ["arifle_AKM_F","arifle_AKS_F"]; - unlockedRifles append ["arifle_AKM_F","arifle_AKS_F"]; - initialRifles append ["arifle_AKM_F","arifle_AKS_F"]; - if (worldName == "Tanoa") then - { - unlockedWeapons pushBack "launch_RPG7_F"; - unlockedAT = ["launch_RPG7_F"]; - unlockedMagazines pushBack "RPG7_F"; - } - else - { - if (worldName == "Altis") then - { - unlockedWeapons pushBack "launch_MRAWS_olive_rail_F"; - unlockedAT = ["launch_MRAWS_olive_rail_F"]; - unlockedMagazines pushBack "MRAWS_HEAT_F"; - }; - }; - }; - unlockedItems = unlockedItems + ["U_C_HunterBody_grn"]; - } - else - { - unlockedWeapons = ["LIB_PTRD","LIB_M2_Flamethrower","LIB_Binocular_GER","LIB_K98","LIB_M1895","LIB_FLARE_PISTOL"];//"LMG_03_F" - unlockedRifles = ["LIB_K98"];//standard rifles for AI riflemen, medics engineers etc. are picked from this array. Add only rifles. - unlockedMagazines = ["LIB_1Rnd_145x114","LIB_M2_Flamethrower_Mag","LIB_5Rnd_792x57","LIB_Pwm","LIB_Rg42","LIB_US_TNT_4pound_mag","LIB_7Rnd_762x38","LIB_1Rnd_flare_red","LIB_1Rnd_flare_green","LIB_1Rnd_flare_white","LIB_1Rnd_flare_yellow"]; - initialRifles = ["LIB_K98"]; - unlockedAT = []; - }; - } -else - { +if (!activeGREF) then { + if !(hayIFA) then { + unlockedWeapons = ["hgun_PDW2000_F","hgun_Pistol_01_F","hgun_ACPC2_F","Binocular","SMG_05_F","SMG_02_F"];//"LMG_03_F" + unlockedRifles = ["hgun_PDW2000_F","arifle_AKM_F","arifle_AKS_F","SMG_05_F","SMG_02_F"];//standard rifles for AI riflemen, medics engineers etc. are picked from this array. Add only rifles. + unlockedMagazines = ["9Rnd_45ACP_Mag","30Rnd_9x21_Mag","30Rnd_762x39_Mag_F","MiniGrenade","1Rnd_HE_Grenade_shell","30Rnd_545x39_Mag_F","30Rnd_9x21_Mag_SMG_02","10Rnd_9x21_Mag","200Rnd_556x45_Box_F","IEDLandBig_Remote_Mag","IEDUrbanBig_Remote_Mag","IEDLandSmall_Remote_Mag","IEDUrbanSmall_Remote_Mag"]; + initialRifles = ["hgun_PDW2000_F","arifle_AKM_F","arifle_AKS_F","SMG_05_F","SMG_02_F"]; + //unlockedItems = unlockedItems + ["V_Chestrig_khk","V_BandollierB_cbr","V_BandollierB_rgr","U_C_HunterBody_grn"]; + if !(isMultiplayer) then { + unlockedWeapons append ["arifle_AKM_F","arifle_AKS_F"]; + unlockedRifles append ["arifle_AKM_F","arifle_AKS_F"]; + initialRifles append ["arifle_AKM_F","arifle_AKS_F"]; + if (worldName == "Tanoa") then { + unlockedWeapons pushBack "launch_RPG7_F"; + unlockedAT = ["launch_RPG7_F"]; + unlockedMagazines pushBack "RPG7_F"; + } else { + if (worldName == "Altis") then { + unlockedWeapons pushBack "launch_MRAWS_olive_rail_F"; + unlockedAT = ["launch_MRAWS_olive_rail_F"]; + unlockedMagazines pushBack "MRAWS_HEAT_F"; + }; + }; + }; + unlockedItems = unlockedItems + ["U_C_HunterBody_grn"]; + } else { + unlockedWeapons = ["LIB_PTRD","LIB_M2_Flamethrower","LIB_Binocular_GER","LIB_K98","LIB_M1895","LIB_FLARE_PISTOL"];//"LMG_03_F" + unlockedRifles = ["LIB_K98"];//standard rifles for AI riflemen, medics engineers etc. are picked from this array. Add only rifles. + unlockedMagazines = ["LIB_1Rnd_145x114","LIB_M2_Flamethrower_Mag","LIB_5Rnd_792x57","LIB_Pwm","LIB_Rg42","LIB_US_TNT_4pound_mag","LIB_7Rnd_762x38","LIB_1Rnd_flare_red","LIB_1Rnd_flare_green","LIB_1Rnd_flare_white","LIB_1Rnd_flare_yellow"]; + initialRifles = ["LIB_K98"]; + unlockedAT = []; + }; +} else { unlockedWeapons = ["rhs_weap_akms","rhs_weap_makarov_pmm","Binocular","rhs_weap_rpg7","rhs_weap_m38_rail","rhs_weap_kar98k","rhs_weap_pp2000_folded","rhs_weap_savz61","rhs_weap_m3a1","rhs_weap_m1garand_sa43"]; unlockedRifles = ["rhs_weap_akms","rhs_weap_m38_rail","rhs_weap_kar98k","rhs_weap_savz61","rhs_weap_m3a1","rhs_weap_m1garand_sa43"];//standard rifles for AI riflemen, medics engineers etc. are picked from this array. Add only rifles. unlockedMagazines = ["rhs_30Rnd_762x39mm","rhs_mag_9x18_12_57N181S","rhs_rpg7_PG7VL_mag","rhsgref_5Rnd_762x54_m38","rhsgref_5Rnd_792x57_kar98k","rhs_mag_rgd5","rhs_mag_9x19mm_7n21_20","rhsgref_20rnd_765x17_vz61","rhsgref_30rnd_1143x23_M1911B_SMG","rhsgref_8Rnd_762x63_M2B_M1rifle"]; initialRifles = ["rhs_weap_akms","rhs_weap_m38_rail","rhs_weap_kar98k","rhs_weap_savz61"]; unlockedItems = unlockedItems + ["rhs_acc_2dpZenit"]; unlockedAT = ["rhs_weap_rpg7"]; - }; +}; { -_loadOut = getUnitLoadout (_x select 0); -_vest = _loadOut select 4; -if !(_vest isEqualTo []) then {unlockedItems pushBackUnique (_vest select 0)}; + _loadOut = getUnitLoadout (_x select 0); + _vest = _loadOut select 4; + if !(_vest isEqualTo []) then {unlockedItems pushBackUnique (_vest select 0)}; } forEach [SDKSniper,SDKATman,SDKMedic,SDKMG,SDKExp,SDKGL,SDKMil,SDKSL,SDKEng,[SDKUnarmed],[staticCrewBuenos]]; unlockedBackpacks = if !(hayIFA) then {["B_FieldPack_oli","B_FieldPack_blk","B_FieldPack_ocamo","B_FieldPack_oucamo","B_FieldPack_cbr"]} else {["B_LIB_US_M2Flamethrower","B_LIB_SOV_RA_MGAmmoBag_Empty"]}; //Initial Arsenal available backpacks @@ -633,142 +599,132 @@ hayACRE = false; hayACE = false; hayACEhearing = false; hayACEMedical = false; + //TFAR detection and config. -if (isClass (configFile >> "CfgPatches" >> "task_force_radio")) then - { +if (isClass (configFile >> "CfgPatches" >> "task_force_radio")) then { hayTFAR = true; haveRadio = true; unlockedItems = unlockedItems + ["tf_microdagr","tf_anprc148jem"];//making this items Arsenal available.["tf_anprc152"] tf_no_auto_long_range_radio = true; publicVariable "tf_no_auto_long_range_radio";//set to false and players will start with LR radio, uncomment the last line of so. - if (hayIFA) then - {tf_give_personal_radio_to_regular_soldier = false; - publicVariable "tf_give_personal_radio_to_regular_soldier"; - } - else - { - unlockedItems = unlockedItems + ["tf_microdagr","tf_anprc148jem"]; - }; - //tf_buenos_radio_code = "";publicVariable "tf_buenos_radio_code";//to make enemy vehicles usable as LR radio - //tf_east_radio_code = tf_buenos_radio_code; publicVariable "tf_east_radio_code"; //to make enemy vehicles usable as LR radio - //tf_guer_radio_code = tf_buenos_radio_code; publicVariable "tf_guer_radio_code";//to make enemy vehicles usable as LR radio - tf_same_sw_frequencies_for_side = true; publicVariable "tf_same_sw_frequencies_for_side"; - tf_same_lr_frequencies_for_side = true; publicVariable "tf_same_lr_frequencies_for_side"; - unlockedItems pushBack "ItemRadio"; - //unlockedBackpacks pushBack "tf_rt1523g_sage";//uncomment this if you are adding LR radios for players + if (hayIFA) then { + tf_give_personal_radio_to_regular_soldier = false; + publicVariable "tf_give_personal_radio_to_regular_soldier"; + } else { + unlockedItems = unlockedItems + ["tf_microdagr","tf_anprc148jem"]; }; + //tf_buenos_radio_code = "";publicVariable "tf_buenos_radio_code";//to make enemy vehicles usable as LR radio + //tf_east_radio_code = tf_buenos_radio_code; publicVariable "tf_east_radio_code"; //to make enemy vehicles usable as LR radio + //tf_guer_radio_code = tf_buenos_radio_code; publicVariable "tf_guer_radio_code";//to make enemy vehicles usable as LR radio + tf_same_sw_frequencies_for_side = true; publicVariable "tf_same_sw_frequencies_for_side"; + tf_same_lr_frequencies_for_side = true; publicVariable "tf_same_lr_frequencies_for_side"; + unlockedItems pushBack "ItemRadio"; + //unlockedBackpacks pushBack "tf_rt1523g_sage";//uncomment this if you are adding LR radios for players +}; //ACE detection and ACE item availability in Arsenal - aceItems = [ - "ACE_EarPlugs", - "ACE_RangeCard", - "ACE_Clacker", - "ACE_M26_Clacker", - "ACE_DeadManSwitch", - "ACE_DefusalKit", - "ACE_MapTools", - "ACE_Flashlight_MX991", - "ACE_wirecutter", - "ACE_RangeTable_82mm", - "ACE_EntrenchingTool", - "ACE_Cellphone", - "ACE_CableTie", - "ACE_SpottingScope", - "ACE_Tripod", - "ACE_Chemlight_HiWhite", - "ACE_Chemlight_HiRed", - "ACE_Kestrel4500", - "ACE_ATragMX", - "ACE_acc_pointer_green", - "ACE_HandFlare_White", - "ACE_HandFlare_Red" - ]; - if (hayIFA) then {aceItems append ["ACE_LIB_LadungPM","ACE_SpareBarrel"]}; - publicVariable "aceItems"; - - aceBasicMedItems = [ - "ACE_fieldDressing", - "ACE_bloodIV_500", - "ACE_bloodIV", - "ACE_epinephrine", - "ACE_morphine", - "ACE_bodyBag" - ]; publicVariable "aceBasicMedItems"; - - aceAdvMedItems = [ - "ACE_elasticBandage", - "ACE_quikclot", - "ACE_bloodIV_250", - "ACE_packingBandage", - "ACE_personalAidKit", - "ACE_plasmaIV", - "ACE_plasmaIV_500", - "ACE_plasmaIV_250", - "ACE_salineIV", - "ACE_salineIV_500", - "ACE_salineIV_250", - "ACE_surgicalKit", - "ACE_tourniquet", - "ACE_adenosine", - "ACE_atropine" - ]; publicVariable "aceAdvMedItems"; +aceItems = [ + "ACE_EarPlugs", + "ACE_RangeCard", + "ACE_Clacker", + "ACE_M26_Clacker", + "ACE_DeadManSwitch", + "ACE_DefusalKit", + "ACE_MapTools", + "ACE_Flashlight_MX991", + "ACE_wirecutter", + "ACE_RangeTable_82mm", + "ACE_EntrenchingTool", + "ACE_Cellphone", + "ACE_CableTie", + "ACE_SpottingScope", + "ACE_Tripod", + "ACE_Chemlight_HiWhite", + "ACE_Chemlight_HiRed", + "ACE_Kestrel4500", + "ACE_ATragMX", + "ACE_acc_pointer_green", + "ACE_HandFlare_White", + "ACE_HandFlare_Red" +]; +if (hayIFA) then {aceItems append ["ACE_LIB_LadungPM","ACE_SpareBarrel"]}; +publicVariable "aceItems"; + +aceBasicMedItems = [ + "ACE_fieldDressing", + "ACE_bloodIV_500", + "ACE_bloodIV", + "ACE_epinephrine", + "ACE_morphine", + "ACE_bodyBag" +]; publicVariable "aceBasicMedItems"; + +aceAdvMedItems = [ + "ACE_elasticBandage", + "ACE_quikclot", + "ACE_bloodIV_250", + "ACE_packingBandage", + "ACE_personalAidKit", + "ACE_plasmaIV", + "ACE_plasmaIV_500", + "ACE_plasmaIV_250", + "ACE_salineIV", + "ACE_salineIV_500", + "ACE_salineIV_250", + "ACE_surgicalKit", + "ACE_tourniquet", + "ACE_adenosine", + "ACE_atropine" +]; publicVariable "aceAdvMedItems"; if (!isNil "ace_common_fnc_isModLoaded") then { - unlockedItems = unlockedItems + aceItems; - if !(hayIFA) then - { - unlockedBackpacks pushBackUnique "ACE_TacticalLadder_Pack"; - unlockedWeapons pushBackUnique "ACE_VMH3"; - itemsAAF = itemsAAF + ["ACE_Kestrel4500","ACE_ATragMX"]; - armasNATO = armasNATO + ["ACE_M84"]; - }; - hayACE = true; - if (isClass (configFile >> "CfgSounds" >> "ACE_EarRinging_Weak")) then { - hayACEhearing = true; - }; - if (isClass (ConfigFile >> "CfgSounds" >> "ACE_heartbeat_fast_3")) then { - if (ace_medical_level == 1) then { - hayACEMedical = true; - unlockedItems = unlockedItems + aceBasicMedItems; - }; - }; - - if (isClass (ConfigFile >> "CfgSounds" >> "ACE_heartbeat_fast_3")) then { - if (ace_medical_level == 2) then { - hayACEMedical = true; - unlockedItems = unlockedItems + aceBasicMedItems + aceAdvMedItems; - }; - }; + unlockedItems = unlockedItems + aceItems; + if !(hayIFA) then { + unlockedBackpacks pushBackUnique "ACE_TacticalLadder_Pack"; + unlockedWeapons pushBackUnique "ACE_VMH3"; + itemsAAF = itemsAAF + ["ACE_Kestrel4500","ACE_ATragMX"]; + armasNATO = armasNATO + ["ACE_M84"]; + }; + hayACE = true; + if (isClass (configFile >> "CfgSounds" >> "ACE_EarRinging_Weak")) then { + hayACEhearing = true; + }; + if (isClass (ConfigFile >> "CfgSounds" >> "ACE_heartbeat_fast_3")) then { + if (ace_medical_level == 1) then { + hayACEMedical = true; + unlockedItems = unlockedItems + aceBasicMedItems; + }; + }; + + if (isClass (ConfigFile >> "CfgSounds" >> "ACE_heartbeat_fast_3")) then { + if (ace_medical_level == 2) then { + hayACEMedical = true; + unlockedItems = unlockedItems + aceBasicMedItems + aceAdvMedItems; + }; + }; +}; + +if (isClass(configFile >> "cfgPatches" >> "acre_main")) then { + hayACRE = true; + haveRadio = true; + unlockedItems = unlockedItems + ["ACRE_PRC343","ACRE_PRC148","ACRE_PRC152","ACRE_PRC77","ACRE_PRC117F"]; }; -if (isClass(configFile >> "cfgPatches" >> "acre_main")) then - { - hayACRE = true; - haveRadio = true; - unlockedItems = unlockedItems + ["ACRE_PRC343","ACRE_PRC148","ACRE_PRC152","ACRE_PRC77","ACRE_PRC117F"]; - }; //allItems = allItems + itemsAAF + opticasAAF + _vests + cascos + NVGoggles; -if (worldName == "Tanoa") then - { - {server setVariable [_x select 0,_x select 1]} forEach [["Lami01",277],["Lifou01",350],["Lobaka01",64],["LaFoa01",38],["Savaka01",33],["Regina01",303],["Katkoula01",413],["Moddergat01",195],["Losi01",83],["Tanouka01",380],["Tobakoro01",45],["Georgetown01",347],["Kotomo01",160],["Rautake01",113],["Harcourt01",325],["Buawa01",44],["SaintJulien01",353],["Balavu01",189],["Namuvaka01",45],["Vagalala01",174],["Imone01",31],["Leqa01",45],["Blerick01",71],["Yanukka01",189],["OuaOue01",200],["Cerebu01",22],["Laikoro01",29],["Saioko01",46],["Belfort01",240],["Oumere01",333],["Muaceba01",18],["Nicolet01",224],["Lailai01",23],["Doodstil01",101],["Tavu01",178],["Lijnhaven01",610],["Nani01",19],["PetitNicolet01",135],["PortBoise01",28],["SaintPaul01",136],["Nasua01",60],["Savu01",184],["Murarua01",258],["Momea01",159],["LaRochelle01",532],["Koumac01",51],["Taga01",31],["Buabua01",27],["Penelo01",189],["Vatukoula01",15],["Nandai01",130],["Tuvanaka01",303],["Rereki01",43],["Ovau01",226],["IndPort01",420],["Ba01",106]]; - call compile preprocessFileLineNumbers "roadsDB.sqf"; - } -else - { - if (worldName == "Altis") then - { - call compile preprocessFileLineNumbers "roadsDBAltis.sqf"; - {server setVariable [_x select 0,_x select 1]} forEach [["Therisa",154],["Zaros",371],["Poliakko",136],["Katalaki",95],["Alikampos",115],["Neochori",309],["Stavros",122],["Lakka",173],["AgiosDionysios",84],["Panochori",264],["Topolia",33],["Ekali",9],["Pyrgos",531],["Orino",45],["Neri",242],["Kore",133],["Kavala",660],["Aggelochori",395],["Koroni",32],["Gravia",291],["Anthrakia",143],["Syrta",151],["Negades",120],["Galati",151],["Telos",84],["Charkia",246],["Athira",342],["Dorida",168],["Ifestiona",48],["Chalkeia",214],["AgiosKonstantinos",39],["Abdera",89],["Panagia",91],["Nifi",24],["Rodopoli",212],["Kalithea",36],["Selakano",120],["Frini",69],["AgiosPetros",11],["Feres",92],["AgiaTriada",8],["Paros",396],["Kalochori",189],["Oreokastro",63],["Ioannina",48],["Delfinaki",29],["Sofia",179],["Molos",188]]; - } - else - { - if (worldName == "chernarus_summer") then - { - call compile preprocessFileLineNumbers "roadsDBcherna.sqf"; - {server setVariable [_x select 0,_x select 1]} forEach [["vill_NovySobor",129],["city_StarySobor",149],["vill_Guglovo",26],["vill_Vyshnoye",41],["vill_Kabanino",86],["vill_Rogovo",66],["vill_Mogilevka",104],["city_Gorka",115],["vill_Grishino",168],["vill_Shakhovka",55],["vill_Pogorevka",57],["vill_Pulkovo",26],["vill_Nadezhdino",109],["city_Vybor",180],["vill_Polana",118],["vill_Staroye",115],["vill_Dubrovka",86],["vill_Pustoshka",163],["vill_Kozlovka",100],["vill_Pusta",52],["vill_Dolina",83],["vill_Gvozdno",78],["vill_Prigorodki",145],["vill_Drozhino",58],["vill_Sosnovka",54],["vill_Msta",96],["vill_Lopatino",159],["city_Zelenogorsk",280],["vill_Orlovets",65],["city_Berezino",340],["vill_Myshkino",49],["vill_Petrovka",45],["city_Chernogorsk",761],["vill_Bor",46],["vill_Nizhnoye",146],["vill_Balota",147],["vill_Khelm",110],["city_Krasnostav",194],["vill_Komarovo",127],["city_Elektrozavodsk",745],["city_Solnychniy",224],["vill_Kamyshovo",196],["vill_Tulga",35],["vill_Pavlovo",99],["vill_Kamenka",127],["hill_Olsha",20]]; - }; - }; - }; +if (worldName == "Tanoa") then { + {server setVariable [_x select 0,_x select 1]} forEach [["Lami01",277],["Lifou01",350],["Lobaka01",64],["LaFoa01",38],["Savaka01",33],["Regina01",303],["Katkoula01",413],["Moddergat01",195],["Losi01",83],["Tanouka01",380],["Tobakoro01",45],["Georgetown01",347],["Kotomo01",160],["Rautake01",113],["Harcourt01",325],["Buawa01",44],["SaintJulien01",353],["Balavu01",189],["Namuvaka01",45],["Vagalala01",174],["Imone01",31],["Leqa01",45],["Blerick01",71],["Yanukka01",189],["OuaOue01",200],["Cerebu01",22],["Laikoro01",29],["Saioko01",46],["Belfort01",240],["Oumere01",333],["Muaceba01",18],["Nicolet01",224],["Lailai01",23],["Doodstil01",101],["Tavu01",178],["Lijnhaven01",610],["Nani01",19],["PetitNicolet01",135],["PortBoise01",28],["SaintPaul01",136],["Nasua01",60],["Savu01",184],["Murarua01",258],["Momea01",159],["LaRochelle01",532],["Koumac01",51],["Taga01",31],["Buabua01",27],["Penelo01",189],["Vatukoula01",15],["Nandai01",130],["Tuvanaka01",303],["Rereki01",43],["Ovau01",226],["IndPort01",420],["Ba01",106]]; + call compile preprocessFileLineNumbers "roadsDB.sqf"; +} else { + if (worldName == "Altis") then { + call compile preprocessFileLineNumbers "roadsDBAltis.sqf"; + {server setVariable [_x select 0,_x select 1]} forEach [["Therisa",154],["Zaros",371],["Poliakko",136],["Katalaki",95],["Alikampos",115],["Neochori",309],["Stavros",122],["Lakka",173],["AgiosDionysios",84],["Panochori",264],["Topolia",33],["Ekali",9],["Pyrgos",531],["Orino",45],["Neri",242],["Kore",133],["Kavala",660],["Aggelochori",395],["Koroni",32],["Gravia",291],["Anthrakia",143],["Syrta",151],["Negades",120],["Galati",151],["Telos",84],["Charkia",246],["Athira",342],["Dorida",168],["Ifestiona",48],["Chalkeia",214],["AgiosKonstantinos",39],["Abdera",89],["Panagia",91],["Nifi",24],["Rodopoli",212],["Kalithea",36],["Selakano",120],["Frini",69],["AgiosPetros",11],["Feres",92],["AgiaTriada",8],["Paros",396],["Kalochori",189],["Oreokastro",63],["Ioannina",48],["Delfinaki",29],["Sofia",179],["Molos",188]]; + } else { + if (worldName == "chernarus_summer") then { + call compile preprocessFileLineNumbers "roadsDBcherna.sqf"; + {server setVariable [_x select 0,_x select 1]} forEach [["vill_NovySobor",129],["city_StarySobor",149],["vill_Guglovo",26],["vill_Vyshnoye",41],["vill_Kabanino",86],["vill_Rogovo",66],["vill_Mogilevka",104],["city_Gorka",115],["vill_Grishino",168],["vill_Shakhovka",55],["vill_Pogorevka",57],["vill_Pulkovo",26],["vill_Nadezhdino",109],["city_Vybor",180],["vill_Polana",118],["vill_Staroye",115],["vill_Dubrovka",86],["vill_Pustoshka",163],["vill_Kozlovka",100],["vill_Pusta",52],["vill_Dolina",83],["vill_Gvozdno",78],["vill_Prigorodki",145],["vill_Drozhino",58],["vill_Sosnovka",54],["vill_Msta",96],["vill_Lopatino",159],["city_Zelenogorsk",280],["vill_Orlovets",65],["city_Berezino",340],["vill_Myshkino",49],["vill_Petrovka",45],["city_Chernogorsk",761],["vill_Bor",46],["vill_Nizhnoye",146],["vill_Balota",147],["vill_Khelm",110],["city_Krasnostav",194],["vill_Komarovo",127],["city_Elektrozavodsk",745],["city_Solnychniy",224],["vill_Kamyshovo",196],["vill_Tulga",35],["vill_Pavlovo",99],["vill_Kamenka",127],["hill_Olsha",20]]; + }; + }; +}; if (isDedicated) then {civPerc = 70; publicVariable "civPerc"}; @@ -804,4 +760,4 @@ publicVariable "unlockedAT"; publicVariable "unlockedAA"; publicVariable "initialRifles"; -if (isMultiplayer) then {[[petros,"hint","Variables Init Completed"],"A3A_fnc_commsMP"] call BIS_fnc_MP;}; \ No newline at end of file +if (isMultiplayer) then {[[petros,"hint","Variables Init Completed"],"A3A_fnc_commsMP"] call BIS_fnc_MP;}; diff --git a/A3-Antistasi/initZones.sqf b/A3-Antistasi/initZones.sqf index aa46873420..11a2823ae5 100644 --- a/A3-Antistasi/initZones.sqf +++ b/A3-Antistasi/initZones.sqf @@ -9,70 +9,72 @@ forcedSpawn = []; ciudades = []; -if (worldName == "Tanoa") then - { - aeropuertos = ["airport","airport_1","airport_2","airport_3","airport_4"];//airports - spawnPoints = ["spawnPoint","spawnPoint_1","spawnPoint_2","spawnPoint_3","spawnPoint_4"]; - recursos = ["resource","resource_1","resource_2","resource_3","resource_4","resource_5","resource_6","resource_7"];//economic resources - fabricas = ["factory","factory_1","factory_2","factory_3","factory_4"];//factories - puestos = ["puesto","puesto_1","puesto_2","puesto_3","puesto_4","puesto_5","puesto_6","puesto_7","puesto_8","puesto_9","puesto_10","puesto_11","puesto_12","puesto_13","puesto_14"];//any small zone with mil buildings - puertos = ["puerto","puerto_1","puerto_2","puerto_3","puerto_4","puerto_5"];//seaports, adding a lot will affect economics, 5 is ok - controles = ["control","control_1","control_2","control_3","control_4","control_5","control_6","control_7","control_8","control_9","control_10","control_11","control_12","control_13","control_14","control_15","control_16","control_17","control_18","control_19","control_20","control_21","control_22","control_23","control_24","control_25","control_26","control_27","control_28","control_29","control_30","control_31","control_32","control_33","control_34","control_35","control_36","control_37","control_38","control_39","control_40","control_41","control_42","control_43","control_44","control_45","control_46","control_47","control_48","control_49","control_50","control_51"];//use this for points where you want a roadblock (logic/strategic points, such as crossroads, airport or bases entrances etc..) game will add some more automatically - seaMarkers = ["seaPatrol","seaPatrol_1","seaPatrol_2","seaPatrol_3","seaPatrol_4","seaPatrol_5","seaPatrol_6","seaPatrol_7","seaPatrol_8","seaPatrol_9","seaPatrol_10","seaPatrol_11","seaPatrol_12","seaPatrol_13","seaPatrol_14","seaPatrol_15","seaPatrol_16","seaPatrol_17","seaPatrol_18","seaPatrol_19","seaPatrol_20","seaPatrol_21"]; - seaSpawn = ["seaSpawn","seaSpawn_1","seaSpawn_2","seaSpawn_3","seaSpawn_4","seaSpawn_5","seaSpawn_6","seaSpawn_7","seaSpawn_8","seaSpawn_9","seaSpawn_10","seaSpawn_11","seaSpawn_12","seaSpawn_13","seaSpawn_14","seaSpawn_15","seaSpawn_16","seaSpawn_17","seaSpawn_18","seaSpawn_19","seaSpawn_20","seaSpawn_21","seaSpawn_22","seaSpawn_23","seaSpawn_24","seaSpawn_25","seaSpawn_26","seaSpawn_27","seaSpawn_28","seaSpawn_29","seaSpawn_30","seaSpawn_31","seaSpawn_32"]; - seaAttackSpawn = ["seaAttackSpawn","seaAttackSpawn_1","seaAttackSpawn_2","seaAttackSpawn_3","seaAttackSpawn_4","seaAttackSpawn_5","seaAttackSpawn_6","seaAttackSpawn_7","seaAttackSpawn_8","seaAttackSpawn_9","seaAttackSpawn_10"]; - } -else - { - if (worldName == "Altis") then +aeropuertos = (allMapMarkers select { toLower(_x) find "airport" == 0 }); +aeropuertos sort true; +spawnPoints = (allMapMarkers select { toLower(_x) find "spawnpoint" == 0 }); +spawnPoints sort true; +recursos = (allMapMarkers select { toLower(_x) find "resource" == 0 }); +recursos sort true; +fabricas = (allMapMarkers select { toLower(_x) find "factory" == 0 }); +fabricas sort true; +puestos = (allMapMarkers select { toLower(_x) find "puesto" == 0 }); +puestos sort true; +puertos = (allMapMarkers select { toLower(_x) find "puerto" == 0 }); +puertos sort true; +controles = (allMapMarkers select { toLower(_x) find "control" == 0 }); +controles sort true; +seaMarkers = (allMapMarkers select { toLower(_x) find "seapatrol" == 0 }); +seaMarkers sort true; +seaSpawn = (allMapMarkers select { toLower(_x) find "seaspawn" == 0 }); +seaSpawn sort true; +seaAttackSpawn = (allMapMarkers select { toLower(_x) find "seaattackspawn" == 0 }); +seaAttackSpawn sort true; +if (worldName == "Tanoa") then { + // aeropuertos = ["airport","airport_1","airport_2","airport_3","airport_4"];//airports + // spawnPoints = ["spawnPoint","spawnPoint_1","spawnPoint_2","spawnPoint_3","spawnPoint_4"]; + // recursos = ["resource","resource_1","resource_2","resource_3","resource_4","resource_5","resource_6","resource_7"];//economic resources + // fabricas = ["factory","factory_1","factory_2","factory_3","factory_4"];//factories + // puestos = ["puesto","puesto_1","puesto_2","puesto_3","puesto_4","puesto_5","puesto_6","puesto_7","puesto_8","puesto_9","puesto_10","puesto_11","puesto_12","puesto_13","puesto_14"];//any small zone with mil buildings + // puertos = ["puerto","puerto_1","puerto_2","puerto_3","puerto_4","puerto_5"];//seaports, adding a lot will affect economics, 5 is ok + // controles = ["control","control_1","control_2","control_3","control_4","control_5","control_6","control_7","control_8","control_9","control_10","control_11","control_12","control_13","control_14","control_15","control_16","control_17","control_18","control_19","control_20","control_21","control_22","control_23","control_24","control_25","control_26","control_27","control_28","control_29","control_30","control_31","control_32","control_33","control_34","control_35","control_36","control_37","control_38","control_39","control_40","control_41","control_42","control_43","control_44","control_45","control_46","control_47","control_48","control_49","control_50","control_51"];//use this for points where you want a roadblock (logic/strategic points, such as crossroads, airport or bases entrances etc..) game will add some more automatically + // seaMarkers = ["seaPatrol","seaPatrol_1","seaPatrol_2","seaPatrol_3","seaPatrol_4","seaPatrol_5","seaPatrol_6","seaPatrol_7","seaPatrol_8","seaPatrol_9","seaPatrol_10","seaPatrol_11","seaPatrol_12","seaPatrol_13","seaPatrol_14","seaPatrol_15","seaPatrol_16","seaPatrol_17","seaPatrol_18","seaPatrol_19","seaPatrol_20","seaPatrol_21"]; + // seaSpawn = ["seaSpawn","seaSpawn_1","seaSpawn_2","seaSpawn_3","seaSpawn_4","seaSpawn_5","seaSpawn_6","seaSpawn_7","seaSpawn_8","seaSpawn_9","seaSpawn_10","seaSpawn_11","seaSpawn_12","seaSpawn_13","seaSpawn_14","seaSpawn_15","seaSpawn_16","seaSpawn_17","seaSpawn_18","seaSpawn_19","seaSpawn_20","seaSpawn_21","seaSpawn_22","seaSpawn_23","seaSpawn_24","seaSpawn_25","seaSpawn_26","seaSpawn_27","seaSpawn_28","seaSpawn_29","seaSpawn_30","seaSpawn_31","seaSpawn_32"]; + // seaAttackSpawn = ["seaAttackSpawn","seaAttackSpawn_1","seaAttackSpawn_2","seaAttackSpawn_3","seaAttackSpawn_4","seaAttackSpawn_5","seaAttackSpawn_6","seaAttackSpawn_7","seaAttackSpawn_8","seaAttackSpawn_9","seaAttackSpawn_10"]; +} else { + if (worldName == "Altis") then { + // aeropuertos = (allMapMarkers select { _x find "airport" == 0 }); + // aeropuertos sort true; + // spawnPoints = (allMapMarkers select { _x find "spawnPoint" == 0 }); + // spawnPoints sort true; + // recursos = (allMapMarkers select { _x find "resource" == 0 }); + // recursos sort true; + // fabricas = (allMapMarkers select { _x find "factory" == 0 }); + // fabricas sort true; + // puestos = (allMapMarkers select { _x find "puesto" == 0 }); + // puestos sort true; + // puertos = (allMapMarkers select { _x find "puerto" == 0 }); + // puertos sort true; + // controles = (allMapMarkers select { _x find "control" == 0 }); + // controles sort true; + // seaMarkers = (allMapMarkers select { _x find "seaPatrol" == 0 }); + // seaMarkers sort true; + // seaSpawn = (allMapMarkers select { _x find "seaSpawn" == 0 }); + // seaSpawn sort true; + // seaAttackSpawn = (allMapMarkers select { _x find "seaAttackSpawn" == 0 }); + // seaAttackSpawn sort true; + // aeropuertos = ["airport","airport_1","airport_2","airport_3","airport_4","airport_5"];//airports + // spawnPoints = ["spawnPoint","spawnPoint_1","spawnPoint_2","spawnPoint_3","spawnPoint_4","spawnPoint_5"]; + // recursos = ["resource","resource_1","resource_2","resource_3","resource_4","resource_5","resource_6","resource_7"];//economic resources + // fabricas = ["factory","factory_1","factory_2","factory_3","factory_4","factory_5","factory_6","factory_7","factory_8","factory_9","factory_10","factory_11"];//factories + // puestos = ["puesto","puesto_1","puesto_2","puesto_3","puesto_4","puesto_5","puesto_6","puesto_7","puesto_8","puesto_9","puesto_10","puesto_11","puesto_12","puesto_13","puesto_14","puesto_15","puesto_16","puesto_17","puesto_18","puesto_19","puesto_20","puesto_21","puesto_22","puesto_23","puesto_24","puesto_25","puesto_26","puesto_27","puesto_28","puesto_29","puesto_30","puesto_31","puesto_32","puesto_33","puesto_34","puesto_35","puesto_36","puesto_37","puesto_38","puesto_39","puesto_40","puesto_41","puesto_42"]; + // puertos = ["puerto","puerto_1","puerto_2","puerto_3","puerto_4"];//seaports, adding a lot will affect economics, 5 is ok + // controles = ["control","control_1","control_2","control_3","control_4","control_5","control_6","control_7","control_8","control_9","control_10","control_11","control_12","control_13","control_14","control_15","control_16","control_17","control_18","control_19","control_20","control_21","control_22","control_23","control_24","control_25","control_26","control_27","control_28","control_29","control_30","control_31","control_32","control_33","control_34","control_35","control_36","control_37","control_38","control_39","control_40","control_41","control_42","control_43","control_44","control_45","control_46","control_47","control_48","control_49","control_50","control_51","control_52","control_53","control_54","control_55","control_56","control_57","control_58"];//use this for points where you want a roadblock (logic/strategic points, such as crossroads, airport or bases entrances etc..) game will add some more automatically + // seaMarkers = ["seaPatrol","seaPatrol_1","seaPatrol_2","seaPatrol_3","seaPatrol_4","seaPatrol_5","seaPatrol_6","seaPatrol_7","seaPatrol_8","seaPatrol_9","seaPatrol_10","seaPatrol_11","seaPatrol_12","seaPatrol_13","seaPatrol_14","seaPatrol_15","seaPatrol_16","seaPatrol_17","seaPatrol_18","seaPatrol_19","seaPatrol_20","seaPatrol_21","seaPatrol_22","seaPatrol_23","seaPatrol_24","seaPatrol_25","seaPatrol_26","seaPatrol_27"]; + // seaSpawn = ["seaSpawn","seaSpawn_1","seaSpawn_2","seaSpawn_3","seaSpawn_4","seaSpawn_5","seaSpawn_6","seaSpawn_7","seaSpawn_8","seaSpawn_9"]; + // seaAttackSpawn = ["seaAttackSpawn","seaAttackSpawn_1","seaAttackSpawn_2","seaAttackSpawn_3","seaAttackSpawn_4","seaAttackSpawn_5","seaAttackSpawn_6"]; { - aeropuertos = ["airport","airport_1","airport_2","airport_3","airport_4","airport_5"];//airports - spawnPoints = ["spawnPoint","spawnPoint_1","spawnPoint_2","spawnPoint_3","spawnPoint_4","spawnPoint_5"]; - recursos = ["resource","resource_1","resource_2","resource_3","resource_4","resource_5","resource_6","resource_7"];//economic resources - fabricas = ["factory","factory_1","factory_2","factory_3","factory_4","factory_5","factory_6","factory_7","factory_8","factory_9","factory_10","factory_11"];//factories - puestos = ["puesto","puesto_1","puesto_2","puesto_3","puesto_4","puesto_5","puesto_6","puesto_7","puesto_8","puesto_9","puesto_10","puesto_11","puesto_12","puesto_13","puesto_14","puesto_15","puesto_16","puesto_17","puesto_18","puesto_19","puesto_20","puesto_21","puesto_22","puesto_23","puesto_24","puesto_25","puesto_26","puesto_27","puesto_28","puesto_29","puesto_30","puesto_31","puesto_32","puesto_33","puesto_34","puesto_35","puesto_36","puesto_37","puesto_38","puesto_39","puesto_40","puesto_41","puesto_42"]; - puertos = ["puerto","puerto_1","puerto_2","puerto_3","puerto_4"];//seaports, adding a lot will affect economics, 5 is ok - controles = ["control","control_1","control_2","control_3","control_4","control_5","control_6","control_7","control_8","control_9","control_10","control_11","control_12","control_13","control_14","control_15","control_16","control_17","control_18","control_19","control_20","control_21","control_22","control_23","control_24","control_25","control_26","control_27","control_28","control_29","control_30","control_31","control_32","control_33","control_34","control_35","control_36","control_37","control_38","control_39","control_40","control_41","control_42","control_43","control_44","control_45","control_46","control_47","control_48","control_49","control_50","control_51","control_52","control_53","control_54","control_55","control_56","control_57","control_58"];//use this for points where you want a roadblock (logic/strategic points, such as crossroads, airport or bases entrances etc..) game will add some more automatically - seaMarkers = ["seaPatrol","seaPatrol_1","seaPatrol_2","seaPatrol_3","seaPatrol_4","seaPatrol_5","seaPatrol_6","seaPatrol_7","seaPatrol_8","seaPatrol_9","seaPatrol_10","seaPatrol_11","seaPatrol_12","seaPatrol_13","seaPatrol_14","seaPatrol_15","seaPatrol_16","seaPatrol_17","seaPatrol_18","seaPatrol_19","seaPatrol_20","seaPatrol_21","seaPatrol_22","seaPatrol_23","seaPatrol_24","seaPatrol_25","seaPatrol_26","seaPatrol_27"]; - seaSpawn = ["seaSpawn","seaSpawn_1","seaSpawn_2","seaSpawn_3","seaSpawn_4","seaSpawn_5","seaSpawn_6","seaSpawn_7","seaSpawn_8","seaSpawn_9"]; - seaAttackSpawn = ["seaAttackSpawn","seaAttackSpawn_1","seaAttackSpawn_2","seaAttackSpawn_3","seaAttackSpawn_4","seaAttackSpawn_5","seaAttackSpawn_6"]; - { - _name = text _x; - if ((_name != "Magos") AND !(_name == "")) then { - _sizeX = getNumber (configFile >> "CfgWorlds" >> worldName >> "Names" >> (text _x) >> "radiusA"); - _sizeY = getNumber (configFile >> "CfgWorlds" >> worldName >> "Names" >> (text _x) >> "radiusB"); - _size = if (_sizeX > _sizeY) then {_sizeX} else {_sizeY}; - _pos = getPos _x; - if (_size < 10) then {_size = 50}; - - _mrk = createmarker [format ["%1", _name], _pos]; - _mrk setMarkerSize [_size, _size]; - _mrk setMarkerShape "ELLIPSE"; - _mrk setMarkerBrush "SOLID"; - _mrk setMarkerColor "ColorRed"; - _mrk setMarkerText _name; - controles pushBack _name; - }; - } foreach (nearestLocations [getArray (configFile >> "CfgWorlds" >> worldName >> "centerPosition"), ["Hill"], worldSize/1.414]); - } - else - { - if (worldName == "chernarus_summer") then - { - aeropuertos = ["airport","airport_1","airport_2"]; - spawnPoints = ["spawnPoint","spawnPoint_1","spawnPoint_2"]; - recursos = ["resource","resource_1","resource_2","resource_3","resource_4","resource_5","resource_6","resource_7","resource_8","resource_9"]; - fabricas = ["factory","factory_1","factory_2","factory_3","factory_4"]; - puestos = ["puesto","puesto_1","puesto_2","puesto_3","puesto_4","puesto_5","puesto_6","puesto_7","puesto_8","puesto_9","puesto_10","puesto_11","puesto_12","puesto_13","puesto_14","puesto_15","puesto_16","puesto_17","puesto_18","puesto_19","puesto_20","puesto_21"]; - puertos = ["puerto","puerto_1","puerto_2","puerto_3","puerto_4"]; - controles = ["control","control_1","control_2","control_3","control_4","control_5","control_6","control_7","control_8","control_9","control_10","control_11","control_12","control_13","control_14","control_15","control_16","control_17","control_18","control_19","control_20","control_21","control_22","control_23","control_24","control_25","control_26","control_27","control_28","control_29","control_30","control_31","control_32","control_33","control_34","control_35","control_36","control_37","control_38","control_39","control_40"]; - seaMarkers = []; - seaSpawn = []; - seaAttackSpawn = []; - { _name = text _x; - if ((_name != "Magos") AND !(_name == "")) then - { + if ((_name != "Magos") AND !(_name == "")) then { _sizeX = getNumber (configFile >> "CfgWorlds" >> worldName >> "Names" >> (text _x) >> "radiusA"); _sizeY = getNumber (configFile >> "CfgWorlds" >> worldName >> "Names" >> (text _x) >> "radiusB"); _size = if (_sizeX > _sizeY) then {_sizeX} else {_sizeY}; @@ -86,20 +88,54 @@ else _mrk setMarkerColor "ColorRed"; _mrk setMarkerText _name; controles pushBack _name; + }; + } foreach (nearestLocations [getArray (configFile >> "CfgWorlds" >> worldName >> "centerPosition"), ["Hill"], worldSize/1.414]); + } else { + if (worldName == "chernarus_summer") then { + // aeropuertos = ["airport","airport_1","airport_2"]; + // spawnPoints = ["spawnPoint","spawnPoint_1","spawnPoint_2"]; + // recursos = ["resource","resource_1","resource_2","resource_3","resource_4","resource_5","resource_6","resource_7","resource_8","resource_9"]; + // fabricas = ["factory","factory_1","factory_2","factory_3","factory_4"]; + // puestos = ["puesto","puesto_1","puesto_2","puesto_3","puesto_4","puesto_5","puesto_6","puesto_7","puesto_8","puesto_9","puesto_10","puesto_11","puesto_12","puesto_13","puesto_14","puesto_15","puesto_16","puesto_17","puesto_18","puesto_19","puesto_20","puesto_21"]; + // puertos = ["puerto","puerto_1","puerto_2","puerto_3","puerto_4"]; + // controles = ["control","control_1","control_2","control_3","control_4","control_5","control_6","control_7","control_8","control_9","control_10","control_11","control_12","control_13","control_14","control_15","control_16","control_17","control_18","control_19","control_20","control_21","control_22","control_23","control_24","control_25","control_26","control_27","control_28","control_29","control_30","control_31","control_32","control_33","control_34","control_35","control_36","control_37","control_38","control_39","control_40"]; + // seaMarkers = []; + // seaSpawn = []; + // seaAttackSpawn = []; + { + _name = text _x; + if ((_name != "Magos") AND !(_name == "")) then { + _sizeX = getNumber (configFile >> "CfgWorlds" >> worldName >> "Names" >> (text _x) >> "radiusA"); + _sizeY = getNumber (configFile >> "CfgWorlds" >> worldName >> "Names" >> (text _x) >> "radiusB"); + _size = if (_sizeX > _sizeY) then {_sizeX} else {_sizeY}; + _pos = getPos _x; + if (_size < 10) then {_size = 50}; + + _mrk = createmarker [format ["%1", _name], _pos]; + _mrk setMarkerSize [_size, _size]; + _mrk setMarkerShape "ELLIPSE"; + _mrk setMarkerBrush "SOLID"; + _mrk setMarkerColor "ColorRed"; + _mrk setMarkerText _name; + controles pushBack _name; }; } foreach (nearestLocations [getArray (configFile >> "CfgWorlds" >> worldName >> "centerPosition"), ["Hill"], worldSize/1.414]); - }; }; }; -{_x setMarkerAlpha 0} forEach (seaMarkers + seaSpawn + seaAttackSpawn + spawnPoints); +}; + +{ _x setMarkerAlpha 0 } forEach (seaMarkers + seaSpawn + seaAttackSpawn + spawnPoints); + defaultControlIndex = (count controles) - 1; puestosFIA = []; destroyedCities = []; garrison setVariable ["Synd_HQ",[],true]; marcadores = aeropuertos + recursos + fabricas + puestos + puertos + controles + ["Synd_HQ"]; -{_x setMarkerAlpha 0; -spawner setVariable [_x,2,true]; +{ + _x setMarkerAlpha 0; + spawner setVariable [_x,2,true]; } forEach marcadores; + private ["_sizeX","_sizeY","_size"]; { //_nombre = text _x; @@ -113,7 +149,7 @@ if ((_nombre != "") and (_nombre != "Lakatoro01") and (_nombre != "Galili01") an if (_size < 400) then {_size = 400}; _roads = []; _numCiv = 0; - if ((worldName != "Tanoa") and (worldName != "Altis") and (worldName != "chernarus_summer")) then//If Tanoa, data is picked from a DB in initVar.sqf, if not, is built on the fly. + if ((worldName != "Tanoa") and (worldName != "Altis") and (worldName != "chernarus_summer")) then //If Tanoa, data is picked from a DB in initVar.sqf, if not, is built on the fly. { _numCiv = (count (nearestObjects [_pos, ["house"], _size])); _roadsProv = _pos nearRoads _size; @@ -138,10 +174,9 @@ if ((_nombre != "") and (_nombre != "Lakatoro01") and (_nombre != "Galili01") an _roadsProv = _pos nearRoads _size; //_roads = []; { - _roadcon = roadsConnectedto _x; - if (count _roadcon == 2) then - { - _roads pushBack (getPosATL _x); + _roadcon = roadsConnectedto _x; + if (count _roadcon == 2) then { + _roads pushBack (getPosATL _x); }; } forEach _roadsProv; carreteras setVariable [_nombre,_roads]; @@ -290,14 +325,7 @@ if (count _posBancos > 0) then blackListDest = (marcadores - controles - ["Synd_HQ"] - ciudades) select {!((position ([getMarkerPos _x] call A3A_fnc_findNearestGoodRoad)) inArea _x)}; publicVariable "blackListDest"; -//the following is the console code snippet I use to pick positions of any kind of building. You may do this for gas stations, banks, radios etc.. markerPos "Base_4" is because it's in the middle of the island, and inside the array you may find the type of building I am searching for. Paste the result in a txt and add it to the corresponding arrays. -/* -pepe = nearestObjects [markerPos "base_4", ["Land_Communication_F","Land_TTowerBig_1_F","Land_TTowerBig_2_F"], 16000]; -pospepe = []; -{pospepe = pospepe + getPos _x} forEach pepe; -copytoclipboard str pospepe; -*/ -if (isMultiplayer) then {[[petros,"hint","Zones Init Completed"],"A3A_fnc_commsMP"] call BIS_fnc_MP}; + publicVariable "marcadores"; publicVariable "ciudades"; publicVariable "aeropuertos"; @@ -317,4 +345,13 @@ publicVariable "mrkAntenas"; publicVariable "bancos"; publicVariable "seaSpawn"; publicVariable "seaAttackSpawn"; -publicVariable "defaultControlIndex"; \ No newline at end of file +publicVariable "defaultControlIndex"; + +//the following is the console code snippet I use to pick positions of any kind of building. You may do this for gas stations, banks, radios etc.. markerPos "Base_4" is because it's in the middle of the island, and inside the array you may find the type of building I am searching for. Paste the result in a txt and add it to the corresponding arrays. +/* +pepe = nearestObjects [markerPos "base_4", ["Land_Communication_F","Land_TTowerBig_1_F","Land_TTowerBig_2_F"], 16000]; +pospepe = []; +{pospepe = pospepe + getPos _x} forEach pepe; +copytoclipboard str pospepe; +*/ +if (isMultiplayer) then {[[petros,"hint","Zones Init Completed"],"A3A_fnc_commsMP"] call BIS_fnc_MP}; diff --git a/A3-Antistasi/isFrontline.sqf b/A3-Antistasi/isFrontline.sqf index 34c7b1fdab..c4d648c726 100644 --- a/A3-Antistasi/isFrontline.sqf +++ b/A3-Antistasi/isFrontline.sqf @@ -9,6 +9,6 @@ _mrkENY = (aeropuertos + puestos + puertos) select {lados getVariable [_x,sideUn if (count _mrkENY > 0) then { _posicion = getMarkerPos _marcador; - {if (_posicion distance (getMarkerPos _x) < distanciaSPWN) exitWith {_isFrontier = true}} forEach _mrkENY; + {if (_posicion distance (getMarkerPos _x) < 2000) exitWith {_isFrontier = true}} forEach _mrkENY; }; _isfrontier \ No newline at end of file diff --git a/A3-Antistasi/markerChange.sqf b/A3-Antistasi/markerChange.sqf index 89f0109f05..be03bc4fef 100644 --- a/A3-Antistasi/markerChange.sqf +++ b/A3-Antistasi/markerChange.sqf @@ -67,7 +67,8 @@ if (_marcador in aeropuertos) then { if (_winner == buenos) then { - [0,10,_posicion] remoteExec ["A3A_fnc_citySupportChange",2]; + [600, 600, "SDK Captured Point"] remoteExec ["A3A_fnc_timingCA", 2]; + //[0,10,_posicion] remoteExec ["A3A_fnc_citySupportChange",2]; if (_looser == malos) then { _prestigeMalos = 20; @@ -85,11 +86,11 @@ if (_marcador in aeropuertos) then [_marcador,60] call A3A_fnc_addTimeForIdle; if (_winner == malos) then { - [10,0,_posicion] remoteExec ["A3A_fnc_citySupportChange",2] + [10,0,_posicion,"Lost Airbase to NATO"] remoteExec ["A3A_fnc_citySupportChange",2] } else { - [-10,-10,_posicion] remoteExec ["A3A_fnc_citySupportChange",2] + [-10,-10,_posicion,"Lost Airbase to CSAT"] remoteExec ["A3A_fnc_citySupportChange",2] }; if (_looser == buenos) then { diff --git a/A3-Antistasi/modBlacklist.sqf b/A3-Antistasi/modBlacklist.sqf index c5b2488dec..476051a744 100644 --- a/A3-Antistasi/modBlacklist.sqf +++ b/A3-Antistasi/modBlacklist.sqf @@ -3,7 +3,7 @@ _mal = false; if (missionNamespace getVariable ["MCC_isMode",false]) then {_mal = true}; if (isClass (configfile >> "CfgVehicles" >> "ALiVE_require")) then {_mal = true}; if ("asr_ai3_main" in activatedAddons) then {_mal = true}; -if ((!isMultiPlayer) and hayACEMedical) then {_mal = true}; +if ((!isMultiPlayer) and hayACEMedical) then {_mal = false}; if (_mal) then { if (isServer) then @@ -17,4 +17,4 @@ if (_mal) then ["modUnautorized",false,1,false,false] call BIS_fnc_endMission; diag_log "Antistasi blacklisted mod detected on client. Ending Mission"; }; - }; \ No newline at end of file + }; diff --git a/A3-Antistasi/moveHQObject.sqf b/A3-Antistasi/moveHQObject.sqf index f53be57637..0ce3a981d8 100644 --- a/A3-Antistasi/moveHQObject.sqf +++ b/A3-Antistasi/moveHQObject.sqf @@ -1,38 +1,60 @@ if (player != theBoss) exitWith {hint "Only Player Commander is allowed to move HQ assets"}; -private ["_cosa","_jugador","_id","_sitios","_marcador","_size","_posicion"]; +private ["_object","_player","_id","_sitios","_marcador","_size","_posicion"]; -_cosa = _this select 0; -_jugador = _this select 1; +_object = _this select 0; +_player = _this select 1; _id = _this select 2; -if (!(isNull attachedTo _cosa)) exitWith {hint "The asset you want to move is being moved by another player"}; -if (vehicle _jugador != _jugador) exitWith {hint "You cannot move HQ assets while in a vehicle"}; +if (!(isNull attachedTo _object)) exitWith {hint "The asset you want to move is being moved by another player"}; +if (vehicle _player != _player) exitWith {hint "You cannot move HQ assets while in a vehicle"}; -if ({!(isNull _x)} count (attachedObjects _jugador) != 0) exitWith {hint "You have other things attached, you cannot move this"}; +if ({!(isNull _x)} count (attachedObjects _player) != 0) exitWith {hint "You have other things attached, you cannot move this"}; _sitios = marcadores select {lados getVariable [_x,sideUnknown] == buenos}; -_marcador = [_sitios,_jugador] call BIS_fnc_nearestPosition; +_marcador = [_sitios,_player] call BIS_fnc_nearestPosition; _size = [_marcador] call A3A_fnc_sizeMarker; _posicion = getMarkerPos _marcador; -if (_jugador distance2D _posicion > _size) exitWith {hint "This asset needs to be closer to it relative zone center to be able to be moved"}; - -_cosa removeAction _id; -_cosa attachTo [_jugador,[0,2,1]]; -accion = _jugador addAction ["Drop Here", {{detach _x} forEach attachedObjects player; player removeAction accion},nil,0,false,true,"",""]; - -waitUntil {sleep 1; (count attachedObjects _jugador == 0) or (vehicle _jugador != _jugador) or (_jugador distance2D _posicion > (_size-3)) or !([_jugador] call A3A_fnc_canFight) or (!isPlayer _jugador)}; - -{detach _x} forEach attachedObjects _jugador; -player removeAction accion; -/* -for "_i" from 0 to (_jugador addAction ["",""]) do +if (_player distance2D _posicion > _size) exitWith {hint "This asset needs to be closer to it relative zone center to be able to be moved"}; + +private _world_pos = _object modelToWorld [0,0,0.1]; +_object removeAction _id; +private _relative_pos = _player worldToModel _world_pos; +private _starting_h = getCameraViewDirection _player select 2; +_object enableSimulationGlobal false; +_object attachTo [_player, _player worldToModel _world_pos];//[0,2,1]]; + +["SetHQObjectHeight", "onEachFrame", { + params ["_obj", "_mover", "_relative_pos", "_starting_h"]; + private _relative_h = (getCameraViewDirection _mover select 2) - _starting_h; + detach _obj; + _obj attachTo [_mover, _relative_pos vectorAdd [0, 0, _relative_h * vectorMagnitude _relative_pos]]; +}, [_object, _player, _relative_pos, _starting_h]] call BIS_fnc_addStackedEventHandler; + +accion = _player addAction ["Drop Here", { + ["SetHQObjectHeight", "onEachFrame"] call BIS_fnc_removeStackedEventHandler; { - _jugador removeAction _i; - }; -*/ -_cosa addAction ["Move this asset", "moveHQObject.sqf",nil,0,false,true,"","(_this == theBoss)"]; + detach _x; + _x enableSimulationGlobal true; + } forEach attachedObjects player; + player removeAction (_this select 2); +},nil,0,false,true,"",""]; + +waitUntil {sleep 1; + (count attachedObjects _player == 0) or + (vehicle _player != _player) or + (_player distance2D _posicion > (_size-3)) or + !([_player] call A3A_fnc_canFight) or + (!isPlayer _player)}; + +{ + detach _x; + _x enableSimulationGlobal true; +} forEach attachedObjects _player; +{detach _x} forEach attachedObjects _player; +player removeAction accion; +["SetHQObjectHeight", "onEachFrame"] call BIS_fnc_removeStackedEventHandler; -_cosa setPosATL [getPosATL _cosa select 0,getPosATL _cosa select 1,0]; +_object addAction ["Move this asset", "moveHQObject.sqf",nil,0,false,true,"","(_this == theBoss)"]; -if (vehicle _jugador != _jugador) exitWith {hint "You cannot move HQ assets while in a vehicle"}; +if (vehicle _player != _player) exitWith {hint "You cannot move HQ assets while in a vehicle"}; -if (_jugador distance2D _posicion > _size) exitWith {hint "This asset cannot be moved more far away for its zone center"}; \ No newline at end of file +if (_player distance2D _posicion > _size) exitWith {hint "This asset cannot be moved more far away for its zone center"}; \ No newline at end of file diff --git a/A3-Antistasi/onPlayerRespawn.sqf b/A3-Antistasi/onPlayerRespawn.sqf index c830e52ed6..a6ab1f18ff 100644 --- a/A3-Antistasi/onPlayerRespawn.sqf +++ b/A3-Antistasi/onPlayerRespawn.sqf @@ -19,7 +19,7 @@ if (side group player == buenos) then if (_owner != _viejo) exitWith {hint "Died while remote controlling AI"; selectPlayer _owner; disableUserInput false; deleteVehicle _nuevo}; - _nul = [0,-1,getPos _viejo] remoteExec ["A3A_fnc_citySupportChange",2]; + _nul = [0,-1,getPos _viejo,"Player Respawned"] remoteExec ["A3A_fnc_citySupportChange",2]; _score = _viejo getVariable ["score",0]; _punish = _viejo getVariable ["punish",0]; @@ -244,3 +244,8 @@ else if (hayRHS) then {[player] call A3A_fnc_RHSdress}; if (hayACE) then {[] call A3A_fnc_ACEpvpReDress}; }; + +player setUnitTrait ["Medic", true]; +player setUnitTrait ["Engineer", true]; +player enableStamina false; +player setCustomAimCoef 0.35; diff --git a/A3-Antistasi/rebuildAssets.sqf b/A3-Antistasi/rebuildAssets.sqf index 0cd598cfe5..adb91211cb 100644 --- a/A3-Antistasi/rebuildAssets.sqf +++ b/A3-Antistasi/rebuildAssets.sqf @@ -56,7 +56,7 @@ if (count _antenaMuerta == 0) then hint format ["%1 Rebuilt"]; - [0,10,_posicionTel] remoteExec ["A3A_fnc_citySupportChange",2]; + //[0,10,_posicionTel] remoteExec ["A3A_fnc_citySupportChange",2]; [5,0] remoteExec ["A3A_fnc_prestige",2]; destroyedCities = destroyedCities - [_sitio]; publicVariable "destroyedCities"; diff --git a/A3-Antistasi/resetCities.sqf b/A3-Antistasi/resetCities.sqf new file mode 100644 index 0000000000..ed8c39d10f --- /dev/null +++ b/A3-Antistasi/resetCities.sqf @@ -0,0 +1,12 @@ +if (!isServer) exitWith{}; + +{ + private _ciudad = _x; + // ["TaskFailed", ["", format ["%1 joined %2",[_ciudad, false] call A3A_fnc_fn_location, nameMalos]]] remoteExec ["BIS_fnc_showNotification",buenos]; + lados setVariable [_ciudad,malos,true]; + _mrkD = format ["Dum%1",_ciudad]; + _mrkD setMarkerColor colorMalos; + garrison setVariable [_ciudad,[],true]; +} forEach ciudades; + +nextTick = time + 15; diff --git a/A3-Antistasi/resourcecheck.sqf b/A3-Antistasi/resourcecheck.sqf index d5ca8afe76..3ce7baaf6b 100644 --- a/A3-Antistasi/resourcecheck.sqf +++ b/A3-Antistasi/resourcecheck.sqf @@ -4,228 +4,276 @@ if (isMultiplayer) then {waitUntil {!isNil "switchCom"}}; private ["_texto"]; scriptName "resourcecheck"; -_cuentaSave = 3600; - -while {true} do - { - //sleep 600;//600 - nextTick = time + 600; - waitUntil {sleep 15; time >= nextTick}; - if (isMultiplayer) then {waitUntil {sleep 10; isPlayer theBoss}}; - _suppBoost = 1+ ({lados getVariable [_x,sideUnknown] == buenos} count puertos); - _recAddSDK = 25;//0 - _hrAddBLUFOR = 0;//0 - _popFIA = 0; - _popAAF = 0; - _popCSAT = 0; - _popTotal = 0; - _bonusFIA = 1 + (0.25*({(lados getVariable [_x,sideUnknown] == buenos) and !(_x in destroyedCities)} count fabricas)); - { - _ciudad = _x; - _recAddCiudadSDK = 0; - _hrAddCiudad = 0; - _datos = server getVariable _ciudad; - _numCiv = _datos select 0; - _numVeh = _datos select 1; - //_roads = _datos select 2; - _prestigeNATO = _datos select 2; - _prestigeSDK = _datos select 3; - _power = [_ciudad] call A3A_fnc_powerCheck; - _popTotal = _popTotal + _numCiv; - _popFIA = _popFIA + (_numCiv * (_prestigeSDK / 100)); - _popAAF = _popAAF + (_numCiv * (_prestigeNATO / 100)); - _multiplicandorec = if (_power != buenos) then {0.5} else {1}; - //if (not _power) then {_multiplicandorec = 0.5}; - - if (_ciudad in destroyedCities) then - { - _recAddCiudadSDK = 0; - _hrAddCiudad = 0; - _popCSAT = _popCSAT + _numCIV; - } - else - { - _recAddCiudadSDK = ((_numciv * _multiplicandorec*(_prestigeSDK / 100))/3); - _hrAddCiudad = (_numciv * (_prestigeSDK / 10000));///20000 originalmente - switch (_power) do - { - case buenos: {[-1,_suppBoost,_ciudad] spawn A3A_fnc_citySupportChange}; - case malos: {[1,-1,_ciudad] spawn A3A_fnc_citySupportChange}; - case muyMalos: {[-1,-1,_ciudad] spawn A3A_fnc_citySupportChange}; - }; - if (lados getVariable [_ciudad,sideUnknown] == malos) then - { - _recAddCiudadSDK = (_recAddCiudadSDK/2); - _hrAddCiudad = (_hrAddCiudad/2); - }; - }; - _recAddSDK = _recAddSDK + _recAddCiudadSDK; - _hrAddBLUFOR = _hrAddBLUFOR + _hrAddCiudad; - // revuelta civil!! - if ((_prestigeNATO < _prestigeSDK) and (lados getVariable [_ciudad,sideUnknown] == malos)) then - { - ["TaskSucceeded", ["", format ["%1 joined %2",[_ciudad, false] call A3A_fnc_fn_location,nameBuenos]]] remoteExec ["BIS_fnc_showNotification",buenos]; - lados setVariable [_ciudad,buenos,true]; - _nul = [5,0] remoteExec ["A3A_fnc_prestige",2]; - _mrkD = format ["Dum%1",_ciudad]; - _mrkD setMarkerColor colorBuenos; - garrison setVariable [_ciudad,[],true]; - sleep 5; - {_nul = [_ciudad,_x] spawn A3A_fnc_deleteControles} forEach controles; - if ((!(["CONVOY"] call BIS_fnc_taskExists)) and (!bigAttackInProgress)) then - { - _base = [_ciudad] call A3A_fnc_findBasesForConvoy; - if (_base != "") then - { - [[_ciudad,_base],"CONVOY"] call A3A_fnc_scheduler; - }; - }; - [] call A3A_fnc_tierCheck; - }; - if ((_prestigeNATO > _prestigeSDK) and (lados getVariable [_ciudad,sideUnknown] == buenos)) then - { - ["TaskFailed", ["", format ["%1 joined %2",[_ciudad, false] call A3A_fnc_fn_location,nameMalos]]] remoteExec ["BIS_fnc_showNotification",buenos]; - lados setVariable [_ciudad,malos,true]; - _nul = [-5,0] remoteExec ["A3A_fnc_prestige",2]; - _mrkD = format ["Dum%1",_ciudad]; - _mrkD setMarkerColor colorMalos; - garrison setVariable [_ciudad,[],true]; - sleep 5; - [] call A3A_fnc_tierCheck; - }; - } forEach ciudades; - if (_popCSAT > (_popTotal / 3)) then {["destroyedCities",false,true] remoteExec ["BIS_fnc_endMission"]}; - if ((_popFIA > _popAAF) and ({lados getVariable [_x,sideUnknown] == buenos} count aeropuertos == count aeropuertos)) then {["end1",true,true,true,true] remoteExec ["BIS_fnc_endMission",0]}; - /* - { - _fabrica = _x; - if (lados getVariable [_fabrica,sideUnknown] == buenos) then - { - if (not(_fabrica in destroyedCities)) then {_bonusFIA = _bonusFIA + 0.25}; - }; - } forEach fabricas; - */ - { - _recurso = _x; - if (lados getVariable [_recurso,sideUnknown] == buenos) then - { - if (not(_recurso in destroyedCities)) then {_recAddSDK = _recAddSDK + (300 * _bonusFIA)}; - }; - } forEach recursos; - _hrAddBLUFOR = (round _hrAddBLUFOR); - _recAddSDK = (round _recAddSDK); - - _texto = format ["Taxes Income.

Manpower: +%1
Money: +%2 €",_hrAddBLUFOR,_recAddSDK]; - [] call A3A_fnc_FIAradio; - //_updated = false; - _updated = [] call A3A_fnc_arsenalManage; - if (_updated != "") then {_texto = format ["%1
Arsenal Updated

%2",_texto,_updated]}; - [petros,"taxRep",_texto] remoteExec ["A3A_fnc_commsMP",[buenos,civilian]]; - _hrAddBLUFOR = _hrAddBLUFOR + (server getVariable "hr"); - _recAddSDK = _recAddSDK + (server getVariable "resourcesFIA"); - server setVariable ["hr",_hrAddBLUFOR,true]; - server setVariable ["resourcesFIA",_recAddSDK,true]; - bombRuns = bombRuns + (({lados getVariable [_x,sideUnknown] == buenos} count aeropuertos) * 0.25); - [petros,"taxRep",_texto] remoteExec ["A3A_fnc_commsMP",[buenos,civilian]]; - [] call A3A_fnc_economicsAI; - if (isMultiplayer) then - { - [] spawn A3A_fnc_assigntheBoss; - difficultyCoef = floor ((({side group _x == buenos} count playableUnits) - ({side group _x != buenos} count playableUnits)) / 5); - publicVariable "difficultyCoef"; - }; - if ((!bigAttackInProgress) and (random 100 < 50)) then {[] call A3A_fnc_missionRequestAUTO}; - [[],"A3A_fnc_reinforcementsAI"] call A3A_fnc_scheduler; - { - _veh = _x; - if ((_veh isKindOf "StaticWeapon") and ({isPlayer _x} count crew _veh == 0) and (alive _veh)) then - { - _veh setDamage 0; - [_veh,1] remoteExec ["setVehicleAmmoDef",_veh]; - }; - } forEach vehicles; - cuentaCA = cuentaCA - 600; - if (cuentaCA < 0) then {cuentaCA = 0}; - publicVariable "cuentaCA"; - if ((cuentaCA == 0)/* and (diag_fps > minimoFPS)*/) then - { - [1200] remoteExec ["A3A_fnc_timingCA",2]; - if (!bigAttackInProgress) then - { - _script = [] spawn A3A_fnc_ataqueAAF; - waitUntil {sleep 5; scriptDone _script}; - }; - }; - sleep 3; - if ((count antenasMuertas > 0) and (not(["REP"] call BIS_fnc_taskExists))) then - { - _posibles = []; - { - _marcador = [marcadores, _x] call BIS_fnc_nearestPosition; - if ((lados getVariable [_marcador,sideUnknown] == malos) and (spawner getVariable _marcador == 2)) exitWith - { - _posibles pushBack [_marcador,_x]; - }; - } forEach antenasMuertas; - if (count _posibles > 0) then - { - _posible = selectRandom _posibles; - [[_posible select 0,_posible select 1],"REP_Antena"] call A3A_fnc_scheduler; - }; - } - else - { - _cambiado = false; - { - _chance = 5; - if ((_x in recursos) and (lados getVariable [_x,sideUnknown] == muyMalos)) then {_chace = 20}; - if (random 100 < _chance) then - { - _cambiado = true; - destroyedCities = destroyedCities - [_x]; - _nombre = [_x] call A3A_fnc_localizar; - ["TaskSucceeded", ["", format ["%1 Rebuilt",_nombre]]] remoteExec ["BIS_fnc_showNotification",[buenos,civilian]]; - sleep 2; - }; - } forEach (destroyedCities - ciudades) select {lados getVariable [_x,sideUnknown] != buenos}; - if (_cambiado) then {publicVariable "destroyedCities"}; - }; - if (isDedicated) then - { - { - if (side _x == civilian) then - { - _var = _x getVariable "statusAct"; - if (isNil "_var") then - { - if (local _x) then - { - if ((typeOf _x) in arrayCivs) then - { - if (vehicle _x == _x) then - { - if (primaryWeapon _x == "") then - { - _grupo = group _x; - deleteVehicle _x; - if ({alive _x} count units _grupo == 0) then {deleteGroup _grupo}; - }; - }; - }; - }; - }; - }; - } forEach allUnits; - if (autoSave) then - { - _cuentaSave = _cuentaSave - 600; - if (_cuentaSave <= 0) then - { - _cuentaSave = 3600; - _nul = [] execVM "statSave\saveLoop.sqf"; - }; - }; - }; - - sleep 4; - }; \ No newline at end of file +private _cuentaSave = 3600; + +private _powerScaling = 1; + +while {true} do { + + //sleep 600;//600 + nextTick = time + 600; publicVariable "nextTick"; + waitUntil {sleep 3; time >= nextTick}; + if (isMultiplayer) then {waitUntil {sleep 10; isPlayer theBoss}}; + //_suppBoost = 1 + ({lados getVariable [_x,sideUnknown] == buenos} count puertos); + private _recAddSDK = 25;//0 + private _hrAddBLUFOR = 0;//0 + private _popFIA = 0; + private _popAAF = 0; + private _popCSAT = 0; + private _popTotal = 0; + private _bonusFIA = 1 + (0.25*({(lados getVariable [_x,sideUnknown] == buenos) and !(_x in destroyedCities)} count fabricas)); + { + private _ciudad = _x; + private _recAddCiudadSDK = 0; + private _hrAddCiudad = 0; + private _datos = server getVariable _ciudad; + private _numCiv = _datos select 0; + private _numVeh = _datos select 1; + //_roads = _datos select 2; + private _prestigeNATO = _datos select 2; + private _prestigeSDK = _datos select 3; + private _power = [_ciudad] call A3A_fnc_powerCheck; + _popTotal = _popTotal + _numCiv; + private _numCivSDK = _numCiv * (_prestigeSDK / 100); + private _numCivNATO = _numCiv * (_prestigeNATO / 100); + _popFIA = _popFIA + _numCivSDK; + _popAAF = _popAAF + _numCivNATO; + private _multiplicandorec = if (_power != buenos) then {0.5} else {1}; + //if (not _power) then {_multiplicandorec = 0.5}; + + if (_ciudad in destroyedCities) then { + _recAddCiudadSDK = 0; + _hrAddCiudad = 0; + _popCSAT = _popCSAT + _numCIV; + } else { + _recAddCiudadSDK = ((_numciv * _multiplicandorec*(_prestigeSDK / 100))/3); + _hrAddCiudad = (_numciv * (_prestigeSDK / 10000));///20000 originalmente + switch (_power) do { + case buenos: { + // Spread support based on proximity + private _spread_effect = 0; + { + private _ciudad2 = _x; + private _distKm = ((getMarkerPos _ciudad2) distance (getMarkerPos _ciudad)) / 1000; + private _range_effect = 1/(1 + 3 * _distKm); + // This effect terminates at about 3km + if (_range_effect > 0.1) then { + private _datos2 = server getVariable _ciudad2; + private _numCiv2 = _datos select 0; + private _numVeh2 = _datos select 1; + private _prestigeNATO2 = _datos select 2; + private _prestigeSDK2 = _datos select 3; + private _numCivSDK2 = _numCiv2 * (_prestigeSDK2 / 100); + private _numCivNATO2 = _numCiv2 * (_prestigeNATO2 / 100); + if(_numCivNATO2 > 0) then { + _spread_effect = _spread_effect + _range_effect * (_numCivNATO2 / (_numCivNATO2 + _numCivSDK)); + }; + }; + } forEach ciudades - [_ciudad]; + [0, -_spread_effect, _ciudad, "City Proximity Spread"] spawn A3A_fnc_citySupportChange; + + };//{[-_powerScaling,0,_ciudad] spawn A3A_fnc_citySupportChange}; + // TODO: Make this based on the antenna distance, just call citySupportChange with antenna positions instead... + case malos: {[_powerScaling, -_powerScaling, _ciudad, "NATO Antenna Influence"] spawn A3A_fnc_citySupportChange}; + case muyMalos: {[-_powerScaling, -_powerScaling, _ciudad, "CSAT Antenna Influence"] spawn A3A_fnc_citySupportChange}; + }; + if (lados getVariable [_ciudad,sideUnknown] == malos) then { + _recAddCiudadSDK = (_recAddCiudadSDK/2); + _hrAddCiudad = (_hrAddCiudad/2); + }; + }; + _recAddSDK = _recAddSDK + _recAddCiudadSDK; + _hrAddBLUFOR = _hrAddBLUFOR + _hrAddCiudad; + + // revuelta civil!! + // Need to exceed NATO support by 20, and have greater support than 50 to flip the city. + if ((_prestigeNATO < (_prestigeSDK - 20)) and (_prestigeSDK > 50) and (lados getVariable [_ciudad,sideUnknown] == malos)) then { + ["TaskSucceeded", ["", format ["%1 joined %2",[_ciudad, false] call A3A_fnc_fn_location,nameBuenos]]] remoteExec ["BIS_fnc_showNotification",buenos]; + lados setVariable [_ciudad,buenos,true]; + _nul = [5,0] remoteExec ["A3A_fnc_prestige",2]; + _mrkD = format ["Dum%1",_ciudad]; + _mrkD setMarkerColor colorBuenos; + garrison setVariable [_ciudad,[],true]; + sleep 5; + {_nul = [_ciudad,_x] spawn A3A_fnc_deleteControles} forEach controles; + if ((!(["CONVOY"] call BIS_fnc_taskExists)) and (!bigAttackInProgress)) then { + _base = [_ciudad] call A3A_fnc_findBasesForConvoy; + if (_base != "") then { + [[_ciudad,_base],"CONVOY"] call A3A_fnc_scheduler; + }; + }; + [] call A3A_fnc_tierCheck; + }; + if (((_prestigeNATO > _prestigeSDK) or (_prestigeSDK < 50)) and (lados getVariable [_ciudad,sideUnknown] == buenos)) then { + ["TaskFailed", ["", format ["%1 joined %2",[_ciudad, false] call A3A_fnc_fn_location,nameMalos]]] remoteExec ["BIS_fnc_showNotification",buenos]; + lados setVariable [_ciudad,malos,true]; + _nul = [-5,0] remoteExec ["A3A_fnc_prestige",2]; + _mrkD = format ["Dum%1",_ciudad]; + _mrkD setMarkerColor colorMalos; + garrison setVariable [_ciudad,[],true]; + sleep 5; + [] call A3A_fnc_tierCheck; + }; + } forEach ciudades; + + if (_popCSAT > (_popTotal / 3)) then { + ["destroyedCities",false,true] remoteExec ["BIS_fnc_endMission"]; + } else { + if (_popCSAT > (_popTotal / 4)) then { + ["TaskFailed", ["", format ["%1 are close to winning this war!", nameMuyMalos]]] remoteExec ["BIS_fnc_showNotification", buenos]; + }; + }; + + if ((_popFIA > _popAAF) and ({lados getVariable [_x,sideUnknown] == buenos} count aeropuertos == count aeropuertos)) then { + ["end1",true,true,true,true] remoteExec ["BIS_fnc_endMission",0]; + }; + /* + { + _fabrica = _x; + if (lados getVariable [_fabrica,sideUnknown] == buenos) then + { + if (not(_fabrica in destroyedCities)) then {_bonusFIA = _bonusFIA + 0.25}; + }; + } forEach fabricas; + */ + { + _recurso = _x; + if (lados getVariable [_recurso, sideUnknown] == buenos and not(_recurso in destroyedCities)) then { + _recAddSDK = _recAddSDK + (300 * _bonusFIA); + }; + } forEach recursos; + + // Apply HR growth scaling, faster below 5, slower above it. + _hrAddBLUFOR = sqrt (5 * _hrAddBLUFOR); + _hrAddBLUFOR = _hrAddBLUFOR; + + // Cap total HR at support * 0.1 + private _hr = server getVariable "hr"; + private _hrCap = ceil(_popFIA * 0.1); + _hrAddBLUFOR = 0 max (_hrAddBLUFOR min (_hrCap - _hr)); + private _new_hr = _hr + _hrAddBLUFOR; + server setVariable ["hr",_new_hr,true]; + server setVariable ["hrCap",_hrCap,true]; + + // Apply resource increase + _recAddSDK = ceil _recAddSDK; + private _rec = server getVariable "resourcesFIA"; + _rec = _rec + _recAddSDK; + server setVariable ["resourcesFIA",_rec,true]; + + private _hrString = if (_new_hr >= _hrCap) then { "Full" } else { floor(_new_hr - _hr) }; + _texto = format ["Taxes Income.

Manpower: +%1
Money: +%2 €",_hrString,_recAddSDK]; + + [] call A3A_fnc_FIAradio; + //_updated = false; + _updated = [] call A3A_fnc_arsenalManage; + if (_updated != "") then {_texto = format ["%1
Arsenal Updated

%2",_texto,_updated]}; + [petros,"taxRep",_texto] remoteExec ["A3A_fnc_commsMP",[buenos,civilian]]; + + bombRuns = bombRuns + (({lados getVariable [_x,sideUnknown] == buenos} count aeropuertos) * 0.25); + [petros,"taxRep",_texto] remoteExec ["A3A_fnc_commsMP",[buenos,civilian]]; + [] call A3A_fnc_economicsAI; + if (isMultiplayer) then { + [] spawn A3A_fnc_assigntheBoss; + difficultyCoef = floor ((({side group _x == buenos} count playableUnits) - ({side group _x != buenos} count playableUnits)) / 5); + publicVariable "difficultyCoef"; + }; + + // TODO: improve auto mission creation + if ((!bigAttackInProgress) and (random 100 < 25)) then {[] call A3A_fnc_missionRequestAUTO}; + + [[],"A3A_fnc_reinforcementsAI"] call A3A_fnc_scheduler; + { + _veh = _x; + if ((_veh isKindOf "StaticWeapon") and ({isPlayer _x} count crew _veh == 0) and (alive _veh)) then { + _veh setDamage 0; + [_veh,1] remoteExec ["setVehicleAmmoDef",_veh]; + }; + } forEach vehicles; + + cuentaCA = 0 max (cuentaCA - 600); publicVariable "cuentaCA"; + timeSinceLastAttack = timeSinceLastAttack + 600; publicVariable "timeSinceLastAttack"; + + if (cuentaCA == 0 /* and (diag_fps > minimoFPS)*/) then { + diag_log format ["[resourceCheck] Spawning big attack"]; + timeSinceLastAttack = 0; publicVariable "timeSinceLastAttack"; + [1200, 600, "Spawning big attack"] remoteExec ["A3A_fnc_timingCA", 2]; + if (!bigAttackInProgress) then { + _script = [] spawn A3A_fnc_ataqueAAF; + waitUntil {sleep 5; scriptDone _script}; + }; + cuentaCANonBuenos = cuentaCANonBuenos + 1200 + random(1200); publicVariable "cuentaCANonBuenos"; + }; + cuentaCANonBuenos = 0 max (cuentaCANonBuenos - 600); publicVariable "cuentaCANonBuenos"; + + if (cuentaCANonBuenos == 0) then { + diag_log format ["[resourceCheck] Spawning big NATO vs CSAT attack"]; + if (!bigAttackInProgress) then { + _script = [true] spawn A3A_fnc_ataqueAAF; + waitUntil {sleep 5; scriptDone _script}; + }; + cuentaCANonBuenos = cuentaCANonBuenos + 1800 + random(1800); publicVariable "cuentaCANonBuenos"; + }; + + diag_log format ["[resourceCheck] cuentaCA: %1, timeSinceLastAttack: %2, cuentaCANonBuenos: %3", cuentaCA, timeSinceLastAttack, cuentaCANonBuenos]; + + sleep 3; + if ((count antenasMuertas > 0) and (not(["REP"] call BIS_fnc_taskExists))) then { + _posibles = []; + { + _marcador = [marcadores, _x] call BIS_fnc_nearestPosition; + if ((lados getVariable [_marcador,sideUnknown] == malos) and (spawner getVariable _marcador == 2)) exitWith { + _posibles pushBack [_marcador,_x]; + }; + } forEach antenasMuertas; + if (count _posibles > 0) then { + _posible = selectRandom _posibles; + [[_posible select 0,_posible select 1],"REP_Antena"] call A3A_fnc_scheduler; + }; + } else { + _cambiado = false; + { + _chance = 5; + if ((_x in recursos) and (lados getVariable [_x,sideUnknown] == muyMalos)) then {_chance = 20}; + if (random 100 < _chance) then { + _cambiado = true; + destroyedCities = destroyedCities - [_x]; + _nombre = [_x] call A3A_fnc_localizar; + ["TaskSucceeded", ["", format ["%1 Rebuilt",_nombre]]] remoteExec ["BIS_fnc_showNotification",[buenos,civilian]]; + sleep 2; + }; + } forEach (destroyedCities - ciudades) select {lados getVariable [_x,sideUnknown] != buenos}; + + if (_cambiado) then {publicVariable "destroyedCities"}; + }; + if (isDedicated) then { + { + if (side _x == civilian) then { + _var = _x getVariable "statusAct"; + if (isNil "_var") then { + if (local _x) then { + if ((typeOf _x) in arrayCivs) then { + if (vehicle _x == _x) then { + if (primaryWeapon _x == "") then { + _grupo = group _x; + deleteVehicle _x; + if ({alive _x} count units _grupo == 0) then {deleteGroup _grupo}; + }; + }; + }; + }; + }; + }; + } forEach allUnits; + + if (autoSave) then { + // TODO: make autosave time flexible + _cuentaSave = _cuentaSave - 600; + if (_cuentaSave <= 0) then { + _cuentaSave = 3600; + _nul = [] execVM "statSave\saveLoop.sqf"; + }; + }; + }; + sleep 4; +}; \ No newline at end of file diff --git a/A3-Antistasi/sounds/VehicleTuning/valve1.ogg b/A3-Antistasi/sounds/VehicleTuning/valve1.ogg new file mode 100644 index 0000000000..85671963f0 Binary files /dev/null and b/A3-Antistasi/sounds/VehicleTuning/valve1.ogg differ diff --git a/A3-Antistasi/sounds/VehicleTuning/valve2.ogg b/A3-Antistasi/sounds/VehicleTuning/valve2.ogg new file mode 100644 index 0000000000..d81c5e30fe Binary files /dev/null and b/A3-Antistasi/sounds/VehicleTuning/valve2.ogg differ diff --git a/A3-Antistasi/sounds/VehicleTuning/valve3.ogg b/A3-Antistasi/sounds/VehicleTuning/valve3.ogg new file mode 100644 index 0000000000..19dfa1b9b2 Binary files /dev/null and b/A3-Antistasi/sounds/VehicleTuning/valve3.ogg differ diff --git a/A3-Antistasi/sounds/VehicleTuning/valve4.ogg b/A3-Antistasi/sounds/VehicleTuning/valve4.ogg new file mode 100644 index 0000000000..7f59b770bf Binary files /dev/null and b/A3-Antistasi/sounds/VehicleTuning/valve4.ogg differ diff --git a/A3-Antistasi/statSave/loadAccount.sqf b/A3-Antistasi/statSave/loadAccount.sqf index 610c05148e..28a39ee502 100644 --- a/A3-Antistasi/statSave/loadAccount.sqf +++ b/A3-Antistasi/statSave/loadAccount.sqf @@ -41,6 +41,8 @@ if (isServer and !_byPassServer) then ["destroyedCities"] call fn_LoadStat; ["minas"] call fn_LoadStat; ["cuentaCA"] call fn_LoadStat; + ["timeSinceLastAttack"] call fn_LoadStat; + ["cuentaCANonBuenos"] call fn_LoadStat; ["antenas"] call fn_LoadStat; ["prestigeNATO"] call fn_LoadStat; ["prestigeCSAT"] call fn_LoadStat; @@ -57,7 +59,7 @@ if (isServer and !_byPassServer) then ["maxUnits"] call fn_LoadStat; ["miembros"] call fn_LoadStat; ["vehInGarage"] call fn_LoadStat; - ["destroyedBuildings"] call fn_LoadStat; + //["destroyedBuildings"] call fn_LoadStat; ["idlebases"] call fn_LoadStat; ["idleassets"] call fn_LoadStat; ["killZones"] call fn_LoadStat; @@ -164,7 +166,7 @@ if (isServer and !_byPassServer) then {if (_x in destroyedCities) then {[_x] call A3A_fnc_destroyCity}} forEach ciudades; ["chopForest"] call fn_LoadStat; - ["destroyedBuildings"] call fn_LoadStat; + //["destroyedBuildings"] call fn_LoadStat; /* { _buildings = nearestObjects [_x, listMilBld, 25, true]; diff --git a/A3-Antistasi/statSave/saveFuncs.sqf b/A3-Antistasi/statSave/saveFuncs.sqf index 11701642ae..b0ed0783ec 100644 --- a/A3-Antistasi/statSave/saveFuncs.sqf +++ b/A3-Antistasi/statSave/saveFuncs.sqf @@ -44,7 +44,7 @@ fn_LoadStat = "prestigeNATO","prestigeCSAT", "hr","planesAAFcurrent","helisAAFcurrent","APCAAFcurrent","tanksAAFcurrent","armas","items","mochis","municion","fecha", "WitemsPlayer","prestigeOPFOR","prestigeBLUFOR","resourcesAAF","resourcesFIA","skillFIA"]; */ specialVarLoads = -["puestosFIA","minas","estaticas","cuentaCA","antenas","mrkNATO","mrkSDK","prestigeNATO","prestigeCSAT","posHQ", "hr","armas","items","mochis","municion","fecha", "prestigeOPFOR","prestigeBLUFOR","resourcesFIA","skillFIA","distanciaSPWN","civPerc","maxUnits","destroyedCities","garrison","tasks","scorePlayer","rankPlayer","smallCAmrk","dinero","miembros","vehInGarage","destroyedBuildings","personalGarage","idlebases","idleassets","chopForest","weather","killZones","jna_dataList","controlesSDK","loadoutPlayer","mrkCSAT","nextTick","bombRuns","dificultad","gameMode"]; +["puestosFIA","minas","estaticas","cuentaCA","timeSinceLastAttack","cuentaCANonBuenos","antenas","mrkNATO","mrkSDK","prestigeNATO","prestigeCSAT","posHQ", "hr","armas","items","mochis","municion","fecha", "prestigeOPFOR","prestigeBLUFOR","resourcesFIA","skillFIA","distanciaSPWN","civPerc","maxUnits","destroyedCities","garrison","tasks","scorePlayer","rankPlayer","smallCAmrk","dinero","miembros","vehInGarage","destroyedBuildings","personalGarage","idlebases","idleassets","chopForest","weather","killZones","jna_dataList","controlesSDK","loadoutPlayer","mrkCSAT","nextTick","bombRuns","dificultad","gameMode"]; //THIS FUNCTIONS HANDLES HOW STATS ARE LOADED fn_SetStat = { @@ -54,13 +54,15 @@ fn_SetStat = if(_varName in specialVarLoads) then { if(_varName == 'cuentaCA') then {cuentaCA = _varValue; publicVariable "cuentaCA"}; + if(_varName == 'timeSinceLastAttack') then {timeSinceLastAttack = _varValue; publicVariable "timeSinceLastAttack"}; + if(_varName == 'cuentaCANonBuenos') then {cuentaCANonBuenos = _varValue; publicVariable "cuentaCANonBuenos"}; if(_varName == 'dificultad') then { if !(isMultiplayer) then { skillMult = _varValue; - if (skillMult == 0.5) then {minWeaps = 15}; - if (skillMult == 2) then {minWeaps = 40}; + if (skillMult >= 0.5) then {minWeaps = 15}; + if (skillMult >= 2) then {minWeaps = 40}; }; }; if(_varName == 'gameMode') then @@ -78,7 +80,7 @@ fn_SetStat = }; }; if(_varName == 'bombRuns') then {bombRuns = _varValue; publicVariable "bombRuns"}; - if(_varName == 'nextTick') then {nextTick = time + _varValue}; + if(_varName == 'nextTick') then {nextTick = time + _varValue; publicVariable "nextTick"}; if(_varName == 'miembros') then {miembros = +_varValue; publicVariable "miembros"}; if(_varName == 'smallCAmrk') then {smallCAmrk = +_varValue}; if(_varName == 'mrkNATO') then {{lados setVariable [_x,malos,true]} forEach _varValue;}; @@ -283,14 +285,14 @@ fn_SetStat = } else { - fuego setPos (_varValue select 1); + fuego setPosATL (_varValue select 1); caja setDir ((_varValue select 2) select 0); - caja setPos ((_varValue select 2) select 1); + caja setPosATL ((_varValue select 2) select 1); mapa setDir ((_varValue select 3) select 0); - mapa setPos ((_varValue select 3) select 1); - bandera setPos (_varValue select 4); + mapa setPosATL ((_varValue select 3) select 1); + bandera setPosATL (_varValue select 4); cajaVeh setDir ((_varValue select 5) select 0); - cajaVeh setPos ((_varValue select 5) select 1); + cajaVeh setPosATL ((_varValue select 5) select 1); }; {_x setPos _posHQ} forEach (playableUnits select {side _x == buenos}); }; @@ -302,13 +304,15 @@ fn_SetStat = _posVeh = _varvalue select _i select 1; _dirVeh = _varvalue select _i select 2; _veh = createVehicle [_tipoVeh,[0,0,1000],[],0,"NONE"]; - _veh setPos _posVeh; + _veh setPosATL _posVeh; _veh setDir _dirVeh; - _veh setVectorUp surfaceNormal (getPos _veh); - if ((_veh isKindOf "StaticWeapon") or (_veh isKindOf "Building")) then - { + // Only level out static weapons, buildings should stay level. + if (_veh isKindOf "StaticWeapon") then { + _veh setVectorUp surfaceNormal (getPosATL _veh); + }; + if ((_veh isKindOf "StaticWeapon") or (_veh isKindOf "Building")) then { staticsToSave pushBack _veh; - }; + }; [_veh] call A3A_fnc_AIVEHinit; }; publicVariable "staticsToSave"; diff --git a/A3-Antistasi/statSave/saveLoop.sqf b/A3-Antistasi/statSave/saveLoop.sqf index 497585bf67..c97a56a22c 100644 --- a/A3-Antistasi/statSave/saveLoop.sqf +++ b/A3-Antistasi/statSave/saveLoop.sqf @@ -48,6 +48,8 @@ if (!isDedicated) then savingServer = true; private ["_garrison"]; ["cuentaCA", cuentaCA] call fn_SaveStat; + ["timeSinceLastAttack", timeSinceLastAttack] call fn_SaveStat; + ["cuentaCANonBuenos", cuentaCANonBuenos] call fn_SaveStat; ["gameMode", gameMode] call fn_SaveStat; ["dificultad", skillMult] call fn_SaveStat; ["bombRuns", bombRuns] call fn_SaveStat; @@ -57,7 +59,7 @@ if (!isDedicated) then //["mrkNATO", (marcadores - controles) select {lados getVariable [_x,sideUnknown] == malos}] call fn_SaveStat; ["mrkSDK", (marcadores - controles - puestosFIA) select {lados getVariable [_x,sideUnknown] == buenos}] call fn_SaveStat; ["mrkCSAT", (marcadores - controles) select {lados getVariable [_x,sideUnknown] == muyMalos}] call fn_SaveStat; - ["posHQ", [getMarkerPos respawnBuenos,getPos fuego,[getDir caja,getPos caja],[getDir mapa,getPos mapa],getPos bandera,[getDir cajaVeh,getPos cajaVeh]]] call fn_Savestat; + ["posHQ", [getMarkerPos respawnBuenos,getPosATL fuego,[getDir caja,getPosATL caja],[getDir mapa,getPosATL mapa],getPosATL bandera,[getDir cajaVeh,getPosATL cajaVeh]]] call fn_Savestat; ["prestigeNATO", prestigeNATO] call fn_SaveStat; ["prestigeCSAT", prestigeCSAT] call fn_SaveStat; ["fecha", date] call fn_SaveStat; @@ -75,7 +77,7 @@ if (!isDedicated) then ["unlockedBackpacks", unlockedBackpacks] call fn_SaveStat; */ ["weather",[fogParams,rain]] call fn_SaveStat; - ["destroyedBuildings",destroyedBuildings] call fn_SaveStat; + //["destroyedBuildings",destroyedBuildings] call fn_SaveStat; //["firstLoad",false] call fn_SaveStat; private ["_hrfondo","_resfondo","_veh","_tipoVeh","_armas","_municion","_items","_mochis","_contenedores","_arrayEst","_posVeh","_dierVeh","_prestigeOPFOR","_prestigeBLUFOR","_ciudad","_datos","_marcadores","_garrison","_arrayMrkMF","_arrayPuestosFIA","_pospuesto","_tipoMina","_posMina","_detectada","_tipos","_exists","_amigo"]; @@ -142,7 +144,7 @@ if ((_veh distance getMarkerPos respawnBuenos < 50) and !(_veh in staticsToSave) { if (((not (_veh isKindOf "StaticWeapon")) and (not (_veh isKindOf "ReammoBox")) and (not (_veh isKindOf "FlagCarrier")) and (not(_veh isKindOf "Building"))) and (not (_tipoVeh == "C_Van_01_box_F")) and (count attachedObjects _veh == 0) and (alive _veh) and ({(alive _x) and (!isPlayer _x)} count crew _veh == 0) and (not(_tipoVeh == "WeaponHolderSimulated"))) then { - _posVeh = getPos _veh; + _posVeh = getPosATL _veh; _dirVeh = getDir _veh; _arrayEst pushBack [_tipoVeh,_posVeh,_dirVeh]; }; @@ -154,7 +156,7 @@ _sitios = marcadores select {lados getVariable [_x,sideUnknown] == buenos}; _posicion = position _x; if ((alive _x) and !(surfaceIsWater _posicion) and !(isNull _x)) then { - _arrayEst pushBack [typeOf _x,getPos _x,getDir _x]; + _arrayEst pushBack [typeOf _x,getPosATL _x,getDir _x]; /* _cercano = [_sitios,_posicion] call BIS_fnc_nearestPosition; if (_posicion inArea _cercano) then @@ -205,7 +207,7 @@ _arrayMrkMF = _arrayMrkMF + [_posMineF]; _arrayMinas = []; { _tipoMina = typeOf _x; -_posMina = getPos _x; +_posMina = getPosATL _x; _dirMina = getDir _x; _detectada = []; if (_x mineDetectedBy buenos) then @@ -277,4 +279,4 @@ _controles = controles select {(lados getVariable [_x,sideUnknown] == buenos) an savingServer = false; [[petros,"hint",format ["Savegame Done.\n\nYou won't lose your stats in the event of a game update.\n\nRemember: if you want to preserve any vehicle, it must be near the HQ Flag with no AI inside.\nIf AI are inside, you will save the funds you spent on it.\n\nAI will be refunded\n\nStolen and purchased Static Weapons need to be ASSEMBLED in order to be saved. You can save disassembled Static Weapons in the ammo box.\n\nMounted Statics (Mortar/AA/AT squads) won't get saved, but you will be able to recover the cost.\n\nSame for assigned vehicles more than 50m away from HQ.\n\n%1 fund count:\nHR: %2\nMoney: %3 €",nameBuenos,_hrFondo,_resFondo]],"A3A_fnc_commsMP"] call BIS_fnc_MP; -diag_log "Antistasi: Persistent Save Done"; \ No newline at end of file +diag_log "Antistasi: Persistent Save Done"; diff --git a/A3-Antistasi/statistics.sqf b/A3-Antistasi/statistics.sqf index faef5faae1..baacc3b980 100644 --- a/A3-Antistasi/statistics.sqf +++ b/A3-Antistasi/statistics.sqf @@ -10,26 +10,37 @@ waitUntil {sleep 0.5;!(isNil "theBoss")}; _setText = _display displayCtrl 1001; _setText ctrlSetBackgroundColor [0,0,0,0]; _nombreC = "None"; +private _hr = floor(server getVariable "hr"); +private _hrCap = floor(server getVariable ["hrCap", 0]); + if (!isMultiplayer) then { - _texto = format ["" + "HR: %1 | %9 Money: %2 € | Airstrikes: %5 | %7 Aggr: %3 | %8 Aggr: %4 | War Level: %6 | Undercover Mode: %10", server getVariable "hr", server getVariable "resourcesFIA",floor prestigeNATO,floor prestigeCSAT,floor bombRuns,tierWar,nameMalos,nameMuyMalos,nameBuenos,["Off", "On"] select ((captive player) and !(player getVariable ["INCAPACITATED",false]))]; + _texto = format ["" + "HR: %1/%11 | %9 Money: %2 € | Airstrikes: %5 | %7 Aggr: %3 | %8 Aggr: %4 | War Level: %6 | Undercover Mode: %10", + _hr, server getVariable "resourcesFIA",floor prestigeNATO,floor prestigeCSAT,floor bombRuns,tierWar,nameMalos,nameMuyMalos,nameBuenos, + ["Off", "On"] select ((captive player) and !(player getVariable ["INCAPACITATED",false])), + _hrCap]; } else { if (player != theBoss) then { if (isPlayer theBoss) then {_nombreC = name theBoss} else {_nombreC = "None"}; - _texto = format ["" + "Commander: %3 | Rank: %2 | HR: %1 | Your Money: %4 € | %8 Aggr: %5 | %9 Aggr: %6 | War Level: %7 | Undercover Mode: %10", server getVariable "hr", rank player, _nombreC, player getVariable "dinero",floor prestigeNATO, floor prestigeCSAT,tierWar,nameMalos,nameMuyMalos,["Off", "On"] select ((captive player) and !(player getVariable ["INCAPACITATED",false]))]; + _texto = format ["" + "Commander: %3 | Rank: %2 | HR: %1/%11 | Your Money: %4 € | %8 Aggr: %5 | %9 Aggr: %6 | War Level: %7 | Undercover Mode: %10", + _hr, rank player, _nombreC, player getVariable "dinero",floor prestigeNATO, floor prestigeCSAT,tierWar,nameMalos,nameMuyMalos, + ["Off", "On"] select ((captive player) and !(player getVariable ["INCAPACITATED",false])), + _hrCap]; } else { if ([(player getVariable ["owner",player])] call A3A_fnc_isMember) then { - _texto = format ["" + "Rank: %5 | HR: %1 | Your Money: %6 € | %11 Money: %2 € | Airstrikes: %7 | %9 Aggr: %3 | %10 Aggr: %4 | War Level: %8 | Undercover Mode: %12", server getVariable "hr", server getVariable "resourcesFIA", floor prestigeNATO, floor prestigeCSAT,rank player, player getVariable "dinero",floor bombRuns,tierWar,nameMalos,nameMuyMalos,nameBuenos,["Off", "On"] select ((captive player) and !(player getVariable ["INCAPACITATED",false]))]; + _texto = format ["" + "Rank: %5 | HR: %1/%13 | Your Money: %6 € | %11 Money: %2 € | Airstrikes: %7 | %9 Aggr: %3 | %10 Aggr: %4 | War Level: %8 | Undercover Mode: %12", + _hr, server getVariable "resourcesFIA", floor prestigeNATO, floor prestigeCSAT,rank player, player getVariable "dinero",floor bombRuns,tierWar,nameMalos,nameMuyMalos,nameBuenos,["Off", "On"] select ((captive player) and !(player getVariable ["INCAPACITATED",false])), + _hrCap]; } else { - _texto = format ["" + "Rank: %1 | Your Money: %2 € | %3 Money: %4 € | %5 Aggr: %6 | %7 Aggr: %8 | War Level: %9 | Undercover Mode: %10",rank player,player getVariable "dinero",nameBuenos,server getVariable "resourcesFIA", nameMalos, floor prestigeNATO, nameMuyMalos,floor prestigeCSAT,tierWar,["Off", "On"] select ((captive player) and !(player getVariable ["INCAPACITATED",false]))]; + _texto = format ["" + "Rank: %1 | Your Money: %2 € | %3 Money: %4 € | %5 Aggr: %6 | %7 Aggr: %8 | War Level: %9 | Undercover Mode: %10",rank player,player getVariable "dinero",nameBuenos,server getVariable "resourcesFIA", nameMalos, floor prestigeNATO, nameMuyMalos,floor prestigeCSAT,tierWar,["Off", "On"] select ((captive player) and !(player getVariable ["INCAPACITATED",false]))]; }; }; }; diff --git a/A3-Antistasi/timingCA.sqf b/A3-Antistasi/timingCA.sqf index 7798f74a5e..7c1d6fbe6e 100644 --- a/A3-Antistasi/timingCA.sqf +++ b/A3-Antistasi/timingCA.sqf @@ -1,15 +1,40 @@ -_tiempo = _this select 0; -if (isNil "_tiempo") exitWith {}; -if !(_tiempo isEqualType 0) exitWith {}; -_mayor = if (_tiempo >= 3600) then {true} else {false}; -_tiempo = _tiempo - (((tierWar + difficultyCoef)-1)*400); -if (_tiempo < 0) then {_tiempo = 0}; +params [ + "_base", + ["_range", 0], + ["_reason", "unknown"] + ]; -cuentaCA = cuentaCA + round (random _tiempo); +if(isNil "cuentaCA") then { + cuentaCA = 0; + publicVariable "cuentaCA"; +}; + +private _t = (0.0005 * timeSinceLastAttack); +private _factor = 1 / (1 + _t * _t); +private _unmodified_amount = _base + random(_range); + +if(_unmodified_amount < 0) then { + _factor = 1 - _factor; +}; + +private _final_change = _unmodified_amount * _factor; +cuentaCA = cuentaCA + _final_change; + +diag_log format ["[timingCA] base = %1, range = %2, reason = %3. Final change = %4, new timing = %5", + _base, _range, _reason, _final_change, cuentaCA]; + + +// _mayor = if (_tiempo >= 3600) then {true} else {false}; + +// _tiempo = _tiempo - (((tierWar + difficultyCoef)-1)*400); + +// if (_tiempo < 0) then {_tiempo = 0}; + +// cuentaCA = cuentaCA + round (random _tiempo); + +// if (_mayor and (cuentaCA < 1200)) then {cuentaCA = 1200}; -if (_mayor and (cuentaCA < 1200)) then {cuentaCA = 1200}; -publicVariable "cuentaCA"; diff --git a/Antistasi.Altis.pbo b/Antistasi.Altis.pbo new file mode 100644 index 0000000000..13710a3e78 Binary files /dev/null and b/Antistasi.Altis.pbo differ diff --git a/balance.txt b/balance.txt new file mode 100644 index 0000000000..9091ea7497 --- /dev/null +++ b/balance.txt @@ -0,0 +1,9 @@ +OPF progress too fast: slow down attacks between OPF and BLUF. Slow down simulated battles significantly. +DONE: Make min diff requirement to capture town. + +NOtes: +Slightly slower attacks, waves too fast? +Fix vehicle driving somehow? +Slower changes in support. +Scale support change rate by size of population. +What do about Javelins? diff --git a/bugs.txt b/bugs.txt new file mode 100644 index 0000000000..2c1dada143 --- /dev/null +++ b/bugs.txt @@ -0,0 +1,21 @@ +Easy? + +Can only move HQ items once. +Once you failed to place an item (bought vehicle, garage item), from then on the items you place will not show up (perhaps when you place item n, item n-1 will show up?) + +Auto heal causes units to try and mount into cars? + +Garrison spawns as enemy if friendlies are there? AT guys? + +Auto medic sometimes go to get on a truck? + +? +Often can't load supply crate easily, need to move vehicle all over the place, bump the crate etc. +Auto rearmers can get stuck in rearm pose frozen. +Sometimes revived units are stuck lying down unable to move even though revived. + +Flag moves down. + +Missions aren't synced between players correctly. + +Can't move items in base after moving it second time. \ No newline at end of file diff --git a/build-altis.bat b/build-altis.bat new file mode 100644 index 0000000000..f59149319d --- /dev/null +++ b/build-altis.bat @@ -0,0 +1,12 @@ +@echo off +cd /d "%~dp0" +del Antistasi.Altis.pbo +mkdir "Antistasi.Altis" +xcopy "A3-Antistasi\*.*" "Antistasi.Altis" /E/Y +xcopy "A3-Antistasi\Templates\A3-AATemplate.Altis\*.*" "Antistasi.Altis" /E/Y +rmdir "Antistasi.Altis\Templates\A3-AATemplate.Altis" /S/Q +rmdir "Antistasi.Altis\Templates\A3-AA-BLUFORTemplate.Altis" /S/Q +rmdir "Antistasi.Altis\Templates\A3-ArmiaKrajowaTemplate.chernarus_summer" /S/Q +rmdir "Antistasi.Altis\Templates\A3-WotPTemplate.Tanoa" /S/Q +tools\armake_w64.exe build Antistasi.Altis Antistasi.Altis.pbo +rmdir "Antistasi.Altis" /S/Q diff --git a/clean.bat b/clean.bat new file mode 100644 index 0000000000..a1db80a489 --- /dev/null +++ b/clean.bat @@ -0,0 +1,4 @@ +@echo off +cd /d "%~dp0" +rmdir "Antistasi.Altis" /S +del *.pbo \ No newline at end of file diff --git a/features.txt b/features.txt new file mode 100644 index 0000000000..31caa70990 --- /dev/null +++ b/features.txt @@ -0,0 +1,21 @@ +Improved convoys. + Cohension of units + Auto correction + Better combat decisions: if a vehicle is immobilized then stop, otherwise push through at increased speed + Restart after combat + Repair broken vehicles + +"Hidden" missions, spawn based on proximity requiring immediate action. + e.g. + Driving through a town and refugees need evac immediately. + Flagged down by civilian with intel on a traitor currently escaping in vehicle. + Run into a convoy with logistics or intel. + +Real logistics + Convoys or airlift are used to move manpower/materiel. Could be virtual until within enemy proximity. + +Real intel + Missions to gain intel: capture high rank units, e.g. convoy or assassination like but you capture instead of kill. + Ambient intel from civilians - build networks in towns based on civilian support to get reports on enemy movements in the area. + Help from outside agents - meet shady character in secluded area, chance you need to defend them against a special forces strike team? + diff --git a/todo.txt b/todo.txt new file mode 100644 index 0000000000..2d9bf98d84 --- /dev/null +++ b/todo.txt @@ -0,0 +1,23 @@ + +Better garrison spawning - + Group garrison + Keep patrolling units out of the way in base - min range for patrols (not through base) +DONE Slow down civies +DONE Unlock all mags for weapons in arsenal update +Color the menu options - Unload cargo + load supply crate?, build HQ Here +Move supply box like other items in base. +Make NATO and AFRF Fight More +Make planes return from punishment +Make waves: start with para, then air foothold, then land +Don't close map after fast travel of HC units +Destroyed Vehicles in Garage +Garage vehicles kill you +Fast travel spawn position randomization +Everyone can take money +Auto heal better +Fast travel recent/HQ short cut +Range based actions instead of look at flag. +Pack up base when moving automatically + remove faction garage size limit. +Enemy should build statics/bunkers - auto place more based on how strong the garrison is. +Fix bunker create position. +Dynamic missions. \ No newline at end of file diff --git a/tools/armake b/tools/armake new file mode 100644 index 0000000000..d9233cbf5e Binary files /dev/null and b/tools/armake differ diff --git a/tools/armake_w64.exe b/tools/armake_w64.exe new file mode 100644 index 0000000000..a12e6e1ad6 Binary files /dev/null and b/tools/armake_w64.exe differ