diff --git a/.gitignore b/.gitignore index cb24a0a30..0546a5c1d 100644 --- a/.gitignore +++ b/.gitignore @@ -41,3 +41,5 @@ $RECYCLE.BIN/ Network Trash Folder Temporary Items .apdisk + +mission.sqm \ No newline at end of file diff --git a/Addons/AiRandomSkill/RandomSkill.sqf b/Addons/AiRandomSkill/RandomSkill.sqf index 2d496d6f5..07c812013 100644 --- a/Addons/AiRandomSkill/RandomSkill.sqf +++ b/Addons/AiRandomSkill/RandomSkill.sqf @@ -56,7 +56,7 @@ if (_skill < 0.05) then { }; // Set how the skill is affecting each skill type. -_aimingAccuracyLevel = _skill * 0.7; +_aimingAccuracyLevel = _skill * 0.6; _aimingShakeLevel = _skill * 1.0; _aimingSpeedLevel = _skill * 0.7; _spotDistanceLevel = _skill * 2.0; diff --git a/Addons/Henroth_AirLoadout/Common_ACRefreshLoadoutMounted.sqf b/Addons/Henroth_AirLoadout/Common_ACRefreshLoadoutMounted.sqf index c7f31c621..2a2f34661 100644 --- a/Addons/Henroth_AirLoadout/Common_ACRefreshLoadoutMounted.sqf +++ b/Addons/Henroth_AirLoadout/Common_ACRefreshLoadoutMounted.sqf @@ -141,9 +141,10 @@ for [ {_mount_index = 0},{ _mount_index < ( count ( _all_mountpoint_options ))}, { _vehicle addWeaponTurret [ _weapon_classname , _turret_position ]; }; - - _vehicle addMagazineTurret [ _magazine_classname , _turret_position ]; - + if ( not _not_resreached_magzine ) then + { + _vehicle addMagazineTurret [ _magazine_classname , _turret_position ]; + }; if ( not _mount_loadout_enabled ) then { _vehicle setAmmo [ _weapon_classname , 0 ]; diff --git a/Addons/Henroth_AirLoadout/Set_WeaponLoadouts.sqf b/Addons/Henroth_AirLoadout/Set_WeaponLoadouts.sqf index 9bd0d3789..4855ea5ff 100644 --- a/Addons/Henroth_AirLoadout/Set_WeaponLoadouts.sqf +++ b/Addons/Henroth_AirLoadout/Set_WeaponLoadouts.sqf @@ -15,7 +15,7 @@ * Re-introduced Hellcat (Armed) * 12/May/2018 - Yoshi_E - New Templates for all Units - Rework of inital code - * + * * * * Note: Weapon needs to start with "Pylon" (caps senetive) if you want the weapon * * to be treated as a pylon. @@ -41,23 +41,23 @@ CTI_LOADOUT__MNT_OPTIONS = Weapon name Magazine Magazine - - + + Get Pylons: configProperties [configFile >> "CfgVehicles" >> typeOf (vehicle player) >> "Components" >> "TransportPylonsComponent" >> "Pylons"] - + configProperties [configFile >> "CfgVehicles" >> "I_Plane_Fighter_03_dynamicLoadout_F" >> "Components" >> "TransportPylonsComponent" >> "Pylons"] Get Ammo for pylon: "I_Plane_Fighter_03_dynamicLoadout_F" getCompatiblePylonMagazines "PylonLeft1" - + As an empty weapon or Place Holder use: ["FakeHorn" , //Dummy weapon [ [ "WeaponSafty" , "0", [-1]] ] - ] - + ] + */ @@ -66,7 +66,7 @@ CTI_LOADOUT_UNARMED_FLARES = [ "Standard - configuration" , "default", - [ + [ [ [ "CMFlareLauncher" , [ @@ -86,49 +86,49 @@ CTI_LOADOUT_UNARMED_FLARES = // Experimental loadouts for AA tanks // *************************** //Bluefor - +/* CTI_LOADOUT_B_APC_Tracked_01_AA_F_MNT_OPTIONS = -[ +[ [ "Standard - configuration" , "default", - [ - [ + [ + [ ["autocannon_35mm", [ [ "680Rnd_35mm_AA_shells_Tracer_Green" , "2000"] ] ] - ], - [ + ], + [ ["autocannon_35mm", [ [ "680Rnd_35mm_AA_shells_Tracer_Green" , "2000"] ] ] ], - [ + [ ["missiles_SAAMI", [ [ "4Rnd_70mm_SAAMI_missiles" , "4000"] ] ] - ], - [ + ], + [ ["missiles_SAAMI", [ [ "4Rnd_70mm_SAAMI_missiles" , "4000"] ] ] - ], - [ + ], + [ ["SmokeLauncher", [ [ "SmokeLauncherMag" , "1000", [0,0]] ] ] ], - [ + [ ["SmokeLauncher", [ [ "SmokeLauncherMag" , "1000", [0,0]] @@ -138,49 +138,51 @@ CTI_LOADOUT_B_APC_Tracked_01_AA_F_MNT_OPTIONS = ] ] ]; +CTI_LOADOUT_B_T_APC_Tracked_01_AA_F_MNT_OPTIONS = CTI_LOADOUT_B_APC_Tracked_01_AA_F_MNT_OPTIONS; + //Opfor CTI_LOADOUT_O_APC_Tracked_02_AA_F_MNT_OPTIONS = -[ +[ [ "Standard - configuration" , "default", - [ - [ + [ + [ ["autocannon_35mm", [ [ "680Rnd_35mm_AA_shells_Tracer_Green" , "2000"] ] ] - ], - [ + ], + [ ["autocannon_35mm", [ [ "680Rnd_35mm_AA_shells_Tracer_Green" , "2000"] ] ] ], - [ + [ ["missiles_SAAMI", [ [ "4Rnd_70mm_SAAMI_missiles" , "4000"] ] ] - ], - [ + ], + [ ["missiles_SAAMI", [ [ "4Rnd_70mm_SAAMI_missiles" , "4000"] ] ] - ], - [ + ], + [ ["SmokeLauncher", [ [ "SmokeLauncherMag" , "1000", [0,0]] ] ] ], - [ + [ ["SmokeLauncher", [ [ "SmokeLauncherMag" , "1000", [0,0]] @@ -190,7 +192,8 @@ CTI_LOADOUT_O_APC_Tracked_02_AA_F_MNT_OPTIONS = ] ] ]; - +CTI_LOADOUT_O_T_APC_Tracked_02_AA_ghex_F_MNT_OPTIONS = CTI_LOADOUT_O_APC_Tracked_02_AA_F_MNT_OPTIONS; +*/ // *************************** // BLUFOR - Vehicle loadout options // *************************** @@ -200,18 +203,18 @@ CTI_LOADOUT_O_APC_Tracked_02_AA_F_MNT_OPTIONS = // Plane - Wipeout // *************************** CTI_LOADOUT_B_Plane_CAS_01_dynamicLoadout_F_MNT_OPTIONS = -[ +[ [ "Pylon - configuration" , "pylon", - [ + [ [ [ "Laserdesignator_pilotCamera" , [ [ "Laserbatteries" , "500"] ] ] - ], + ], [ [ "Gatling_30mm_Plane_CAS_01_F" , [ @@ -219,7 +222,7 @@ CTI_LOADOUT_B_Plane_CAS_01_dynamicLoadout_F_MNT_OPTIONS = ] ] ], - [ + [ ["Pylons1", [ [ "PylonRack_1Rnd_Missile_AA_04_F" , "4000"], @@ -236,7 +239,7 @@ CTI_LOADOUT_B_Plane_CAS_01_dynamicLoadout_F_MNT_OPTIONS = ] ] ], - [ + [ ["Pylons2", [ [ "PylonRack_7Rnd_Rocket_04_HE_F" , "1000"], @@ -255,14 +258,14 @@ CTI_LOADOUT_B_Plane_CAS_01_dynamicLoadout_F_MNT_OPTIONS = ] ] ], - [ + [ ["Pylons3", [ [ "PylonRack_3Rnd_Missile_AGM_02_F" , "15000"], [ "PylonRack_1Rnd_Missile_AA_04_F" , "4000"], [ "PylonRack_1Rnd_AAA_missiles" , "4000"], [ "PylonRack_1Rnd_Missile_AGM_02_F" , "5000"], - [ "PylonRack_3Rnd_LG_scalpel" , "15000"], + [ "PylonRack_3Rnd_LG_scalpel" , "15000"], [ "PylonRack_1Rnd_LG_scalpel" , "5000"], [ "PylonRack_7Rnd_Rocket_04_HE_F" , "1000"], [ "PylonRack_7Rnd_Rocket_04_AP_F" , "1000"], @@ -275,7 +278,7 @@ CTI_LOADOUT_B_Plane_CAS_01_dynamicLoadout_F_MNT_OPTIONS = ] ] ], - [ + [ ["Pylons4", [ [ "PylonMissile_1Rnd_Bomb_04_F" , "5000"], @@ -295,7 +298,7 @@ CTI_LOADOUT_B_Plane_CAS_01_dynamicLoadout_F_MNT_OPTIONS = ] ] ], - [ + [ ["Pylons5", [ [ "PylonMissile_1Rnd_Bomb_04_F" , "5000"], @@ -314,8 +317,8 @@ CTI_LOADOUT_B_Plane_CAS_01_dynamicLoadout_F_MNT_OPTIONS = [ "PylonMissile_1Rnd_BombCluster_03_F" , "1000"] ] ] - ], - [ + ], + [ ["Pylons6", [ [ "PylonMissile_1Rnd_Bomb_04_F" , "5000"], @@ -335,7 +338,7 @@ CTI_LOADOUT_B_Plane_CAS_01_dynamicLoadout_F_MNT_OPTIONS = ] ] ], - [ + [ ["Pylons7", [ [ "PylonMissile_1Rnd_Bomb_04_F" , "5000"], @@ -354,8 +357,8 @@ CTI_LOADOUT_B_Plane_CAS_01_dynamicLoadout_F_MNT_OPTIONS = [ "PylonMissile_1Rnd_BombCluster_03_F" , "1000"] ] ] - ], - [ + ], + [ ["Pylons8", [ [ "PylonRack_3Rnd_Missile_AGM_02_F" , "15000"], @@ -374,8 +377,8 @@ CTI_LOADOUT_B_Plane_CAS_01_dynamicLoadout_F_MNT_OPTIONS = [ "PylonMissile_1Rnd_BombCluster_03_F" , "1000"] ] ] - ], - [ + ], + [ ["Pylons9", [ [ "PylonRack_7Rnd_Rocket_04_AP_F" , "1000"], @@ -393,8 +396,8 @@ CTI_LOADOUT_B_Plane_CAS_01_dynamicLoadout_F_MNT_OPTIONS = [ "PylonMissile_1Rnd_BombCluster_03_F" , "1000"] ] ] - ], - [ + ], + [ ["Pylons10", [ [ "PylonRack_1Rnd_Missile_AA_04_F" , "4000"], @@ -410,7 +413,7 @@ CTI_LOADOUT_B_Plane_CAS_01_dynamicLoadout_F_MNT_OPTIONS = [ "PylonMissile_1Rnd_BombCluster_03_F" , "1000"] ] ] - ], + ], [ ["CMFlareLauncher" , [ @@ -426,14 +429,14 @@ CTI_LOADOUT_B_Plane_CAS_01_dynamicLoadout_F_MNT_OPTIONS = [ "Bomber" , "pylon", - [ + [ [ [ "Laserdesignator_pilotCamera" , [ [ "Laserbatteries" , "500"] ] ] - ], + ], [ [ "Gatling_30mm_Plane_CAS_01_F" , [ @@ -441,76 +444,76 @@ CTI_LOADOUT_B_Plane_CAS_01_dynamicLoadout_F_MNT_OPTIONS = ] ] ], - [ + [ ["Pylons1", [ [ "PylonMissile_1Rnd_Bomb_04_F" , "5000"] ] ] ], - [ + [ ["Pylons2", [ [ "PylonMissile_1Rnd_Bomb_04_F" , "5000"] ] ] ], - [ + [ ["Pylons3", [ [ "PylonMissile_1Rnd_Bomb_04_F" , "5000"] ] ] ], - [ + [ ["Pylons4", [ [ "PylonMissile_1Rnd_Bomb_04_F" , "5000"] ] ] ], - [ + [ ["Pylons5", [ [ "PylonMissile_1Rnd_Bomb_04_F" , "5000"] ] ] - ], - [ + ], + [ ["Pylons6", [ [ "PylonMissile_1Rnd_Bomb_04_F" , "5000"] ] ] ], - [ + [ ["Pylons7", [ [ "PylonMissile_1Rnd_Bomb_04_F" , "5000"] ] ] - ], - [ + ], + [ ["Pylons8", [ [ "PylonMissile_1Rnd_Bomb_04_F" , "5000"] ] ] - ], - [ + ], + [ ["Pylons9", [ [ "PylonMissile_1Rnd_Bomb_04_F" , "5000"] ] ] - ], - [ + ], + [ ["Pylons10", [ [ "PylonMissile_1Rnd_Bomb_04_F" , "5000"] ] ] - ], + ], [ ["CMFlareLauncher" , [ @@ -527,21 +530,21 @@ CTI_LOADOUT_B_Plane_CAS_01_dynamicLoadout_F_MNT_OPTIONS = // *************************** -// Plane - Black Wasp II +// Plane - Black Wasp II // *************************** CTI_LOADOUT_B_Plane_Fighter_01_F_MNT_OPTIONS = -[ +[ [ "Pylon - configuration" , "pylon", - [ + [ [ ["Laserdesignator_pilotCamera" , [ [ "Laserbatteries" , "500"] ] ] - ], + ], [ ["weapon_Fighter_Gun20mm_AA" , [ @@ -549,7 +552,7 @@ CTI_LOADOUT_B_Plane_Fighter_01_F_MNT_OPTIONS = ] ] ], - [ + [ ["Pylon1", [ [ "PylonRack_Missile_AMRAAM_D_x1" , "4000"], @@ -562,7 +565,7 @@ CTI_LOADOUT_B_Plane_Fighter_01_F_MNT_OPTIONS = ] ] ], - [ + [ ["Pylon3", [ [ "PylonRack_Missile_AGM_02_x1" , "5000"], @@ -578,34 +581,34 @@ CTI_LOADOUT_B_Plane_Fighter_01_F_MNT_OPTIONS = [ "PylonRack_2Rnd_BombCluster_01_F" , "2000"], [ "PylonRack_2Rnd_BombCluster_03_F" , "2000"], [ "PylonRack_Bomb_SDB_x4" , "5000"], - [ "PylonRack_Missile_HARM_x1" , "10000"], + [ "PylonRack_Missile_HARM_x1" , "8000"], [ "PylonMissile_Missile_BIM9X_x1" , "4000"], [ "PylonMissile_Missile_AMRAAM_D_INT_x1" , "4000"] ] ] - ], - [ + ], + [ ["PylonBayLeft1", [ [ "PylonMissile_Missile_BIM9X_x1" , "4000"] ] ] ], - [ + [ ["PylonBayCenter1", [ ["PylonMissile_Missile_AMRAAM_D_INT_x1" , "4000"] ] ] ], - [ + [ ["PylonBayCenter2", [ ["PylonMissile_Missile_AMRAAM_D_INT_x1" , "4000"] ] ] - ], - [ + ], + [ ["PylonBayCenter3", [ ["" , ""], @@ -614,7 +617,7 @@ CTI_LOADOUT_B_Plane_Fighter_01_F_MNT_OPTIONS = ] ] ], - [ + [ ["PylonBayCenter4", [ ["" , ""], @@ -622,8 +625,8 @@ CTI_LOADOUT_B_Plane_Fighter_01_F_MNT_OPTIONS = ["PylonMissile_Missile_AMRAAM_D_INT_x1" , "4000"] ] ] - ], - [ + ], + [ ["PylonBayCenter5", [ [ "PylonMissile_Bomb_GBU12_x1" , "5000"], @@ -632,8 +635,8 @@ CTI_LOADOUT_B_Plane_Fighter_01_F_MNT_OPTIONS = [ "PylonMissile_Missile_AMRAAM_D_INT_x1" , "4000"] ] ] - ], - [ + ], + [ ["PylonBayCenter6", [ [ "PylonMissile_Bomb_GBU12_x1" , "5000"], @@ -642,15 +645,15 @@ CTI_LOADOUT_B_Plane_Fighter_01_F_MNT_OPTIONS = [ "PylonMissile_Missile_AMRAAM_D_INT_x1" , "4000"] ] ] - ], - [ + ], + [ ["PylonBayRight1", [ [ "PylonMissile_Missile_BIM9X_x1" , "4000"] ] ] - ], - [ + ], + [ ["Pylon4", [ [ "PylonRack_Missile_AGM_02_x1" , "5000"], @@ -666,13 +669,13 @@ CTI_LOADOUT_B_Plane_Fighter_01_F_MNT_OPTIONS = [ "PylonRack_2Rnd_BombCluster_01_F" , "2000"], [ "PylonRack_2Rnd_BombCluster_03_F" , "2000"], [ "PylonRack_Bomb_SDB_x4" , "5000"], - [ "PylonRack_Missile_HARM_x1" , "10000"], + [ "PylonRack_Missile_HARM_x1" , "8000"], [ "PylonMissile_Missile_BIM9X_x1" , "4000"], [ "PylonMissile_Missile_AMRAAM_D_INT_x1" , "4000"] ] ] - ], - [ + ], + [ ["Pylon2", [ [ "PylonRack_Missile_AMRAAM_D_x1" , "4000"], @@ -700,14 +703,14 @@ CTI_LOADOUT_B_Plane_Fighter_01_F_MNT_OPTIONS = [ "Air Supremacy - Maddog", "pylon", - [ + [ [ ["Laserdesignator_pilotCamera" , [ [ "Laserbatteries" , "500"] ] ] - ], + ], [ ["weapon_Fighter_Gun20mm_AA" , [ @@ -715,84 +718,84 @@ CTI_LOADOUT_B_Plane_Fighter_01_F_MNT_OPTIONS = ] ] ], - [ + [ ["Pylon1", [ [ "PylonRack_Missile_AMRAAM_D_x2" , "4000"] ] ] ], - [ + [ ["Pylon3", [ [ "PylonRack_Missile_AMRAAM_D_x2" , "4000"] ] ] - ], - [ + ], + [ ["PylonBayLeft1", [ [ "PylonMissile_Missile_BIM9X_x1" , "4000"] ] ] ], - [ + [ ["PylonBayCenter1", [ ["PylonMissile_Missile_AMRAAM_D_INT_x1" , "4000"] ] ] ], - [ + [ ["PylonBayCenter2", [ ["PylonMissile_Missile_AMRAAM_D_INT_x1" , "4000"] ] ] - ], - [ + ], + [ ["PylonBayCenter3", [ ["PylonMissile_Missile_AMRAAM_D_INT_x1" , "4000"] ] ] ], - [ + [ ["PylonBayCenter4", [ ["PylonMissile_Missile_AMRAAM_D_INT_x1" , "4000"] ] ] - ], - [ + ], + [ ["PylonBayCenter5", [ [ "PylonMissile_Bomb_GBU12_x1" , "5000"] ] ] - ], - [ + ], + [ ["PylonBayCenter6", [ [ "PylonMissile_Bomb_GBU12_x1" , "5000"] ] ] - ], - [ + ], + [ ["PylonBayRight1", [ [ "PylonMissile_Missile_BIM9X_x1" , "4000"] ] ] - ], - [ + ], + [ ["Pylon4", [ [ "PylonRack_Missile_AMRAAM_D_x2" , "4000"] ] ] - ], - [ + ], + [ ["Pylon2", [ [ "PylonRack_Missile_AMRAAM_D_x2" , "4000"] @@ -814,14 +817,14 @@ CTI_LOADOUT_B_Plane_Fighter_01_F_MNT_OPTIONS = [ "Ground Supremacy - Hybrid" , "pylon", - [ + [ [ ["Laserdesignator_pilotCamera" , [ [ "Laserbatteries" , "500"] ] ] - ], + ], [ ["weapon_Fighter_Gun20mm_AA" , [ @@ -829,84 +832,84 @@ CTI_LOADOUT_B_Plane_Fighter_01_F_MNT_OPTIONS = ] ] ], - [ + [ ["Pylon1", [ [ "PylonRack_Missile_AGM_02_x1" , "5000"] ] ] ], - [ + [ ["Pylon3", [ - [ "PylonRack_Missile_HARM_x1" , "10000"] + [ "PylonRack_Missile_HARM_x1" , "8000"] ] ] - ], - [ + ], + [ ["PylonBayLeft1", [ [ "PylonMissile_Missile_BIM9X_x1" , "4000"] ] ] ], - [ + [ ["PylonBayCenter1", [ ["PylonMissile_Missile_AMRAAM_D_INT_x1" , "4000"] ] ] ], - [ + [ ["PylonBayCenter2", [ ["PylonMissile_Missile_AMRAAM_D_INT_x1" , "4000"] ] ] - ], - [ + ], + [ ["PylonBayCenter3", [ [ "PylonRack_Bomb_SDB_x4" , "5000"] ] ] ], - [ + [ ["PylonBayCenter4", [ [ "PylonRack_Bomb_SDB_x4" , "5000"] ] ] - ], - [ + ], + [ ["PylonBayCenter5", [ [ "PylonMissile_Bomb_GBU12_x1" , "5000"] ] ] - ], - [ + ], + [ ["PylonBayCenter6", [ [ "PylonMissile_Bomb_GBU12_x1" , "5000"] ] ] - ], - [ + ], + [ ["PylonBayRight1", [ [ "PylonMissile_Missile_BIM9X_x1" , "4000"] ] ] - ], - [ + ], + [ ["Pylon4", [ - [ "PylonRack_Missile_HARM_x1" , "10000"] + [ "PylonRack_Missile_HARM_x1" , "8000"] ] ] - ], - [ + ], + [ ["Pylon2", [ [ "PylonRack_Missile_AGM_02_x1" , "5000"] @@ -934,18 +937,18 @@ CTI_LOADOUT_B_Plane_Fighter_01_F_MNT_OPTIONS = // Plane - Black Wasp II Stealth // *************************** CTI_LOADOUT_B_Plane_Fighter_01_Stealth_F_MNT_OPTIONS = -[ +[ [ "Pylon - configuration" , "pylon", - [ + [ [ [ "Laserdesignator_pilotCamera" , [ [ "Laserbatteries" , "500" , [0]] ] ] - ], + ], [ [ "weapon_Fighter_Gun20mm_AA" , [ @@ -953,28 +956,28 @@ CTI_LOADOUT_B_Plane_Fighter_01_Stealth_F_MNT_OPTIONS = ] ] ], - [ + [ ["PylonBayRight1", [ [ "PylonMissile_Missile_BIM9X_x1" , "4000"] ] ] ], - [ + [ ["PylonBayCenter1", [ ["PylonMissile_Missile_AMRAAM_D_INT_x1" , "4000"] ] ] ], - [ + [ ["PylonBayCenter2", [ ["PylonMissile_Missile_AMRAAM_D_INT_x1" , "4000"] ] ] - ], - [ + ], + [ ["PylonBayCenter3", [ ["" , ""], @@ -983,7 +986,7 @@ CTI_LOADOUT_B_Plane_Fighter_01_Stealth_F_MNT_OPTIONS = ] ] ], - [ + [ ["PylonBayCenter4", [ ["" , ""], @@ -991,8 +994,8 @@ CTI_LOADOUT_B_Plane_Fighter_01_Stealth_F_MNT_OPTIONS = ["PylonMissile_Missile_AMRAAM_D_INT_x1" , "4000"] ] ] - ], - [ + ], + [ ["PylonBayCenter5", [ [ "PylonMissile_Bomb_GBU12_x1" , "5000"], @@ -1001,8 +1004,8 @@ CTI_LOADOUT_B_Plane_Fighter_01_Stealth_F_MNT_OPTIONS = [ "PylonMissile_Missile_AMRAAM_D_INT_x1" , "4000"] ] ] - ], - [ + ], + [ ["PylonBayCenter6", [ [ "PylonMissile_Bomb_GBU12_x1" , "5000"], @@ -1011,14 +1014,14 @@ CTI_LOADOUT_B_Plane_Fighter_01_Stealth_F_MNT_OPTIONS = [ "PylonMissile_Missile_AMRAAM_D_INT_x1" , "4000"] ] ] - ], - [ + ], + [ ["PylonBayRight1", [ [ "PylonMissile_Missile_BIM9X_x1" , "4000"] ] ] - ], + ], [ ["CMFlareLauncher" , [ @@ -1028,7 +1031,7 @@ CTI_LOADOUT_B_Plane_Fighter_01_Stealth_F_MNT_OPTIONS = [ "192Rnd_CMFlare_Chaff_Magazine" , "1500" , [-1] ] ] ] - ] + ] ] ] ]; @@ -1042,14 +1045,14 @@ CTI_LOADOUT_B_Heli_Light_01_dynamicLoadout_F_MNT_OPTIONS = "pylon", [ [ - ["M134_minigun" , + ["M134_minigun" , [ [ "5000Rnd_762x51_Belt" , "350"] ] ] - ], + ], [ - ["PylonRight1" , + ["PylonRight1" , [ [ "PylonRack_12Rnd_missiles" , "2000"], //[ "PylonRack_1Rnd_AAA_missiles" , "4000"], @@ -1059,9 +1062,9 @@ CTI_LOADOUT_B_Heli_Light_01_dynamicLoadout_F_MNT_OPTIONS = //[ "PylonRack_12Rnd_PG_missiles" , "8000"], ] ] - ], + ], [ - ["PylonLeft1" , + ["PylonLeft1" , [ [ "PylonRack_12Rnd_missiles" , "2000"], //[ "PylonRack_1Rnd_AAA_missiles" , "4000"], @@ -1089,10 +1092,10 @@ CTI_LOADOUT_B_Heli_Transport_01_F_MNT_OPTIONS = [ ["CMFlareLauncher" , [ - [ "240Rnd_CMFlare_Chaff_Magazine" , "2000" , [0] ], - [ "120Rnd_CMFlare_Chaff_Magazine" , "500" , [0] ], - [ "168Rnd_CMFlare_Chaff_Magazine" , "1000" , [0] ], - [ "192Rnd_CMFlare_Chaff_Magazine" , "1500" , [0] ] + [ "240Rnd_CMFlare_Chaff_Magazine" , "2000" , [-1] ], + [ "120Rnd_CMFlare_Chaff_Magazine" , "500" , [-1] ], + [ "168Rnd_CMFlare_Chaff_Magazine" , "1000" , [-1] ], + [ "192Rnd_CMFlare_Chaff_Magazine" , "1500" , [-1] ] ] ] ], @@ -1173,42 +1176,42 @@ CTI_LOADOUT_B_T_VTOL_01_armed_F_MNT_OPTIONS = [ "Laserbatteries" , "500", [0]] ] ] - ], + ], [ ["cannon_105mm_VTOL_01" , [ [ "100Rnd_105mm_HEAT_MP" , "2000", [1]] ] ] - ], + ], [ ["cannon_105mm_VTOL_01" , [ [ "40Rnd_105mm_APFSDS_T_Red" , "2000", [1]] ] ] - ], + ], [ ["gatling_20mm_VTOL_01" , [ [ "4000Rnd_20mm_Tracer_Red_shells" , "2000", [1]] ] ] - ], + ], [ ["autocannon_40mm_VTOL_01" , [ [ "240Rnd_40mm_GPR_Tracer_Red_shells" , "2000", [2]] ] ] - ], + ], [ ["autocannon_40mm_VTOL_01" , [ [ "240Rnd_40mm_GPR_Tracer_Red_shells" , "2000", [2]] ] ] - ], + ], [ ["autocannon_40mm_VTOL_01" , [ @@ -1222,14 +1225,14 @@ CTI_LOADOUT_B_T_VTOL_01_armed_F_MNT_OPTIONS = [ "4000Rnd_20mm_Tracer_Red_shells" , "2000", [2]] ] ] - ] + ] ] ] ]; CTI_LOADOUT_B_T_VTOL_01_infantry_F_MNT_OPTIONS = CTI_LOADOUT_UNARMED_FLARES; CTI_LOADOUT_B_T_VTOL_01_vehicle_F_MNT_OPTIONS = CTI_LOADOUT_UNARMED_FLARES; - + // *************************** @@ -1305,7 +1308,7 @@ CTI_LOADOUT_B_Heli_Attack_01_dynamicLoadout_F_MNT_OPTIONS = [ "PylonRack_12Rnd_missiles" , "2000"] ] ] - ], + ], [ ["PylonRight2" , [ @@ -1313,7 +1316,7 @@ CTI_LOADOUT_B_Heli_Attack_01_dynamicLoadout_F_MNT_OPTIONS = [ "PylonMissile_1Rnd_LG_scalpel" , "5000", [0]] ] ] - ], + ], [ ["PylonRight1" , [ @@ -1334,7 +1337,7 @@ CTI_LOADOUT_B_Heli_Attack_01_dynamicLoadout_F_MNT_OPTIONS = ] ] ] - ] + ] ] ]; // *************************** @@ -1362,12 +1365,12 @@ CTI_LOADOUT_B_UAV_02_F_MNT_OPTIONS = ["Missile_AA_03_Plane_CAS_02_F" , [ [ "2Rnd_Missile_AA_03_F" , "8000"] - ] - ], + ] + ], ["missiles_ASRAAM" , [ [ "2Rnd_AAA_missiles" , "8000"] - ] + ] ] ], @@ -1410,7 +1413,7 @@ CTI_LOADOUT_B_UAV_02_CAS_F_MNT_OPTIONS = ["Mk82BombLauncher" , [ [ "2Rnd_Mk82" , "3000" ,[0]] - ] + ] ] ], @@ -1433,11 +1436,11 @@ CTI_LOADOUT_B_UAV_02_CAS_F_MNT_OPTIONS = // UAV - MQ-4A Greyhawk AT version // *************************** CTI_LOADOUT_B_UAV_02_dynamicLoadout_F_MNT_OPTIONS = -[ +[ [ "Pylon - configuration" , "pylon", - [ + [ [ [ "Laserdesignator_mounted" , [ @@ -1445,7 +1448,7 @@ CTI_LOADOUT_B_UAV_02_dynamicLoadout_F_MNT_OPTIONS = ] ] ], - [ + [ ["Pylons1", [ [ "PylonRack_3Rnd_LG_scalpel" , "15000" , [0]], @@ -1463,7 +1466,7 @@ CTI_LOADOUT_B_UAV_02_dynamicLoadout_F_MNT_OPTIONS = ] ] ], - [ + [ ["Pylons2", [ [ "PylonRack_3Rnd_LG_scalpel" , "15000" , [0]], @@ -1499,11 +1502,11 @@ CTI_LOADOUT_B_UAV_02_dynamicLoadout_F_MNT_OPTIONS = // UAV - MQ-12 Falcon // *************************** CTI_LOADOUT_B_T_UAV_03_dynamicLoadout_F_MNT_OPTIONS = -[ +[ [ "Pylon - configuration" , "pylon", - [ + [ [ [ "Laserdesignator_mounted" , [ @@ -1511,7 +1514,7 @@ CTI_LOADOUT_B_T_UAV_03_dynamicLoadout_F_MNT_OPTIONS = ] ] ], - [ + [ ["Pylons1", [ [ "PylonRack_12Rnd_missiles" , "2000" , [-1]], @@ -1529,7 +1532,7 @@ CTI_LOADOUT_B_T_UAV_03_dynamicLoadout_F_MNT_OPTIONS = ] ] ], - [ + [ ["Pylons2", [ [ "PylonRack_3Rnd_LG_scalpel" , "15000" , [0]], @@ -1546,8 +1549,8 @@ CTI_LOADOUT_B_T_UAV_03_dynamicLoadout_F_MNT_OPTIONS = [ "PylonMissile_1Rnd_BombCluster_03_F" , "1000" , [0]] ] ] - ], - [ + ], + [ ["Pylons3", [ [ "PylonRack_3Rnd_LG_scalpel" , "15000" , [0]], @@ -1565,7 +1568,7 @@ CTI_LOADOUT_B_T_UAV_03_dynamicLoadout_F_MNT_OPTIONS = ] ] ], - [ + [ ["Pylons4", [ [ "PylonRack_12Rnd_missiles" , "2000" , [-1]], @@ -1601,11 +1604,11 @@ CTI_LOADOUT_B_T_UAV_03_dynamicLoadout_F_MNT_OPTIONS = // UAV - UCAV Sentinel // *************************** CTI_LOADOUT_B_UAV_05_F_MNT_OPTIONS = -[ +[ [ "Pylon - configuration" , "pylon", - [ + [ [ [ "Laserdesignator_mounted" , [ @@ -1613,26 +1616,30 @@ CTI_LOADOUT_B_UAV_05_F_MNT_OPTIONS = ] ] ], - [ + [ ["Pylons1", [ [ "PylonMissile_Bomb_GBU12_x1" , "5000" , [0]], [ "PylonMissile_Missile_AGM_02_x2" , "10000" , [0]], [ "PylonMissile_1Rnd_BombCluster_01_F" , "1000" , [0]], - [ "PylonMissile_1Rnd_BombCluster_03_F" , "1000" , [0]] + [ "PylonMissile_1Rnd_BombCluster_03_F" , "1000" , [0]], + [ "PylonMissile_Missile_HARM_INT_x1" , "8000" , [0]], + [ "PylonRack_Bomb_SDB_x4" , "5000" , [0]] ] ] ], - [ + [ ["Pylons2", [ [ "PylonMissile_Bomb_GBU12_x1" , "5000" , [0]], [ "PylonMissile_Missile_AGM_02_x2" , "10000" , [0]], [ "PylonMissile_1Rnd_BombCluster_01_F" , "1000" , [0]], - [ "PylonMissile_1Rnd_BombCluster_03_F" , "1000" , [0]] + [ "PylonMissile_1Rnd_BombCluster_03_F" , "1000" , [0]], + [ "PylonMissile_Missile_HARM_INT_x1" , "8000" , [0]], + [ "PylonRack_Bomb_SDB_x4" , "5000" , [0]] ] ] - ], + ], [ ["CMFlareLauncher" , [ @@ -1640,7 +1647,7 @@ CTI_LOADOUT_B_UAV_05_F_MNT_OPTIONS = [ "192Rnd_CMFlare_Chaff_Magazine" , "4000" , [-1]], [ "120Rnd_CMFlare_Chaff_Magazine" , "500" , [-1]], [ "168Rnd_CMFlare_Chaff_Magazine" , "3000" , [-1]] - + ] ] ] @@ -1662,7 +1669,7 @@ CTI_LOADOUT_O_T_UAV_04_CAS_F_MNT_OPTIONS = [ "Standard - Configuration" , "default", - [ + [ [ [ "Laserdesignator_mounted" , [ @@ -1712,7 +1719,7 @@ CTI_LOADOUT_O_Heli_Light_02_dynamicLoadout_F_MNT_OPTIONS = [ "PylonRack_19Rnd_Rocket_Skyfire" , "3000" ] ] ] - ], + ], [ [ "PylonRight1" , [ @@ -1788,9 +1795,9 @@ CTI_LOADOUT_O_Plane_Fighter_02_Stealth_F_MNT_OPTIONS = [ [ "PylonMissile_Missile_AA_R77_x1" , "5000" ], [ "PylonMissile_Missile_AA_R73_x1" , "5000" ] - + ] - ] + ] ], [ [ "PylonBayCenter1" , @@ -1799,14 +1806,14 @@ CTI_LOADOUT_O_Plane_Fighter_02_Stealth_F_MNT_OPTIONS = ] ] - ], + ], [ [ "PylonBayCenter3" , [ ["PylonMissile_Missile_AA_R77_INT_x1" , "4000" ], ["PylonMissile_Missile_AGM_KH25_INT_x1" , "6000" ], ["PylonMissile_Bomb_KAB250_x1" , "6000" ], - ["PylonMissile_Missile_KH58_INT_x1" , "10000" ], + ["PylonMissile_Missile_KH58_INT_x1" , "8000" ], ["PylonMissile_1Rnd_BombCluster_02_cap_F" , "1000" ] ] ] @@ -1823,10 +1830,10 @@ CTI_LOADOUT_O_Plane_Fighter_02_Stealth_F_MNT_OPTIONS = [ [ "PylonMissile_Missile_AA_R77_x1" , "5000" ], [ "PylonMissile_Missile_AA_R73_x1" , "5000" ] - + ] ] - ], + ], [ [ "PylonBayLeft1" , [ @@ -1846,7 +1853,7 @@ CTI_LOADOUT_O_Plane_Fighter_02_Stealth_F_MNT_OPTIONS = [ "120Rnd_CMFlare_Chaff_Magazine" , "500" , [-1]], [ "168Rnd_CMFlare_Chaff_Magazine" , "3000" , [-1] ], [ "192Rnd_CMFlare_Chaff_Magazine" , "4000" , [-1] ] - + ] ] ] @@ -1891,9 +1898,9 @@ CTI_LOADOUT_O_Plane_Fighter_02_F_MNT_OPTIONS = [ [ "PylonMissile_Missile_AA_R77_x1" , "5000" ], [ "PylonMissile_Missile_AA_R73_x1" , "5000" ] - + ] - ] + ] ], [ [ "Pylons3" , @@ -1905,7 +1912,7 @@ CTI_LOADOUT_O_Plane_Fighter_02_F_MNT_OPTIONS = [ "PylonMissile_1Rnd_BombCluster_02_cap_F" , "1000" ] ] ] - ], + ], [ [ "PylonBayRight1" , [ @@ -1924,17 +1931,17 @@ CTI_LOADOUT_O_Plane_Fighter_02_F_MNT_OPTIONS = [ "PylonBayCenter1" , [ ["PylonMissile_Missile_AA_R77_INT_x1" , "5000" ] - + ] ] - ], + ], [ [ "PylonBayCenter3" , [ [ "PylonMissile_Bomb_KAB250_x1" , "6000" ], [ "PylonMissile_Missile_AA_R77_INT_x1" , "5000" ], [ "PylonMissile_Missile_AGM_KH25_INT_x1" , "5000" ], - ["PylonMissile_Missile_KH58_INT_x1" , "10000" ], + ["PylonMissile_Missile_KH58_INT_x1" , "8000" ], [ "PylonMissile_1Rnd_BombCluster_02_cap_F" , "1000" ] ] ] @@ -1945,7 +1952,7 @@ CTI_LOADOUT_O_Plane_Fighter_02_F_MNT_OPTIONS = ["PylonMissile_Missile_AA_R77_INT_x1" , "5000" ] ] ] - ], + ], [ [ "PylonBayLeft2" , [ @@ -1976,7 +1983,7 @@ CTI_LOADOUT_O_Plane_Fighter_02_F_MNT_OPTIONS = [ [ "PylonMissile_Missile_AA_R77_x1" , "5000" ], [ "PylonMissile_Missile_AA_R73_x1" , "5000" ], - ["PylonMissile_Missile_KH58_INT_x1" , "10000" ] + ["PylonMissile_Missile_KH58_INT_x1" , "8000" ] ] ] ], @@ -1985,11 +1992,11 @@ CTI_LOADOUT_O_Plane_Fighter_02_F_MNT_OPTIONS = [ [ "PylonMissile_Missile_AA_R73_x1" , "5000" ], [ "PylonMissile_Missile_AA_R77_x1" , "5000" ], - ["PylonMissile_Missile_KH58_INT_x1" , "10000" ] - + ["PylonMissile_Missile_KH58_INT_x1" , "8000" ] + ] ] - ], + ], [ [ "CMFlareLauncher" , [ @@ -1997,7 +2004,7 @@ CTI_LOADOUT_O_Plane_Fighter_02_F_MNT_OPTIONS = [ "120Rnd_CMFlare_Chaff_Magazine" , "500" , [-1]], [ "168Rnd_CMFlare_Chaff_Magazine" , "3000" , [-1] ], [ "192Rnd_CMFlare_Chaff_Magazine" , "4000" , [-1] ] - + ] ] ] @@ -2032,9 +2039,9 @@ CTI_LOADOUT_O_Plane_Fighter_02_F_MNT_OPTIONS = [ "Pylons2" , [ [ "PylonMissile_Missile_AA_R77_x1" , "5000" ] - + ] - ] + ] ], [ [ "Pylons3" , @@ -2042,7 +2049,7 @@ CTI_LOADOUT_O_Plane_Fighter_02_F_MNT_OPTIONS = [ "PylonMissile_Missile_AA_R77_x1" , "5000" ] ] ] - ], + ], [ [ "PylonBayRight1" , [ @@ -2061,10 +2068,10 @@ CTI_LOADOUT_O_Plane_Fighter_02_F_MNT_OPTIONS = [ "PylonBayCenter1" , [ ["PylonMissile_Missile_AA_R77_INT_x1" , "5000" ] - + ] ] - ], + ], [ [ "PylonBayCenter3" , [ @@ -2078,7 +2085,7 @@ CTI_LOADOUT_O_Plane_Fighter_02_F_MNT_OPTIONS = ["PylonMissile_Missile_AA_R77_INT_x1" , "5000" ] ] ] - ], + ], [ [ "PylonBayLeft2" , [ @@ -2113,7 +2120,7 @@ CTI_LOADOUT_O_Plane_Fighter_02_F_MNT_OPTIONS = [ "PylonMissile_Missile_AA_R77_x1" , "5000" ] ] ] - ], + ], [ [ "CMFlareLauncher" , [ @@ -2121,7 +2128,7 @@ CTI_LOADOUT_O_Plane_Fighter_02_F_MNT_OPTIONS = [ "120Rnd_CMFlare_Chaff_Magazine" , "500" , [-1]], [ "168Rnd_CMFlare_Chaff_Magazine" , "3000" , [-1] ], [ "192Rnd_CMFlare_Chaff_Magazine" , "4000" , [-1] ] - + ] ] ] @@ -2158,9 +2165,9 @@ CTI_LOADOUT_O_Plane_Fighter_02_F_MNT_OPTIONS = [ [ "PylonMissile_Missile_AA_R77_x1" , "5000" ], [ "PylonMissile_Missile_AA_R73_x1" , "5000" ] - + ] - ] + ] ], [ [ "Pylons3" , @@ -2172,7 +2179,7 @@ CTI_LOADOUT_O_Plane_Fighter_02_F_MNT_OPTIONS = [ "PylonMissile_1Rnd_BombCluster_02_cap_F" , "1000" ] ] ] - ], + ], [ [ "PylonBayRight1" , [ @@ -2191,14 +2198,14 @@ CTI_LOADOUT_O_Plane_Fighter_02_F_MNT_OPTIONS = [ "PylonBayCenter1" , [ ["PylonMissile_Missile_AA_R77_INT_x1" , "5000" ] - + ] ] - ], + ], [ [ "PylonBayCenter3" , [ - ["PylonMissile_Missile_KH58_INT_x1" , "10000" ], + ["PylonMissile_Missile_KH58_INT_x1" , "8000" ], [ "PylonMissile_Bomb_KAB250_x1" , "6000" ], [ "PylonMissile_Missile_AA_R77_INT_x1" , "5000" ], [ "PylonMissile_Missile_AGM_KH25_INT_x1" , "5000" ], @@ -2212,7 +2219,7 @@ CTI_LOADOUT_O_Plane_Fighter_02_F_MNT_OPTIONS = ["PylonMissile_Missile_AA_R77_INT_x1" , "5000" ] ] ] - ], + ], [ [ "PylonBayLeft2" , [ @@ -2241,7 +2248,7 @@ CTI_LOADOUT_O_Plane_Fighter_02_F_MNT_OPTIONS = [ [ "Pylons5" , [ - ["PylonMissile_Missile_KH58_INT_x1" , "10000" ], + ["PylonMissile_Missile_KH58_INT_x1" , "8000" ], [ "PylonMissile_Missile_AA_R77_x1" , "5000" ], [ "PylonMissile_Missile_AA_R73_x1" , "5000" ] ] @@ -2250,12 +2257,12 @@ CTI_LOADOUT_O_Plane_Fighter_02_F_MNT_OPTIONS = [ [ "Pylons6" , [ - ["PylonMissile_Missile_KH58_INT_x1" , "10000" ], + ["PylonMissile_Missile_KH58_INT_x1" , "8000" ], [ "PylonMissile_Missile_AA_R73_x1" , "5000" ], - [ "PylonMissile_Missile_AA_R77_x1" , "5000" ] + [ "PylonMissile_Missile_AA_R77_x1" , "5000" ] ] ] - ], + ], [ [ "CMFlareLauncher" , [ @@ -2263,7 +2270,7 @@ CTI_LOADOUT_O_Plane_Fighter_02_F_MNT_OPTIONS = [ "120Rnd_CMFlare_Chaff_Magazine" , "500" , [-1]], [ "168Rnd_CMFlare_Chaff_Magazine" , "3000" , [-1] ], [ "192Rnd_CMFlare_Chaff_Magazine" , "4000" , [-1] ] - + ] ] ] @@ -2272,10 +2279,10 @@ CTI_LOADOUT_O_Plane_Fighter_02_F_MNT_OPTIONS = ]; // *************************** -// VTOL - Y-32 +// VTOL - Y-32 // *************************** CTI_LOADOUT_O_T_VTOL_02_infantry_dynamicLoadout_F_MNT_OPTIONS = -[ +[ [ "Pylon - configuration" , "pylon", @@ -2331,7 +2338,7 @@ CTI_LOADOUT_O_T_VTOL_02_infantry_dynamicLoadout_F_MNT_OPTIONS = [ "PylonMissile_1Rnd_Bomb_03_F" , "5000" , [-1]], [ "PylonMissile_1Rnd_BombCluster_02_cap_F" , "1000" , [-1]] ] - ] + ] ], [ [ "PylonRight2" , @@ -2372,7 +2379,7 @@ CTI_LOADOUT_O_T_VTOL_02_infantry_dynamicLoadout_F_MNT_OPTIONS = [ "120Rnd_CMFlare_Chaff_Magazine" , "500" , [-1]] , [ "168Rnd_CMFlare_Chaff_Magazine" , "3000" , [-1] ] , [ "192Rnd_CMFlare_Chaff_Magazine" , "4000" , [-1] ] - + ] ] ] @@ -2407,12 +2414,12 @@ CTI_LOADOUT_O_UAV_02_F_MNT_OPTIONS = ["Missile_AA_03_Plane_CAS_02_F" , [ [ "2Rnd_Missile_AA_03_F" , "8000"] - ] - ], + ] + ], ["missiles_ASRAAM" , [ [ "2Rnd_AAA_missiles" , "8000"] - ] + ] ] ], @@ -2455,7 +2462,7 @@ CTI_LOADOUT_O_UAV_02_CAS_F_MNT_OPTIONS = ["Mk82BombLauncher" , [ [ "2Rnd_Mk82" , "3000" ,[0]] - ] + ] ] ], @@ -2476,11 +2483,11 @@ CTI_LOADOUT_O_UAV_02_CAS_F_MNT_OPTIONS = // Plane - UAV Dynamic AT // *************************** CTI_LOADOUT_O_UAV_02_dynamicLoadout_F_MNT_OPTIONS = -[ +[ [ "Pylon - configuration" , "pylon", - [ + [ [ [ "Laserdesignator_mounted" , [ @@ -2488,7 +2495,7 @@ CTI_LOADOUT_O_UAV_02_dynamicLoadout_F_MNT_OPTIONS = ] ] ], - [ + [ ["Pylons1", [ [ "PylonRack_3Rnd_LG_scalpel" , "15000" , [0]], @@ -2501,7 +2508,7 @@ CTI_LOADOUT_O_UAV_02_dynamicLoadout_F_MNT_OPTIONS = ] ] ], - [ + [ ["Pylons2", [ [ "PylonRack_3Rnd_LG_scalpel" , "15000" , [0]], @@ -2533,7 +2540,7 @@ CTI_LOADOUT_O_UAV_02_dynamicLoadout_F_MNT_OPTIONS = // Heli - Kajman ( Camo ) // *************************** CTI_LOADOUT_O_Heli_Attack_02_dynamicLoadout_F_MNT_OPTIONS = -[ +[ [ "Pylon - configuration" , "pylon", @@ -2582,7 +2589,7 @@ CTI_LOADOUT_O_Heli_Attack_02_dynamicLoadout_F_MNT_OPTIONS = [ "PylonMissile_1Rnd_Bomb_03_F" , "5000" , [0]], [ "PylonMissile_1Rnd_BombCluster_02_F" , "1000" , [0]] ] - ] + ] ], [ [ "PylonRight2" , @@ -2622,7 +2629,7 @@ CTI_LOADOUT_O_Heli_Attack_02_dynamicLoadout_F_MNT_OPTIONS = [ "240Rnd_CMFlare_Chaff_Magazine" , "5000" , [-1]], [ "120Rnd_CMFlare_Chaff_Magazine" , "500" , [-1]], [ "168Rnd_CMFlare_Chaff_Magazine" , "3000" , [-1]], - [ "192Rnd_CMFlare_Chaff_Magazine" , "4000" , [-1]] + [ "192Rnd_CMFlare_Chaff_Magazine" , "4000" , [-1]] ] ] ] @@ -2673,9 +2680,9 @@ CTI_LOADOUT_O_Plane_CAS_02_dynamicLoadout_F_MNT_OPTIONS = [ "PylonRack_20Rnd_Rocket_03_AP_F" , "3000" ], [ "PylonRack_19Rnd_Rocket_Skyfire" , "3000" ], [ "PylonRack_1Rnd_Missile_AA_03_F" , "4000" ] - + ] - ] + ] ], [ [ "Pylons3" , @@ -2741,7 +2748,7 @@ CTI_LOADOUT_O_Plane_CAS_02_dynamicLoadout_F_MNT_OPTIONS = [ "PylonMissile_1Rnd_BombCluster_02_cap_F" , "1000" ] ] ] - ], + ], [ [ "Pylons7" , [ @@ -2793,17 +2800,17 @@ CTI_LOADOUT_O_Plane_CAS_02_dynamicLoadout_F_MNT_OPTIONS = [ [ "PylonRack_1Rnd_Missile_AA_03_F" , "4000" ], [ "PylonMissile_1Rnd_LG_scalpel" , "5000" ] - + ] ] - ], + ], [ [ "CMFlareLauncher" , [ [ "240Rnd_CMFlare_Chaff_Magazine" , "5000" , [-1] ], [ "120Rnd_CMFlare_Chaff_Magazine" , "500" , [-1]] , [ "168Rnd_CMFlare_Chaff_Magazine" , "3000" , [-1] ] , - [ "192Rnd_CMFlare_Chaff_Magazine" , "4000" , [-1] ] + [ "192Rnd_CMFlare_Chaff_Magazine" , "4000" , [-1] ] ] ] ] @@ -2833,7 +2840,7 @@ CTI_LOADOUT_I_Heli_light_03_unarmed_F_MNT_OPTIONS = CTI_LOADOUT_UNARMED_FLARES; // Helicopter - Hellcat (armed) TODO // *************************** /* -I_Heli_light_03_F = +I_Heli_light_03_F = [ [ "Pylon - configuration" , @@ -2858,7 +2865,7 @@ CTI_LOADOUT_I_Heli_light_03_dynamicLoadout_F_MNT_OPTIONS = [ "5000Rnd_762x51_Yellow_Belt" , "500" ] ] ] - ], + ], [ [ "Laserdesignator_mounted" , [ @@ -2965,7 +2972,7 @@ CTI_LOADOUT_I_Plane_Fighter_03_AA_F_MNT_OPTIONS = [ [ "2Rnd_AAA_missiles_MI06" , "8000" ] ] - ] + ] ], [ [ "CMFlareLauncher" , @@ -2974,7 +2981,7 @@ CTI_LOADOUT_I_Plane_Fighter_03_AA_F_MNT_OPTIONS = [ "120Rnd_CMFlare_Chaff_Magazine" , "500" , [-1]] , [ "168Rnd_CMFlare_Chaff_Magazine" , "3000" , [-1] ] , [ "192Rnd_CMFlare_Chaff_Magazine" , "4000" , [-1] ] - + ] ] ] @@ -3018,14 +3025,14 @@ CTI_LOADOUT_I_Plane_Fighter_03_CAS_F_MNT_OPTIONS = [ [ "2Rnd_AAA_missiles_MI06" , "8000" ] ] - ] - ], + ] + ], [ [ "GBU12BombLauncher_Plane_Fighter_03_F" , [ [ "2Rnd_GBU12_LGB_MI10" , "10000" ] ] - ] + ] ], [ [ "CMFlareLauncher" , @@ -3042,7 +3049,7 @@ CTI_LOADOUT_I_Plane_Fighter_03_CAS_F_MNT_OPTIONS = ]; // *************************** -// Plane - Buzzard (Dynamic) +// Plane - Buzzard (Dynamic) // *************************** CTI_LOADOUT_I_Plane_Fighter_03_dynamicLoadout_F_MNT_OPTIONS = [ @@ -3091,7 +3098,7 @@ CTI_LOADOUT_I_Plane_Fighter_03_dynamicLoadout_F_MNT_OPTIONS = [ "PylonRack_12Rnd_PG_missiles" , "8000" ], [ "PylonRack_12Rnd_missiles" , "2000" ] ] - ] + ] ], [ [ "Pylons3" , @@ -3154,7 +3161,7 @@ CTI_LOADOUT_I_Plane_Fighter_03_dynamicLoadout_F_MNT_OPTIONS = [ "PylonRack_12Rnd_missiles" , "2000" ] ] ] - ], + ], [ [ "Pylons7" , [ @@ -3168,7 +3175,7 @@ CTI_LOADOUT_I_Plane_Fighter_03_dynamicLoadout_F_MNT_OPTIONS = [ "PylonRack_12Rnd_missiles" , "2000" ] ] ] - ], + ], [ [ "CMFlareLauncher" , [ @@ -3176,7 +3183,7 @@ CTI_LOADOUT_I_Plane_Fighter_03_dynamicLoadout_F_MNT_OPTIONS = [ "120Rnd_CMFlare_Chaff_Magazine" , "500" , [-1]] , [ "168Rnd_CMFlare_Chaff_Magazine" , "3000" , [-1] ] , [ "192Rnd_CMFlare_Chaff_Magazine" , "4000" , [-1] ] - + ] ] ] @@ -3185,7 +3192,7 @@ CTI_LOADOUT_I_Plane_Fighter_03_dynamicLoadout_F_MNT_OPTIONS = ]; // *************************** -// Plane - A-149 Gryphon (Dynamic) +// Plane - A-149 Gryphon (Dynamic) // *************************** CTI_LOADOUT_I_Plane_Fighter_04_F_MNT_OPTIONS = [ @@ -3212,7 +3219,7 @@ CTI_LOADOUT_I_Plane_Fighter_04_F_MNT_OPTIONS = [ [ "PylonMissile_Missile_BIM9X_x1" , "4000" ], [ "PylonRack_Missile_AMRAAM_C_x1" , "4000" ] - + ] ] ], @@ -3222,7 +3229,7 @@ CTI_LOADOUT_I_Plane_Fighter_04_F_MNT_OPTIONS = [ "PylonMissile_Missile_BIM9X_x1" , "4000" ], [ "PylonRack_Missile_AMRAAM_C_x1" , "4000" ] ] - ] + ] ], [ [ "Pylon3" , @@ -3230,7 +3237,7 @@ CTI_LOADOUT_I_Plane_Fighter_04_F_MNT_OPTIONS = [ "PylonRack_Missile_AGM_02_x1" , "5000" ], [ "PylonRack_Missile_AMRAAM_C_x1" , "4000" ], [ "PylonMissile_Missile_BIM9X_x1" , "4000" ] - + ] @@ -3275,7 +3282,7 @@ CTI_LOADOUT_I_Plane_Fighter_04_F_MNT_OPTIONS = [ "PylonMissile_1Rnd_BombCluster_03_F" , "1000" ] ] ] - ], + ], [ [ "CMFlareLauncher" , [ @@ -3347,7 +3354,7 @@ CTI_ALM_AA_RESEARCHED_MAGAZINES = "PylonRack_1Rnd_Missile_AA_03_F" , "PylonMissile_1Rnd_Missile_AA_03_F" , "magazine_Missile_BIM9X_x1" , - "PylonMissile_Missile_BIM9X_x1" , + "PylonMissile_Missile_BIM9X_x1" , "PylonRack_Missile_BIM9X_x1" , "PylonRack_Missile_BIM9X_x2" , "magazine_Missile_AMRAAM_D_x1" , diff --git a/Addons/Strat_mode/AdvNet/AN_CheckConn.sqf b/Addons/Strat_mode/AdvNet/AN_CheckConn.sqf index d9b59886e..245eae3da 100644 --- a/Addons/Strat_mode/AdvNet/AN_CheckConn.sqf +++ b/Addons/Strat_mode/AdvNet/AN_CheckConn.sqf @@ -10,8 +10,16 @@ _vehicle getVariable "CTI_Net" private ["_vehicle","_side_id","_side","_forced","_connection","_max_distance","_up","_up_r"]; if (CTI_isServer) then {waituntil {CTI_Init_Server}}; _vehicle = _this; + + + if !(alive _vehicle) exitWith {false}; + + +//resistance town no need to run reconnect: +if ((_vehicle isKindOf "FlagPole_F") && (_vehicle getVariable ["cti_town_sideID",CTI_RESISTANCE_ID]) == CTI_RESISTANCE_ID) exitWith {true}; + _side_id=_vehicle getVariable ["CTI_Net",-11]; if (_side_id < 0 ) exitWith {false}; _side =(_side_id) call CTI_CO_FNC_GetSideFromID; @@ -25,6 +33,7 @@ _connection=_vehicle getVariable ["AN_Conn",objNull]; // disconnected if (isNull _connection ) exitWith {false}; + //dead if !(alive _connection ) exitWith {false}; diff --git a/Addons/Strat_mode/AdvNet/AN_Ex_Intrusion.sqf b/Addons/Strat_mode/AdvNet/AN_Ex_Intrusion.sqf index d98259b10..40a483730 100644 --- a/Addons/Strat_mode/AdvNet/AN_Ex_Intrusion.sqf +++ b/Addons/Strat_mode/AdvNet/AN_Ex_Intrusion.sqf @@ -6,7 +6,7 @@ AN_E_Intrusion_Loop={ _hackers=[]; diag_log format [":: HACK :: starting loop for %1", _vehicle]; while {(_vehicle getVariable ["AN_Hacked",0])>0 && alive _vehicle} do { - waitUntil {(_vehicle getvariable "CTI_NET") == (_vehicle getvariable "AN_iNET") &&( _vehicle getVariable ['AN_Hack_started',false])}; + waitUntil {(_vehicle getvariable ['CTI_NET',200]) == (_vehicle getvariable ['AN_iNET',300]) && ( _vehicle getVariable ['AN_Hack_started',false])}; _last_time=time; diag_log format [":: HACK :: loop for %1 at %2 ", _vehicle,_last_time]; {if (!alive _x || ! (vehicle _x == _vehicle)) then {_x setVariable ["CTI_NET",((side _x ) call CTI_CO_FNC_GetSideID),true];_hackers=_hackers-[_x];};true} count _hackers; diff --git a/Addons/Strat_mode/AdvNet/AN_Launch.sqf b/Addons/Strat_mode/AdvNet/AN_Launch.sqf index b8ce7ece5..a4cab10f9 100644 --- a/Addons/Strat_mode/AdvNet/AN_Launch.sqf +++ b/Addons/Strat_mode/AdvNet/AN_Launch.sqf @@ -1,5 +1,5 @@ private ["_vehicle","_side_id"]; -_vehicle = _this select 0; +_vehicle = vehicle (_this select 0); _side_id= _this select 1; if (NET_LOG) then {diag_log format [":: NET :: Trying to launch for %1 with sideid %2",_vehicle,_side_id]}; if ! (isNil {_vehicle getVariable "AN_iNet"}) exitWith {false}; @@ -8,7 +8,7 @@ if (isNil {_vehicle getVariable "CTI_Net"}) then {_vehicle setVariable ["CTI_Net if (isNil {_vehicle getVariable "AN_Conn"}) then {_vehicle setVariable ["AN_Conn",objNull,false];}; if (isNil {_vehicle getVariable "AN_iNet"}) then {_vehicle setVariable ["AN_iNet",-1,false];}; if (isNil {_vehicle getVariable "AN_Parrents"}) then {_vehicle setVariable ["AN_Parrents",[],false];}; -waitUntil {! (isNil {_vehicle getVariable "CTI_Net"} || isNil {_vehicle getVariable "AN_Conn"} || isNil {_vehicle getVariable "AN_iNet"} || isNil {_vehicle getVariable "CTI_Net"})}; +waitUntil {! (isNil {_vehicle getVariable "CTI_Net"} || isNil {_vehicle getVariable "AN_Conn"} || isNil {_vehicle getVariable "AN_iNet"} || isNil {_vehicle getVariable "AN_Parrents"})}; if (NET_LOG) then {diag_log format [":: NET :: Launching for %1 with sideid %2",_vehicle,_side_id]}; _vehicle spawn AN_Update_Connection; (_vehicle) spawn AN_Reconfigure_loop; \ No newline at end of file diff --git a/Addons/Strat_mode/AdvNet/AN_Reconfigure.sqf b/Addons/Strat_mode/AdvNet/AN_Reconfigure.sqf index 37ff7e60b..25784c4d8 100644 --- a/Addons/Strat_mode/AdvNet/AN_Reconfigure.sqf +++ b/Addons/Strat_mode/AdvNet/AN_Reconfigure.sqf @@ -55,36 +55,37 @@ if (_side in [east,west] ) then { _up_r=0; }; if (_vehicle isKindOf "Man") then {_max_distance=AN_Range_I+200*_up_r;} else {_max_distance=AN_Range_V+1000*_up_r;}; -if (_vehicle isKindOf "FlagPole_F") then {_max_distance=5000}; +if (_vehicle isKindOf "FlagPole_F") then {_max_distance=100000}; // Try to connect to closest CC if (_side in [east,west]) then { _structures = (_side) call CTI_CO_FNC_GetSideStructures; _ccs = [CTI_CONTROLCENTER, _structures] call CTI_CO_FNC_GetSideStructuresByType; - { if (_vehicle distance _x <= _max_distance) then {_candidates set [count _candidates,_x];}; true}count _ccs; + { if (_vehicle distance2D _x <= _max_distance) then {_candidates set [count _candidates,_x];}; true}count _ccs; }; // Try to connect to closest town -if (count _candidates == 0 || _vehicle isKindOf "FlagPole_F"&& (_side in [east,west])) then { +if (count _candidates == 0 ) then { { _town=_x; - if (!(isNull _town) && !(_town == _vehicle) && _vehicle distance _town <= _max_distance && (_town getVariable "AN_iNet" == _side_id )&& ! (_x getVariable "AN_Conn" == _vehicle) && {_x == _vehicle} count (_x getVariable ["AN_Parrents",[]]) == 0 ) then + if (!(isNull _town) && !(_town == _vehicle) && _vehicle distance2D _town <= _max_distance && (_town getVariable "AN_iNet" == _side_id )&& ! (_x getVariable "AN_Conn" == _vehicle) && {_x == _vehicle} count (_x getVariable ["AN_Parrents",[]]) == 0 ) then { _candidates set [count _candidates,_town]; }; - + true } count ( (_side_id) call CTI_CO_FNC_GetSideTowns); }; // try to connect to the HQ if ((count _candidates == 0) && _side in [east,west]) then { _hq = (_side) call CTI_CO_FNC_GetSideHQ; - if ((_vehicle distance _hq <= _max_distance) && alive _hq) then { _candidates set [count _candidates,_hq]}; + if ((_vehicle distance2D _hq <= _max_distance) && alive _hq) then { _candidates set [count _candidates,_hq]}; }; // try to connect to another connected vehicle if (!(_vehicle isKindOf "FlagPole_F")) then { { if (!(_x == _vehicle) && !(_x ==(_side) call CTI_CO_FNC_GetSideHQ) && alive _x && (_x getVariable "AN_iNet" == _side_id ) && ! (_x getVariable "AN_Conn" == _vehicle) && {_x == _vehicle} count (_x getVariable ["AN_Parrents",[]]) == 0 ) then {_candidates set [count _candidates,_x]}; + true } count vehicles; }; @@ -97,6 +98,7 @@ if ! (isNull _final) then { _vehicle setVariable ["AN_Conn",_final,_global]; }; _vehicle setVariable ["AN_Parrents",((_vehicle getVariable "AN_Conn") getVariable ["AN_Parrents",[]]) + [_vehicle],false]; + _vehicle setVariable ["AN_iNet",-1,true]; if (NET_LOG) then {diag_log format [":: NET :: Sucess in reconf %1 to %2 through %3",_vehicle,_final,((_vehicle getVariable "AN_Conn") getVariable ["AN_Parrents",[]]) ]}; } else { _vehicle setVariable ["AN_Conn",_final,_global]; diff --git a/Addons/Strat_mode/AdvNet/AN_Reconfigure_Loop.sqf b/Addons/Strat_mode/AdvNet/AN_Reconfigure_Loop.sqf index f4661abc0..245f9e5da 100644 --- a/Addons/Strat_mode/AdvNet/AN_Reconfigure_Loop.sqf +++ b/Addons/Strat_mode/AdvNet/AN_Reconfigure_Loop.sqf @@ -1,5 +1,5 @@ while {! CTI_GameOver && alive _this } do { - if (((! local _this) && _this isKindOf "Man") || !(isPlayer _this) && (_this in (playableUnits+switchableUnits)) || ((side _this) == resistance && _this isKindOf "Man") || !(alive _this)) exitwith {false}; - if !(_this call AN_Check_Connection) then { _this call AN_Reconfigure;}; + if (((! local _this) && _this isKindOf "Man") || !(isPlayer _this) && (_this in (playableUnits+switchableUnits)) || ((side _this) == resistance && _this isKindOf "Man") || !(alive _this)) exitwith {if (NET_LOG) then {diag_log format [":: NET :: Canceling reconfiguration process for %1",_this]};false}; + if (( _this getVariable ["CTI_NET",-1]) >= 0 && !(_this call AN_Check_Connection) ) then {if (NET_LOG) then {diag_log format [":: NET :: Trying to reconfigure %1 ",_this]};_this call AN_Reconfigure}; sleep 10+random(10); }; \ No newline at end of file diff --git a/Addons/Strat_mode/Camps/SM_CAMPS_Create_Camp.sqf b/Addons/Strat_mode/Camps/SM_CAMPS_Create_Camp.sqf new file mode 100644 index 000000000..86a3bdb94 --- /dev/null +++ b/Addons/Strat_mode/Camps/SM_CAMPS_Create_Camp.sqf @@ -0,0 +1,27 @@ +// spawn a given camp +// input [Config, position,rot] +// output [objects, building positions] + +_camp=_this select 0; +_position=_this select 1; +_rot=_this select 2; +_object=[]; +_b_positions=[]; + +_camp_objects="true" configClasses _camp; +{ + _o_class=getText (_x >> "vehicle"); + _o_offset=getArray (_x >>"position"); + _o_dir=getNumber (_x >>"dir")-_rot; + _o_offset=[(_o_offset select 0) * cos _rot - (_o_offset select 1) * sin _rot,(_o_offset select 0) * sin _rot + (_o_offset select 1) * cos _rot,(_o_offset select 2)]; + _o_pos=_position vectoradd _o_offset; + + _o=createvehicle [_o_class, _o_pos, [], 0, "CAN_COLLIDE"]; + _o setdir (_o_dir); + _o enablesimulationglobal false; + _object set [count _object,_o]; + //need to select more precisely what position can be used for static Launcher AI + _b_positions = _b_positions + ([_o,100] call BIS_fnc_buildingPositions); + +} forEach _camp_objects; +[_object,_b_positions] \ No newline at end of file diff --git a/Addons/Strat_mode/Camps/SM_CAMPS_Init.sqf b/Addons/Strat_mode/Camps/SM_CAMPS_Init.sqf new file mode 100644 index 000000000..150d0275f --- /dev/null +++ b/Addons/Strat_mode/Camps/SM_CAMPS_Init.sqf @@ -0,0 +1,73 @@ +#DEFINE NUMCAMPS 4 + + +SM__CAMPS_CREATE_CAMP=compileFinal preprocessFileLineNumbers "Addons\Strat_mode\Camps\SM_CAMPS_Create_Camp.sqf"; + + + +GUER_GROUPS_PATROL=[ + (configfile >> "CfgGroups" >> "Indep" >> "IND_F" >> "Infantry" >> "HAF_InfSentry"), + (configfile >> "CfgGroups" >> "Indep" >> "IND_F" >> "Infantry" >> "HAF_InfTeam"), + (configfile >> "CfgGroups" >> "Indep" >> "IND_F" >> "Infantry" >> "HAF_SniperTeam") + ]; +GUER_GROUPS_DEFEND=[ + (configfile >> "CfgGroups" >> "Indep" >> "IND_F" >> "Infantry" >> "HAF_InfTeam_AT"), + (configfile >> "CfgGroups" >> "Indep" >> "IND_F" >> "Infantry" >> "HAF_InfTeam_AA"), + (configfile >> "CfgGroups" >> "Indep" >> "IND_F" >> "Infantry" >> "HAF_InfSquad"), + (configfile >> "CfgGroups" >> "Indep" >> "IND_F" >> "Infantry" >> "HAF_InfSquad_Weapons") + ]; + + + + +/// +/// SERVER SIDE +/// + +CTI_SM_CAMPS=[]; + +//Wait map initialisation +waitUntil {CTI_EAST getVariable ["CTI_LOAD_COMPLETED",false]}; + +// Create Camps + +for "_i" from 0 to NUMCAMPS step 1 do +{ + _pos=[0,0,0]; + _gl=objNull; + _townstodef=[]; + // Find Position + + // Create game logic + CTI_SM_CAMPS pushBack(_gl); + + // Select towns to defend + + // select Type of Camp + _outposts = "true" configClasses (configfile >> "CfgGroups" >> "Empty" >> "Military" >> "Outposts"); + _type = (_possible select floor random (count _possible )); + + // Create Camps building + _buildings=[_type, _pos,random(360)] call SM__CAMPS_CREATE_CAMP; + // register variable + _gl setVariable ["CTI_SM_CAMP_TYPE", _type, false]; + _gl setVariable ["CTI_SM_CAMP_buildings", _buildings select 0, false]; + _gl setVariable ["CTI_SM_CAMP_Spositions", _buildings select 1, false]; + +}; + + + +// setup commander and groups + + +// Create Camps Statics + +// Launch Camp Loop + + +/// +/// Client Side SIDE +/// + +// Nothing client is blind to camp behavior \ No newline at end of file diff --git a/Addons/Strat_mode/FSM/town_markers.fsm b/Addons/Strat_mode/FSM/town_markers.fsm index de2732474..1d005cd9d 100644 --- a/Addons/Strat_mode/FSM/town_markers.fsm +++ b/Addons/Strat_mode/FSM/town_markers.fsm @@ -12,7 +12,7 @@ link2[] = {2,1}; link3[] = {2,4}; link4[] = {4,3}; globals[] = {0.000000,0,0,0,0,640,480,1,133,6316128,1,-422.283691,326.652069,345.310455,-698.696411,632,884,1}; -window[] = {2,-1,-1,-32000,-32000,794,182,1218,182,3,650}; +window[] = {2,-1,-1,-1,-1,846,234,1270,234,3,650}; *//*%FSM*/ class FSM { @@ -72,7 +72,7 @@ class FSM "" \n " }else {" \n " if (markerAlpha _marker_area != 0) then { _marker_area setMarkerAlphaLocal 0 };" \n - " if (markerAlpha _town_marker != 0) then { _town_marker setMarkerAlphaLocal 0 };" \n + " //if (markerAlpha _town_marker != 0) then { _town_marker setMarkerAlphaLocal 0 };" \n " };" \n "" \n "" \n @@ -85,8 +85,13 @@ class FSM " " \n " if (CTI_RESISTANCE_ID == _sideID) then {" \n " _marker_area setMarkerColorLocal ""ColorWhite"";" \n - " if (markerAlpha _mortar == 0) then { _mortar setMarkerAlphaLocal 1 };" \n - " if (markerAlpha _mortar_zone == 0) then { _mortar_zone setMarkerAlphaLocal 1 };" \n + " if (player distance _town <= CTI_TOWNS_OCCUPATION_DETECTION_RANGE) then {" \n + " if (markerAlpha _mortar == 0) then { _mortar setMarkerAlphaLocal 1 };" \n + " if (markerAlpha _mortar_zone == 0) then { _mortar_zone setMarkerAlphaLocal 1 };" \n + " } else { " \n + " if (markerAlpha _mortar != 0) then { _mortar setMarkerAlphaLocal 0 };" \n + " if (markerAlpha _mortar_zone != 0) then { _mortar_zone setMarkerAlphaLocal 0 };" \n + " };" \n " } else { " \n " if (markerAlpha _mortar != 0) then { _mortar setMarkerAlphaLocal 0 };" \n " if (markerAlpha _mortar_zone != 0) then { _mortar_zone setMarkerAlphaLocal 0 };" \n diff --git a/Addons/Strat_mode/FSM/town_occupation.fsm b/Addons/Strat_mode/FSM/town_occupation.fsm index a43091f59..95a7d0aea 100644 --- a/Addons/Strat_mode/FSM/town_occupation.fsm +++ b/Addons/Strat_mode/FSM/town_occupation.fsm @@ -2,8 +2,8 @@ /*%FSM*/ /* item0[] = {"Start_FSM",0,250,-100.000000,-800.000000,0.000000,-750.000000,0.000000,"Start FSM"}; -item1[] = {"Cycle",4,4314,-100.000000,-400.000000,0.000000,-350.000000,1.000000,"Cycle"}; -item2[] = {"Occupation_hold",2,250,-100.000000,-200.000000,0.000000,-150.000000,0.000000,"Occupation hold" \n "the town?"}; +item1[] = {"Cycle",4,218,-100.000000,-400.000000,0.000000,-350.000000,1.000000,"Cycle"}; +item2[] = {"Occupation_hold",2,4346,-100.000000,-200.000000,0.000000,-150.000000,0.000000,"Occupation hold" \n "the town?"}; item3[] = {"End_FSM",1,250,-250.000000,-100.000000,-150.000000,-50.000000,0.000000,"End FSM"}; item4[] = {"Held_by_Occupati",4,218,-100.000000,-100.000000,0.000000,-50.000000,2.000000,"Held by" \n "Occupation"}; item5[] = {"Gameover",8,218,-250.000000,-200.000000,-150.000000,-150.000000,0.000000,"Gameover"}; @@ -56,7 +56,7 @@ link27[] = {21,8}; link28[] = {22,1}; link29[] = {23,13}; globals[] = {0.000000,0,0,0,0,640,480,1,177,6316128,1,-582.603027,790.527588,465.883545,-1210.282837,725,885,1}; -window[] = {2,-1,-1,-1,-1,837,225,1261,225,3,743}; +window[] = {2,-1,-1,-1,-1,812,200,1236,200,3,743}; *//*%FSM*/ class FSM { @@ -103,7 +103,7 @@ class FSM { name = "Occupation_hold"; itemno = 2; - init = /*%FSM*/"_ncycle = time +2;" \n + init = /*%FSM*/"_ncycle = time +5;" \n "" \n "_sideID = _town getVariable ""cti_town_sideID"";" \n "_side = (_sideID) call CTI_CO_FNC_GetSideFromID;"/*%FSM*/; diff --git a/Addons/Strat_mode/FSM/town_resistance.fsm b/Addons/Strat_mode/FSM/town_resistance.fsm index a49aae617..ce60f12b6 100644 --- a/Addons/Strat_mode/FSM/town_resistance.fsm +++ b/Addons/Strat_mode/FSM/town_resistance.fsm @@ -2,7 +2,7 @@ /*%FSM*/ /* item0[] = {"Start_FSM",0,250,-86.275269,-615.525940,13.724731,-565.525940,0.000000,"Start FSM"}; -item1[] = {"Cycle",4,4314,-100.000000,-400.000000,0.000000,-350.000000,1.000000,"Cycle"}; +item1[] = {"Cycle",4,218,-100.000000,-400.000000,0.000000,-350.000000,1.000000,"Cycle"}; item2[] = {"Resistance_hold",2,250,-100.000000,-200.000000,0.000000,-150.000000,0.000000,"Resistance hold" \n "the town?"}; item3[] = {"End_FSM",1,250,-250.000000,-100.000000,-150.000000,-50.000000,0.000000,"End FSM"}; item4[] = {"Held_by_Resistan",4,218,-100.000000,-100.000000,0.000000,-50.000000,2.000000,"Held by" \n "Resistance"}; @@ -15,7 +15,7 @@ item10[] = {"Inactive",4,218,175.000000,-100.000000,275.000000,-50.000000,1.0000 item11[] = {"Still_active",8,218,300.000000,0.000000,400.000000,50.000000,0.000000,"Still active"}; item12[] = {"Timed_out",4,218,475.000000,100.000000,575.000000,150.000000,1.000000,"Timed out"}; item13[] = {"Skip",2,250,302.287354,-265.039612,402.287354,-215.039612,0.000000,"Skip"}; -item14[] = {"Cleanup",2,250,475.000000,-400.000000,575.000000,-350.000000,0.000000,"Cleanup"}; +item14[] = {"Cleanup",2,4346,475.000000,-400.000000,575.000000,-350.000000,0.000000,"Cleanup"}; item15[] = {"Resistance_Active",2,250,50.000000,-100.000000,150.000000,-50.000000,0.000000,"Resistance" \n "Active?"}; item16[] = {"Contact",8,218,-100.000000,100.000000,0.000000,150.000000,0.000000,"Contact"}; item17[] = {"Clear",4,218,50.000000,0.000000,150.000000,50.000000,1.000000,"Clear"}; @@ -55,8 +55,8 @@ link26[] = {20,18}; link27[] = {21,8}; link28[] = {22,1}; link29[] = {23,13}; -globals[] = {0.000000,0,0,0,0,640,480,1,173,6316128,1,-1091.492065,1056.436035,832.636719,-1191.768555,939,885,1}; -window[] = {2,-1,-1,-1,-1,712,100,1136,100,3,957}; +globals[] = {0.000000,0,0,0,0,640,480,1,173,6316128,1,-984.095642,949.039673,729.243164,-1090.662720,939,884,1}; +window[] = {2,-1,-1,-32000,-32000,794,182,1218,182,3,957}; *//*%FSM*/ class FSM { @@ -102,7 +102,7 @@ class FSM name = "Resistance_hold"; itemno = 2; init = /*%FSM*/"" \n - "_ncycle = time +2 ;" \n + "_ncycle = time +5 ;" \n "" \n "_sideID = _town getVariable ""cti_town_sideID"";"/*%FSM*/; precondition = /*%FSM*/""/*%FSM*/; @@ -304,15 +304,15 @@ class FSM " };" \n " } forEach _town_groups;" \n "" \n - "" \n "_town setVariable [""cti_town_resistance_active_vehicles"", [],true];" \n + "" \n "_mortars = _town getVariable ""cti_town_mortars_units"";" \n "//diag_log _mortars;" \n "if ((count _mortars) >0) then {" \n "" \n " {deleteVehicle _x} forEach units (_mortars select 1) ;" \n " {deleteVehicle _x} forEach (_mortars select 0) ; " \n - " deleteGroup (_mortars select 1);" \n + " deleteGroup (_mortars select 1);" \n "" \n "};" \n "" \n @@ -321,14 +321,18 @@ class FSM " if ((count _mines) >0) then {" \n " {deleteVehicle _x} forEach _mines;" \n " };" \n - "_town setVariable [""cti_town_mines"",[],true];" \n + " _town setVariable [""cti_town_mines"",[],true];" \n "};" \n "" \n "if ( (missionNamespace getVariable 'CTI_SM_TCAS') <= (_town getVariable ""cti_town_value"")) then {" \n " (_town getVariable [""CTI_CAS"",[]]) call SM_TCAS_CLEANUP;" \n "};" \n "" \n - "if ((_town getVariable ""cti_town_name"" == ""Makrynisi"") || (_town getVariable ""cti_town_name"" == ""Tuadua Island"") || (_town getVariable ""cti_town_name"" == ""Yani Islets"") || (_town getVariable ""cti_town_name"" == ""Ile Sainte-Marie"") || (_town getVariable ""cti_town_name"" == ""Northern Island"") || (_town getVariable ""cti_town_name"" == ""Rock Island"")) then {(_town getVariable [""CTI_Ship"",[]]) call SM_TShip_CLEANUP;};" \n + "if ((missionNamespace getVariable 'CTI_SM_SHIP')==1) then {" \n + " if (ISLAND == 2 || ISLAND == 3) then {" \n + " if ((_town getVariable ""cti_town_name"" == ""Makrynisi"") || (_town getVariable ""cti_town_name"" == ""Tuadua Island"") || (_town getVariable ""cti_town_name"" == ""Yani Islets"") || (_town getVariable ""cti_town_name"" == ""Ile Sainte-Marie"") || (_town getVariable ""cti_town_name"" == ""Northern Island"") || (_town getVariable ""cti_town_name"" == ""Rock Island"")) then {(_town getVariable [""CTI_Ship"",[]]) call SM_TShip_CLEANUP;};" \n + " };" \n + "};" \n "" \n "//_town setVariable [""cti_town_disactivate"",true];" \n "" \n @@ -410,23 +414,28 @@ class FSM "_town setVariable [""cti_town_resistance_active"", true,true];" \n "" \n "" \n - "if ( (missionNamespace getVariable 'CTI_SM_MORTARS')==1) then {" \n + "if ((missionNamespace getVariable 'CTI_SM_MORTARS')==1) then {" \n " _mortars=[_town,_town_groups] call CTI_SM_Mortars_script;" \n " [""CLIENT"", ""Client_Update_Mortars"",[_town,(_mortars select 2)]] call CTI_CO_FNC_NetSend;" \n " _town setVariable [""cti_town_mortars"",(_mortars select 2),true];" \n " _town setVariable [""cti_town_mortars_units"",(_mortars),true];" \n "};" \n + "" \n "_town setVariable [""cti_town_resistance_active"", true,true];" \n + "" \n "if ( (missionNamespace getVariable 'CTI_SM_TCAS') <= (_town getVariable ""cti_town_value"")) then {" \n " _town setVariable[""CTI_CAS"",(_town) call SM_TCAS_CREATE,true];" \n - "" \n "};" \n + "" \n "if ((missionNamespace getVariable 'CTI_SM_MINES')==1) then {" \n " [_town] call CTI_SM_Mines_script;" \n "};" \n "" \n - "if ((_town getVariable ""cti_town_name"" == ""Makrynisi"") || (_town getVariable ""cti_town_name"" == ""Tuadua Island"") || (_town getVariable ""cti_town_name"" == ""Yani Islets"") || (_town getVariable ""cti_town_name"" == ""Ile Sainte-Marie"") || (_town getVariable ""cti_town_name"" == ""Northern Island"") || (_town getVariable ""cti_town_name"" == ""Rock Island"")) then {_town setVariable [""CTI_Ship"",(_town) call SM_TShip_CREATE,true];};" \n - "" \n + "if ((missionNamespace getVariable 'CTI_SM_SHIP')==1) then {" \n + " if (ISLAND == 2 || ISLAND == 3) then {" \n + " if ((_town getVariable ""cti_town_name"" == ""Makrynisi"") || (_town getVariable ""cti_town_name"" == ""Tuadua Island"") || (_town getVariable ""cti_town_name"" == ""Yani Islets"") || (_town getVariable ""cti_town_name"" == ""Ile Sainte-Marie"") || (_town getVariable ""cti_town_name"" == ""Northern Island"") || (_town getVariable ""cti_town_name"" == ""Rock Island"")) then {_town setVariable [""CTI_Ship"",(_town) call SM_TShip_CREATE,true];};" \n + " };" \n + "};" \n "" \n "if ( _town in (CTI_WEST getvariable ""CTI_ACTIVE"")) then {" \n " [[""CLIENT"",west],""SM_message"",format [localize ""STR_TownActive"",(_town getVariable ""cti_town_name"")]] call CTI_CO_FNC_NetSend ;" \n diff --git a/Addons/Strat_mode/Functions/PERS_Load.sqf b/Addons/Strat_mode/Functions/PERS_Load.sqf index c6c6e89a0..b10497484 100644 --- a/Addons/Strat_mode/Functions/PERS_Load.sqf +++ b/Addons/Strat_mode/Functions/PERS_Load.sqf @@ -1,86 +1,89 @@ diag_log " :: SAVE :: Trying to load"; _towns = profileNamespace getVariable ["CTI_SAVE_TOWNS",[]]; -if (count _towns != count CTI_TOWNS) exitWith {diag_log " :: SAVE :: Loading fail";}; +if (count _towns == count CTI_TOWNS) then { -diag_log ":: SAVE :: Loading"; -{ _x setVariable ["cti_town_lastSideID", (_towns select _foreachindex) select 0, true];[_x, ((_towns select _foreachindex) select 1) call CTI_CO_FNC_GetSideFromID] call CTI_SE_FNC_OnTownCaptured;true }foreach (CTI_TOWNS); + diag_log ":: SAVE :: Loading"; + { _x setVariable ["cti_town_lastSideID", (_towns select _foreachindex) select 0, true];[_x, ((_towns select _foreachindex) select 1) call CTI_CO_FNC_GetSideFromID] call CTI_SE_FNC_OnTownCaptured;true }foreach (CTI_TOWNS); -{ - _side=_x; - _logic= (_side) call CTI_CO_FNC_GetSideLogic; - _load=profileNamespace getVariable format ["CTI_SAVE_%1", _side]; - - //hq - diag_log format [":: SAVE :: Setting up hq",(_load select 0 )]; - _hq=(_side) call CTI_CO_FNC_GetSideHQ; - _hq setposATL (((_load select 0 ) select 0)select 0); - _hq setdir (((_load select 0 ) select 0)select 1); - if !(((_load select 0 ) select 1)) then {_hq setDamage 1}; - - // com funds - diag_log format [":: SAVE :: Setting team funds",(_load select 1 )]; - _logic setvariable ["cti_commander_funds",(_load select 1 ),true]; - - // upgrades - diag_log format [":: SAVE :: Loading Upgrades",(_load select 2 )]; - _logic setVariable ["cti_upgrades", (_load select 2 ), true]; - - //base area - diag_log format [":: SAVE :: Loading Base areas",(_load select 3 )]; - _logic setVariable ["cti_structures_areas", (_load select 3 ), true]; - - //structures - {diag_log format [":: SAVE :: Loading %1",_x]; - sleep 0.2; - _build=[(_x select 0), _side,(_x select 1) select 0 ,(_x select 1) select 1 ] call CTI_SE_FNC_BuildStructure; - sleep 0.2; - _build setvariable ["cti_completion",100,true]; - sleep 0.2; - true - } count (_load select 4); - - //WIP structures - {diag_log format [":: SAVE :: Loading %1",_x]; _build=[(_x select 0), _side,(_x select 1) select 0 ,(_x select 1) select 1 ] call CTI_SE_FNC_BuildStructure;_build setvariable ["cti_completion",100,true];true} count (_load select 5); - - //defences - {diag_log format [":: SAVE :: Loading %1",_x]; [_x select 0, _side,(( _x select 1) select 0), (( _x select 1) select 1),objnull, false, _x select 2] call CTI_SE_FNC_BuildDefense;true} count (_load select 6); - - //curent upgrade - diag_log format [":: SAVE :: Loading upgrade %1",(_load select 7)]; - if (((_load select 7) select 0 ) > -1) then {_logic setvariable ["cti_upgrade_lt",((_load select 7) select 2 ),true]; [_side,((_load select 7) select 0 ), ((_load select 7) select 1 )] spawn CTI_SE_FNC_StartUpgrade; }; - - //bases found - diag_log format [":: SAVE :: Loading detected bases %1 for side %2",(_load select 10),_x]; - _logic setVariable ["CTI_BASES_FOUND",(_load select 10),true]; + { + _side=_x; + _logic= (_side) call CTI_CO_FNC_GetSideLogic; + _load=profileNamespace getVariable format ["CTI_SAVE_%1", _side]; -} forEach [east,west]; + //hq + diag_log format [":: SAVE :: Setting up hq",(_load select 0 )]; + _hq=(_side) call CTI_CO_FNC_GetSideHQ; + _hq setposATL (((_load select 0 ) select 0)select 0); + _hq setdir (((_load select 0 ) select 0)select 1); + if !(((_load select 0 ) select 1)) then {_hq setDamage 1}; + + // com funds + diag_log format [":: SAVE :: Setting team funds",(_load select 1 )]; + _logic setvariable ["cti_commander_funds",(_load select 1 ),true]; + + // upgrades + diag_log format [":: SAVE :: Loading Upgrades",(_load select 2 )]; + _logic setVariable ["cti_upgrades", (_load select 2 ), true]; + + //base area + diag_log format [":: SAVE :: Loading Base areas",(_load select 3 )]; + _logic setVariable ["cti_structures_areas", (_load select 3 ), true]; + + //structures + {diag_log format [":: SAVE :: Loading %1",_x]; + _build=[(_x select 0), _side,(_x select 1) select 0 ,(_x select 1) select 1 ] call CTI_SE_FNC_BuildStructure; + sleep 0.1; + _build setvariable ["cti_completion",100,true]; + true + } count (_load select 4); + + //WIP structures + {diag_log format [":: SAVE :: Loading %1",_x]; _build=[(_x select 0), _side,(_x select 1) select 0 ,(_x select 1) select 1 ] call CTI_SE_FNC_BuildStructure;_build setvariable ["cti_completion",100,true];true} count (_load select 5); + + //defences + {diag_log format [":: SAVE :: Loading %1",_x]; [_x select 0, _side,(( _x select 1) select 0), (( _x select 1) select 1),objnull, false, _x select 2] call CTI_SE_FNC_BuildDefense;true} count (_load select 6); -sleep 0.2; + //curent upgrade + diag_log format [":: SAVE :: Loading upgrade %1",(_load select 7)]; + if (((_load select 7) select 0 ) > -1) then {_logic setvariable ["cti_upgrade_lt",((_load select 7) select 2 ),true]; [_side,((_load select 7) select 0 ), ((_load select 7) select 1 )] spawn CTI_SE_FNC_StartUpgrade; }; -_loadwest = profileNamespace getVariable format ["CTI_SAVE_%1", west]; -_loadeast = profileNamespace getVariable format ["CTI_SAVE_%1", east]; + //bases found + diag_log format [":: SAVE :: Loading detected bases %1 for side %2",(_load select 10),_x]; + _logic setVariable ["CTI_BASES_FOUND",(_load select 10),true]; -//current time [H]Tom -diag_log format [":: SAVE :: Time",(_loadwest select 8)]; -_currenttime = round (daytime); -if (_currenttime > (_loadwest select 8)) then {skipTime ((24 - _currenttime) + (_loadwest select 8));}; -if (_currenttime < (_loadwest select 8)) then {skipTime ((_loadwest select 8) - _currenttime);}; + } forEach [east,west]; -sleep 0.2; -//team score west [H]Tom -diag_log format [":: SAVE :: TeamScoreWest",(_loadwest select 9)]; -west addScoreSide (_loadwest select 9); -//team score east [H]Tom -diag_log format [":: SAVE :: TeamScoreEast",(_loadeast select 9)]; -east addScoreSide (_loadeast select 9); + _loadwest = profileNamespace getVariable format ["CTI_SAVE_%1", west]; + _loadeast = profileNamespace getVariable format ["CTI_SAVE_%1", east]; -//Time Left [H]Tom -diag_log format [":: SAVE :: TimeLimit",(_loadwest select 11)]; -if (_loadwest select 11 > 0) then { - missionNamespace setVariable ["CTI_MAX_MISSION_TIME",((_loadwest select 11)/60),true]; + //current time [H]Tom + diag_log format [":: SAVE :: Time",(_loadwest select 8)]; + _currenttime = round (daytime); + if (_currenttime > (_loadwest select 8)) then {skipTime ((24 - _currenttime) + (_loadwest select 8));}; + if (_currenttime < (_loadwest select 8)) then {skipTime ((_loadwest select 8) - _currenttime);}; + + + + //team score west [H]Tom + diag_log format [":: SAVE :: TeamScoreWest",(_loadwest select 9)]; + west addScoreSide (_loadwest select 9); + + //team score east [H]Tom + diag_log format [":: SAVE :: TeamScoreEast",(_loadeast select 9)]; + east addScoreSide (_loadeast select 9); + + //Time Left [H]Tom + diag_log format [":: SAVE :: TimeLimit",(_loadwest select 11)]; + if (_loadwest select 11 > 0) then { + missionNamespace setVariable ["CTI_MAX_MISSION_TIME",((_loadwest select 11)/60),true]; + }; + +} else { + diag_log " :: SAVE :: Loading fail"; }; + { _side=_x; _logic= (_side) call CTI_CO_FNC_GetSideLogic; diff --git a/Addons/Strat_mode/Functions/PERS_save.sqf b/Addons/Strat_mode/Functions/PERS_save.sqf index 69cfd5b13..416aab43a 100644 --- a/Addons/Strat_mode/Functions/PERS_save.sqf +++ b/Addons/Strat_mode/Functions/PERS_save.sqf @@ -40,7 +40,7 @@ profileNamespace setVariable ["CTI_SAVE_TOWNS",_towns]; _teamscore = scoreSide _side; _save pushBack _teamscore; //save found bases [H]Tom - _bases_found = (_logic getVariable "CTI_BASES_FOUND"); + _bases_found = (_logic getVariable ["CTI_BASES_FOUND",[]]); _save pushBack _bases_found; //save Time Left [H]Tom _limit = (missionNamespace getVariable "CTI_MAX_MISSION_TIME"); diff --git a/Addons/Strat_mode/Functions/SM_3pRestrict.sqf b/Addons/Strat_mode/Functions/SM_3pRestrict.sqf index c966c39de..d4274dcdf 100644 --- a/Addons/Strat_mode/Functions/SM_3pRestrict.sqf +++ b/Addons/Strat_mode/Functions/SM_3pRestrict.sqf @@ -1,10 +1,10 @@ if (missionNamespace getVariable "CTI_GAMEPLAY_3P"==0) then { - ["3pr","onEachFrame", 'if (cameraView =="GROUP") then {(vehicle player) switchCamera "INTERNAL";};'] call BIS_fnc_addStackedEventHandler; + ["3pr","onEachFrame", {if (cameraView =="GROUP") then {(vehicle player) switchCamera "INTERNAL";};}] call BIS_fnc_addStackedEventHandler; }; if (missionNamespace getVariable "CTI_GAMEPLAY_3P"==1) then { - ["3pr","onEachFrame", 'if (!(cameraView in ["GUNNER","INTERNAL"]) && cameraOn == vehicle (player)&& (vehicle player) == player) then {(vehicle player) switchCamera "INTERNAL";};'] call BIS_fnc_addStackedEventHandler; + ["3pr","onEachFrame", {if (!(cameraView in ["GUNNER","INTERNAL"]) && cameraOn == vehicle (player)&& (vehicle player) == player) then {(vehicle player) switchCamera "INTERNAL";};}] call BIS_fnc_addStackedEventHandler; }; if (missionNamespace getVariable "CTI_GAMEPLAY_3P"==2) then { - ["3pr","onEachFrame",'if (!(cameraView in ["GUNNER","INTERNAL"]) && cameraOn == vehicle (player)) then {(vehicle player) switchCamera "INTERNAL";};' ] call BIS_fnc_addStackedEventHandler; + ["3pr","onEachFrame", {if (!(cameraView in ["GUNNER","INTERNAL"]) && cameraOn == vehicle (player)) then {(vehicle player) switchCamera "INTERNAL";};}] call BIS_fnc_addStackedEventHandler; }; diff --git a/Addons/Strat_mode/Functions/SM_AttachStatics.sqf b/Addons/Strat_mode/Functions/SM_AttachStatics.sqf index a22ba455c..2912969df 100644 --- a/Addons/Strat_mode/Functions/SM_AttachStatics.sqf +++ b/Addons/Strat_mode/Functions/SM_AttachStatics.sqf @@ -1,8 +1,8 @@ -STATICS_MG = ["I_HMG_01_high_F","I_GMG_01_high_F","O_HMG_01_high_F","O_GMG_01_high_F","B_HMG_01_high_F","B_GMG_01_high_F"]; -STATICS_LMG = ["I_HMG_01_F","I_GMG_01_F","O_HMG_01_F","O_GMG_01_F","B_HMG_01_F","B_GMG_01_F","B_T_GMG_01_F","B_T_HMG_01_F"]; +STATICS_MG = ["I_HMG_01_high_F","I_GMG_01_high_F","O_HMG_01_high_F","O_GMG_01_high_F","B_HMG_01_high_F","B_GMG_01_high_F","O_G_HMG_02_high_F","B_G_HMG_02_high_F"]; +STATICS_LMG = ["I_HMG_01_F","I_GMG_01_F","O_HMG_01_F","O_GMG_01_F","B_HMG_01_F","B_GMG_01_F","B_T_GMG_01_F","B_T_HMG_01_F","O_G_HMG_02_F","B_G_HMG_02_F"]; STATICS_L = ["I_static_AA_F","I_static_AT_F","O_static_AA_F","O_static_AT_F","B_static_AA_F","B_static_AT_F","B_T_Static_AA_F","B_T_Static_AT_F"]; STATICS_M = ["ReammoBox_F"]; -STATICS_NOTSTATICS = ["B_Slingload_01_Cargo_F","B_Slingload_01_Medevac_F","B_Slingload_01_Fuel_F","B_Slingload_01_Repair_F","B_Slingload_01_Ammo_F"]; +STATICS_NOTSTATICS = ["B_Slingload_01_Cargo_F","B_Slingload_01_Medevac_F","B_Slingload_01_Fuel_F","B_Slingload_01_Repair_F","B_Slingload_01_Ammo_F","Land_Pod_Heli_Transport_04_medevac_F","Land_Pod_Heli_Transport_04_covered_F","Land_Pod_Heli_Transport_04_bench_F","Land_Pod_Heli_Transport_04_repair_F","Land_Pod_Heli_Transport_04_fuel_F","Land_Pod_Heli_Transport_04_ammo_F","Land_Pod_Heli_Transport_04_medevac_black_F","Land_Pod_Heli_Transport_04_covered_black_F","Land_Pod_Heli_Transport_04_bench_black_F","Land_Pod_Heli_Transport_04_repair_black_F","Land_Pod_Heli_Transport_04_fuel_black_F","Land_Pod_Heli_Transport_04_ammo_black_F"]; STATICS_ALL=STATICS_MG + STATICS_LMG + STATICS_L + STATICS_M; STATIC_TRY=false; @@ -63,7 +63,7 @@ with missionNamespace do { }; CTI_PVF_Reply_load={ if (_this select 2) then { - CTI_P_ChatID commandChat format [localize "STR_ST_Load",typeof (_this select 1),_this select 0]; + CTI_P_ChatID commandChat format [localize "STR_ST_Load",getText (configfile >> "CfgVehicles" >> typeof (_this select 1) >> "displayName"),_this select 0]; (_this select 1) setdir (_this select 3); (_this select 1) addEventHandler ["GetOut", {(_this select 2) attachto [(_this select 0),[-3,-1,-0.65]]; detach (_this select 2);}]; (_this select 0) lock false; @@ -72,7 +72,7 @@ with missionNamespace do { (_this select 0) lockCargo [0,false]; STATIC_TRY=false; } else { - CTI_P_ChatID commandChat format [localize "STR_ST_Unload",typeof(_this select 1),_this select 0]; + CTI_P_ChatID commandChat format [localize "STR_ST_Unload",getText (configfile >> "CfgVehicles" >> typeof (_this select 1) >> "displayName"),_this select 0]; (_this select 0) lockCargo false; STATIC_TRY=false; }; diff --git a/Addons/Strat_mode/Functions/SM_BP_DetectLoop.sqf b/Addons/Strat_mode/Functions/SM_BP_DetectLoop.sqf index 19c486f7e..fdf258861 100644 --- a/Addons/Strat_mode/Functions/SM_BP_DetectLoop.sqf +++ b/Addons/Strat_mode/Functions/SM_BP_DetectLoop.sqf @@ -8,20 +8,23 @@ _enemy = switch (_side) do case east: {west }; }; _enemylogic= (_enemy) call CTI_CO_FNC_GetSideLogic; +_found=false; -while {!CTI_GameOver} do { + +while {!CTI_GameOver && ! _found} do { if (( _enemy countSide (((_base) nearEntities ["AllVehicles", (CTI_BASE_AREA_RANGE)]) unitsBelowHeight 40)) >0) then { - _ind = (_sidelogic getVariable "cti_structures_areas") find _base; - if (_ind>=0) exitWith { - _temp= +(_enemylogic getVariable ["CTI_BASES_FOUND",[]]); - _temp pushBackUnique _ind; - _enemylogic setVariable ["CTI_BASES_FOUND",_temp,true]; - _neigh_vect=( _sidelogic getVariable "CTI_BASES_NEIGH") select _ind; - [["CLIENT",_enemy], "Client_Base_Zone",[_side,_ind,_base]] call CTI_CO_FNC_NetSend; - { - [["CLIENT",_enemy], "Client_Connect",[_base,getPos _x,((_side) call CTI_CO_FNC_GetSideColoration),(CTI_BASE_AREA_RANGE)*2]] call CTI_CO_FNC_NetSend;true - } count _neigh_vect; - true }; + _ind = (_sidelogic getVariable "cti_structures_areas") find _base; + if (_ind>=0) then { + _temp= +(_enemylogic getVariable ["CTI_BASES_FOUND",[]]); + _temp pushBackUnique _ind; + _enemylogic setVariable ["CTI_BASES_FOUND",_temp,true]; + _neigh_vect=( _sidelogic getVariable "CTI_BASES_NEIGH") select _ind; + [["CLIENT",_enemy], "Client_Base_Zone",[_side,_ind,_base]] call CTI_CO_FNC_NetSend; + { + [["CLIENT",_enemy], "Client_Connect",[_base,getPos _x,((_side) call CTI_CO_FNC_GetSideColoration),(CTI_BASE_AREA_RANGE)*2]] call CTI_CO_FNC_NetSend;true + } count _neigh_vect; + _found=true; + }; }; sleep 5; }; diff --git a/Addons/Strat_mode/Functions/SM_BP_Hook.sqf b/Addons/Strat_mode/Functions/SM_BP_Hook.sqf index 39862fa79..048d87c77 100644 --- a/Addons/Strat_mode/Functions/SM_BP_Hook.sqf +++ b/Addons/Strat_mode/Functions/SM_BP_Hook.sqf @@ -1,13 +1,21 @@ private ["_side","_sidelogic","_count_bases","_bases"]; + + _side = _this ; _sidelogic= (_side) call CTI_CO_FNC_GetSideLogic; -_count_bases=0; +_index=-1; + + while {!CTI_GameOver} do { _bases = (_sidelogic getVariable "cti_structures_areas"); - if (count _bases > _count_bases) then { - if ( (missionNamespace getVariable 'CTI_SM_BASEP_M')!=0) then {[_bases select ((count _bases) -1),_side, ((count _bases) -1)] spawn SM_BP_Init}; - _count_bases= count _bases; - [["CLIENT",_side], "Client_Base_Zone",[_side,((count _bases) -1),_bases select ((count _bases) -1)]] call CTI_CO_FNC_NetSend; + if (_index < ((count _bases) -1) ) then { + _index = _index +1; + if ( (missionNamespace getVariable 'CTI_SM_BASEP_M')!=0) then + { + [_bases select _index,_side, _index] spawn SM_BP_Init; + }; + [["CLIENT",_side], "Client_Base_Zone",[_side,_index,_bases select _index]] call CTI_CO_FNC_NetSend; + }; sleep 1; }; diff --git a/Addons/Strat_mode/Functions/SM_CleanUp.sqf b/Addons/Strat_mode/Functions/SM_CleanUp.sqf index 4d138b5fd..d8174e889 100644 --- a/Addons/Strat_mode/Functions/SM_CleanUp.sqf +++ b/Addons/Strat_mode/Functions/SM_CleanUp.sqf @@ -51,6 +51,56 @@ SM_CLEAN_GCONT= { }; }; +//Clean all groups that are no longer tracked by the mission (e.g. kicked units from BIS_fnc_dynamicGroups) +SM_CLEAN_DG= { + private ["_side", "_logic", "_groups", "_check"]; + _check = { + params ["_side"]; + _logic=(_side) call CTI_CO_FNC_GetSideLogic; + _groups = allGroups select {side _x isEqualTo _side}; + { + //Exclude all town defenses, player groups, or workers + if( !(_x in (["GetAllGroups",[]] call BIS_fnc_dynamicGroups)) && + ("" == _x getVariable ["cti_server_group", ""]) && + ((_x getVariable ["cti_client_group", false]) isEqualTo true || "" == _x getVariable ["cti_role_evo", ""]) && + (_x != _logic getVariable ["cti_defensive_team", grpNull]) && + //((units _x) findIf {!isDamageAllowed _x} >= 0) && + ((units _x) findIf {_x in (_logic getVariable ["cti_workers", []])} == -1) && + ((units _x) findIf {unitIsUAV (vehicle _x)} == -1) + ) then { + //Start deletion process + [_x] spawn { + params ["_group"]; + _is_player_group = false; + //Scan over a period of time if the player is / was in the group before deleting it. + //When a player suicides the group is not in BIS_fnc_dynamicGroups se we have to check multiple times: + for [{private _i = 0}, {_i < 25}, {_i = _i + 1}] do { + sleep(10); + if(!(isNull _group) && _group in (["GetAllGroups",[]] call BIS_fnc_dynamicGroups)) then { + _is_player_group = true; + }; + if(_is_player_group isEqualTo true) exitwith {}; + }; + //Now we can assume that the no player is in that group: + if(!(isNull _group) && _is_player_group isEqualTo false) then { + //Empty the group and delete it + { deleteVehicle _x } forEach units _group; + deleteGroup _group; + }; + } + } + } forEach _groups; + }; + + while {! CTI_GameOver} do { + { + [_x] call _check; + } forEach [east,west]; + sleep 300; + }; +}; + + SM_CLEAN_STRUCTURES={ private ["_side","_side_logic","_new_structures"]; _side=_this; @@ -64,8 +114,14 @@ SM_CLEAN_STRUCTURES={ }; 0 spawn SM_CLEAN_REVIVES; -if (missionNamespace getVariable "CTI_AI_TEAMS_ENABLED" ==0)then { 0 spawn SM_CLEAN_GROUPS}; + +if (missionNamespace getVariable "CTI_AI_TEAMS_ENABLED" ==0)then { + 0 spawn SM_CLEAN_GROUPS; + 0 spawn SM_CLEAN_DG; +}; + 0 spawn SM_CLEAN_GCONT; + { _x spawn SM_CLEAN_STRUCTURES; } forEach [east,west]; \ No newline at end of file diff --git a/Addons/Strat_mode/Functions/SM_Connect.sqf b/Addons/Strat_mode/Functions/SM_Connect.sqf index 7e62081b1..019abdce9 100644 --- a/Addons/Strat_mode/Functions/SM_Connect.sqf +++ b/Addons/Strat_mode/Functions/SM_Connect.sqf @@ -21,7 +21,7 @@ _dir = atan ( _xdif / _ydif ); _name = format ["CM_%1_%2",floor(time),floor(random(1000))]; _type = "RECTANGLE"; -_l=if !(MADE_FOR_STRATIS) then {20} else {10}; +_l = if (ISLAND != 1) then {20} else {10}; _marker = CreateMarkerLocal [_name, _pos]; _marker setMarkerShapeLocal "RECTANGLE"; diff --git a/Addons/Strat_mode/Functions/SM_Draw_Map_Icons.sqf b/Addons/Strat_mode/Functions/SM_Draw_Map_Icons.sqf index 13cd8b716..846818cbc 100644 --- a/Addons/Strat_mode/Functions/SM_Draw_Map_Icons.sqf +++ b/Addons/Strat_mode/Functions/SM_Draw_Map_Icons.sqf @@ -6,4 +6,5 @@ _map=_this select 0; _x set [0 , objNull]; _x=_x-[objNull]; _map drawIcon _x ; +true }count (SHOWTOMAP select 1)+(SHOWTOMAP select 0); \ No newline at end of file diff --git a/Addons/Strat_mode/Functions/SM_Draw_Map_Lines.sqf b/Addons/Strat_mode/Functions/SM_Draw_Map_Lines.sqf index c35b801d9..ad9d5c87b 100644 --- a/Addons/Strat_mode/Functions/SM_Draw_Map_Lines.sqf +++ b/Addons/Strat_mode/Functions/SM_Draw_Map_Lines.sqf @@ -5,4 +5,5 @@ _map=_this select 0; _x set [0 , objNull]; _x=_x-[objNull]; _map drawLine _x ; +true }count (SHOWTOMAP select 2); \ No newline at end of file diff --git a/Addons/Strat_mode/Functions/SM_F_TownConnect.sqf b/Addons/Strat_mode/Functions/SM_F_TownConnect.sqf index fd7d3adaf..50c5cbf8f 100644 --- a/Addons/Strat_mode/Functions/SM_F_TownConnect.sqf +++ b/Addons/Strat_mode/Functions/SM_F_TownConnect.sqf @@ -1,18 +1,16 @@ -private ["_ct","_tv","_neigh","_towns","_new_neigh","_nt","_oneigh"]; -_ct= _this select 0; -_tv= _ct getVariable "cti_town_value"; -_neigh= _ct getVariable "CTI_Neigh"; +private ["_ct"]; -_towns=CTI_Towns; -_new_neigh = [_ct,_towns] call CTI_CO_FNC_SortByDistance; -_new_neigh= _new_neigh- [_ct]; +_ct= _this select 0; +_neigh =[]; { - _nt=_x; - _oneigh= _nt getVariable "CTI_Neigh"; - if ( (_nt getVariable "cti_town_value") <500 && _nt != _ct && {_x==_nt} count _neigh == 0 && ( count _neigh == 0 || _tv <150 && count _neigh < 1 || _tv >=150 && _tv <200 && count _neigh < 2|| _tv >=200 &&_tv <500 && count _neigh <= 2 &&(_nt distance _ct ) <5000)) then { - _neigh= _neigh + [_nt]; - _oneigh= _oneigh + [_ct]; - _ct setVariable ["CTI_Neigh",_neigh,True]; - _nt setVariable ["CTI_Neigh",_oneigh,True]; - }; -} forEach _new_neigh; \ No newline at end of file + if (_x in CTI_Towns) then { + _neigh pushBack _x; + }; +} forEach synchronizedObjects _ct; + + +if (count _neigh == 0 ) then { + _neigh pushBack ([_ct, CTI_Towns - [_ct]] call CTI_CO_FNC_GetClosestEntity); +}; + +_ct setVariable ["CTI_Neigh",_neigh,true] ; \ No newline at end of file diff --git a/Addons/Strat_mode/Functions/SM_F_TownDrawConnect.sqf b/Addons/Strat_mode/Functions/SM_F_TownDrawConnect.sqf index 41d13298f..6ccae3de1 100644 --- a/Addons/Strat_mode/Functions/SM_F_TownDrawConnect.sqf +++ b/Addons/Strat_mode/Functions/SM_F_TownDrawConnect.sqf @@ -8,9 +8,8 @@ if (!(CTI_P_SideJoined == resistance))then { _neigh= _ct getVariable "CTI_Neigh"; sleep 0.3; }; - _o=if !(MADE_FOR_STRATIS) then {500} else {0}; { - [getPos _ct,getPos _x,"ColorBlack",_o] call CTI_SM_Connect; + [getPos _ct,getPos _x,"ColorBlack",CTI_MARKERS_TOWN_AREA_RANGE*2] call CTI_SM_Connect; } forEach _neigh; } forEach CTI_Towns; }; \ No newline at end of file diff --git a/Addons/Strat_mode/Functions/SM_Map_Setup.sqf b/Addons/Strat_mode/Functions/SM_Map_Setup.sqf index 68c8ead9b..8e83442bb 100644 --- a/Addons/Strat_mode/Functions/SM_Map_Setup.sqf +++ b/Addons/Strat_mode/Functions/SM_Map_Setup.sqf @@ -1,25 +1,8 @@ private ["_neigh","_ot","_oneigh"]; waitUntil {CTI_InitTowns}; -{ - _x setVariable ["CTI_Neigh",[],true]; - waitUntil {!isNil {_x getVariable "CTI_Neigh"}}; -} forEach CTI_Towns; - { [_x] call CTI_SM_Connect_Towns; } forEach CTI_Towns; -{ - if !( isNil {_x getVariable "cti_town_fneigh"}) then { - _neigh= _x getVariable "CTI_Neigh"; - _ot=missionNamespace getVariable (_x getVariable "cti_town_fneigh"); - if !(isNil {_ot getVariable "CTI_Neigh"}) then { - - _oneigh=_ot getVariable "CTI_Neigh"; - _x setVariable ["CTI_Neigh",_neigh+[_ot],True]; - _ot setVariable ["CTI_Neigh",_oneigh+[_x],True]; - }; - }; -} forEach CTI_Towns; SM_MAP_READY=true; diff --git a/Addons/Strat_mode/Functions/SM_Map_Statics.sqf b/Addons/Strat_mode/Functions/SM_Map_Statics.sqf new file mode 100644 index 000000000..56b79753c --- /dev/null +++ b/Addons/Strat_mode/Functions/SM_Map_Statics.sqf @@ -0,0 +1,25 @@ +SM_ST_Create = compileFinal preprocessFileLineNumbers "Addons\Strat_mode\Functions\SM_Map_Statics_Create.sqf"; +SM_ST_Loop = compileFinal preprocessFileLineNumbers "Addons\Strat_mode\Functions\SM_Map_Statics_Loop.sqf"; + +_towns = []+CTI_Towns; + +_number = ceil ((count _towns)/6); + +SM_ST_PARAM=[["AT",_number],["AA",_number]]; + +SM_ST_Groups=[]; + + +{ + for "_i" from 0 to (_x select 1) step 1 do + { + _town = selectRandom _towns; + _towns= _towns - [_town]; + _g=[_x select 0 ,_town] call SM_ST_Create; + SM_ST_Groups pushBackUnique _g; + }; + true +} count SM_ST_PARAM; + + +0 spawn SM_ST_Loop; \ No newline at end of file diff --git a/Addons/Strat_mode/Functions/SM_Map_Statics_Create.sqf b/Addons/Strat_mode/Functions/SM_Map_Statics_Create.sqf new file mode 100644 index 000000000..c08ebbd46 --- /dev/null +++ b/Addons/Strat_mode/Functions/SM_Map_Statics_Create.sqf @@ -0,0 +1,74 @@ + +private ["_type","_town","_pos","_veh"]; + +_type= _this select 0; +_town= _this select 1; + +_group = createGroup resistance; +_group setVariable ["cti_server_group", str "GUER"]; + +switch (_type) do +{ + case "AA": + { + //Find location + _pos=[getpos _town,2000,800,150] call BIS_fnc_findOverwatch; + // Create vehicle + for "_i" from 0 to 0 step 1 do + { + _veh = ["I_Soldier_AA_F", _group, _pos, resistance, true] call CTI_CO_FNC_CreateUnit; + _veh setformdir (random(360)); + removeUniform _veh; + _veh forceAddUniform "U_I_GhillieSuit"; + _veh addWeapon "Laserdesignator_03"; + _veh disableAI "PATH"; + _veh disableAI "COVER"; + _veh disableAI "SUPPRESSION"; + _veh disableAI "AIMINGERROR"; + _veh setskill 0.8; + _veh setSkill ["spotDistance", 1]; + _veh setSkill ["spotTime", 1]; + + _veh setUnitPos "MIDDLE"; + + _veh setVariable ["cti_duty_place", _town, true]; + }; + + }; + + + case "AT": + { + //Find location + _pos=[getpos _town,2000,800,80] call BIS_fnc_findOverwatch; + // Create vehicle + for "_i" from 0 to 0 step 1 do + { + + _veh = ["I_Soldier_AT_F", _group, _pos, resistance, true] call CTI_CO_FNC_CreateUnit; + _veh setformdir (random(360)); + removeUniform _veh; + _veh forceAddUniform "U_I_GhillieSuit"; + _veh addWeapon "Laserdesignator_03"; + _veh disableAI "PATH"; + _veh disableAI "COVER"; + _veh disableAI "SUPPRESSION"; + _veh disableAI "AIMINGERROR"; + _veh setskill 0.8; + _veh setSkill ["spotDistance", 1]; + _veh setSkill ["spotTime", 1]; + + _veh setUnitPos "MIDDLE"; + _veh lookAt _town; + + _veh setVariable ["cti_duty_place", _town, true]; + }; + }; + + default + { + /* STATEMENT */ + }; +}; + +_group \ No newline at end of file diff --git a/Addons/Strat_mode/Functions/SM_Map_Statics_Loop.sqf b/Addons/Strat_mode/Functions/SM_Map_Statics_Loop.sqf new file mode 100644 index 000000000..238c8b861 --- /dev/null +++ b/Addons/Strat_mode/Functions/SM_Map_Statics_Loop.sqf @@ -0,0 +1,36 @@ +#define SENSIVITY 2 +#define MAX_RANGE 4000 + + + +while {!CTI_GameOver} do +{ + waitUntil {!isnil "SM_ST_Groups"}; + { + _x setformdir (random(360)); + _x setCombatMode "YELLOW"; + + //rearm + { + _x setAmmo [secondaryWeapon _x, 1000000]; + if ((typeOf _x )== "I_Soldier_AT_F" && count (backpackItems _x) ==0 ) then { + _x addItemToBackpack "Titan_AT"; + _x addItemToBackpack "Titan_AT"; + }; + if ((typeOf _x )== "I_Soldier_AA_F" && count (backpackItems _x) ==0 ) then { + _x addItemToBackpack "Titan_AA"; + _x addItemToBackpack "Titan_AA"; + }; + if ( {(_x select 2) in [east,west]} count(_x nearTargets 2500) == 0 ) then {_x selectWeapon "Laserdesignator_03";}; + _town = _x getVariable "cti_duty_place"; + if (((_town getVariable "cti_town_sideID") != CTI_RESISTANCE_ID) && !(_town getVariable "cti_town_resistance_active")) then {deleteVehicle _x;}; + true + } count (units _x); + + //set active + + true + }count SM_ST_Groups; + + sleep 30; +}; \ No newline at end of file diff --git a/Addons/Strat_mode/Functions/SM_Maps_Hook.sqf b/Addons/Strat_mode/Functions/SM_Maps_Hook.sqf index 0874367cc..902225feb 100644 --- a/Addons/Strat_mode/Functions/SM_Maps_Hook.sqf +++ b/Addons/Strat_mode/Functions/SM_Maps_Hook.sqf @@ -29,7 +29,7 @@ if (missionNamespace getVariable "CTI_EW_ANET" == 1) then { while {isNull _map2} do { _frames =[]; {_frames set [count _frames,_x select 0]; true} count (missionNameSpace getVariable ["BIS_stackedEventHandlers_onEachFrame", []]); - {if !(isNil {_x displayctrl 101}) then {_map2= _x displayctrl 101};} count (uiNamespace getVariable "IGUI_Displays"); + {if !(isNil {_x displayctrl 101}) then {_map2= _x displayctrl 101}; true} count (uiNamespace getVariable "IGUI_Displays"); sleep 0.1; }; _map2 ctrlAddEventHandler ["Draw", " diff --git a/Addons/Strat_mode/Functions/SM_Mortar.sqf b/Addons/Strat_mode/Functions/SM_Mortar.sqf index 802a10bda..dafddc44d 100644 --- a/Addons/Strat_mode/Functions/SM_Mortar.sqf +++ b/Addons/Strat_mode/Functions/SM_Mortar.sqf @@ -16,7 +16,7 @@ _maingrouploop={ _target=[]; _group=_this select 1; _town_groups=_this select 2; - _to_mortar=if !(MADE_FOR_STRATIS) then {120} else {60}; + _to_mortar=if (ISLAND != 1) then {120} else {60}; diag_log format [ ":: MORTAR :: Starting mortar from group %1 for town %2 linked to %3", _group,_town,_town_groups]; while {count(_group call CTI_CO_FNC_GetLiveUnits)>0 &&( _town getVariable "cti_town_sideID")==CTI_RESISTANCE_ID && (_town getVariable "cti_town_resistance_active")} do { @@ -53,7 +53,7 @@ _group= createGroup resistance; _pos= [_town,1000,1500] call CTI_CO_FNC_GetRandomPosition; _mp=[]; -_max_mortar=if !(MADE_FOR_STRATIS) then {3} else {1}; +_max_mortar=if (ISLAND != 1) then {3} else {1}; for "_x" from 1 to _max_mortar do { _pos2= [_pos,100,400] call CTI_CO_FNC_GetRandomPosition; diff --git a/Addons/Strat_mode/Functions/SM_RepairVehicule.sqf b/Addons/Strat_mode/Functions/SM_RepairVehicule.sqf index 16d8df982..8725f8fb4 100644 --- a/Addons/Strat_mode/Functions/SM_RepairVehicule.sqf +++ b/Addons/Strat_mode/Functions/SM_RepairVehicule.sqf @@ -116,11 +116,13 @@ SM_Force_entry={ _x action [ "eject", _target]; } forEach crew _target; - _target addAction [localize "STR_Action_Unlock","Client\Actions\Action_ToggleLock.sqf", [], 99, false, true, '', '_this != player && alive _target && locked _target == 2']; - _target addAction [localize "STR_Action_Lock","Client\Actions\Action_ToggleLock.sqf", [], 99, false, true, '', '_this != player && alive _target && locked _target == 0']; - _target setVariable ["v_keys",[getPlayerUID player,group player],true]; + if(! (unitIsUAV _target)) then { + _target addAction [localize "STR_Action_Unlock","Client\Actions\Action_ToggleLock.sqf", [], 99, false, true, '', '_this != player && alive _target && locked _target == 2']; + _target addAction [localize "STR_Action_Lock","Client\Actions\Action_ToggleLock.sqf", [], 99, false, true, '', '_this != player && alive _target && locked _target == 0']; + _target setVariable ["v_keys",[getPlayerUID player,group player],true]; + }; _target setVariable ["forced",true,true]; - + 0 call HUD_PBar_stop; CTI_P_Repairing = false ; diff --git a/Addons/Strat_mode/Functions/SM_RepairVehiculeRemote.sqf b/Addons/Strat_mode/Functions/SM_RepairVehiculeRemote.sqf index f80e667ff..2b05edd1c 100644 --- a/Addons/Strat_mode/Functions/SM_RepairVehiculeRemote.sqf +++ b/Addons/Strat_mode/Functions/SM_RepairVehiculeRemote.sqf @@ -7,20 +7,21 @@ _currentcallerdamage = getdammage _caller; _avgdamage = (getAllHitPointsDamage _target select 2) call BIS_fnc_arithmeticMean; _hitpointname = getallhitpointsdamage _target select 0; _hps = {_x != 0} count (getAllHitPointsDamage _target select 2); - _repvalue = 0.003; -if (_avgdamage <= 0.10) then {_repvalue = 0.03;}; -if (_avgdamage <= 0.25 && _avgdamage > 0.10) then {_repvalue = 0.01;}; -if (_avgdamage <= 0.50 && _avgdamage > 0.25) then {_repvalue = 0.005;}; while {alive _caller && alive _target && _hps > 0 && (_caller distance2d _target) <5 && (_caller distance _target) <7 && (_caller distance _pos)<=1 && (vehicle _caller) ==_caller && _currentdamage > ((getdammage _target) - 0.01) && _currentcallerdamage > ((getdammage _caller) - 0.02)} do { sleep 1; _avgdamage = (getAllHitPointsDamage _target select 2) call BIS_fnc_arithmeticMean; - + switch (true) do { + case (_avgdamage <= 0.10): {_repvalue = 0.03;}; + case (_avgdamage <= 0.25 && _avgdamage > 0.10): {_repvalue = 0.01;}; + case (_avgdamage <= 0.50 && _avgdamage > 0.25): {_repvalue = 0.005;}; + }; _hitpointdamage = getallhitpointsdamage _target select 2; + if (isNil "_hitpointdamage") then {diag_log format [":: ERROR :: Try repair %1, Alive: %2", typeOf _target, alive _target];}; for '_i' from 0 to count(_hitpointname)-1 do { if ((_hitpointdamage select _i) >= _repvalue) then { _target setHitIndex [_i, ((_hitpointdamage select _i) - _repvalue)]; diff --git a/Addons/Strat_mode/Functions/SM_Town_CAS.sqf b/Addons/Strat_mode/Functions/SM_Town_CAS.sqf index 8018b443c..99cc75542 100644 --- a/Addons/Strat_mode/Functions/SM_Town_CAS.sqf +++ b/Addons/Strat_mode/Functions/SM_Town_CAS.sqf @@ -15,7 +15,7 @@ SM_TCAS_MAINLOOP=compile ' _v=[_type, _pos, _dir, resistance, true, true, true, _fly] call CTI_CO_FNC_CreateVehicle; [_v,_group] call bis_fnc_spawncrew; - if !( isNil "ADMIN_ZEUS") then { ADMIN_ZEUS addCuratorEditableObjects [([_v]),true];}; + if !( isNil "ADMIN_ZEUS") then { ADMIN_ZEUS addCuratorAddons (configSourceAddonList (configFile >> "CfgVehicles" >> typeof _v)); ADMIN_ZEUS addCuratorEditableObjects [([_v]),true];}; if !( isNil "ADMIN_ZEUS") then { ADMIN_ZEUS addCuratorEditableObjects [(units _group),true];}; //_v flyInHeight 300; _AISkill = missionNamespace getVariable "CTI_AI_SKILL"; diff --git a/Addons/Strat_mode/Functions/SM_Town_Ship.sqf b/Addons/Strat_mode/Functions/SM_Town_Ship.sqf index 064fe1237..f696ffc69 100644 --- a/Addons/Strat_mode/Functions/SM_Town_Ship.sqf +++ b/Addons/Strat_mode/Functions/SM_Town_Ship.sqf @@ -9,7 +9,7 @@ SM_TShip_MAINLOOP=compile ' _dir=([_pos, _town] call CTI_CO_FNC_GetDirTo) + 90; _v=[_type, _pos, _dir, resistance, true, true, true, _form] call CTI_CO_FNC_CreateVehicle; [_v,_group] call bis_fnc_spawncrew; - if !( isNil "ADMIN_ZEUS") then { ADMIN_ZEUS addCuratorEditableObjects [([_v]),true];}; + if !( isNil "ADMIN_ZEUS") then { ADMIN_ZEUS addCuratorAddons (configSourceAddonList (configFile >> "CfgVehicles" >> typeof _v)); ADMIN_ZEUS addCuratorEditableObjects [([_v]),true];}; if !( isNil "ADMIN_ZEUS") then { ADMIN_ZEUS addCuratorEditableObjects [(units _group),true];}; _pos1=[[[_townpos, 500]],["ground"]] call BIS_fnc_randomPos; _AISkill = missionNamespace getVariable "CTI_AI_SKILL"; diff --git a/Addons/Strat_mode/Functions/TASKS_loop.sqf b/Addons/Strat_mode/Functions/TASKS_loop.sqf index eda7380c8..31022641c 100644 --- a/Addons/Strat_mode/Functions/TASKS_loop.sqf +++ b/Addons/Strat_mode/Functions/TASKS_loop.sqf @@ -13,13 +13,13 @@ CTI_TASK_TYPE_DEFEND=1; CTI_TASK_TYPE_BUILD=2; CTI_TASK_TYPE_EVACUATE=3; -//List of current task the player has -TASKS_LIST=[]; +//List of current task +_TASKS_LIST=[]; //other values used but the script -_side=CTI_P_SideJoined; -_logic= CTI_P_SideJoined call CTI_CO_FNC_GetSideLogic; -_sideID = CTI_P_SideJoined call CTI_CO_FNC_GetSideID; +_side=_this; +_logic= _side call CTI_CO_FNC_GetSideLogic; +_sideID = _side call CTI_CO_FNC_GetSideID; // main Loop waitUntil { (_logic getVariable ["CTI_LOAD_COMPLETED",false])}; @@ -36,33 +36,21 @@ while {!CTI_GAMEOVER} do { if ((_x select 0 )== CTI_TASK_TYPE_ATTACK ) then { _town=_x select 1 ; - if ((_town getVariable ["cti_town_sideID",-1] == _sideID) || ((_active_towns find _town) == -1 && (_logic getVariable ["CTI_PRIORITY",objNull]) != _town) ) then {_to_delete pushBackUnique _forEachIndex}; + if ( (_active_towns find _town) == -1 ) then {_to_delete pushBackUnique _forEachIndex}; }; - } foreach TASKS_LIST; + } foreach _TASKS_LIST; // CLEAN DEFENSE TASKS { if ((_x select 0 )== CTI_TASK_TYPE_DEFEND ) then { _town=_x select 1 ; - if ((_town getvariable ["cti_town_sideID",-1]) == _sideID && !((_town getvariable ["cti_town_occupation_active",false]) || (_town getvariable ["cti_town_resistance_active",false]) ) ) then {_to_delete pushBackUnique _forEachIndex}; + if ((_town getvariable ["cti_town_sideID",-1]) == _sideID && !(_town getvariable ["cti_town_occupation_active",false]) ) then {_to_delete pushBackUnique _forEachIndex}; }; - } foreach TASKS_LIST; + } foreach _TASKS_LIST; - // DO THE CLEANUP - - { - _task=TASKS_LIST select _x; - [(_task select 2), "CANCELED", false] call BIS_fnc_taskSetState; - [(_task select 2) ] call BIS_fnc_deleteTask; - true - } count _to_delete; - { - TASKS_LIST deleteAt _x; - true - } count _to_delete; //***************************************************************** //********************** TASK CREATION **************************** @@ -72,11 +60,11 @@ while {!CTI_GAMEOVER} do { _town=_x; - if ((TASKS_LIST findif {(_x select 0) == CTI_TASK_TYPE_ATTACK && (_x select 1) == _town}) == -1) then { - _taskname=format ["A_%1_%2",ceil(random(100000)),ceil(time)]; - TASKS_LIST pushBack [CTI_TASK_TYPE_ATTACK,_town,_taskname]; + if ((_TASKS_LIST findif {(_x select 0) == CTI_TASK_TYPE_ATTACK && (_x select 1) == _town}) == -1) then { + _taskname=format ["A_%1_%2_%3",_side,ceil(random(100000)),ceil(time)]; _tasktext=format ["Attack %1",_town getvariable ["cti_town_name",""]]; - [player, _taskname, [_tasktext,_tasktext,""], _town, "CREATED", 1, true, "attack", true] call BIS_fnc_taskCreate; + waitUntil {_taskname==[_side, _taskname, [_tasktext,_tasktext,""], _town, "CREATED", 1, true, "attack", true] call BIS_fnc_taskCreate}; + if ([_taskname] call BIS_fnc_taskExists) then {_TASKS_LIST pushBack [CTI_TASK_TYPE_ATTACK,_town,_taskname];}; }; true } count _active_towns; @@ -99,17 +87,34 @@ while {!CTI_GAMEOVER} do // DEFEND TASKS { _town=_x; - if ((_town getvariable ["cti_town_sideID",-1]) == _sideID && ((_town getvariable ["cti_town_occupation_active",false]) || (_town getvariable ["cti_town_resistance_active",false]) ) ) then { - if ((TASKS_LIST findif {(_x select 0) == CTI_TASK_TYPE_DEFEND && (_x select 1) == _town}) == -1) then { - _taskname=format ["D_%1_%2",ceil(random(100000)),ceil(time)]; - TASKS_LIST pushBack [CTI_TASK_TYPE_DEFEND,_town,_taskname]; + if ((_town getvariable ["cti_town_sideID",-1]) == _sideID && (_town getvariable ["cti_town_occupation_active",false]) ) then { + if ((_TASKS_LIST findif {(_x select 0) == CTI_TASK_TYPE_DEFEND && (_x select 1) == _town}) == -1) then { + _taskname=format ["D_%1_%2_%3",_side,ceil(random(100000)),ceil(time)]; _tasktext=format ["Defend %1",_town getvariable ["cti_town_name",""]]; - [player, _taskname, [_tasktext,_tasktext,""], _town, "CREATED", 1, true, "defend", true] call BIS_fnc_taskCreate; + waitUntil {_taskname==[_side, _taskname, [_tasktext,_tasktext,""], _town, "CREATED", 1, true, "defend", true] call BIS_fnc_taskCreate}; + if ([_taskname] call BIS_fnc_taskExists) then {_TASKS_LIST pushBack [CTI_TASK_TYPE_DEFEND,_town,_taskname];}; + }; }; true } count (_logic getVariable ["CTI_TOWNS",[]]); + + // DO THE CLEANUP + + { + _task=_TASKS_LIST select _x; + [(_task select 2), "CANCELED"] call BIS_fnc_taskSetState; + sleep 0.5; + waitUntil {[(_task select 2) ] call BIS_fnc_deleteTask}; + true + } count _to_delete; + { + if !([_TASKS_LIST select _x select 2] call BIS_fnc_taskExists) then {_TASKS_LIST deleteAt _x}; + true + } count _to_delete; + + //wait some time sleep 3; }; \ No newline at end of file diff --git a/Addons/Strat_mode/Functions/TR_proj_handler.sqf b/Addons/Strat_mode/Functions/TR_proj_handler.sqf index dcbe57462..8687320e5 100644 --- a/Addons/Strat_mode/Functions/TR_proj_handler.sqf +++ b/Addons/Strat_mode/Functions/TR_proj_handler.sqf @@ -40,8 +40,5 @@ _b='ProtectionZone_Invisible_F' createVehicleLocal (getpos _veh); _b setPos (getPos _veh); _veh setVariable [_side_tr,((_veh getVariable _side_tr) - 1),true]; _veh setVariable [_side_time,time,true]; -if(_veh == vehicle player) then { - ["trophy","playSound",_veh, false,false] call BIS_fnc_MP; -}; waitUntil {isNull _proj}; deleteVehicle _b; \ No newline at end of file diff --git a/Addons/Strat_mode/Functions/UAV_Fix_Crew.sqf b/Addons/Strat_mode/Functions/UAV_Fix_Crew.sqf new file mode 100644 index 000000000..01cd588b1 --- /dev/null +++ b/Addons/Strat_mode/Functions/UAV_Fix_Crew.sqf @@ -0,0 +1,29 @@ +/* + # HEADER # + Script: Addons\Strat_mode\Functions\UAV_Fix_Crew.sqf + Alias: UAV_FIX_CREW + Description: Replaces the crew of a vehicle to resolve issue with AI getting stuck, + or behaving weirdly. Will disconnect the player in the process + Author: Yoshi_E + Creation Date: 16-08-2019 + Revision Date: 05-09-2019 + + + # EXAMPLE # + [_drone, player] spawn UAV_FIX_CREW; + +*/ +params ["_target", "_caller"]; +//(group _target) setGroupOwner (owner _caller); //make local +player connectTerminalToUAV objNull; +sleep 1; +{_target deleteVehicleCrew _x} forEach crew _target; +createVehicleCrew _target; +//This might help with AI target behaviour. +sleep 1; +{ _x disableAI "TARGET"} forEach crew _target; +sleep 1; +{ _x enableAI "TARGET"} forEach crew _target; +hint "Crew has been replaced"; + + diff --git a/Addons/Strat_mode/Functions/UAV_Fuel.sqf b/Addons/Strat_mode/Functions/UAV_Fuel.sqf index 9a33c2bc7..03163f5b4 100644 --- a/Addons/Strat_mode/Functions/UAV_Fuel.sqf +++ b/Addons/Strat_mode/Functions/UAV_Fuel.sqf @@ -8,7 +8,8 @@ private ["_uav","_last_fuel","_newfuel"]; _uav=_this; _last_fuel=fuel _uav; -while {!CTI_GameOver && alive _uav} do { + +while {!CTI_GameOver && alive _uav && _uav isKindOf "Air"} do { if (local _uav) then { if (fuel _uav <0.05) then {_uav setDammage 1}; if (fuel _uav < _last_fuel) then { diff --git a/Addons/Strat_mode/Functions/UAV_FuelDeath.sqf b/Addons/Strat_mode/Functions/UAV_FuelDeath.sqf new file mode 100644 index 000000000..93a9a3c5d --- /dev/null +++ b/Addons/Strat_mode/Functions/UAV_FuelDeath.sqf @@ -0,0 +1,12 @@ +//Destroys the vehicle if out of fuel (used for Drones) + +private ["_uav"]; + +_uav=_this; + +while {!CTI_GameOver && alive _uav && _uav isKindOf "Air"} do { + if (local _uav) then { + if (fuel _uav <0.05) then {_uav setDammage 1}; + }; + sleep 60; +}; diff --git a/Addons/Strat_mode/Functions/UAV_Range.sqf b/Addons/Strat_mode/Functions/UAV_Range.sqf index f71e3a2ec..948280705 100644 --- a/Addons/Strat_mode/Functions/UAV_Range.sqf +++ b/Addons/Strat_mode/Functions/UAV_Range.sqf @@ -1,5 +1,5 @@ -if !((getConnectedUAV player) isKindOf "O_UAV_01_F" || (getConnectedUAV player) isKindOf "B_UAV_01_F" || (getConnectedUAV player) isKindOf "O_UAV_02_dynamicLoadout_F" || (getConnectedUAV player) isKindOf "O_UAV_02_CAS_F" || (getConnectedUAV player) isKindOf "O_UAV_02_dynamicLoadout_F" || (getConnectedUAV player) isKindOf "B_UAV_02_F" || (getConnectedUAV player) isKindOf "B_UAV_02_dynamicLoadout_F" || (getConnectedUAV player) isKindOf "B_UAV_02_dynamicLoadout_F" || (getConnectedUAV player) isKindOf "B_UAV_06_medical_F" || (getConnectedUAV player) isKindOf "B_UAV_06_F" || (getConnectedUAV player) isKindOf "O_UAV_06_medical_F" || (getConnectedUAV player) isKindOf "O_UAV_06_F") exitWith {}; -if ((getConnectedUAV player) isKindOf "O_UAV_01_F" || (getConnectedUAV player) isKindOf "B_UAV_01_F" || (getConnectedUAV player) isKindOf "B_UAV_06_medical_F" || (getConnectedUAV player) isKindOf "B_UAV_06_F" || (getConnectedUAV player) isKindOf "O_UAV_06_medical_F" || (getConnectedUAV player) isKindOf "O_UAV_06_F") exitWith { +if !((getConnectedUAV player) isKindOf "UAV_01_base_F" || (getConnectedUAV player) isKindOf "O_UAV_02_dynamicLoadout_F" || (getConnectedUAV player) isKindOf "O_UAV_02_CAS_F" || (getConnectedUAV player) isKindOf "O_UAV_02_dynamicLoadout_F" || (getConnectedUAV player) isKindOf "B_UAV_02_F" || (getConnectedUAV player) isKindOf "B_UAV_02_dynamicLoadout_F" || (getConnectedUAV player) isKindOf "B_UAV_02_dynamicLoadout_F" || (getConnectedUAV player) isKindOf "UAV_06_base_F" || (getConnectedUAV player) isKindOf "UGV_02_Base_F") exitWith {}; +if ((getConnectedUAV player) isKindOf "UAV_01_base_F" || (getConnectedUAV player) isKindOf "UAV_06_base_F" || (getConnectedUAV player) isKindOf "UGV_02_Base_F") exitWith { if (([player,(getConnectedUAV player)] call BIS_fnc_distance2D) > (missionNamespace getVariable "CTI_GAMEPLAY_DARTER")) exitWith { player connectTerminalToUAV objNull; hintSilent parseText format [localize "STR_UAV_Range",(missionNamespace getVariable "CTI_GAMEPLAY_DARTER")]; diff --git a/Addons/Strat_mode/Functions/WEATHER_HOOK.sqf b/Addons/Strat_mode/Functions/WEATHER_HOOK.sqf index 0659864cc..1b181a95a 100644 --- a/Addons/Strat_mode/Functions/WEATHER_HOOK.sqf +++ b/Addons/Strat_mode/Functions/WEATHER_HOOK.sqf @@ -16,7 +16,7 @@ if (daytime >= 8 && daytime <= 16) then { _c = selectRandom [_a, _a, _b]; _nexttime setfog _c; }; -_nextover=random 1; +_nextover=random [1,0,1]; if (CTI_WEATHER_ALLOWRAIN == 0) then {_nexttime setRain 0;} else { if (_nextover > 0.7) then {_nexttime setRain random(_nextover);} else {_nexttime setRain 0;}; }; diff --git a/Addons/Strat_mode/HUD/HUD_GetRevive.sqf b/Addons/Strat_mode/HUD/HUD_GetRevive.sqf index 157648b7b..a72cdf49d 100644 --- a/Addons/Strat_mode/HUD/HUD_GetRevive.sqf +++ b/Addons/Strat_mode/HUD/HUD_GetRevive.sqf @@ -9,5 +9,6 @@ _ob= player nearEntities ["Man",150]; _scale = 1*(1-(_dis/150)*0.7); _rev set[count _rev,[_x,_fade,_scale]]; }; +true } count _ob; _rev \ No newline at end of file diff --git a/Addons/Strat_mode/HUD/HUD_GetTargets.sqf b/Addons/Strat_mode/HUD/HUD_GetTargets.sqf index d4280f225..20c630fe6 100644 --- a/Addons/Strat_mode/HUD/HUD_GetTargets.sqf +++ b/Addons/Strat_mode/HUD/HUD_GetTargets.sqf @@ -12,6 +12,7 @@ _a_targs= player nearTargets (HUD_MAX_RANGE); if ((_x select 4) isKindOf "Air") then {_targs pushBack _x;}; if ((_x select 4) isKindOf "Ship") then {_targs pushBack _x;}; }; + true } count _a_targs; diff --git a/Addons/Strat_mode/HUD/HUD_GetTowns.sqf b/Addons/Strat_mode/HUD/HUD_GetTowns.sqf index 3125a9d64..1e45f92a4 100644 --- a/Addons/Strat_mode/HUD/HUD_GetTowns.sqf +++ b/Addons/Strat_mode/HUD/HUD_GetTowns.sqf @@ -28,7 +28,7 @@ _vt=_vt+[[_town,_text,_color,_fade]]; }; - + true }count CTI_Towns; _vt \ No newline at end of file diff --git a/Addons/Strat_mode/HUD/HUD_ShowNotifications.sqf b/Addons/Strat_mode/HUD/HUD_ShowNotifications.sqf index 9e8da5204..273179498 100644 --- a/Addons/Strat_mode/HUD/HUD_ShowNotifications.sqf +++ b/Addons/Strat_mode/HUD/HUD_ShowNotifications.sqf @@ -36,6 +36,7 @@ if (time- (_reverse select 0 select 3) < 7 || !isNil {uiNamespace getVariable [' //_text=_text + format [" (+) ",if (((_x select 1) - time)>3) then {"ff"} else {(99 min ((floor (((_x select 1) - time)*100/4)) max 10))},_x select 2]+ (_x select 0) + "
"; _text=_text +format ["(+) %2
",_x select 2,(_x select 0)]; + true } count _reverse; } else { (_hud displayCtrl (HUD_IDC+7)) ctrlShow false; diff --git a/Addons/Strat_mode/HUD/HUD_ShowRevive.sqf b/Addons/Strat_mode/HUD/HUD_ShowRevive.sqf index 6c10c0669..e8acb244f 100644 --- a/Addons/Strat_mode/HUD/HUD_ShowRevive.sqf +++ b/Addons/Strat_mode/HUD/HUD_ShowRevive.sqf @@ -6,4 +6,5 @@ _fade=_x select 1; _size=_x select 2; drawIcon3D ['A3\ui_f\data\IGUI\Cfg\Actions\heal_ca.paa', [1,0,0,_fade], _pos , _size, _size, 0,"", 0, 0, "PuristaMedium"]; +true } count HUD_Revives; \ No newline at end of file diff --git a/Addons/Strat_mode/HUD/HUD_UpdateInfo.sqf b/Addons/Strat_mode/HUD/HUD_UpdateInfo.sqf index 98d8fbaf3..93a396831 100644 --- a/Addons/Strat_mode/HUD/HUD_UpdateInfo.sqf +++ b/Addons/Strat_mode/HUD/HUD_UpdateInfo.sqf @@ -10,7 +10,7 @@ if (!(profileNamespace getVariable ["HUD_Normal",true]) ||visiblemap) exitWith { _basic ctrlShow true; // capture _town=((player) call CTI_CO_FNC_GetClosestTown); -if ( player distance _town < CTI_MARKERS_TOWN_AREA_RANGE) then { +if ( player distance _town < CTI_MARKERS_TOWN_AREA_RANGE && (!visibleMap )) then { _pro ctrlShow true; _pb=((_town getVariable "cti_town_capture")) / CTI_TOWNS_CAPTURE_VALUE_CEIL ; if ((_town getVariable ["cti_town_occupation_active",true]) || (_town getVariable ["cti_town_resistance_active",true])) then diff --git a/Addons/Strat_mode/HUD/HUD_init.sqf b/Addons/Strat_mode/HUD/HUD_init.sqf index 0da87d2db..a2c8a1901 100644 --- a/Addons/Strat_mode/HUD/HUD_init.sqf +++ b/Addons/Strat_mode/HUD/HUD_init.sqf @@ -82,6 +82,7 @@ with missionNamespace do { { _o= _x; (group player) reveal [_o,(missionNamespace getVariable "CTI_EW_HUD_S")]; + true } count _this; }; }; \ No newline at end of file diff --git a/Addons/Strat_mode/Old_Com_Eject/Events_UI_combl.sqf b/Addons/Strat_mode/Old_Com_Eject/Events_UI_combl.sqf new file mode 100644 index 000000000..8fc96b131 --- /dev/null +++ b/Addons/Strat_mode/Old_Com_Eject/Events_UI_combl.sqf @@ -0,0 +1,49 @@ +private ["_action"]; +_action = _this select 0; + +switch (_action) do { + case "onLoad": { + _players= allPlayers- entities "HeadlessClient_F"; + uiNamespace setVariable ["cti_dialog_ui_comblacklist_players", _players]; + uiNamespace setVariable ["cti_dialog_ui_comblacklist_uuid", nil]; + lbClear ((uiNamespace getVariable "cti_dialog_ui_comblacklist") displayCtrl 999001) ; + { + ((uiNamespace getVariable "cti_dialog_ui_comblacklist") displayCtrl 999001) lbAdd (name _x); + if ((CTI_P_SideLogic getvariable ["CTI_COM_BLACKLIST_GLOBAL",[]]) find (getPlayerUID _x) >=0 ) then { + ((uiNamespace getVariable "cti_dialog_ui_comblacklist") displayCtrl 999001) lbSetColor [_foreachindex, [1,0,0,1]]; + } else { + ((uiNamespace getVariable "cti_dialog_ui_comblacklist") displayCtrl 999001) lbSetColor [_foreachindex, [0,1,0,1]]; + }; + } forEach _players; + ((uiNamespace getVariable "cti_dialog_ui_comblacklist") displayCtrl 999001) lnbSetCurSelRow 0; + ((uiNamespace getVariable "cti_dialog_ui_comblacklist") displayCtrl 999001) ctrlCommit 0; + ((uiNamespace getVariable "cti_dialog_ui_comblacklist") displayCtrl 999002) ctrlEnable false; + ((uiNamespace getVariable "cti_dialog_ui_comblacklist") displayCtrl 999002) ctrlCommit 0; + }; + case "onUnload": {}; + + case "onLBSelChanged": { + _changed= _this select 1; + if (_changed >=0) then { + _player= getPlayerUID( (uiNamespace getVariable ["cti_dialog_ui_comblacklist_players", []]) select _changed); + if ((CTI_P_SideLogic getvariable ["CTI_COM_BLACKLIST_GLOBAL",[]]) find _player >=0 ) then { + ((uiNamespace getVariable "cti_dialog_ui_comblacklist") displayCtrl 999002) ctrlSetText "Allow"; + } else { + ((uiNamespace getVariable "cti_dialog_ui_comblacklist") displayCtrl 999002) ctrlSetText "Block"; + }; + uiNamespace setVariable ["cti_dialog_ui_comblacklist_uuid", _player]; + + ((uiNamespace getVariable "cti_dialog_ui_comblacklist") displayCtrl 999002) ctrlEnable true; + ((uiNamespace getVariable "cti_dialog_ui_comblacklist") displayCtrl 999002) ctrlCommit 0; + }; + }; + case "onBlacklist" :{ + + if !(isnil {uiNamespace getVariable "cti_dialog_ui_comblacklist_uuid"}) then { + hint format["%1",uiNamespace getVariable "cti_dialog_ui_comblacklist_uuid"]; + ["SERVER", "Server_Update_BL", uiNamespace getVariable "cti_dialog_ui_comblacklist_uuid"] call CTI_CO_FNC_NetSend; + }; + ['onLoad'] call compile preprocessFileLineNumbers 'Addons\Strat_mode\Old_Com_Eject\Events_UI_combl.sqf'; + }; + +}; \ No newline at end of file diff --git a/Addons/Strat_mode/PATROL_AI/PAI_CreatePatrol.sqf b/Addons/Strat_mode/PATROL_AI/PAI_CreatePatrol.sqf index 25905fe86..763261b48 100644 --- a/Addons/Strat_mode/PATROL_AI/PAI_CreatePatrol.sqf +++ b/Addons/Strat_mode/PATROL_AI/PAI_CreatePatrol.sqf @@ -20,7 +20,7 @@ if (count _roads >0 ) then { //waitUntil {!isnull _group && !isNull _v}; _group=createGroup resistance; [_v,_group] call bis_fnc_spawncrew; - if !( isNil "ADMIN_ZEUS") then { ADMIN_ZEUS addCuratorEditableObjects [[_v],true];}; + if !( isNil "ADMIN_ZEUS") then {ADMIN_ZEUS addCuratorAddons (configSourceAddonList (configFile >> "CfgVehicles" >> typeof _v)); ADMIN_ZEUS addCuratorEditableObjects [[_v],true];}; _group setvariable ["defending",false,true]; ["SERVER", "Request_HandleAction", ["empty", [_v]]] call CTI_CO_FNC_NetSend; diag_log format [":: Patrols :: Creating %1 :: %2",_v,position _pos]; diff --git a/Addons/Strat_mode/PATROL_AI/PAI_Init.sqf b/Addons/Strat_mode/PATROL_AI/PAI_Init.sqf index 85ea1b60e..dad7695b9 100644 --- a/Addons/Strat_mode/PATROL_AI/PAI_Init.sqf +++ b/Addons/Strat_mode/PATROL_AI/PAI_Init.sqf @@ -18,7 +18,7 @@ with missionNamespace do { CTI_PVF_Patrol_Create={ _patrol= 0 call PAI_CREATE_PATROL; _patrol spawn PAI_PATROL_AI; - waitUntil {!isNull (_patrol select 0)}; + waitUntil {if (!isNull (_patrol select 0)) exitWith {true}; false}; CTI_GUER setvariable ["patrols",(CTI_GUER getVariable ["patrols",[]])+ [_patrol select 0]-[grpNull],true]; if !(CTI_isServer) then { ["SERVER", "Server_Patrol_WD",_patrol] call CTI_CO_FNC_NetSend; diff --git a/Addons/Strat_mode/PATROL_AI/PAI_PatrolAI.sqf b/Addons/Strat_mode/PATROL_AI/PAI_PatrolAI.sqf index aa9460598..e4e38573f 100644 --- a/Addons/Strat_mode/PATROL_AI/PAI_PatrolAI.sqf +++ b/Addons/Strat_mode/PATROL_AI/PAI_PatrolAI.sqf @@ -5,7 +5,7 @@ _group=_this select 0; _vehicle=_this select 1; -waitUntil {!isnull _group}; +waitUntil {if (!isnull _group) exitWith {true}; false}; diag_log format [":: Patrols ::Starting AI for %1",_group]; _current_town= _vehicle call CTI_CO_FNC_GetClosestTown; _previous=_current_town; @@ -22,7 +22,7 @@ while {!CTI_GameOver && ! isNull _group && alive _vehicle && !isNull _vehicle && _neigh=_neigh- _not_valid -[_previous] ; _next_target=if (count _priority >0) then { _priority select floor random (count _priority)} else {_neigh select floor random (count _neigh)}; if (isNil "_next_target") then {_next_target= CTI_Towns select floor random (count CTI_Towns)}; - {deleteWaypoint _x } count (waypoints _group); + {deleteWaypoint _x; true} count (waypoints _group); _wp=_group addWaypoint [(getPos _next_target),0]; _wp setWaypointType "MOVE"; _wp setWaypointBehaviour "AWARE" ; diff --git a/Addons/Strat_mode/PATROL_AI/PAI_ServerLoop.sqf b/Addons/Strat_mode/PATROL_AI/PAI_ServerLoop.sqf index 24c9803bc..438518e78 100644 --- a/Addons/Strat_mode/PATROL_AI/PAI_ServerLoop.sqf +++ b/Addons/Strat_mode/PATROL_AI/PAI_ServerLoop.sqf @@ -4,7 +4,7 @@ #define MIN_FPS 25 waitUntil {CTI_Init_Server && CTI_Init_Strat&& CTI_InitTowns}; -sleep 30; +sleep 240; if ((missionNamespace getVariable ["CTI_SM_PATROLS",0])==0) exitWith {false}; while { !CTI_GameOver} do diff --git a/Addons/Strat_mode/Radar/AIRR_init.sqf b/Addons/Strat_mode/Radar/AIRR_init.sqf index 5aa0c8e6c..e5c45e98f 100644 --- a/Addons/Strat_mode/Radar/AIRR_init.sqf +++ b/Addons/Strat_mode/Radar/AIRR_init.sqf @@ -57,6 +57,7 @@ if (CTI_IsClient) then { }; //update _marker setMarkerPosLocal (getPos _obj); + sleep 1; }; deleteMarkerLocal _marker; }; diff --git a/Addons/Strat_mode/Radar/AIRR_obj_handler.sqf b/Addons/Strat_mode/Radar/AIRR_obj_handler.sqf index 527fe2245..a3bbd44b8 100644 --- a/Addons/Strat_mode/Radar/AIRR_obj_handler.sqf +++ b/Addons/Strat_mode/Radar/AIRR_obj_handler.sqf @@ -24,9 +24,9 @@ if (! _adv_net) then { //try to register in Hud targets while {!CTI_GameOver && alive _vehicle && alive _radar} do { _alt=((getposASL _vehicle) select 2 ) min ((getposATL _vehicle) select 2 ); - if ( ([_vehicle,_radar] call BIS_fnc_distance2D) < Radar_Range && _alt >= Min_Alt && !(terrainIntersect [_top_radar,(getPosATL _vehicle)]) && {_x == _vehicle} count (_sl getVariable "CTI_HUD_SHARED") == 0 && !((_vehicle getvariable ["CTI_Net",-10]) == (_side call CTI_CO_FNC_GetSideID)) ) then { + if ( ([_vehicle,_radar] call BIS_fnc_distance2D) < Radar_Range && _alt >= Min_Alt && !(terrainIntersect [_top_radar,(getPosATL _vehicle)]) && ((_sl getVariable "CTI_HUD_SHARED") findif {_x select 0 == _vehicle && _x select 1 > time}) > -1 && !((_vehicle getvariable ["CTI_Net",-10]) == (_side call CTI_CO_FNC_GetSideID)) ) then { //diag_log format [":: AIR Radar ::%1::%2:: Detected by %3",_vehicle,_side,_radar]; - ["SERVER", "Server_Hud_Share_Add",[[_vehicle],_side]] call CTI_CO_FNC_NetSend; //we use the netPV to not do strange stuff + ["SERVER", "Server_Hud_Share_Add",[[[_vehicle,time +90+ random 20]],_side]] call CTI_CO_FNC_NetSend; //we use the netPV to not do strange stuff [["CLIENT",_side], "Client_AIRR_touched"] call CTI_CO_FNC_NetSend;//for the hud }; sleep 10; diff --git a/Addons/Strat_mode/Radar/ARTR_proj_handler.sqf b/Addons/Strat_mode/Radar/ARTR_proj_handler.sqf index 5f4f4a2e1..ea87cf9d9 100644 --- a/Addons/Strat_mode/Radar/ARTR_proj_handler.sqf +++ b/Addons/Strat_mode/Radar/ARTR_proj_handler.sqf @@ -11,5 +11,5 @@ _seed= diag_frameno+floor(random (10000)); [["CLIENT",_side], "Client_ARTR_marker",[_seed,_init_pos],true] call CTI_CO_FNC_NetSend; while {!isnull _proj} do { [["CLIENT",_side], "Client_ARTR_update",[_seed,_init_pos,getpos _proj],true] call CTI_CO_FNC_NetSend; - sleep 2; + sleep 5; }; diff --git a/Addons/Strat_mode/SLING_AUG/SA_pack.sqf b/Addons/Strat_mode/SLING_AUG/SA_pack.sqf index e24064048..7df131cb7 100644 --- a/Addons/Strat_mode/SLING_AUG/SA_pack.sqf +++ b/Addons/Strat_mode/SLING_AUG/SA_pack.sqf @@ -25,7 +25,7 @@ _target allowdamage false; -_packobject=[_pack, _initial_pos, _initial_dir, CTI_P_sideJoined, false, true, false, "CAN_COLLIDE"] call CTI_CO_FNC_CreateVehicle; +_packobject=[_pack, _initial_pos, _initial_dir, CTI_P_sideJoined, false, true, false, "CAN_COLLIDE", objNull, false] call CTI_CO_FNC_CreateVehicle; clearBackpackCargoGlobal _packobject; clearMagazineCargoGlobal _packobject; diff --git a/Addons/Strat_mode/SLING_AUG/SA_toAttach.sqf b/Addons/Strat_mode/SLING_AUG/SA_toAttach.sqf index c75385cb3..f7b744ec1 100644 --- a/Addons/Strat_mode/SLING_AUG/SA_toAttach.sqf +++ b/Addons/Strat_mode/SLING_AUG/SA_toAttach.sqf @@ -24,8 +24,12 @@ _new_masscenter=[]; {ropeUnwind [_x,max_speed,target_length];true}count (ropes _target); -waitUntil {!alive _pod ||!alive _target ||(ropelength (ropes _target select 0))=1) then { + { + if !(isNull _x ) then { + _drop=_x; + _attached=true; + }; + } forEach (attachedObjects _target); + +}; if !(isNull (getSlingLoad _target)) then {_drop=getSlingLoad _target}; -if (_attached) then { - detach _drop;_drop enableRopeAttach true; - _target enableRopeAttach true; - _target setmass (_target getvariable "initial_mass"); - _target setcenterofmass (_target getvariable "initial_COM"); -} else {{ropeDestroy _x;true}count (ropes _target);}; -playSound3D ["A3\Sounds_F\vehicles\air\noises\SL_rope_break_ext.wss",_target]; -[_drop,(side player),para_alt,min_alt] spawn SA_DROP; -true \ No newline at end of file +if(!(isNull _drop)) then { + if (_attached) then { + //temporarily disable object collision + _drop disableCollisionWith _target; + detach _drop;_drop enableRopeAttach true; + _target enableRopeAttach true; + _target setmass (_target getvariable "initial_mass"); + _target setcenterofmass (_target getvariable "initial_COM"); + + [_target , _drop] spawn { + params ["_target", "_drop"]; + sleep 2; + _drop enableCollisionWith _target; + }; + } else {{ropeDestroy _x;true}count (ropes _target);}; + playSound3D ["A3\Sounds_F\vehicles\air\noises\SL_rope_break_ext.wss",_target]; + [_drop,(side player),para_alt,min_alt] spawn SA_DROP; +} else { +//remove nullobj +detach _drop; +if (true) exitWith { false }; +}; +true; \ No newline at end of file diff --git a/Addons/Strat_mode/SLING_AUG/SA_unpack.sqf b/Addons/Strat_mode/SLING_AUG/SA_unpack.sqf index 6f7b4060e..b7d798c90 100644 --- a/Addons/Strat_mode/SLING_AUG/SA_unpack.sqf +++ b/Addons/Strat_mode/SLING_AUG/SA_unpack.sqf @@ -21,9 +21,9 @@ if (_target == ((CTI_P_SideJoined) call CTI_CO_FNC_GetSideHQ)) then { waitUntil {isNull _target}; if ((_initial_pos select 2) <0) then { - _hq = [missionNamespace getVariable Format["CTI_%1_HQ", _side], _initial_pos, _initial_dir, _side, true, true,false, "CAN_COLLIDE"] call CTI_CO_FNC_CreateVehicle; //if underwatter + _hq = [missionNamespace getVariable Format["CTI_%1_HQ", _side], _initial_pos, _initial_dir, _side, true, true,false, "CAN_COLLIDE", objNull, false] call CTI_CO_FNC_CreateVehicle; //if underwatter } else { - _hq = [missionNamespace getVariable Format["CTI_%1_HQ", _side], _initial_pos, _initial_dir, _side, true, true,false, "FORM"] call CTI_CO_FNC_CreateVehicle; // if on ground + _hq = [missionNamespace getVariable Format["CTI_%1_HQ", _side], _initial_pos, _initial_dir, _side, true, true,false, "FORM", objNull, false] call CTI_CO_FNC_CreateVehicle; // if on ground }; _hq allowdamage false; _hq setVariable ["cti_gc_noremove", true,true]; //--- HQ wreck cannot be removed nor salvaged diff --git a/Addons/Strat_mode/Tablet/Events_UI_Interact.sqf b/Addons/Strat_mode/Tablet/Events_UI_Interact.sqf index ae9126830..1dffbe8ec 100644 --- a/Addons/Strat_mode/Tablet/Events_UI_Interact.sqf +++ b/Addons/Strat_mode/Tablet/Events_UI_Interact.sqf @@ -9,7 +9,7 @@ _base_w=safezoneH * 0.04; _base_h=safezoneH * 0.04; _offset=-5; _h_offset=-1; -_max_ctrl=40; +_max_ctrl=41; @@ -25,7 +25,7 @@ switch (_action) do { _offset=_offset+1; }; case 2: { // CTI_Icon_units - if (!CTI_P_PreBuilding &&(Client_AN_Connected && (CTI_Base_BarracksInRange || CTI_Base_LightInRange || CTI_Base_HeavyInRange || CTI_Base_AirInRange || CTI_Base_AmmoInRange || CTI_Base_RepairInRange || CTI_Base_NavalInRange )) || CTI_Town_InRange) then { + if (!CTI_P_PreBuilding &&((Client_AN_Connected || CTI_InBaseArea) && (CTI_Base_BarracksInRange || CTI_Base_LightInRange || CTI_Base_HeavyInRange || CTI_Base_AirInRange || CTI_Base_AmmoInRange || CTI_Base_RepairInRange || CTI_Base_NavalInRange )) || CTI_Town_InRange) then { ((uiNamespace getVariable "cti_dialog_ui_interractions") displayCtrl (511000+_i)) ctrlSetTextColor [1,1,0,1]; } else { @@ -59,7 +59,7 @@ switch (_action) do { _offset=_offset+1; }; case 5: { // CTI_Icon_halo - if (vehicle player == player && !CTI_P_PreBuilding && CTI_Base_HaloInRange && [CTI_P_SideJoined, CTI_UPGRADE_HALO, 1] call CTI_CO_FNC_HasUpgrade && ( (missionNamespace getVariable 'CTI_SM_HALO')==1)) then { + if (vehicle player == player && !CTI_P_PreBuilding && CTI_Base_HaloInRange && [CTI_P_SideJoined, CTI_UPGRADE_HALO, 1] call CTI_CO_FNC_HasUpgrade && ( (missionNamespace getVariable 'CTI_SM_HALO')==1) && !(player getvariable ["REV_UNC",false])) then { if (time - CTI_HALO_LASTTIME >= CTI_HALO_COOLDOWN) then { ((uiNamespace getVariable "cti_dialog_ui_interractions") displayCtrl (511000+_i)) ctrlSetTextColor [1,1,0,1]; @@ -129,7 +129,7 @@ switch (_action) do { }; case 11: { // CTI_Icon_Net // ok - if ( alive _target && (missionNamespace getVariable "CTI_EW_ANET" == 1) && ( _target iskindof "Car" || _target iskindof "Tank" || _target iskindof "Truck" || _target iskindof "Air"|| _target iskindof "Ship") && !(_target isKindOf "UAV_01_base_F" || _target isKindOf "UAV_06_base_F")) then { + if ( alive _target && (missionNamespace getVariable "CTI_EW_ANET" == 1) && ( _target iskindof "Car" || _target iskindof "Tank" || _target iskindof "Truck" || _target iskindof "Air"|| _target iskindof "Ship") && !(_target isKindOf "UAV_01_base_F" || _target isKindOf "UAV_06_base_F" || _target isKindOf "UGV_02_Base_F")) then { ((uiNamespace getVariable "cti_dialog_ui_interractions") displayCtrl (511000+_i)) ctrlSetPosition [_base_x+(_offset*_base_w),_base_y+_h_offset*_base_h,_base_w,_base_h]; if (locked _target >0 ) Then { ((uiNamespace getVariable "cti_dialog_ui_interractions") displayCtrl (511000+_i)) ctrlSetTextColor [0.3,0.3,0.3,1]; @@ -144,27 +144,14 @@ switch (_action) do { }; }; case 12: { // CTI_Icon_Def // ok - if (vehicle player == player && alive _target) then { - _ok=false; - _reptrucknear = [player, CTI_SPECIAL_REPAIRTRUCK, 20] call CTI_CO_FNC_GetNearestSpecialVehicles; - if (count _reptrucknear > 0) then {_ok=true}; - _hq = (CTI_P_sidejoined) call CTI_CO_FNC_GetSideHQ; - if ((player distance2D _hq) < 20 && alive _hq) then {_ok=true}; + if (vehicle player == player && alive _target && !(player getvariable ["REV_UNC",false])) then { + _reptrucknear = if (count([player, CTI_SPECIAL_REPAIRTRUCK, 20] call CTI_CO_FNC_GetNearestSpecialVehicles)>0) then {true} else {false}; + _hqnear = if (player distance2d ((CTI_P_sidejoined) call CTI_CO_FNC_GetSideHQ)<=20 && alive ((CTI_P_sidejoined) call CTI_CO_FNC_GetSideHQ)) then {true} else {false}; _structures = (CTI_P_SideJoined) call CTI_CO_FNC_GetSideStructures; - _rep_depots = [CTI_REPAIR, _structures] call CTI_CO_FNC_GetSideStructuresByType; - _available_rep_depots = [player, _rep_depots, 20] call CTI_UI_Service_GetBaseDepots; - if (count _available_rep_depots > 0) then {_ok=true}; - /* - if (_target == ((CTI_P_sidejoined) call CTI_CO_FNC_GetSideHQ)) then {_ok=true}; - if (_target in (CTI_P_SideLogic getVariable ["cti_structures",[]]) ) then { - if ((((missionNamespace getVariable [format ["CTI_%1_%2", CTI_P_SideJoined, typeOf _target],[[""]]]) select 0) select 0 == CTI_REPAIR )) then {_ok=true;}; - }; - if (_target in ((CTI_WEST getvariable ["cti_service", []]) + (CTI_EAST getvariable ["cti_service", []])) ) then { - if ((missionNamespace getVariable [format ["%1", typeOf _target],["","","","","","","",""]]) select 7 == "service-repairtruck") then {_ok=true;}; - }; - */ - //if (_target == ((CTI_P_sidejoined) call CTI_CO_FNC_GetSideHQ) || (missionNamespace getVariable [format ["%1", typeOf _target],["","","","","","","",""]]) select 7 == "service-repairtruck" || ((missionNamespace getVariable [format ["CTI_%1_%2", CTI_P_SideJoined, typeOf _target],[[""]]]) select 0) select 0 == CTI_REPAIR )) then { - if (_ok) then { + _repairinrange= if !(isNull ([CTI_REPAIR, player, _structures, CTI_BASE_AREA_RANGE] call CTI_CO_FNC_GetClosestStructure)) then {true} else {false}; + + + if (_reptrucknear || _hqnear || _repairinrange && CTI_InBaseArea) then { ((uiNamespace getVariable "cti_dialog_ui_interractions") displayCtrl (511000+_i)) ctrlSetTextColor [0,0,1,1]; ((uiNamespace getVariable "cti_dialog_ui_interractions") displayCtrl (511000+_i)) ctrlSetPosition [_base_x+(_offset*_base_w),_base_y+_h_offset*_base_h,_base_w,_base_h]; _offset=_offset+1; @@ -181,7 +168,7 @@ switch (_action) do { if ((_target iskindof "Car" || _target iskindof "Tank" || _target iskindof "Air"|| _target iskindof "Ship" || _target iskindof "Wheeled_APC_F" || _target iskindof "Truck_F") && !(_target iskindof "parachutebase" || _target iskindof "UAV_01_base_F")) then { _hps = {_x != 0} count (getAllHitPointsDamage _target select 2); }; - if (vehicle player == player && _hps > 0 && (_target iskindof "Car" || _target iskindof "Tank" || _target iskindof "Air"|| _target iskindof "Ship" || _target iskindof "Wheeled_APC_F"|| _target iskindof "Truck_F") && alive _target) then { + if (vehicle player == player && _hps > 0 && (_target iskindof "Car" || _target iskindof "Tank" || _target iskindof "Air"|| _target iskindof "Ship" || _target iskindof "Wheeled_APC_F"|| _target iskindof "Truck_F") && alive _target && !(player getvariable ["REV_UNC",false])) then { if ((({_x == "Toolkit"} count (backpackItems player)) + ({_x == "Toolkit"} count (vestItems player)) + ({_x == "Toolkit"} count (itemCargo _target))) >0) then { @@ -201,7 +188,7 @@ switch (_action) do { case 14: { // CTI_Icon_fl //ok _hqs=[]; {_hqs set [count _hqs, _x call CTI_CO_FNC_GetSideHQ];true} count [east,west]; - if (vehicle player == player && (_target iskindof "Car" || _target iskindof "Ship" || _target iskindof "Wheeled_APC_F" || _target iskindof "Truck_F") && alive _target && !( getplayeruid player in (_target getVariable ["v_keys",[]])) && !(_target getVariable ["cti_occupant",civilian] == CTI_P_SideJoined)&& !(_target in _hqs || _target isKindOf "UAV_01_base_F" || _target isKindOf "UAV_06_base_F")) then { + if (vehicle player == player && (_target iskindof "Car" || _target iskindof "Ship" || _target iskindof "Wheeled_APC_F" || _target iskindof "Truck_F") && alive _target && !( getplayeruid player in (_target getVariable ["v_keys",[]])) && !(_target getVariable ["cti_occupant",civilian] == CTI_P_SideJoined)&& !(_target in _hqs || _target isKindOf "UAV_01_base_F" || _target isKindOf "UAV_06_base_F" || _target isKindOf "UGV_02_Base_F")) then { if ((({_x == "Toolkit"} count (backpackItems player)) +({_x == "Toolkit"} count (vestItems player))) >0) then { ((uiNamespace getVariable "cti_dialog_ui_interractions") displayCtrl (511000+_i)) ctrlSetTextColor [0,0,1,1]; ((uiNamespace getVariable "cti_dialog_ui_interractions") displayCtrl (511000+_i)) ctrlSetTooltip localize "STR_Icon_FL"; @@ -212,7 +199,7 @@ switch (_action) do { ((uiNamespace getVariable "cti_dialog_ui_interractions") displayCtrl (511000+_i)) ctrlSetPosition [_base_x+(_offset*_base_w),_base_y+_h_offset*_base_h,_base_w,_base_h]; _offset=_offset+1; } else { - if (vehicle player == player && (_target iskindof "Tank" || _target iskindof "Air") && !(_target isKindOf "UAV_01_base_F" || _target isKindOf "UAV_06_base_F") && alive _target && !( getplayeruid player in (_target getVariable ["v_keys",[]])) && !(_target getVariable ["cti_occupant",civilian] == CTI_P_SideJoined)&& !(_target in _hqs)) then { + if (vehicle player == player && (_target iskindof "Tank" || _target iskindof "Air") && !(_target isKindOf "UAV_01_base_F" || _target isKindOf "UAV_06_base_F" || _target isKindOf "UGV_02_Base_F") && alive _target && !( getplayeruid player in (_target getVariable ["v_keys",[]])) && !(_target getVariable ["cti_occupant",civilian] == CTI_P_SideJoined)&& !(_target in _hqs)) then { _rt = 0; _reptruck = [_target, CTI_SPECIAL_REPAIRTRUCK, 50] call CTI_CO_FNC_GetNearestSpecialVehicles; if (count _reptruck > 0) then {_rt = 1;}; @@ -268,7 +255,7 @@ switch (_action) do { }; }; case 19: { // CTI_Icon_load //ok - if (vehicle player != player && driver vehicle player ==player && (_target iskindof "I_G_Offroad_01_F" || _target iskindOf "B_G_Van_02_vehicle_F" || _target iskindOf "O_G_Van_02_vehicle_F") && speed _target <1 && speed _target >-1 && alive _target && ! STATIC_TRY) then { + if (vehicle player != player && driver vehicle player ==player && (_target iskindof "I_G_Offroad_01_F" || _target iskindOf "B_G_Van_02_vehicle_F" || _target iskindOf "O_G_Van_02_vehicle_F") && speed _target <1 && speed _target >-1 && alive _target && !(missionNameSpace getVariable ["STATIC_TRY",false])) then { ((uiNamespace getVariable "cti_dialog_ui_interractions") displayCtrl (511000+_i)) ctrlSetTextColor [0,0,1,1]; ((uiNamespace getVariable "cti_dialog_ui_interractions") displayCtrl (511000+_i)) ctrlSetPosition [_base_x+(_offset*_base_w),_base_y+_h_offset*_base_h,_base_w,_base_h]; _offset=_offset+1; @@ -298,7 +285,11 @@ switch (_action) do { }; case 22: { // CTI_Icon_rephq if ((missionNamespace getVariable "CTI_BASE_HQ_REPAIR") > 0 && (missionNamespace getVariable [format ["%1", typeOf _target],["","","","","","","",""]]) select 7 == "service-repairtruck" && !alive(CTI_P_SideJoined call CTI_CO_FNC_GetSideHQ) ) then { - if ((CTI_P_SideJoined call CTI_CO_FNC_GetSideHQ) distance _target <= CTI_BASE_HQ_REPAIR_RANGE && (0 call CTI_CL_FNC_GetPlayerFunds) >= CTI_BASE_HQ_REPAIR_PRICE) then { + _base_repair_HQ_cost = CTI_BASE_HQ_REPAIR_PRICE; + //Reduce repair cost in early game + if (scoreSide CTI_P_SideJoined <= 1000) then {_base_repair_HQ_cost = round(_base_repair_HQ_cost / 2);}; + if (scoreSide CTI_P_SideJoined <= 500) then {_base_repair_HQ_cost = round(_base_repair_HQ_cost / 4);}; + if ((CTI_P_SideJoined call CTI_CO_FNC_GetSideHQ) distance _target <= CTI_BASE_HQ_REPAIR_RANGE && (0 call CTI_CL_FNC_GetPlayerFunds) >= _base_repair_HQ_cost && !(missionNamespace getVariable [format["CTI_HQ_Repair_Lock_%1", CTI_P_SideJoined], false])) then { ((uiNamespace getVariable "cti_dialog_ui_interractions") displayCtrl (511000+_i)) ctrlSetTextColor [0,0,1,1]; }else { ((uiNamespace getVariable "cti_dialog_ui_interractions") displayCtrl (511000+_i)) ctrlSetTextColor [0.3,0.3,0.3,1]; @@ -330,7 +321,7 @@ switch (_action) do { case 25: { // CTI_Icon_pack _hqs=[]; //{_hqs set [count _hqs, _x call CTI_CO_FNC_GetSideHQ];true} count [east,west]; - if (vehicle player == player && (_target iskindof "Tank" || _target iskindof "Wheeled_APC_F" || _target iskindof "Truck_F" || (typeof _target) in ["Land_Pod_Heli_Transport_04_box_F","B_Slingload_01_Cargo_F"])&& alive _target && !(_target in _hqs)) then { + if (vehicle player == player && !(player getvariable ["REV_UNC",false]) && (_target iskindof "Tank" || _target iskindof "Wheeled_APC_F" || _target iskindof "Truck_F" || (typeof _target) in ["Land_Pod_Heli_Transport_04_box_F","B_Slingload_01_Cargo_F"])&& alive _target && !(_target in _hqs || _target isKindOf "UGV_02_Base_F")) then { if (({alive _x} count (crew _target) == 0) && abs (speed _target) <1 && locked _target <2 ) then { ((uiNamespace getVariable "cti_dialog_ui_interractions") displayCtrl (511000+_i)) ctrlSetTextColor [0,0,1,1]; } else { @@ -345,7 +336,7 @@ switch (_action) do { }; case 26: { // CTI_Icon_attach if (vehicle player != player && driver vehicle player ==player && (typeof _target) == "O_Heli_Transport_04_F" ) then { - if (isNull (getSlingLoad _target) || !((typeof (getSlingLoad _target)) in ["Land_Pod_Heli_Transport_04_fuel_F","Land_Pod_Heli_Transport_04_ammo_F","Land_Pod_Heli_Transport_04_bench_F","Land_Pod_Heli_Transport_04_box_F","Land_Pod_Heli_Transport_04_repair_F","Land_Pod_Heli_Transport_04_medevac_F"])) then {((uiNamespace getVariable "cti_dialog_ui_interractions") displayCtrl (511000+_i)) ctrlSetTextColor [0.3,0.3,0.3,1];} else { + if (isNull (getSlingLoad _target) || !((typeof (getSlingLoad _target)) in ["Land_Pod_Heli_Transport_04_fuel_F","Land_Pod_Heli_Transport_04_ammo_F","Land_Pod_Heli_Transport_04_bench_F","Land_Pod_Heli_Transport_04_box_F","Land_Pod_Heli_Transport_04_covered_F","Land_Pod_Heli_Transport_04_repair_F","Land_Pod_Heli_Transport_04_medevac_F"])) then {((uiNamespace getVariable "cti_dialog_ui_interractions") displayCtrl (511000+_i)) ctrlSetTextColor [0.3,0.3,0.3,1];} else { ((uiNamespace getVariable "cti_dialog_ui_interractions") displayCtrl (511000+_i)) ctrlSetTextColor [0,0,1,1]; }; ((uiNamespace getVariable "cti_dialog_ui_interractions") displayCtrl (511000+_i)) ctrlSetPosition [_base_x+(_offset*_base_w),_base_y+_h_offset*_base_h,_base_w,_base_h]; @@ -371,7 +362,7 @@ switch (_action) do { }; }; case 28: { // CTI_Icon_build - if (vehicle player == player && _target in (CTI_P_SideLogic getVariable ["cti_structures_wip",[]])&& (missionNamespace getVariable "CTI_BASEBUILDING") > 0) then { + if (vehicle player == player && !(player getvariable ["REV_UNC",false]) && _target in (CTI_P_SideLogic getVariable ["cti_structures_wip",[]])&& (missionNamespace getVariable "CTI_BASEBUILDING") > 0) then { ((uiNamespace getVariable "cti_dialog_ui_interractions") displayCtrl (511000+_i)) ctrlSetTextColor [0,0,1,1]; ((uiNamespace getVariable "cti_dialog_ui_interractions") displayCtrl (511000+_i)) ctrlSetPosition [_base_x+(_offset*_base_w),_base_y+_h_offset*_base_h,_base_w,_base_h]; _offset=_offset+1; @@ -380,7 +371,7 @@ switch (_action) do { }; }; case 29: { // CTI_Icon_srep - if (vehicle player == player && _target in (CTI_P_SideLogic getVariable ["cti_structures",[]])&&( getDammage _target >0 || _target getVariable ["cti_altdmg",-1] >0) && (missionNamespace getVariable "CTI_BASEBUILDING") > 0) then { + if (vehicle player == player && !(player getvariable ["REV_UNC",false]) && _target in (CTI_P_SideLogic getVariable ["cti_structures",[]])&&( getDammage _target >0 || _target getVariable ["cti_altdmg",-1] >0) && (missionNamespace getVariable "CTI_BASEBUILDING") > 0) then { ((uiNamespace getVariable "cti_dialog_ui_interractions") displayCtrl (511000+_i)) ctrlSetTextColor [0,0,1,1]; ((uiNamespace getVariable "cti_dialog_ui_interractions") displayCtrl (511000+_i)) ctrlSetPosition [_base_x+(_offset*_base_w),_base_y+_h_offset*_base_h,_base_w,_base_h]; _offset=_offset+1; @@ -393,7 +384,7 @@ switch (_action) do { _structures = (CTI_P_SideJoined) call CTI_CO_FNC_GetSideStructures; _ammo_depots = [CTI_AMMO, _structures] call CTI_CO_FNC_GetSideStructuresByType; _available_ammo_depots = [_target, _ammo_depots, CTI_SERVICE_AMMO_DEPOT_RANGE] call CTI_UI_Service_GetBaseDepots; - if (!(_target getVariable ["CTI_AC_AIRCRAFT_LOADOUT_IS_BUSY",true]) && count (_available_ammo_depots) >0 && local _target ) then { + if (!(_target getVariable ["CTI_AC_AIRCRAFT_LOADOUT_IS_BUSY",true]) && count (_available_ammo_depots) >0 && local _target && locked _target < 2) then { ((uiNamespace getVariable "cti_dialog_ui_interractions") displayCtrl (511000+_i)) ctrlSetTextColor [0,0,1,1]; } else { ((uiNamespace getVariable "cti_dialog_ui_interractions") displayCtrl (511000+_i)) ctrlSetTextColor [0.3,0.3,0.3,1]; @@ -407,7 +398,7 @@ switch (_action) do { }; case 31: {// CTI_Icon_Com if (! isnull _target && alive _target && (_target == (CTI_P_SideJoined call CTI_CO_FNC_GetSideHQ) || _target in (CTI_P_SideJoined call CTI_CO_FNC_GetSideStructures)) ) then { - if (isNull (CTI_P_SideJoined call CTI_CO_FNC_GetSideCommander )&& !( (getplayeruid player) in (CTI_P_SideLogic getVariable ["CTI_COM_BLACKLIST",[] ]))) then { + if (isNull (CTI_P_SideJoined call CTI_CO_FNC_GetSideCommander )&& !( (getplayeruid player) in (CTI_P_SideLogic getVariable ["CTI_COM_BLACKLIST",[] ])) && !( (getplayeruid player) in (CTI_P_SideLogic getvariable ["CTI_COM_BLACKLIST_GLOBAL",[]] ))) then { ((uiNamespace getVariable "cti_dialog_ui_interractions") displayCtrl (511000+_i)) ctrlSetTextColor [1,1,0,1]; } else { ((uiNamespace getVariable "cti_dialog_ui_interractions") displayCtrl (511000+_i)) ctrlSetTextColor [0.3,0.3,0.3,1]; @@ -467,7 +458,7 @@ switch (_action) do { }; case 35: {// Dismount defense - if (vehicle player == player && (_target in (CTI_WEST getVariable ["cti_defences", []]) +(CTI_EAST getVariable ["cti_defences", []]))&& (missionNamespace getVariable "CTI_BASEBUILDING") > 0) then { + if (vehicle player == player && !(player getvariable ["REV_UNC",false]) && (_target in (CTI_WEST getVariable ["cti_defences", []]) +(CTI_EAST getVariable ["cti_defences", []]))&& (missionNamespace getVariable "CTI_BASEBUILDING") > 0) then { ((uiNamespace getVariable "cti_dialog_ui_interractions") displayCtrl (511000+_i)) ctrlSetTextColor [1,0,0,1]; ((uiNamespace getVariable "cti_dialog_ui_interractions") displayCtrl (511000+_i)) ctrlSetPosition [_base_x+(_offset*_base_w),_base_y+_h_offset*_base_h,_base_w,_base_h]; @@ -547,7 +538,17 @@ switch (_action) do { ((uiNamespace getVariable "cti_dialog_ui_interractions") displayCtrl (511000+_i)) ctrlSetPosition [_base_x+(_offset*_base_w),_base_y+5,_base_w,_base_h]; }; }; + case 39: { //OnResetDroneAI - Yoshi_E + _uav = getConnectedUAV player; + if (alive _uav && unitIsUAV _uav) then { + ((uiNamespace getVariable "cti_dialog_ui_interractions") displayCtrl (511000+_i)) ctrlSetTextColor [1,0,0,1]; + ((uiNamespace getVariable "cti_dialog_ui_interractions") displayCtrl (511000+_i)) ctrlSetPosition [_base_x+(_offset*_base_w),_base_y+_h_offset*_base_h,_base_w,_base_h]; + _offset=_offset+1; + } else { + ((uiNamespace getVariable "cti_dialog_ui_interractions") displayCtrl (511000+_i)) ctrlSetPosition [_base_x+(_offset*_base_w),_base_y+5,_base_w,_base_h]; + }; + }; }; }; //if (_offset == 0) exitwith {false}; @@ -595,6 +596,14 @@ switch (_action) do { case "OnDef": { uiNamespace setVariable ['cti_dialog_ui_defensemenu',objnull]; closedialog 0; + if (_target == player) then { + _reptruck = [player, CTI_SPECIAL_REPAIRTRUCK, 20] call CTI_CO_FNC_GetNearestSpecialVehicles; + _hq = if (player distance2d ((CTI_P_sidejoined) call CTI_CO_FNC_GetSideHQ)<=20 && alive ((CTI_P_sidejoined) call CTI_CO_FNC_GetSideHQ)) then {[(CTI_P_sidejoined) call CTI_CO_FNC_GetSideHQ]} else {[]}; + _structures = (CTI_P_SideJoined) call CTI_CO_FNC_GetSideStructures; + _repairs = [[CTI_REPAIR, player, _structures, CTI_BASE_AREA_RANGE] call CTI_CO_FNC_GetClosestStructure]; + _total = _reptruck + _hq + _repairs - [objNull]; + _target=[player, _total] call CTI_CO_FNC_GetClosestEntity; + }; [_target] execVM "Client\Actions\Action_DefenseMenu.sqf"; }; case "OnRepair": { @@ -677,7 +686,7 @@ switch (_action) do { case "OnUnits": { closedialog 0; //uiNamespace setVariable ['cti_dialog_ui_purchasemenu',objnull]; - if (!CTI_P_PreBuilding &&(Client_AN_Connected && (CTI_Base_BarracksInRange || CTI_Base_LightInRange || CTI_Base_HeavyInRange || CTI_Base_AirInRange || CTI_Base_AmmoInRange || CTI_Base_RepairInRange || CTI_Base_NavalInRange )) || CTI_Town_InRange) then { + if (!CTI_P_PreBuilding &&((Client_AN_Connected || CTI_InBaseArea) && (CTI_Base_BarracksInRange || CTI_Base_LightInRange || CTI_Base_HeavyInRange || CTI_Base_AirInRange || CTI_Base_AmmoInRange || CTI_Base_RepairInRange || CTI_Base_NavalInRange )) || CTI_Town_InRange) then { [_target] execVM "Client\Actions\Action_UseNearestFactory.sqf"; }; }; @@ -728,14 +737,14 @@ switch (_action) do { _ammo_depots = [CTI_AMMO, _structures, player] call CTI_CO_FNC_GetSideStructuresByType; _available_ammo_depots = [_target, _ammo_depots, CTI_SERVICE_AMMO_DEPOT_RANGE] call CTI_UI_Service_GetBaseDepots; _available_ammo_trucks = [_target, CTI_SPECIAL_AMMOTRUCK, CTI_SERVICE_AMMO_TRUCK_RANGE] call CTI_CO_FNC_GetNearestSpecialVehicles; - if (!(_target getVariable ["CTI_AC_AIRCRAFT_LOADOUT_IS_BUSY",true]) && count (_available_ammo_depots + _available_ammo_trucks) >0 && local _target ) then { + if (!(_target getVariable ["CTI_AC_AIRCRAFT_LOADOUT_IS_BUSY",true]) && count (_available_ammo_depots + _available_ammo_trucks) >0 && local _target && locked _target < 2) then { uiNamespace setVariable ['HAL_TARG',_target]; closedialog 0; createDialog "CTI_RscTabletAircraftLoadoutMenu"; }; }; case "OnCom": { - if (isNull (CTI_P_SideJoined call CTI_CO_FNC_GetSideCommander )&& !( (getplayeruid player) in (CTI_P_SideLogic getVariable ["CTI_COM_BLACKLIST",[]] ))) then { + if (isNull (CTI_P_SideJoined call CTI_CO_FNC_GetSideCommander )&& !( (getplayeruid player) in (CTI_P_SideLogic getVariable ["CTI_COM_BLACKLIST",[]] )) && !( (getplayeruid player) in (CTI_P_SideLogic getvariable ["CTI_COM_BLACKLIST_GLOBAL",[]] ))) then { closedialog 0; 0 call CTI_COM_SET_CLIENT; }; @@ -752,10 +761,12 @@ switch (_action) do { }; case "OnPilot": { closedialog 0; - if (isNull (driver _target)) then {player moveInDriver _target} else {0 spawn { hint "There is already a pilot";sleep 3;hintSilent "";}}; + if (locked _target < 2) then { + if (isNull (driver _target)) then {player moveInDriver _target} else {0 spawn {hint "There is already a pilot"; sleep 3; hintSilent "";};}; + }; }; case "OnHalo": { - if !(vehicle player == player && !CTI_P_PreBuilding && CTI_Base_HaloInRange && [CTI_P_SideJoined, CTI_UPGRADE_HALO, 1] call CTI_CO_FNC_HasUpgrade && ( (missionNamespace getVariable 'CTI_SM_HALO')==1) && (time - CTI_HALO_LASTTIME >= CTI_HALO_COOLDOWN)) exitwith {false}; + if !(vehicle player == player && !CTI_P_PreBuilding && CTI_Base_HaloInRange && [CTI_P_SideJoined, CTI_UPGRADE_HALO, 1] call CTI_CO_FNC_HasUpgrade && ( (missionNamespace getVariable 'CTI_SM_HALO')==1 && !(player getvariable ["REV_UNC",false])) && (time - CTI_HALO_LASTTIME >= CTI_HALO_COOLDOWN)) exitwith {false}; closedialog 0; 0 execvm "Addons\ATM_airdrop\atm_airdrop.sqf" }; @@ -870,4 +881,9 @@ switch (_action) do { [group player, CTI_P_SideJoined, - 1500] call CTI_CO_FNC_ChangeFunds; }; }; -}; \ No newline at end of file + case "OnResetDroneAI": { + closedialog 0; + _drone = getConnectedUAV player; + [_drone, player] spawn UAV_FIX_CREW; + }; +}; diff --git a/Addons/Strat_mode/Tablet/Events_UI_TabletMain.sqf b/Addons/Strat_mode/Tablet/Events_UI_TabletMain.sqf index 622d5aa77..aa5fbb95b 100644 --- a/Addons/Strat_mode/Tablet/Events_UI_TabletMain.sqf +++ b/Addons/Strat_mode/Tablet/Events_UI_TabletMain.sqf @@ -37,6 +37,15 @@ switch (_action) do { if ((missionNamespace getVariable "CTI_ARTILLERY_SETUP") < 0) then {((uiNamespace getVariable "cti_dialog_ui_tabletmain") displayCtrl 210009) ctrlEnable false}; if !(missionNamespace getVariable "CTI_EW_ANET" == 1) then {((uiNamespace getVariable "cti_dialog_ui_tabletmain") displayCtrl 210016) ctrlEnable false}; + if ((serverCommandAvailable '#shutdown' || !isMultiplayer)) then { + ((uiNamespace getVariable "cti_dialog_ui_tabletmain") displayCtrl 210017) ctrlEnable true; + ((uiNamespace getVariable "cti_dialog_ui_tabletmain") displayCtrl 210017) ctrlSetPosition [SafeZoneX + (SafeZoneW - (3/4*SafeZoneH))/2+ (3/4*SafeZoneH) *0.191+(3/4*SafeZoneH)*0.615*0.76,SafeZoneY+safezoneH*(0.28+0.035*1),(3/4*SafeZoneH)*0.615*0.22,SafeZoneH * 0.03]; ((uiNamespace getVariable "cti_dialog_ui_tabletmain") displayCtrl 210017) ctrlCommit 0; + } else { + ((uiNamespace getVariable "cti_dialog_ui_tabletmain") displayCtrl 210017) ctrlEnable false; + ((uiNamespace getVariable "cti_dialog_ui_tabletmain") displayCtrl 210017) ctrlSetPosition [SafeZoneX + (SafeZoneW - (3/4*SafeZoneH))/2+ (3/4*SafeZoneH) *0.191+(3/4*SafeZoneH)*0.615*0.76,SafeZoneY+safezoneH*(0.28+0.035*1+5),(3/4*SafeZoneH)*0.615*0.22,SafeZoneH * 0.03]; ((uiNamespace getVariable "cti_dialog_ui_tabletmain") displayCtrl 210017) ctrlCommit 0; + }; + + if (!((getAssignedCuratorUnit ADMIN_ZEUS) == player) && (serverCommandAvailable '#shutdown' || !isMultiplayer)) then { ((uiNamespace getVariable "cti_dialog_ui_tabletmain") displayCtrl 210019) ctrlEnable true; ((uiNamespace getVariable "cti_dialog_ui_tabletmain") displayCtrl 210019) ctrlSetPosition [SafeZoneX + (SafeZoneW - (3/4*SafeZoneH))/2+ (3/4*SafeZoneH) *0.191+(3/4*SafeZoneH)*0.615*0.76,SafeZoneY+safezoneH*(0.28+0.035*3),(3/4*SafeZoneH)*0.615*0.22,SafeZoneH * 0.03]; ((uiNamespace getVariable "cti_dialog_ui_tabletmain") displayCtrl 210019) ctrlCommit 0; @@ -209,5 +218,9 @@ switch (_action) do { }; }; }; + case "onCOMBLPressed": { + closeDialog 0; + createDialog "CTI_RscTabletComBLMenu"; + }; }; \ No newline at end of file diff --git a/Addons/Strat_mode/Tablet/GUI_TabletMain.sqf b/Addons/Strat_mode/Tablet/GUI_TabletMain.sqf index f4f684f4d..9f70479f3 100644 --- a/Addons/Strat_mode/Tablet/GUI_TabletMain.sqf +++ b/Addons/Strat_mode/Tablet/GUI_TabletMain.sqf @@ -34,7 +34,7 @@ while { true } do { //if ((CTI_Base_GearInRange || CTI_Base_GearInRange_Mobile || CTI_Base_GearInRange_FOB) && !CTI_P_PreBuilding) then {((uiNamespace getVariable "cti_dialog_ui_tabletmain") displayCtrl 210012) ctrlEnable true;} else {((uiNamespace getVariable "cti_dialog_ui_tabletmain") displayCtrl 210012) ctrlEnable false;}; if (!CTI_P_PreBuilding &&Client_AN_Connected) then {((uiNamespace getVariable "cti_dialog_ui_tabletmain") displayCtrl 210012) ctrlEnable true;} else {((uiNamespace getVariable "cti_dialog_ui_tabletmain") displayCtrl 210012) ctrlEnable false;}; if (!CTI_P_PreBuilding &&Client_AN_Connected && (CTI_Base_BarracksInRange || CTI_Base_LightInRange || CTI_Base_HeavyInRange || CTI_Base_AirInRange || CTI_Base_AmmoInRange || CTI_Base_RepairInRange || CTI_Base_NavalInRange)) then {((uiNamespace getVariable "cti_dialog_ui_tabletmain") displayCtrl 210013) ctrlEnable true;} else {((uiNamespace getVariable "cti_dialog_ui_tabletmain") displayCtrl 210013) ctrlEnable false;}; - if (vehicle player == player && !CTI_P_PreBuilding && CTI_Base_HaloInRange && [CTI_P_SideJoined, CTI_UPGRADE_HALO, 1] call CTI_CO_FNC_HasUpgrade && ( (missionNamespace getVariable 'CTI_SM_HALO')==1)) then {((uiNamespace getVariable "cti_dialog_ui_tabletmain") displayCtrl 210014) ctrlEnable true;} else {((uiNamespace getVariable "cti_dialog_ui_tabletmain") displayCtrl 210014) ctrlEnable false;}; + if (vehicle player == player && !CTI_P_PreBuilding && CTI_Base_HaloInRange && [CTI_P_SideJoined, CTI_UPGRADE_HALO, 1] call CTI_CO_FNC_HasUpgrade && ( (missionNamespace getVariable 'CTI_SM_HALO')==1) && !(player getvariable ["REV_UNC",false])) then {((uiNamespace getVariable "cti_dialog_ui_tabletmain") displayCtrl 210014) ctrlEnable true;} else {((uiNamespace getVariable "cti_dialog_ui_tabletmain") displayCtrl 210014) ctrlEnable false;}; if (vehicle player == player && (CTI_P_SideLogic getVariable "cti_commander") == group player && !CTI_P_PreBuilding && CTI_Base_HQInRange) then {((uiNamespace getVariable "cti_dialog_ui_tabletmain") displayCtrl 210015) ctrlEnable true;} else {((uiNamespace getVariable "cti_dialog_ui_tabletmain") displayCtrl 210015) ctrlEnable false;}; @@ -45,9 +45,9 @@ while { true } do { }; //if ((missionNamespace getVariable"CTI_SM_STRATEGIC") >0 ) then { - //!CTI_P_PreBuilding && ! CTI_P_Repairing + //!CTI_P_PreBuilding && ! CTI_P_Repairing if !(true && CTI_CL_FNC_IsPlayerCommander) then {((uiNamespace getVariable "cti_dialog_ui_tabletmain") displayCtrl 210010) ctrlEnable false;}; - if !(true && CTI_CL_FNC_IsPlayerCommander && !(isNull ((CTI_P_SideJoined call CTI_CO_FNC_GetSideLogic) getVariable "CTI_PRIORITY") ) && time > (SM_Last_dis +SM_TO_dis) ) then {((uiNamespace getVariable "cti_dialog_ui_tabletmain") displayCtrl 210011) ctrlEnable false;}; + if !(true && CTI_CL_FNC_IsPlayerCommander && !(isNull ((CTI_P_SideJoined call CTI_CO_FNC_GetSideLogic) getVariable "CTI_PRIORITY") ) && time > (SM_Last_dis +SM_TO_dis) && (count ((CTI_P_SideJoined call CTI_CO_FNC_GetSideLogic) getVariable "CTI_ACTIVE"))== CTI_SM_STRATEGIC_NB ) then {((uiNamespace getVariable "cti_dialog_ui_tabletmain") displayCtrl 210011) ctrlEnable false;}; /*} else { ((uiNamespace getVariable "cti_dialog_ui_tabletmain") displayCtrl 210010) ctrlEnable false; ((uiNamespace getVariable "cti_dialog_ui_tabletmain") displayCtrl 210011) ctrlEnable false; diff --git a/Addons/Strat_mode/init.sqf b/Addons/Strat_mode/init.sqf index 0ca7a47c9..6a0e6a7f4 100644 --- a/Addons/Strat_mode/init.sqf +++ b/Addons/Strat_mode/init.sqf @@ -46,6 +46,8 @@ with missionNamespace do { SM_COM_Init = compileFinal preprocessFileLineNumbers "Addons\Strat_mode\Old_Com_Eject\SM_COM_init.sqf"; UAV_FUEL = compileFinal preprocessFileLineNumbers "Addons\Strat_mode\Functions\UAV_Fuel.sqf"; + UAV_FUELDEATH = compileFinal preprocessFileLineNumbers "Addons\Strat_mode\Functions\UAV_FuelDeath.sqf"; + UAV_FIX_CREW = compileFinal preprocessFileLineNumbers "Addons\Strat_mode\Functions\UAV_Fix_Crew.sqf"; UAV_RANGE = compileFinal preprocessFileLineNumbers "Addons\Strat_mode\Functions\UAV_Range.sqf"; DYNG_WAIT = compileFinal preprocessFileLineNumbers "Addons\Strat_mode\Functions\DYNG_waitforgroup.sqf"; DYNG_SERVERLOOP = compileFinal preprocessFileLineNumbers "Addons\Strat_mode\Functions\DYNG_serverloop.sqf"; @@ -57,6 +59,9 @@ with missionNamespace do { CTI_SM_Mines_script = compileFinal preprocessFileLineNumbers "Addons\Strat_mode\Functions\SM_Mines.sqf"; TASKS_LOOP= compileFinal preprocessFileLineNumbers "Addons\Strat_mode\Functions\TASKS_loop.sqf"; + + SM_ST_Init = compileFinal preprocessFileLineNumbers "Addons\Strat_mode\Functions\SM_Map_Statics.sqf"; + }; //Common stuff @@ -84,6 +89,10 @@ with missionNamespace do { }; }; + + +waitUntil {CTI_EAST getVariable ["CTI_LOAD_COMPLETED",false]}; + if (CTI_IsServer) then { //constants for the server @@ -97,7 +106,11 @@ if (CTI_IsServer) then { CTI_BASES_NEIGH=[]; for "_i" from 1 to CTI_BASE_AREA_MAX do { CTI_BASES_NEIGH=CTI_BASES_NEIGH + [[]]; }; _sl setVariable ["CTI_BASES_NEIGH",CTI_BASES_NEIGH,true]; - _sl setVariable ["CTI_BASES_FOUND",[],true]; + if (count (_sl getVariable ["CTI_BASES_FOUND",[]]) == 0) then { + _sl setVariable ["CTI_BASES_FOUND",[],true]; + }; + _sl setVariable ["CTI_COM_BLACKLIST_GLOBAL",profileNamespace getVariable ["CTI_COM_BLACKLIST_GLOBAL",[]],true]; + true } count [east,west]; //dynamic group loop @@ -152,50 +165,70 @@ if (CTI_IsServer) then { CTI_PVF_Server_Hud_Share_Add= { - _this spawn { - _sl= (_this select 1) call CTI_CO_FNC_GetSideLogic; - while {HUD_WRITE} do {sleep random (1);}; - HUD_WRITE=true; - _hud =_sl getVariable ["CTI_HUD_SHARED",[]]; - - - //cleanup - _delete=+ []; - { - _obj = _x select 0; - _timeout= _x select 1; - if( isNull _obj || time > _timeout) then {_delete pushBack _forEachIndex;}; - } forEach _hud; - - {_hud deleteAt _x;true} count _delete; - //new objects - { - _new_obj= _x select 0; - _new_timeout= _x select 1; - _find=(_hud findif {_x select 0 == _new_obj}); - if (_find == -1) then { - _hud pushBack _x; - _new_obj setVariable ["CTI_HUD_Detected",_new_timeout,true]; - }; - true - }count (_this select 0); - - - - _sl setVariable ["CTI_HUD_SHARED",_hud,true]; - HUD_WRITE=false; - }; + + _sl= (_this select 1) call CTI_CO_FNC_GetSideLogic; + while {HUD_WRITE} do {sleep random (1);}; + HUD_WRITE=true; + _hud =_sl getVariable ["CTI_HUD_SHARED",[]]; + + + //cleanup + _delete=+ []; + { + _obj = _x select 0; + _timeout= _x select 1; + if( isNull _obj || time > _timeout) then {_delete pushBack _forEachIndex;}; + } forEach _hud; + + {_hud deleteAt _x;true} count _delete; + //new objects + { + _new_obj= _x select 0; + _new_timeout= _x select 1; + _find=(_hud findif {_x select 0 == _new_obj}); + if (_find == -1) then { + _hud pushBack _x; + _new_obj setVariable ["CTI_HUD_Detected",_new_timeout,true]; + }; + true + }count (_this select 0); + + + + _sl setVariable ["CTI_HUD_SHARED",_hud,true]; + HUD_WRITE=false; + }; CTI_PVF_Server_Addeditable= { + (_this select 0) addCuratorAddons (configSourceAddonList (configFile >> "CfgVehicles" >> typeof (_this select 1))); (_this select 0) addCuratorEditableObjects [[_this select 1],true] ; }; CTI_PVF_Server_Assign_Zeus= { _this assignCurator ADMIN_ZEUS; }; + + CTI_PVF_Server_Update_BL= { + _pfbl= profileNamespace getVariable ["CTI_COM_BLACKLIST_GLOBAL",[]]; + _index=(_pfbl find _this); + if (_index >=0) then{ + _pfbl deleteAt _index; + } else { + _pfbl pushBack _this; + + }; + profileNamespace setVariable ["CTI_COM_BLACKLIST_GLOBAL",_pfbl]; + saveProfileNamespace; + { + _sl=_x call CTI_CO_FNC_GetSideLogic; + _sl setVariable ["CTI_COM_BLACKLIST_GLOBAL",profileNamespace getVariable ["CTI_COM_BLACKLIST_GLOBAL",[]],true]; + true + } count [east,west]; + + }; }; }; @@ -234,6 +267,7 @@ if (CTI_IsClient) then { }; CTI_PVF_Client_UAVSetFuel={ if (_this isKindOf "Helicopter_Base_F") then {_this spawn UAV_FUEL;}; + if (_this isKindOf "UGV_02_Base_F") then {_this spawn UAV_FUELDEATH;}; }; }; @@ -322,10 +356,16 @@ if (CTI_IsServer) then { // time compression 0 spawn { - _day_ratio=14/CTI_WEATHER_FAST; - _nigth_ratio=10/CTI_WEATHER_FAST_NIGTH; + _sunrise = 5; + _sunset = 19; + switch (true) do { + case (ISLAND == 3): {_sunrise = 7; _sunset = 18;}; + case (ISLAND == 6): {_sunrise = 4; _sunset = 20;}; + }; + _day_ratio = (_sunset - _sunrise) / CTI_WEATHER_FAST; + _nigth_ratio = (24 - (_sunset - _sunrise)) / CTI_WEATHER_FAST_NIGTH; while {!CTI_Gameover} do { - if (daytime > 5 && daytime <19 ) then { + if (daytime > _sunrise && daytime < _sunset) then { if (timeMultiplier != _day_ratio) then {setTimeMultiplier _day_ratio;}; } else { if (timeMultiplier != _nigth_ratio) then {setTimeMultiplier _nigth_ratio;}; @@ -334,6 +374,11 @@ if (CTI_IsServer) then { }; }; + // Tasks loop + {_x spawn TASKS_LOOP;} foreach [east,west]; + + //Statics + 0 spawn {sleep 600; 0 call SM_ST_Init;}; }; @@ -374,8 +419,6 @@ if (CTI_IsClient) then { // Statics on offroads handlers 0 execVM "Addons\Strat_mode\Functions\SM_AttachStatics.sqf"; - if ( (missionNamespace getVariable 'CTI_SM_STRATEGIC')==1) then { 0 call CTI_SM_Draw_Connect_Towns;}; - //adaptative group size if ( CTI_PLAYERS_GROUPSIZE == 0) then { @@ -417,10 +460,9 @@ if (CTI_IsClient) then { waitUntil {!isNil 'CTI_InitTowns'}; sleep 1; if !(CTI_P_SideJoined == resistance) then { - execFSM "Addons\Strat_mode\FSM\town_markers.fsm"; - }; + if ((missionNamespace getVariable 'CTI_SM_STRATEGIC')==1) then {0 call CTI_SM_Draw_Connect_Towns;}; }; // HUD @@ -474,8 +516,7 @@ if (CTI_IsClient) then { }; - // Taks loop - 0 spawn TASKS_LOOP; + }; diff --git a/Client/Actions/Action_RepairHQ.sqf b/Client/Actions/Action_RepairHQ.sqf index a49642f1b..15f165f83 100644 --- a/Client/Actions/Action_RepairHQ.sqf +++ b/Client/Actions/Action_RepairHQ.sqf @@ -2,7 +2,8 @@ _vehicle = _this select 0; _hq = (CTI_P_SideJoined) call CTI_CO_FNC_GetSideHQ; CTI_P_LastRepairTime = time; - +if(missionNamespace getVariable [format["CTI_HQ_Repair_Lock_%1", CTI_P_SideJoined], false]) exitWith {}; +missionNamespace setVariable [format["CTI_HQ_Repair_Lock_%1", CTI_P_SideJoined], true, true]; if (alive _hq) exitWith {}; //--- Don't bother if the HQ is alive _base_repair_HQ_cost = CTI_BASE_HQ_REPAIR_PRICE; @@ -10,6 +11,7 @@ _base_repair_HQ_cost = CTI_BASE_HQ_REPAIR_PRICE; if(scoreSide CTI_P_SideJoined <= 1000) then {_base_repair_HQ_cost = round(_base_repair_HQ_cost / 2);}; if(scoreSide CTI_P_SideJoined <= 500) then {_base_repair_HQ_cost = round(_base_repair_HQ_cost / 4);}; +_attempting_repair = false; if (_hq distance _vehicle <= CTI_BASE_HQ_REPAIR_RANGE) then { _funds = call CTI_CL_FNC_GetPlayerFunds; @@ -27,6 +29,7 @@ if (_hq distance _vehicle <= CTI_BASE_HQ_REPAIR_RANGE) then { if (_funds >= _base_repair_HQ_cost) then { -_base_repair_HQ_cost call CTI_CL_FNC_ChangePlayerFunds; ["SERVER", "Request_HQRepair", CTI_P_SideJoined] call CTI_CO_FNC_NetSend; + _attempting_repair = true; } else { hint parseText format[localize "STR_Needed_RepairHQ", CTI_P_Coloration_Money, _base_repair_HQ_cost]; }; @@ -44,4 +47,5 @@ if (_hq distance _vehicle <= CTI_BASE_HQ_REPAIR_RANGE) then { } else { hint parseText format[localize "STR_Needed_RepairHQ", CTI_P_Coloration_Money, _base_repair_HQ_cost]; }; -}; \ No newline at end of file +}; +if(!_attempting_repair) then {missionNamespace setVariable [format["CTI_HQ_Repair_Lock_%1", CTI_P_SideJoined], false, true];}; \ No newline at end of file diff --git a/Client/Events/Events_UI_BuildMenu.sqf b/Client/Events/Events_UI_BuildMenu.sqf index 8d4946c1c..2ccda559f 100644 --- a/Client/Events/Events_UI_BuildMenu.sqf +++ b/Client/Events/Events_UI_BuildMenu.sqf @@ -7,8 +7,12 @@ switch (_action) do { if (CTI_P_WallsAutoAlign) then { ctrlSetText [100003, localize "STR_Walls_On"] } else { ctrlSetText [100003, localize "STR_Walls_Off"] }; _def_count=count (units ((CTI_P_SideLogic getVariable ["cti_defensive_team",grpNull]))); - if (CTI_P_DefensesAutoManning) then { ctrlSetText [100011, format [localize "STR_Defenses_On",ctrlText ((uiNamespace getVariable "cti_dialog_ui_buildmenu") displayCtrl 100011),_def_count,CTI_BASE_DEFENSES_AUTO_LIMIT ]] } else { ctrlSetText [100011,ctrlSetText [100011, format [localize "STR_Defenses_Off",ctrlText ((uiNamespace getVariable "cti_dialog_ui_buildmenu") displayCtrl 100011),_def_count,CTI_BASE_DEFENSES_AUTO_LIMIT ]] ] }; - if ((missionnamespace getVariable "CTI_BASEBUILDING") < 1) then { + if (CTI_P_DefensesAutoManning) then { + ctrlSetText [100011, format [localize "STR_Defenses_On",ctrlText ((uiNamespace getVariable "cti_dialog_ui_buildmenu") displayCtrl 100011),_def_count,CTI_BASE_DEFENSES_AUTO_LIMIT]] + } else { + ctrlSetText [100011, format [localize "STR_Defenses_Off",ctrlText ((uiNamespace getVariable "cti_dialog_ui_buildmenu") displayCtrl 100011),_def_count,CTI_BASE_DEFENSES_AUTO_LIMIT]] + }; + if ((missionnamespace getVariable "CTI_BASEBUILDING") != 1) then { ((uiNamespace getVariable "cti_dialog_ui_buildmenu") displayCtrl 100005) ctrlSetText format [localize "STR_Add_Worker", CTI_BASE_WORKERS_PRICE]; ((uiNamespace getVariable "cti_dialog_ui_buildmenu") displayCtrl 100009) ctrlshow true; ((uiNamespace getVariable "cti_dialog_ui_buildmenu") displayCtrl 100005) ctrlshow true; @@ -95,7 +99,11 @@ switch (_action) do { case "onAutoManning": { CTI_P_DefensesAutoManning = !CTI_P_DefensesAutoManning; _def_count=count (units ((CTI_P_SideLogic getVariable ["cti_defensive_team",grpNull]))); - if (CTI_P_DefensesAutoManning) then { ctrlSetText [100011, format [localize "STR_Defenses_On",ctrlText ((uiNamespace getVariable "cti_dialog_ui_buildmenu") displayCtrl 100011),_def_count,CTI_BASE_DEFENSES_AUTO_LIMIT ]] } else { ctrlSetText [100011,ctrlSetText [100011, format [localize "STR_Defenses_Off",ctrlText ((uiNamespace getVariable "cti_dialog_ui_buildmenu") displayCtrl 100011),_def_count,CTI_BASE_DEFENSES_AUTO_LIMIT ]] ] }; + if (CTI_P_DefensesAutoManning) then { + ctrlSetText [100011, format [localize "STR_Defenses_On",ctrlText ((uiNamespace getVariable "cti_dialog_ui_buildmenu") displayCtrl 100011),_def_count,CTI_BASE_DEFENSES_AUTO_LIMIT]] + } else { + ctrlSetText [100011, format [localize "STR_Defenses_Off",ctrlText ((uiNamespace getVariable "cti_dialog_ui_buildmenu") displayCtrl 100011),_def_count,CTI_BASE_DEFENSES_AUTO_LIMIT]] + }; }; case "onAddWorker": { //--- Check the worker limit @@ -117,10 +125,10 @@ switch (_action) do { ["SERVER", "Request_Worker", [CTI_P_SideJoined]] call CTI_CO_FNC_NetSend; } else { - hint "not enough funds dude"; + hint parseText localize "STR_No_Funds_Info"; }; } else { - hint "worker limit reached"; + hint parseText localize "STR_Worker_Limit_Info"; }; }; case "onUndoDefense": { diff --git a/Client/Events/Events_UI_DefenseMenu.sqf b/Client/Events/Events_UI_DefenseMenu.sqf index 7b1521d78..f1473bf1a 100644 --- a/Client/Events/Events_UI_DefenseMenu.sqf +++ b/Client/Events/Events_UI_DefenseMenu.sqf @@ -7,6 +7,15 @@ switch (_action) do { if (isNil 'CTI_P_WallsAutoAlign') then { CTI_P_WallsAutoAlign = true }; if (CTI_P_WallsAutoAlign) then { ctrlSetText [200003, "Auto-Align Walls: On"] } else { ctrlSetText [200003, "Auto-Align Walls: Off"] }; + if (isNil 'CTI_P_DefensesAutoManning') then { CTI_P_DefensesAutoManning = false }; + _def_count=count (units ((CTI_P_SideLogic getVariable ["cti_defensive_team",grpNull]))); + if (CTI_P_DefensesAutoManning) then { + ctrlSetText [200004, format [localize "STR_Defenses_On",ctrlText ((uiNamespace getVariable "cti_dialog_ui_defensemenu") displayCtrl 200004),_def_count,CTI_BASE_DEFENSES_AUTO_LIMIT]] + } else { + ctrlSetText [200004, format [localize "STR_Defenses_Off",ctrlText ((uiNamespace getVariable "cti_dialog_ui_defensemenu") displayCtrl 200004),_def_count,CTI_BASE_DEFENSES_AUTO_LIMIT]] + }; + if !(call CTI_CL_FNC_IsPlayerCommander) then { ((uiNamespace getVariable "cti_dialog_ui_defensemenu") displayCtrl 200004) ctrlEnable false; }; + { _var = missionNamespace getVariable _x; @@ -49,6 +58,15 @@ switch (_action) do { CTI_P_WallsAutoAlign = !CTI_P_WallsAutoAlign; if (CTI_P_WallsAutoAlign) then { ctrlSetText [200003, "Auto-Align Walls: On"] } else { ctrlSetText [200003, "Auto-Align Walls: Off"] }; }; + case "onAutoManning": { + CTI_P_DefensesAutoManning = !CTI_P_DefensesAutoManning; + _def_count=count (units ((CTI_P_SideLogic getVariable ["cti_defensive_team",grpNull]))); + if (CTI_P_DefensesAutoManning) then { + ctrlSetText [200004, format [localize "STR_Defenses_On",ctrlText ((uiNamespace getVariable "cti_dialog_ui_defensemenu") displayCtrl 200004),_def_count,CTI_BASE_DEFENSES_AUTO_LIMIT]] + } else { + ctrlSetText [200004, format [localize "STR_Defenses_Off",ctrlText ((uiNamespace getVariable "cti_dialog_ui_defensemenu") displayCtrl 200004),_def_count,CTI_BASE_DEFENSES_AUTO_LIMIT]] + }; + }; case "onUndoDefense": { if !(isNull CTI_P_LastDefenseBuilt) then { deleteVehicle CTI_P_LastDefenseBuilt; diff --git a/Client/Events/Events_UI_UnitsCamera.sqf b/Client/Events/Events_UI_UnitsCamera.sqf index 7fc1252c1..dce44f8ed 100644 --- a/Client/Events/Events_UI_UnitsCamera.sqf +++ b/Client/Events/Events_UI_UnitsCamera.sqf @@ -146,9 +146,12 @@ switch (_action) do { }; case "onUnitsAILBSelChanged": { _changeto = _this select 1; + _ai =objnull; + if (count (uiNamespace getVariable "cti_dialog_ui_unitscam_groups_ai") > _changeto) then { + _ai = (uiNamespace getVariable "cti_dialog_ui_unitscam_groups_ai") select _changeto; + }; - _ai = (uiNamespace getVariable "cti_dialog_ui_unitscam_groups_ai") select _changeto; - if (alive _ai) then { + if ( alive _ai) then { uiNamespace setVariable ["cti_dialog_ui_unitscam_focus", _ai]; switch (uiNamespace getVariable "cti_dialog_ui_unitscam_camview") do { case "internal": {vehicle _ai switchCamera "INTERNAL"}; case "ironsight": {vehicle _ai switchCamera "GUNNER"}}; ((uiNamespace getVariable "cti_dialog_ui_unitscam") displayCtrl 180011) ctrlSetText format["Feed: %1", _ai]; @@ -241,17 +244,15 @@ switch (_action) do { case "onUnitDisband": { _who = uiNamespace getVariable "cti_dialog_ui_unitscam_focus"; - if (alive _who && call CTI_CL_FNC_IsPlayerCommander) then { - if !(isPlayer leader _who) then { - _who setDammage 1; - }; + if (alive _who && !(isPlayer _who) && ((player == leader _who) || (!(isPlayer leader _who) && call CTI_CL_FNC_IsPlayerCommander))) then { + deleteVehicle _who; }; }; case "onRemote": { _who = uiNamespace getVariable "cti_dialog_ui_unitscam_focus"; _dialog = uiNamespace getVariable 'cti_dialog_ui_unitscam'; if (alive _who ) then { - if ((player == leader _who) || !(isPlayer leader _who) && call CTI_CL_FNC_IsPlayerCommander )then { + if ((player == leader _who) || !(isPlayer leader _who) && call CTI_CL_FNC_IsPlayerCommander) then { _who spawn { waitUntil {cameraOn == player}; sleep 0.5; diff --git a/Client/Events/Events_UI_WorkersMenu.sqf b/Client/Events/Events_UI_WorkersMenu.sqf index 2bafe8b1a..072b6b012 100644 --- a/Client/Events/Events_UI_WorkersMenu.sqf +++ b/Client/Events/Events_UI_WorkersMenu.sqf @@ -7,7 +7,7 @@ switch (_action) do { _workers = _logic getVariable "cti_workers"; uiNamespace setVariable ["cti_dialog_ui_workersmenu_workers", _workers]; uiNamespace setVariable ["cti_dialog_ui_workersmenu_sellmode", 0]; - if ((missionnamespace getVariable "CTI_BASEBUILDING") < 1) then { + if ((missionnamespace getVariable "CTI_BASEBUILDING") != 1) then { ((uiNamespace getVariable "cti_dialog_ui_workersmenu") displayCtrl 260002) ctrlshow true; ((uiNamespace getVariable "cti_dialog_ui_workersmenu") displayCtrl 260003) ctrlshow true; } else { @@ -44,12 +44,12 @@ switch (_action) do { lnbClear 260002 ; _worker = (uiNamespace getVariable "cti_dialog_ui_workersmenu_workers") select _selected; _worker setDammage 1; - + //Refound the worker to commander _logic = (CTI_P_SideJoined) call CTI_CO_FNC_GetSideLogic; _comMoney = _logic getvariable ["cti_commander_funds", 0] ; _logic setvariable ["cti_commander_funds",_comMoney+(round (CTI_BASE_WORKERS_PRICE*0.666)),true]; - + _workers = _logic getVariable "cti_workers"; uiNamespace setVariable ["cti_dialog_ui_workersmenu_workers", _workers]; { diff --git a/Client/FSM/update_actions.fsm b/Client/FSM/update_actions.fsm index ca8d6a291..c13b384a9 100644 --- a/Client/FSM/update_actions.fsm +++ b/Client/FSM/update_actions.fsm @@ -11,129 +11,142 @@ link1[] = {1,2}; link2[] = {2,1}; link3[] = {2,4}; link4[] = {4,3}; -globals[] = {25.000000,1,0,0,0,640,480,1,133,6316128,1,-355.061859,258.323914,98.173157,-593.751160,781,881,1}; -window[] = {2,-1,-1,-1,-1,906,125,1380,125,3,799}; +globals[] = {0.000000,0,0,0,0,640,480,1,133,6316128,1,-355.061859,258.323914,98.173157,-593.751160,781,884,1}; +window[] = {2,-1,-1,-1,-1,911,130,1385,130,3,799}; *//*%FSM*/ class FSM { - fsmName = "update_actions.fsm"; - class States - { - /*%FSM*/ - class Start_FSM - { - name = "Start_FSM"; - init = /*%FSM*/"_ncycle = 0;"/*%FSM*/; - precondition = /*%FSM*/""/*%FSM*/; - class Links - { - /*%FSM*/ - class Cycle + fsmName = "update_actions.fsm"; + class States { - priority = 1.000000; - to="Update_Actions"; - precondition = /*%FSM*/""/*%FSM*/; - condition=/*%FSM*/"!CTI_GameOver && time > _ncycle "/*%FSM*/; - action=/*%FSM*/""/*%FSM*/; + /*%FSM*/ + class Start_FSM + { + name = "Start_FSM"; + itemno = 0; + init = /*%FSM*/"_ncycle = 0;"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class Cycle + { + itemno = 1; + priority = 1.000000; + to="Update_Actions"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"!CTI_GameOver && time > _ncycle "/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Update_Actions + { + name = "Update_Actions"; + itemno = 2; + init = /*%FSM*/"_ncycle = time + 2.5;" \n + "" \n + "_structures = (CTI_P_SideJoined) call CTI_CO_FNC_GetSideStructures;" \n + "_logic = (CTI_P_SideJoined) call CTI_CO_FNC_GetSideLogic;" \n + "_areas = _logic getVariable [""cti_structures_areas"",[]];" \n + "_hq = (CTI_P_SideJoined) call CTI_CO_FNC_GetSideHQ;" \n + "" \n + "if (missionNamespace getVariable ""CTI_EW_ANET"" == 1 ) then {" \n + "CTI_BASE_PURCHASE_UNITS_RANGE_CC= 300000;" \n + "CTI_BASE_PURCHASE_UNITS_RANGE_EFFECTIVE = 300000;" \n + "};" \n + "" \n + "CTI_Base_HQInRange = if (alive _hq && _hq distance player < CTI_BASE_CONSTRUCTION_RANGE) then {true} else {false};" \n + "CTI_Base_ControlCenterInRange = if !(isNull ([CTI_CONTROLCENTER, player, _structures, CTI_BASE_PURCHASE_UNITS_RANGE_CC] call CTI_CO_FNC_GetClosestStructure)) then {true} else {false};" \n + "" \n + "CTI_BASE_PURCHASE_UNITS_RANGE_EFFECTIVE = if (CTI_Base_ControlCenterInRange) then {CTI_BASE_PURCHASE_UNITS_RANGE_CC} else {CTI_BASE_PURCHASE_UNITS_RANGE};" \n + "" \n + "_barracks = [CTI_BARRACKS, player, _structures, CTI_BASE_PURCHASE_UNITS_RANGE_EFFECTIVE] call CTI_CO_FNC_GetClosestStructure;" \n + "CTI_Base_BarracksInRange = if !(isNull _barracks) then {true} else {false};" \n + "CTI_Base_GearInRange = if (_barracks distance player < CTI_BASE_GEAR_RANGE) then {true} else {false};" \n + "" \n + "CTI_Base_LightInRange = if !(isNull ([CTI_LIGHT, player, _structures, CTI_BASE_PURCHASE_UNITS_RANGE_EFFECTIVE] call CTI_CO_FNC_GetClosestStructure)) then {true} else {false};" \n + "CTI_Base_HeavyInRange = if !(isNull ([CTI_HEAVY, player, _structures, CTI_BASE_PURCHASE_UNITS_RANGE_EFFECTIVE] call CTI_CO_FNC_GetClosestStructure)) then {true} else {false};" \n + "CTI_Base_AirInRange = if !(isNull ([CTI_AIR, player, _structures, CTI_BASE_PURCHASE_UNITS_RANGE_EFFECTIVE] call CTI_CO_FNC_GetClosestStructure)) then {true} else {false};" \n + "CTI_Base_AmmoInRange = if !(isNull ([CTI_AMMO, player, _structures, CTI_BASE_PURCHASE_UNITS_RANGE_EFFECTIVE] call CTI_CO_FNC_GetClosestStructure)) then {true} else {false};" \n + "CTI_Base_RepairInRange = if !(isNull ([CTI_REPAIR, player, _structures, CTI_BASE_PURCHASE_UNITS_RANGE_EFFECTIVE] call CTI_CO_FNC_GetClosestStructure)) then {true} else {false};" \n + "CTI_Base_NavalInRange = if !(isNull ([CTI_NAVAL, player, _structures, CTI_BASE_PURCHASE_UNITS_RANGE_EFFECTIVE] call CTI_CO_FNC_GetClosestStructure)) then {true} else {false};" \n + "" \n + "/*_in_range = false;" \n + "if (CTI_BASE_FOB_MAX > 0) then {" \n + " _nearest = [vehicle player, CTI_P_SideLogic getVariable [""cti_fobs"",[]]] call CTI_CO_FNC_GetClosestEntity;" \n + " if (_nearest distance vehicle player <= CTI_BASE_GEAR_FOB_RANGE) then {_in_range = true};" \n + "};" \n + "CTI_Base_GearInRange_FOB = _in_range;" \n + "*/" \n + "// --- Zerty Was here" \n + "_ctown = [player , CTI_P_SideJoined] call CTI_CO_FNC_GetClosestFriendlyTown;" \n + "CTI_Town_InRange = if ((player distance _ctown) < CTI_TOWNS_CAPTURE_RANGE ) then {true} else {false};" \n + "CTI_Base_HaloInRange = if !(isNull ([CTI_AIR, player, _structures,300] call CTI_CO_FNC_GetClosestStructure)) then {true} else {false};" \n + "" \n + "CTI_Base_RealRepairInRange = if !(isNull ([CTI_REPAIR, player, _structures, 250] call CTI_CO_FNC_GetClosestStructure)) then {true} else {false};" \n + "" \n + "" \n + "CTI_InBaseArea=false;" \n + "" \n + "{if ((_x distance2d player)<= CTI_BASE_AREA_RANGE) then {CTI_InBaseArea=true;};true} count _areas;" \n + "" \n + "/*//debug" \n + "CTI_Base_BarracksInRange = true;" \n + "CTI_Base_LightInRange = true;" \n + "CTI_Base_HeavyInRange = true;" \n + "CTI_Base_AirInRange = true;" \n + "CTI_Base_AmmoInRange = true;" \n + "CTI_Base_RepairInRange = true;*/" \n + ""/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class Cycle + { + itemno = 1; + priority = 1.000000; + to="Update_Actions"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"!CTI_GameOver && time > _ncycle "/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class Terminate + { + itemno = 4; + priority = 0.000000; + to="End_FSM"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"CTI_GameOver"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class End_FSM + { + name = "End_FSM"; + itemno = 3; + init = /*%FSM*/""/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + }; + }; + /*%FSM*/ }; - /*%FSM*/ - }; - }; - /*%FSM*/ - /*%FSM*/ - class Update_Actions - { - name = "Update_Actions"; - init = /*%FSM*/"_ncycle = time + 2.5;" \n - "" \n - "_structures = (CTI_P_SideJoined) call CTI_CO_FNC_GetSideStructures;" \n - "_hq = (CTI_P_SideJoined) call CTI_CO_FNC_GetSideHQ;" \n - "" \n - "if (missionNamespace getVariable ""CTI_EW_ANET"" == 1 ) then {" \n - "CTI_BASE_PURCHASE_UNITS_RANGE_CC= 300000;" \n - "CTI_BASE_PURCHASE_UNITS_RANGE_EFFECTIVE = 300000;" \n - "};" \n - "" \n - "CTI_Base_HQInRange = if (alive _hq && _hq distance player < CTI_BASE_CONSTRUCTION_RANGE) then {true} else {false};" \n - "CTI_Base_ControlCenterInRange = if !(isNull ([CTI_CONTROLCENTER, player, _structures, CTI_BASE_PURCHASE_UNITS_RANGE_CC] call CTI_CO_FNC_GetClosestStructure)) then {true} else {false};" \n - "" \n - "CTI_BASE_PURCHASE_UNITS_RANGE_EFFECTIVE = if (CTI_Base_ControlCenterInRange) then {CTI_BASE_PURCHASE_UNITS_RANGE_CC} else {CTI_BASE_PURCHASE_UNITS_RANGE};" \n - "" \n - "_barracks = [CTI_BARRACKS, player, _structures, CTI_BASE_PURCHASE_UNITS_RANGE_EFFECTIVE] call CTI_CO_FNC_GetClosestStructure;" \n - "CTI_Base_BarracksInRange = if !(isNull _barracks) then {true} else {false};" \n - "CTI_Base_GearInRange = if (_barracks distance player < CTI_BASE_GEAR_RANGE) then {true} else {false};" \n - "" \n - "CTI_Base_LightInRange = if !(isNull ([CTI_LIGHT, player, _structures, CTI_BASE_PURCHASE_UNITS_RANGE_EFFECTIVE] call CTI_CO_FNC_GetClosestStructure)) then {true} else {false};" \n - "CTI_Base_HeavyInRange = if !(isNull ([CTI_HEAVY, player, _structures, CTI_BASE_PURCHASE_UNITS_RANGE_EFFECTIVE] call CTI_CO_FNC_GetClosestStructure)) then {true} else {false};" \n - "CTI_Base_AirInRange = if !(isNull ([CTI_AIR, player, _structures, CTI_BASE_PURCHASE_UNITS_RANGE_EFFECTIVE] call CTI_CO_FNC_GetClosestStructure)) then {true} else {false};" \n - "CTI_Base_AmmoInRange = if !(isNull ([CTI_AMMO, player, _structures, CTI_BASE_PURCHASE_UNITS_RANGE_EFFECTIVE] call CTI_CO_FNC_GetClosestStructure)) then {true} else {false};" \n - "CTI_Base_RepairInRange = if !(isNull ([CTI_REPAIR, player, _structures, CTI_BASE_PURCHASE_UNITS_RANGE_EFFECTIVE] call CTI_CO_FNC_GetClosestStructure)) then {true} else {false};" \n - "CTI_Base_NavalInRange = if !(isNull ([CTI_NAVAL, player, _structures, CTI_BASE_PURCHASE_UNITS_RANGE_EFFECTIVE] call CTI_CO_FNC_GetClosestStructure)) then {true} else {false};" \n - "" \n - "/*_in_range = false;" \n - "if (CTI_BASE_FOB_MAX > 0) then {" \n - " _nearest = [vehicle player, CTI_P_SideLogic getVariable [""cti_fobs"",[]]] call CTI_CO_FNC_GetClosestEntity;" \n - " if (_nearest distance vehicle player <= CTI_BASE_GEAR_FOB_RANGE) then {_in_range = true};" \n - "};" \n - "CTI_Base_GearInRange_FOB = _in_range;" \n - "*/" \n - "// --- Zerty Was here" \n - "_ctown = [player , CTI_P_SideJoined] call CTI_CO_FNC_GetClosestFriendlyTown;" \n - "CTI_Town_InRange = if ((player distance _ctown) < CTI_TOWNS_CAPTURE_RANGE ) then {true} else {false};" \n - "CTI_Base_HaloInRange = if !(isNull ([CTI_AIR, player, _structures,300] call CTI_CO_FNC_GetClosestStructure)) then {true} else {false};" \n - "" \n - "CTI_Base_RealRepairInRange = if !(isNull ([CTI_REPAIR, player, _structures, 250] call CTI_CO_FNC_GetClosestStructure)) then {true} else {false};" \n - "" \n - "/*//debug" \n - "CTI_Base_BarracksInRange = true;" \n - "CTI_Base_LightInRange = true;" \n - "CTI_Base_HeavyInRange = true;" \n - "CTI_Base_AirInRange = true;" \n - "CTI_Base_AmmoInRange = true;" \n - "CTI_Base_RepairInRange = true;*/" \n - ""/*%FSM*/; - precondition = /*%FSM*/""/*%FSM*/; - class Links - { - /*%FSM*/ - class Cycle + initState="Start_FSM"; + finalStates[] = { - priority = 1.000000; - to="Update_Actions"; - precondition = /*%FSM*/""/*%FSM*/; - condition=/*%FSM*/"!CTI_GameOver && time > _ncycle "/*%FSM*/; - action=/*%FSM*/""/*%FSM*/; + "End_FSM", }; - /*%FSM*/ - /*%FSM*/ - class Terminate - { - priority = 0.000000; - to="End_FSM"; - precondition = /*%FSM*/""/*%FSM*/; - condition=/*%FSM*/"CTI_GameOver"/*%FSM*/; - action=/*%FSM*/""/*%FSM*/; - }; - /*%FSM*/ - }; - }; - /*%FSM*/ - /*%FSM*/ - class End_FSM - { - name = "End_FSM"; - init = /*%FSM*/""/*%FSM*/; - precondition = /*%FSM*/""/*%FSM*/; - class Links - { - }; - }; - /*%FSM*/ - }; - initState="Start_FSM"; - finalStates[] = - { - "End_FSM" - }; }; /*%FSM*/ \ No newline at end of file diff --git a/Client/Functions/Client_AddMissionActions.sqf b/Client/Functions/Client_AddMissionActions.sqf index 2bab865b3..6e39d42ce 100644 --- a/Client/Functions/Client_AddMissionActions.sqf +++ b/Client/Functions/Client_AddMissionActions.sqf @@ -27,7 +27,7 @@ if (! isNil "HUD_PBar_stop" ) then {0 call HUD_PBar_stop}; //player addaction ["Online Help",'createdialog "CTI_RscTabletOnlineHelpMenu";', [], -99]; //titleCut["","BLACK IN",1]; - +player removeAllEventHandlers "InventoryOpened"; player addEventHandler ["InventoryOpened",{ if !(simulationEnabled (_this select 1)) then { (_this select 1) enableSimulation true; @@ -43,6 +43,7 @@ if(((CTI_P_SideJoined) call CTI_CO_FNC_GetSideUpgrades) select CTI_UPGRADE_DATA player setVehicleReportRemoteTargets true; player setVehicleReceiveRemoteTargets true; };}; +player removeAllEventHandlers "WeaponAssembled"; if (missionNamespace getVariable "CTI_SM_RADAR" == 1) then { player addEventHandler ["WeaponAssembled",{["SERVER", "Server_ARTR_handle",(_this select 1)] call CTI_CO_FNC_NetSend;["SERVER", "Request_HandleAction", ["empty", [(_this select 1)]]] call CTI_CO_FNC_NetSend;}]; diff --git a/Client/Functions/Client_OnPurchaseOrderReceived.sqf b/Client/Functions/Client_OnPurchaseOrderReceived.sqf index dba85a8d9..e9adc60ff 100644 --- a/Client/Functions/Client_OnPurchaseOrderReceived.sqf +++ b/Client/Functions/Client_OnPurchaseOrderReceived.sqf @@ -104,7 +104,7 @@ while { time <= _req_time_out && alive _factory } do { sleep .25 }; if !(alive _factory) exitWith { diag_log "the factory is dead" }; -if (_factory in CTI_TOWNS && ( ! ((_factory getvariable ["cti_town_sideID",-1]) == CTI_P_SideID) || (_factory getvariable ["cti_town_capture",-1]) != CTI_TOWNS_CAPTURE_VALUE_CEIL || ({!(side _x == CTI_P_SideJoined)} count (_factory nearEntities ["CAManBase", CTI_TOWNS_CAPTURE_RANGE])) >0 ) ) exitWith { ["SERVER", "Answer_Purchase", [_req_seed, _req_classname, _req_buyer, _factory]] call CTI_CO_FNC_NetSend; hint parseText format ["Information

%2Your %1 order has been Denied, Flag area is not clear.", _var_classname select CTI_UNIT_LABEL, _picture];}; +if (_factory in CTI_TOWNS && ( ! ((_factory getvariable ["cti_town_sideID",-1]) == CTI_P_SideID) || (_factory getvariable ["cti_town_capture",-1]) != CTI_TOWNS_CAPTURE_VALUE_CEIL || ({!(side _x == CTI_P_SideJoined || side _x == civilian)} count (_factory nearEntities ["CAManBase", CTI_TOWNS_CAPTURE_RANGE])) >0 ) ) exitWith { ["SERVER", "Answer_Purchase", [_req_seed, _req_classname, _req_buyer, _factory]] call CTI_CO_FNC_NetSend; hint parseText format ["Information

%2Your %1 order has been Denied, Flag area is not clear.", _var_classname select CTI_UNIT_LABEL, _picture];}; //--- Check if the group can handle the current unit without breaking the group size limit @@ -152,7 +152,7 @@ if (_model isKindOf "Man") then { _group = _this select 1; _cost = _this select 2; _var_classname = _this select 3; - sleep(15); + sleep(10); if(!alive _veh) then { //delete wreck & refound cash deleteVehicle _veh; @@ -160,8 +160,8 @@ if (_model isKindOf "Man") then { hint parseText format [localize "STR_OnPurchase_RefundUnit", _var_classname select CTI_UNIT_LABEL]; }; }; - - if (_veh_infos select 0 || _veh_infos select 1 || _veh_infos select 2 || _veh_infos select 3) then { //--- Not empty. + sleep(1); //Wait for the vehicle to spawn correctly (or die on spawn) + if (alive _vehicle && (_veh_infos select 0 || _veh_infos select 1 || _veh_infos select 2 || _veh_infos select 3)) then { //--- Not empty. _crew = switch (true) do { case (_model isKindOf "Tank"): {"Crew"}; case (_model isKindOf "Air"): {"Pilot"}; default {"Soldier"}}; _crew = missionNamespace getVariable format["CTI_%1_%2", CTI_P_SideJoined, _crew]; @@ -191,9 +191,10 @@ if (_model isKindOf "Man") then { }; } forEach (_var_classname select CTI_UNIT_TURRETS); }; - - _vehicle addAction ["Unlock","Client\Actions\Action_ToggleLock.sqf", [], 99, false, true, '', '_this != player &&alive _target && locked _target == 2']; - _vehicle addAction ["Lock","Client\Actions\Action_ToggleLock.sqf", [], 99, false, true, '', '_this != player &&alive _target && locked _target == 0']; + if (! (unitIsUAV _vehicle)) then { + _vehicle addAction ["Unlock","Client\Actions\Action_ToggleLock.sqf", [], 99, false, true, '', '_this != player &&alive _target && locked _target == 2']; + _vehicle addAction ["Lock","Client\Actions\Action_ToggleLock.sqf", [], 99, false, true, '', '_this != player &&alive _target && locked _target == 0']; + }; if (! (_vehicle isKindOf "Thing") && !( _vehicle isKindOf "StaticWeapon")) then {_vehicle setVariable ["v_keys",[getPlayerUID player,group player],true]}; player reveal _vehicle; diff --git a/Client/Functions/Client_PlacingDefense.sqf b/Client/Functions/Client_PlacingDefense.sqf index 2b300cdd6..e829df909 100644 --- a/Client/Functions/Client_PlacingDefense.sqf +++ b/Client/Functions/Client_PlacingDefense.sqf @@ -68,6 +68,9 @@ _distance_structure = (_var select 4) select 1; {_local disableCollisionWith _x} forEach (player nearObjects 150); _local enableSimulation false; _local setpos (getPos player); +if (_local isKindOf "O_G_HMG_02_high_F" || _local isKindOf "B_G_HMG_02_high_F" || _local isKindOf "O_G_HMG_02_F" || _local isKindOf "B_G_HMG_02_F") then { + [_local, nil, ["Hide_Rail",0,"Hide_Shield",0]] call BIS_fnc_initVehicle; +}; _last_collision_update = -600; _condition = {true}; diff --git a/Client/Functions/UI/Functions_UI_ArtilleryMenu.sqf b/Client/Functions/UI/Functions_UI_ArtilleryMenu.sqf index ce7939db4..d46874529 100644 --- a/Client/Functions/UI/Functions_UI_ArtilleryMenu.sqf +++ b/Client/Functions/UI/Functions_UI_ArtilleryMenu.sqf @@ -128,4 +128,4 @@ CTI_UI_Artillery_GetSelectedArtilleryArray = { {_return pushBack (_artillery_array select _x)} forEach (lbSelection ((uiNamespace getVariable "cti_dialog_ui_artillerymenu") displayCtrl 290014)); _return -}; \ No newline at end of file +}; diff --git a/Client/Functions/UI/Functions_UI_GearMenu.sqf b/Client/Functions/UI/Functions_UI_GearMenu.sqf index a9bd4547b..aa3b9fbb2 100644 --- a/Client/Functions/UI/Functions_UI_GearMenu.sqf +++ b/Client/Functions/UI/Functions_UI_GearMenu.sqf @@ -12,6 +12,27 @@ Still no way to set the current magazines... */ +CTI_GET_MAGAZINES = { + private ["_magazines", "_well"]; + params ["_weapon"]; + + _magazines = []; + { + if (_x == "this") then { + _magazines = _magazines + getArray(configFile >> 'CfgWeapons' >> _weapon >> 'magazines'); + } else { + _magazines = _magazines + getArray(configfile >> 'CfgWeapons' >> _weapon >> _x >> 'magazines'); + }; + _well = getArray(configfile >> "CfgWeapons" >> _weapon >> "magazineWell"); + if(count _well > 0) then { + _magazines = _magazines + getArray(configfile >> "CfgMagazineWells" >> _well select 0 >> "BI_Magazines"); + _magazines = _magazines + getArray(configfile >> "CfgMagazineWells" >> _well select 0 >> "BI_Enoch_Magazines"); + }; + } forEach (getArray(configFile >> 'CfgWeapons' >> _weapon >> 'muzzles')); + _magazines = _magazines arrayIntersect _magazines; + _magazines; +}; + //--- Display the gear on the Gear UI CTI_UI_Gear_DisplayInventory = { private ["_config_base", "_gear", "_load", "_startidc", "_startidc_current_mag", "_use", "_use_id"]; @@ -198,7 +219,13 @@ CTI_UI_Gear_DisplayShoppingItems = { if !(isNil "_get") then { if (((_get select 0) select 0) <= _upgrade_gear) then { //--- Add the item if it's equal or below the upgrade level _row = lbAdd [70108, format ["%1 -- ($%2)",getText(configFile >> _get select 2 >> _x >> 'displayName'), (_get select 0) select 1]]; - lbSetPicture [70108, _row, getText(configFile >> _get select 2 >> _x >> 'picture')]; + _dlc= getText(configFile >> _get select 2 >> _x >> 'DLC') ; + _dlcid = getNumber (configFile >> "CfgMods" >> _dlc >> "appId"); + if (_dlcid in (getDLCs 1)||_dlcid == 0 || ( _get select 2) == "CfgMagazines") then { + lbSetPicture [70108, _row, getText(configFile >> _get select 2 >> _x >> 'picture')]; + } else { + lbSetPicture [70108, _row, getText(configFile >> "CfgMods" >> _dlc >> 'picture')]; + }; lbSetPictureColor [70108, _row, [1, 1, 1, 1]]; lbSetData [70108,_row, _x]; }; @@ -353,8 +380,8 @@ CTI_UI_Gear_TryContainerAddItem = { CTI_UI_Gear_AddItem = { private ["_current", "_get", "_gear", "_index", "_item", "_slot", "_sub_type", "_type", "_updated"]; - - + + _item = toLower(_this); _target = uiNamespace getVariable "cti_dialog_ui_gear_target"; _get = missionNamespace getVariable _item; @@ -395,8 +422,8 @@ CTI_UI_Gear_AddItem = { ((uiNamespace getVariable "cti_dialog_ui_gear") displayCtrl (70006+_index)) ctrlSetTooltip getText(configFile >> 'CfgWeapons' >> _item >> 'displayName'); ((_gear select 3) select 0) set [_index, _item]; - - + + //Test if Special Helmet is present _helmet = (_gear select 2) select 0; if(_helmet == "H_HelmetO_ViperSP_hex_F" || _helmet == "H_HelmetO_ViperSP_ghex_F") then { @@ -413,13 +440,13 @@ CTI_UI_Gear_AddItem = { (_gear select 2) set [_slot, ""]; call CTI_UI_Gear_UpdatePrice; }; - + //delet helmet 6:06:43 "removing item: 0 70004 \A3\Ui_f\data\GUI\Rsc\RscDisplayGear\ui_gear_helmet_gs.paa" - + //delete NVG 16:05:31 "removing item: [0,0] 70006 \A3\Ui_f\data\GUI\Rsc\RscDisplayGear\ui_gear_nvg_gs.paa" }; _updated = true; - + }; }; case "Item": { //--- Uniform, vest, helm, gps, compass, toolkit... @@ -460,9 +487,9 @@ CTI_UI_Gear_AddItem = { if (_current != _item) then { ((uiNamespace getVariable "cti_dialog_ui_gear") displayCtrl 70004) ctrlSetText getText(configFile >> 'CfgWeapons' >> _item >> 'picture'); ((uiNamespace getVariable "cti_dialog_ui_gear") displayCtrl 70004) ctrlSetTooltip getText(configFile >> 'CfgWeapons' >> _item >> 'displayName'); - + (_gear select 2) set [0, _item]; - + //Test if NVG googles is present (dont work with special helmet) if(_item == "H_HelmetO_ViperSP_hex_F" || _item == "H_HelmetO_ViperSP_ghex_F") then { //remove nvg @@ -480,7 +507,7 @@ CTI_UI_Gear_AddItem = { }; }; _updated = true; - + }; }; case (_sub_type in ["Uniform","Vest"]): { @@ -605,8 +632,8 @@ CTI_UI_Gear_CheckMagazines = { _gear = uiNamespace getVariable "cti_dialog_ui_gear_target_gear"; - _magazines_old = (getArray(configFile >> 'CfgWeapons' >> _weapon_old >> 'magazines')) call CTI_CO_FNC_ArrayToLower; - _magazines = (getArray(configFile >> 'CfgWeapons' >> _weapon >> 'magazines')) call CTI_CO_FNC_ArrayToLower; + _magazines_old = ([_weapon_old] call CTI_GET_MAGAZINES) call CTI_CO_FNC_ArrayToLower; + _magazines = ([_weapon] call CTI_GET_MAGAZINES) call CTI_CO_FNC_ArrayToLower; _replace = []; { @@ -1004,7 +1031,7 @@ CTI_UI_Gear_OnShoppingItemDrag = { _gear_sub = (_gear select 0) select _i; if (_gear_sub select 0 != "") then { //--- There is a weapon - _magazines = (getArray(configFile >> 'CfgWeapons' >> (_gear_sub select 0) >> 'magazines')) call CTI_CO_FNC_ArrayToLower; + _magazines = ([_gear_sub select 0] call CTI_GET_MAGAZINES) call CTI_CO_FNC_ArrayToLower; if (_item in _magazines) then { _idcs = _idcs + [77901+_i] }; }; @@ -1049,7 +1076,7 @@ CTI_UI_Gear_OnShoppingItemDrag = { //--- Where does it fit? { if ((_x select 0) != "") then { - if (_item in (getArray(configFile >> _config_type >> (_x select 0) >> 'WeaponSlotsInfo' >> 'MuzzleSlot' >> 'compatibleItems') call CTI_CO_FNC_ArrayToLower)) then {_idcs = _idcs + [_acc_idcs select _forEachIndex]}; + if((toLower _item) in (((_x select 0) call bis_fnc_compatibleItems) call CTI_CO_FNC_ArrayToLower)) then {_idcs = _idcs + [_acc_idcs select _forEachIndex]}; }; } forEach (_gear select 0); }; @@ -1058,7 +1085,7 @@ CTI_UI_Gear_OnShoppingItemDrag = { //--- Where does it fit? { if ((_x select 0) != "") then { - if (_item in (getArray(configFile >> _config_type >> (_x select 0) >> 'WeaponSlotsInfo' >> 'CowsSlot' >> 'compatibleItems') call CTI_CO_FNC_ArrayToLower)) then {_idcs = _idcs + [_acc_idcs select _forEachIndex]}; + if((toLower _item) in (((_x select 0) call bis_fnc_compatibleItems) call CTI_CO_FNC_ArrayToLower)) then {_idcs = _idcs + [_acc_idcs select _forEachIndex]}; }; } forEach (_gear select 0); }; @@ -1067,7 +1094,7 @@ CTI_UI_Gear_OnShoppingItemDrag = { //--- Where does it fit? { if ((_x select 0) != "") then { - if (_item in (getArray(configFile >> _config_type >> (_x select 0) >> 'WeaponSlotsInfo' >> 'PointerSlot' >> 'compatibleItems') call CTI_CO_FNC_ArrayToLower)) then {_idcs = _idcs + [_acc_idcs select _forEachIndex]}; + if((toLower _item) in (((_x select 0) call bis_fnc_compatibleItems) call CTI_CO_FNC_ArrayToLower)) then {_idcs = _idcs + [_acc_idcs select _forEachIndex]}; }; } forEach (_gear select 0); }; @@ -1076,7 +1103,7 @@ CTI_UI_Gear_OnShoppingItemDrag = { //--- Where does it fit? { if ((_x select 0) != "") then { - if (_item in (getArray(configFile >> _config_type >> (_x select 0) >> 'WeaponSlotsInfo' >> 'UnderBarrelSlot' >> 'compatibleItems') call CTI_CO_FNC_ArrayToLower)) then {_idcs = _idcs + [_acc_idcs select _forEachIndex]}; + if((toLower _item) in (((_x select 0) call bis_fnc_compatibleItems) call CTI_CO_FNC_ArrayToLower)) then {_idcs = _idcs + [_acc_idcs select _forEachIndex]}; }; } forEach (_gear select 0); }; @@ -1226,7 +1253,7 @@ CTI_UI_Gear_ChangeCurrentMagazine = { }; CTI_UI_Gear_UpdateLinkedItems = { - private ["_config_type", "_get", "_item", "_magazines"]; + private ["_config_type", "_get", "_item", "_magazines", "_well"]; _item = _this; _config_type = (_item) call CTI_UI_Gear_GetItemBaseConfig; @@ -1234,16 +1261,7 @@ CTI_UI_Gear_UpdateLinkedItems = { if ((lbSize 70601) > 0) then {lbClear 70601}; if (_config_type == "CfgWeapons") then { - // _magazines = (getArray(configFile >> 'CfgWeapons' >> _item >> 'magazines')) call CTI_CO_FNC_ArrayToLower; - _magazines = []; - { - if (_x == "this") then { - _magazines = _magazines + getArray(configFile >> 'CfgWeapons' >> _item >> 'magazines'); - } else { - _magazines = _magazines + getArray(configfile >> 'CfgWeapons' >> _item >> _x >> 'magazines') - }; - } forEach (getArray(configFile >> 'CfgWeapons' >> _item >> 'muzzles')); - + _magazines = [_item] call CTI_GET_MAGAZINES; { _get = missionNamespace getVariable _x; @@ -1365,4 +1383,4 @@ CTI_UI_Gear_RemoveProfileTemplate = { profileNamespace setVariable [format["CTI_PERSISTENT_GEAR_TEMPLATE_%1", CTI_P_SideJoined], _templates]; saveProfileNamespace; }; -}; \ No newline at end of file +}; diff --git a/Client/Functions/UI/Functions_UI_PurchaseMenu.sqf b/Client/Functions/UI/Functions_UI_PurchaseMenu.sqf index 91f1c0290..017db6e73 100644 --- a/Client/Functions/UI/Functions_UI_PurchaseMenu.sqf +++ b/Client/Functions/UI/Functions_UI_PurchaseMenu.sqf @@ -76,7 +76,7 @@ CTI_UI_Purchase_FillUnitsList = { if !(isNil '_var') then { //--- Upgradeable? _load = true; - if (_upgrade > -1) then { + if (_upgrade > -1 || CTI_Debug) then { if (_upgrades select (_var select 5) < _var select CTI_UNIT_UPGRADE) then {_load = false}; }; @@ -85,7 +85,15 @@ CTI_UI_Purchase_FillUnitsList = { if (_type== CTI_FTOWN) then {_cost=_cost*CTI_TOWNS_SHOPS}; _row = ((uiNamespace getVariable "cti_dialog_ui_purchasemenu") displayCtrl 111007) lnbAddRow [format ["$%1",_cost] , _var select CTI_UNIT_LABEL]; ((uiNamespace getVariable "cti_dialog_ui_purchasemenu") displayCtrl 111007) lnbSetData [[_row, 0], _x]; - ((uiNamespace getVariable "cti_dialog_ui_purchasemenu") displayCtrl 111007) lnbSetPicture [[_row, 0], _var select CTI_UNIT_PICTURE]; + _dlc= getText(configFile >> "CfgVehicles" >> _x >> 'DLC') ; + _dlcid = getNumber (configFile >> "CfgMods" >> _dlc >> "appId"); + if (_dlcid in (getDLCs 1)||_dlcid == 0 ) then { + ((uiNamespace getVariable "cti_dialog_ui_purchasemenu") displayCtrl 111007) lnbSetPicture [[_row, 0], _var select CTI_UNIT_PICTURE]; + } else { + ((uiNamespace getVariable "cti_dialog_ui_purchasemenu") displayCtrl 111007) lnbSetPicture [[_row, 0], getText(configFile >> "CfgMods" >> _dlc >> 'picture')]; + }; + + ((uiNamespace getVariable "cti_dialog_ui_purchasemenu") displayCtrl 111007) lnbSetPictureColor [[_row, 0],[1,1,1,1]]; }; }; diff --git a/Client/Functions/UI/Functions_UI_RespawnMenu.sqf b/Client/Functions/UI/Functions_UI_RespawnMenu.sqf index 30a66b14d..5c5bd786f 100644 --- a/Client/Functions/UI/Functions_UI_RespawnMenu.sqf +++ b/Client/Functions/UI/Functions_UI_RespawnMenu.sqf @@ -21,7 +21,7 @@ CTI_UI_Respawn_GetAvailableLocations = { _sid = (CTI_P_SideJoined) call CTI_CO_FNC_GetSideID; _c_towns = ( _sid ) call CTI_CO_FNC_GetSideTowns; _posible =[]; - {if ((_x getVariable "cti_town_capture") == CTI_TOWNS_CAPTURE_VALUE_CEIL) then{ _posible set [count _posible,_x]};} count _c_towns; + {if ((_x getVariable "cti_town_capture") == CTI_TOWNS_CAPTURE_VALUE_CEIL) then{ _posible set [count _posible,_x]}; true} count _c_towns; _t = [CTI_DeathPosition, _posible ] call CTI_CO_FNC_GetClosestEntity; if (! (isNull _t) ) then {_towns pushBack _t;}; @@ -60,7 +60,7 @@ CTI_UI_Respawn_GetMobileRespawn = { _available = []; { - if (CTI_SPECIAL_MEDICALVEHICLE in (_x getVariable ["cti_spec", []]) && (_x getVariable ["cti_net", -1]) == CTI_P_SideID && ((getPosASL _x) select 2)>0) then {_available pushBack _x}; + if (CTI_SPECIAL_MEDICALVEHICLE in (_x getVariable ["cti_spec", []]) && (_x getVariable ["cti_net", -1]) == CTI_P_SideID && ((getPosASL _x) select 2)>0 && ((getPosAtl _x) select 2)<4) then {_available pushBack _x}; } forEach (_center nearEntities [["Car","Air","Tank","Ship","Thing","StaticWeapon"], _range]); _available }; @@ -92,6 +92,7 @@ CTI_UI_Respawn_GetRespawnLabel = { _var = missionNamespace getVariable format ["CTI_%1_%2", CTI_P_SideJoined, _location getVariable "cti_structure_type"]; _value = (_var select 0) select 1; }; + case (typeOf _location == "B_Slingload_01_Medevac_F"): { _value = "Huron Medical Container" }; case (_location == (leader group player)) : {_value=format ["[LEADER] %1",name _location]}; case (_location isKindOf "AllVehicles"&& !(_location == (leader group player))): { _value = getText(configFile >> "CfgVehicles" >> typeOf _location >> "displayName") }; }; @@ -245,16 +246,16 @@ CTI_UI_Respawn_OnRespawnReady = { CTI_P_LastRespawnTime=time; if !(_respawn_ai) then { //--- Stock respawn - if ((_where isKindOf "Car" || _where isKindOf "Wheeled_APC_F" || _where isKindOf "Land_Pod_Heli_Transport_04_medevac_F") && (_where emptyPositions "cargo")>0 && (locked _where < 2 || abs (speed _where) > 5) ) then { + if ((_where isKindOf "Car" || _where isKindOf "Wheeled_APC_F" || _where isKindOf "Land_Pod_Heli_Transport_04_medevac_F") && (_where emptyPositions "cargo")>0 && (locked _where) < 2 && abs (speed _where) > 5) then { //Respawn in vehicles cargo player moveInCargo _where; } else { _spawn_at = [_where, 8, 30] call CTI_CO_FNC_GetRandomPosition; //try to find and position on building position - _nearestbuilding= nearestbuilding _spawn_at; - if (alive _nearestbuilding && ((_spawn_at distance2d _nearestbuilding) < 25) && (!(typeOF _nearestbuilding in CTI_BUILDINGPOS_MISSING))) then { - _buildingpos = _nearestbuilding buildingPos -1; + _nearestbuilding = nearestbuilding _spawn_at; + _buildingpos = _nearestbuilding buildingPos -1; + if (count _buildingpos > 0 && alive _nearestbuilding && ((_spawn_at distance2d _nearestbuilding) < 25) && (!(typeOF _nearestbuilding in CTI_BUILDINGPOS_MISSING))) then { if (count _buildingpos > 10) then { _buildingpos deleteRange [ceil(count _buildingpos / 3), count _buildingpos]; }; diff --git a/Client/GUI/GUI_BuildMenu.sqf b/Client/GUI/GUI_BuildMenu.sqf index 3b87af944..070aa6538 100644 --- a/Client/GUI/GUI_BuildMenu.sqf +++ b/Client/GUI/GUI_BuildMenu.sqf @@ -19,7 +19,7 @@ while { true } do { ((uiNamespace getVariable "cti_dialog_ui_buildmenu") displayCtrl 100008) ctrlSetStructuredText (parseText format["Resources: $%1", _funds, CTI_P_Coloration_Money]); }; - if (_last_workercount != _count&& (missionnamespace getVariable "CTI_BASEBUILDING") < 1) then { + if (_last_workercount != _count&& (missionnamespace getVariable "CTI_BASEBUILDING") != 1) then { ((uiNamespace getVariable "cti_dialog_ui_buildmenu") displayCtrl 100009) ctrlSetStructuredText (parseText format["Workers: %1/%2", _count, CTI_BASE_WORKERS_LIMIT]); }; diff --git a/Client/GUI/GUI_PurchaseMenu.sqf b/Client/GUI/GUI_PurchaseMenu.sqf index 3c1bcaa54..5e7463f0b 100644 --- a/Client/GUI/GUI_PurchaseMenu.sqf +++ b/Client/GUI/GUI_PurchaseMenu.sqf @@ -6,7 +6,7 @@ _lb_queued_content = []; // ((uiNamespace getVariable "cti_dialog_ui_purchasemenu") displayCtrl 110901) ctrlSetStructuredText parseText "Producing: Soldier"; while { true } do { if (isNil {uiNamespace getVariable "cti_dialog_ui_purchasemenu"}) exitWith {}; //--- Menu is closed. - if (Client_AN_Connected) then { + if (Client_AN_Connected || CTI_InBaseArea) then { for "_i" from 110000 to 110007 /* step +1 */ do { ((uiNamespace getVariable "cti_dialog_ui_purchasemenu") displayCtrl _i) ctrlEnable true}; }else{ for "_i" from 110000 to 110007 /* step +1 */ do { ((uiNamespace getVariable "cti_dialog_ui_purchasemenu") displayCtrl _i) ctrlEnable false}; diff --git a/Client/GUI/GUI_UpgradeMenu.sqf b/Client/GUI/GUI_UpgradeMenu.sqf index 4d2e1e8e2..bef6a4644 100644 --- a/Client/GUI/GUI_UpgradeMenu.sqf +++ b/Client/GUI/GUI_UpgradeMenu.sqf @@ -3,6 +3,21 @@ _last_running = -1; _last_upgrades_check = -1; _last_upgrades_tcheck = -1; +_levels_orig = (missionNamespace getVariable Format["CTI_%1_UPGRADES_LEVELS", CTI_P_SideJoined]); +_levels =+ _levels_orig; +_to_delete = []; +_n = 0; +{ + if (!_x) then {_to_delete pushBack _n;}; + _n = _n + 1; + true +} count (missionNamespace getVariable format["CTI_%1_UPGRADES_ENABLED", CTI_P_SideJoined]); + +for "_i" from 0 to (count _to_delete) do +{ + _levels deleteAt ((_to_delete select _i)-_i); +}; + while { true } do { if (isNil {uiNamespace getVariable "cti_dialog_ui_upgrademenu"}) exitWith {}; //--- Menu is closed. @@ -20,14 +35,20 @@ while { true } do { if (time - _last_upgrades_check > .75) then { _last_upgrades_check = time; - _upgrades = (CTI_P_SideJoined) call CTI_CO_FNC_GetSideUpgrades; _need_reload = false; + _upgrades_orig = (CTI_P_SideJoined) call CTI_CO_FNC_GetSideUpgrades; + _upgrades =+ _upgrades_orig; + for "_i" from 0 to (count _to_delete) do + { + _upgrades deleteAt ((_to_delete select _i)-_i); + }; + for '_i' from 0 to ((lnbSize 250002) select 0)-1 do { _value = lnbValue[250002, [_i, 0]]; if ((_upgrades select _i) != _value) then { if (_i == _selected) then {_need_reload = true}; - ((uiNamespace getVariable "cti_dialog_ui_upgrademenu") displayCtrl 250002) lnbSetText [[_i, 0], format["%1/%2", _upgrades select _i, (missionNamespace getVariable Format["CTI_%1_UPGRADES_LEVELS", CTI_P_SideJoined]) select _i]]; + ((uiNamespace getVariable "cti_dialog_ui_upgrademenu") displayCtrl 250002) lnbSetText [[_i, 0], format["%1/%2", _upgrades select _i, _levels select _i]]; ((uiNamespace getVariable "cti_dialog_ui_upgrademenu") displayCtrl 250002) lnbSetValue [[_i, 0], _upgrades select _i]; }; }; diff --git a/Client/Init/Init_Client.sqf b/Client/Init/Init_Client.sqf index a31c8f7ce..34e6ad42a 100644 --- a/Client/Init/Init_Client.sqf +++ b/Client/Init/Init_Client.sqf @@ -5,6 +5,11 @@ NET_LOG=false; +//ensure that player is not "unknown" or civilan - which will break later code +waitUntil { + (side player) in [east, west] +}; + CTI_P_SideJoined = side player; CTI_P_EnemySide = If (side player == WEST) then {EAST} else {WEST}; @@ -105,6 +110,9 @@ if (isMultiplayer) then { }; +waitUntil {CTI_P_SideLogic getVariable ["CTI_LOAD_COMPLETED",false]}; + + //--- Initialize the client PV call compile preprocessFile "Client\Init\Init_PublicVariables.sqf"; @@ -237,7 +245,7 @@ TABLET_KEY_DOWN={ _return=false; disableSerialization; //removed && !CTI_P_Repairing - if (! (_this select 2) && ! (_this select 3) && ! (_this select 4) &&(_this select 1) in ([(profilenamespace getvariable ['CTI_TABLET_KEY',41])]+(actionKeys "User5")) && !visibleMap && !CTI_P_PreBuilding && isNull (uiNamespace getVariable ['cti_dialog_ui_interractions',objNull]) && isNull (uiNamespace getVariable ['cti_dialog_ui_defensemenu',objnull]) && isNull (uiNamespace getVariable ['cti_dialog_ui_purchasemenu',objnull]) && isnull (uiNamespace getVariable ["cti_dialog_ui_tabletmain",objnull]) && (isnull (findDisplay 60490))) then { + if (! (_this select 2) && ! (_this select 3) && ! (_this select 4) &&(_this select 1) in ([(profilenamespace getvariable ['CTI_TABLET_KEY',41])]+(actionKeys "User5")) && !visibleMap && !CTI_P_PreBuilding && isNull (uiNamespace getVariable ['cti_dialog_ui_interractions',objNull]) && isNull (uiNamespace getVariable ['cti_dialog_ui_defensemenu',objnull]) && isNull (uiNamespace getVariable ['cti_dialog_ui_purchasemenu',objnull]) && isnull (uiNamespace getVariable ["cti_dialog_ui_tabletmain",objnull]) && isNull (uiNamespace getVariable ['cti_dialog_ui_comblacklist',objNull])&& (isnull (findDisplay 60490))) then { uiNamespace setVariable ["INT_TARG", call TABLET_GET_TARGET]; createdialog "CTI_RscInteraction"; _return=true; @@ -247,7 +255,7 @@ TABLET_KEY_DOWN={ TABLET_KEY_UP={ _return=false; disableSerialization; - if (! (_this select 2) && ! (_this select 3) && ! (_this select 4) && (_this select 1) in [(profilenamespace getvariable ['CTI_TABLET_KEY',41])] && !isNil {uiNamespace getVariable 'cti_dialog_ui_interractions'}&& isNil {uiNamespace getVariable 'cti_dialog_ui_purchasemenu'} && isNil {uiNamespace getVariable 'cti_dialog_ui_buildmenu'} && isNil {uiNamespace getVariable 'cti_dialog_ui_defensemenu'}&& isNil {uiNamespace getVariable 'cti_dialog_ui_gear'}&& isNil {uiNamespace getVariable 'cti_dialog_ui_aircraftloadoutmenu'} && isnil {uiNamespace getVariable "cti_dialog_ui_tabletmain"} && (isnull (findDisplay 60490)) ) then { + if (! (_this select 2) && ! (_this select 3) && ! (_this select 4) && (_this select 1) in [(profilenamespace getvariable ['CTI_TABLET_KEY',41])] && !isNil {uiNamespace getVariable 'cti_dialog_ui_interractions'}&& isNil {uiNamespace getVariable 'cti_dialog_ui_purchasemenu'} && isNil {uiNamespace getVariable 'cti_dialog_ui_buildmenu'} && isNil {uiNamespace getVariable 'cti_dialog_ui_defensemenu'}&& isNil {uiNamespace getVariable 'cti_dialog_ui_gear'}&& isNil {uiNamespace getVariable 'cti_dialog_ui_aircraftloadoutmenu'} && isnil {uiNamespace getVariable "cti_dialog_ui_tabletmain"} && isNull (uiNamespace getVariable ['cti_dialog_ui_comblacklist',objNull])&& (isnull (findDisplay 60490)) ) then { closeDialog 0; }; _return @@ -260,7 +268,7 @@ TABLET_GET_TARGET={ if (cursortarget iskindof "CAManBase" && ([player,cursortarget] call BIS_fnc_distance2D) <3 ) exitWith {cursortarget}; if (cursortarget == (CTI_P_SideLogic getvariable "cti_hq") && ([player,cursortarget] call BIS_fnc_distance2D) <10 && (isnull attachedTo (CTI_P_SideLogic getvariable "cti_hq") ) ) exitWith {cursortarget}; if (vehicle player != player) exitWith {vehicle player}; - _target = lineintersectsobjs [(eyepos player),(atltoasl screentoworld [0.5,0.5]),objnull,objnull,false,16]; + _target = lineintersectsobjs [(eyepos player),(atltoasl screentoworld [0.5,0.5]),objnull,objnull,false,2]; if (count _target == 0 && !(cursortarget iskindof "CAManBase") && ( [player,cursortarget] call BIS_fnc_distance2D) <8) exitWith {cursortarget}; if ((count _target) == 0) exitWith {player}; if (( [player,(_target select 0)] call BIS_fnc_distance2D) > 8) exitWith {player}; diff --git a/Client/Init/Init_PublicVariables.sqf b/Client/Init/Init_PublicVariables.sqf index a22da7f69..eb5dabb8a 100644 --- a/Client/Init/Init_PublicVariables.sqf +++ b/Client/Init/Init_PublicVariables.sqf @@ -130,8 +130,13 @@ with missionNamespace do { _marker setMarkerTypeLocal format["%1installation", CTI_P_MarkerPrefix]; _marker setMarkerColorLocal "ColorBlack"; _marker setMarkerSizeLocal [0.75, 0.75]; - _type = _structure getVariable ["cti_structure_type", ""]; - _marker setMarkerTextLocal _type; + //_type = _structure getVariable ["cti_structure_type", ""]; + _type = (missionNamespace getVariable format ["CTI_%1_%2", CTI_P_SideJoined, _structure getVariable ["cti_structure_type",""]]) select 0 select 2; + if(isNil "_type") then { + _marker setMarkerTextLocal ""; + } else { + _marker setMarkerTextLocal _type; + }; [_structure,_marker] spawn { private ["_structure","_marker"]; _structure = _this select 0; diff --git a/Common/Config/Artillery/Artillery.sqf b/Common/Config/Artillery/Artillery.sqf index db3a9fe31..e6f5077e0 100644 --- a/Common/Config/Artillery/Artillery.sqf +++ b/Common/Config/Artillery/Artillery.sqf @@ -13,6 +13,11 @@ _m = _m + [["8Rnd_82mm_Mo_shells", "8Rnd_82mm_Mo_Smoke_white", "8Rnd_82mm_Mo_Fla _b = _b + [[1, 2, 4, 8]]; _r = _r + [[[100,2500], [100,3000], [100,3500], [100,4000]]]; +_c = _c + ["I_Mortar_01_F"]; +_m = _m + [["8Rnd_82mm_Mo_shells", "8Rnd_82mm_Mo_Smoke_white", "8Rnd_82mm_Mo_Flare_white", "8Rnd_82mm_Mo_LG"]]; +_b = _b + [[1, 2, 4, 8]]; +_r = _r + [[[100,2500], [100,3000], [100,3500], [100,4000]]]; + _c = _c + ["B_MBT_01_arty_F"]; _m = _m + [["32Rnd_155mm_Mo_shells", "2Rnd_155mm_Mo_Cluster", "2Rnd_155mm_Mo_guided", "2Rnd_155mm_Mo_LG", "6Rnd_155mm_Mo_smoke", "6Rnd_155mm_Mo_mine", "6Rnd_155mm_Mo_AT_mine"]]; _b = _b + [[2, 4, 8, 12]]; diff --git a/Common/Config/Base/Base_East.sqf b/Common/Config/Base/Base_East.sqf index a4500e075..6f87c37cc 100644 --- a/Common/Config/Base/Base_East.sqf +++ b/Common/Config/Base/Base_East.sqf @@ -10,7 +10,9 @@ missionNamespace setVariable [format["CTI_%1_Base_Template", _side], [ [CTI_HEAVY, 0, [-30,-40]], [CTI_AIR, 180, [-60,37]], [CTI_REPAIR, 180, [60,37]], - [CTI_AMMO, 180, [80,37]] + [CTI_AMMO, 180, [80,37]], + [CTI_RADAR, 0, [-60,-40]], + [CTI_NAVAL, 0, [60,-40]] ]]; //--- Commander course of action ["Action", Parameter(s), Condition] @@ -36,7 +38,7 @@ missionNamespace setVariable [format["CTI_%1_Commander_Path", _side], [ ["upgrade", [CTI_UPGRADE_HALO, 1], {true}], ["build-structures", CTI_RADAR, {true}], ["build-structures", CTI_NAVAL, {true}], - + ["upgrade", [CTI_UPGRADE_REST, 1], {true}], ["upgrade", [CTI_UPGRADE_REST, 2], {true}], ["upgrade", [CTI_UPGRADE_REST, 3], {true}], @@ -54,13 +56,13 @@ missionNamespace setVariable [format["CTI_%1_Commander_Path", _side], [ ["upgrade", [CTI_UPGRADE_DATA, 1], {true}], ["upgrade", [CTI_UPGRADE_EXPI, 1], {true}], ["upgrade", [CTI_UPGRADE_EXPI, 2], {true}], - + ["upgrade", [CTI_UPGRADE_AIR, 1], {true}], ["upgrade", [CTI_UPGRADE_AIR_CM, 1], {true}], ["upgrade", [CTI_UPGRADE_AIR_AT, 1], {true}], ["upgrade", [CTI_UPGRADE_AIR_FFAR, 1], {true}], ["upgrade", [CTI_UPGRADE_AIR_AA, 1], {true}], - + ["upgrade", [CTI_UPGRADE_BARRACKS, 3], {true}], ["upgrade", [CTI_UPGRADE_AAF, 3], {true}], ["upgrade", [CTI_UPGRADE_REST, 4], {true}], @@ -70,7 +72,7 @@ missionNamespace setVariable [format["CTI_%1_Commander_Path", _side], [ ["upgrade", [CTI_UPGRADE_AAF, 4], {true}], ["upgrade", [CTI_UPGRADE_AAF, 5], {true}], ["upgrade", [CTI_UPGRADE_AAF, 6], {true}], - + ["upgrade", [CTI_UPGRADE_HEAVY, 2], {true}], ["upgrade", [CTI_UPGRADE_SATELLITE, 1], {true}] ]]; @@ -153,7 +155,7 @@ _placements =_placements + [[180, 30]]; _specials = _specials + [[["DMG_Reduce", 1.5]]];*/ -_headers = _headers + [[CTI_BARRACKS, localize "STR_Up_Barracks", localize "STR_Up_Barracks"]]; +_headers = _headers + [[CTI_BARRACKS, localize "STR_Barracks", localize "STR_Barracks_1"]]; _classes = _classes + [["Land_Cargo_House_V1_F", "Land_Cargo_House_V1_ruins_F"]]; _prices = _prices + [1000]; _times = _times + [60]; @@ -172,7 +174,7 @@ _classes = _classes + [["Land_i_House_Small_03_V1_F", "Land_House_Small_03_V1_ _prices = _prices + [3000]; _times = _times + [90]; _placements = _placements + [[180, 20]]; -_specials = _specials + [[["Connected"],["DMG_Alternative"],["DMG_Reduce", 0.2]]]; +_specials = _specials + [[["Connected"],["DMG_Alternative"],["DMG_Reduce", 0.5]]]; _headers = _headers + [[CTI_HEAVY, localize "STR_Heavy_Vehicle_Factory", localize "STR_Heavy_Vehicle_Factory_1"]]; _classes = _classes + [["Land_Cargo_HQ_V1_F", "Land_Cargo_HQ_V1_ruins_F"]]; @@ -225,34 +227,76 @@ _prices = []; _placements = []; _categories = []; +_headers = _headers + ["M2 HMG .50 (low)"]; +_classes = _classes + ["O_G_HMG_02_F"]; +_prices = _prices + [150]; +_placements = _placements + [[180, 5]]; +_categories = _categories + ["Defense"]; + +_headers = _headers + ["M2 HMG .50 (raised)"]; +_classes = _classes + ["O_G_HMG_02_high_F"]; +_prices = _prices + [150]; +_placements = _placements + [[180, 5]]; +_categories = _categories + ["Defense"]; + +_headers = _headers + ["MG Defense"]; +_classes = _classes + ["O_HMG_01_High_F"]; +_prices = _prices + [200]; +_placements = _placements + [[180, 5]]; +_categories = _categories + ["Defense"]; + +_headers = _headers + ["GL Defense"]; +_classes = _classes + ["O_GMG_01_high_F"]; +_prices = _prices + [350]; +_placements = _placements + [[180, 5]]; +_categories = _categories + ["Defense"]; + +_headers = _headers + ["AT Defense"]; +_classes = _classes + ["O_static_AT_F"]; +_prices = _prices + [900]; +_placements = _placements + [[180, 5]]; +_categories = _categories + ["Defense"]; + +_headers = _headers + ["AA Defense"]; +_classes = _classes + ["O_static_AA_F"]; +_prices = _prices + [800]; +_placements = _placements + [[180, 5]]; +_categories = _categories + ["Defense"]; +if (ISLAND != 1) then { +_headers = _headers + ["Mortar"]; +_classes = _classes + ["O_Mortar_01_F"]; +_prices = _prices + [10000]; +_placements = _placements + [[180, 5]]; +_categories = _categories + ["Defense"]; +}; _headers = _headers + [["Praetorian 1C - Only on BASE Areas", [["DMG_Reduce", 10]]]]; _classes = _classes + ["B_AAA_System_01_F"]; -_prices = _prices + [40000]; +_prices = _prices + [25000]; _placements = _placements + [[180, 15]]; _categories = _categories + ["Defense"]; - +if (ISLAND != 1) then { _headers = _headers + [["Mk49 Spartan - Only on BASE Areas", [["DMG_Reduce", 10]]]]; _classes = _classes + ["B_SAM_System_01_F"]; -_prices = _prices + [60000]; -_placements = _placements + [[180, 15]]; -_categories = _categories + ["Defense"]; - -_headers = _headers + [["Mk21 Centurion - Only on BASE Areas", [["DMG_Reduce", 10]]]]; -_classes = _classes + ["B_SAM_System_02_F"]; -_prices = _prices + [80000]; +_prices = _prices + [40000]; _placements = _placements + [[180, 15]]; _categories = _categories + ["Defense"]; +//_headers = _headers + [["Mk21 Centurion - Only on BASE Areas", [["DMG_Reduce", 10]]]]; +//_classes = _classes + ["B_SAM_System_02_F"]; +//_prices = _prices + [80000]; +//_placements = _placements + [[180, 15]]; +//_categories = _categories + ["Defense"]; +}; _headers = _headers + ["R-750 Cronus Radar - Only on BASE Areas"]; _classes = _classes + ["O_Radar_System_02_F"]; -_prices = _prices + [12000]; +_prices = _prices + [20000]; _placements = _placements + [[180, 15]]; _categories = _categories + ["Defense"]; _headers = _headers + ["S-750 Rhea - Only on BASE Areas"]; _classes = _classes + ["O_SAM_System_04_F"]; -_prices = _prices + [40000]; +_prices = _prices + [50000]; _placements = _placements + [[180, 15]]; _categories = _categories + ["Defense"]; @@ -375,36 +419,7 @@ if ((missionNamespace getVariable "CTI_RESPAWN_FOB_RANGE")> 0) then { _placements = _placements + [[180, 15]]; _categories = _categories + ["Fortification"]; }; -_headers = _headers + ["MG Defense"]; -_classes = _classes + ["O_HMG_01_High_F"]; -_prices = _prices + [200]; -_placements = _placements + [[180, 5]]; -_categories = _categories + ["Defense"]; -_headers = _headers + ["GL Defense"]; -_classes = _classes + ["O_GMG_01_high_F"]; -_prices = _prices + [350]; -_placements = _placements + [[180, 5]]; -_categories = _categories + ["Defense"]; - -_headers = _headers + ["AT Defense"]; -_classes = _classes + ["O_static_AT_F"]; -_prices = _prices + [900]; -_placements = _placements + [[180, 5]]; -_categories = _categories + ["Defense"]; - -_headers = _headers + ["AA Defense"]; -_classes = _classes + ["O_static_AA_F"]; -_prices = _prices + [800]; -_placements = _placements + [[180, 5]]; -_categories = _categories + ["Defense"]; -if !(MADE_FOR_STRATIS) then { -_headers = _headers + ["Mortar"]; -_classes = _classes + ["O_Mortar_01_F"]; -_prices = _prices + [3000]; -_placements = _placements + [[180, 5]]; -_categories = _categories + ["Defense"]; -}; _headers = _headers + ["Camo net"]; _classes = _classes + ["CamoNet_OPFOR_F"]; diff --git a/Common/Config/Base/Base_West.sqf b/Common/Config/Base/Base_West.sqf index 25f3cce80..1d79fe1ec 100644 --- a/Common/Config/Base/Base_West.sqf +++ b/Common/Config/Base/Base_West.sqf @@ -10,7 +10,9 @@ missionNamespace setVariable [format["CTI_%1_Base_Template", _side], [ [CTI_HEAVY, 0, [-30,-40]], [CTI_AIR, 180, [-60,37]], [CTI_REPAIR, 180, [60,37]], - [CTI_AMMO, 180, [80,37]] + [CTI_AMMO, 180, [80,37]], + [CTI_RADAR, 0, [-60,-40]], + [CTI_NAVAL, 0, [60,-40]] ]]; // checks: structure -> not in WIP and still alive & kicking & can build with area? @@ -40,7 +42,7 @@ missionNamespace setVariable [format["CTI_%1_Commander_Path", _side], [ ["upgrade", [CTI_UPGRADE_HALO, 1], {true}], ["build-structures", CTI_RADAR, {true}], ["build-structures", CTI_NAVAL, {true}], - + ["upgrade", [CTI_UPGRADE_REST, 1], {true}], ["upgrade", [CTI_UPGRADE_REST, 2], {true}], ["upgrade", [CTI_UPGRADE_REST, 3], {true}], @@ -58,13 +60,13 @@ missionNamespace setVariable [format["CTI_%1_Commander_Path", _side], [ ["upgrade", [CTI_UPGRADE_DATA, 1], {true}], ["upgrade", [CTI_UPGRADE_EXPI, 1], {true}], ["upgrade", [CTI_UPGRADE_EXPI, 2], {true}], - + ["upgrade", [CTI_UPGRADE_AIR, 1], {true}], ["upgrade", [CTI_UPGRADE_AIR_CM, 1], {true}], ["upgrade", [CTI_UPGRADE_AIR_AT, 1], {true}], ["upgrade", [CTI_UPGRADE_AIR_FFAR, 1], {true}], ["upgrade", [CTI_UPGRADE_AIR_AA, 1], {true}], - + ["upgrade", [CTI_UPGRADE_BARRACKS, 3], {true}], ["upgrade", [CTI_UPGRADE_AAF, 3], {true}], ["upgrade", [CTI_UPGRADE_REST, 4], {true}], @@ -74,7 +76,7 @@ missionNamespace setVariable [format["CTI_%1_Commander_Path", _side], [ ["upgrade", [CTI_UPGRADE_AAF, 4], {true}], ["upgrade", [CTI_UPGRADE_AAF, 5], {true}], ["upgrade", [CTI_UPGRADE_AAF, 6], {true}], - + ["upgrade", [CTI_UPGRADE_HEAVY, 2], {true}], ["upgrade", [CTI_UPGRADE_SATELLITE, 1], {true}] ]]; @@ -158,7 +160,7 @@ _times = _times +[120]; _placements =_placements + [[180, 30]]; _specials = _specials + [[["DMG_Reduce", 1.5]]];*/ -_headers = _headers + [[CTI_BARRACKS, localize "STR_Up_Barracks", localize "STR_Up_Barracks"]]; +_headers = _headers + [[CTI_BARRACKS, localize "STR_Barracks", localize "STR_Barracks_1"]]; _classes = _classes + [["Land_Cargo_House_V1_F", "Land_Cargo_House_V1_ruins_F"]]; _prices = _prices + [1000]; _times = _times + [60]; @@ -177,7 +179,7 @@ _classes = _classes + [["Land_i_House_Small_03_V1_F", "Land_House_Small_03_V1_ _prices = _prices + [3000]; _times = _times + [90]; _placements = _placements + [[180, 20]]; -_specials = _specials + [[["Connected"],["DMG_Alternative"],["DMG_Reduce", 0.2]]]; +_specials = _specials + [[["Connected"],["DMG_Alternative"],["DMG_Reduce", 0.5]]]; _headers = _headers + [[CTI_HEAVY, localize "STR_Heavy_Vehicle_Factory", localize "STR_Heavy_Vehicle_Factory_1"]]; _classes = _classes + [["Land_Cargo_HQ_V1_F", "Land_Cargo_HQ_V1_ruins_F"]]; @@ -231,33 +233,76 @@ _placements = []; _categories = []; +_headers = _headers + ["M2 HMG .50 (low)"]; +_classes = _classes + ["B_G_HMG_02_F"]; +_prices = _prices + [150]; +_placements = _placements + [[180, 5]]; +_categories = _categories + ["Defense"]; + +_headers = _headers + ["M2 HMG .50 (raised)"]; +_classes = _classes + ["B_G_HMG_02_high_F"]; +_prices = _prices + [150]; +_placements = _placements + [[180, 5]]; +_categories = _categories + ["Defense"]; + +_headers = _headers + ["MG Defense"]; +_classes = _classes + ["B_HMG_01_High_F"]; +_prices = _prices + [200]; +_placements = _placements + [[180, 5]]; +_categories = _categories + ["Defense"]; + +_headers = _headers + ["GL Defense"]; +_classes = _classes + ["B_GMG_01_high_F"]; +_prices = _prices + [350]; +_placements = _placements + [[180, 5]]; +_categories = _categories + ["Defense"]; + +_headers = _headers + ["AT Defense"]; +_classes = _classes + ["B_static_AT_F"]; +_prices = _prices + [900]; +_placements = _placements + [[180, 5]]; +_categories = _categories + ["Defense"]; + +_headers = _headers + ["AA Defense"]; +_classes = _classes + ["B_static_AA_F"]; +_prices = _prices + [800]; +_placements = _placements + [[180, 5]]; +_categories = _categories + ["Defense"]; +if (ISLAND != 1) then { +_headers = _headers + ["Mortar"]; +_classes = _classes + ["B_Mortar_01_F"]; +_prices = _prices + [10000]; +_placements = _placements + [[180, 5]]; +_categories = _categories + ["Defense"]; +}; + _headers = _headers + [["Praetorian 1C - Only on BASE Areas", [["DMG_Reduce", 10]]]]; _classes = _classes + ["B_AAA_System_01_F"]; -_prices = _prices + [40000]; +_prices = _prices + [25000]; _placements = _placements + [[180, 15]]; _categories = _categories + ["Defense"]; - +if (ISLAND != 1) then { _headers = _headers + [["Mk49 Spartan - Only on BASE Areas", [["DMG_Reduce", 10]]]]; _classes = _classes + ["B_SAM_System_01_F"]; -_prices = _prices + [60000]; -_placements = _placements + [[180, 15]]; -_categories = _categories + ["Defense"]; - -_headers = _headers + [["Mk21 Centurion - Only on BASE Areas", [["DMG_Reduce", 10]]]]; -_classes = _classes + ["B_SAM_System_02_F"]; -_prices = _prices + [80000]; +_prices = _prices + [40000]; _placements = _placements + [[180, 15]]; _categories = _categories + ["Defense"]; +//_headers = _headers + [["Mk21 Centurion - Only on BASE Areas", [["DMG_Reduce", 10]]]]; +//_classes = _classes + ["B_SAM_System_02_F"]; +//_prices = _prices + [80000]; +//_placements = _placements + [[180, 15]]; +//_categories = _categories + ["Defense"]; +}; _headers = _headers + ["AN/MPQ-105 Radar - Only on BASE Areas"]; _classes = _classes + ["B_Radar_System_01_F"]; -_prices = _prices + [12000]; +_prices = _prices + [20000]; _placements = _placements + [[180, 15]]; _categories = _categories + ["Defense"]; _headers = _headers + ["MIM-145 Defender - Only on BASE Areas"]; _classes = _classes + ["B_SAM_System_03_F"]; -_prices = _prices + [40000]; +_prices = _prices + [50000]; _placements = _placements + [[180, 15]]; _categories = _categories + ["Defense"]; @@ -377,36 +422,7 @@ if ((missionNamespace getVariable "CTI_RESPAWN_FOB_RANGE")> 0) then { _placements = _placements + [[180, 15]]; _categories = _categories + ["Fortification"]; }; -_headers = _headers + ["MG Defense"]; -_classes = _classes + ["B_HMG_01_High_F"]; -_prices = _prices + [200]; -_placements = _placements + [[180, 5]]; -_categories = _categories + ["Defense"]; -_headers = _headers + ["GL Defense"]; -_classes = _classes + ["B_GMG_01_high_F"]; -_prices = _prices + [350]; -_placements = _placements + [[180, 5]]; -_categories = _categories + ["Defense"]; - -_headers = _headers + ["AT Defense"]; -_classes = _classes + ["B_static_AT_F"]; -_prices = _prices + [900]; -_placements = _placements + [[180, 5]]; -_categories = _categories + ["Defense"]; - -_headers = _headers + ["AA Defense"]; -_classes = _classes + ["B_static_AA_F"]; -_prices = _prices + [800]; -_placements = _placements + [[180, 5]]; -_categories = _categories + ["Defense"]; -if !(MADE_FOR_STRATIS) then { -_headers = _headers + ["Mortar"]; -_classes = _classes + ["B_Mortar_01_F"]; -_prices = _prices + [3000]; -_placements = _placements + [[180, 5]]; -_categories = _categories + ["Defense"]; -}; _headers = _headers + ["Camo net"]; _classes = _classes + ["CamoNet_BLUFOR_F"]; diff --git a/Common/Config/Factories/Factory_East.sqf b/Common/Config/Factories/Factory_East.sqf index e21693765..283480fb9 100644 --- a/Common/Config/Factories/Factory_East.sqf +++ b/Common/Config/Factories/Factory_East.sqf @@ -26,7 +26,7 @@ missionNamespace setVariable [format["CTI_%1_Vehicles_Startup", _side], [ ["Toolkit", 3], ["B_FieldPack_ocamo", 4], ["Binocular", 2] - ]], + ]]/*, ["O_MRAP_02_F", [ ["firstaidkit", 10], ["30Rnd_556x45_Stanag", 15], @@ -34,7 +34,7 @@ missionNamespace setVariable [format["CTI_%1_Vehicles_Startup", _side], [ ["launch_RPG7_F", 2], ["RPG7_F", 6], ["Binocular", 1], ["Toolkit", 1] - ]] + ]]*/ //, ["O_Heli_Light_02_unarmed_F", []] ]]; @@ -122,7 +122,7 @@ _u = _u + ['C_Hatchback_01_sport_F']; _u = _u + ['C_Kart_01_F']; _u = _u + ['I_Truck_02_MRL_F']; missionNamespace setVariable [format ["CTI_%1_%2Units", _side, CTI_LIGHT], _u]; - +if(CTI_SHOPS_HEAVY==1) then { _u = ["O_APC_Tracked_02_cannon_F"]; _u = _u + ['O_APC_Wheeled_02_rcws_v2_F']; _u = _u + ["O_MBT_02_cannon_F"]; @@ -137,8 +137,14 @@ _u = _u + ['I_LT_01_cannon_F']; _u = _u + ['I_LT_01_AA_F']; _u = _u + ['I_LT_01_AT_F']; _u = _u + ['I_MBT_03_cannon_F']; +} else { +_u = ['I_LT_01_scout_F']; +_u = _u + ['I_LT_01_cannon_F']; +_u = _u + ['I_LT_01_AA_F']; +_u = _u + ['I_LT_01_AT_F']; +}; missionNamespace setVariable [format ["CTI_%1_%2Units", _side, CTI_HEAVY], _u]; - +if(CTI_SHOPS_HEAVY==1) then { _u = ['O_Heli_Light_02_unarmed_F']; _u = _u + ['O_Heli_Transport_04_F']; _u = _u + ['C_Heli_Light_01_civil_F']; @@ -167,6 +173,28 @@ _u = _u + ['Land_Pod_Heli_Transport_04_medevac_F']; _u = _u + ['Land_Pod_Heli_Transport_04_covered_F']; _u = _u + ['Land_Pod_Heli_Transport_04_bench_F']; _u = _u + ['Land_Device_slingloadable_F']; +} else { +_u = ['O_Heli_Light_02_unarmed_F']; +_u = _u + ['O_Heli_Transport_04_F']; +_u = _u + ['C_Heli_Light_01_civil_F']; +_u = _u + ['C_Plane_Civil_01_F']; +_u = _u + ['O_Heli_Transport_04_bench_F']; +_u = _u + ['O_Heli_Transport_04_covered_F']; +_u = _u + ['O_Heli_Light_02_dynamicLoadout_F']; +_u = _u + ['O_Heli_Attack_02_dynamicLoadout_F']; +_u = _u + ['O_Heli_Attack_02_dynamicLoadout_black_F']; +_u = _u + ['O_T_VTOL_02_infantry_dynamicLoadout_F']; +_u = _u + ['O_T_VTOL_02_vehicle_dynamicLoadout_F']; +_u = _u + ['O_UAV_02_F']; +_u = _u + ['O_UAV_02_CAS_F']; +_u = _u + ['O_UAV_02_dynamicLoadout_F']; +_u = _u + ['O_Plane_CAS_02_dynamicLoadout_F']; +_u = _u + ['I_Plane_Fighter_03_CAS_F']; +_u = _u + ['Land_Pod_Heli_Transport_04_medevac_F']; +_u = _u + ['Land_Pod_Heli_Transport_04_covered_F']; +_u = _u + ['Land_Pod_Heli_Transport_04_bench_F']; +_u = _u + ['Land_Device_slingloadable_F']; +}; missionNamespace setVariable [format ["CTI_%1_%2Units", _side, CTI_AIR], _u]; _u = ["O_Truck_02_box_F"]; @@ -186,6 +214,7 @@ missionNamespace setVariable [format ["CTI_%1_%2Units", _side, CTI_AMMO], _u]; _u = ['C_Scooter_Transport_01_F']; _u = _u + ['O_Boat_Transport_01_F']; +_u = _u + ['I_C_Boat_Transport_02_F']; _u = _u + ['O_Boat_Armed_01_hmg_F']; _u = _u + ['O_SDV_01_F']; _u = _u + ['C_Boat_Civil_01_police_F']; @@ -198,7 +227,7 @@ _u = ['O_Soldier_F']; _u = _u + ['O_supplyCrate_F']; _u = _u + ['O_Quadbike_01_F']; _u = _u + ['O_G_Offroad_01_F']; -_u = _u + ['O_G_Offroad_01_armed_F']; -_u = _u + ['O_G_Offroad_01_AT_F']; +//u = _u + ['O_G_Offroad_01_armed_F']; Prevent abuse +//_u = _u + ['O_G_Offroad_01_AT_F']; missionNamespace setVariable [format ["CTI_%1_%2Units", _side, CTI_FTOWN], _u]; \ No newline at end of file diff --git a/Common/Config/Factories/Factory_West.sqf b/Common/Config/Factories/Factory_West.sqf index 7d4bcfdad..cb2e02a84 100644 --- a/Common/Config/Factories/Factory_West.sqf +++ b/Common/Config/Factories/Factory_West.sqf @@ -26,7 +26,7 @@ missionNamespace setVariable [format["CTI_%1_Vehicles_Startup", _side], [ ["Toolkit", 3], ["B_AssaultPack_rgr", 4], ["Binocular", 2] - ]], + ]]/*, ["B_MRAP_01_F", [ ["firstaidkit", 10], ["30Rnd_556x45_Stanag", 15], @@ -34,7 +34,7 @@ missionNamespace setVariable [format["CTI_%1_Vehicles_Startup", _side], [ ["launch_MRAWS_olive_rail_F", 2], ["MRAWS_HEAT_F", 6], ["Binocular", 1], ["Toolkit", 1] - ]] + ]]*/ //, ["B_Heli_Transport_01_F", []] ]]; @@ -111,7 +111,7 @@ _u = _u + ['C_Kart_01_F']; _u = _u + ['I_Truck_02_MRL_F']; missionNamespace setVariable [format ["CTI_%1_%2Units", _side, CTI_LIGHT], _u]; - +if(CTI_SHOPS_HEAVY==1) then { _u = ["B_APC_Tracked_01_rcws_F"]; _u = _u + ["B_APC_Wheeled_01_cannon_F"]; _u = _u + ["B_AFV_Wheeled_01_cannon_F"]; @@ -128,8 +128,15 @@ _u = _u + ['I_LT_01_cannon_F']; _u = _u + ['I_LT_01_AA_F']; _u = _u + ['I_LT_01_AT_F']; _u = _u + ['I_MBT_03_cannon_F']; +} else { +_u = ['I_LT_01_scout_F']; +_u = _u + ['I_LT_01_cannon_F']; +_u = _u + ['I_LT_01_AA_F']; +_u = _u + ['I_LT_01_AT_F']; +}; missionNamespace setVariable [format ["CTI_%1_%2Units", _side, CTI_HEAVY], _u]; +if(CTI_SHOPS_HEAVY==1) then { _u = ["B_Heli_Light_01_dynamicLoadout_F"]; _u = _u + ['C_Plane_Civil_01_F']; _u = _u + ["B_T_VTOL_01_infantry_F"]; @@ -156,6 +163,25 @@ _u = _u + ['I_Plane_Fighter_03_CAS_F']; _u = _u + ['I_Plane_Fighter_04_F']; _u = _u + ['B_Slingload_01_Medevac_F']; _u = _u + ['Land_Device_slingloadable_F']; +} else { +_u = ["B_Heli_Light_01_dynamicLoadout_F"]; +_u = _u + ['C_Plane_Civil_01_F']; +_u = _u + ["B_T_VTOL_01_infantry_F"]; +_u = _u + ["B_T_VTOL_01_vehicle_F"]; +_u = _u + ["B_T_VTOL_01_armed_F"]; +_u = _u + ["B_Heli_Transport_01_F"]; +_u = _u + ["B_Heli_Transport_03_unarmed_F"]; +_u = _u + ["B_Heli_Transport_03_F"]; +_u = _u + ["B_Heli_Light_01_F"]; +_u = _u + ["B_Heli_Attack_01_dynamicLoadout_F"]; +_u = _u + ["B_UAV_02_F"]; +_u = _u + ["B_UAV_02_CAS_F"]; +_u = _u + ["B_UAV_02_dynamicLoadout_F"]; +_u = _u + ["B_Plane_CAS_01_dynamicLoadout_F"]; +_u = _u + ['I_Plane_Fighter_03_CAS_F']; +_u = _u + ['B_Slingload_01_Medevac_F']; +_u = _u + ['Land_Device_slingloadable_F']; +}; missionNamespace setVariable [format ["CTI_%1_%2Units", _side, CTI_AIR], _u]; _u = ["B_Truck_01_Repair_F"]; @@ -172,6 +198,7 @@ missionNamespace setVariable [format ["CTI_%1_%2Units", _side, CTI_AMMO], _u]; _u = ["C_Scooter_Transport_01_F"]; _u = _u + ["B_Boat_Transport_01_F"]; +_u = _u + ["I_C_Boat_Transport_02_F"]; _u = _u + ["B_Boat_Armed_01_minigun_F"]; _u = _u + ["B_SDV_01_F"]; _u = _u + ["C_Boat_Civil_01_rescue_F"]; @@ -184,7 +211,7 @@ _u = ['B_Soldier_F']; _u = _u + ['B_supplyCrate_F']; _u = _u + ['B_Quadbike_01_F']; _u = _u + ['B_G_Offroad_01_F']; -_u = _u + ['B_G_Offroad_01_armed_F']; -_u = _u + ['B_G_Offroad_01_AT_F']; +//_u = _u + ['B_G_Offroad_01_armed_F']; prevent abuse +//_u = _u + ['B_G_Offroad_01_AT_F']; prevent abuse missionNamespace setVariable [format ["CTI_%1_%2Units", _side, CTI_FTOWN], _u]; \ No newline at end of file diff --git a/Common/Config/Gear/Gear_East.sqf b/Common/Config/Gear/Gear_East.sqf index 103bff484..c165eb027 100644 --- a/Common/Config/Gear/Gear_East.sqf +++ b/Common/Config/Gear/Gear_East.sqf @@ -118,6 +118,10 @@ _i = _i + ["30Rnd_545x39_Mag_Tracer_Green_F"]; _u = _u + [0]; _p = _p + [20]; +_i = _i + ["50Rnd_570x28_SMG_03"]; +_u = _u + [0]; +_p = _p + [20]; + //Rifles Ammo _i = _i + ["30Rnd_556x45_Stanag_red"]; _u = _u + [0]; @@ -155,6 +159,46 @@ _i = _i + ["30Rnd_762x39_Mag_Tracer_Green_F"]; _u = _u + [1]; _p = _p + [30]; +_i = _i + ["30Rnd_762x39_AK12_Mag_F"]; +_u = _u + [1]; +_p = _p + [30]; + +_i = _i + ["30Rnd_762x39_AK12_Mag_Tracer_F"]; +_u = _u + [1]; +_p = _p + [30]; + +_i = _i + ["30rnd_762x39_AK12_Arid_Mag_F"]; +_u = _u + [2]; +_p = _p + [30]; + +_i = _i + ["30rnd_762x39_AK12_Arid_Mag_Tracer_F"]; +_u = _u + [2]; +_p = _p + [30]; + +_i = _i + ["75Rnd_762x39_Mag_F"]; +_u = _u + [3]; +_p = _p + [50]; + +_i = _i + ["75Rnd_762x39_Mag_Tracer_F"]; +_u = _u + [3]; +_p = _p + [50]; + +_i = _i + ["75rnd_762x39_AK12_Mag_F"]; +_u = _u + [3]; +_p = _p + [50]; + +_i = _i + ["75rnd_762x39_AK12_Mag_Tracer_F"]; +_u = _u + [3]; +_p = _p + [50]; + +_i = _i + ["75rnd_762x39_AK12_Arid_Mag_F"]; +_u = _u + [3]; +_p = _p + [50]; + +_i = _i + ["75rnd_762x39_AK12_Arid_Mag_Tracer_F"]; +_u = _u + [3]; +_p = _p + [50]; + _i = _i + ["30Rnd_65x39_caseless_green"]; _u = _u + [1]; _p = _p + [30]; @@ -179,6 +223,14 @@ _i = _i + ["20Rnd_556x45_UW_mag"]; _u = _u + [2]; _p = _p + [50]; +_i = _i + ["2Rnd_12Gauge_Pellets"]; +_u = _u + [0]; +_p = _p + [5]; + +_i = _i + ["2Rnd_12Gauge_Slug"]; +_u = _u + [0]; +_p = _p + [5]; + //MG Ammo _i = _i + ["150Rnd_762x54_Box"]; _u = _u + [2]; @@ -200,6 +252,22 @@ _i = _i + ["100Rnd_580x42_Mag_Tracer_F"]; _u = _u + [1]; _p = _p + [30]; +_i = _i + ["100Rnd_580x42_hex_Mag_F"]; +_u = _u + [1]; +_p = _p + [30]; + +_i = _i + ["100Rnd_580x42_hex_Mag_Tracer_F"]; +_u = _u + [1]; +_p = _p + [30]; + +_i = _i + ["100Rnd_580x42_ghex_Mag_F"]; +_u = _u + [1]; +_p = _p + [30]; + +_i = _i + ["100Rnd_580x42_ghex_Mag_Tracer_F"]; +_u = _u + [1]; +_p = _p + [30]; + //Sniper rifles Ammo _i = _i + ["10Rnd_762x54_Mag"]; _u = _u + [2]; @@ -219,11 +287,11 @@ _p = _p + [150]; _i = _i + ["5Rnd_127x108_Mag"]; _u = _u + [3]; -_p = _p + [250]; +_p = _p + [150]; _i = _i + ["5Rnd_127x108_APDS_Mag"]; _u = _u + [3]; -_p = _p + [250]; +_p = _p + [150]; //Launchers Ammo _i = _i + ["RPG7_F"]; @@ -239,12 +307,12 @@ _u = _u + [1]; _p = _p + [50]; _i = _i + ["Vorona_HEAT"]; -_u = _u + [2]; -_p = _p + [170]; +_u = _u + [3]; +_p = _p + [350]; _i = _i + ["Vorona_HE"]; -_u = _u + [2]; -_p = _p + [100]; +_u = _u + [3]; +_p = _p + [150]; _i = _i + ["Titan_AA"]; _u = _u + [2]; @@ -256,7 +324,7 @@ _p = _p + [100]; _i = _i + ["Titan_AT"]; _u = _u + [3]; -_p = _p + [250]; +_p = _p + [550]; //Grenades _i = _i + ["HandGrenade"]; @@ -380,6 +448,38 @@ _i = _i + ["SMG_02_F"]; _u = _u + [0]; _p = _p + [10]; +_i = _i + ["SMG_03C_black"]; +_u = _u + [0]; +_p = _p + [15]; + +_i = _i + ["SMG_03C_hex"]; +_u = _u + [0]; +_p = _p + [15]; + +_i = _i + ["SMG_03_black"]; +_u = _u + [0]; +_p = _p + [15]; + +_i = _i + ["SMG_03_hex"]; +_u = _u + [0]; +_p = _p + [15]; + +_i = _i + ["SMG_03C_TR_black"]; +_u = _u + [1]; +_p = _p + [20]; + +_i = _i + ["SMG_03C_TR_hex"]; +_u = _u + [1]; +_p = _p + [20]; + +_i = _i + ["SMG_03_TR_black"]; +_u = _u + [1]; +_p = _p + [20]; + +_i = _i + ["SMG_03_TR_hex"]; +_u = _u + [1]; +_p = _p + [20]; + _i = _i + ["arifle_AKS_F"]; _u = _u + [0]; _p = _p + [30]; @@ -456,6 +556,14 @@ _i = _i + ["arifle_CTARS_hex_F"]; _u = _u + [1]; _p = _p + [50]; +_i = _i + ["arifle_AK12U_F"]; +_u = _u + [2]; +_p = _p + [80]; + +_i = _i + ["arifle_AK12U_arid_F"]; +_u = _u + [2]; +_p = _p + [80]; + _i = _i + ["arifle_AK12_F"]; _u = _u + [2]; _p = _p + [100]; @@ -464,6 +572,14 @@ _i = _i + ["arifle_AK12_GL_F"]; _u = _u + [2]; _p = _p + [100]; +_i = _i + ["arifle_RPK12_F"]; +_u = _u + [3]; +_p = _p + [180]; + +_i = _i + ["arifle_RPK12_arid_F"]; +_u = _u + [3]; +_p = _p + [180]; + _i = _i + ["srifle_DMR_07_blk_F"]; _u = _u + [2]; _p = _p + [200]; @@ -532,6 +648,10 @@ _i = _i + ["srifle_GM6_ghex_F"]; _u = _u + [3]; _p = _p + [500]; +_i = _i + ["sgun_HunterShotgun_01_F"]; +_u = _u + [0]; +_p = _p + [25]; + //Launchers _i = _i + ["launch_O_Titan_short_F"]; _u = _u + [3]; @@ -543,27 +663,27 @@ _p = _p + [250]; _i = _i + ["launch_O_Titan_F"]; _u = _u + [2]; -_p = _p + [125]; +_p = _p + [200]; _i = _i + ["launch_O_Titan_ghex_F"]; _u = _u + [2]; -_p = _p + [125]; +_p = _p + [200]; _i = _i + ["launch_O_Vorona_brown_F"]; -_u = _u + [2]; -_p = _p + [220]; +_u = _u + [3]; +_p = _p + [350]; _i = _i + ["launch_O_Vorona_green_F"]; -_u = _u + [2]; -_p = _p + [220]; +_u = _u + [3]; +_p = _p + [350]; _i = _i + ["launch_RPG32_F"]; _u = _u + [1]; -_p = _p + [100]; +_p = _p + [150]; _i = _i + ["launch_RPG32_ghex_F"]; _u = _u + [1]; -_p = _p + [100]; +_p = _p + [150]; _i = _i + ["launch_RPG7_F"]; _u = _u + [0]; @@ -713,6 +833,7 @@ _u = _u + [1]; _p = _p + [100]; //Backpacks +if(CTI_SHOPS_HEAVY==1) then { _i = _i + ["B_Bergen_dgtl_F"]; _u = _u + [3]; _p = _p + [500]; @@ -720,7 +841,7 @@ _p = _p + [500]; _i = _i + ["B_Bergen_hex_F"]; _u = _u + [3]; _p = _p + [500]; - +}; _i = _i + ["B_Carryall_cbr"]; _u = _u + [3]; _p = _p + [200]; @@ -749,6 +870,10 @@ _i = _i + ["O_UAV_01_backpack_F"]; _u = _u + [3]; _p = _p + [2500]; +_i = _i + ["O_UGV_02_Demining_backpack_F"]; +_u = _u + [2]; +_p = _p + [1000]; + _i = _i + ["O_UAV_06_backpack_F"]; _u = _u + [2]; _p = _p + [300]; @@ -809,14 +934,14 @@ _i = _i + ["B_ViperLightHarness_oli_F"]; _u = _u + [2]; _p = _p + [100]; -if !(MADE_FOR_STRATIS) then { +if (ISLAND != 1 && CTI_SHOPS_HEAVY==1) then { _i = _i + ["O_Mortar_01_support_F"]; _u = _u + [3]; - _p = _p + [5]; + _p = _p + [2000]; _i = _i + ["O_Mortar_01_weapon_F"]; _u = _u + [3]; - _p = _p + [2995]; + _p = _p + [8000]; }; _i = _i + ["B_FieldPack_blk"]; @@ -856,13 +981,13 @@ _u = _u + [2]; _p = _p + [5000]; //Helms -_i = _i + ["H_HelmetO_ViperSP_hex_F"]; +/*_i = _i + ["H_HelmetO_ViperSP_hex_F"]; // remove becuase 3rd person thermic abuse _u = _u + [3]; _p = _p + [1500]; _i = _i + ["H_HelmetO_ViperSP_ghex_F"]; _u = _u + [3]; -_p = _p + [1500]; +_p = _p + [1500];*/ _i = _i + ["H_HelmetLeaderO_ghex_F"]; _u = _u + [3]; @@ -1053,6 +1178,10 @@ _i = _i + ["G_Bandanna_tan"]; _u = _u + [0]; _p = _p + [5]; +_i = _i + ["G_AirPurifyingRespirator_02_black_F"]; +_u = _u + [1]; +_p = _p + [10]; + _i = _i + ["G_O_Diving"]; _u = _u + [2]; _p = _p + [50]; diff --git a/Common/Config/Gear/Gear_West.sqf b/Common/Config/Gear/Gear_West.sqf index c9dfc980e..fc0282ad4 100644 --- a/Common/Config/Gear/Gear_West.sqf +++ b/Common/Config/Gear/Gear_West.sqf @@ -130,6 +130,10 @@ _i = _i + ["30Rnd_45ACP_Mag_SMG_01_tracer_green"]; _u = _u + [0]; _p = _p + [10]; +_i = _i + ["50Rnd_570x28_SMG_03"]; +_u = _u + [0]; +_p = _p + [20]; + //Rifles Ammo _i = _i + ["30Rnd_65x39_caseless_mag"]; _u = _u + [1]; @@ -141,7 +145,31 @@ _p = _p + [20]; _i = _i + ["30Rnd_65x39_caseless_green_mag_Tracer"]; _u = _u + [1]; -_p = _p + [10]; +_p = _p + [20]; + +_i = _i + ["30Rnd_65x39_caseless_black_mag"]; +_u = _u + [1]; +_p = _p + [20]; + +_i = _i + ["30Rnd_65x39_caseless_khaki_mag"]; +_u = _u + [1]; +_p = _p + [20]; + +_i = _i + ["30Rnd_65x39_caseless_black_mag_Tracer"]; +_u = _u + [1]; +_p = _p + [20]; + +_i = _i + ["30Rnd_65x39_caseless_khaki_mag_Tracer"]; +_u = _u + [1]; +_p = _p + [20]; + +_i = _i + ["30Rnd_65x39_caseless_msbs_mag"]; +_u = _u + [2]; +_p = _p + [25]; + +_i = _i + ["30Rnd_65x39_caseless_msbs_mag_Tracer"]; +_u = _u + [2]; +_p = _p + [25]; _i = _i + ["30Rnd_556x45_Stanag"]; _u = _u + [0]; @@ -167,10 +195,50 @@ _i = _i + ["30Rnd_556x45_Stanag_Tracer_Green"]; _u = _u + [0]; _p = _p + [10]; +_i = _i + ["30Rnd_556x45_Stanag_Sand"]; +_u = _u + [0]; +_p = _p + [10]; + +_i = _i + ["30Rnd_556x45_Stanag_Sand_green"]; +_u = _u + [0]; +_p = _p + [10]; + +_i = _i + ["30Rnd_556x45_Stanag_Sand_red"]; +_u = _u + [0]; +_p = _p + [10]; + +_i = _i + ["30Rnd_556x45_Stanag_Sand_Tracer_Red"]; +_u = _u + [0]; +_p = _p + [10]; + +_i = _i + ["30Rnd_556x45_Stanag_Sand_Tracer_Green"]; +_u = _u + [0]; +_p = _p + [10]; + +_i = _i + ["30Rnd_556x45_Stanag_Sand_Tracer_Yellow"]; +_u = _u + [0]; +_p = _p + [10]; + _i = _i + ["20Rnd_556x45_UW_mag"]; _u = _u + [2]; _p = _p + [50]; +_i = _i + ["2Rnd_12Gauge_Pellets"]; +_u = _u + [0]; +_p = _p + [5]; + +_i = _i + ["2Rnd_12Gauge_Slug"]; +_u = _u + [0]; +_p = _p + [5]; + +_i = _i + ["6Rnd_12Gauge_Pellets"]; +_u = _u + [3]; +_p = _p + [20]; + +_i = _i + ["6Rnd_12Gauge_Slug"]; +_u = _u + [3]; +_p = _p + [20]; + //MG Ammo _i = _i + ["100Rnd_65x39_caseless_mag"]; _u = _u + [1]; @@ -180,6 +248,22 @@ _i = _i + ["100Rnd_65x39_caseless_mag_Tracer"]; _u = _u + [1]; _p = _p + [30]; +_i = _i + ["100Rnd_65x39_caseless_black_mag"]; +_u = _u + [1]; +_p = _p + [30]; + +_i = _i + ["100Rnd_65x39_caseless_black_mag_tracer"]; +_u = _u + [1]; +_p = _p + [30]; + +_i = _i + ["100Rnd_65x39_caseless_khaki_mag"]; +_u = _u + [1]; +_p = _p + [30]; + +_i = _i + ["100Rnd_65x39_caseless_khaki_mag_tracer"]; +_u = _u + [1]; +_p = _p + [30]; + _i = _i + ["200Rnd_65x39_cased_Box"]; _u = _u + [2]; _p = _p + [40]; @@ -212,6 +296,22 @@ _i = _i + ["150Rnd_556x45_Drum_Mag_Tracer_F"]; _u = _u + [1]; _p = _p + [30]; +_i = _i + ["150Rnd_556x45_Drum_Sand_Mag_F"]; +_u = _u + [1]; +_p = _p + [30]; + +_i = _i + ["150Rnd_556x45_Drum_Sand_Mag_Tracer_F"]; +_u = _u + [1]; +_p = _p + [30]; + +_i = _i + ["150Rnd_556x45_Drum_Green_Mag_F"]; +_u = _u + [1]; +_p = _p + [30]; + +_i = _i + ["150Rnd_556x45_Drum_Green_Mag_Tracer_F"]; +_u = _u + [1]; +_p = _p + [30]; + _i = _i + ["130Rnd_338_Mag"]; _u = _u + [2]; _p = _p + [100]; @@ -252,7 +352,7 @@ _p = _p + [100]; _i = _i + ["Titan_AT"]; _u = _u + [3]; -_p = _p + [250]; +_p = _p + [550]; //Grenades _i = _i + ["HandGrenade"]; @@ -346,7 +446,6 @@ _i = _i + ["1Rnd_SmokeOrange_Grenade_shell"]; _u = _u + [1]; _p = _p + [10]; - _i = _i + ["UGL_FlareWhite_F"]; _u = _u + [0]; _p = _p + [10]; @@ -428,6 +527,38 @@ _i = _i + ["SMG_05_F"]; _u = _u + [0]; _p = _p + [15]; +_i = _i + ["SMG_03C_black"]; +_u = _u + [0]; +_p = _p + [15]; + +_i = _i + ["SMG_03C_khaki"]; +_u = _u + [0]; +_p = _p + [15]; + +_i = _i + ["SMG_03_black"]; +_u = _u + [0]; +_p = _p + [15]; + +_i = _i + ["SMG_03_khaki"]; +_u = _u + [0]; +_p = _p + [15]; + +_i = _i + ["SMG_03C_TR_black"]; +_u = _u + [1]; +_p = _p + [20]; + +_i = _i + ["SMG_03C_TR_khaki"]; +_u = _u + [1]; +_p = _p + [20]; + +_i = _i + ["SMG_03_TR_black"]; +_u = _u + [1]; +_p = _p + [20]; + +_i = _i + ["SMG_03_TR_khaki"]; +_u = _u + [1]; +_p = _p + [20]; + _i = _i + ["arifle_Mk20_plain_F"]; _u = _u + [0]; _p = _p + [30]; @@ -500,6 +631,38 @@ _i = _i + ["arifle_MXM_khk_F"]; _u = _u + [1]; _p = _p + [150]; +_i = _i + ["arifle_MSBS65_black_F"]; +_u = _u + [2]; +_p = _p + [100]; + +_i = _i + ["arifle_MSBS65_sand_F"]; +_u = _u + [2]; +_p = _p + [100]; + +_i = _i + ["arifle_MSBS65_GL_black_F"]; +_u = _u + [2]; +_p = _p + [125]; + +_i = _i + ["arifle_MSBS65_GL_sand_F"]; +_u = _u + [2]; +_p = _p + [125]; + +_i = _i + ["arifle_MSBS65_Mark_black_F"]; +_u = _u + [3]; +_p = _p + [125]; + +_i = _i + ["arifle_MSBS65_Mark_sand_F"]; +_u = _u + [3]; +_p = _p + [125]; + +_i = _i + ["arifle_MSBS65_UBS_black_F"]; +_u = _u + [3]; +_p = _p + [150]; + +_i = _i + ["arifle_MSBS65_UBS_sand_F"]; +_u = _u + [3]; +_p = _p + [150]; + _i = _i + ["arifle_SPAR_01_blk_F"]; _u = _u + [1]; _p = _p + [50]; @@ -624,6 +787,10 @@ _i = _i + ["srifle_LRR_tna_F"]; _u = _u + [3]; _p = _p + [500]; +_i = _i + ["sgun_HunterShotgun_01_F"]; +_u = _u + [0]; +_p = _p + [25]; + //Launchers _i = _i + ["launch_B_Titan_short_F"]; _u = _u + [3]; @@ -635,11 +802,11 @@ _p = _p + [250]; _i = _i + ["launch_B_Titan_F"]; _u = _u + [2]; -_p = _p + [125]; +_p = _p + [200]; _i = _i + ["launch_B_Titan_tna_F"]; _u = _u + [2]; -_p = _p + [125]; +_p = _p + [200]; _i = _i + ["launch_MRAWS_sand_F"]; _u = _u + [2]; @@ -944,7 +1111,7 @@ _p = _p + [150]; _i = _i + ["B_Carryall_oli"]; _u = _u + [3]; _p = _p + [150]; - +if(CTI_SHOPS_HEAVY==1) then { _i = _i + ["B_Bergen_mcamo_F"]; _u = _u + [3]; _p = _p + [1000]; @@ -952,11 +1119,15 @@ _p = _p + [1000]; _i = _i + ["B_Bergen_tna_F"]; _u = _u + [3]; _p = _p + [1000]; - +}; _i = _i + ["B_UAV_01_backpack_F"]; _u = _u + [3]; _p = _p + [2500]; +_i = _i + ["B_UGV_02_Demining_backpack_F"]; +_u = _u + [2]; +_p = _p + [1000]; + _i = _i + ["B_UAV_06_backpack_F"]; _u = _u + [2]; _p = _p + [300]; @@ -985,14 +1156,14 @@ _i = _i + ["B_Static_Designator_01_weapon_F"]; _u = _u + [2]; _p = _p + [5000]; -if !(MADE_FOR_STRATIS) then { +if (ISLAND != 1 && CTI_SHOPS_HEAVY==1) then { _i = _i + ["B_Mortar_01_support_F"]; _u = _u + [3]; -_p = _p + [5]; +_p = _p + [2000]; _i = _i + ["B_Mortar_01_weapon_F"]; _u = _u + [3]; -_p = _p + [2995]; +_p = _p + [8000]; }; _i = _i + ["B_TacticalPack_blk"]; @@ -1389,6 +1560,10 @@ _i = _i + ["G_Combat_Goggles_tna_F"]; _u = _u + [0]; _p = _p + [10]; +_i = _i + ["G_AirPurifyingRespirator_01_F"]; +_u = _u + [1]; +_p = _p + [10]; + _i = _i + ["G_B_Diving"]; _u = _u + [2]; _p = _p + [50]; @@ -1606,7 +1781,7 @@ _i = _i + ["NVGoggles_tna_F"]; _u = _u + [1]; _p = _p + [30]; -_i = _i + ["NVGogglesB_grn_F"]; +/*_i = _i + ["NVGogglesB_grn_F"]; _u = _u + [3]; _p = _p + [500]; @@ -1616,7 +1791,7 @@ _p = _p + [500]; _i = _i + ["NVGogglesB_blk_F"]; _u = _u + [3]; -_p = _p + [500]; +_p = _p + [500];*/ _i = _i + ["Rangefinder"]; _u = _u + [1]; diff --git a/Common/Config/Towns/Towns_East.sqf b/Common/Config/Towns/Towns_East.sqf index 3ccb27aa0..2623cc542 100644 --- a/Common/Config/Towns/Towns_East.sqf +++ b/Common/Config/Towns/Towns_East.sqf @@ -18,8 +18,9 @@ with missionNamespace do { EAST_SOLDIER_TEAMLEADER = ["O_soldierU_TL_F", 1]; //--- Vehicles - EAST_MOTORIZED_MG = ["O_MRAP_02_hmg_F", 2]; + EAST_MOTORIZED_MG = [["O_MRAP_02_hmg_F", 2], ["O_LSV_02_armed_F", 2]]; EAST_MOTORIZED_GL = ["O_MRAP_02_gmg_F", 2]; + EAST_MOTORIZED_AT = ["O_LSV_02_AT_F", 2]; //--- Infantry - Mixed // EAST_SOLDIERS_MG = [EAST_SOLDIER_MG, EAST_SOLDIER_AR]; @@ -37,12 +38,20 @@ with missionNamespace do { // EAST_VEHICLE_ARMORED_HEAVY = ["armoheavy1","armoheavy2"]; EAST_VEHICLE_ARMORED_LIGHT = [["O_MBT_02_cannon_F", 2], ["O_MBT_04_cannon_F", 2]]; // EAST_VEHICLE_MECHANIZED = ["mechanized1","mechanized2"]; - EAST_VEHICLE_MOTORIZED = [EAST_MOTORIZED_MG, EAST_MOTORIZED_GL, EAST_MOTORIZED_MG]; + EAST_VEHICLE_MOTORIZED = EAST_MOTORIZED_MG + [EAST_MOTORIZED_GL] + [EAST_MOTORIZED_AT]; //--- Vehicles - Mixed - EAST_VEHICLES_AA_LIGHT = EAST_VEHICLE_AA; // EAST_VEHICLES_LIGHT = EAST_VEHICLE_MECHANIZED + EAST_VEHICLE_MOTORIZED; EAST_VEHICLES_LIGHT = EAST_VEHICLE_MOTORIZED; - EAST_VEHICLES_MEDIUM = EAST_VEHICLE_APC + EAST_VEHICLE_ARMORED_LIGHT; - EAST_VEHICLES_HEAVY = EAST_VEHICLE_ARMORED_LIGHT; + + if(CTI_TOWNS_RESISTANCE_HEAVY==1) then { + EAST_VEHICLES_AA_LIGHT = EAST_VEHICLE_AA; + EAST_VEHICLES_MEDIUM = EAST_VEHICLE_APC + EAST_VEHICLE_ARMORED_LIGHT; + EAST_VEHICLES_HEAVY = EAST_VEHICLE_ARMORED_LIGHT; + } + else { + EAST_VEHICLES_AA_LIGHT = EAST_VEHICLE_MOTORIZED; + EAST_VEHICLES_MEDIUM = EAST_VEHICLE_MOTORIZED; + EAST_VEHICLES_HEAVY = EAST_VEHICLE_MOTORIZED; + }; }; \ No newline at end of file diff --git a/Common/Config/Towns/Towns_Resistance.sqf b/Common/Config/Towns/Towns_Resistance.sqf index ed057f3ac..8821ac223 100644 --- a/Common/Config/Towns/Towns_Resistance.sqf +++ b/Common/Config/Towns/Towns_Resistance.sqf @@ -38,7 +38,16 @@ with missionNamespace do { //--- Vehicles - Mixed GUER_VEHICLES_LIGHT = GUER_VEHICLE_MOTORIZED; - GUER_VEHICLES_MEDIUM = GUER_VEHICLE_ARMORED_LIGHT; - GUER_VEHICLES_HEAVY = GUER_VEHICLE_ARMORED_HEAVY; - GUER_VEHICLES_PATROL = GUER_VEHICLES_MEDIUM + GUER_VEHICLES_HEAVY; + + if(CTI_TOWNS_RESISTANCE_HEAVY==1) then { + GUER_VEHICLES_MEDIUM = GUER_VEHICLE_ARMORED_LIGHT; + GUER_VEHICLES_HEAVY = GUER_VEHICLE_ARMORED_HEAVY; + GUER_VEHICLES_PATROL = GUER_VEHICLES_MEDIUM + GUER_VEHICLES_HEAVY; + } + else { + GUER_VEHICLES_MEDIUM = GUER_VEHICLE_MOTORIZED; + GUER_VEHICLES_HEAVY = GUER_VEHICLE_MOTORIZED; + GUER_VEHICLES_PATROL = GUER_VEHICLE_MOTORIZED; + }; + }; \ No newline at end of file diff --git a/Common/Config/Towns/Towns_West.sqf b/Common/Config/Towns/Towns_West.sqf index 9c75423f7..868a11d0a 100644 --- a/Common/Config/Towns/Towns_West.sqf +++ b/Common/Config/Towns/Towns_West.sqf @@ -16,10 +16,11 @@ with missionNamespace do { WEST_SOLDIER_SQUADLEADER = ["B_Soldier_TL_F", 1]; WEST_SOLDIER_SNIPER = ["B_Soldier_M_F", 1]; WEST_SOLDIER_TEAMLEADER = ["B_Soldier_TL_F", 1]; - + //--- Vehicles - WEST_MOTORIZED_MG = ["B_MRAP_01_hmg_F", 2]; + WEST_MOTORIZED_MG = [["B_MRAP_01_hmg_F", 2], ["B_LSV_01_armed_F", 2]]; WEST_MOTORIZED_GL = ["B_MRAP_01_gmg_F", 2]; + WEST_MOTORIZED_AT = ["B_LSV_01_AT_F", 2]; //--- Infantry - Mixed // WEST_SOLDIERS_MG = [WEST_SOLDIER_MG, WEST_SOLDIER_AR]; @@ -37,12 +38,20 @@ with missionNamespace do { // WEST_VEHICLE_ARMORED_HEAVY = ["armoheavy1","armoheavy2"]; WEST_VEHICLE_ARMORED_LIGHT = [["B_MBT_01_cannon_F", 2], ["B_MBT_01_TUSK_F", 2], ["B_AFV_Wheeled_01_cannon_F", 3], ["B_AFV_Wheeled_01_up_cannon_F", 3]]; // WEST_VEHICLE_MECHANIZED = ["mechanized1","mechanized2"]; - WEST_VEHICLE_MOTORIZED = [WEST_MOTORIZED_MG, WEST_MOTORIZED_GL, WEST_MOTORIZED_MG]; + WEST_VEHICLE_MOTORIZED = WEST_MOTORIZED_MG + [WEST_MOTORIZED_GL] + [WEST_MOTORIZED_AT]; //--- Vehicles - Mixed - WEST_VEHICLES_AA_LIGHT = WEST_VEHICLE_AA; + // WEST_VEHICLES_LIGHT = WEST_VEHICLE_MECHANIZED + WEST_VEHICLE_MOTORIZED; WEST_VEHICLES_LIGHT = WEST_VEHICLE_MOTORIZED; - WEST_VEHICLES_MEDIUM = WEST_VEHICLE_APC + WEST_VEHICLE_ARMORED_LIGHT; - WEST_VEHICLES_HEAVY = WEST_VEHICLE_ARMORED_LIGHT; + if(CTI_TOWNS_RESISTANCE_HEAVY==1) then { + WEST_VEHICLES_AA_LIGHT = WEST_VEHICLE_AA; + WEST_VEHICLES_MEDIUM = WEST_VEHICLE_APC + WEST_VEHICLE_ARMORED_LIGHT; + WEST_VEHICLES_HEAVY = WEST_VEHICLE_ARMORED_LIGHT; + } + else { + WEST_VEHICLES_AA_LIGHT = WEST_VEHICLE_MOTORIZED; + WEST_VEHICLES_MEDIUM = WEST_VEHICLE_MOTORIZED; + WEST_VEHICLES_HEAVY = WEST_VEHICLE_MOTORIZED; + }; }; \ No newline at end of file diff --git a/Common/Config/Units/Units_East.sqf b/Common/Config/Units/Units_East.sqf index 0a4777c17..16c0b9bb3 100644 --- a/Common/Config/Units/Units_East.sqf +++ b/Common/Config/Units/Units_East.sqf @@ -230,9 +230,9 @@ _s = _s + [""]; _c = _c + ['O_Soldier_HAT_F']; _p = _p + ['']; _n = _n + ['Rifleman [HAT]']; -_o = _o + [320]; +_o = _o + [700]; _t = _t + [5]; -_u = _u + [2]; +_u = _u + [3]; _f = _f + [CTI_FACTORY_BARRACKS]; _s = _s + [""]; @@ -410,7 +410,7 @@ _s = _s + [""]; _c = _c + ['O_Soldier_AA_F']; _p = _p + ['']; _n = _n + ['']; -_o = _o + [300]; +_o = _o + [350]; _t = _t + [5]; _u = _u + [2]; _f = _f + [CTI_FACTORY_BARRACKS]; @@ -419,7 +419,7 @@ _s = _s + [""]; _c = _c + ['O_soldierU_AA_F']; _p = _p + ['']; _n = _n + ['']; -_o = _o + [300]; +_o = _o + [350]; _t = _t + [5]; _u = _u + [2]; _f = _f + [CTI_FACTORY_BARRACKS]; @@ -428,7 +428,7 @@ _s = _s + [""]; _c = _c + ['O_Soldier_AT_F']; _p = _p + ['']; _n = _n + ['']; -_o = _o + [450]; +_o = _o + [1250]; _t = _t + [5]; _u = _u + [3]; _f = _f + [CTI_FACTORY_BARRACKS]; @@ -437,7 +437,7 @@ _s = _s + [""]; _c = _c + ['O_soldierU_AT_F']; _p = _p + ['']; _n = _n + ['']; -_o = _o + [450]; +_o = _o + [1250]; _t = _t + [5]; _u = _u + [3]; _f = _f + [CTI_FACTORY_BARRACKS]; @@ -871,14 +871,14 @@ _u = _u + [0]; _f = _f + [CTI_FACTORY_AMMO]; _s = _s + ["service-ammotruck"]; -_c = _c + ['C_Plane_Civil_01_F']; +/*_c = _c + ['C_Plane_Civil_01_F']; _p = _p + ['']; _n = _n + ['']; _o = _o + [4000]; _t = _t + [35]; _u = _u + [0]; _f = _f + [CTI_FACTORY_AIR]; -_s = _s + [""]; +_s = _s + [""];*/ _c = _c + ['O_UAV_02_F']; _p = _p + ['']; @@ -1019,7 +1019,7 @@ _s = _s + [""]; _c = _c + ["Land_Pod_Heli_Transport_04_medevac_F"]; _p = _p + ['']; _n = _n + ['']; -_o = _o + [2500]; +_o = _o + [6000]; _t = _t + [25]; _u = _u + [0]; _f = _f + [CTI_FACTORY_AIR]; @@ -1044,6 +1044,15 @@ _u = _u + [0]; _f = _f + [CTI_FACTORY_NAVAL]; _s = _s + [""]; +_c = _c + ['I_C_Boat_Transport_02_F']; +_p = _p + ['']; +_n = _n + ['']; +_o = _o + [325]; +_t = _t + [20]; +_u = _u + [1]; +_f = _f + [4]; +_s = _s + [""]; + _c = _c + ['O_Boat_Armed_01_hmg_F']; _p = _p + ['']; _n = _n + ['']; @@ -1097,7 +1106,7 @@ _p = _p + ['']; _n = _n + ['']; _o = _o + [5000]; _t = _t + [30]; -_u = _u + [2]; +_u = _u + [3]; _f = _f + [4]; _s = _s + [""]; @@ -1106,7 +1115,7 @@ _p = _p + ['']; _n = _n + ['']; _o = _o + [4000]; _t = _t + [30]; -_u = _u + [3]; +_u = _u + [2]; _f = _f + [4]; _s = _s + [""]; @@ -1232,7 +1241,7 @@ _s = _s + [""]; _c = _c + ['O_Mortar_01_F']; _p = _p + ['']; _n = _n + ['']; -_o = _o + [5000]; +_o = _o + [10000]; _t = _t + [10]; _u = _u + [0]; _f = _f + [CTI_FACTORY_TOWN]; @@ -1259,7 +1268,7 @@ _s = _s + [""]; _c = _c + ['B_AAA_System_01_F']; _p = _p + ['']; _n = _n + ['']; -_o = _o + [40000]; +_o = _o + [25000]; _t = _t + [30]; _u = _u + [0]; _f = _f + [""]; @@ -1268,7 +1277,7 @@ _s = _s + [""]; _c = _c + ['B_SAM_System_01_F']; _p = _p + ['']; _n = _n + ['']; -_o = _o + [60000]; +_o = _o + [40000]; _t = _t + [30]; _u = _u + [0]; _f = _f + [""]; @@ -1286,7 +1295,7 @@ _s = _s + [""]; _c = _c + ['O_Radar_System_02_F']; _p = _p + ['']; _n = _n + ['']; -_o = _o + [12000]; +_o = _o + [20000]; _t = _t + [30]; _u = _u + [0]; _f = _f + [""]; @@ -1295,7 +1304,7 @@ _s = _s + [""]; _c = _c + ['O_SAM_System_04_F']; _p = _p + ['']; _n = _n + ['']; -_o = _o + [40000]; +_o = _o + [50000]; _t = _t + [30]; _u = _u + [0]; _f = _f + [""]; @@ -1315,7 +1324,7 @@ _p = _p + ['']; _n = _n + ['']; _o = _o + [3000]; _t = _t + [30]; -_u = _u + [3]; +_u = _u + [2]; _f = _f + [4]; _s = _s + [""]; @@ -1324,7 +1333,7 @@ _p = _p + ['']; _n = _n + ['']; _o = _o + [3000]; _t = _t + [30]; -_u = _u + [3]; +_u = _u + [2]; _f = _f + [4]; _s = _s + [""]; @@ -1333,16 +1342,16 @@ _p = _p + ['']; _n = _n + ['']; _o = _o + [5000]; _t = _t + [30]; -_u = _u + [3]; +_u = _u + [2]; _f = _f + [4]; _s = _s + [""]; _c = _c + ['I_LT_01_AT_F']; _p = _p + ['']; _n = _n + ['']; -_o = _o + [6000]; +_o = _o + [3000]; _t = _t + [30]; -_u = _u + [3]; +_u = _u + [2]; _f = _f + [4]; _s = _s + [""]; diff --git a/Common/Config/Units/Units_Resistance.sqf b/Common/Config/Units/Units_Resistance.sqf index f9957d305..cafbd214a 100644 --- a/Common/Config/Units/Units_Resistance.sqf +++ b/Common/Config/Units/Units_Resistance.sqf @@ -41,7 +41,7 @@ _s = _s + [""]; _c = _c + ['I_soldier_AA_F']; _p = _p + ['']; _n = _n + ['']; -_o = _o + [300]; +_o = _o + [350]; _t = _t + [5]; _u = _u + [1]; _f = _f + [CTI_FACTORY_BARRACKS]; @@ -50,7 +50,7 @@ _s = _s + [""]; _c = _c + ['I_soldier_AT_F']; _p = _p + ['']; _n = _n + ['']; -_o = _o + [450]; +_o = _o + [1250]; _t = _t + [5]; _u = _u + [1]; _f = _f + [CTI_FACTORY_BARRACKS]; @@ -249,7 +249,7 @@ _s = _s + [""]; _c = _c + ['I_LT_01_AT_F']; _p = _p + ['']; _n = _n + ['']; -_o = _o + [6000]; +_o = _o + [3000]; _t = _t + [30]; _u = _u + [3]; _f = _f + [4]; @@ -282,5 +282,14 @@ _u = _u + [1]; _f = _f + [4]; _s = _s + [""]; +_c = _c + ['I_Mortar_01_F']; +_p = _p + ['']; +_n = _n + ['']; +_o = _o + [10000]; +_t = _t + [10]; +_u = _u + [0]; +_f = _f + [CTI_FACTORY_TOWN]; +_s = _s + [""]; + [_side, _faction, _c, _p, _n, _o, _t, _u, _f, _s] call compile preprocessFileLineNumbers "Common\Config\Units\Set_Units.sqf"; \ No newline at end of file diff --git a/Common/Config/Units/Units_West.sqf b/Common/Config/Units/Units_West.sqf index 6587ef781..128003fc0 100644 --- a/Common/Config/Units/Units_West.sqf +++ b/Common/Config/Units/Units_West.sqf @@ -294,7 +294,7 @@ _s = _s + [""]; _c = _c + ['B_soldier_AA_F']; _p = _p + ['']; _n = _n + ['']; -_o = _o + [300]; +_o = _o + [350]; _t = _t + [5]; _u = _u + [2]; _f = _f + [CTI_FACTORY_BARRACKS]; @@ -303,7 +303,7 @@ _s = _s + [""]; _c = _c + ['B_soldier_AT_F']; _p = _p + ['']; _n = _n + ['']; -_o = _o + [450]; +_o = _o + [1250]; _t = _t + [5]; _u = _u + [3]; _f = _f + [CTI_FACTORY_BARRACKS]; @@ -776,14 +776,14 @@ _u = _u + [0]; _f = _f + [CTI_FACTORY_AIR]; _s = _s + [""]; -_c = _c + ['C_Plane_Civil_01_F']; +/*_c = _c + ['C_Plane_Civil_01_F']; _p = _p + ['']; _n = _n + ['']; _o = _o + [4000]; _t = _t + [35]; _u = _u + [0]; _f = _f + [CTI_FACTORY_AIR]; -_s = _s + [""]; +_s = _s + [""];*/ _c = _c + ['B_Heli_Transport_01_F']; _p = _p + ['']; @@ -860,7 +860,7 @@ _s = _s + [""]; _c = _c + ["B_Slingload_01_Medevac_F"]; _p = _p + ['']; _n = _n + ['']; -_o = _o + [2500]; +_o = _o + [6000]; _t = _t + [25]; _u = _u + [0]; _f = _f + [CTI_FACTORY_AIR]; @@ -903,6 +903,15 @@ _u = _u + [0]; _f = _f + [CTI_FACTORY_NAVAL]; _s = _s + [""]; +_c = _c + ['I_C_Boat_Transport_02_F']; +_p = _p + ['']; +_n = _n + ['']; +_o = _o + [325]; +_t = _t + [20]; +_u = _u + [1]; +_f = _f + [4]; +_s = _s + [""]; + _c = _c + ['B_Boat_Armed_01_minigun_F']; _p = _p + ['']; _n = _n + ['']; @@ -956,7 +965,7 @@ _p = _p + ['']; _n = _n + ['']; _o = _o + [4000]; _t = _t + [30]; -_u = _u + [2]; +_u = _u + [3]; _f = _f + [4]; _s = _s + [""]; @@ -965,7 +974,7 @@ _p = _p + ['']; _n = _n + ['']; _o = _o + [3500]; _t = _t + [30]; -_u = _u + [3]; +_u = _u + [2]; _f = _f + [4]; _s = _s + [""]; @@ -1090,7 +1099,7 @@ _s = _s + [""]; _c = _c + ['B_Mortar_01_F']; _p = _p + ['']; _n = _n + ['']; -_o = _o + [5000]; +_o = _o + [10000]; _t = _t + [10]; _u = _u + [0]; _f = _f + [CTI_FACTORY_TOWN]; @@ -1117,7 +1126,7 @@ _s = _s + [""]; _c = _c + ['B_AAA_System_01_F']; _p = _p + ['']; _n = _n + ['']; -_o = _o + [40000]; +_o = _o + [25000]; _t = _t + [30]; _u = _u + [0]; _f = _f + [""]; @@ -1126,7 +1135,7 @@ _s = _s + [""]; _c = _c + ['B_SAM_System_01_F']; _p = _p + ['']; _n = _n + ['']; -_o = _o + [60000]; +_o = _o + [40000]; _t = _t + [30]; _u = _u + [0]; _f = _f + [""]; @@ -1144,7 +1153,7 @@ _s = _s + [""]; _c = _c + ['B_Radar_System_01_F']; _p = _p + ['']; _n = _n + ['']; -_o = _o + [12000]; +_o = _o + [20000]; _t = _t + [30]; _u = _u + [0]; _f = _f + [""]; @@ -1153,7 +1162,7 @@ _s = _s + [""]; _c = _c + ['B_SAM_System_03_F']; _p = _p + ['']; _n = _n + ['']; -_o = _o + [40000]; +_o = _o + [50000]; _t = _t + [30]; _u = _u + [0]; _f = _f + [""]; @@ -1198,7 +1207,7 @@ _s = _s + [""]; _c = _c + ['I_LT_01_AT_F']; _p = _p + ['']; _n = _n + ['']; -_o = _o + [6000]; +_o = _o + [3000]; _t = _t + [30]; _u = _u + [3]; _f = _f + [4]; diff --git a/Common/Functions/Common_CreateTeam.sqf b/Common/Functions/Common_CreateTeam.sqf index 3da36fb89..3b4e92764 100644 --- a/Common/Functions/Common_CreateTeam.sqf +++ b/Common/Functions/Common_CreateTeam.sqf @@ -8,7 +8,7 @@ _locked = if (count _this > 4) then {_this select 4} else {true}; _net = if (count _this > 5) then {_this select 5} else {false}; _bounty = if (count _this > 6) then {_this select 6} else {false}; -if (_side == resistance) then {_net=false}; +_net=false; _sideID = (_side) call CTI_CO_FNC_GetSideID; //if (isNull _group) then {_group = createGroup _side}; diff --git a/Common/Functions/Common_CreateUnit.sqf b/Common/Functions/Common_CreateUnit.sqf index 56ef98779..612e706ad 100644 --- a/Common/Functions/Common_CreateUnit.sqf +++ b/Common/Functions/Common_CreateUnit.sqf @@ -210,7 +210,7 @@ if (_net) then {_unit setVariable ["cti_net", _sideID, true]}; _unit addEventHandler ["killed", format["[_this select 0, _this select 1, %1] spawn CTI_CO_FNC_OnUnitKilled", _sideID]]; //Adv network -if (missionNamespace getVariable "CTI_EW_ANET" == 1 && !(_sideID == CTI_RESISTANCE_ID)) then { +if (_net && missionNamespace getVariable "CTI_EW_ANET" == 1 && !(_sideID == CTI_RESISTANCE_ID)) then { //["SERVER","Server_Run_Net",[_unit,_sideID]] call CTI_CO_FNC_NetSend; [_unit,_sideID] spawn AN_Launch; }; @@ -219,6 +219,7 @@ if !( isNil "ADMIN_ZEUS" ) then { if !(isServer) then { ["SERVER", "Server_Addeditable",[ADMIN_ZEUS,_unit]] call CTI_CO_FNC_NetSend; } else { + ADMIN_ZEUS addCuratorAddons (configSourceAddonList (configFile >> "CfgVehicles" >> typeof _unit)); ADMIN_ZEUS addCuratorEditableObjects [[_unit],true] ; }; }; @@ -238,18 +239,30 @@ if (missionNamespace getVariable "CTI_SM_RADAR" == 1) then { //cache //["SERVER", "Request_Cache", _unit] call CTI_CO_FNC_NetSend; +//additional actions +_unit addAction [localize "STR_Common_CreateUnit_Land", " + commandStop _this; + doStop _this; + (_this select 0) spawn { + waitUntil {if (!alive _this || (abs ((velocity (vehicle _this)) select 0) < 3 && abs ((velocity (vehicle _this)) select 1) < 3 && abs ((velocity (vehicle _this)) select 2) < 3)) exitWith {true}; false}; + if (alive (vehicle _this)) then {(vehicle _this) land 'LAND';}; + waitUntil {if (!alive _this || isTouchingGround (vehicle _this)) exitWith {true}; false}; + if (alive (vehicle _this)) then {commandStop _this; doStop _this; _this commandFollow _this; (vehicle _this) setVelocity [0, 0, -1];}; + }; + ", "", 99, false, true, "", "(vehicle _originalTarget) isKindOf 'HELICOPTER' && driver (vehicle _originalTarget) == _originalTarget && ((getPos _target) select 2) > 3 && cameraon == vehicle player"]; + _unit addAction [localize "STR_Common_CreateUnit_Remote_Control"," player connectTerminalToUAV ( vehicle(_this select 0)); (_this select 0) spawn { - waitUntil { uavControl ( vehicle(_this)) select 1 == 'GUNNER' || ! (driver (vehicle _this)==_this) || (vehicle _this ==_this) || ! alive _this || ! alive player}; + waitUntil {uavControl ( vehicle(_this)) select 1 == 'GUNNER' || ! (driver (vehicle _this)==_this) || (vehicle _this ==_this) || ! alive _this || ! alive player || (player getvariable ['REV_UNC',false])}; sleep 1; - player connectTerminalToUAV objNull; + player connectTerminalToUAV objNull; objNull remoteControl cameraon; vehicle (player) switchCamera 'Internal' - }; + if (!(player getvariable ['REV_UNC',false])) then { player remoteControl (driver vehicle (_this select 0)); - ( vehicle(_this select 0)) switchCamera 'Internal'; + ( vehicle(_this select 0)) switchCamera 'Internal';}; ","",100, false, true, "", "(vehicle _this) == (vehicle _target) && ! (vehicle _this ==_this) && driver (vehicle _this)==_this && isnull gunner (vehicle _this) && !((vehicle _this) == vehicle (player)) &&! (uavControl ( vehicle(_this)) select 0 == player)"]; // returnvehicle objNull remoteControl cameraon; player connectTerminalToUAV objNull; (player) switchCamera 'Internal'; diff --git a/Common/Functions/Common_CreateVehicle.sqf b/Common/Functions/Common_CreateVehicle.sqf index 728d65b8e..e6de2de22 100644 --- a/Common/Functions/Common_CreateVehicle.sqf +++ b/Common/Functions/Common_CreateVehicle.sqf @@ -19,6 +19,8 @@ 5 {Optionnal} [Boolean]: Determine if the vehicle should be "public" or not 6 {Optionnal} [Boolean]: Determine if the vehicle should be handled upon destruction or not (bounty...tk...) 7 {Optionnal} [String]: Set a special spawn mode for the vehicle + 8 {Optionnal} [Object]: Vehicle if already create + 9 {Optionnal} [Boolean]: Vehicle can be deleted # RETURNED VALUE # [Object]: The created vehicle @@ -55,21 +57,62 @@ _net = if (count _this > 5) then {_this select 5} else {false}; _handle = if (count _this > 6) then {_this select 6} else {false}; _special = if (count _this > 7) then {_this select 7} else {"FORM"}; _created = if (count _this > 8) then {_this select 8} else {objNull}; +_can_be_removed = if (count _this > 9) then {_this select 9} else {true}; _t_side=if (typeName _side == "SCALAR") then {(_side call CTI_CO_FNC_GetSideFromID)} else {_side}; if (typeName _position == "OBJECT") then {_position = getPos _position}; if (typeName _side == "SIDE") then {_side = (_side) call CTI_CO_FNC_GetSideID}; + _vehicle = if ( isNull _created) then {createVehicle [_type, _position, [], 7, _special]} else {_created}; +_vehicle setVariable ["_spawn_location", _position]; +if(!_can_be_removed) then {_vehicle setVariable ["cti_gc_noremove", true,true]}; +_handle_fail_spawns = { + params ["_unit"]; + //TODO check if shot, and if yes do nothing + if(damage _unit > 0.9) then { + if(_unit getVariable ["cti_gc_noremove", false] isEqualTo false) then { + { + if(isPlayer (_x select 0)) then {moveOut (_x select 0);} else {deleteVehicle (_x select 0);}; + } forEach (fullCrew _unit); + deleteVehicle _unit; + }; + } else { + _unit setDammage 0; + { + (_x select 0) setDammage 0; + } forEach (fullCrew _unit); + }; +}; + + +//Ensures the vehicle spawns correctly. +_EH_Dammaged = _vehicle addEventHandler ["Dammaged", _handle_fail_spawns]; +_EH_Killed = _vehicle addEventHandler ["Killed", _handle_fail_spawns]; + +[_vehicle, _EH_Dammaged, _EH_Killed] spawn { + params ["_vehicle", "_EH_Dammaged", "_EH_Killed"]; + sleep(1); + //Check if vehicle flew away after spawn (due to physics glitching) + if(!(_vehicle isKindOf "Air")) then { + _pos = _vehicle getVariable ["_spawn_location", [0,0,0]]; + if(_pos distance (getPos _vehicle) > 500) then { + { + if(isPlayer (_x select 0)) then {moveOut (_x select 0);} else {deleteVehicle (_x select 0);}; + } forEach (fullCrew _vehicle); + deleteVehicle _vehicle; + }; + }; + sleep(2); + _vehicle removeEventHandler ["Dammaged", _EH_Dammaged]; + _vehicle removeEventHandler ["Killed", _EH_Killed]; +}; // henroth air loadout //Does a gun config exsist? _gun_config = missionNamespace getVariable ( format [ "CTI_LOADOUT_%1_MNT_OPTIONS" , typeOf _vehicle ] ); -if ( -( ((typeOf _vehicle) == "O_APC_Tracked_02_AA_F") - || ((typeOf _vehicle) == "B_APC_Tracked_01_AA_F") - || _type isKindOf "Air") +if ((/*((typeOf _vehicle) == "O_APC_Tracked_02_AA_F") || ((typeOf _vehicle) == "B_APC_Tracked_01_AA_F") ||*/ _type isKindOf "Air") && (missionNamespace getVariable "CTI_AC_ENABLED")>0 && _side != CTI_RESISTANCE_ID && CTI_isCLient @@ -88,6 +131,8 @@ if (isNull _created) then { if (_vehicle isKindOf "CAR" || _vehicle isKindOf "TANK") then { _ep = (getPos _vehicle) findEmptyPosition [0,100,"O_T_VTOL_02_vehicle_dynamicLoadout_F"]; if (count _ep == 0) then {_ep = (getPos _vehicle) findEmptyPosition [0,250,"O_T_VTOL_02_vehicle_dynamicLoadout_F"];}; + if (count _ep == 0 && surfaceIsWater position _vehicle) then {_ep = [getPos _vehicle select 0, getPos _vehicle select 1, 0];}; // for repair HQ in water + if (count _ep == 0) then {_ep = getPos _vehicle;}; _vehicle setPos _ep; }; @@ -104,18 +149,18 @@ if (isNull _created) then { if (count _free > 0) then {_vehicle setPos (selectRandom _free);} else {_vehicle setPos (getPos _vehicle);}; }; - if (_vehicle isKindOf "SHIP" && _side != CTI_RESISTANCE_ID) then { + if (_vehicle isKindOf "SHIP" && _side != CTI_RESISTANCE_ID && !(surfaceIsWater position _vehicle)) then { _wp = [getPos _vehicle, 0, 75, 7, 2, 1, 0] call BIS_fnc_findSafePos; - if (count _wp == 0) then {_wp = getPos _vehicle}; + if (count _wp == 0 || !(surfaceIsWater _wp)) then {_wp = (getPos _vehicle) findEmptyPosition [0,100,"O_T_VTOL_02_vehicle_dynamicLoadout_F"];}; _vehicle setPos _wp; }; //if (_special == "FORM") then {_vehicle setPos [(getPos _vehicle) select 0, (getPos _vehicle) select 1, 0.75];}; //--- Make the vehicle spawn above the ground level to prevent any bisteries if (_special == "FORM") then {_vehicle setPos [(getPos _vehicle) select 0, (getPos _vehicle) select 1];}; - // --- Zerty edit - if (_type isKindOf "UAV" || _type isKindOf "UGV_01_base_F") then {createVehicleCrew _vehicle}; - if (_vehicle isKindOf "B_T_UAV_03_dynamicLoadout_F") then {createVehicleCrew _vehicle}; + if (unitIsUAV _vehicle) then { + createVehicleCrew _vehicle; + }; //Ensures any air vehicle does not have a weapon that is not researched (SanitizeAircraft) @@ -124,8 +169,8 @@ if (isNull _created) then { && CTI_isCLient && !(isNil "CTI_ALM_AA_RESEARCHED_MAGAZINES") //makes sure henroths loadouts are set && (_type isKindOf "Air" - || (_vehicle isKindOf "O_APC_Tracked_02_AA_F") - || (_vehicle isKindOf "B_APC_Tracked_01_AA_F")) + /*|| (_vehicle isKindOf "O_APC_Tracked_02_AA_F") + || (_vehicle isKindOf "B_APC_Tracked_01_AA_F")*/) ) then { //Setting default loadout for given aircraft if ((missionNamespace getVariable "CTI_AC_ENABLED")>0 && !isNil "_gun_config") then { @@ -211,12 +256,17 @@ if (isNull _created) then { if (_vehicle isKindOf "I_MBT_03_cannon_F") then {[_vehicle, nil, ["HideTurret",1,"HideHull",1]] call BIS_fnc_initVehicle;}; if (_vehicle isKindOf "O_MBT_02_cannon_F" || _vehicle isKindOf "O_T_MBT_02_cannon_ghex_F") then {[_vehicle, nil, ["showLog",1]] call BIS_fnc_initVehicle;}; if (_vehicle isKindOf "O_APC_Tracked_02_AA_F" || _vehicle isKindOf "O_T_APC_Tracked_02_AA_ghex_F") then {[_vehicle, nil, ["showTracks",1]] call BIS_fnc_initVehicle;}; + if (_side == CTI_RESISTANCE_ID) then { + [_vehicle, FALSE, ["showcamonethull", 0.2, "showcamonetturret", 0.2, "showcamonetcannon", 0.2, "showslathull", 0.2]] call BIS_fnc_initVehicle; // Res: 20% chance for camo net and slat cage + }; }; - if (_vehicle isKindOf "Car") then { + if (_vehicle isKindOf "Offroad_01_base_F") then { _offroads = ["I_G_Offroad_01_F", "I_G_Offroad_01_armed_F", "I_G_Offroad_01_AT_F", "B_G_Offroad_01_F", "B_G_Offroad_01_armed_F", "B_G_Offroad_01_AT_F", "O_G_Offroad_01_F", "O_G_Offroad_01_armed_F", "O_G_Offroad_01_AT_F"]; if ((typeOf _vehicle) in _offroads) then { _offroadcolors = ["Guerilla_01", "Guerilla_02", "Guerilla_03", "Guerilla_04", "Guerilla_05", "Guerilla_06", "Guerilla_07", "Guerilla_08", "Guerilla_09", "Guerilla_10", "Guerilla_11", "Guerilla_12"]; [_vehicle, [(selectRandom _offroadcolors),1], nil] call BIS_fnc_initVehicle;}; + }; + if (_vehicle isKindOf "Offroad_02_base_F") then { _4wds = ["I_C_Offroad_02_unarmed_F", "I_C_Offroad_02_LMG_F", "I_C_Offroad_02_AT_F", "C_Offroad_02_unarmed_F"]; if ((typeOf _vehicle) in _4wds) then { _4wdcolors = ["Green", "Olive", "Black", "Brown"]; @@ -260,7 +310,11 @@ if ((missionNamespace getVariable [format ["%1", typeOf _vehicle],["","","",""," if (_locked && !( _vehicle isKindOf "Thing") && !( _vehicle isKindOf "StaticWeapon") && !( _vehicle isKindOf "UAV") && !( _vehicle isKindOf "UGV_01_base_F") && !( _vehicle isKindOf "B_T_UAV_03_dynamicLoadout_F")) then {_vehicle lock 2} else {_vehicle lock 0}; -if (_net) then {_vehicle setVariable ["cti_net", _side, true]}; +if (_net && !( _vehicle isKindOf "Thing")) then { + _vehicle setVariable ["cti_net", _side, true]; + } else { + if (_vehicle isKindOf "Slingload_01_Base_F") then {_vehicle setVariable ["cti_net", _side, true];}; + }; if (_handle) then { _vehicle addEventHandler ["killed", format["[_this select 0, _this select 1, %1] spawn CTI_CO_FNC_OnUnitKilled", _side]]; //--- Called on destruction _vehicle addEventHandler ["hit", {_this spawn CTI_CO_FNC_OnUnitHit}]; //--- Register importants hits @@ -272,7 +326,7 @@ if (_handle) then { //disable net for offroads (JIP issue with BIS bug) + static load -if (_net &&missionNamespace getVariable "CTI_EW_ANET" == 1 && !(_side == CTI_RESISTANCE_ID)) then { +if (_net &&missionNamespace getVariable "CTI_EW_ANET" == 1 && !(_side == CTI_RESISTANCE_ID)&& !( _vehicle isKindOf "Thing")) then { ["SERVER","Server_Run_Net",[_vehicle,_side]] call CTI_CO_FNC_NetSend; }; @@ -294,6 +348,7 @@ if !( isNil "ADMIN_ZEUS") then { if !(CTI_isServer) then { ["SERVER", "Server_Addeditable",[ADMIN_ZEUS,_vehicle]] call CTI_CO_FNC_NetSend; } else { + ADMIN_ZEUS addCuratorAddons (configSourceAddonList (configFile >> "CfgVehicles" >> typeof _vehicle)); ADMIN_ZEUS addCuratorEditableObjects [[_vehicle],true] ; }; }; @@ -341,7 +396,8 @@ _vehicle setRepairCargo 0; _vehicle spawn { while { !isNull _this && alive _this && ! cti_gameover } do { sleep 20; - if ((([_this,getMarkerPos "CTI_TUTORIAL"] call BIS_fnc_distance2D) < 1000) && !isNull _this && alive _this) then {_this setDamage 1}; + if (!isNull _this && alive _this && !((position _this) inArea [[worldSize/2, worldSize/2, 6000], worldSize/2, worldSize/2, 0, true, 6500]) && (getPos _this select 2) < 50000) then {(driver _this) groupChat (localize "STR_Area_Warning");}; + if ((([_this,getMarkerPos "CTI_TUTORIAL"] call BIS_fnc_distance2D) < 1000) && !isNull _this && alive _this && (getPos _this select 2) < 100) then {_this setDamage 1}; }; }; diff --git a/Common/Functions/Common_EquipUnit.sqf b/Common/Functions/Common_EquipUnit.sqf index e231e3e2d..5105e9f15 100644 --- a/Common/Functions/Common_EquipUnit.sqf +++ b/Common/Functions/Common_EquipUnit.sqf @@ -72,7 +72,7 @@ if (_unit isKindOf "Man") then { //--- Binoculars are special, they can't be linked like the other items. if (((_gear select 3) select 0) select 1 != "") then {_unit addWeapon (((_gear select 3) select 0) select 1)}; - if ( (toLower (((_gear select 3) select 0) select 1)) in ["laserdesignator","laserdesignator_02", "Laserdesignator_02_ghex_F", "Laserdesignator_01_khk_F"] && ! isnull (uniformContainer _unit)) then { (uniformContainer _unit) addItemCargoGlobal ["Laserbatteries",1]} ; + if ( (toLower (((_gear select 3) select 0) select 1)) in ["laserdesignator", "laserdesignator_02", "laserdesignator_02_ghex_f", "laserdesignator_01_khk_f"] && ! isnull (uniformContainer _unit)) then { (uniformContainer _unit) addItemCargoGlobal ["Laserbatteries",1]} ; //--- [Weapons check-in] //--- Primary diff --git a/Common/Functions/Common_ManVehicle.sqf b/Common/Functions/Common_ManVehicle.sqf index 199bac30d..33406ef60 100644 --- a/Common/Functions/Common_ManVehicle.sqf +++ b/Common/Functions/Common_ManVehicle.sqf @@ -53,7 +53,7 @@ _position = getPos _vehicle; _position = [(_position select 0) + 5, (_position select 1) + 5, 0]; _net = if ((missionNamespace getVariable "CTI_MARKERS_INFANTRY") == 1 && _sideID in [CTI_WEST_ID, CTI_EAST_ID]) then { true } else { false }; - +_group setVariable ["cti_server_group", format ["%1", str _sideid], true]; if (_vehicle emptyPositions "driver" > 0) then { _unit = [_crew, _group, _position, _sideID, _net] call CTI_CO_FNC_CreateUnit; _unit moveInDriver _vehicle; diff --git a/Common/Functions/Common_RearmVehicle.sqf b/Common/Functions/Common_RearmVehicle.sqf index 2f2dd400a..ed563970f 100644 --- a/Common/Functions/Common_RearmVehicle.sqf +++ b/Common/Functions/Common_RearmVehicle.sqf @@ -43,15 +43,13 @@ if(((_t_side) call CTI_CO_FNC_GetSideUpgrades) select CTI_UPGRADE_DATA == 1) the // Fix for air vehicles ... uses sanatise script to clean up afterwards //enable for && (!(_vehicle isKindOf "O_Plane_Fighter_02_F")) && (!(_vehicle isKindOf "B_Plane_Fighter_01_F")) && (!(_vehicle isKindOf "I_Plane_Fighter_04_F")) -if ( (((typeOf _vehicle) == "O_APC_Tracked_02_AA_F") - || ((typeOf _vehicle) == "B_APC_Tracked_01_AA_F") - || _vehicle isKindOf "Air") +if ((/*((typeOf _vehicle) == "O_APC_Tracked_02_AA_F") || ((typeOf _vehicle) == "B_APC_Tracked_01_AA_F") ||*/ _type isKindOf "Air") && (missionNamespace getVariable "CTI_AC_ENABLED")>0 && CTI_isCLient) then { _loadout = _vehicle getVariable "CTI_AC_AIRCRAFT_LOADOUT_MOUNTED"; if(!isNil "_loadout") then { - + _vehicle call CTI_AC_PURGE_ALL_WEAPONS; [_vehicle, _t_side] call CTI_AC_REFRESH_LOADOUT_ON_MOUNTED; //Not needed if loadout_mounted if (_vehicle isKindOf "Air") then {[_vehicle, _side] call CTI_CO_FNC_SanitizeAircraft}; @@ -61,7 +59,7 @@ if ( (((typeOf _vehicle) == "O_APC_Tracked_02_AA_F") //--- Driver {_vehicle removeMagazineTurret [_x, [-1]];} forEach (getArray(configFile >> "CfgVehicles" >> _type >> "magazines")); {_vehicle addMagazineTurret [_x, [-1]]} forEach (getArray(configFile >> "CfgVehicles" >> _type >> "magazines")); - + //--- Turrets if (!(_vehicle isKindOf "B_SAM_System_01_F" || _vehicle isKindOf "B_SAM_System_02_F" || _vehicle isKindOf "B_AAA_System_01_F")) then { _config = configFile >> "CfgVehicles" >> _type >> "turrets"; @@ -84,8 +82,8 @@ if ( (((typeOf _vehicle) == "O_APC_Tracked_02_AA_F") //--- Sanitize the artillery loadout, mines may lag the server for instance if (CTI_ARTILLERY_FILTER == 1) then {if (typeOf _vehicle in (missionNamespace getVariable ["CTI_ARTILLERY", []])) then {(_vehicle) call CTI_CO_FNC_SanitizeArtillery}}; - - + + if (_vehicle isKindOf "tank" || _vehicle isKindOf "Wheeled_APC_F") then { _ammo=if (! (count ((_side) call CTI_CO_FNC_GetSideUpgrades) == 0)) then {2+2*(((_side) call CTI_CO_FNC_GetSideUpgrades) select CTI_UPGRADE_TRA)} else {2}; _vehicle setVariable ["TROPHY_time_l",time-10000,true]; @@ -94,7 +92,7 @@ if ( (((typeOf _vehicle) == "O_APC_Tracked_02_AA_F") _vehicle setVariable ["TROPHY_ammo_r",ceil(_ammo/2),true]; }; - + if (_vehicle isKindOf "B_SAM_System_01_F" || _vehicle isKindOf "B_SAM_System_02_F" || _vehicle isKindOf "B_AAA_System_01_F") then { ["SERVER", "Request_Locality", [_vehicle,player]] call CTI_CO_FNC_NetSend; if (local _vehicle) then { diff --git a/Common/Init/Init_CommonConstants.sqf b/Common/Init/Init_CommonConstants.sqf index 2044f2081..d60c47857 100644 --- a/Common/Init/Init_CommonConstants.sqf +++ b/Common/Init/Init_CommonConstants.sqf @@ -356,6 +356,8 @@ with missionNamespace do { if (isNil 'CTI_TOWNS_RESISTANCE_DETECTION_RANGE') then {CTI_TOWNS_RESISTANCE_DETECTION_RANGE = 800};//Done if (isNil 'CTI_TOWNS_RESISTANCE_GROUPS_RATIO') then {CTI_TOWNS_RESISTANCE_GROUPS_RATIO = 50};//Done if (isNil 'CTI_TOWNS_RESISTANCE_INACTIVE_MAX') then {CTI_TOWNS_RESISTANCE_INACTIVE_MAX = 30};//Done + if (isNil 'CTI_TOWNS_RESISTANCE_HEAVY') then {CTI_TOWNS_RESISTANCE_HEAVY = 1};//Done + if (isNil 'CTI_SHOPS_HEAVY') then {CTI_SHOPS_HEAVY = 1};//Done if (isNil 'CTI_TOWNS_INCOME_RATIO') then {CTI_TOWNS_INCOME_RATIO = 2}; if (isNil 'CTI_TOWNS_CAPURE_RATIO') then {CTI_TOWNS_CAPURE_RATIO = 5}; }; @@ -383,8 +385,8 @@ with missionNamespace do { */ //--- Base: Area -//CTI_BASE_AREA_MAX = if !(MADE_FOR_STRATIS) then {4} else {3}; -CTI_BASE_AREA_RANGE = if !(MADE_FOR_STRATIS) then {250} else {100}; +//CTI_BASE_AREA_MAX = if (ISLAND != 1) then {4} else {3}; +CTI_BASE_AREA_RANGE = if (ISLAND != 1) then {250} else {100}; //--- Base: Construction CTI_BASE_CONSTRUCTION_DECAY_TIMEOUT = 600; //--- Decay starts after x seconds unattended. @@ -430,8 +432,8 @@ CTI_BASE_WORKERS_WANDER_RANGE_MAX = 225; //--- Worker may wander no further than //--- Base: Parameters with missionNamespace do { - if (isNil 'CTI_BASE_AREA_MAX') then {CTI_BASE_AREA_MAX=if !(MADE_FOR_STRATIS) then {4} else {3};}; - if (isNil 'CTI_BASE_AREA_RANGE') then {CTI_BASE_AREA_MAX=if !(MADE_FOR_STRATIS) then {250} else {100};}; + if (isNil 'CTI_BASE_AREA_MAX') then {CTI_BASE_AREA_MAX = if (ISLAND != 1) then {4} else {3};}; + if (isNil 'CTI_BASE_AREA_RANGE') then {CTI_BASE_AREA_MAX = if (ISLAND != 1) then {250} else {100};}; if (isNil 'CTI_BASE_FOB_MAX') then {CTI_BASE_FOB_MAX = 4}; //--- Maximum amount of FOBs which a side may place if (isNil 'CTI_BASE_HQ_REPAIR') then {CTI_BASE_HQ_REPAIR = 1}; //--- Determine whether the HQ can be repaired or not if (isNil 'CTI_BASE_STARTUP_PLACEMENT') then {CTI_BASE_STARTUP_PLACEMENT = 10000}; //--- Each side need to be further than x meters @@ -501,7 +503,7 @@ CTI_ARTILLERY_TIMEOUT = 180; //--- Delay between each fire mission CTI_ECONOMY_POOL_RESOURCES_PERCENTAGE_MIN = 30; //--- Keep values of 10 CTI_MARKERS_OPACITY = 0.5; -CTI_MARKERS_TOWN_AREA_RANGE = if !(MADE_FOR_STRATIS) then {250} else {150}; +CTI_MARKERS_TOWN_AREA_RANGE = if (ISLAND != 1) then {250} else {150}; CTI_MARKERS_UNITS_DEAD_DELAY = 50; CTI_MARKERS_VEHICLES_DEAD_DELAY = 125; @@ -552,13 +554,13 @@ CTI_HALO_COOLDOWN = 20*60; CTI_HALO_LASTTIME=-CTI_HALO_COOLDOWN; CTI_HALO_ALTITUDE = 3000; CTI_HALO_RATIO = 3; -CTI_UPGRADE_RATIO=if !(MADE_FOR_STRATIS) then {7} else {2}; +CTI_UPGRADE_RATIO = if (ISLAND != 1) then {7} else {2}; CTI_VOTE_RATIO=0.51; //Buildings without spawn positions -CTI_BUILDINGPOS_MISSING = ["Land_Dome_Small_F","Land_Dome_Big_F","Land_FuelStation_Shed_F","Land_fs_roof_F","Land_FuelStation_01_roof_F","Land_FuelStation_02_roof_F","Land_FuelStation_01_roof_malevil_F","Land_SM_01_shelter_wide_F","Land_Shed_Big_F","Land_Shed_Small_F","Land_SM_01_shelter_narrow_F","Land_TentHangar_V1_F","Land_Airport_01_hangar_F","Land_Shed_06_F","Land_MetalShelter_01_F","Land_MetalShelter_02_F","Land_WarehouseShelter_01_F","Land_SCF_01_shed_F"]; +CTI_BUILDINGPOS_MISSING = ["Land_Stone_Gate_F","Land_Dome_Small_F","Land_Dome_Big_F","Land_FuelStation_Shed_F","Land_fs_roof_F","Land_FuelStation_01_roof_F","Land_FuelStation_02_roof_F","Land_FuelStation_01_roof_malevil_F","Land_SM_01_shelter_wide_F","Land_Shed_Big_F","Land_Shed_Small_F","Land_SM_01_shelter_narrow_F","Land_TentHangar_V1_F","Land_Airport_01_hangar_F","Land_Shed_06_F","Land_MetalShelter_01_F","Land_MetalShelter_02_F","Land_WarehouseShelter_01_F","Land_SCF_01_shed_F"]; with missionNamespace do { if (isNil 'CTI_ARTILLERY_SETUP') then {CTI_ARTILLERY_SETUP = -1}; //--- Artillery status (-2: Disabled, -1: Artillery Computer, 0: Short, 1: Medium, 2: Long, 3: Far) @@ -607,7 +609,7 @@ with missionNamespace do { if (isNil 'CTI_BASEBUILDING') then {CTI_BASEBUILDING = 1}; //DOn if (isNil 'CTI_TEAMSWAP') then {CTI_TEAMSWAP = 1}; //DOn if (isNil 'CTI_TEAMSTACK') then {CTI_TEAMSTACK = 1}; //DOn - if (isNil 'CTI_MAX_MISSION_TIME') then {CTI_MAX_MISSION_TIME = 12}; //DOne + if (isNil 'CTI_MAX_MISSION_TIME') then {CTI_MAX_MISSION_TIME = 0}; //DOne if (isNil 'CTI_VICTORY_HQ') then {CTI_VICTORY_HQ = 0}; //Done if (isNil 'CTI_HALO_POLES') then {CTI_HALO_POLES = 1}; if (isNil 'CTI_PLAYERS_GROUPSIZE') then {CTI_PLAYERS_GROUPSIZE = 10}; //Done @@ -624,11 +626,11 @@ with missionNamespace do { - if (isNil "CTI_SM_BASEP_M") then {CTI_SM_BASEP_M=0}; + if (isNil "CTI_SM_BASEP_M") then {CTI_SM_BASEP_M=-1}; if (isNil "CTI_SM_REPAIR") then {CTI_SM_REPAIR=1}; if (isNil "CTI_SM_MORTARS") then {CTI_SM_MORTARS=1}; if (isNil "CTI_SM_MINES") then {CTI_SM_MINES=1}; - if (isNil "CTI_SM_STRATEGIC") then {CTI_SM_STRATEGIC=0}; + if (isNil "CTI_SM_STRATEGIC") then {CTI_SM_STRATEGIC=1}; if (isNil "CTI_SM_STRATEGIC_NB") then {CTI_SM_STRATEGIC_NB=3}; if (isNil "CTI_SM_HALO") then {CTI_SM_HALO=1}; if (isNil "CTI_SM_RADAR") then {CTI_SM_RADAR=1}; diff --git a/Common/Init/Init_Location.sqf b/Common/Init/Init_Location.sqf index 805cd14f2..2508d37b7 100644 --- a/Common/Init/Init_Location.sqf +++ b/Common/Init/Init_Location.sqf @@ -11,10 +11,7 @@ _CENTER_RADIUS=(getMarkerSize "CENTER_POS")select 0; if ((_town distance _CENTER_POS)>_CENTER_RADIUS) exitwith {true}; -if (count _this > 4) then { - _forced_neigh= _this select 4; - _town setVariable ["cti_town_fneigh", _forced_neigh]; -}; + _town setVariable ["cti_town_name", _town_name]; @@ -27,9 +24,23 @@ if (CTI_IsServer || CTI_IsHeadless) then { _town setVariable ["cti_town_sideID", _sideID, true]; _town setVariable ["cti_town_lastSideID", _sideID, true]; _town setVariable ["cti_town_value", _town_value, true]; - _town setVariable ["cti_structure_type",CTI_FTOWN,true], + _town setVariable ["CTI_Neigh",[],true]; + _town setVariable ["cti_structure_type",CTI_FTOWN,true]; _current_side = _sideID call CTI_CO_FNC_GetSideFromID; - _town setFlagTexture ( _current_side call CTI_CO_FNC_GetSideFlag); + _town setPosATL [( (getPosATL _town) select 0 ),( (getPosATL _town) select 1),0]; + + if !((typeOf _town) == "Flagpole_F") then { + _flag= createVehicle ["Flagpole_F", getPos _town, [], 0, "CAN_COLLIDE"]; + _flag setPosATL [getPos _flag select 0,getPos _flag select 1,0]; + _flag allowDamage false; + _town setVariable ["cti_town_flag",_flag,true]; + } else { + _town setVariable ["cti_town_flag",_town,true]; + }; + + + + (_town getVariable ["cti_town_flag",objnull]) setFlagTexture ( _current_side call CTI_CO_FNC_GetSideFlag); /*if (missionNamespace getVariable "CTI_SM_STRATEGIC" == 0) then { (_town) execFSM "Server\FSM\town_capture.fsm"; } else {*/ diff --git a/README.md b/README.md index e1705802f..74a83d1a7 100644 --- a/README.md +++ b/README.md @@ -1,15 +1,15 @@ # Benny-Edition-CTI-0.97-Zerty-Modification -##Monetization +## Monetization This mission (or code that I own inside) __cannot__ be used in a monetization process as defined by BiS at http://www.bistudio.com/monetization & http://www.bistudio.com/monetization/faq -##Licence +## Licence Creative Commons License
BECTI Zerty Edit. by Zerty is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.
Based on a work at http://forums.bistudio.com/showthread.php?166433-SP-MP-BeCTI. This project is not affiliated or authorized by Bohemia Interactive a.s. Bohemia Interactive, ARMA, DAYZ and all associated logos and designs are trademarks or registered trademarks of Bohemia Interactive a.s. -##Credits: +## Credits: - *Benny* for the mission - *Bl1p, Fluit* for random AI skill - *=ATM=Pokertour* for ATM airdrop diff --git a/Rsc/Dialogs.hpp b/Rsc/Dialogs.hpp index 2b4534eed..960b691fc 100644 --- a/Rsc/Dialogs.hpp +++ b/Rsc/Dialogs.hpp @@ -311,6 +311,13 @@ class CTI_RscInteraction { action = "['OnSlatCage'] call compile preprocessFileLineNumbers 'Addons\Strat_mode\Tablet\Events_UI_Interact.sqf'"; toolTip=$STR_Icon_SlatCage; }; + class CTI_Icon_Reset : CTI_Icon_fpk { + idc = 511039; + x = "SafeZoneX + SafeZoneW*0.55"; + text = "Rsc\Pictures\icon_reset.paa"; + action = "['OnResetDroneAI'] call compile preprocessFileLineNumbers 'Addons\Strat_mode\Tablet\Events_UI_Interact.sqf'"; + toolTip=$STR_Icon_Reset; + }; }; }; @@ -581,9 +588,13 @@ class CTI_RscTablet_main { tooltip = $STR_Control_Eject_Tooltip; action = "['onVotePressed'] call compile preprocessFileLineNumbers 'Addons\Strat_mode\Tablet\Events_UI_TabletMain.sqf'"; }; - class CTI_Control_Log : CTI_Control_Eject { + class CTI_Control_ComBL : CTI_Control_Eject { idc = 210017; y = "SafeZoneY+safezoneH*(0.28+0.035*1+5)"; + text = "COM Blacklist"; + tooltip ="manage global commander blacklist"; + action = "['onCOMBLPressed'] call compile preprocessFileLineNumbers 'Addons\Strat_mode\Tablet\Events_UI_TabletMain.sqf'"; + }; class CTI_Control_Request : CTI_Control_Eject { idc = 210018; @@ -1950,6 +1961,15 @@ class CTI_RscTabletDefenseMenu { text = ""; action = "['onAutoAlign'] call compile preprocessFileLineNumbers 'Client\Events\Events_UI_DefenseMenu.sqf'"; }; + class CTI_Menu_Control_AutoManning : CTI_Menu_Control_Undo { + idc = 200004; + + y = "SafeZoneY+safezoneH*(0.280+0.06+0.005*4+0.04*3)"; + + text = ""; + tooltip = $STR_Defenses_Tooltip; + action = "['onAutoManning'] call compile preprocessFileLineNumbers 'Client\Events\Events_UI_DefenseMenu.sqf'"; + }; class CTI_Menu_Control_BuildingList : RscListNBox { idc = 200007; @@ -2227,6 +2247,86 @@ class CTI_RscTabletOnlineHelpMenu { }; }; + +//##################################################################################################################################### +//##################################################################################################################################### +//##################################################################################################################################### +//##################################################################################################################################### + + + +class CTI_RscTabletComBLMenu { + movingEnable = 0; + idd = 999000; + onLoad = "uiNamespace setVariable ['cti_dialog_ui_comblacklist', _this select 0];['onLoad'] call compile preprocessFileLineNumbers 'Addons\Strat_mode\Old_Com_Eject\Events_UI_combl.sqf'"; + onUnload = "uiNamespace setVariable ['cti_dialog_ui_comblacklist', nil]; ['onUnload'] call compile preprocessFileLineNumbers 'Addons\Strat_mode\Old_Com_Eject\Events_UI_combl.sqf'"; + + class controlsBackground { + class CTI_Background : RscTablet { + }; + class CTI_Menu_InfoListFrame2 : RscText { + x = "SafeZoneX + (SafeZoneW - (3/4*SafeZoneH))/2+ (3/4*SafeZoneH) *0.191"; + y = "SafeZoneY+safezoneH*0.275"; + w = "(3/4*SafeZoneH)*0.615"; + h = "SafeZoneH*0.451"; + colorBackground[] = {0,0,0,1}; + text=""; + }; + + class CTI_Menu_InfoListFrame : RscFrame { + x = "SafeZoneX + (SafeZoneW - (3/4*SafeZoneH))/2+ (3/4*SafeZoneH) *0.191+(3/4*SafeZoneH)*0.615*0.02"; + y = "SafeZoneY+safezoneH*0.280"; + w = "(3/4*SafeZoneH)*0.615*0.36"; + h = "SafeZoneH*(0.436-0.04-0.01-0.04-0.01)"; + }; + + class CTI_Control_Exit : RscButton { + idc = 22555; + + x = "SafeZoneX + (SafeZoneW - (3/4*SafeZoneH))/2+ (3/4*SafeZoneH) *0.191+(3/4*SafeZoneH)*0.615*0.02"; + y = "SafeZoneY+safezoneH*(0.666+0.005)"; + w = "(3/4*SafeZoneH)*0.615*0.36"; + h = "SafeZoneH * 0.04"; + + text = $STR_Control_Exit; + action = "closeDialog 0"; + }; + + }; + + class controls { + class CTI_Menu_List_Players : RscListBox { + idc = 999001; + + x = "SafeZoneX + (SafeZoneW - (3/4*SafeZoneH))/2+ (3/4*SafeZoneH) *0.191+(3/4*SafeZoneH)*0.615*0.02"; + y = "SafeZoneY+safezoneH*0.280"; + w = "(3/4*SafeZoneH)*0.615*0.36"; + h = "SafeZoneH*(0.436-0.04-0.01-0.04-0.01)"; + + rowHeight = "1.5 * ( ( ((safezoneW / safezoneH) min 1.2) / 1.2) / 25)"; + sizeEx = "0.78 * ( ( ((safezoneW / safezoneH) min 1.2) / 1.2) / 25)"; + + colorText[] = {1,1,1,1}; + colorBackground[] = {0,0,0,0}; + onLBSelChanged = "['onLBSelChanged', _this select 1] call compile preprocessFileLineNumbers 'Addons\Strat_mode\Old_Com_Eject\Events_UI_combl.sqf'"; + + }; + class CTI_Control_SetBlacklist : RscButton { + idc = 999002; + x = "SafeZoneX + (SafeZoneW - (3/4*SafeZoneH))/2+ (3/4*SafeZoneH) *0.191+(3/4*SafeZoneH)*0.615*0.02"; + w = "(3/4*SafeZoneH)*0.615*0.36"; + h = "SafeZoneH * 0.04"; + + y = "SafeZoneY+safezoneH*(0.666+0.005 - 0.04-0.005)"; + + + text = "Blacklist"; + action = "['onBlacklist'] call compile preprocessFileLineNumbers 'Addons\Strat_mode\Old_Com_Eject\Events_UI_combl.sqf'"; + }; + + }; +}; + //##################################################################################################################################### //##################################################################################################################################### //##################################################################################################################################### diff --git a/Rsc/Game.hpp b/Rsc/Game.hpp index d8005f666..c34cd6c20 100644 --- a/Rsc/Game.hpp +++ b/Rsc/Game.hpp @@ -4,11 +4,11 @@ respawnDelay = 10; respawnDialog = false; //--- Require briefing.html to show up. -onLoadMission = "BECTI - Zerty/HTom/Yoshi_E 1.3.4.5"; +onLoadMission = "BECTI - Zerty/HTom/Yoshi_E 1.3.5.5"; onLoadMissionTime = false; -onLoadName = "BECTI - Zerty/HTom/Yoshi_E"; +onLoadName = "BECTI Altis"; -briefingName = "BECTI - Zerty/HTom/Yoshi_E 1.3.4.5"; +briefingName = "BECTI - Zerty/HTom/Yoshi_E 1.3.5.5"; //--- ArmA 3 Specifics dev = "Benny"; diff --git a/Rsc/Parameters.hpp b/Rsc/Parameters.hpp index 4a2515ca8..eb4d2b771 100644 --- a/Rsc/Parameters.hpp +++ b/Rsc/Parameters.hpp @@ -153,7 +153,7 @@ class Params { title = $STR_CTI_VEHICLES_EMPTY_TIMEOUT; values[] = {60,120,180,240,300,600,1200,1800,2400,3000,3600}; texts[] = {"1 Minute","2 Minutes","3 Minutes","4 Minutes","5 Minutes","10 Minutes","20 Minutes","30 Minutes","40 Minutes","50 Minutes","1 Hour"}; - default = 3600; + default = 2400; }; class CTI_GRAPHICS_TG_MAX { title = $STR_CTI_GRAPHICS_TG_MAX; @@ -275,8 +275,8 @@ class Params { class CTI_PLAYERS_GROUPSIZE { title = $STR_CTI_PLAYERS_GROUPSIZE; - values[] = {0,1,2,3,4,5,8,10,12,14,16}; - texts[] = {$STR_CTI_PLAYERS_GROUPSIZE_AUTO,"1","2","3","4","5","8","10","12","14","16"}; + values[] = {-10,0,1,2,3,4,5,8,10,12,14,16}; + texts[] = {$STR_CTI_DISABLED, $STR_CTI_PLAYERS_GROUPSIZE_AUTO,"1","2","3","4","5","8","10","12","14","16"}; default = 0; }; class CTI_GAMEPLAY_MISSILES_RANGE { @@ -305,9 +305,9 @@ class Params { }; class CTI_BASEBUILDING { title = $STR_CTI_BASEBUILDING; - values[] = {0,1}; - texts[] = {$STR_CTI_BASEBUILDING_WK,$STR_CTI_BASEBUILDING_PL}; - default = 1; + values[] = {0,1,2}; + texts[] = {$STR_CTI_BASEBUILDING_WK,$STR_CTI_BASEBUILDING_PL,$STR_CTI_BASEBUILDING_BOTH}; + default = 2; }; class CTI_GAMEPLAY_DARTER { title = $STR_CTI_GAMEPLAY_DARTER; @@ -393,6 +393,18 @@ class Params { texts[] = {"1","2","3","5","10","100"}; default = 1; }; + class CTI_TOWNS_RESISTANCE_HEAVY { + title = $STR_CTI_TOWNS_RESISTANCE_HEAVY; + values[] = {1,0}; + texts[] = {$STR_CTI_ENABLED, $STR_CTI_DISABLED}; + default = 1; + }; + class CTI_SHOPS_HEAVY { + title = $STR_CTI_SHOPS_HEAVY; + values[] = {1,0}; + texts[] = {$STR_CTI_ENABLED, $STR_CTI_DISABLED}; + default = 1; + }; class CTI_WEATHER_INITIAL { title = $STR_CTI_WEATHER_INITIAL; @@ -429,14 +441,14 @@ class Params { title = $STR_CTI_SM_BASEP_M; values[] = {0,-1,2,5,10,20,50,100}; texts[] = {$STR_CTI_DISABLED,"Hard Protection","Dmg reduced by 2","Dmg reduced by 5","Dmg reduced by 10","Dmg reduced by 20","Dmg reduced by 50","Dmg reduced by 100"}; - default = 10; + default = 50; }; class CTI_SM_PATROLS { title = $STR_CTI_SM_PATROLS; values[] = {0,1}; texts[] = {$STR_CTI_DISABLED,$STR_CTI_ENABLED}; - default = 1; + default = 0; }; /*class CTI_SM_PATROLS_NUMBER { title = "Zerty: Strategic: Patrols number"; @@ -475,7 +487,12 @@ class Params { texts[] = {"0","100","150","200","250","300","350","400","500","600"}; default = 250; }; - + class CTI_SM_SHIP { + title = $STR_CTI_SM_SHIP; + values[] = {0,1}; + texts[] = {$STR_CTI_DISABLED,$STR_CTI_ENABLED}; + default = 1; + }; class SEPARATOR3 { title = $STR_CTI_SEPARATOR3; diff --git a/Rsc/Pictures/icon_reset.paa b/Rsc/Pictures/icon_reset.paa new file mode 100644 index 000000000..c2c785122 Binary files /dev/null and b/Rsc/Pictures/icon_reset.paa differ diff --git a/Rsc/Resources.hpp b/Rsc/Resources.hpp index fbb66b63b..e7d2c7b02 100644 --- a/Rsc/Resources.hpp +++ b/Rsc/Resources.hpp @@ -538,6 +538,7 @@ class RscMapControl { showCountourInterval = 0; scaleMin = 0.001; scaleMax = 1.0; + widthRailWay = 4; scaleDefault = 0.16; maxSatelliteAlpha = 0.85; alphaFadeStartScale = 0.35; diff --git a/Rsc/Sounds.hpp b/Rsc/Sounds.hpp index 4d2bd9160..2bd013670 100644 --- a/Rsc/Sounds.hpp +++ b/Rsc/Sounds.hpp @@ -5,11 +5,6 @@ class CfgSounds { sound[] = {"Rsc\Sounds\prison.ogg", 1, 1.0}; titles[] = {}; }; - class trophy { - name = "prison"; - sound[] = {"Rsc\Sounds\trophy.ogg", db+10, 1.0}; - titles[] = {}; - }; class Vent { name="Vent"; sound[]={"Addons\ATM_Airdrop\data\vent.ogg",db-11,1.0}; diff --git a/Rsc/Sounds/trophy.ogg b/Rsc/Sounds/trophy.ogg deleted file mode 100644 index c99cd173e..000000000 Binary files a/Rsc/Sounds/trophy.ogg and /dev/null differ diff --git a/Server/FSM/update_commander.fsm b/Server/FSM/update_commander.fsm index 83d075860..737a23688 100644 --- a/Server/FSM/update_commander.fsm +++ b/Server/FSM/update_commander.fsm @@ -9,7 +9,7 @@ item4[] = {"Human",8,218,-250.000000,-200.000000,-150.000000,-150.000000,0.00000 item5[] = {"AI",4,218,-100.000000,-100.000000,0.000000,-50.000000,1.000000,"AI"}; item6[] = {"Phase_III_Action",2,250,-100.000000,200.000000,0.000000,250.000000,0.000000,"Phase III" \n "Action"}; item7[] = {"Roles",4,218,-250.000000,400.000000,-150.000000,450.000000,1.000000,"Roles"}; -item8[] = {"Set_Roles__One_Time",2,250,-250.000000,500.000000,-150.000000,550.000000,0.000000,"Set" \n "Roles" \n "(One Time)"}; +item8[] = {"Set_Roles__One_Time",2,4346,-250.000000,500.000000,-150.000000,550.000000,0.000000,"Set" \n "Roles" \n "(One Time)"}; item9[] = {"Structure",4,218,50.000000,400.000000,150.000000,450.000000,4.000000,"Structure"}; item10[] = {"Update_Structure",2,250,50.000000,500.000000,150.000000,550.000000,0.000000,"Update" \n "Structures"}; item11[] = {"Defenses",4,218,175.000000,400.000000,275.000000,450.000000,3.000000,"Defenses"}; @@ -19,7 +19,7 @@ item14[] = {"Update_Upgrades",2,250,550.000000,500.000000,650.000000,550.000000, item15[] = {"Teams",4,218,-500.000000,400.000000,-400.000000,450.000000,3.000000,"Teams"}; item16[] = {"Update_Teams",2,250,-500.000000,500.000000,-400.000000,550.000000,0.000000,"Update" \n "Teams"}; item17[] = {"Orders",4,218,-375.000000,400.000000,-275.000000,450.000000,2.000000,"Orders"}; -item18[] = {"Update_Orders",2,4346,-375.000000,500.000000,-275.000000,550.000000,0.000000,"Update" \n "Orders"}; +item18[] = {"Update_Orders",2,250,-375.000000,500.000000,-275.000000,550.000000,0.000000,"Update" \n "Orders"}; item19[] = {"",7,210,-54.000004,696.000000,-46.000000,704.000000,0.000000,""}; item20[] = {"",7,210,696.000000,696.000000,704.000000,704.000000,0.000000,""}; item21[] = {"",7,210,696.000000,-279.000000,704.000000,-271.000000,0.000000,""}; @@ -86,840 +86,887 @@ link44[] = {33,34}; link45[] = {34,1}; link46[] = {35,36}; link47[] = {36,19}; -globals[] = {25.000000,1,0,0,0,640,480,1,223,6316128,1,-505.609863,910.706909,936.954651,-404.738892,635,881,1}; -window[] = {2,-1,-1,-1,-1,1006,225,1480,225,3,653}; +globals[] = {0.000000,0,0,0,0,640,480,1,223,6316128,1,-382.509674,787.605042,926.103088,57.078770,554,609,1}; +window[] = {0,-1,-1,-1,-1,989,208,1669,208,1,572}; *//*%FSM*/ class FSM { - fsmName = "update_commander.fsm"; - class States - { - /*%FSM*/ - class Start_FSM - { - name = "Start_FSM"; - init = /*%FSM*/"_side = _this select 0;" \n - "_sideCommander = _this select 1;" \n - "_sideID = (_side) call CTI_CO_FNC_GetSideID;" \n - "_sideLogic = (_side) call CTI_CO_FNC_GetSideLogic;" \n - "" \n - "" \n - "_ncycle = 0;" \n - "_lastAction = """";" \n - "_build = [];" \n - "" \n - "_towns_total = count CTI_Towns;" \n - "" \n - "_role_assigned = false;" \n - "_role_assigned_lastcheck = -3000;" \n - "" \n - "_commander_lastmove = -100;" \n - "_commander_buildorderstart = -1;" \n - "_commander_lastsalvager_addin = -600;" \n - "_commander_lastteamupdate = 0;" \n - "" \n - "_logical_path = missionNamespace getVariable format[""CTI_%1_Commander_Path"", _side];" \n - "_logical_path_reached = 0;" \n - "_logical_path_index = 0;" \n - "" \n - "if (isMultiplayer) then {" \n - " (leader _sideCommander) removeAllEventHandlers ""respawn"";" \n - " (leader _sideCommander) addEventHandler [""respawn"", format[""[_this select 0, _this select 1, %1] spawn CTI_FSM_UpdateCommander_Respawn_MP"", _sideID]];" \n - "} else {" \n - " (leader _sideCommander) addEventHandler [""killed"", format[""[_this select 0, %1] spawn CTI_FSM_UpdateCommander_Respawn_SP"", _sideID]];" \n - "};"/*%FSM*/; - precondition = /*%FSM*/""/*%FSM*/; - class Links - { - /*%FSM*/ - class Cycle + fsmName = "update_commander.fsm"; + class States { - priority = 0.000000; - to="Phase_I_Commande"; - precondition = /*%FSM*/""/*%FSM*/; - condition=/*%FSM*/"time > _ncycle"/*%FSM*/; - action=/*%FSM*/""/*%FSM*/; + /*%FSM*/ + class Start_FSM + { + name = "Start_FSM"; + itemno = 0; + init = /*%FSM*/"_side = _this select 0;" \n + "_sideCommander = _this select 1;" \n + "_sideID = (_side) call CTI_CO_FNC_GetSideID;" \n + "_sideLogic = (_side) call CTI_CO_FNC_GetSideLogic;" \n + "" \n + "" \n + "_ncycle = 0;" \n + "_lastAction = """";" \n + "_build = [];" \n + "" \n + "_towns_total = count CTI_Towns;" \n + "" \n + "_role_assigned = false;" \n + "_role_assigned_lastcheck = -3000;" \n + "" \n + "_commander_lastmove = -100;" \n + "_commander_buildorderstart = -1;" \n + "_commander_lastsalvager_addin = -600;" \n + "_commander_lastteamupdate = 0;" \n + "" \n + "_logical_path = missionNamespace getVariable format[""CTI_%1_Commander_Path"", _side];" \n + "_logical_path_reached = 0;" \n + "_logical_path_index = 0;" \n + "" \n + "if (isMultiplayer) then {" \n + " (leader _sideCommander) removeAllEventHandlers ""respawn"";" \n + " (leader _sideCommander) addEventHandler [""respawn"", format[""[_this select 0, _this select 1, %1] spawn CTI_FSM_UpdateCommander_Respawn_MP"", _sideID]];" \n + "} else {" \n + " (leader _sideCommander) addEventHandler [""killed"", format[""[_this select 0, %1] spawn CTI_FSM_UpdateCommander_Respawn_SP"", _sideID]];" \n + "};"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class Cycle + { + itemno = 1; + priority = 0.000000; + to="Phase_I_Commande"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"time > _ncycle"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Phase_I_Commande + { + name = "Phase_I_Commande"; + itemno = 2; + init = /*%FSM*/"" \n + "" \n + "_ok = false;" \n + "if (isNull ( _sideLogic getVariable ""cti_commander"") && (_sideLogic getVariable ""cti_ai_commander"") && _sideCommander == (_sideLogic getVariable ""cti_ai_commander_group"") ) then {" \n + " _ok=true;" \n + " //if !(isPlayer leader _sideCommander) then { _ok = true };" \n + "};" \n + "" \n + "_ncycle = time + 5;"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class AI + { + itemno = 5; + priority = 1.000000; + to="Phase_II_Respawn"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"!CTI_GameOver && _ok"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class Human + { + itemno = 4; + priority = 0.000000; + to="End_FSM"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/""/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class End_FSM + { + name = "End_FSM"; + itemno = 3; + init = /*%FSM*/"_sideLogic setVariable [""cti_ai_commander"", false,true];" \n + "_sideLogic setVariable [""cti_ai_commander_group"",grpNull,true];" \n + "[[""CLIENT"", _side], ""Client_OnMessageReceived"", [""eject_com"", [format [""%1 (AI)"",(name leader _sideCommander)]] ] ] call CTI_CO_FNC_NetSend;"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + }; + }; + /*%FSM*/ + /*%FSM*/ + class Phase_III_Action + { + name = "Phase_III_Action"; + itemno = 6; + init = /*%FSM*/"_action = """";" \n + "" \n + "_funds = (_side) call CTI_CO_FNC_GetFundsCommander;" \n + "_structures = (_side) call CTI_CO_FNC_GetSideStructures;" \n + "_factory_commandCenter = [CTI_CONTROLCENTER, leader _sideCommander, _structures] call CTI_CO_FNC_GetClosestStructure;" \n + "" \n + "//--- Check base eta." \n + "_hq = (_side) call CTI_CO_FNC_GetSideHQ;" \n + "" \n + "if (alive _hq) then {_action = ""construction""};" \n + "if (alive _factory_commandCenter) then {_action = ""management""};" \n + "" \n + "if (alive _hq && alive _factory_commandCenter) then {" \n + " _action = if (_lastAction == ""construction"") then {""management""} else {""construction""};" \n + "};" \n + "" \n + "_lastAction = _action;" \n + "" \n + "//todo improve once all is built"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class Construction + { + itemno = 22; + priority = 2.000000; + to="Determine"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"_action == ""construction"""/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class Management + { + itemno = 23; + priority = 1.000000; + to="Determine_1"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"_action == ""management"""/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class Nil + { + itemno = 26; + priority = 0.000000; + to="Skip"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/""/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Set_Roles__One_Time + { + name = "Set_Roles__One_Time"; + itemno = 8; + init = /*%FSM*/"_role_assigned = true;" \n + "" \n + "_teams = (_side call CTI_CO_FNC_GetSideGroups) - [_sideCommander];" \n + "_teams_count = count _teams;" \n + "_ratio_infantry = ceil(_teams_count * .45);" \n + "_ratio_light_n_heavy = round(_teams_count * .20);" \n + "_ratio_heavy = round(_teams_count * .30);" \n + "_ratio_air = ceil(_teams_count * .05);" \n + "" \n + "_assigned = 0;" \n + "for '_j' from _teams_count-1 to 0 step -1 do {" \n + " _group = _teams select _j;" \n + " if(!(isMultiplayer && isPlayer (_group getVariable [""bis_dg_cre"", objNull]))) then {" \n + " _group setVariable [""cti_client_group"", true];" \n + " };" \n + " _last_assigned = _assigned;" \n + " while { _ratio_air > 0 && _assigned == _last_assigned} do {" \n + " _group setVariable [""cti_role_evo"", ""Air""];" \n + " _ratio_air = _ratio_air - 1;" \n + " _assigned = _assigned + 1;" \n + " };" \n + " while { _ratio_heavy > 0 && _assigned == _last_assigned} do {" \n + " _group setVariable [""cti_role_evo"", ""Heavy""];" \n + " _ratio_heavy = _ratio_heavy - 1;" \n + " _assigned = _assigned + 1;" \n + " };" \n + " while { _ratio_infantry > 0 && _assigned == _last_assigned} do {" \n + " _group setVariable [""cti_role_evo"", ""Infantry""];" \n + " _ratio_infantry = _ratio_infantry - 1;" \n + " _assigned = _assigned + 1;" \n + " };" \n + " while { _ratio_light_n_heavy > 0 && _assigned == _last_assigned} do {" \n + " _group setVariable [""cti_role_evo"", ""Light""];" \n + " _ratio_light_n_heavy = _ratio_light_n_heavy - 1;" \n + " _assigned = _assigned + 1;" \n + " };" \n + " " \n + " //--- What kind?.." \n + " _category = missionNamespace getVariable format[""CTI_SQUADS_%1_CATEGORY_%2"", _side, _group getVariable ""cti_role_evo""];" \n + " " \n + " if !(isNil '_category') then { [_category, _group, _side, _teams] call CTI_FSM_UpdateCommander_SetAIRole };" \n + " " \n + " diag_log format [""DEBUG TEAM SET: %1 %2 %3"", _group, _group getVariable ""cti_role_evo"", _group getVariable ""cti_role""];" \n + "};" \n + "" \n + "//--- Assign Take Hold randomly" \n + "{" \n + " if !((_x getVariable ""cti_order"") in [CTI_ORDER_HOLDTOWNSBASES, CTI_ORDER_HOLDTOWNSBASE]) then {" \n + " if (random 100 > (40 + (random 15))) then {" \n + " _x setVariable [""cti_order"", CTI_ORDER_TAKEHOLDTOWNS, true]; " \n + " _x setVariable [""cti_order_pos"", [0,0], true]" \n + " };" \n + " };" \n + "} forEach _teams;" \n + ""/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class Cycle + { + itemno = 1; + priority = 0.000000; + to="Phase_I_Commande"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"time > _ncycle"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Update_Structure + { + name = "Update_Structure"; + itemno = 10; + init = /*%FSM*/"//--- Nothing is being built" \n + "if (count _build < 1) then {" \n + " _increment = false;" \n + " _template = missionNamespace getVariable format[""CTI_%1_Base_Template"", _side];" \n + " " \n + " //--- The structure is not built around" \n + " _position_commander = getPos leader( _sideCommander);" \n + " if !([_side, _selected_param, _position_commander, 1250] call CTI_CO_FNC_HasStructure) then {" \n + " //--- But is it in WIP?" \n + " _is_being_built = false;" \n + " {if ((_x getVariable ""cti_structure_type"") == _selected_param && _x distance _position_commander <= 1250) exitWith {_is_being_built = true}} forEach (_sideLogic getVariable ""cti_structures_wip"");" \n + " " \n + " //--- All clear!" \n + " if !(_is_being_built) then {" \n + " _var = missionNamespace getVariable format [""CTI_%1_%2"", _side, _selected_param];" \n + " " \n + " if !(isNil '_var') then {" \n + " if (_funds >= (_var select 2)) then {" \n + " _index = -1;" \n + " {if ((_x select 0) == ((_var select 0) select 0)) exitWith {_index = _forEachIndex }} forEach _template;" \n + " if (_index != -1) then {" \n + " _emplacement = [_side, _var, _template select _index] call CTI_FSM_UpdateCommander_GetStructureEmplacement;" \n + " if (_emplacement select 0 != 0 && _emplacement select 1 != 0) then {_build = [(_var select 0) select 0, _var select 2, _emplacement]};" \n + " } else {" \n + " _increment = true; //--- We can't do it, what's next?" \n + " };" \n + " } else {" \n + " _increment = true; //--- We can't do it, what's next?" \n + " };" \n + " } else {" \n + " _increment = true; //--- We can't do it, what's next?" \n + " };" \n + " } else {" \n + " _increment = true; //--- We can't do it, what's next?" \n + " };" \n + " } else {" \n + " _increment = true; //--- We can't do it, what's next?" \n + " };" \n + " " \n + " if (_increment) then {_logical_path_index = if (_logical_path_index + 1 > _logical_path_reached) then {0} else {_logical_path_index + 1}};" \n + "};" \n + "" \n + "//--- Something is going to be built" \n + "if (count _build > 0) then {" \n + " if (_funds >= (_build select 1)) then {" \n + " _position = _build select 2;" \n + " _var = missionNamespace getVariable format [""CTI_%1_%2"", _side, _build select 0];" \n + " _distance_structure = (_var select 4) select 1;" \n + " _dir_to = [leader _sideCommander, _position] call CTI_CO_FNC_GetDirTo;" \n + " _goto = [(_position select 0) - ((sin _dir_to) * _distance_structure), (_position select 1) - ((cos _dir_to) * _distance_structure), 0];" \n + "" \n + " if ((leader _sideCommander) distance _goto <= 35 && alive (leader _sideCommander)) then {" \n + " //--- Construct" \n + " (leader _sideCommander) setDir _dir_to;" \n + " _direction_structure = (_var select 4) select 0;" \n + " _direction = 0 + ((_build select 2) select 1) + _direction_structure; //todo template defines that (0)" \n + " [format [""CTI_%1_%2"", _side, _build select 0], _side, (_build select 2), _direction] call CTI_SE_FNC_BuildStructure;" \n + " " \n + " [_side, -(_build select 1)] call CTI_CO_FNC_ChangeFundsCommander;" \n + " _score = round((_build select 1) / CTI_SCORE_BUILD_VALUE_PERPOINT);" \n + " if (_score > 0) then {(leader _sideCommander) addScore _score};" \n + " " \n + " _build = [];" \n + " " \n + " //--- Next!" \n + " if (_logical_path_reached < (count _logical_path)-1) then {_logical_path_reached = _logical_path_reached + 1};" \n + " _logical_path_index = if (_logical_path_index + 1 > _logical_path_reached) then {0} else {_logical_path_index + 1};" \n + " } else {" \n + " if (time - _commander_lastmove > 35) then { (leader _sideCommander) commandMove _goto };" \n + " };" \n + " };" \n + "};"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class Cycle + { + itemno = 1; + priority = 0.000000; + to="Phase_I_Commande"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"time > _ncycle"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Update_Defenses + { + name = "Update_Defenses"; + itemno = 12; + init = /*%FSM*/""/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class Cycle + { + itemno = 1; + priority = 0.000000; + to="Phase_I_Commande"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"time > _ncycle"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Update_Upgrades + { + name = "Update_Upgrades"; + itemno = 14; + init = /*%FSM*/"_upgrade = _selected_param select 0;" \n + "_upgrade_level = _selected_param select 1;" \n + "_position_commander = getPos leader( _sideCommander);" \n + "" \n + "_increment = false;" \n + "//--- Do we have a CC in range?" \n + "if ([_side, CTI_CONTROLCENTER, _position_commander, CTI_BASE_PURCHASE_UNITS_RANGE_CC] call CTI_CO_FNC_HasStructure) then {" \n + " //--- Do we have the upgrade yet?" \n + " if !([_side, _upgrade, _upgrade_level] call CTI_CO_FNC_HasUpgrade) then {" \n + " if ((_sideLogic getVariable ""cti_upgrade"") < 0) then {" \n + " _upgrades = (_side) call CTI_CO_FNC_GetSideUpgrades;" \n + " _upgrade_current = _upgrades select _upgrade;" \n + " " \n + " _upgrade_level = (missionNamespace getVariable Format[""CTI_%1_UPGRADES_LEVELS"", _side]) select _upgrade;" \n + " _upgrade_price = ((missionNamespace getVariable Format[""CTI_%1_UPGRADES_COSTS"", _side]) select _upgrade) select _upgrade_current;" \n + " " \n + " //--- The max upgrade hasn't been reached yet" \n + " if (_upgrade_current < _upgrade_level) then {" \n + " //--- We have the funds" \n + " if (_funds >= _upgrade_price) then {" \n + " [_side, -_upgrade_price] call CTI_CO_FNC_ChangeFundsCommander;" \n + " _sideLogic setVariable [""cti_upgrade"", _upgrade,true];" \n + " [_side, _upgrade, _upgrade_current] spawn CTI_SE_FNC_StartUpgrade;" \n + " " \n + " //--- Next!" \n + " if (_logical_path_reached < (count _logical_path)-1) then {_logical_path_reached = _logical_path_reached + 1};" \n + " _logical_path_index = if (_logical_path_index + 1 > _logical_path_reached) then {0} else {_logical_path_index + 1};" \n + " } else {" \n + " _increment = true;" \n + " };" \n + " } else {" \n + " _increment = true;" \n + " };" \n + " } else {" \n + " _increment = true;" \n + " };" \n + " } else {" \n + " _increment = true;" \n + " };" \n + "} else {" \n + " _increment = true;" \n + "};" \n + "" \n + "if (_increment) then {_logical_path_index = if (_logical_path_index + 1 > _logical_path_reached) then {0} else {_logical_path_index + 1}};"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class Cycle + { + itemno = 1; + priority = 0.000000; + to="Phase_I_Commande"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"time > _ncycle"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Update_Teams + { + name = "Update_Teams"; + itemno = 16; + init = /*%FSM*/"_commander_lastteamupdate = time;" \n + "_modifier = switch (true) do {case (_funds >= 5000): {1.25}; case (_funds >= 10000): {1.5}; case (_funds >= 20000): {1.75}; case (_funds >= 50000): {2}; default {1}};" \n + "" \n + "_structures = (_side) call CTI_CO_FNC_GetSideStructures;" \n + "" \n + "{" \n + " _funds = (_side) call CTI_CO_FNC_GetFundsCommander;" \n + " " \n + " //--- The leader is an AI and he is independent" \n + " if (!isPlayer leader _x && (_x getVariable ""cti_independent"")) then {" \n + " _lives = count (_x call CTI_CO_FNC_GetLiveUnits);" \n + " " \n + " //--- The limit hasn't been reached yet" \n + " if (_lives < CTI_AI_TEAMS_GROUPSIZE) then {" \n + " _role = _x getVariable ""cti_role"";" \n + " if !(isNil '_role') then {" \n + " _has_purchased = false;" \n + " " \n + " //--- Determine what we're deling with" \n + " _id = switch (true) do {" \n + " case (_role in (missionNamespace getVariable format[""CTI_SQUADS_%1_KIND_INFANTRY"", _side])): {0};" \n + " case (_role in (missionNamespace getVariable format[""CTI_SQUADS_%1_KIND_LIGHT"", _side])): {1};" \n + " case (_role in (missionNamespace getVariable format[""CTI_SQUADS_%1_KIND_HEAVY"", _side])): {2};" \n + " case (_role in (missionNamespace getVariable format[""CTI_SQUADS_%1_KIND_AIR"", _side])): {3};" \n + " default {0};" \n + " };" \n + " " \n + " //--- Is the factory available?" \n + " _factory = switch (_id) do {" \n + " case 0: {[CTI_BARRACKS, leader _x, _structures] call CTI_CO_FNC_GetClosestStructure};" \n + " case 1: {[CTI_LIGHT, leader _x, _structures] call CTI_CO_FNC_GetClosestStructure};" \n + " case 2: {[CTI_HEAVY, leader _x, _structures] call CTI_CO_FNC_GetClosestStructure};" \n + " case 3: {[CTI_AIR, leader _x, _structures] call CTI_CO_FNC_GetClosestStructure};" \n + " default {objNull};" \n + " };" \n + " " \n + " //--- The factory is alive and we're lucky enough!" \n + " if (alive _factory && random 100 <= (([CTI_AI_COMMANDER_BUYTO_INFANTRY, CTI_AI_COMMANDER_BUYTO_LIGHT, CTI_AI_COMMANDER_BUYTO_HEAVY, CTI_AI_COMMANDER_BUYTO_AIR] select _id) * _modifier)) then {" \n + " _var = missionNamespace getVariable format [""CTI_SQUAD_%1_%2"", _side, _role];" \n + " _cost = _var select 1;" \n + " " \n + " //--- We have enough cash to purchase the template" \n + " if (_funds >= _cost) then {" \n + " _has_purchased = true;" \n + " [_x, _side, _var select 2, _factory] call CTI_SE_FNC_AI_PurchaseSquad;" \n + " };" \n + " };" \n + " " \n + " //--- We couldn't purchase a unit set, maybe we can transfer some money if we're lucky enough?" \n + " if (!_has_purchased && random 100 <= CTI_AI_COMMANDER_TRANSFER_FUNDS_CHANCE && _funds > 2000) then {" \n + " _amount = round(([CTI_AI_COMMANDER_FUNDS_INFANTRY, CTI_AI_COMMANDER_FUNDS_LIGHT, CTI_AI_COMMANDER_FUNDS_HEAVY, CTI_AI_COMMANDER_FUNDS_AIR] select _id) * _modifier);" \n + " " \n + " if (_funds >= _amount) then {" \n + " [_side, -_amount] call CTI_CO_FNC_ChangeFundsCommander; //--- Minus for the com" \n + " [_x, _amount] call CTI_CO_FNC_ChangeFundsTeam; //--- Plus for the group" \n + " };" \n + " };" \n + " };" \n + " };" \n + " };" \n + "} forEach ((_side call CTI_CO_FNC_GetSideGroups) - [_sideCommander]);"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class Cycle + { + itemno = 1; + priority = 0.000000; + to="Phase_I_Commande"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"time > _ncycle"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Update_Orders + { + name = "Update_Orders"; + itemno = 18; + init = /*%FSM*/"_role_assigned_lastcheck = time;" \n + "_defensive_teams = [];" \n + "" \n + "{" \n + " if ((_x getVariable ""cti_order"") in [CTI_ORDER_HOLDTOWNSBASE, CTI_ORDER_HOLDTOWNSBASES]) then {_defensive_teams pushback _x};" \n + "} forEach ((_side call CTI_CO_FNC_GetSideGroups) - [_sideCommander]);" \n + "" \n + "if (count _defensive_teams > 0) then { //--- Update our defenders" \n + " _towns = (_sideID) call CTI_FSM_UpdateCommander_GetMostValuedTowns;" \n + " _structures = (_side) call CTI_CO_FNC_GetSideStructures;" \n + " " \n + " if (count _towns > 0) then {" \n + " _enemyside = ([west,east] - [_side]) select 0;" \n + " _enemy_hq = (_enemyside) call CTI_CO_FNC_GetSideHQ;" \n + " _focus_list = [];" \n + " if (alive _enemy_hq) then {_focus_list pushback _enemy_hq};" \n + " _focus_list = _focus_list + (_side call CTI_CO_FNC_GetSideStructures);" \n + " if (count _focus_list < 1) then {_focus_list = [_enemy_hq]};" \n + " " \n + " _towns = [_focus_list select floor(random count _focus_list), _towns] call CTI_CO_FNC_SortByDistance;" \n + " if (count _towns > 3) then { _towns resize 3 }; //--- Don't scatter the ai too far away from the frontline" \n + " };" \n + "" \n + " {" \n + " if (count _towns > 0) then { //--- We have towns to defend boys!" \n + " _x setVariable [""cti_order_pos"", _towns select floor (random count _towns), true];" \n + " } else { //--- Maybe we can defend the CC?" \n + " _factory_nearest = [CTI_CONTROLCENTER, leader _x, _structures] call CTI_CO_FNC_GetClosestStructure;" \n + " if !(isNull _factory_nearest) then { _x setVariable [""cti_order_pos"", _factory_nearest, true]};" \n + " };" \n + " } forEach _defensive_teams;" \n + "};"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class Cycle + { + itemno = 1; + priority = 0.000000; + to="Phase_I_Commande"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"time > _ncycle"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Determine + { + name = "Determine"; + itemno = 24; + init = /*%FSM*/"_action = """";" \n + "" \n + "//--- Start with the logical path" \n + "_path_item = _logical_path select _logical_path_index;" \n + "_selected_action = _path_item select 0;" \n + "_selected_param = _path_item select 1;" \n + "_selected_condition = _path_item select 2;" \n + "" \n + "if (call _selected_condition) then {" \n + " _action = _selected_action;" \n + "} else { //--- The condition could not be reached, skip" \n + " if (_logical_path_reached < (count _logical_path)-1) then {_logical_path_reached = _logical_path_reached + 1};" \n + " _logical_path_index = if (_logical_path_index + 1 > _logical_path_reached) then {0} else {_logical_path_index + 1};" \n + "};" \n + "" \n + "//--- Salvagers are needed?" \n + "_factory_repair = [CTI_REPAIR, leader _sideCommander, _structures] call CTI_CO_FNC_GetClosestStructure;" \n + "if !(isNull _factory_repair) then {" \n + " if (_funds >= CTI_VEHICLES_SALVAGER_PRICE && !isNull _factory_repair && count(_sideLogic getVariable ""cti_salvagers"") < CTI_VEHICLES_SALVAGE_INDEPENDENT_MAX && time - _commander_lastsalvager_addin > 300) then {_action = ""hire-salvager""};" \n + "};" \n + "" \n + "//--- The commander could not build in time" \n + "if (count _build > 0) then {if (time - _commander_buildorderstart > 240) then {_build = []}};" \n + "" \n + "//--- The commander is still building something" \n + "if (count _build > 0) then {_action = ""build-structures""};" \n + "" \n + "//--- We check the workers last" \n + "if (count (_sideLogic getVariable ""cti_workers"") < 4 && _funds >= CTI_BASE_WORKERS_PRICE) then {_action = ""hire-workers""};" \n + "" \n + ""/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class Structure + { + itemno = 9; + priority = 4.000000; + to="Update_Structure"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"_action == ""build-structures"""/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class Defenses + { + itemno = 11; + priority = 3.000000; + to="Update_Defenses"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"_action == ""build-defenses"""/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class Workers + { + itemno = 28; + priority = 2.000000; + to="Update_Workers"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"_action == ""hire-workers"""/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class Salvagers + { + itemno = 35; + priority = 1.000000; + to="Update_Salvagers"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"_action == ""hire-salvager"""/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class Nil + { + itemno = 26; + priority = 0.000000; + to="Skip"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/""/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class Upgrade + { + itemno = 13; + priority = 0.000000; + to="Update_Upgrades"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"_action == ""upgrade"""/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Determine_1 + { + name = "Determine_1"; + itemno = 25; + init = /*%FSM*/"_action = """";" \n + "if !(_role_assigned) exitWith {_action = ""roles""}; //--- Assign the roles at first" \n + "if (_role_assigned && time - _role_assigned_lastcheck > 600) then {_action = ""update-orders""};" \n + "" \n + "if (_action == """" && time - _commander_lastteamupdate > CTI_AI_COMMANDER_TEAMS_UPDATE_DELAY && _funds > 12500) then {_action = ""update-teams""};"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class Teams + { + itemno = 15; + priority = 3.000000; + to="Update_Teams"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"_action == ""update-teams"""/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class Orders + { + itemno = 17; + priority = 2.000000; + to="Update_Orders"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"_action == ""update-orders"""/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class Roles + { + itemno = 7; + priority = 1.000000; + to="Set_Roles__One_Time"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"_action == ""roles"""/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class Nil + { + itemno = 26; + priority = 0.000000; + to="Skip"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/""/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Skip + { + name = "Skip"; + itemno = 27; + init = /*%FSM*/""/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class Cycle + { + itemno = 1; + priority = 0.000000; + to="Phase_I_Commande"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"time > _ncycle"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Update_Workers + { + name = "Update_Workers"; + itemno = 29; + init = /*%FSM*/"[_side, true] spawn CTI_SE_FNC_CreateWorker;" \n + "[_side, -CTI_BASE_WORKERS_PRICE] call CTI_CO_FNC_ChangeFundsCommander;"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class Cycle + { + itemno = 1; + priority = 0.000000; + to="Phase_I_Commande"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"time > _ncycle"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Phase_II_Respawn + { + name = "Phase_II_Respawn"; + itemno = 30; + init = /*%FSM*/""/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class Ready + { + itemno = 31; + priority = 1.000000; + to="Phase_III_Action"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"time > (_sideCommander getVariable ""cti_nextrespawn"")"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class Respawning + { + itemno = 32; + priority = 0.000000; + to="Skip_1"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/""/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Skip_1 + { + name = "Skip_1"; + itemno = 33; + init = /*%FSM*/""/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class Cycle + { + itemno = 1; + priority = 0.000000; + to="Phase_I_Commande"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"time > _ncycle"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Update_Salvagers + { + name = "Update_Salvagers"; + itemno = 36; + init = /*%FSM*/"if ((leader _sideCommander) distance _factory_repair < 40) then {" \n + " _commander_lastsalvager_addin = time;" \n + " [_side, _sideCommander, _side, format[""CTI_Salvager_Independent_%1"", _side], _factory_repair, [true, true, true, true, true], (time + random 10000 - random 500 + diag_frameno)] call CTI_SE_FNC_OnClientPurchase;" \n + "} else {" \n + " if (time - _commander_lastmove > 25) then { (leader _sideCommander) commandMove ([getPos _factory_repair, 2, 15] call CTI_CO_FNC_GetRandomPosition) };" \n + "};"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class Cycle + { + itemno = 1; + priority = 0.000000; + to="Phase_I_Commande"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"time > _ncycle"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ }; - /*%FSM*/ - }; - }; - /*%FSM*/ - /*%FSM*/ - class Phase_I_Commande - { - name = "Phase_I_Commande"; - init = /*%FSM*/"" \n - "" \n - "_ok = false;" \n - "if (isNull ( _sideLogic getVariable ""cti_commander"") && (_sideLogic getVariable ""cti_ai_commander"") && _sideCommander == (_sideLogic getVariable ""cti_ai_commander_group"") ) then {" \n - " _ok=true;" \n - " //if !(isPlayer leader _sideCommander) then { _ok = true };" \n - "};" \n - "" \n - "_ncycle = time + 5;"/*%FSM*/; - precondition = /*%FSM*/""/*%FSM*/; - class Links - { - /*%FSM*/ - class AI + initState="Start_FSM"; + finalStates[] = { - priority = 1.000000; - to="Phase_II_Respawn"; - precondition = /*%FSM*/""/*%FSM*/; - condition=/*%FSM*/"!CTI_GameOver && _ok"/*%FSM*/; - action=/*%FSM*/""/*%FSM*/; + "End_FSM", }; - /*%FSM*/ - /*%FSM*/ - class Human - { - priority = 0.000000; - to="End_FSM"; - precondition = /*%FSM*/""/*%FSM*/; - condition=/*%FSM*/""/*%FSM*/; - action=/*%FSM*/""/*%FSM*/; - }; - /*%FSM*/ - }; - }; - /*%FSM*/ - /*%FSM*/ - class End_FSM - { - name = "End_FSM"; - init = /*%FSM*/"_sideLogic setVariable [""cti_ai_commander"", false,true];" \n - "_sideLogic setVariable [""cti_ai_commander_group"",grpNull,true];" \n - "[[""CLIENT"", _side], ""Client_OnMessageReceived"", [""eject_com"", [format [""%1 (AI)"",(name leader _sideCommander)]] ] ] call CTI_CO_FNC_NetSend;"/*%FSM*/; - precondition = /*%FSM*/""/*%FSM*/; - class Links - { - }; - }; - /*%FSM*/ - /*%FSM*/ - class Phase_III_Action - { - name = "Phase_III_Action"; - init = /*%FSM*/"_action = """";" \n - "" \n - "_funds = (_side) call CTI_CO_FNC_GetFundsCommander;" \n - "_structures = (_side) call CTI_CO_FNC_GetSideStructures;" \n - "_factory_commandCenter = [CTI_CONTROLCENTER, leader _sideCommander, _structures] call CTI_CO_FNC_GetClosestStructure;" \n - "" \n - "//--- Check base eta." \n - "_hq = (_side) call CTI_CO_FNC_GetSideHQ;" \n - "" \n - "if (alive _hq) then {_action = ""construction""};" \n - "if (alive _factory_commandCenter) then {_action = ""management""};" \n - "" \n - "if (alive _hq && alive _factory_commandCenter) then {" \n - " _action = if (_lastAction == ""construction"") then {""management""} else {""construction""};" \n - "};" \n - "" \n - "_lastAction = _action;" \n - "" \n - "//todo improve once all is built"/*%FSM*/; - precondition = /*%FSM*/""/*%FSM*/; - class Links - { - /*%FSM*/ - class Construction - { - priority = 2.000000; - to="Determine"; - precondition = /*%FSM*/""/*%FSM*/; - condition=/*%FSM*/"_action == ""construction"""/*%FSM*/; - action=/*%FSM*/""/*%FSM*/; - }; - /*%FSM*/ - /*%FSM*/ - class Management - { - priority = 1.000000; - to="Determine_1"; - precondition = /*%FSM*/""/*%FSM*/; - condition=/*%FSM*/"_action == ""management"""/*%FSM*/; - action=/*%FSM*/""/*%FSM*/; - }; - /*%FSM*/ - /*%FSM*/ - class Nil - { - priority = 0.000000; - to="Skip"; - precondition = /*%FSM*/""/*%FSM*/; - condition=/*%FSM*/""/*%FSM*/; - action=/*%FSM*/""/*%FSM*/; - }; - /*%FSM*/ - }; - }; - /*%FSM*/ - /*%FSM*/ - class Set_Roles__One_Time - { - name = "Set_Roles__One_Time"; - init = /*%FSM*/"_role_assigned = true;" \n - "" \n - "_teams = (_side call CTI_CO_FNC_GetSideGroups) - [_sideCommander];" \n - "_teams_count = count _teams;" \n - "_ratio_infantry = ceil(_teams_count * .45);" \n - "_ratio_light_n_heavy = round(_teams_count * .20);" \n - "_ratio_heavy = round(_teams_count * .30);" \n - "_ratio_air = ceil(_teams_count * .05);" \n - "" \n - "_assigned = 0;" \n - "for '_j' from _teams_count-1 to 0 step -1 do {" \n - " _group = _teams select _j;" \n - " " \n - " _last_assigned = _assigned;" \n - " while { _ratio_air > 0 && _assigned == _last_assigned} do {" \n - " _group setVariable [""cti_role_evo"", ""Air""];" \n - " _ratio_air = _ratio_air - 1;" \n - " _assigned = _assigned + 1;" \n - " };" \n - " while { _ratio_heavy > 0 && _assigned == _last_assigned} do {" \n - " _group setVariable [""cti_role_evo"", ""Heavy""];" \n - " _ratio_heavy = _ratio_heavy - 1;" \n - " _assigned = _assigned + 1;" \n - " };" \n - " while { _ratio_infantry > 0 && _assigned == _last_assigned} do {" \n - " _group setVariable [""cti_role_evo"", ""Infantry""];" \n - " _ratio_infantry = _ratio_infantry - 1;" \n - " _assigned = _assigned + 1;" \n - " };" \n - " while { _ratio_light_n_heavy > 0 && _assigned == _last_assigned} do {" \n - " _group setVariable [""cti_role_evo"", ""Light""];" \n - " _ratio_light_n_heavy = _ratio_light_n_heavy - 1;" \n - " _assigned = _assigned + 1;" \n - " };" \n - " " \n - " //--- What kind?.." \n - " _category = missionNamespace getVariable format[""CTI_SQUADS_%1_CATEGORY_%2"", _side, _group getVariable ""cti_role_evo""];" \n - " " \n - " if !(isNil '_category') then { [_category, _group, _side, _teams] call CTI_FSM_UpdateCommander_SetAIRole };" \n - " " \n - " diag_log format [""DEBUG TEAM SET: %1 %2 %3"", _group, _group getVariable ""cti_role_evo"", _group getVariable ""cti_role""];" \n - "};" \n - "" \n - "//--- Assign Take Hold randomly" \n - "{" \n - " if !((_x getVariable ""cti_order"") in [CTI_ORDER_HOLDTOWNSBASES, CTI_ORDER_HOLDTOWNSBASE]) then {" \n - " if (random 100 > (40 + (random 15))) then {" \n - " _x setVariable [""cti_order"", CTI_ORDER_TAKEHOLDTOWNS, true]; " \n - " _x setVariable [""cti_order_pos"", [0,0], true]" \n - " };" \n - " };" \n - "} forEach _teams;" \n - ""/*%FSM*/; - precondition = /*%FSM*/""/*%FSM*/; - class Links - { - /*%FSM*/ - class Cycle - { - priority = 0.000000; - to="Phase_I_Commande"; - precondition = /*%FSM*/""/*%FSM*/; - condition=/*%FSM*/"time > _ncycle"/*%FSM*/; - action=/*%FSM*/""/*%FSM*/; - }; - /*%FSM*/ - }; - }; - /*%FSM*/ - /*%FSM*/ - class Update_Structure - { - name = "Update_Structure"; - init = /*%FSM*/"//--- Nothing is being built" \n - "if (count _build < 1) then {" \n - " _increment = false;" \n - " _template = missionNamespace getVariable format[""CTI_%1_Base_Template"", _side];" \n - " " \n - " //--- The structure is not built around" \n - " _position_commander = getPos leader( _sideCommander);" \n - " if !([_side, _selected_param, _position_commander, 1250] call CTI_CO_FNC_HasStructure) then {" \n - " //--- But is it in WIP?" \n - " _is_being_built = false;" \n - " {if ((_x getVariable ""cti_structure_type"") == _selected_param && _x distance _position_commander <= 1250) exitWith {_is_being_built = true}} forEach (_sideLogic getVariable ""cti_structures_wip"");" \n - " " \n - " //--- All clear!" \n - " if !(_is_being_built) then {" \n - " _var = missionNamespace getVariable format [""CTI_%1_%2"", _side, _selected_param];" \n - " " \n - " if !(isNil '_var') then {" \n - " if (_funds >= (_var select 2)) then {" \n - " _index = -1;" \n - " {if ((_x select 0) == ((_var select 0) select 0)) exitWith {_index = _forEachIndex }} forEach _template;" \n - " if (_index != -1) then {" \n - " _emplacement = [_side, _var, _template select _index] call CTI_FSM_UpdateCommander_GetStructureEmplacement;" \n - " if (_emplacement select 0 != 0 && _emplacement select 1 != 0) then {_build = [(_var select 0) select 0, _var select 2, _emplacement]};" \n - " } else {" \n - " _increment = true; //--- We can't do it, what's next?" \n - " };" \n - " } else {" \n - " _increment = true; //--- We can't do it, what's next?" \n - " };" \n - " } else {" \n - " _increment = true; //--- We can't do it, what's next?" \n - " };" \n - " } else {" \n - " _increment = true; //--- We can't do it, what's next?" \n - " };" \n - " } else {" \n - " _increment = true; //--- We can't do it, what's next?" \n - " };" \n - " " \n - " if (_increment) then {_logical_path_index = if (_logical_path_index + 1 > _logical_path_reached) then {0} else {_logical_path_index + 1}};" \n - "};" \n - "" \n - "//--- Something is going to be built" \n - "if (count _build > 0) then {" \n - " if (_funds >= (_build select 1)) then {" \n - " _position = _build select 2;" \n - " _var = missionNamespace getVariable format [""CTI_%1_%2"", _side, _build select 0];" \n - " _distance_structure = (_var select 4) select 1;" \n - " _dir_to = [leader _sideCommander, _position] call CTI_CO_FNC_GetDirTo;" \n - " _goto = [(_position select 0) - ((sin _dir_to) * _distance_structure), (_position select 1) - ((cos _dir_to) * _distance_structure), 0];" \n - "" \n - " if ((leader _sideCommander) distance _goto <= 35 && alive (leader _sideCommander)) then {" \n - " //--- Construct" \n - " (leader _sideCommander) setDir _dir_to;" \n - " _direction_structure = (_var select 4) select 0;" \n - " _direction = 0 + ((_build select 2) select 1) + _direction_structure; //todo template defines that (0)" \n - " [format [""CTI_%1_%2"", _side, _build select 0], _side, (_build select 2), _direction] call CTI_SE_FNC_BuildStructure;" \n - " " \n - " [_side, -(_build select 1)] call CTI_CO_FNC_ChangeFundsCommander;" \n - " _score = round((_build select 1) / CTI_SCORE_BUILD_VALUE_PERPOINT);" \n - " if (_score > 0) then {(leader _sideCommander) addScore _score};" \n - " " \n - " _build = [];" \n - " " \n - " //--- Next!" \n - " if (_logical_path_reached < (count _logical_path)-1) then {_logical_path_reached = _logical_path_reached + 1};" \n - " _logical_path_index = if (_logical_path_index + 1 > _logical_path_reached) then {0} else {_logical_path_index + 1};" \n - " } else {" \n - " if (time - _commander_lastmove > 35) then { (leader _sideCommander) commandMove _goto };" \n - " };" \n - " };" \n - "};"/*%FSM*/; - precondition = /*%FSM*/""/*%FSM*/; - class Links - { - /*%FSM*/ - class Cycle - { - priority = 0.000000; - to="Phase_I_Commande"; - precondition = /*%FSM*/""/*%FSM*/; - condition=/*%FSM*/"time > _ncycle"/*%FSM*/; - action=/*%FSM*/""/*%FSM*/; - }; - /*%FSM*/ - }; - }; - /*%FSM*/ - /*%FSM*/ - class Update_Defenses - { - name = "Update_Defenses"; - init = /*%FSM*/""/*%FSM*/; - precondition = /*%FSM*/""/*%FSM*/; - class Links - { - /*%FSM*/ - class Cycle - { - priority = 0.000000; - to="Phase_I_Commande"; - precondition = /*%FSM*/""/*%FSM*/; - condition=/*%FSM*/"time > _ncycle"/*%FSM*/; - action=/*%FSM*/""/*%FSM*/; - }; - /*%FSM*/ - }; - }; - /*%FSM*/ - /*%FSM*/ - class Update_Upgrades - { - name = "Update_Upgrades"; - init = /*%FSM*/"_upgrade = _selected_param select 0;" \n - "_upgrade_level = _selected_param select 1;" \n - "_position_commander = getPos leader( _sideCommander);" \n - "" \n - "_increment = false;" \n - "//--- Do we have a CC in range?" \n - "if ([_side, CTI_CONTROLCENTER, _position_commander, CTI_BASE_PURCHASE_UNITS_RANGE_CC] call CTI_CO_FNC_HasStructure) then {" \n - " //--- Do we have the upgrade yet?" \n - " if !([_side, _upgrade, _upgrade_level] call CTI_CO_FNC_HasUpgrade) then {" \n - " if ((_sideLogic getVariable ""cti_upgrade"") < 0) then {" \n - " _upgrades = (_side) call CTI_CO_FNC_GetSideUpgrades;" \n - " _upgrade_current = _upgrades select _upgrade;" \n - " " \n - " _upgrade_level = (missionNamespace getVariable Format[""CTI_%1_UPGRADES_LEVELS"", _side]) select _upgrade;" \n - " _upgrade_price = ((missionNamespace getVariable Format[""CTI_%1_UPGRADES_COSTS"", _side]) select _upgrade) select _upgrade_current;" \n - " " \n - " //--- The max upgrade hasn't been reached yet" \n - " if (_upgrade_current < _upgrade_level) then {" \n - " //--- We have the funds" \n - " if (_funds >= _upgrade_price) then {" \n - " [_side, -_upgrade_price] call CTI_CO_FNC_ChangeFundsCommander;" \n - " _sideLogic setVariable [""cti_upgrade"", _upgrade,true];" \n - " [_side, _upgrade, _upgrade_current] spawn CTI_SE_FNC_StartUpgrade;" \n - " " \n - " //--- Next!" \n - " if (_logical_path_reached < (count _logical_path)-1) then {_logical_path_reached = _logical_path_reached + 1};" \n - " _logical_path_index = if (_logical_path_index + 1 > _logical_path_reached) then {0} else {_logical_path_index + 1};" \n - " } else {" \n - " _increment = true;" \n - " };" \n - " } else {" \n - " _increment = true;" \n - " };" \n - " } else {" \n - " _increment = true;" \n - " };" \n - " } else {" \n - " _increment = true;" \n - " };" \n - "} else {" \n - " _increment = true;" \n - "};" \n - "" \n - "if (_increment) then {_logical_path_index = if (_logical_path_index + 1 > _logical_path_reached) then {0} else {_logical_path_index + 1}};"/*%FSM*/; - precondition = /*%FSM*/""/*%FSM*/; - class Links - { - /*%FSM*/ - class Cycle - { - priority = 0.000000; - to="Phase_I_Commande"; - precondition = /*%FSM*/""/*%FSM*/; - condition=/*%FSM*/"time > _ncycle"/*%FSM*/; - action=/*%FSM*/""/*%FSM*/; - }; - /*%FSM*/ - }; - }; - /*%FSM*/ - /*%FSM*/ - class Update_Teams - { - name = "Update_Teams"; - init = /*%FSM*/"_commander_lastteamupdate = time;" \n - "_modifier = switch (true) do {case (_funds >= 5000): {1.25}; case (_funds >= 10000): {1.5}; case (_funds >= 20000): {1.75}; case (_funds >= 50000): {2}; default {1}};" \n - "" \n - "_structures = (_side) call CTI_CO_FNC_GetSideStructures;" \n - "" \n - "{" \n - " _funds = (_side) call CTI_CO_FNC_GetFundsCommander;" \n - " " \n - " //--- The leader is an AI and he is independent" \n - " if (!isPlayer leader _x && (_x getVariable ""cti_independent"")) then {" \n - " _lives = count (_x call CTI_CO_FNC_GetLiveUnits);" \n - " " \n - " //--- The limit hasn't been reached yet" \n - " if (_lives < CTI_AI_TEAMS_GROUPSIZE) then {" \n - " _role = _x getVariable ""cti_role"";" \n - " if !(isNil '_role') then {" \n - " _has_purchased = false;" \n - " " \n - " //--- Determine what we're deling with" \n - " _id = switch (true) do {" \n - " case (_role in (missionNamespace getVariable format[""CTI_SQUADS_%1_KIND_INFANTRY"", _side])): {0};" \n - " case (_role in (missionNamespace getVariable format[""CTI_SQUADS_%1_KIND_LIGHT"", _side])): {1};" \n - " case (_role in (missionNamespace getVariable format[""CTI_SQUADS_%1_KIND_HEAVY"", _side])): {2};" \n - " case (_role in (missionNamespace getVariable format[""CTI_SQUADS_%1_KIND_AIR"", _side])): {3};" \n - " default {0};" \n - " };" \n - " " \n - " //--- Is the factory available?" \n - " _factory = switch (_id) do {" \n - " case 0: {[CTI_BARRACKS, leader _x, _structures] call CTI_CO_FNC_GetClosestStructure};" \n - " case 1: {[CTI_LIGHT, leader _x, _structures] call CTI_CO_FNC_GetClosestStructure};" \n - " case 2: {[CTI_HEAVY, leader _x, _structures] call CTI_CO_FNC_GetClosestStructure};" \n - " case 3: {[CTI_AIR, leader _x, _structures] call CTI_CO_FNC_GetClosestStructure};" \n - " default {objNull};" \n - " };" \n - " " \n - " //--- The factory is alive and we're lucky enough!" \n - " if (alive _factory && random 100 <= (([CTI_AI_COMMANDER_BUYTO_INFANTRY, CTI_AI_COMMANDER_BUYTO_LIGHT, CTI_AI_COMMANDER_BUYTO_HEAVY, CTI_AI_COMMANDER_BUYTO_AIR] select _id) * _modifier)) then {" \n - " _var = missionNamespace getVariable format [""CTI_SQUAD_%1_%2"", _side, _role];" \n - " _cost = _var select 1;" \n - " " \n - " //--- We have enough cash to purchase the template" \n - " if (_funds >= _cost) then {" \n - " _has_purchased = true;" \n - " [_x, _side, _var select 2, _factory] call CTI_SE_FNC_AI_PurchaseSquad;" \n - " };" \n - " };" \n - " " \n - " //--- We couldn't purchase a unit set, maybe we can transfer some money if we're lucky enough?" \n - " if (!_has_purchased && random 100 <= CTI_AI_COMMANDER_TRANSFER_FUNDS_CHANCE && _funds > 2000) then {" \n - " _amount = round(([CTI_AI_COMMANDER_FUNDS_INFANTRY, CTI_AI_COMMANDER_FUNDS_LIGHT, CTI_AI_COMMANDER_FUNDS_HEAVY, CTI_AI_COMMANDER_FUNDS_AIR] select _id) * _modifier);" \n - " " \n - " if (_funds >= _amount) then {" \n - " [_side, -_amount] call CTI_CO_FNC_ChangeFundsCommander; //--- Minus for the com" \n - " [_x, _amount] call CTI_CO_FNC_ChangeFundsTeam; //--- Plus for the group" \n - " };" \n - " };" \n - " };" \n - " };" \n - " };" \n - "} forEach ((_side call CTI_CO_FNC_GetSideGroups) - [_sideCommander]);"/*%FSM*/; - precondition = /*%FSM*/""/*%FSM*/; - class Links - { - /*%FSM*/ - class Cycle - { - priority = 0.000000; - to="Phase_I_Commande"; - precondition = /*%FSM*/""/*%FSM*/; - condition=/*%FSM*/"time > _ncycle"/*%FSM*/; - action=/*%FSM*/""/*%FSM*/; - }; - /*%FSM*/ - }; - }; - /*%FSM*/ - /*%FSM*/ - class Update_Orders - { - name = "Update_Orders"; - init = /*%FSM*/"_role_assigned_lastcheck = time;" \n - "_defensive_teams = [];" \n - "" \n - "{" \n - " if ((_x getVariable ""cti_order"") in [CTI_ORDER_HOLDTOWNSBASE, CTI_ORDER_HOLDTOWNSBASES]) then {_defensive_teams pushback _x};" \n - "} forEach ((_side call CTI_CO_FNC_GetSideGroups) - [_sideCommander]);" \n - "" \n - "if (count _defensive_teams > 0) then { //--- Update our defenders" \n - " _towns = (_sideID) call CTI_FSM_UpdateCommander_GetMostValuedTowns;" \n - " _structures = (_side) call CTI_CO_FNC_GetSideStructures;" \n - " " \n - " if (count _towns > 0) then {" \n - " _enemyside = ([west,east] - [_side]) select 0;" \n - " _enemy_hq = (_enemyside) call CTI_CO_FNC_GetSideHQ;" \n - " _focus_list = [];" \n - " if (alive _enemy_hq) then {_focus_list pushback _enemy_hq};" \n - " _focus_list = _focus_list + (_side call CTI_CO_FNC_GetSideStructures);" \n - " if (count _focus_list < 1) then {_focus_list = [_enemy_hq]};" \n - " " \n - " _towns = [_focus_list select floor(random count _focus_list), _towns] call CTI_CO_FNC_SortByDistance;" \n - " if (count _towns > 3) then { _towns resize 3 }; //--- Don't scatter the ai too far away from the frontline" \n - " };" \n - "" \n - " {" \n - " if (count _towns > 0) then { //--- We have towns to defend boys!" \n - " _x setVariable [""cti_order_pos"", _towns select floor (random count _towns), true];" \n - " } else { //--- Maybe we can defend the CC?" \n - " _factory_nearest = [CTI_CONTROLCENTER, leader _x, _structures] call CTI_CO_FNC_GetClosestStructure;" \n - " if !(isNull _factory_nearest) then { _x setVariable [""cti_order_pos"", _factory_nearest, true]};" \n - " };" \n - " } forEach _defensive_teams;" \n - "};"/*%FSM*/; - precondition = /*%FSM*/""/*%FSM*/; - class Links - { - /*%FSM*/ - class Cycle - { - priority = 0.000000; - to="Phase_I_Commande"; - precondition = /*%FSM*/""/*%FSM*/; - condition=/*%FSM*/"time > _ncycle"/*%FSM*/; - action=/*%FSM*/""/*%FSM*/; - }; - /*%FSM*/ - }; - }; - /*%FSM*/ - /*%FSM*/ - class Determine - { - name = "Determine"; - init = /*%FSM*/"_action = """";" \n - "" \n - "//--- Start with the logical path" \n - "_path_item = _logical_path select _logical_path_index;" \n - "_selected_action = _path_item select 0;" \n - "_selected_param = _path_item select 1;" \n - "_selected_condition = _path_item select 2;" \n - "" \n - "if (call _selected_condition) then {" \n - " _action = _selected_action;" \n - "} else { //--- The condition could not be reached, skip" \n - " if (_logical_path_reached < (count _logical_path)-1) then {_logical_path_reached = _logical_path_reached + 1};" \n - " _logical_path_index = if (_logical_path_index + 1 > _logical_path_reached) then {0} else {_logical_path_index + 1};" \n - "};" \n - "" \n - "//--- Salvagers are needed?" \n - "_factory_repair = [CTI_REPAIR, leader _sideCommander, _structures] call CTI_CO_FNC_GetClosestStructure;" \n - "if !(isNull _factory_repair) then {" \n - " if (_funds >= CTI_VEHICLES_SALVAGER_PRICE && !isNull _factory_repair && count(_sideLogic getVariable ""cti_salvagers"") < CTI_VEHICLES_SALVAGE_INDEPENDENT_MAX && time - _commander_lastsalvager_addin > 300) then {_action = ""hire-salvager""};" \n - "};" \n - "" \n - "//--- The commander could not build in time" \n - "if (count _build > 0) then {if (time - _commander_buildorderstart > 240) then {_build = []}};" \n - "" \n - "//--- The commander is still building something" \n - "if (count _build > 0) then {_action = ""build-structures""};" \n - "" \n - "//--- We check the workers last" \n - "if (count (_sideLogic getVariable ""cti_workers"") < 4 && _funds >= CTI_BASE_WORKERS_PRICE) then {_action = ""hire-workers""};" \n - "" \n - ""/*%FSM*/; - precondition = /*%FSM*/""/*%FSM*/; - class Links - { - /*%FSM*/ - class Structure - { - priority = 4.000000; - to="Update_Structure"; - precondition = /*%FSM*/""/*%FSM*/; - condition=/*%FSM*/"_action == ""build-structures"""/*%FSM*/; - action=/*%FSM*/""/*%FSM*/; - }; - /*%FSM*/ - /*%FSM*/ - class Defenses - { - priority = 3.000000; - to="Update_Defenses"; - precondition = /*%FSM*/""/*%FSM*/; - condition=/*%FSM*/"_action == ""build-defenses"""/*%FSM*/; - action=/*%FSM*/""/*%FSM*/; - }; - /*%FSM*/ - /*%FSM*/ - class Workers - { - priority = 2.000000; - to="Update_Workers"; - precondition = /*%FSM*/""/*%FSM*/; - condition=/*%FSM*/"_action == ""hire-workers"""/*%FSM*/; - action=/*%FSM*/""/*%FSM*/; - }; - /*%FSM*/ - /*%FSM*/ - class Salvagers - { - priority = 1.000000; - to="Update_Salvagers"; - precondition = /*%FSM*/""/*%FSM*/; - condition=/*%FSM*/"_action == ""hire-salvager"""/*%FSM*/; - action=/*%FSM*/""/*%FSM*/; - }; - /*%FSM*/ - /*%FSM*/ - class Nil - { - priority = 0.000000; - to="Skip"; - precondition = /*%FSM*/""/*%FSM*/; - condition=/*%FSM*/""/*%FSM*/; - action=/*%FSM*/""/*%FSM*/; - }; - /*%FSM*/ - /*%FSM*/ - class Upgrade - { - priority = 0.000000; - to="Update_Upgrades"; - precondition = /*%FSM*/""/*%FSM*/; - condition=/*%FSM*/"_action == ""upgrade"""/*%FSM*/; - action=/*%FSM*/""/*%FSM*/; - }; - /*%FSM*/ - }; - }; - /*%FSM*/ - /*%FSM*/ - class Determine_1 - { - name = "Determine_1"; - init = /*%FSM*/"_action = """";" \n - "if !(_role_assigned) exitWith {_action = ""roles""}; //--- Assign the roles at first" \n - "if (_role_assigned && time - _role_assigned_lastcheck > 600) then {_action = ""update-orders""};" \n - "" \n - "if (_action == """" && time - _commander_lastteamupdate > CTI_AI_COMMANDER_TEAMS_UPDATE_DELAY && _funds > 12500) then {_action = ""update-teams""};"/*%FSM*/; - precondition = /*%FSM*/""/*%FSM*/; - class Links - { - /*%FSM*/ - class Teams - { - priority = 3.000000; - to="Update_Teams"; - precondition = /*%FSM*/""/*%FSM*/; - condition=/*%FSM*/"_action == ""update-teams"""/*%FSM*/; - action=/*%FSM*/""/*%FSM*/; - }; - /*%FSM*/ - /*%FSM*/ - class Orders - { - priority = 2.000000; - to="Update_Orders"; - precondition = /*%FSM*/""/*%FSM*/; - condition=/*%FSM*/"_action == ""update-orders"""/*%FSM*/; - action=/*%FSM*/""/*%FSM*/; - }; - /*%FSM*/ - /*%FSM*/ - class Roles - { - priority = 1.000000; - to="Set_Roles__One_Time"; - precondition = /*%FSM*/""/*%FSM*/; - condition=/*%FSM*/"_action == ""roles"""/*%FSM*/; - action=/*%FSM*/""/*%FSM*/; - }; - /*%FSM*/ - /*%FSM*/ - class Nil - { - priority = 0.000000; - to="Skip"; - precondition = /*%FSM*/""/*%FSM*/; - condition=/*%FSM*/""/*%FSM*/; - action=/*%FSM*/""/*%FSM*/; - }; - /*%FSM*/ - }; - }; - /*%FSM*/ - /*%FSM*/ - class Skip - { - name = "Skip"; - init = /*%FSM*/""/*%FSM*/; - precondition = /*%FSM*/""/*%FSM*/; - class Links - { - /*%FSM*/ - class Cycle - { - priority = 0.000000; - to="Phase_I_Commande"; - precondition = /*%FSM*/""/*%FSM*/; - condition=/*%FSM*/"time > _ncycle"/*%FSM*/; - action=/*%FSM*/""/*%FSM*/; - }; - /*%FSM*/ - }; - }; - /*%FSM*/ - /*%FSM*/ - class Update_Workers - { - name = "Update_Workers"; - init = /*%FSM*/"[_side, true] spawn CTI_SE_FNC_CreateWorker;" \n - "[_side, -CTI_BASE_WORKERS_PRICE] call CTI_CO_FNC_ChangeFundsCommander;"/*%FSM*/; - precondition = /*%FSM*/""/*%FSM*/; - class Links - { - /*%FSM*/ - class Cycle - { - priority = 0.000000; - to="Phase_I_Commande"; - precondition = /*%FSM*/""/*%FSM*/; - condition=/*%FSM*/"time > _ncycle"/*%FSM*/; - action=/*%FSM*/""/*%FSM*/; - }; - /*%FSM*/ - }; - }; - /*%FSM*/ - /*%FSM*/ - class Phase_II_Respawn - { - name = "Phase_II_Respawn"; - init = /*%FSM*/""/*%FSM*/; - precondition = /*%FSM*/""/*%FSM*/; - class Links - { - /*%FSM*/ - class Ready - { - priority = 1.000000; - to="Phase_III_Action"; - precondition = /*%FSM*/""/*%FSM*/; - condition=/*%FSM*/"time > (_sideCommander getVariable ""cti_nextrespawn"")"/*%FSM*/; - action=/*%FSM*/""/*%FSM*/; - }; - /*%FSM*/ - /*%FSM*/ - class Respawning - { - priority = 0.000000; - to="Skip_1"; - precondition = /*%FSM*/""/*%FSM*/; - condition=/*%FSM*/""/*%FSM*/; - action=/*%FSM*/""/*%FSM*/; - }; - /*%FSM*/ - }; - }; - /*%FSM*/ - /*%FSM*/ - class Skip_1 - { - name = "Skip_1"; - init = /*%FSM*/""/*%FSM*/; - precondition = /*%FSM*/""/*%FSM*/; - class Links - { - /*%FSM*/ - class Cycle - { - priority = 0.000000; - to="Phase_I_Commande"; - precondition = /*%FSM*/""/*%FSM*/; - condition=/*%FSM*/"time > _ncycle"/*%FSM*/; - action=/*%FSM*/""/*%FSM*/; - }; - /*%FSM*/ - }; - }; - /*%FSM*/ - /*%FSM*/ - class Update_Salvagers - { - name = "Update_Salvagers"; - init = /*%FSM*/"if ((leader _sideCommander) distance _factory_repair < 40) then {" \n - " _commander_lastsalvager_addin = time;" \n - " [_side, _sideCommander, _side, format[""CTI_Salvager_Independent_%1"", _side], _factory_repair, [true, true, true, true, true], (time + random 10000 - random 500 + diag_frameno)] call CTI_SE_FNC_OnClientPurchase;" \n - "} else {" \n - " if (time - _commander_lastmove > 25) then { (leader _sideCommander) commandMove ([getPos _factory_repair, 2, 15] call CTI_CO_FNC_GetRandomPosition) };" \n - "};"/*%FSM*/; - precondition = /*%FSM*/""/*%FSM*/; - class Links - { - /*%FSM*/ - class Cycle - { - priority = 0.000000; - to="Phase_I_Commande"; - precondition = /*%FSM*/""/*%FSM*/; - condition=/*%FSM*/"time > _ncycle"/*%FSM*/; - action=/*%FSM*/""/*%FSM*/; - }; - /*%FSM*/ - }; - }; - /*%FSM*/ - }; - initState="Start_FSM"; - finalStates[] = - { - "End_FSM" - }; }; /*%FSM*/ \ No newline at end of file diff --git a/Server/FSM/update_victory.fsm b/Server/FSM/update_victory.fsm index 5632564a1..e75ba0442 100644 --- a/Server/FSM/update_victory.fsm +++ b/Server/FSM/update_victory.fsm @@ -1,9 +1,9 @@ /*%FSM*/ /*%FSM*/ /* -item0[] = {"Start_FSM",0,4346,-250.000000,-300.000000,-150.000000,-250.000000,0.000000,"Start FSM"}; +item0[] = {"Start_FSM",0,250,-250.000000,-300.000000,-150.000000,-250.000000,0.000000,"Start FSM"}; item1[] = {"Cycle",4,218,-100.000000,-300.000000,0.000000,-250.000000,1.000000,"Cycle"}; -item2[] = {"Update_Victory",2,250,-100.000000,-200.000000,0.000000,-150.000000,0.000000,"Update" \n "Victory"}; +item2[] = {"Update_Victory",2,4346,-100.000000,-200.000000,0.000000,-150.000000,0.000000,"Update" \n "Victory"}; item3[] = {"End_FSM",1,250,-250.000000,-100.000000,-150.000000,-50.000000,0.000000,"End FSM"}; item4[] = {"Gameover",4,218,-250.000000,-200.000000,-150.000000,-150.000000,0.000000,"Gameover"}; item5[] = {"Sleep",2,250,-400.000000,-200.000000,-300.000000,-150.000000,0.000000,"Sleep"}; @@ -15,8 +15,8 @@ link3[] = {2,4}; link4[] = {4,5}; link5[] = {5,6}; link6[] = {6,3}; -globals[] = {0.000000,0,0,0,0,640,480,1,164,6316128,1,-620.422607,163.824570,138.236649,-571.857727,973,885,1}; -window[] = {2,-1,-1,-1,-1,856,75,1330,75,3,991}; +globals[] = {0.000000,0,0,0,0,640,480,1,164,6316128,1,-626.312195,169.713379,529.355530,-580.065979,635,884,1}; +window[] = {2,-1,-1,-1,-1,833,52,1307,52,3,653}; *//*%FSM*/ class FSM { @@ -70,6 +70,9 @@ class FSM "_max_time = missionNamespace getVariable ""CTI_MAX_MISSION_TIME"";" \n "_max_time=_max_time*60*60; // cycle for loadgame - time limit [H]Tom" \n "" \n + "" \n + "_end=false;" \n + "" \n "{" \n " _side = _x;" \n " _hq = (_x) call CTI_CO_FNC_GetSideHQ;" \n @@ -79,32 +82,59 @@ class FSM " {_townvalue=_townvalue+ (_x getVariable ""cti_town_value""); } ForEach ((_x) call CTI_CO_FNC_GetFriendlyTowns);" \n " _factories = 0;" \n " {_factories = _factories + count([_x, _structures] call CTI_CO_FNC_GetSideStructuresByType)} forEach (missionNamespace getVariable format[""CTI_%1_Factories"", _side]);" \n - " if (( ( time > _max_time && _max_time != 0) || !(alive _hq) && _victory_hq == 1 || (!(alive _hq) && _factories == 0)) && !CTI_GameOver) exitWith {" \n + " if (( ( time > _max_time && _max_time != 0) || !(alive _hq) && _victory_hq == 1 || (!(alive _hq) && _factories == 0)) && !CTI_GameOver) exitWith { " \n + " diag_log[[""CTI_DataPacket"", ""GameOver""], " \n + " [""Version"", 3], //version of DiscordBot logReader" \n + " [""Map"", worldName]," \n + " [""Side"", _x]," \n + " [""Lost"", true]," \n + " [""HQ_Alive"", (alive _hq)]," \n + " [""Towns_Owned"", _towns]," \n + " [""Towns_Total"", _total]," \n + " [""Factories"", _factories]," \n + " [""Town_Value"", _townvalue]" \n + " ]; " \n " [""CLIENT"", ""Client_OnMissionEnding"", [_x, ""loose""]] call CTI_CO_FNC_NetSend;" \n - "" \n - " profileNamespace setVariable [""CTI_SAVE_ENABLED"",false];" \n - " saveProfileNamespace;" \n - "" \n - " CTI_GameOver = true;" \n + " _end=true;" \n " };" \n " if (_towns == _total && !CTI_GameOver) exitWith {" \n + " diag_log[[""CTI_DataPacket"", ""GameOver""], " \n + " [""Version"", 3], //version of DiscordBot logReader" \n + " [""Map"", worldName]," \n + " [""Side"", _x]," \n + " [""Lost"", false]," \n + " [""HQ_Alive"", (alive _hq)]," \n + " [""Towns_Owned"", _towns]," \n + " [""Towns_Total"", _total]," \n + " [""Factories"", _factories]," \n + " [""Town_Value"", _townvalue]" \n + " ]; " \n " [""CLIENT"", ""Client_OnMissionEnding"", [_x, ""win""]] call CTI_CO_FNC_NetSend;" \n - "" \n - " profileNamespace setVariable [""CTI_SAVE_ENABLED"",false];" \n - " saveProfileNamespace;" \n - "" \n - " CTI_GameOver = true;" \n + " _end=true;" \n " };" \n " if (_townvalue > (_total_value*0.75) && !CTI_GameOver) exitWith {" \n + " diag_log[[""CTI_DataPacket"", ""GameOver""], " \n + " [""Version"", 3], //version of DiscordBot logReader" \n + " [""Map"", worldName]," \n + " [""Side"", _x]," \n + " [""Lost"", false]," \n + " [""HQ_Alive"", (alive _hq)]," \n + " [""Towns_Owned"", _towns]," \n + " [""Towns_Total"", _total]," \n + " [""Factories"", _factories]," \n + " [""Town_Value"", _townvalue]" \n + " ]; " \n " [""CLIENT"", ""Client_OnMissionEnding"", [_x, ""win""]] call CTI_CO_FNC_NetSend;" \n - " " \n - " profileNamespace setVariable [""CTI_SAVE_ENABLED"",false];" \n - " saveProfileNamespace;" \n - "" \n - " CTI_GameOver = true;" \n + " _end=true;" \n " };" \n "} forEach [west, east];" \n - ""/*%FSM
*/; + "" \n + "if (_end) then {" \n + "" \n + " CTI_GameOver = true;" \n + " profileNamespace setVariable [""CTI_SAVE_ENABLED"",false];" \n + " saveProfileNamespace;" \n + "};"/*%FSM*/; precondition = /*%FSM*/""/*%FSM*/; class Links { @@ -154,7 +184,7 @@ class FSM { name = "Sleep"; itemno = 5; - init = /*%FSM*/"_endtime=time+10;" \n + init = /*%FSM*/"_endtime=time+5;" \n ""/*%FSM*/; precondition = /*%FSM*/""/*%FSM*/; class Links diff --git a/Server/FSM/weather_fast.fsm b/Server/FSM/weather_fast.fsm deleted file mode 100644 index 530b58e29..000000000 --- a/Server/FSM/weather_fast.fsm +++ /dev/null @@ -1,110 +0,0 @@ -/*%FSM*/ -/*%FSM*/ -/* -item0[] = {"Init",0,250,150.000000,-475.000000,250.000000,-425.000000,0.000000,"Init"}; -item1[] = {"Loop",4,218,150.000000,-375.000000,250.000000,-325.000000,0.000000,"Loop"}; -item2[] = {"End",1,250,150.000000,-75.000000,250.000000,-25.000000,0.000000,"End"}; -item3[] = {"Time",2,4346,150.000000,-275.000000,250.000000,-225.000000,0.000000,"Time"}; -item4[] = {"Gameover",4,218,150.000000,-175.000000,250.000000,-125.000000,0.000000,"Gameover"}; -link0[] = {0,1}; -link1[] = {1,3}; -link2[] = {3,1}; -link3[] = {3,4}; -link4[] = {4,2}; -globals[] = {25.000000,1,0,0,0,640,480,1,38,6316128,1,-366.140930,481.526276,9.508422,-578.645630,655,489,1}; -window[] = {0,-1,-1,-1,-1,884,250,1510,250,1,673}; -*//*%FSM*/ -class FSM -{ - fsmName = "weather_fast.fsm"; - class States - { - /*%FSM*/ - class Init - { - name = "Init"; - init = /*%FSM*/"/*" \n - " Fast Time calculation Formula:" \n - " For (Real Life Hour) = (24 Hours Ingame)." \n - " > ((((86400/((Real Life Hour)*60*60))*86400)/24/60)/60) * (skipTime Delay) = Needed skipped time." \n - " > ((((86400/((1)*60*60))*86400)/24/60)/60) * (2) = 48 >> To have 1H = 24H we need to skipTime 48 seconds each 3 seconds." \n - "*/" \n - "" \n - "_ncycle = 0;" \n - "_last_date_broadcast = -10000;" \n - "" \n - "_ft = (missionNamespace getVariable ""CTI_WEATHER_FAST"")/3600;"/*%FSM*/; - precondition = /*%FSM*/""/*%FSM*/; - class Links - { - /*%FSM*/ - class Loop - { - priority = 0.000000; - to="Time"; - precondition = /*%FSM*/""/*%FSM*/; - condition=/*%FSM*/"time > _ncycle && !CTI_GameOver"/*%FSM*/; - action=/*%FSM*/""/*%FSM*/; - }; - /*%FSM*/ - }; - }; - /*%FSM*/ - /*%FSM*/ - class End - { - name = "End"; - init = /*%FSM*/""/*%FSM*/; - precondition = /*%FSM*/""/*%FSM*/; - class Links - { - }; - }; - /*%FSM*/ - /*%FSM*/ - class Time - { - name = "Time"; - init = /*%FSM*/"skipTime _ft;" \n - "" \n - "if (time - _last_date_broadcast > 60) then {" \n - " _last_date_broadcast = time;" \n - " CTI_SERVERDATE = date;" \n - " publicVariable ""CTI_SERVERDATE"";" \n - "};" \n - "" \n - "_ncycle = time + 2;"/*%FSM*/; - precondition = /*%FSM*/""/*%FSM*/; - class Links - { - /*%FSM*/ - class Gameover - { - priority = 0.000000; - to="End"; - precondition = /*%FSM*/""/*%FSM*/; - condition=/*%FSM*/"CTI_GameOver"/*%FSM*/; - action=/*%FSM*/""/*%FSM*/; - }; - /*%FSM*/ - /*%FSM*/ - class Loop - { - priority = 0.000000; - to="Time"; - precondition = /*%FSM*/""/*%FSM*/; - condition=/*%FSM*/"time > _ncycle && !CTI_GameOver"/*%FSM*/; - action=/*%FSM*/""/*%FSM*/; - }; - /*%FSM*/ - }; - }; - /*%FSM*/ - }; - initState="Init"; - finalStates[] = - { - "End", - }; -}; -/*%FSM*/ \ No newline at end of file diff --git a/Server/Functions/FSM/Functions_FSM_UpdateCommander.sqf b/Server/Functions/FSM/Functions_FSM_UpdateCommander.sqf index 4463eec45..6becb5c58 100644 --- a/Server/Functions/FSM/Functions_FSM_UpdateCommander.sqf +++ b/Server/Functions/FSM/Functions_FSM_UpdateCommander.sqf @@ -173,6 +173,11 @@ CTI_FSM_UpdateCommander_GetStructureEmplacement = { _i = _i + 1; }; + // set first base area on first building position if need + if ((count _position) > 0 && (count (_sideLogic getVariable "cti_structures_areas")) == 0) then { + _sideLogic setVariable ["cti_structures_areas", [[_position select 0, _position select 1]], true]; + }; + _position set [2, 0]; _position }; \ No newline at end of file diff --git a/Server/Functions/Server_BuildDefense.sqf b/Server/Functions/Server_BuildDefense.sqf index 3ea2fb7e2..17a6a8b98 100644 --- a/Server/Functions/Server_BuildDefense.sqf +++ b/Server/Functions/Server_BuildDefense.sqf @@ -127,6 +127,10 @@ if (_defense isKindOf "B_supplyCrate_F") then { clearWeaponCargoGlobal _defense; }; +if (_defense isKindOf "O_G_HMG_02_high_F" || _defense isKindOf "B_G_HMG_02_high_F" || _defense isKindOf "O_G_HMG_02_F" || _defense isKindOf "B_G_HMG_02_F") then { + [_defense, nil, ["Hide_Rail",0,"Hide_Shield",0]] call BIS_fnc_initVehicle; +}; + if (_defense isKindOf "B_AAA_System_01_F" || _defense isKindOf "B_SAM_System_01_F" || _defense isKindOf "B_SAM_System_02_F") then { _def_pos = getPos _defense; _defense setPos [0,0,9000]; @@ -160,6 +164,9 @@ if (missionNamespace getVariable "CTI_SM_RADAR" == 1) then { }; -if !( isNil "ADMIN_ZEUS") then { ADMIN_ZEUS addCuratorEditableObjects [[_defense],true];}; +if !( isNil "ADMIN_ZEUS") then { + ADMIN_ZEUS addCuratorAddons (configSourceAddonList (configFile >> "CfgVehicles" >> typeof _defense)); + ADMIN_ZEUS addCuratorEditableObjects [[_defense],true]; +}; _defense diff --git a/Server/Functions/Server_BuildStructure.sqf b/Server/Functions/Server_BuildStructure.sqf index 4ac6ea900..6ceb83b05 100644 --- a/Server/Functions/Server_BuildStructure.sqf +++ b/Server/Functions/Server_BuildStructure.sqf @@ -50,7 +50,7 @@ _structure setVariable ["cti_completion", 10,true]; _structure setVariable ["cti_completion_ratio", CTI_BASE_CONSTRUCTION_RATIO_INIT,true]; // _structure setVariable ["cti_structures_iteration", round(CTI_BASE_WORKERS_BUILD_COEFFICIENT / ((_var select 3)/100))]; _structure setVariable ["cti_structures_iteration", (_var select 3)/100,true]; -_structure setVariable ["cti_structure_type", ((_var select 0) select 0)]; +_structure setVariable ["cti_structure_type", ((_var select 0) select 0),true]; _logic = (_side) call CTI_CO_FNC_GetSideLogic; _logic setVariable ["cti_structures_wip", (_logic getVariable "cti_structures_wip") + [_structure] - [objNull],true]; @@ -63,6 +63,9 @@ if !(isNull _origin) then { [["CLIENT", _origin], "Client_ReceiveStructureBase", _structure] call CTI_CO_FNC_NetSend; }; -if !( isNil "ADMIN_ZEUS") then { ADMIN_ZEUS addCuratorEditableObjects [[_structure],true];}; +if !( isNil "ADMIN_ZEUS") then { + ADMIN_ZEUS addCuratorAddons (configSourceAddonList (configFile >> "CfgVehicles" >> typeof _structure)); + ADMIN_ZEUS addCuratorEditableObjects [[_structure],true]; +}; _structure diff --git a/Server/Functions/Server_CreateWorker.sqf b/Server/Functions/Server_CreateWorker.sqf index 9c42557db..bdf8fa3d0 100644 --- a/Server/Functions/Server_CreateWorker.sqf +++ b/Server/Functions/Server_CreateWorker.sqf @@ -63,6 +63,6 @@ removeAllWeapons _worker; _worker disableAI "TARGET"; _worker disableAI "AUTOTARGET"; -if !( isNil "ADMIN_ZEUS") then { ADMIN_ZEUS addCuratorEditableObjects [[_worker],true];}; +if !( isNil "ADMIN_ZEUS") then {ADMIN_ZEUS addCuratorAddons (configSourceAddonList (configFile >> "CfgVehicles" >> typeof _worker)); ADMIN_ZEUS addCuratorEditableObjects [[_worker],true];}; [_side, _worker] execFSM "Server\FSM\update_worker.fsm"; \ No newline at end of file diff --git a/Server/Functions/Server_HandleStaticDefenses.sqf b/Server/Functions/Server_HandleStaticDefenses.sqf index 2209b3aaf..965874743 100644 --- a/Server/Functions/Server_HandleStaticDefenses.sqf +++ b/Server/Functions/Server_HandleStaticDefenses.sqf @@ -46,7 +46,7 @@ while {! CTI_GAMEOVER} do { { if ((_x getVariable ["cti_aman_enabled", false])|| (typeof _x )in ["B_AAA_System_01_F","B_SAM_System_01_F","B_SAM_System_02_F","B_Radar_System_01_F","B_SAM_System_03_F","O_Radar_System_02_F","O_SAM_System_04_F"]) then { _defense_team = _logic getVariable "cti_defensive_team"; - if (((_x emptyPositions "gunner" > 0)|| (gunner _x ) != (_x getvariable ["CTI_assigned_gunner",objnull]) || ((isnull (_x getvariable ["CTI_assigned_gunner",objnull])) && ! isnull (gunner _x))) && alive _x) then { + if (((_x emptyPositions "gunner" > 0)|| (gunner _x ) != (_x getvariable ["CTI_assigned_gunner",objnull]) || ((isnull (_x getvariable ["CTI_assigned_gunner",objnull])) && ! isnull (gunner _x))) && alive _x && isNull attachedTo _x) then { _nearest_b = [CTI_BARRACKS, _x, (_side) call CTI_CO_FNC_GetSideStructures, CTI_BASE_DEFENSES_AUTO_REARM_RANGE] call CTI_CO_FNC_GetClosestStructure; if (!(isnull _nearest_b) && alive _nearest_b && (getDammage _x) < 0.4 ) then { if (isnull (_x getvariable ["CTI_assigned_gunner",objnull]) && count(_defense_team call CTI_CO_FNC_GetLiveUnits) < CTI_BASE_DEFENSES_AUTO_LIMIT) then { diff --git a/Server/Functions/Server_HandleStructureConstruction.sqf b/Server/Functions/Server_HandleStructureConstruction.sqf index c765f519d..0024a6dff 100644 --- a/Server/Functions/Server_HandleStructureConstruction.sqf +++ b/Server/Functions/Server_HandleStructureConstruction.sqf @@ -78,7 +78,7 @@ waitUntil { _structure getVariable ["cti_completion",-1] >= 100 || time >_timeou _logic = (_side) call CTI_CO_FNC_GetSideLogic; _logic setVariable ["cti_structures_wip", (_logic getVariable "cti_structures_wip") - [_structure, objNull],true]; -_completion = _structure getVariable "cti_completion"; +_completion = _structure getVariable ["cti_completion",10]; _completion_ratio = _structure getVariable "cti_completion_ratio"; deleteVehicle _structure; @@ -90,7 +90,7 @@ if (_completion >= 100) then { _structure setPos _position; _structure setVectorUp [0,0,1]; _structure setVariable ["cti_save", _variable,false]; - _structure setVariable ["cti_structure_type", ((_var select 0) select 0)]; + _structure setVariable ["cti_structure_type", ((_var select 0) select 0),true]; //--- Do we use our alternative damage system to prevent some bisteries from happening? _alternative_damages = false; @@ -98,7 +98,7 @@ if (_completion >= 100) then { {if ("DMG_Alternative" in _x) then {_alternative_damages = true}; if ("DMG_Reduce" in _x) then {_reduce_damages = _x select 1}; if ("Connected" in _x) then {_structure setVariable ["AN_iNet",_side_id,true]; _structure setVariable ["AN_Parrents",[_structure],false];} } forEach (_var select 5); if (_alternative_damages) then { _structure setVariable ["cti_altdmg", 0,true]; - _structure addEventHandler ["handledamage", format ["[_this select 0, _this select 2, _this select 3, '%1', %2, %3, %4, %5, %6] call CTI_SE_FNC_OnBuildingHandleVirtualDamage", _variable, (_side) call CTI_CO_FNC_GetSideID, _position, _direction, _completion_ratio, _reduce_damages]]; + _structure addEventHandler ["handledamage", format ["[_this select 0, _this select 2, _this select 3, '%1', %2, %3, %4, %5, %6, _this select 7] call CTI_SE_FNC_OnBuildingHandleVirtualDamage", _variable, (_side) call CTI_CO_FNC_GetSideID, _position, _direction, _completion_ratio, _reduce_damages]]; } else { _structure addEventHandler ["killed", format ["[_this select 0, _this select 1, '%1', %2, %3, %4, %5] spawn CTI_SE_FNC_OnBuildingDestroyed", _variable, (_side) call CTI_CO_FNC_GetSideID, _position, _direction, _completion_ratio]]; if (_reduce_damages > 0 || CTI_BASE_NOOBPROTECTION == 1) then { @@ -140,4 +140,7 @@ if (_completion >= 100) then { //todo: add message bout structure expiration }; -if !( isNil "ADMIN_ZEUS") then { ADMIN_ZEUS addCuratorEditableObjects [[_structure],true];}; +if !( isNil "ADMIN_ZEUS") then { + ADMIN_ZEUS addCuratorAddons (configSourceAddonList (configFile >> "CfgVehicles" >> typeof _structure)); + ADMIN_ZEUS addCuratorEditableObjects [[_structure],true]; +}; diff --git a/Server/Functions/Server_InitializeGroup.sqf b/Server/Functions/Server_InitializeGroup.sqf index a5f8c0821..fa7b8d671 100644 --- a/Server/Functions/Server_InitializeGroup.sqf +++ b/Server/Functions/Server_InitializeGroup.sqf @@ -28,7 +28,9 @@ _team = _this select 0; _side = _this select 1; _players=_this select 2; _side_logic=_side call CTI_CO_FNC_GetSideLogic; - +if(isMultiplayer && isPlayer (_group getVariable ["bis_dg_cre", objNull])) then { + _team setVariable ["cti_client_group", true]; +}; if (isNil {_team getVariable "cti_role_evo"}) then {_team setVariable ["cti_role_evo", "Infantry"]}; //--- Evolutive role if (isNil {_team getVariable "cti_order"}) then {_team setVariable ["cti_order", CTI_ORDER_TAKETOWNS, true]}; diff --git a/Server/Functions/Server_OnBuildingDestroyed.sqf b/Server/Functions/Server_OnBuildingDestroyed.sqf index 7b6c98fff..debfded2c 100644 --- a/Server/Functions/Server_OnBuildingDestroyed.sqf +++ b/Server/Functions/Server_OnBuildingDestroyed.sqf @@ -76,7 +76,7 @@ if !(_sell) then { _structure setVariable ["cti_completion_ratio", _completion_ratio * CTI_BASE_CONSTRUCTION_RATIO_ON_DEATH,true]; // _structure setVariable ["cti_structures_iteration", round(CTI_BASE_WORKERS_BUILD_COEFFICIENT / ((_var select 3)/100))]; _structure setVariable ["cti_structures_iteration", (_var select 3)/100,true]; - _structure setVariable ["cti_structure_type", ((_var select 0) select 0)]; + _structure setVariable ["cti_structure_type", ((_var select 0) select 0),true]; [_side, _structure, _variable, _position, _direction] spawn CTI_SE_FNC_HandleStructureConstruction; diff --git a/Server/Functions/Server_OnBuildingHandleDamage.sqf b/Server/Functions/Server_OnBuildingHandleDamage.sqf index 372afe3d0..b2f17812e 100644 --- a/Server/Functions/Server_OnBuildingHandleDamage.sqf +++ b/Server/Functions/Server_OnBuildingHandleDamage.sqf @@ -46,7 +46,7 @@ _side = (_sideID) call CTI_CO_FNC_GetSideFromID; _ratio=if (_damaged getvariable ["CTI_protected",false]&& CTI_SM_BASEP_M > 0) then { CTI_SM_BASEP_M} else {1}; _currentdmg = getDammage _damaged; _damage = _currentdmg + ((_damage - _currentdmg) / _ratio); -if (CTI_BASE_NOOBPROTECTION == 1 && side _shooter in [_side, sideEnemy]) exitWith {0}; +if (CTI_BASE_NOOBPROTECTION == 1 && side _shooter in [_side, sideEnemy,civilian]) exitWith {0}; if (_reduce_damages > 0) then {_currentdmg = getDammage _damaged; _damage = _currentdmg + ((_damage - _currentdmg) / _reduce_damages)}; if (_damaged getvariable ["CTI_protected",false]&& CTI_SM_BASEP_M > 0) then { CTI_SM_BASEP_M} else {1}; _logic = (_side) call CTI_CO_FNC_GetSideLogic; diff --git a/Server/Functions/Server_OnBuildingHandleVirtualDamage.sqf b/Server/Functions/Server_OnBuildingHandleVirtualDamage.sqf index 236f79b88..55b9ab62a 100644 --- a/Server/Functions/Server_OnBuildingHandleVirtualDamage.sqf +++ b/Server/Functions/Server_OnBuildingHandleVirtualDamage.sqf @@ -7,7 +7,7 @@ The damages are virtual so we return 0 all the time. Author: Benny Creation Date: 20-09-2013 - Revision Date: 20-09-2013 + Revision Date: 10-07-2021 - [H] Tom # PARAMETERS # 0 [Object]: The hit structure @@ -19,12 +19,13 @@ 6 [Number]: The structure's direction 7 [Number]: The structure completion speed ratio 8 [Number]: Damage reduction + 9 [String]: The hitpoint # RETURNED VALUE # [Number]: The negated afflicted damage # SYNTAX # - [STRUCTURE, DAMAGES, SHOOTER, STRUCTURE VARIABLE, SIDE ID, POSITION, DIRECTION, COMPLETION RATIO, POSITION] call CTI_SE_FNC_OnBuildingHandleDamage + [STRUCTURE, DAMAGES, SHOOTER, STRUCTURE VARIABLE, SIDE ID, POSITION, DIRECTION, COMPLETION RATIO, REDUCTION, HITPOINT] call CTI_SE_FNC_OnBuildingHandleVirtualDamage # DEPENDENCIES # Common Function: CTI_CO_FNC_GetSideFromID @@ -33,10 +34,10 @@ Server Function: CTI_SE_FNC_OnBuildingDestroyed # EXAMPLE # - _structure addEventHandler ["handledamage", format ["[_this select 0, _this select 2, _this select 3, '%1', %2, %3, %4, %5, %6] call CTI_SE_FNC_OnBuildingHandleVirtualDamage", _variable, (_side) call CTI_CO_FNC_GetSideID, _position, _direction, _completion_ratio, _reduce_damages]]; + _structure addEventHandler ["handledamage", format ["[_this select 0, _this select 2, _this select 3, '%1', %2, %3, %4, %5, %6, _this select 7] call CTI_SE_FNC_OnBuildingHandleVirtualDamage", _variable, (_side) call CTI_CO_FNC_GetSideID, _position, _direction, _completion_ratio, _reduce_damages]]; */ -private ["_completion_ratio", "_damage", "_damaged", "_direction", "_logic", "_position", "_reduce_damages", "_shooter", "_side", "_sideID", "_variable", "_virtual_damages"]; +private ["_completion_ratio", "_damage", "_damaged", "_direction", "_logic", "_position", "_reduce_damages", "_shooter", "_side", "_sideID", "_variable", "_virtual_damages", "_hitpoint"]; _damaged = _this select 0; _damage = _this select 1; @@ -47,6 +48,7 @@ _position = _this select 5; _direction = _this select 6; _completion_ratio = _this select 7; _reduce_damages = _this select 8; +_hitpoint = _this select 9; _side = (_sideID) call CTI_CO_FNC_GetSideFromID; _logic = (_side) call CTI_CO_FNC_GetSideLogic; @@ -57,6 +59,7 @@ if (CTI_BASE_NOOBPROTECTION == 1 && side _shooter in [_side, sideEnemy]) exitWit _ratio=if (_damaged getvariable ["CTI_protected",false]&& CTI_SM_BASEP_M > 0) then { CTI_SM_BASEP_M} else {1}; _damage= _damage / _ratio; if (_reduce_damages > 0) then {_damage = _damage / _reduce_damages}; +if ("glass" in _hitpoint) then {_damage = 0;}; _virtual_damages = _damaged getVariable "cti_altdmg"; if (isNil '_virtual_damages') then {_virtual_damages = 0}; diff --git a/Server/Functions/Server_OnHQDestroyed.sqf b/Server/Functions/Server_OnHQDestroyed.sqf index a238009af..d70d86789 100644 --- a/Server/Functions/Server_OnHQDestroyed.sqf +++ b/Server/Functions/Server_OnHQDestroyed.sqf @@ -44,7 +44,7 @@ if (((_this select 0) isKindOf "Pod_Heli_Transport_04_base_F") ||((_this select _side = _target getVariable "cti_occupant"; deletevehicle _target; waitUntil {isNull _target}; - _hq = [missionNamespace getVariable Format["CTI_%1_HQ", _side], _initial_pos, _initial_dir, _side, true, true,false, "CAN_COLLIDE"] call CTI_CO_FNC_CreateVehicle; + _hq = [missionNamespace getVariable Format["CTI_%1_HQ", _side], _initial_pos, _initial_dir, _side, true, true,false, "CAN_COLLIDE", objNull, false] call CTI_CO_FNC_CreateVehicle; _hq setVariable ["cti_gc_noremove", true,true]; //--- HQ wreck cannot be removed nor salvaged _hq setVariable ["cti_ai_prohib", true,true]; //--- HQ may not be used by AI as a commandable vehicle //_hq addEventHandler ["getIn", {_this spawn CTI_CO_FNC_OnUnitGetOut}]; diff --git a/Server/Functions/Server_OnPlayerConnected.sqf b/Server/Functions/Server_OnPlayerConnected.sqf index 265323f77..243c9c580 100644 --- a/Server/Functions/Server_OnPlayerConnected.sqf +++ b/Server/Functions/Server_OnPlayerConnected.sqf @@ -47,16 +47,12 @@ while {isNull _unit && !((side _unit) in [east,west]) && _try <10} do { { _unit = _x; }; - } forEach allUnits + allDead ; - - + } forEach allPlayers; // allUnits + allDead ["INFORMATION", "FILE: Server\Functions\Server_OnPlayerConnected.sqf", format["Unit for [%1] found : [%2] ",_uid,_unit]] call CTI_CO_FNC_Log; _try=_try+1; - - //if (CTI_Log_Level >= CTI_Log_Information) then {["INFORMATION", "FILE: Server\Functions\Server_OnPlayerConnected.sqf", format["Unit for [%1] found : [%2] ",_uid,_unit]] call CTI_CO_FNC_Log}; }; - +if (_try >=10) then {["ERROR", "FILE: Server\Functions\Server_OnPlayerConnected.sqf", format["Failed to locate player: uid: '%1' name: '%2' id: '%3' unit: '%4' side: '%5'", _uid, _name, _id, _unit, side _unit]] call CTI_CO_FNC_Log;}; if (_try >=10) exitWith {false}; diff --git a/Server/Functions/Server_OnTownCaptured.sqf b/Server/Functions/Server_OnTownCaptured.sqf index a24fb715a..ce6ff6c97 100644 --- a/Server/Functions/Server_OnTownCaptured.sqf +++ b/Server/Functions/Server_OnTownCaptured.sqf @@ -47,7 +47,7 @@ _town setVariable ["cti_town_lastSideID", _currentSideID, true]; _town setVariable ["CTI_Net", _newSideID, true]; -_town setFlagTexture ( _newSide call CTI_CO_FNC_GetSideFlag); +(_town getVariable ["cti_town_flag",objnull]) setFlagTexture ( _newSide call CTI_CO_FNC_GetSideFlag); ["CLIENT", "Client_OnTownCaptured", [_town, _newSideID, _currentSideID]] call CTI_CO_FNC_NetSend; @@ -78,6 +78,7 @@ if (count _award_teams > 0) then { _mult=if ((missionNamespace getVariable "CTI_GROUP_AWARD_MULT") == 1) then {{isplayer _x}count (units _x)} else {1}; {if (isplayer _x )then {[["CLIENT", _x], "Client_OnMessageReceived", ["town_award",[( _value*_mult), (_town getVariable "cti_town_name")]],true] call CTI_CO_FNC_NetSend};true} count (units _x); [_x, _newSide,( _value*_mult)] call CTI_CO_FNC_ChangeFunds; + true } count _award_teams; }; diff --git a/Server/Functions/Server_RepairHQ.sqf b/Server/Functions/Server_RepairHQ.sqf index e2c920c71..4df7e2a59 100644 --- a/Server/Functions/Server_RepairHQ.sqf +++ b/Server/Functions/Server_RepairHQ.sqf @@ -46,6 +46,8 @@ _direction = getDir _hq_wreck; //_position =[_position, 50] call CTI_CO_FNC_GetEmptyPosition; _ep = _position findEmptyPosition [0,100,"O_T_VTOL_02_vehicle_dynamicLoadout_F"]; if (count _ep == 0) then {_ep = _position findEmptyPosition [0,250,"O_T_VTOL_02_vehicle_dynamicLoadout_F"];}; +if (count _ep == 0 && surfaceIsWater _position) then {_ep = [_position select 0, _position select 1, 0];}; // for repair HQ in water +if (count _ep == 0) then {_ep = _position;}; _position = _ep; //_position = _position findEmptyPosition [0,50,typeOf ((_side) call CTI_CO_FNC_GetSideHQ)]; @@ -54,7 +56,7 @@ _position = _ep; if (alive _hq_wreck) exitWith {}; deleteVehicle _hq_wreck; -_hq = [missionNamespace getVariable Format["CTI_%1_HQ", _side], _position, _direction, _side, true, false] call CTI_CO_FNC_CreateVehicle; +_hq = [missionNamespace getVariable Format["CTI_%1_HQ", _side], _position, _direction, _side, true, false, false, "FORM", objNull, false] call CTI_CO_FNC_CreateVehicle; _hq setVariable ["cti_gc_noremove", true]; //--- HQ wreck cannot be removed nor salvaged _hq setVariable ["cti_ai_prohib", true]; //--- HQ may not be used by AI as a commandable vehicle _hq addEventHandler ["getIn", {_this spawn CTI_CO_FNC_OnUnitGetOut}]; @@ -74,9 +76,10 @@ _logic setVariable ["cti_hq", _hq, true]; //check if HQ was sucessfully repaired, else refound repair cost -[_hq, _logic] spawn { +[_hq, _logic, _side] spawn { _hq = _this select 0; _logic = _this select 1; + _side = _this select 2; sleep(5); _hq setVelocity [0, 5, 0]; //move it a little to check if its inside an object @@ -90,6 +93,7 @@ _logic setVariable ["cti_hq", _hq, true]; if(scoreSide CTI_P_SideJoined <= 500) then {_base_repair_HQ_cost = round(_base_repair_HQ_cost / 4);}; _logic setvariable ["cti_commander_funds",_comMoney+_base_repair_HQ_cost,true]; }; + missionNamespace setVariable [format["CTI_HQ_Repair_Lock_%1", _side], false, true]; }; diff --git a/Server/Functions/Server_SpawnTownOccupation.sqf b/Server/Functions/Server_SpawnTownOccupation.sqf index 0e1942686..e88c6bd08 100644 --- a/Server/Functions/Server_SpawnTownOccupation.sqf +++ b/Server/Functions/Server_SpawnTownOccupation.sqf @@ -151,7 +151,7 @@ _pool_u = []; }; }; } forEach (_pool_units select 0); -_pool_u = _pool_u call CTI_CO_FNC_ArrayShuffle; +_pool_u = _pool_u call BIS_fnc_arrayShuffle; _pool_v = []; { @@ -195,7 +195,7 @@ _pool_v = []; }; } forEach (_pool_units select 1); -_pool_v = _pool_v call CTI_CO_FNC_ArrayShuffle; +_pool_v = _pool_v call BIS_fnc_arrayShuffle; _pool=_pool_v+_pool_u; @@ -223,7 +223,7 @@ for '_i' from 1 to _totalGroups do { }; if (_can_use) then { - if (typeName _unit == "ARRAY") then { _unit = _unit select floor(random count _unit) }; + if (_unit isEqualType []) then { _unit = selectRandom _unit; }; _units pushBack _unit; _pool_group_size_current = _pool_group_size_current - 1; @@ -243,14 +243,14 @@ _positions = []; //diag_log _x; _maxSpawnRange = CTI_TOWNS_OCCUPATION_SPAWN_RANGE; - if (name _town == "Town29") then {_maxSpawnRange = 25}; //--- Makrynisi - if (name _town == "Town9") then {_maxSpawnRange = 125}; //--- Telos + //if (name _town == "Town29" && ISLAND == 2) then {_maxSpawnRange = 50;}; //--- Makrynisi + //if (name _town == "Town9" && ISLAND == 2) then {_maxSpawnRange = 150;}; //--- Telos _position = [getPos _town, 25, _maxSpawnRange] call CTI_CO_FNC_GetRandomPosition; // _position = [getPos _town, 25, CTI_TOWNS_OCCUPATION_SPAWN_RANGE] call CTI_CO_FNC_GetRandomPosition; _position = [_position, 50] call CTI_CO_FNC_GetEmptyPosition; _road_pos=(_position nearRoads 100); - if (count _road_pos > 0) then {_position = _road_pos select floor random (count _road_pos);}; + if (count _road_pos > 0) then {_position = selectRandom _road_pos;}; _positions pushBack _position; _group = createGroup _side; diff --git a/Server/Functions/Server_SpawnTownResistance.sqf b/Server/Functions/Server_SpawnTownResistance.sqf index 5dcfb092b..54e081df1 100644 --- a/Server/Functions/Server_SpawnTownResistance.sqf +++ b/Server/Functions/Server_SpawnTownResistance.sqf @@ -111,7 +111,7 @@ _pool_u = []; for '_i' from 1 to _presence do { _pool_u pushBack [missionNamespace getVariable _unit, if (count _x > 2) then {_x select 2} else {100}] }; }; } forEach (_pool_units select 0); -_pool_u = _pool_u call CTI_CO_FNC_ArrayShuffle; +_pool_u = _pool_u call BIS_fnc_arrayShuffle; _pool_v = []; { @@ -121,7 +121,7 @@ _pool_v = []; for '_i' from 1 to _presence do { _pool_v pushBack [missionNamespace getVariable _unit, if (count _x > 2) then {_x select 2} else {100}]}; }; } forEach (_pool_units select 1); -_pool_v =_pool_v call CTI_CO_FNC_ArrayShuffle; +_pool_v =_pool_v call BIS_fnc_arrayShuffle; //--- Shuffle! _pool = _pool_v + _pool_u; @@ -148,7 +148,7 @@ for '_i' from 1 to _totalGroups do { }; //diag_log [_unit,_probability,_can_use]; if (_can_use) then { - if (typeName _unit == "ARRAY") then { _unit = _unit select floor(random count _unit) }; + if (_unit isEqualType []) then { _unit = selectRandom _unit; }; _units pushBack _unit; _pool_group_size_current = _pool_group_size_current - 1; @@ -169,14 +169,14 @@ _positions = []; //diag_log _x; _maxSpawnRange = CTI_TOWNS_RESISTANCE_SPAWN_RANGE; - if (name _town == "Town29") then {_maxSpawnRange = 50;}; //--- Makrynisi - if (name _town == "Town9") then {_maxSpawnRange = 150;}; //--- Telos + //if (name _town == "Town29" && ISLAND == 2) then {_maxSpawnRange = 50;}; //--- Makrynisi + //if (name _town == "Town9" && ISLAND == 2) then {_maxSpawnRange = 150;}; //--- Telos _position = [getPos _town, 25, _maxSpawnRange] call CTI_CO_FNC_GetRandomPosition; // _position = [getPos _town, 25, CTI_TOWNS_RESISTANCE_SPAWN_RANGE] call CTI_CO_FNC_GetRandomPosition; _position = [_position, 50] call CTI_CO_FNC_GetEmptyPosition; _road_pos=(_position nearRoads 100); - if (count _road_pos > 0) then {_position = _road_pos select floor random (count _road_pos);}; + if (count _road_pos > 0) then {_position = selectRandom _road_pos;}; _positions pushBack _position; _group = createGroup resistance; diff --git a/Server/Init/Init_Server.sqf b/Server/Init/Init_Server.sqf index d5764aa3c..7b835d927 100644 --- a/Server/Init/Init_Server.sqf +++ b/Server/Init/Init_Server.sqf @@ -62,6 +62,8 @@ execVM "Server\Init\Init_Prison.sqf"; execVM "Addons\Strat_mode\Functions\TUTORIAL_Init.sqf"; CTI_Structure_Lock=False; +CTI_HQ_Repair_Lock_EAST=False; +CTI_HQ_Repair_Lock_WEST=False; CTI_Worker_Lock=False; @@ -70,13 +72,21 @@ CENTER_POS=getMarkerPos "CENTER_POS"; "CENTER_POS" setmarkeralpha 0; CENTER_RADIUS=(getMarkerSize "CENTER_POS")select 0; _locations= CENTER_POS nearroads CENTER_RADIUS; +if (ISLAND == 3) then { // Remove small jungel paths and bridges from spawn positions + _not_roads = []; + for "_i" from 0 to ((count _locations) - 1) do + { + if !(isOnRoad (_locations select _i)) then {_not_roads pushback (_locations select _i);}; + }; + _locations = _locations - _not_roads; +}; _attempts = 0; _real_attempts = 0; _asked= missionNamespace getVariable "CTI_BASE_STARTUP_PLACEMENT"; waitUntil {CTI_InitTowns}; _eastLocation=CENTER_POS; _westLocation=CENTER_POS; -while {(_eastLocation distance _westLocation) <(_asked)*0.95 ||(_eastLocation distance _westLocation) >( _asked)*1.25 || {(_x distance _eastLocation)<600} count CTI_Towns>0 || {(_x distance _westLocation)<600} count CTI_Towns>0 ||(_eastLocation distance CENTER_POS) > ( _asked)*1.2 ||(_westLocation distance CENTER_POS) > ( _asked)*1.2 } do { +while {(_eastLocation distance _westLocation) <(_asked)*0.95 ||(_eastLocation distance _westLocation) >( _asked)*1.25 || {(_x distance _eastLocation)<600} count CTI_Towns>0 || {(_x distance _westLocation)<600} count CTI_Towns>0 ||(_eastLocation distance CENTER_POS) > ( _asked)*0.75 ||(_westLocation distance CENTER_POS) > ( _asked)*0.75 } do { while {random(1)>0.2}do { _a="BiS pseudo-random number Generator is crappy"; }; @@ -161,7 +171,7 @@ while {! (((getMarkerPos format ["HELO_START_%1", _i])select 0) == 0)} do if (CTI_BASE_FOB_MAX > 0) then {_logic setVariable ["cti_fobs", [], true]}; //--- Startup vehicles - if (!(profileNamespace getvariable ["CTI_SAVE_ENABLED",false])) then { + if !((profileNamespace getvariable ["CTI_SAVE_ENABLED",false]) &&(count(profileNamespace getVariable ["CTI_SAVE_TOWNS",[]]) == count CTI_TOWNS) && (ISLAND in [2,3])) then { { _model = _x select 0; _equipment = _x select 1; @@ -214,6 +224,7 @@ while {! (((getMarkerPos format ["HELO_START_%1", _i])select 0) == 0)} do }; + true }count (playableUnits+switchableUnits); sleep 10; }; @@ -292,9 +303,10 @@ if (missionNamespace getvariable "CTI_PERSISTANT" == 1) then { } forEach [east,west]; }; 0 spawn { + sleep 270; while {!CTi_GameOver} do { - sleep 270 +random (60); 0 call PERS_SAVE; + sleep 270 +random (60); }; }; } else { @@ -307,4 +319,92 @@ if (missionNamespace getvariable "CTI_PERSISTANT" == 1) then { }; +//Logging of varius values +0 spawn { + sleep 100; //wait for everything to finish loading + _version = 4; //version of DiscordBot logReader + _arr = [["CTI_DataPacket", "Header"], + ["Version", _version], + ["Map", worldName] + ]; + diag_log _arr; + + _east_sl = (east) call CTI_CO_FNC_GetSideLogic; + _west_sl = (west) call CTI_CO_FNC_GetSideLogic; + while {!CTI_GameOver} do { + + _towns = count(_east_sl getVariable ["CTI_ACTIVE",[]]) + count(_west_sl getVariable ["CTI_ACTIVE",[]]); + + //build player array, splitting at 800 to ensure char limit of 1000 is not reached + _players = []; + _players_sub = []; + { + if(count (_players_sub joinString ", ") >= 800) then { + _players pushBack _players_sub; + _players_sub = []; + }; + _players_sub pushBack [name _x, str (side _x), getPlayerScores _x, getPos _x]; + } forEach allPlayers - entities "HeadlessClient_F"; + if(count (_players_sub joinString ", ") >= 10) then { + _players pushBack _players_sub; + _players_sub = []; + }; + //Build town arrays + _west_towns = []; + { + _west_towns pushBack str _x; + } forEach (west call CTI_CO_FNC_GetSideTowns); + _east_towns = []; + { + _east_towns pushBack str _x; + } forEach (east call CTI_CO_FNC_GetSideTowns); + + //Post Data to .rpt log + //Data for general mission performance + diag_log[["CTI_DataPacket", "Data_1"], + ["time", time], + ["fps", diag_fps], + ["score_east", (scoreSide east)], + ["score_west", (scoreSide west)], + ["player_count_east", (east countSide allPlayers)], + ["player_count_west", (west countSide allPlayers)], + ["commander_east", (name leader ((east) call CTI_CO_FNC_GetSideCommander))], + ["commander_west", (name leader ((west) call CTI_CO_FNC_GetSideCommander))], + ["town_count_east", ((east) call CTI_CO_FNC_GetSideTownCount)], + ["town_count_west", ((west) call CTI_CO_FNC_GetSideTownCount)], + ["active_SQF_count", count(diag_activeSQFScripts)], + ["active_AI", count(allUnits)], + ["total_objects", count(allMissionObjects "All")], + ["active_towns", _towns]]; + _dataP = 2; //next data packet index + { + //Data for Replay + diag_log[["CTI_DataPacket", (format ["Data_%1", _dataP])], + ["players", _x]]; + _dataP = _dataP+1; + } forEach _players; + + //Logging more detailed data about team + _east_hq = ((east) call CTI_CO_FNC_GetSideHQ); + _west_hq = ((west) call CTI_CO_FNC_GetSideHQ); + diag_log[["CTI_DataPacket", format ["Data_%1", _dataP]], + ["hq_east", [getPos _east_hq, alive _east_hq]], + ["hq_west", [getPos _west_hq, alive _west_hq]]]; + _dataP = _dataP+1; + + diag_log[["CTI_DataPacket", format ["Data_EOD_%1", _dataP]], //Marking package as "last" + ["bases_east", _east_sl getVariable ["cti_structures_areas",[]]], + ["bases_west", _west_sl getVariable ["cti_structures_areas",[]]], + ["east_towns", _east_towns], + ["west_towns", _west_towns]]; + + sleep 60; + }; + //Triggerd on Misson end, used when FSM does not trigger. (used for debugging) + _arr = [["CTI_DataPacket", "EOF"], + ["Version", _version], + ["Map", worldName] + ]; + diag_log _arr; +}; diff --git a/banner.jpg b/banner.jpg index 6a148103a..59aecd9ef 100644 Binary files a/banner.jpg and b/banner.jpg differ diff --git a/init.sqf b/init.sqf index 0274e1ea6..93714927d 100644 --- a/init.sqf +++ b/init.sqf @@ -4,7 +4,7 @@ setObjectViewDistance 4000; NET_LOG=False; -MADE_FOR_STRATIS=false; +ISLAND = 2; //--- 1: Stratis, 2: Altis, 3: Tanoa, 4: Malden, 5: VR, 6: Livonia //--- Early definition, will be override later on in the init files. CTI_P_SideJoined = civilian; diff --git a/mission.sqm b/mission.sqm index 8b37a39da..d028369d2 100644 --- a/mission.sqm +++ b/mission.sqm @@ -8,7 +8,7 @@ class EditorData toggles=1025; class ItemIDProvider { - nextID=178; + nextID=192; }; class MarkerIDProvider { @@ -16,17 +16,16 @@ class EditorData }; class Camera { - pos[]={14608.123,155.19696,5895.5967}; - dir[]={-0.80275387,-0.42684528,0.41648361}; - up[]={-0.37890467,0.90431285,0.19658338}; - aside[]={0.46054059,-1.7105776e-008,0.887676}; + pos[]={16551.203,1725.5931,16140.479}; + dir[]={0.5765183,-0.71965694,0.38707608}; + up[]={0.59746611,0.69434953,0.40114108}; + aside[]={0.55744642,2.0091538e-006,-0.83027512}; }; }; binarizationWanted=0; addons[]= { "A3_Ui_F", - "A3_Structures_F_Mil_Flags", "A3_Modules_F", "A3_Characters_F", "A3_Modules_F_Curator_Curator" @@ -35,7 +34,7 @@ class AddonsMetaData { class List { - items=5; + items=4; class Item0 { className="A3_Ui_F"; @@ -44,27 +43,20 @@ class AddonsMetaData url="https://www.arma3.com"; }; class Item1 - { - className="A3_Structures_F_Mil"; - name="Arma 3 - Military Buildings and Structures"; - author="Bohemia Interactive"; - url="https://www.arma3.com"; - }; - class Item2 { className="A3_Modules_F"; name="Arma 3 Alpha - Scripted Modules"; author="Bohemia Interactive"; url="https://www.arma3.com"; }; - class Item3 + class Item2 { className="A3_Characters_F"; name="Arma 3 Alpha - Characters and Clothing"; author="Bohemia Interactive"; url="https://www.arma3.com"; }; - class Item4 + class Item3 { className="A3_Modules_F_Curator"; name="Arma 3 Zeus Update - Scripted Modules"; @@ -105,7 +97,7 @@ class Mission { class Intel { - briefingName="BECTI BE 0.97 - Zerty 1.3.4.5"; + briefingName="BECTI BE 0.97 - Zerty 1.3.5.5 - Altis"; overviewText="By Benny - Adapted from OFP era MFCTI (Mike Melvin)"; resistanceWest=0; timeOfChanges=24720; @@ -123,7 +115,7 @@ class Mission }; class Entities { - items=124; + items=134; class Item0 { dataType="Marker"; @@ -683,1001 +675,700 @@ class Mission }; class Item61 { - dataType="Object"; + dataType="Logic"; class PositionInfo { - position[]={20826.033,36.789253,6824.6987}; - angles[]={0.014664836,0,6.2046804}; - }; - side="Empty"; - flags=4; - class Attributes - { - skill=0.60000002; - init="nullReturn = [this, localize ""str_a3_selakano0"", resistance, 500,""Town33""] execVM ""Common\Init\Init_Location.sqf"""; - name="Town0"; + position[]={20826.033,36.789444,6824.6992}; + angles[]={0.014660765,0,6.2046804}; }; + name="Town0"; + init="nullReturn = [this, localize ""str_a3_selakano0"", resistance, 500] execVM ""Common\Init\Init_Location.sqf"""; id=61; - type="FlagPole_F"; - atlOffset=0.012802124; + type="Logic"; + atlOffset=3.9898033; }; class Item62 { - dataType="Object"; + dataType="Logic"; class PositionInfo { position[]={16820.996,26.518801,12713.124}; angles[]={0.045302324,0,6.2725158}; }; - side="Empty"; - flags=4; - class Attributes - { - skill=0.60000002; - init="nullReturn = [this, localize ""str_a3_pyrgos0"", resistance, 250] execVM ""Common\Init\Init_Location.sqf"""; - name="Town1"; - }; + name="Town1"; + init="nullReturn = [this, localize ""str_a3_pyrgos0"", resistance, 250] execVM ""Common\Init\Init_Location.sqf"""; id=62; - type="FlagPole_F"; - atlOffset=0.0042667389; + type="Logic"; + atlOffset=3.9810715; }; class Item63 { - dataType="Object"; + dataType="Logic"; class PositionInfo { position[]={19407.914,42.663628,13262.551}; angles[]={0.018663859,0,0.022662206}; }; - side="Empty"; - flags=4; - class Attributes - { - skill=0.60000002; - init="nullReturn = [this, localize ""str_a3_dorida0"", resistance, 150] execVM ""Common\Init\Init_Location.sqf"""; - name="Town2"; - }; + name="Town2"; + init="nullReturn = [this, localize ""str_a3_dorida0"", resistance, 150] execVM ""Common\Init\Init_Location.sqf"""; id=63; - type="FlagPole_F"; - atlOffset=0.0011024475; + type="Logic"; + atlOffset=3.9779091; }; class Item64 { - dataType="Object"; + dataType="Logic"; class PositionInfo { position[]={18089.914,26.811056,15200.277}; angles[]={6.2578578,0,0.012000273}; }; - side="Empty"; - flags=4; - class Attributes - { - skill=0.60000002; - init="nullReturn = [this, localize ""str_a3_charkia0"", resistance, 200] execVM ""Common\Init\Init_Location.sqf"""; - name="Town3"; - }; + name="Town3"; + init="nullReturn = [this, localize ""str_a3_charkia0"", resistance, 200] execVM ""Common\Init\Init_Location.sqf"""; id=64; - type="FlagPole_F"; - atlOffset=0.0015525818; + type="Logic"; + atlOffset=3.9783573; }; class Item65 { - dataType="Object"; + dataType="Logic"; class PositionInfo { position[]={21381.674,26.061756,16414.758}; angles[]={6.2405448,0,0.0146689}; }; - side="Empty"; - flags=4; - class Attributes - { - skill=0.60000002; - init="nullReturn = [this, localize ""str_a3_kalochori0"", resistance, 150] execVM ""Common\Init\Init_Location.sqf"""; - name="Town6"; - }; + name="Town6"; + init="nullReturn = [this, localize ""str_a3_kalochori0"", resistance, 150] execVM ""Common\Init\Init_Location.sqf"""; id=65; - type="FlagPole_F"; - atlOffset=0.0040168762; + type="Logic"; + atlOffset=3.9808216; }; class Item66 { - dataType="Object"; + dataType="Logic"; class PositionInfo { position[]={18810.496,35.676094,16633.451}; angles[]={6.2299027,0,6.2511969}; }; - side="Empty"; - flags=4; - class Attributes - { - skill=0.60000002; - init="nullReturn = [this, localize ""str_a3_rodopoli0"", resistance, 250] execVM ""Common\Init\Init_Location.sqf"""; - name="Town4"; - }; + name="Town4"; + init="nullReturn = [this, localize ""str_a3_rodopoli0"", resistance, 250] execVM ""Common\Init\Init_Location.sqf"""; id=66; - type="FlagPole_F"; - atlOffset=0.007686615; + type="Logic"; + atlOffset=3.9844913; }; class Item67 { - dataType="Object"; + dataType="Logic"; class PositionInfo { - position[]={20945.688,47.213638,16965.613}; - angles[]={0.0040116427,0,6.1888003}; - }; - side="Empty"; - flags=4; - class Attributes - { - skill=0.60000002; - init="nullReturn = [this, localize ""str_a3_paros0"", resistance, 350,""Town39""] execVM ""Common\Init\Init_Location.sqf"""; - name="Town5"; + position[]={20945.688,47.213783,16965.613}; + angles[]={0.0040142573,0,6.188798}; }; + name="Town5"; + init="nullReturn = [this, localize ""str_a3_paros0"", resistance, 350] execVM ""Common\Init\Init_Location.sqf"""; id=67; - type="FlagPole_F"; - atlOffset=0.017852783; + type="Logic"; + atlOffset=3.9948044; }; class Item68 { - dataType="Object"; + dataType="Logic"; class PositionInfo { - position[]={27018.002,25.26956,23167.574}; - angles[]={6.2711854,0,0.051953323}; - }; - side="Empty"; - flags=4; - class Attributes - { - skill=0.60000002; - init="nullReturn = [this, localize ""str_a3_molos0"", resistance, 145,""Town47""] execVM ""Common\Init\Init_Location.sqf"""; - name="Town7"; + position[]={27018.002,25.269257,23167.574}; + angles[]={6.2711778,0,0.051958453}; }; + name="Town7"; + init="nullReturn = [this, localize ""str_a3_molos0"", resistance, 145] execVM ""Common\Init\Init_Location.sqf"""; id=68; - type="FlagPole_F"; - atlOffset=0.0063037872; + type="Logic"; + atlOffset=3.9828053; }; class Item69 { - dataType="Object"; + dataType="Logic"; class PositionInfo { position[]={16640.928,19.293343,16056.638}; angles[]={6.272521,0,0.0093286335}; }; - side="Empty"; - flags=4; - class Attributes - { - skill=0.60000002; - init="nullReturn = [this, localize ""str_a3_anthrakia0"", resistance, 125] execVM ""Common\Init\Init_Location.sqf"""; - name="Town8"; - }; + name="Town8"; + init="nullReturn = [this, localize ""str_a3_anthrakia0"", resistance, 125] execVM ""Common\Init\Init_Location.sqf"""; id=69; - type="FlagPole_F"; - atlOffset=0.00038051605; + type="Logic"; + atlOffset=3.9771852; }; class Item70 { - dataType="Object"; + dataType="Logic"; class PositionInfo { position[]={16244.04,29.379099,17314.234}; angles[]={6.2113094,0,0.037316564}; }; - side="Empty"; - flags=4; - class Attributes - { - skill=0.60000002; - init="nullReturn = [this, localize ""str_a3_telos0"", resistance, 200] execVM ""Common\Init\Init_Location.sqf"""; - name="Town9"; - }; + name="Town9"; + init="nullReturn = [this, localize ""str_a3_telos0"", resistance, 200] execVM ""Common\Init\Init_Location.sqf"""; id=70; - type="FlagPole_F"; - atlOffset=0.013177872; + type="Logic"; + atlOffset=3.9899826; }; class Item71 { - dataType="Object"; + dataType="Logic"; class PositionInfo { position[]={14032.271,30.131212,18737}; angles[]={0.039977662,0,6.2778587}; }; - side="Empty"; - flags=4; - class Attributes - { - skill=0.60000002; - init="nullReturn = [this, localize ""str_a3_athira0"", resistance, 300] execVM ""Common\Init\Init_Location.sqf"""; - name="Town12"; - }; + name="Town12"; + init="nullReturn = [this, localize ""str_a3_athira0"", resistance, 300] execVM ""Common\Init\Init_Location.sqf"""; id=71; - type="FlagPole_F"; - atlOffset=0.0032463074; + type="Logic"; + atlOffset=3.980051; }; class Item72 { - dataType="Object"; + dataType="Logic"; class PositionInfo { - position[]={11745.446,57.814919,18331.873}; - angles[]={6.213963,0,6.253861}; - }; - side="Empty"; - flags=4; - class Attributes - { - skill=0.60000002; - init="nullReturn = [this, localize ""str_a3_koroni0"", resistance, 125] execVM ""Common\Init\Init_Location.sqf"""; - name="Town13"; + position[]={18366.211,87.969917,11344.152}; }; + name="Town13"; + init="nullReturn = [this, ""CrossRoad"", resistance, 150] execVM ""Common\Init\Init_Location.sqf"""; id=72; - type="FlagPole_F"; - atlOffset=0.01134491; + type="Logic"; + atlOffset=3.9769974; }; class Item73 { - dataType="Object"; + dataType="Logic"; class PositionInfo { position[]={10292.485,134.56599,19118.633}; angles[]={6.1980581,0,6.2618537}; }; - side="Empty"; - flags=4; - class Attributes - { - skill=0.60000002; - init="nullReturn = [this, localize ""str_a3_galati0"", resistance, 125] execVM ""Common\Init\Init_Location.sqf"""; - name="Town16"; - }; + name="Town16"; + init="nullReturn = [this, localize ""str_a3_galati0"", resistance, 125] execVM ""Common\Init\Init_Location.sqf"""; id=73; - type="FlagPole_F"; - atlOffset=0.015487671; + type="Logic"; + atlOffset=3.9922943; }; class Item74 { - dataType="Object"; + dataType="Logic"; class PositionInfo { - position[]={4588.5151,303.55054,21381.932}; + position[]={4588.5151,303.55048,21381.93}; angles[]={6.2791886,0,6.2791886}; }; - side="Empty"; - flags=4; - class Attributes - { - skill=0.60000002; - init="nullReturn = [this, localize ""str_a3_oreokastro0"", resistance, 500,""Town38""] execVM ""Common\Init\Init_Location.sqf"""; - name="Town21"; - }; + name="Town21"; + init="nullReturn = [this, localize ""str_a3_oreokastro0"", resistance, 500] execVM ""Common\Init\Init_Location.sqf"""; id=74; - type="FlagPole_F"; - atlOffset=3.0517578e-005; + type="Logic"; + atlOffset=3.9768066; }; class Item75 { - dataType="Object"; + dataType="Logic"; class PositionInfo { position[]={8649.4277,184.71611,18285.018}; angles[]={0.074527748,0,6.2671871}; }; - side="Empty"; - flags=4; - class Attributes - { - skill=0.60000002; - init="nullReturn = [this, localize ""str_a3_syrta0"", resistance, 200] execVM ""Common\Init\Init_Location.sqf"""; - name="Town17"; - }; + name="Town17"; + init="nullReturn = [this, localize ""str_a3_syrta0"", resistance, 200] execVM ""Common\Init\Init_Location.sqf"""; id=75; - type="FlagPole_F"; - atlOffset=0.011825562; + type="Logic"; + atlOffset=3.9886322; }; class Item76 { - dataType="Object"; + dataType="Logic"; class PositionInfo { - position[]={9298.0059,119.61528,15932.003}; - angles[]={0.081154868,0,0.037314966}; - }; - side="Empty"; - flags=4; - class Attributes - { - skill=0.60000002; - init="nullReturn = [this, localize ""str_a3_agiosdionysios0"", resistance, 200] execVM ""Common\Init\Init_Location.sqf"""; - name="Town18"; + position[]={9298.0059,119.6152,15932.003}; + angles[]={0.081157811,0,0.037315138}; }; + name="Town18"; + init="nullReturn = [this, localize ""str_a3_agiosdionysios0"", resistance, 200] execVM ""Common\Init\Init_Location.sqf"""; id=76; - type="FlagPole_F"; - atlOffset=0.016075134; + type="Logic"; + atlOffset=3.9927979; }; class Item77 { - dataType="Object"; + dataType="Logic"; class PositionInfo { position[]={12362.523,25.348881,15765.438}; angles[]={0.0053265258,0,0.017329043}; }; - side="Empty"; - flags=4; - class Attributes - { - skill=0.60000002; - init="nullReturn = [this, localize ""str_a3_lakka0"", resistance, 200] execVM ""Common\Init\Init_Location.sqf"""; - name="Town14"; - }; + name="Town14"; + init="nullReturn = [this, localize ""str_a3_lakka0"", resistance, 200] execVM ""Common\Init\Init_Location.sqf"""; id=77; - type="FlagPole_F"; - atlOffset=0.00066947937; + type="Logic"; + atlOffset=3.9774742; }; class Item78 { - dataType="Object"; + dataType="Logic"; class PositionInfo { position[]={12608.428,16.056833,14320.253}; angles[]={6.1927657,0,6.2405434}; }; - side="Empty"; - flags=4; - class Attributes - { - skill=0.60000002; - init="nullReturn = [this, localize ""str_a3_neochori0"", resistance, 350] execVM ""Common\Init\Init_Location.sqf"""; - name="Town15"; - }; + name="Town15"; + init="nullReturn = [this, localize ""str_a3_neochori0"", resistance, 350] execVM ""Common\Init\Init_Location.sqf"""; id=78; - type="FlagPole_F"; - atlOffset=0.019950867; + type="Logic"; + atlOffset=3.9967556; }; class Item79 { - dataType="Object"; + dataType="Logic"; class PositionInfo { position[]={9038.1826,26.646751,11954.574}; angles[]={0.021328852,0,6.1782389}; }; - side="Empty"; - flags=4; - class Attributes - { - skill=0.60000002; - init="nullReturn = [this, localize ""str_a3_zaros0"", resistance, 250] execVM ""Common\Init\Init_Location.sqf"""; - name="Town19"; - }; + name="Town19"; + init="nullReturn = [this, localize ""str_a3_zaros0"", resistance, 250] execVM ""Common\Init\Init_Location.sqf"""; id=79; - type="FlagPole_F"; - atlOffset=0.021104813; + type="Logic"; + atlOffset=3.9979095; }; class Item80 { - dataType="Object"; + dataType="Logic"; class PositionInfo { - position[]={3507.7151,12.373648,12996.904}; - angles[]={6.2671871,0,0.010664274}; - }; - side="Empty"; - flags=4; - class Attributes - { - skill=0.60000002; - init="nullReturn = [this, localize ""str_a3_kavala0"", resistance, 500,""Town46""] execVM ""Common\Init\Init_Location.sqf"""; - name="Town20"; + position[]={3507.7151,12.372912,12996.904}; + angles[]={6.2671809,0,0.010663962}; }; + name="Town20"; + init="nullReturn = [this, localize ""str_a3_kavala0"", resistance, 500] execVM ""Common\Init\Init_Location.sqf"""; id=80; - type="FlagPole_F"; - atlOffset=0.00073432922; + type="Logic"; + atlOffset=3.9768038; }; class Item81 { - dataType="Object"; + dataType="Logic"; class PositionInfo { position[]={14181.469,23.505833,16286.399}; angles[]={0.012000273,0,6.2778587}; }; - side="Empty"; - flags=4; - class Attributes - { - skill=0.60000002; - init="nullReturn = [this, localize ""str_a3_airbase010"", resistance, 300] execVM ""Common\Init\Init_Location.sqf"""; - name="Town11"; - }; + name="Town11"; + init="nullReturn = [this, localize ""str_a3_airbase010"", resistance, 300] execVM ""Common\Init\Init_Location.sqf"""; id=81; - type="FlagPole_F"; - atlOffset=0.00033187866; + type="Logic"; + atlOffset=3.9771366; }; class Item82 { - dataType="Object"; + dataType="Logic"; class PositionInfo { position[]={15191.061,21.902496,17301.797}; angles[]={0.0013372133,0,0.0013372133}; }; - side="Empty"; - flags=4; - class Attributes - { - skill=0.60000002; - init="nullReturn = [this, localize ""STR_Map_Military_Base"", resistance, 300] execVM ""Common\Init\Init_Location.sqf"""; - name="Town10"; - }; + name="Town10"; + init="nullReturn = [this, localize ""STR_Map_Military_Base"", resistance, 300] execVM ""Common\Init\Init_Location.sqf"""; id=82; - type="FlagPole_F"; - atlOffset=3.8146973e-006; + type="Logic"; + atlOffset=3.9768085; }; class Item83 { - dataType="Object"; + dataType="Logic"; class PositionInfo { position[]={20274.463,52.501724,11714.725}; angles[]={0.042640556,0,6.2778587}; }; - side="Empty"; - flags=4; - class Attributes - { - skill=0.60000002; - init="nullReturn = [this, localize ""str_a3_chalkeia0"", resistance, 250] execVM ""Common\Init\Init_Location.sqf"""; - name="Town22"; - }; + name="Town22"; + init="nullReturn = [this, localize ""str_a3_chalkeia0"", resistance, 250] execVM ""Common\Init\Init_Location.sqf"""; id=83; - type="FlagPole_F"; - atlOffset=0.0036773682; + type="Logic"; + atlOffset=3.980484; }; class Item84 { - dataType="Object"; + dataType="Logic"; class PositionInfo { position[]={12842.514,46.522461,19633.301}; angles[]={6.253861,0,6.2645216}; }; - side="Empty"; - flags=4; - class Attributes - { - skill=0.60000002; - init="nullReturn = [this, localize ""str_a3_ifestiona0"", resistance, 150] execVM ""Common\Init\Init_Location.sqf"""; - name="Town23"; - }; + name="Town23"; + init="nullReturn = [this, localize ""str_a3_ifestiona0"", resistance, 150] execVM ""Common\Init\Init_Location.sqf"""; id=84; - type="FlagPole_F"; - atlOffset=0.0023727417; + type="Logic"; + atlOffset=3.9791794; }; class Item85 { - dataType="Object"; + dataType="Logic"; class PositionInfo { position[]={4864.3594,82.693581,16151.614}; angles[]={0.02399601,0,6.2445378}; }; - side="Empty"; - flags=4; - class Attributes - { - skill=0.60000002; - init="nullReturn = [this, localize ""str_a3_negades0"", resistance, 200] execVM ""Common\Init\Init_Location.sqf"""; - name="Town24"; - }; + name="Town24"; + init="nullReturn = [this, localize ""str_a3_negades0"", resistance, 200] execVM ""Common\Init\Init_Location.sqf"""; id=85; - type="FlagPole_F"; - atlOffset=0.0040969849; + type="Logic"; + atlOffset=3.9809036; }; class Item86 { - dataType="Object"; + dataType="Logic"; class PositionInfo { position[]={25623.484,22.950079,21285.391}; angles[]={6.249866,0,0.0079935296}; }; - side="Empty"; - flags=4; - class Attributes - { - skill=0.60000002; - init="nullReturn = [this, localize ""str_a3_sofia0"", resistance, 250] execVM ""Common\Init\Init_Location.sqf"""; - name="Town25"; - }; + name="Town25"; + init="nullReturn = [this, localize ""str_a3_sofia0"", resistance, 250] execVM ""Common\Init\Init_Location.sqf"""; id=86; - type="FlagPole_F"; - atlOffset=0.0023212433; + type="Logic"; + atlOffset=3.979126; }; class Item87 { - dataType="Object"; + dataType="Logic"; class PositionInfo { - position[]={20516.811,38.253426,8883.252}; - angles[]={6.1219311,0,0.23175959}; - }; - side="Empty"; - flags=4; - class Attributes - { - skill=0.60000002; - init="nullReturn = [this, localize ""str_a3_panagia0"", resistance, 250] execVM ""Common\Init\Init_Location.sqf"""; - name="Town26"; + position[]={20516.811,38.253601,8883.252}; + angles[]={6.1219339,0,0.23176228}; }; + name="Town26"; + init="nullReturn = [this, localize ""str_a3_panagia0"", resistance, 250] execVM ""Common\Init\Init_Location.sqf"""; id=87; - type="FlagPole_F"; - atlOffset=0.15982437; + type="Logic"; + atlOffset=4.1368065; }; class Item88 { - dataType="Object"; + dataType="Logic"; class PositionInfo { position[]={7118.8721,116.19866,16439.533}; angles[]={6.1637564,0,0.071875811}; }; - side="Empty"; - flags=4; - class Attributes - { - skill=0.60000002; - init="nullReturn = [this, localize ""str_a3_kore0"", resistance, 300] execVM ""Common\Init\Init_Location.sqf"""; - name="Town27"; - }; + name="Town27"; + init="nullReturn = [this, localize ""str_a3_kore0"", resistance, 300] execVM ""Common\Init\Init_Location.sqf"""; id=88; - type="FlagPole_F"; - atlOffset=0.038856506; + type="Logic"; + atlOffset=4.0156631; }; class Item89 { - dataType="Object"; + dataType="Logic"; class PositionInfo { position[]={22950.141,9.1006737,18859.719}; angles[]={0.0093350215,0,6.259192}; }; - side="Empty"; - flags=4; - class Attributes - { - skill=0.60000002; - init="nullReturn = [this, localize ""str_a3_almyra0"", resistance, 500] execVM ""Common\Init\Init_Location.sqf"""; - name="Town28"; - }; + name="Town28"; + init="nullReturn = [this, localize ""str_a3_almyra0"", resistance, 500] execVM ""Common\Init\Init_Location.sqf"""; id=89; - type="FlagPole_F"; - atlOffset=0.00093460083; + type="Logic"; + atlOffset=3.9777393; }; class Item90 { - dataType="Object"; + dataType="Logic"; class PositionInfo { position[]={13587.634,19.314034,12209.913}; angles[]={0.0039967569,0,0.0013372133}; }; - side="Empty"; - flags=4; - class Attributes - { - skill=0.60000002; - init="nullReturn = [this, localize ""str_a3_makrynisiisland0"", resistance, 25] execVM ""Common\Init\Init_Location.sqf"""; - name="Town29"; - }; + name="Town29"; + init="nullReturn = [this, localize ""str_a3_makrynisiisland0"", resistance, 25] execVM ""Common\Init\Init_Location.sqf"""; id=90; - type="FlagPole_F"; - atlOffset=3.9100647e-005; + type="Logic"; + atlOffset=3.9768438; }; class Item91 { - dataType="Object"; + dataType="Logic"; class PositionInfo { position[]={14964.189,10.588233,11105.679}; angles[]={0.017332481,0,6.2046804}; }; - side="Empty"; - flags=4; - class Attributes - { - skill=0.60000002; - init="nullReturn = [this, localize ""str_a3_faronaki0"", resistance, 150] execVM ""Common\Init\Init_Location.sqf"""; - name="Town30"; - }; + name="Town30"; + init="nullReturn = [this, localize ""str_a3_faronaki0"", resistance, 150] execVM ""Common\Init\Init_Location.sqf"""; id=91; - type="FlagPole_F"; - atlOffset=0.012816429; + type="Logic"; + atlOffset=3.9896212; }; class Item92 { - dataType="Object"; + dataType="Logic"; class PositionInfo { position[]={17745.547,6.3756104,18107.686}; angles[]={0.0093286335,0,6.2711902}; }; - side="Empty"; - flags=4; - class Attributes - { - skill=0.60000002; - init="nullReturn = [this, localize ""str_a3_kalithea0"", resistance, 125] execVM ""Common\Init\Init_Location.sqf"""; - name="Town32"; - }; + name="Town32"; + init="nullReturn = [this, localize ""str_a3_kalithea0"", resistance, 125] execVM ""Common\Init\Init_Location.sqf"""; id=92; - type="FlagPole_F"; - atlOffset=0.00044631958; + type="Logic"; + atlOffset=3.9772511; }; class Item93 { - dataType="Object"; + dataType="Logic"; class PositionInfo { - position[]={11574.771,23.315058,9442.752}; - angles[]={6.2711902,0,6.2765174}; - }; - side="Empty"; - flags=4; - class Attributes - { - skill=0.60000002; - init="nullReturn = [this, localize ""str_a3_vikos0"", resistance, 145,""Town42""] execVM ""Common\Init\Init_Location.sqf"""; - name="Town33"; + position[]={11574.771,23.315329,9442.752}; + angles[]={6.2711945,0,6.2765183}; }; + name="Town33"; + init="nullReturn = [this, localize ""str_a3_vikos0"", resistance, 145] execVM ""Common\Init\Init_Location.sqf"""; id=93; - type="FlagPole_F"; - atlOffset=0.0027294159; + type="Logic"; + atlOffset=3.979805; }; class Item94 { - dataType="Object"; + dataType="Logic"; class PositionInfo { - position[]={17077.311,23.238556,10059.891}; - angles[]={0.031988446,0,0.027993103}; - }; - side="Empty"; - flags=4; - class Attributes - { - skill=0.60000002; - init="nullReturn = [this, localize ""str_a3_ekali0"", resistance, 200,""Town33""] execVM ""Common\Init\Init_Location.sqf"""; - name="Town31"; + position[]={17077.311,23.239,10059.891}; + angles[]={0.031991884,0,0.02799508}; }; + name="Town31"; + init="nullReturn = [this, localize ""str_a3_ekali0"", resistance, 200] execVM ""Common\Init\Init_Location.sqf"""; id=94; - type="FlagPole_F"; - atlOffset=0.0035552979; + type="Logic"; + atlOffset=3.9808044; }; class Item95 { - dataType="Object"; + dataType="Logic"; class PositionInfo { position[]={14651.969,49.779419,20758.879}; angles[]={6.272521,0,6.2338929}; }; - side="Empty"; - flags=4; - class Attributes - { - skill=0.60000002; - init="nullReturn = [this, localize ""str_a3_frini0"", resistance, 175] execVM ""Common\Init\Init_Location.sqf"""; - name="Town34"; - }; + name="Town34"; + init="nullReturn = [this, localize ""str_a3_frini0"", resistance, 175] execVM ""Common\Init\Init_Location.sqf"""; id=95; - type="FlagPole_F"; - atlOffset=0.005065918; + type="Logic"; + atlOffset=3.9818726; }; class Item96 { - dataType="Object"; + dataType="Logic"; class PositionInfo { position[]={16854.336,14.130496,21871.979}; angles[]={0.022662206,0,6.2818484}; }; - side="Empty"; - flags=4; - class Attributes - { - skill=0.60000002; - init="nullReturn = [this, localize ""str_a3_nychi0"", resistance, 150] execVM ""Common\Init\Init_Location.sqf"""; - name="Town35"; - }; + name="Town35"; + init="nullReturn = [this, localize ""str_a3_nychi0"", resistance, 150] execVM ""Common\Init\Init_Location.sqf"""; id=96; - type="FlagPole_F"; - atlOffset=0.0010061264; + type="Logic"; + atlOffset=3.9778109; }; class Item97 { - dataType="Object"; + dataType="Logic"; class PositionInfo { position[]={20113.703,22.211153,20032.137}; angles[]={0.0039967569,0,0.038647637}; }; - side="Empty"; - flags=4; - class Attributes - { - skill=0.60000002; - init="nullReturn = [this, localize ""STR_Map_Theater_Ruins"", resistance, 150] execVM ""Common\Init\Init_Location.sqf"""; - name="Town36"; - }; + name="Town36"; + init="nullReturn = [this, localize ""STR_Map_Theater_Ruins"", resistance, 150] execVM ""Common\Init\Init_Location.sqf"""; id=97; - type="FlagPole_F"; - atlOffset=0.0030250549; + type="Logic"; + atlOffset=3.9798298; }; class Item98 { - dataType="Object"; + dataType="Logic"; class PositionInfo { position[]={20943.436,17.919567,19257.873}; angles[]={0.0093350215,0,0.075854406}; }; - side="Empty"; - flags=4; - class Attributes - { - skill=0.60000002; - init="nullReturn = [this, localize ""STR_Map_Military_Outpost"", resistance, 250] execVM ""Common\Init\Init_Location.sqf"""; - name="Town37"; - }; + name="Town37"; + init="nullReturn = [this, localize ""STR_Map_Military_Outpost"", resistance, 250] execVM ""Common\Init\Init_Location.sqf"""; id=98; - type="FlagPole_F"; - atlOffset=0.011717796; + type="Logic"; + atlOffset=3.9885225; }; class Item99 { - dataType="Object"; + dataType="Logic"; class PositionInfo { - position[]={9220.6602,19.509701,21622.859}; - angles[]={0.022664838,0,0.027993103}; - }; - side="Empty"; - flags=4; - class Attributes - { - skill=0.60000002; - init="nullReturn = [this, localize ""STR_Map_North_Airfield"", resistance, 500,""Town41""] execVM ""Common\Init\Init_Location.sqf"""; - name="Town38"; + position[]={9220.6602,19.50931,21622.859}; + angles[]={0.022671828,0,0.02799508}; }; + name="Town38"; + init="nullReturn = [this, localize ""STR_Map_North_Airfield"", resistance, 500] execVM ""Common\Init\Init_Location.sqf"""; id=99; - type="FlagPole_F"; - atlOffset=0.007390976; + type="Logic"; + atlOffset=3.9838047; }; class Item100 { - dataType="Object"; + dataType="Logic"; class PositionInfo { position[]={23199.52,18.140114,19971.23}; angles[]={6.272521,0,6.2765174}; }; - side="Empty"; - flags=4; - class Attributes - { - skill=0.60000002; - init="nullReturn = [this, localize ""str_a3_ioannina0"", resistance, 200] execVM ""Common\Init\Init_Location.sqf"""; - name="Town39"; - }; + name="Town39"; + init="nullReturn = [this, localize ""str_a3_ioannina0"", resistance, 200] execVM ""Common\Init\Init_Location.sqf"""; id=100; - type="FlagPole_F"; - atlOffset=0.00032138824; + type="Logic"; + atlOffset=3.9771261; }; class Item101 { - dataType="Object"; + dataType="Logic"; class PositionInfo { position[]={11623.219,27.020689,11943.426}; angles[]={6.2352223,0,6.2179451}; }; - side="Empty"; - flags=4; - class Attributes - { - skill=0.60000002; - init="nullReturn = [this, localize ""str_a3_aacairfield0"", resistance, 500] execVM ""Common\Init\Init_Location.sqf"""; - name="Town40"; - }; + name="Town40"; + init="nullReturn = [this, localize ""str_a3_aacairfield0"", resistance, 500] execVM ""Common\Init\Init_Location.sqf"""; id=101; - type="FlagPole_F"; - atlOffset=0.013057709; + type="Logic"; + atlOffset=3.9898624; }; class Item102 { - dataType="Object"; + dataType="Logic"; class PositionInfo { position[]={26851.094,30.606556,24466.365}; angles[]={0.031988446,0,0.0013372133}; }; - side="Empty"; - flags=4; - class Attributes - { - skill=0.60000002; - init="nullReturn = [this, localize ""str_a3_molosairfield0"", resistance, 500] execVM ""Common\Init\Init_Location.sqf"""; - name="Town41"; - }; + name="Town41"; + init="nullReturn = [this, localize ""str_a3_molosairfield0"", resistance, 500] execVM ""Common\Init\Init_Location.sqf"""; id=102; - type="FlagPole_F"; - atlOffset=0.0020027161; + type="Logic"; + atlOffset=3.9788074; }; class Item103 { - dataType="Object"; + dataType="Logic"; class PositionInfo { position[]={5068.5044,56.909691,11306.087}; angles[]={6.2551947,0,6.2325621}; }; - side="Empty"; - flags=4; - class Attributes - { - skill=0.60000002; - init="nullReturn = [this, localize ""str_a3_panochori0"", resistance, 200] execVM ""Common\Init\Init_Location.sqf"""; - name="Town42"; - }; + name="Town42"; + init="nullReturn = [this, localize ""str_a3_panochori0"", resistance, 200] execVM ""Common\Init\Init_Location.sqf"""; id=103; - type="FlagPole_F"; - atlOffset=0.0066490173; + type="Logic"; + atlOffset=3.9834557; }; class Item104 { - dataType="Object"; + dataType="Logic"; class PositionInfo { position[]={21895.934,26.782196,21010.182}; angles[]={6.129735,0,0.0066592805}; }; - side="Empty"; - flags=4; - class Attributes - { - skill=0.60000002; - init="nullReturn = [this, localize ""STR_Map_Hotel_Complex"", resistance, 200] execVM ""Common\Init\Init_Location.sqf"""; - name="Town43"; - }; + name="Town43"; + init="nullReturn = [this, localize ""STR_Map_Hotel_Complex"", resistance, 200] execVM ""Common\Init\Init_Location.sqf"""; id=104; - type="FlagPole_F"; - atlOffset=0.047597885; + type="Logic"; + atlOffset=4.0244026; }; class Item105 { - dataType="Object"; + dataType="Logic"; class PositionInfo { position[]={5475.6577,31.276804,14999.543}; }; - side="Empty"; - flags=4; - class Attributes - { - skill=0.60000002; - init="nullReturn = [this, localize ""str_a3_stadium0"", resistance, 140] execVM ""Common\Init\Init_Location.sqf"""; - name="Town44"; - }; + name="Town44"; + init="nullReturn = [this, localize ""str_a3_stadium0"", resistance, 140] execVM ""Common\Init\Init_Location.sqf"""; id=105; - type="FlagPole_F"; + type="Logic"; + atlOffset=3.9768047; }; class Item106 { - dataType="Object"; + dataType="Logic"; class PositionInfo { - position[]={21091.016,5.8291836,14768.472}; - angles[]={0.017332481,0,0.12468339}; - }; - side="Empty"; - flags=4; - class Attributes - { - skill=0.60000002; - init="nullReturn = [this, localize ""str_a3_limni0"", resistance, 140] execVM ""Common\Init\Init_Location.sqf"""; - name="Town45"; + position[]={20288.293,14.734743,14770.421}; }; + name="Town45"; + init="nullReturn = [this, localize ""str_a3_limni0"", resistance, 140] execVM ""Common\Init\Init_Location.sqf"""; id=106; - type="FlagPole_F"; - atlOffset=0.03186357; + type="Logic"; + atlOffset=4.0088005; }; class Item107 { - dataType="Object"; + dataType="Logic"; class PositionInfo { - position[]={3853.6687,19.174381,17472.664}; - angles[]={6.2192721,0,0.077179179}; - }; - side="Empty"; - flags=4; - class Attributes - { - skill=0.60000002; - init="nullReturn = [this, localize ""str_a3_agioskonstantinos0"", resistance, 140,""Town21""] execVM ""Common\Init\Init_Location.sqf"""; - name="Town46"; + position[]={3853.6689,19.17448,17472.664}; + angles[]={6.2192717,0,0.077178456}; }; + name="Town46"; + init="nullReturn = [this, localize ""str_a3_agioskonstantinos0"", resistance, 140] execVM ""Common\Init\Init_Location.sqf"""; id=107; - type="FlagPole_F"; - atlOffset=0.019934654; + type="Logic"; + atlOffset=3.9968033; }; class Item108 { - dataType="Object"; + dataType="Logic"; class PositionInfo { position[]={21752.174,19.689096,7520.2725}; angles[]={0.0093286335,0,6.2791886}; }; - side="Empty"; - flags=4; - class Attributes - { - skill=0.60000002; - init="nullReturn = [this, localize ""str_a3_feres0"", resistance, 140] execVM ""Common\Init\Init_Location.sqf"""; - name="Town47"; - }; + name="Town47"; + init="nullReturn = [this, localize ""str_a3_feres0"", resistance, 140] execVM ""Common\Init\Init_Location.sqf"""; id=108; - type="FlagPole_F"; - atlOffset=0.000207901; + type="Logic"; + atlOffset=3.9770126; }; class Item109 { - dataType="Object"; + dataType="Logic"; class PositionInfo { - position[]={5853.1182,229.927,20094.025}; - angles[]={6.2738504,0,0.069221549}; - }; - side="Empty"; - flags=4; - class Attributes - { - skill=0.60000002; - init="nullReturn = [this, localize ""str_a3_dump0"", resistance, 175,""Town17""] execVM ""Common\Init\Init_Location.sqf"""; - name="Town48"; + position[]={5853.1182,229.92726,20094.025}; + angles[]={6.2738476,0,0.069219761}; }; + name="Town48"; + init="nullReturn = [this, localize ""str_a3_dump0"", resistance, 175] execVM ""Common\Init\Init_Location.sqf"""; id=109; - type="FlagPole_F"; - atlOffset=0.0097351074; + type="Logic"; + atlOffset=3.9868011; }; class Item110 { - dataType="Object"; + dataType="Logic"; class PositionInfo { position[]={23236.664,38.75779,21794.523}; angles[]={0.038647637,0,0.045302324}; }; - side="Empty"; - flags=4; - class Attributes - { - skill=0.60000002; - init="nullReturn = [this, localize ""str_a3_nidasos0"", resistance, 145] execVM ""Common\Init\Init_Location.sqf"""; - name="Town49"; - }; + name="Town49"; + init="nullReturn = [this, localize ""str_a3_nidasos0"", resistance, 145] execVM ""Common\Init\Init_Location.sqf"""; id=110; - type="FlagPole_F"; - atlOffset=0.0071182251; + type="Logic"; + atlOffset=3.9839249; }; class Item111 { @@ -1713,8 +1404,8 @@ class Mission dataType="Object"; class PositionInfo { - position[]={14482.121,9.8335609,5893.3213}; - angles[]={0.30364406,0,6.0730028}; + position[]={14485.032,6.1585503,5903.3135}; + angles[]={0.14693356,0,6.1887999}; }; side="East"; flags=6; @@ -1732,8 +1423,8 @@ class Mission dataType="Object"; class PositionInfo { - position[]={14487.121,9.6155596,5888.3711}; - angles[]={0.30364406,0,5.9329162}; + position[]={14487.532,6.3318214,5900.8633}; + angles[]={0.17421596,0,6.1887999}; }; side="East"; flags=4; @@ -1741,19 +1432,62 @@ class Mission { skill=0.60000002; rank="COLONEL"; - init="this allowDamage false; (group this) setGroupID [""Default Team""];this disableAI ""MOVE"";this disableAI ""AUTOTARGET"";this disableAI ""TARGET"";"; + init="this allowDamage false; (group this) setGroupID [""Default Team""];this disableAI ""MOVE"";this disableAI ""AUTOTARGET"";this disableAI ""TARGET""; (group this) setVariable [""cti_server_group"", str (side (group this))];"; name="CTI_EAST_DEFAULT_GROUP"; }; id=115; type="O_Soldier_F"; + atlOffset=4.7683716e-007; + class CustomAttributes + { + class Attribute0 + { + property="speaker"; + expression="_this setspeaker _value;"; + class Value + { + class data + { + class type + { + type[]= + { + "STRING" + }; + }; + value="Male01PER"; + }; + }; + }; + class Attribute1 + { + property="pitch"; + expression="_this setpitch _value;"; + class Value + { + class data + { + class type + { + type[]= + { + "SCALAR" + }; + }; + value=1.04; + }; + }; + }; + nAttributes=2; + }; }; class Item2 { dataType="Object"; class PositionInfo { - position[]={14482.121,12.04697,5883.3711}; - angles[]={0.10626491,0,6.1782393}; + position[]={14482.532,7.1093593,5900.8633}; + angles[]={0.34555563,0,6.0114136}; }; side="East"; flags=4; @@ -1766,6 +1500,7 @@ class Mission }; id=116; type="O_Soldier_SL_F"; + atlOffset=4.7683716e-007; class CustomAttributes { class Attribute0 @@ -1814,8 +1549,8 @@ class Mission dataType="Object"; class PositionInfo { - position[]={14487.121,11.690472,5878.3711}; - angles[]={0.21018261,0,6.0640931}; + position[]={14485.032,7.3125525,5898.3633}; + angles[]={0.34555563,0,6.0114136}; }; side="East"; flags=4; @@ -1833,8 +1568,8 @@ class Mission dataType="Object"; class PositionInfo { - position[]={14482.121,13.243651,5873.3711}; - angles[]={0.12993059,0,6.2578578}; + position[]={14487.532,7.5160012,5895.8633}; + angles[]={0.34555563,0,6.0114136}; }; side="East"; flags=4; @@ -1846,14 +1581,15 @@ class Mission }; id=118; type="O_Soldier_SL_F"; + atlOffset=4.7683716e-007; }; class Item5 { dataType="Object"; class PositionInfo { - position[]={14484.867,12.719265,5869.4692}; - angles[]={6.1637559,0,6.1769204}; + position[]={14482.532,8.9092503,5895.8633}; + angles[]={0.34555563,0,6.0114136}; }; side="East"; flags=4; @@ -1865,14 +1601,15 @@ class Mission }; id=119; type="O_Soldier_SL_F"; + atlOffset=9.5367432e-007; }; class Item6 { dataType="Object"; class PositionInfo { - position[]={14486.079,12.085032,5862.3247}; - angles[]={0.0093350215,0,6.1769209}; + position[]={14485.032,8.8877535,5893.3633}; + angles[]={0.2229002,0,6.0114136}; }; side="East"; flags=4; @@ -1890,8 +1627,8 @@ class Mission dataType="Object"; class PositionInfo { - position[]={14489.289,11.779264,5858.4019}; - angles[]={0.0093350215,0,6.1769209}; + position[]={14487.532,8.7578888,5890.8633}; + angles[]={0.2229002,0,6.0114136}; }; side="East"; flags=4; @@ -1909,8 +1646,8 @@ class Mission dataType="Object"; class PositionInfo { - position[]={14493.111,11.269214,5857.0439}; - angles[]={6.2046804,0,6.1545658}; + position[]={14482.532,10.511089,5890.8633}; + angles[]={0.30364406,0,5.9329162}; }; side="East"; flags=4; @@ -1928,8 +1665,8 @@ class Mission dataType="Object"; class PositionInfo { - position[]={14493.116,11.102674,5854.936}; - angles[]={6.2046804,0,6.1545658}; + position[]={14485.032,10.380932,5888.3633}; + angles[]={0.30364406,0,5.9329162}; }; side="East"; flags=4; @@ -1941,14 +1678,15 @@ class Mission }; id=123; type="O_Soldier_SL_F"; + atlOffset=9.5367432e-007; }; class Item10 { dataType="Object"; class PositionInfo { - position[]={14491.64,10.838742,5852.5313}; - angles[]={6.127131,0,6.2325611}; + position[]={14487.532,10.143319,5885.8633}; + angles[]={0.24435127,0,5.9329162}; }; side="East"; flags=4; @@ -1966,8 +1704,8 @@ class Mission dataType="Object"; class PositionInfo { - position[]={14493.937,10.517456,5851.2285}; - angles[]={6.127131,0,6.2325611}; + position[]={14482.532,11.733985,5885.8633}; + angles[]={0.10626491,0,6.0640931}; }; side="East"; flags=4; @@ -1979,15 +1717,15 @@ class Mission }; id=125; type="O_Soldier_SL_F"; - atlOffset=-9.5367432e-007; + atlOffset=9.5367432e-007; }; class Item12 { dataType="Object"; class PositionInfo { - position[]={14497.858,10.133352,5847.647}; - angles[]={0.042641956,0,5.9590368}; + position[]={14485.032,11.4439,5883.3633}; + angles[]={0.10626491,0,6.0640931}; }; side="East"; flags=4; @@ -1999,14 +1737,15 @@ class Mission }; id=126; type="O_Soldier_SL_F"; + atlOffset=9.5367432e-007; }; class Item13 { dataType="Object"; class PositionInfo { - position[]={14512.12,7.1621251,5893.0957}; - angles[]={6.2166171,0,6.1756024}; + position[]={14487.532,11.154018,5880.8633}; + angles[]={0.10626491,0,6.0640931}; }; side="East"; flags=4; @@ -2018,15 +1757,15 @@ class Mission }; id=127; type="O_Soldier_SL_F"; - atlOffset=4.7683716e-007; + atlOffset=9.5367432e-007; }; class Item14 { dataType="Object"; class PositionInfo { - position[]={14507.12,7.5813837,5888.0957}; - angles[]={6.2605233,0,6.1323404}; + position[]={14482.532,12.267283,5880.8633}; + angles[]={0.10626491,0,6.0640931}; }; side="East"; flags=4; @@ -2044,8 +1783,8 @@ class Mission dataType="Object"; class PositionInfo { - position[]={14512.12,6.4824553,5883.0957}; - angles[]={6.2099824,0,6.13234}; + position[]={14485.032,12.157131,5878.3633}; + angles[]={0.21018261,0,6.0640931}; }; side="East"; flags=4; @@ -2057,15 +1796,14 @@ class Mission }; id=129; type="O_Soldier_SL_F"; - atlOffset=4.7683716e-007; }; class Item16 { dataType="Object"; class PositionInfo { - position[]={14507.12,7.4580698,5878.0957}; - angles[]={6.256525,0,5.9929523}; + position[]={14487.532,12.133901,5875.8633}; + angles[]={0.21018261,0,6.0640931}; }; side="East"; flags=4; @@ -2077,15 +1815,14 @@ class Mission }; id=130; type="O_Soldier_SL_F"; - atlOffset=-0.29771471; }; class Item17 { dataType="Object"; class PositionInfo { - position[]={14512.12,6.1292048,5873.0957}; - angles[]={6.256525,0,5.9929523}; + position[]={14482.532,12.903828,5875.8633}; + angles[]={0.12993059,0,6.1440892}; }; side="East"; flags=4; @@ -2097,14 +1834,15 @@ class Mission }; id=131; type="O_Soldier_SL_F"; + atlOffset=-9.5367432e-007; }; class Item18 { dataType="Object"; class PositionInfo { - position[]={14507.12,7.3394032,5868.0957}; - angles[]={6.2578578,0,5.9905057}; + position[]={14485.032,12.880432,5873.3633}; + angles[]={0.12993059,0,6.1440892}; }; side="East"; flags=4; @@ -2122,8 +1860,8 @@ class Mission dataType="Object"; class PositionInfo { - position[]={14512.12,5.8589268,5863.0957}; - angles[]={0.22543514,0,5.9905062}; + position[]={14487.532,12.490712,5870.8633}; + angles[]={6.1967349,0,6.1440892}; }; side="East"; flags=4; @@ -2135,15 +1873,15 @@ class Mission }; id=133; type="O_Soldier_SL_F"; - atlOffset=-0.34478331; + atlOffset=-9.5367432e-007; }; class Item20 { dataType="Object"; class PositionInfo { - position[]={14507.12,8.399498,5858.0957}; - angles[]={0.13386136,0,6.0793881}; + position[]={14482.532,13.135555,5870.8633}; + angles[]={6.1637559,0,6.1769204}; }; side="East"; flags=4; @@ -2161,8 +1899,8 @@ class Mission dataType="Object"; class PositionInfo { - position[]={14512.12,7.0922318,5853.0957}; - angles[]={6.2685208,0,6.0793877}; + position[]={14485.032,12.568874,5868.3633}; + angles[]={6.1637559,0,6.1769204}; }; side="East"; flags=4; @@ -2174,15 +1912,14 @@ class Mission }; id=135; type="O_Soldier_SL_F"; - atlOffset=-0.28221989; }; class Item22 { dataType="Object"; class PositionInfo { - position[]={14507.12,7.9941993,5848.0957}; - angles[]={6.2046804,0,6.1180367}; + position[]={14487.532,12.002292,5865.8633}; + angles[]={6.1637559,0,6.1769204}; }; side="East"; flags=4; @@ -2200,8 +1937,8 @@ class Mission dataType="Object"; class PositionInfo { - position[]={14509.348,7.3115125,5844.0229}; - angles[]={6.2099833,0,6.1128521}; + position[]={14482.532,12.535592,5865.8633}; + angles[]={6.1637559,0,6.1769204}; }; side="East"; flags=4; @@ -2213,15 +1950,14 @@ class Mission }; id=137; type="O_Soldier_SL_F"; - atlOffset=-4.7683716e-007; }; class Item24 { dataType="Object"; class PositionInfo { - position[]={14502.701,8.7139492,5842.7749}; - angles[]={0.042641956,0,5.9590368}; + position[]={14485.032,12.186963,5863.3633}; + angles[]={0.0093350215,0,6.1769209}; }; side="East"; flags=4; @@ -2237,7 +1973,7 @@ class Mission }; class Attributes { - formation="STAG COLUMN"; + formation="DIAMOND"; }; id=113; }; @@ -2253,7 +1989,7 @@ class Mission dataType="Object"; class PositionInfo { - position[]={2314.9258,12.648989,9283.7012}; + position[]={2314.926,12.643297,9283.8008}; angles[]={0.057271164,0,0.1312411}; }; side="West"; @@ -2262,19 +1998,61 @@ class Mission { skill=0.60000002; rank="COLONEL"; - init="this allowDamage false;(group this) setGroupIDGlobal [""Default Team""];this disableAI ""MOVE"";this disableAI ""AUTOTARGET"";this disableAI ""TARGET"";"; + init="this allowDamage false;(group this) setGroupIDGlobal [""Default Team""];this disableAI ""MOVE"";this disableAI ""AUTOTARGET"";this disableAI ""TARGET""; (group this) setVariable [""cti_server_group"", str (side (group this))];"; name="CTI_WEST_DEFAULT_GROUP"; }; id=140; type="B_Soldier_F"; + class CustomAttributes + { + class Attribute0 + { + property="speaker"; + expression="_this setspeaker _value;"; + class Value + { + class data + { + class type + { + type[]= + { + "STRING" + }; + }; + value="Male06ENG"; + }; + }; + }; + class Attribute1 + { + property="pitch"; + expression="_this setpitch _value;"; + class Value + { + class data + { + class type + { + type[]= + { + "SCALAR" + }; + }; + value=1.02; + }; + }; + }; + nAttributes=2; + }; }; class Item1 { dataType="Object"; class PositionInfo { - position[]={2319.9258,13.644493,9278.751}; - angles[]={0.057271164,0,0.15214813}; + position[]={2317.426,13.113741,9281.3506}; + angles[]={0.057271164,0,0.1312411}; }; side="West"; flags=4; @@ -2292,8 +2070,8 @@ class Mission dataType="Object"; class PositionInfo { - position[]={2314.9258,12.525521,9273.751}; - angles[]={6.2139621,0,0.2114578}; + position[]={2312.426,12.348551,9281.3506}; + angles[]={6.2578578,0,0.2114578}; }; side="West"; flags=4; @@ -2353,8 +2131,8 @@ class Mission dataType="Object"; class PositionInfo { - position[]={2319.9258,13.049868,9268.751}; - angles[]={6.2498641,0,0.11153467}; + position[]={2314.926,12.821893,9278.8506}; + angles[]={6.2578578,0,0.2114578}; }; side="West"; flags=4; @@ -2372,8 +2150,8 @@ class Mission dataType="Object"; class PositionInfo { - position[]={2314.9258,12.819977,9263.751}; - angles[]={0.010664274,0,0.02666023}; + position[]={2317.426,13.242478,9276.3506}; + angles[]={6.2139621,0,0.2114578}; }; side="West"; flags=4; @@ -2391,8 +2169,8 @@ class Mission dataType="Object"; class PositionInfo { - position[]={2319.9258,12.771416,9258.751}; - angles[]={6.2285728,0,0.031988446}; + position[]={2312.426,12.169161,9276.3506}; + angles[]={6.2139621,0,0.2114578}; }; side="West"; flags=4; @@ -2410,8 +2188,8 @@ class Mission dataType="Object"; class PositionInfo { - position[]={2314.9258,12.317031,9253.751}; - angles[]={6.1861577,0,0.018667053}; + position[]={2314.926,12.532489,9273.8506}; + angles[]={6.2139621,0,0.2114578}; }; side="West"; flags=4; @@ -2429,8 +2207,8 @@ class Mission dataType="Object"; class PositionInfo { - position[]={2319.9258,11.765233,9248.751}; - angles[]={6.1861577,0,6.2365522}; + position[]={2317.426,12.895769,9271.3506}; + angles[]={6.2139621,0,0.2114578}; }; side="West"; flags=4; @@ -2448,8 +2226,8 @@ class Mission dataType="Object"; class PositionInfo { - position[]={2314.9258,11.481448,9243.751}; - angles[]={6.1782393,0,6.2365537}; + position[]={2312.426,12.531755,9271.3506}; + angles[]={0.11811411,0,0.026662467}; }; side="West"; flags=4; @@ -2467,8 +2245,8 @@ class Mission dataType="Object"; class PositionInfo { - position[]={2319.9258,9.8097668,9238.751}; - angles[]={5.8206048,0,6.0742788}; + position[]={2314.926,12.765588,9268.8506}; + angles[]={0.010664274,0,0.02666023}; }; side="West"; flags=4; @@ -2486,8 +2264,8 @@ class Mission dataType="Object"; class PositionInfo { - position[]={2314.9258,8.4945126,9233.751}; - angles[]={6.0755548,0,6.0213389}; + position[]={2317.426,12.858921,9266.3506}; + angles[]={0.010664274,0,0.02666023}; }; side="West"; flags=4; @@ -2505,8 +2283,8 @@ class Mission dataType="Object"; class PositionInfo { - position[]={2337.5042,16.200138,9289.0645}; - angles[]={0.018663859,0,0.074528553}; + position[]={2312.426,12.725589,9266.3506}; + angles[]={0.010664274,0,0.02666023}; }; side="West"; flags=4; @@ -2518,15 +2296,15 @@ class Mission }; id=151; type="B_Soldier_SL_F"; - atlOffset=3.8146973e-006; + atlOffset=-9.5367432e-007; }; class Item12 { dataType="Object"; class PositionInfo { - position[]={2332.5042,15.609912,9284.0645}; - angles[]={6.2405448,0,0.11548408}; + position[]={2314.926,12.818928,9263.8506}; + angles[]={0.010664274,0,0.02666023}; }; side="West"; flags=4; @@ -2544,8 +2322,8 @@ class Mission dataType="Object"; class PositionInfo { - position[]={2337.5042,15.976583,9279.0645}; - angles[]={6.2405448,0,0.11548408}; + position[]={2317.426,12.833954,9261.3506}; + angles[]={6.2285728,0,0.02666023}; }; side="West"; flags=4; @@ -2557,15 +2335,14 @@ class Mission }; id=153; type="B_Soldier_SL_F"; - atlOffset=-9.5367432e-007; }; class Item14 { dataType="Object"; class PositionInfo { - position[]={2332.5042,15.201583,9274.0645}; - angles[]={6.2458687,0,0.053282689}; + position[]={2312.426,12.700623,9261.3506}; + angles[]={6.2285728,0,0.02666023}; }; side="West"; flags=4; @@ -2583,9 +2360,11 @@ class Mission dataType="Object"; class PositionInfo { - position[]={2337.5042,15.643533,9269.0645}; + position[]={2314.926,12.630608,9258.8506}; + angles[]={6.2285728,0,0.02666023}; }; side="West"; + flags=4; class Attributes { skill=0.60000002; @@ -2594,15 +2373,14 @@ class Mission }; id=155; type="B_Soldier_SL_F"; - atlOffset=0.33308029; }; class Item16 { dataType="Object"; class PositionInfo { - position[]={2332.5042,14.609595,9264.0645}; - angles[]={6.1914434,0,0.13647979}; + position[]={2317.426,12.560587,9256.3506}; + angles[]={6.2285728,0,0.02666023}; }; side="West"; flags=4; @@ -2614,15 +2392,14 @@ class Mission }; id=156; type="B_Soldier_SL_F"; - atlOffset=0.10816097; }; class Item17 { dataType="Object"; class PositionInfo { - position[]={2335,13.910367,9259.4766}; - angles[]={6.1769204,0,6.233892}; + position[]={2312.426,12.457439,9256.3506}; + angles[]={6.2365522,0,0.018663859}; }; side="West"; flags=4; @@ -2640,8 +2417,8 @@ class Mission dataType="Object"; class PositionInfo { - position[]={2332.5042,12.691146,9254.0645}; - angles[]={5.8400087,0,6.0768318}; + position[]={2314.926,12.326749,9253.8506}; + angles[]={6.1861577,0,0.018667053}; }; side="West"; flags=4; @@ -2653,15 +2430,14 @@ class Mission }; id=158; type="B_Soldier_SL_F"; - atlOffset=-0.4017849; }; class Item19 { dataType="Object"; class PositionInfo { - position[]={2337.5042,9.6730919,9249.0645}; - angles[]={5.8400087,0,6.0768318}; + position[]={2317.426,12.13005,9251.3506}; + angles[]={6.1861577,0,0.018667053}; }; side="West"; flags=4; @@ -2679,8 +2455,8 @@ class Mission dataType="Object"; class PositionInfo { - position[]={2325.0005,10.993038,9246.0049}; - angles[]={6.0188522,0,5.8026171}; + position[]={2312.426,12.11986,9251.3506}; + angles[]={6.2511969,0,6.2365537}; }; side="West"; flags=4; @@ -2698,8 +2474,8 @@ class Mission dataType="Object"; class PositionInfo { - position[]={2327.6113,6.3763151,9235.6641}; - angles[]={5.8206053,0,5.9795418}; + position[]={2314.926,11.92318,9248.8506}; + angles[]={6.2511969,0,6.2365537}; }; side="West"; flags=4; @@ -2711,15 +2487,14 @@ class Mission }; id=161; type="B_Soldier_SL_F"; - atlOffset=4.7683716e-007; }; class Item22 { dataType="Object"; class PositionInfo { - position[]={2329.3284,6.8502789,9239.1045}; - angles[]={6.0003133,0,5.8026171}; + position[]={2317.426,11.638655,9246.3506}; + angles[]={6.1782393,0,6.2365537}; }; side="West"; flags=4; @@ -2731,15 +2506,15 @@ class Mission }; id=162; type="B_Soldier_SL_F"; - atlOffset=4.7683716e-007; + atlOffset=-9.5367432e-007; }; class Item23 { dataType="Object"; class PositionInfo { - position[]={2332.2759,3.347275,9232.4805}; - angles[]={6.0768318,0,5.9795418}; + position[]={2312.426,11.871984,9246.3506}; + angles[]={6.1782393,0,6.2365537}; }; side="West"; flags=4; @@ -2751,14 +2526,15 @@ class Mission }; id=163; type="B_Soldier_SL_F"; + atlOffset=-9.5367432e-007; }; class Item24 { dataType="Object"; class PositionInfo { - position[]={2321.0681,5.4266376,9229.5781}; - angles[]={5.894659,0,6.0338197}; + position[]={2314.926,11.491949,9243.8506}; + angles[]={6.1782393,0,6.2365537}; }; side="West"; flags=4; @@ -2774,7 +2550,7 @@ class Mission }; class Attributes { - formation="STAG COLUMN"; + formation="DIAMOND"; }; id=139; }; @@ -3046,16 +2822,152 @@ class Mission id=177; atlOffset=191.07422; }; + class Item124 + { + dataType="Marker"; + position[]={8457.834,105.3189,25118.711}; + name="marker_0"; + text="Welcome Area (Do not enter)"; + markerType="ELLIPSE"; + type="rectangle"; + colorName="ColorCIV"; + fillName="DiagGrid"; + a=1000; + b=1000; + id=178; + }; + class Item125 + { + dataType="Logic"; + class PositionInfo + { + position[]={5923.1074,107.61804,12458.481}; + angles[]={0.042640556,0,6.1038013}; + }; + name="Town50"; + init="nullReturn = [this, ""Lost Dump"", resistance, 200] execVM ""Common\Init\Init_Location.sqf"""; + id=179; + type="Logic"; + atlOffset=3.9768066; + }; + class Item126 + { + dataType="Logic"; + class PositionInfo + { + position[]={5404.2397,80.456276,17896.805}; + angles[]={6.253861,0,6.2658529}; + }; + name="Town51"; + init="nullReturn = [this, ""Abandonned Factory"", resistance, 150] execVM ""Common\Init\Init_Location.sqf"""; + id=180; + type="Logic"; + atlOffset=3.9768066; + }; + class Item127 + { + dataType="Logic"; + class PositionInfo + { + position[]={8076.5811,187.45813,14437.229}; + angles[]={6.2352209,0,0.027995232}; + }; + name="Town52"; + init="nullReturn = [this, ""Agia Stemma"", resistance, 150] execVM ""Common\Init\Init_Location.sqf"""; + id=181; + type="Logic"; + atlOffset=3.9768372; + }; + class Item128 + { + dataType="Logic"; + class PositionInfo + { + position[]={12123.02,15.262378,22807.049}; + angles[]={0.025324726,0,0.0079936078}; + }; + name="Town53"; + init="nullReturn = [this, ""Lost Bay"", resistance, 200] execVM ""Common\Init\Init_Location.sqf"""; + id=182; + type="Logic"; + atlOffset=3.9768047; + }; + class Item129 + { + dataType="Logic"; + class PositionInfo + { + position[]={11127.342,45.687012,14567.272}; + angles[]={6.179565,0,6.2591867}; + }; + name="Town54"; + init="nullReturn = [this, ""Alikampos"", resistance, 200] execVM ""Common\Init\Init_Location.sqf"""; + id=184; + type="Logic"; + atlOffset=3.9768066; + }; + class Item130 + { + dataType="Logic"; + class PositionInfo + { + position[]={18449.453,12.043061,8122.5762}; + }; + name="Town55"; + init="nullReturn = [this, ""Livadi"", resistance, 150] execVM ""Common\Init\Init_Location.sqf"""; + id=185; + type="Logic"; + atlOffset=3.9910002; + }; + class Item131 + { + dataType="Logic"; + class PositionInfo + { + position[]={10455.959,90.158836,17282.502}; + }; + name="Town56"; + init="nullReturn = [this, ""Orino"", resistance, 150] execVM ""Common\Init\Init_Location.sqf"""; + id=186; + type="Logic"; + atlOffset=3.9769974; + }; + class Item132 + { + dataType="Logic"; + class PositionInfo + { + position[]={6451.8208,125.43697,13776.043}; + }; + name="Town57"; + init="nullReturn = [this, ""Lost Camp"", resistance, 125] execVM ""Common\Init\Init_Location.sqf"""; + id=190; + type="Logic"; + atlOffset=3.977005; + }; + class Item133 + { + dataType="Logic"; + class PositionInfo + { + position[]={9330.1084,42.790623,13706.522}; + }; + name="Town58"; + init="nullReturn = [this, ""Xirolimni Dam"", resistance, 200] execVM ""Common\Init\Init_Location.sqf"""; + id=191; + type="Logic"; + atlOffset=3.9770012; + }; }; class Connections { class LinkIDProvider { - nextID=49; + nextID=125; }; class Links { - items=49; + items=125; class Item0 { linkID=0; @@ -3546,6 +3458,766 @@ class Mission type="Sync"; }; }; + class Item49 + { + linkID=49; + item0=80; + item1=103; + class CustomData + { + type="Sync"; + }; + }; + class Item50 + { + linkID=50; + item0=103; + item1=179; + class CustomData + { + type="Sync"; + }; + }; + class Item51 + { + linkID=51; + item0=103; + item1=79; + class CustomData + { + type="Sync"; + }; + }; + class Item52 + { + linkID=52; + item0=80; + item1=105; + class CustomData + { + type="Sync"; + }; + }; + class Item53 + { + linkID=53; + item0=105; + item1=88; + class CustomData + { + type="Sync"; + }; + }; + class Item54 + { + linkID=54; + item0=88; + item1=76; + class CustomData + { + type="Sync"; + }; + }; + class Item55 + { + linkID=55; + item0=76; + item1=77; + class CustomData + { + type="Sync"; + }; + }; + class Item56 + { + linkID=56; + item0=77; + item1=81; + class CustomData + { + type="Sync"; + }; + }; + class Item57 + { + linkID=57; + item0=81; + item1=82; + class CustomData + { + type="Sync"; + }; + }; + class Item58 + { + linkID=58; + item0=82; + item1=70; + class CustomData + { + type="Sync"; + }; + }; + class Item59 + { + linkID=59; + item0=70; + item1=69; + class CustomData + { + type="Sync"; + }; + }; + class Item60 + { + linkID=60; + item0=70; + item1=92; + class CustomData + { + type="Sync"; + }; + }; + class Item61 + { + linkID=61; + item0=92; + item1=66; + class CustomData + { + type="Sync"; + }; + }; + class Item62 + { + linkID=62; + item0=66; + item1=64; + class CustomData + { + type="Sync"; + }; + }; + class Item63 + { + linkID=63; + item0=64; + item1=69; + class CustomData + { + type="Sync"; + }; + }; + class Item64 + { + linkID=64; + item0=64; + item1=62; + class CustomData + { + type="Sync"; + }; + }; + class Item65 + { + linkID=65; + item0=62; + item1=63; + class CustomData + { + type="Sync"; + }; + }; + class Item66 + { + linkID=66; + item0=66; + item1=67; + class CustomData + { + type="Sync"; + }; + }; + class Item67 + { + linkID=67; + item0=67; + item1=65; + class CustomData + { + type="Sync"; + }; + }; + class Item68 + { + linkID=68; + item0=106; + item1=63; + class CustomData + { + type="Sync"; + }; + }; + class Item69 + { + linkID=69; + item0=63; + item1=83; + class CustomData + { + type="Sync"; + }; + }; + class Item70 + { + linkID=70; + item0=83; + item1=87; + class CustomData + { + type="Sync"; + }; + }; + class Item71 + { + linkID=71; + item0=87; + item1=108; + class CustomData + { + type="Sync"; + }; + }; + class Item72 + { + linkID=72; + item0=108; + item1=61; + class CustomData + { + type="Sync"; + }; + }; + class Item73 + { + linkID=73; + item0=93; + item1=79; + class CustomData + { + type="Sync"; + }; + }; + class Item74 + { + linkID=74; + item0=99; + item1=73; + class CustomData + { + type="Sync"; + }; + }; + class Item75 + { + linkID=75; + item0=73; + item1=75; + class CustomData + { + type="Sync"; + }; + }; + class Item76 + { + linkID=76; + item0=75; + item1=88; + class CustomData + { + type="Sync"; + }; + }; + class Item77 + { + linkID=77; + item0=73; + item1=71; + class CustomData + { + type="Sync"; + }; + }; + class Item78 + { + linkID=78; + item0=71; + item1=82; + class CustomData + { + type="Sync"; + }; + }; + class Item79 + { + linkID=79; + item0=67; + item1=100; + class CustomData + { + type="Sync"; + }; + }; + class Item80 + { + linkID=80; + item0=100; + item1=89; + class CustomData + { + type="Sync"; + }; + }; + class Item81 + { + linkID=81; + item0=91; + item1=90; + class CustomData + { + type="Sync"; + }; + }; + class Item82 + { + linkID=82; + item0=90; + item1=101; + class CustomData + { + type="Sync"; + }; + }; + class Item83 + { + linkID=83; + item0=90; + item1=78; + class CustomData + { + type="Sync"; + }; + }; + class Item84 + { + linkID=84; + item0=78; + item1=77; + class CustomData + { + type="Sync"; + }; + }; + class Item85 + { + linkID=85; + item0=109; + item1=75; + class CustomData + { + type="Sync"; + }; + }; + class Item86 + { + linkID=86; + item0=109; + item1=74; + class CustomData + { + type="Sync"; + }; + }; + class Item87 + { + linkID=87; + item0=107; + item1=85; + class CustomData + { + type="Sync"; + }; + }; + class Item88 + { + linkID=88; + item0=85; + item1=180; + class CustomData + { + type="Sync"; + }; + }; + class Item89 + { + linkID=89; + item0=85; + item1=88; + class CustomData + { + type="Sync"; + }; + }; + class Item90 + { + linkID=90; + item0=100; + item1=86; + class CustomData + { + type="Sync"; + }; + }; + class Item91 + { + linkID=91; + item0=86; + item1=68; + class CustomData + { + type="Sync"; + }; + }; + class Item92 + { + linkID=92; + item0=68; + item1=102; + class CustomData + { + type="Sync"; + }; + }; + class Item93 + { + linkID=93; + item0=100; + item1=104; + class CustomData + { + type="Sync"; + }; + }; + class Item94 + { + linkID=94; + item0=84; + item1=71; + class CustomData + { + type="Sync"; + }; + }; + class Item95 + { + linkID=95; + item0=95; + item1=96; + class CustomData + { + type="Sync"; + }; + }; + class Item96 + { + linkID=96; + item0=78; + item1=184; + class CustomData + { + type="Sync"; + }; + }; + class Item97 + { + linkID=97; + item0=79; + item1=78; + class CustomData + { + type="Sync"; + }; + }; + class Item98 + { + linkID=98; + item0=104; + item1=110; + class CustomData + { + type="Sync"; + }; + }; + class Item99 + { + linkID=99; + item0=67; + item1=98; + class CustomData + { + type="Sync"; + }; + }; + class Item100 + { + linkID=100; + item0=98; + item1=97; + class CustomData + { + type="Sync"; + }; + }; + class Item101 + { + linkID=101; + item0=87; + item1=94; + class CustomData + { + type="Sync"; + }; + }; + class Item102 + { + linkID=102; + item0=107; + item1=109; + class CustomData + { + type="Sync"; + }; + }; + class Item103 + { + linkID=103; + item0=110; + item1=68; + class CustomData + { + type="Sync"; + }; + }; + class Item104 + { + linkID=104; + item0=182; + item1=73; + class CustomData + { + type="Sync"; + }; + }; + class Item105 + { + linkID=105; + item0=95; + item1=182; + class CustomData + { + type="Sync"; + }; + }; + class Item106 + { + linkID=106; + item0=95; + item1=71; + class CustomData + { + type="Sync"; + }; + }; + class Item107 + { + linkID=107; + item0=91; + item1=62; + class CustomData + { + type="Sync"; + }; + }; + class Item108 + { + linkID=108; + item0=96; + item1=97; + class CustomData + { + type="Sync"; + }; + }; + class Item109 + { + linkID=109; + item0=62; + item1=94; + class CustomData + { + type="Sync"; + }; + }; + class Item110 + { + linkID=110; + item0=97; + item1=104; + class CustomData + { + type="Sync"; + }; + }; + class Item111 + { + linkID=111; + item0=86; + item1=87; + class CustomData + { + type="Sync"; + }; + }; + class Item112 + { + linkID=112; + item0=110; + item1=182; + class CustomData + { + type="Sync"; + }; + }; + class Item113 + { + linkID=113; + item0=72; + item1=94; + class CustomData + { + type="Sync"; + }; + }; + class Item114 + { + linkID=114; + item0=72; + item1=83; + class CustomData + { + type="Sync"; + }; + }; + class Item115 + { + linkID=115; + item0=185; + item1=87; + class CustomData + { + type="Sync"; + }; + }; + class Item116 + { + linkID=116; + item0=85; + item1=105; + class CustomData + { + type="Sync"; + }; + }; + class Item117 + { + linkID=117; + item0=77; + item1=186; + class CustomData + { + type="Sync"; + }; + }; + class Item118 + { + linkID=118; + item0=186; + item1=73; + class CustomData + { + type="Sync"; + }; + }; + class Item119 + { + linkID=119; + item0=190; + item1=105; + class CustomData + { + type="Sync"; + }; + }; + class Item120 + { + linkID=120; + item0=185; + item1=93; + class CustomData + { + type="Sync"; + }; + }; + class Item121 + { + linkID=121; + item0=79; + item1=191; + class CustomData + { + type="Sync"; + }; + }; + class Item122 + { + linkID=122; + item0=191; + item1=76; + class CustomData + { + type="Sync"; + }; + }; + class Item123 + { + linkID=123; + item0=191; + item1=181; + class CustomData + { + type="Sync"; + }; + }; + class Item124 + { + linkID=124; + item0=106; + item1=65; + class CustomData + { + type="Sync"; + }; + }; }; }; }; diff --git a/stringtable.xml b/stringtable.xml index b36c42d64..3f4357ad5 100644 --- a/stringtable.xml +++ b/stringtable.xml @@ -489,6 +489,10 @@ Players Игроки + + Both + обе + Zerty: GAMEPLAY: Darter Range limitation Дальность связи с маленькими БПЛА @@ -578,15 +582,23 @@ За сколько метров активируется город - Zerty: TOWNS : Resistance difficulty + Zerty: TOWNS: Resistance difficulty Уровень сопротивления в городах + + Yoshi_E: TOWNS: Heavy vehicles in towns + Тяжелая техника в городах + - Zerty: TOWNS : Resistance despawn Timer + Zerty: TOWNS: Resistance despawn Timer Дезактивация захваченного города + + Yoshi_E: SHOP: Heavy Vehicles/Equipment + Тяжелая техника / Оборудование + - Zerty: TOWNS : Shop price ratio + Zerty: TOWNS: Shop price ratio Во сколько раз покупки в городах дороже, чем на базе @@ -665,6 +677,10 @@ Zerty: Strategic: Town CAS if value above Разрешить поддержку с воздуха если стоимость города больше + + [H] Tom: Strategic: Patrol Ships near small islands + Патрульные корабли возле небольших островов + ===================== Electronic Warfare ======================= ===================== Electronic Warfare ======================= @@ -933,6 +949,10 @@ Slat Cage $1500 ламельная клетка $1500 + + Reset AI Crew + Сбросить AI Crew + Online Help Помощь @@ -1126,8 +1146,8 @@ Уволить Рабочего - Sell Structure - Продать Завод + Remove Structure + Удалить Завод Accept @@ -1561,6 +1581,14 @@ Add Worker ($%1) Добавить Рабочего ($%1) + + <t size='1.3' color='#2394ef'>Information</t><br /><br />You do not have enough funds. + <t size='1.3' color='#2394ef'>Информация</t><br /><br />У вас недостаточно средств. + + + <t size='1.3' color='#2394ef'>Information</t><br /><br />Worker limit reached! + <t size='1.3' color='#2394ef'>Информация</t><br /><br />Достигнуто максимальное количество сотрудников! + <t size='1.3' color='#2394ef'>Information</t><br /><br />You do not have enough funds to place that defense. <t size='1.3' color='#2394ef'>Информация</t><br /><br />У вас не хватает средств, чтобы построить это. @@ -1821,6 +1849,10 @@ Vote against Com. from Player %1 Игрок %1 проголосовал против Командира + + The vehicle has left the combat zone! + Машина покинула зону боевых действий! + @@ -2093,6 +2125,10 @@ <t color='#ff9900'>Remote Control</t> <t color='#ff9900'>Удаленное Управление</t> + + <t color='#ffff80'>Land</t> + <t color='#ffff80'>приземлиться</t> + @@ -2174,7 +2210,7 @@ - Barracks + Factory: Barracks Казармы @@ -2210,8 +2246,8 @@ Технологии AAF - Unlock AAF units (1::MRAPS and VANS, 2::APC, 3::TRACKED, 4::CHOPPERS, 5::PLANES, 6::ARTILLERY) - Разблокировать технику AAF (1::Легкая Техника и фургоны, 2::БТР 3::БМП, Танки 4::Вертолёты, 5::Самолёты, 6::АРТИЛЛЕРИЯ) + Unlock AAF units (1::MRAPS, VANS and BOAT, 2::APC, 3::TRACKED, 4::CHOPPERS, 5::PLANES, 6::ARTILLERY) + Разблокировать технику AAF (1::Легкая Техника, фургоны и лодка, 2::БТР 3::БМП, Танки 4::Вертолёты, 5::Самолёты, 6::АРТИЛЛЕРИЯ) Air: Aircraft FFAR @@ -2353,6 +2389,14 @@ + + Barracks + Казармы + + + Barracks + Казармы + Light Vehicle Factory Завод Легкой Техники