summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorhybrid <hybrid@hybridlabs.pro>2026-06-11 19:38:09 +0300
committerhybrid <hybrid@hybridlabs.pro>2026-06-11 19:38:09 +0300
commita3a91d4f45b22fd487ecbc954ad979be5d03efdd (patch)
treea554ab159a347dcd6c00ca1c7c26c1ec3ac0a6bd
downloada2wf_chernarus-main.tar.gz
a2wf_chernarus-main.tar.bz2
a2wf_chernarus-main.zip
Diffstat (limited to '')
-rw-r--r--.gitignore6
-rw-r--r--.hemtt/project.toml4
-rw-r--r--Client/Action/Action_Build.sqf1
-rw-r--r--Client/Action/Action_BuildRepair.sqf1
-rw-r--r--Client/Action/Action_EjectCargo.sqf23
-rw-r--r--Client/Action/Action_HALO.sqf9
-rw-r--r--Client/Action/Action_Menu.sqf1
-rw-r--r--Client/Action/Action_Push.sqf8
-rw-r--r--Client/Action/Action_RepairMHQ.sqf29
-rw-r--r--Client/Action/Action_TaxiReverse.sqf8
-rw-r--r--Client/Action/Action_ToggleLock.sqf7
-rw-r--r--Client/Action/Action_ToggleMHQLock.sqf9
-rw-r--r--Client/Client_EndGame.sqf67
-rw-r--r--Client/Client_Killed.sqf55
-rw-r--r--Client/FSM/conquest_helper.fsm148
-rw-r--r--Client/FSM/fasttimecli.fsm171
-rw-r--r--Client/FSM/overcast.fsm177
-rw-r--r--Client/FSM/resources_cli.fsm111
-rw-r--r--Client/FSM/updateactions.fsm138
-rw-r--r--Client/FSM/updateavailableactions.fsm268
-rw-r--r--Client/FSM/updatecapture.fsm262
-rw-r--r--Client/FSM/updateclient.fsm175
-rw-r--r--Client/FSM/updatesalvage.fsm165
-rw-r--r--Client/FSM/updatesupply.fsm213
-rw-r--r--Client/FSM/updateteamsmarkers.fsm125
-rw-r--r--Client/FSM/updatetownmarkers.fsm112
-rw-r--r--Client/Functions/Client_BuildUnit.sqf240
-rw-r--r--Client/Functions/Client_ChangePlayerFunds.sqf1
-rw-r--r--Client/Functions/Client_CommandChatMessage.sqf1
-rw-r--r--Client/Functions/Client_CommanderUpgrade.sqf34
-rw-r--r--Client/Functions/Client_DebugHint.sqf8
-rw-r--r--Client/Functions/Client_DisplayInventory.sqf98
-rw-r--r--Client/Functions/Client_EquipDefaultLoadout.sqf17
-rw-r--r--Client/Functions/Client_FX.sqf50
-rw-r--r--Client/Functions/Client_GetIncome.sqf33
-rw-r--r--Client/Functions/Client_GetMarkerColoration.sqf1
-rw-r--r--Client/Functions/Client_GetPlayerFunds.sqf1
-rw-r--r--Client/Functions/Client_GetRespawnAvailable.sqf58
-rw-r--r--Client/Functions/Client_GetStructureMarkerLabel.sqf16
-rw-r--r--Client/Functions/Client_GetTime.sqf1
-rw-r--r--Client/Functions/Client_GroupChatMessage.sqf1
-rw-r--r--Client/Functions/Client_HandleHQAction.sqf12
-rw-r--r--Client/Functions/Client_HandleOnMap.sqf17
-rw-r--r--Client/Functions/Client_HandlePVF.sqf30
-rw-r--r--Client/Functions/Client_InitTownsAndCamps.sqf40
-rw-r--r--Client/Functions/Client_IsOnMap.sqf17
-rw-r--r--Client/Functions/Client_MarkerAnim.sqf45
-rw-r--r--Client/Functions/Client_OnRespawnHandler.sqf78
-rw-r--r--Client/Functions/Client_PreRespawnHandler.sqf15
-rw-r--r--Client/Functions/Client_ReplaceArray.sqf12
-rw-r--r--Client/Functions/Client_ReplaceInventoryAmmo.sqf65
-rw-r--r--Client/Functions/Client_RequestFireMission.sqf25
-rw-r--r--Client/Functions/Client_RespawnBag.sqf33
-rw-r--r--Client/Functions/Client_ReturnArraySortAsc.sqf30
-rw-r--r--Client/Functions/Client_SetControlFadeAnim.sqf28
-rw-r--r--Client/Functions/Client_SetControlFadeAnimStop.sqf9
-rw-r--r--Client/Functions/Client_SetGroupsID.sqf13
-rw-r--r--Client/Functions/Client_SupportHeal.sqf99
-rw-r--r--Client/Functions/Client_SupportRearm.sqf78
-rw-r--r--Client/Functions/Client_SupportRefuel.sqf78
-rw-r--r--Client/Functions/Client_SupportRepair.sqf78
-rw-r--r--Client/Functions/Client_TaskSystem.sqf69
-rw-r--r--Client/Functions/Client_TitleTextMessage.sqf7
-rw-r--r--Client/Functions/Client_UIAddItem.sqf11
-rw-r--r--Client/Functions/Client_UIAddMagazine.sqf35
-rw-r--r--Client/Functions/Client_UIChangeComboBuyUnits.sqf15
-rw-r--r--Client/Functions/Client_UIFillListBuyUnits.sqf35
-rw-r--r--Client/Functions/Client_UIFillListTeamOrders.sqf42
-rw-r--r--Client/Functions/Client_UIFindLBValue.sqf12
-rw-r--r--Client/Functions/Client_UIGearFillList.sqf40
-rw-r--r--Client/Functions/Client_UIGearFillTemplateList.sqf31
-rw-r--r--Client/GUI/GUI_ArtilleryMenu.sqf649
-rw-r--r--Client/GUI/GUI_BuyUnits.sqf453
-rw-r--r--Client/GUI/GUI_ClearCurrentCutDisplay.sqf1
-rw-r--r--Client/GUI/GUI_CommandMenu.sqf53
-rw-r--r--Client/GUI/GUI_CommanderMenu.sqf159
-rw-r--r--Client/GUI/GUI_Display_Parameters.sqf30
-rw-r--r--Client/GUI/GUI_EASA.sqf50
-rw-r--r--Client/GUI/GUI_EndOfGameStats.sqf184
-rw-r--r--Client/GUI/GUI_GearAce.sqf1415
-rw-r--r--Client/GUI/GUI_GearBeta.sqf1057
-rw-r--r--Client/GUI/GUI_GearV.sqf774
-rw-r--r--Client/GUI/GUI_Menu.sqf161
-rw-r--r--Client/GUI/GUI_Menu_BuyUnits.sqf466
-rw-r--r--Client/GUI/GUI_Menu_Command.sqf532
-rw-r--r--Client/GUI/GUI_Menu_EASA.sqf48
-rw-r--r--Client/GUI/GUI_Menu_Economy.sqf239
-rw-r--r--Client/GUI/GUI_Menu_Respawn.sqf161
-rw-r--r--Client/GUI/GUI_Menu_Service.sqf254
-rw-r--r--Client/GUI/GUI_Menu_Tactical.sqf659
-rw-r--r--Client/GUI/GUI_Menu_Team.sqf145
-rw-r--r--Client/GUI/GUI_Menu_UnitCamera.sqf89
-rw-r--r--Client/GUI/GUI_Menu_Upgrade.sqf223
-rw-r--r--Client/GUI/GUI_Menu_Voting.sqf75
-rw-r--r--Client/GUI/GUI_MissionTasks.sqf65
-rw-r--r--Client/GUI/GUI_Parameters.sqf23
-rw-r--r--Client/GUI/GUI_Respawn.sqf156
-rw-r--r--Client/GUI/GUI_SetCurrentCutDisplay.sqf1
-rw-r--r--Client/GUI/GUI_SupportMenu.sqf271
-rw-r--r--Client/GUI/GUI_TeamMenu.sqf174
-rw-r--r--Client/GUI/GUI_TeamOrders.sqf571
-rw-r--r--Client/GUI/GUI_UnitsCamera.sqf91
-rw-r--r--Client/GUI/GUI_UpdateCommanderVoteMenu.sqf74
-rw-r--r--Client/GUI/GUI_Upgrade.sqf198
-rw-r--r--Client/Images/con_depot.paabin0 -> 5655 bytes
-rw-r--r--Client/Images/con_task.paabin0 -> 5655 bytes
-rw-r--r--Client/Images/geariconall.paabin0 -> 5625 bytes
-rw-r--r--Client/Images/geariconmisc.paabin0 -> 5625 bytes
-rw-r--r--Client/Images/geariconprimary.paabin0 -> 5625 bytes
-rw-r--r--Client/Images/geariconsecondary.paabin0 -> 5625 bytes
-rw-r--r--Client/Images/geariconsidearm.paabin0 -> 5625 bytes
-rw-r--r--Client/Images/gearicontemplate.paabin0 -> 5625 bytes
-rw-r--r--Client/Images/i_backpack.paabin0 -> 1552 bytes
-rw-r--r--Client/Images/i_clear.paabin0 -> 1552 bytes
-rw-r--r--Client/Images/i_commander.paabin0 -> 5625 bytes
-rw-r--r--Client/Images/i_driver.paabin0 -> 5625 bytes
-rw-r--r--Client/Images/i_extra.paabin0 -> 5625 bytes
-rw-r--r--Client/Images/i_gunner.paabin0 -> 5625 bytes
-rw-r--r--Client/Images/i_lock.paabin0 -> 5625 bytes
-rw-r--r--Client/Images/i_reload.paabin0 -> 1552 bytes
-rw-r--r--Client/Images/icon_wf_building_aa_radar.paabin0 -> 5625 bytes
-rw-r--r--Client/Images/icon_wf_building_air.paabin0 -> 5625 bytes
-rw-r--r--Client/Images/icon_wf_building_am_radar.paabin0 -> 5625 bytes
-rw-r--r--Client/Images/icon_wf_building_barracks.paabin0 -> 5625 bytes
-rw-r--r--Client/Images/icon_wf_building_cc.paabin0 -> 5625 bytes
-rw-r--r--Client/Images/icon_wf_building_cc_ca.paabin0 -> 5655 bytes
-rw-r--r--Client/Images/icon_wf_building_firstaid.paabin0 -> 5625 bytes
-rw-r--r--Client/Images/icon_wf_building_gear.paabin0 -> 5625 bytes
-rw-r--r--Client/Images/icon_wf_building_hangar.paabin0 -> 5625 bytes
-rw-r--r--Client/Images/icon_wf_building_hvs.paabin0 -> 5625 bytes
-rw-r--r--Client/Images/icon_wf_building_lvs.paabin0 -> 5625 bytes
-rw-r--r--Client/Images/icon_wf_building_mhq.paabin0 -> 5625 bytes
-rw-r--r--Client/Images/icon_wf_building_repair.paabin0 -> 5625 bytes
-rw-r--r--Client/Images/icon_wf_support_artilery.paabin0 -> 5625 bytes
-rw-r--r--Client/Images/icon_wf_support_cas.paabin0 -> 5625 bytes
-rw-r--r--Client/Images/icon_wf_support_fasttravel.paabin0 -> 5625 bytes
-rw-r--r--Client/Images/icon_wf_support_mortar.paabin0 -> 5625 bytes
-rw-r--r--Client/Images/icon_wf_support_supplydrop.paabin0 -> 5625 bytes
-rw-r--r--Client/Images/icon_wf_support_transport.paabin0 -> 5625 bytes
-rw-r--r--Client/Images/icon_wf_support_uav.paabin0 -> 5625 bytes
-rw-r--r--Client/Images/picturepapercar_ca.paabin0 -> 11081 bytes
-rw-r--r--Client/Images/tog_arty.paabin0 -> 5655 bytes
-rw-r--r--Client/Images/ui_button_main_down.paabin0 -> 11918 bytes
-rw-r--r--Client/Images/ui_button_main_focus.paabin0 -> 6755 bytes
-rw-r--r--Client/Images/ui_button_main_normal.paabin0 -> 6130 bytes
-rw-r--r--Client/Images/ui_button_main_over.paabin0 -> 8951 bytes
-rw-r--r--Client/Images/wf_air.paabin0 -> 2911 bytes
-rw-r--r--Client/Images/wf_amm.paabin0 -> 2911 bytes
-rw-r--r--Client/Images/wf_art.paabin0 -> 2911 bytes
-rw-r--r--Client/Images/wf_b.paabin0 -> 2911 bytes
-rw-r--r--Client/Images/wf_eas.paabin0 -> 2911 bytes
-rw-r--r--Client/Images/wf_fas.paabin0 -> 2911 bytes
-rw-r--r--Client/Images/wf_fia.paabin0 -> 2911 bytes
-rw-r--r--Client/Images/wf_fla.paabin0 -> 2911 bytes
-rw-r--r--Client/Images/wf_gea.PAAbin0 -> 2911 bytes
-rw-r--r--Client/Images/wf_hvf.paabin0 -> 2911 bytes
-rw-r--r--Client/Images/wf_lif.paabin0 -> 2911 bytes
-rw-r--r--Client/Images/wf_lvf.paabin0 -> 2911 bytes
-rw-r--r--Client/Images/wf_mib.paabin0 -> 2911 bytes
-rw-r--r--Client/Images/wf_par.paabin0 -> 2911 bytes
-rw-r--r--Client/Images/wf_pas.paabin0 -> 2911 bytes
-rw-r--r--Client/Images/wf_shl.paabin0 -> 2911 bytes
-rw-r--r--Client/Images/wf_sup.paabin0 -> 2911 bytes
-rw-r--r--Client/Images/wf_uav.paabin0 -> 2911 bytes
-rw-r--r--Client/Init/Init_BaseStructure.sqf34
-rw-r--r--Client/Init/Init_Blacklist.sqf15
-rw-r--r--Client/Init/Init_Client.sqf376
-rw-r--r--Client/Init/Init_Coin.sqf91
-rw-r--r--Client/Init/Init_Faction.sqf19
-rw-r--r--Client/Init/Init_Keybind.sqf26
-rw-r--r--Client/Module/Arty/ARTY_HandleILLUM.sqf26
-rw-r--r--Client/Module/Arty/ARTY_HandleSADARM.sqf108
-rw-r--r--Client/Module/Arty/ARTY_mobileMissionFinish.sqf12
-rw-r--r--Client/Module/Arty/ARTY_mobileMissionPrep.sqf10
-rw-r--r--Client/Module/CM/CM_Countermeasures.sqf22
-rw-r--r--Client/Module/CM/CM_Flares.sqf46
-rw-r--r--Client/Module/CM/CM_Init.sqf9
-rw-r--r--Client/Module/CM/CM_Spoofing.sqf18
-rw-r--r--Client/Module/CoIn/coin_interface.sqf950
-rw-r--r--Client/Module/EASA/EASA_Equip.sqf45
-rw-r--r--Client/Module/EASA/EASA_Init.sqf378
-rw-r--r--Client/Module/EASA/EASA_RemoveLoadout.sqf13
-rw-r--r--Client/Module/ISIS/ISIS_Action.sqf1
-rw-r--r--Client/Module/ISIS/ISIS_Clientfx.sqf63
-rw-r--r--Client/Module/ISIS/ISIS_Heal.sqf76
-rw-r--r--Client/Module/ISIS/ISIS_Wound.sqf62
-rw-r--r--Client/Module/ISIS/ISIS_Wounded.sqf51
-rw-r--r--Client/Module/Nuke/damage.sqf30
-rw-r--r--Client/Module/Nuke/nuke.sqf146
-rw-r--r--Client/Module/Nuke/nukeincoming.sqf59
-rw-r--r--Client/Module/Nuke/radzone.sqf20
-rw-r--r--Client/Module/Skill/Actions/Officer_Undeploy_MASH.sqf22
-rw-r--r--Client/Module/Skill/Skill_Apply.sqf66
-rw-r--r--Client/Module/Skill/Skill_Engineer.sqf32
-rw-r--r--Client/Module/Skill/Skill_Init.sqf41
-rw-r--r--Client/Module/Skill/Skill_Officer.sqf32
-rw-r--r--Client/Module/Skill/Skill_Sniper.sqf31
-rw-r--r--Client/Module/Skill/Skill_SpecOps.sqf52
-rw-r--r--Client/Module/UAV/uav.sqf136
-rw-r--r--Client/Module/UAV/uav_interface.sqf304
-rw-r--r--Client/Module/UAV/uav_interface_oa.sqf162
-rw-r--r--Client/Module/UAV/uav_spotter.sqf28
-rw-r--r--Client/Module/ZetaCargo/Zeta_Hook.sqf40
-rw-r--r--Client/Module/ZetaCargo/Zeta_Init.sqf12
-rw-r--r--Client/Module/ZetaCargo/Zeta_Unhook.sqf21
-rw-r--r--Client/PVFunctions/AllCampsCaptured.sqf20
-rw-r--r--Client/PVFunctions/AwardBounty.sqf19
-rw-r--r--Client/PVFunctions/CampCaptured.sqf42
-rw-r--r--Client/PVFunctions/CanJoin.sqf7
-rw-r--r--Client/PVFunctions/ChangeScore.sqf8
-rw-r--r--Client/PVFunctions/CommanderVote.sqf11
-rw-r--r--Client/PVFunctions/DisplayICBM.sqf6
-rw-r--r--Client/PVFunctions/EndGame.sqf9
-rw-r--r--Client/PVFunctions/ISIS_AddAction.sqf5
-rw-r--r--Client/PVFunctions/LocalizeMessage.sqf23
-rw-r--r--Client/PVFunctions/M_BASE_Attack.sqf85
-rw-r--r--Client/PVFunctions/M_PLAYERS_Attack_Air.sqf28
-rw-r--r--Client/PVFunctions/M_TOWN_Attack.sqf84
-rw-r--r--Client/PVFunctions/M_UAV_RetrieveModule.sqf65
-rw-r--r--Client/PVFunctions/Penalty.sqf9
-rw-r--r--Client/PVFunctions/PerformAction.sqf10
-rw-r--r--Client/PVFunctions/SetHQStatus.sqf5
-rw-r--r--Client/PVFunctions/SetTask.sqf36
-rw-r--r--Client/PVFunctions/SetVehicleLock.sqf1
-rw-r--r--Client/PVFunctions/TownCaptured.sqf98
-rw-r--r--Client/PVFunctions/TownCapturedPublic.sqf96
-rw-r--r--Client/PVFunctions/UAV_Reveal.sqf27
-rw-r--r--Client/PVFunctions/VoteForCommander.sqf9
-rw-r--r--Client/kb/hq.bikb190
-rw-r--r--Client/kb/hq.fsm110
-rw-r--r--Client/kb/hq.sqf1
-rw-r--r--Common/Common_AARadarMarkerUpdate.sqf35
-rw-r--r--Common/Common_DisableAC.sqf1
-rw-r--r--Common/Common_InitArtillery.sqf7
-rw-r--r--Common/Common_InitUnit.sqf50
-rw-r--r--Common/Common_MarkerUpdate.sqf41
-rw-r--r--Common/Config/Config_AircraftFactory.sqf32
-rw-r--r--Common/Config/Config_Airport.sqf36
-rw-r--r--Common/Config/Config_Allies.sqf37
-rw-r--r--Common/Config/Config_Artillery.sqf7
-rw-r--r--Common/Config/Config_Barracks.sqf47
-rw-r--r--Common/Config/Config_Depot.sqf30
-rw-r--r--Common/Config/Config_HeavyFactory.sqf32
-rw-r--r--Common/Config/Config_LightFactory.sqf32
-rw-r--r--Common/Config/Config_Loadouts.sqf15
-rw-r--r--Common/Config/Config_Occupation.sqf9
-rw-r--r--Common/Config/Config_Resistance.sqf7
-rw-r--r--Common/Config/Config_Special.sqf7
-rw-r--r--Common/Config/Config_Squads.sqf19
-rw-r--r--Common/Config/Config_Structures.sqf78
-rw-r--r--Common/Config/Core/Core_ACE_US_D.sqf67
-rw-r--r--Common/Config/Core/Core_ACE_US_W.sqf136
-rw-r--r--Common/Config/Core/Core_ACR.sqf97
-rw-r--r--Common/Config/Core/Core_BAF.sqf135
-rw-r--r--Common/Config/Core/Core_BAFD.sqf124
-rw-r--r--Common/Config/Core/Core_BAFW.sqf152
-rw-r--r--Common/Config/Core/Core_CDF.sqf180
-rw-r--r--Common/Config/Core/Core_CIV.sqf175
-rw-r--r--Common/Config/Core/Core_DeltaForce.sqf65
-rw-r--r--Common/Config/Core/Core_FR.sqf81
-rw-r--r--Common/Config/Core/Core_GUE.sqf137
-rw-r--r--Common/Config/Core/Core_INS.sqf201
-rw-r--r--Common/Config/Core/Core_KSK.sqf47
-rw-r--r--Common/Config/Core/Core_MVD.sqf50
-rw-r--r--Common/Config/Core/Core_PMC.sqf103
-rw-r--r--Common/Config/Core/Core_RU.sqf278
-rw-r--r--Common/Config/Core/Core_Spetsnaz.sqf50
-rw-r--r--Common/Config/Core/Core_TK.sqf249
-rw-r--r--Common/Config/Core/Core_TKA.sqf265
-rw-r--r--Common/Config/Core/Core_TKCIV.sqf133
-rw-r--r--Common/Config/Core/Core_TKGUE.sqf128
-rw-r--r--Common/Config/Core/Core_TKSF.sqf41
-rw-r--r--Common/Config/Core/Core_US.sqf305
-rw-r--r--Common/Config/Core/Core_USMC.sqf254
-rw-r--r--Common/Config/Core_Artillery/Arrowhead/Artillery_TKA.sqf43
-rw-r--r--Common/Config/Core_Artillery/Arrowhead/Artillery_US.sqf47
-rw-r--r--Common/Config/Core_Artillery/CombinedOps/Artillery_RU.sqf43
-rw-r--r--Common/Config/Core_Artillery/CombinedOps/Artillery_US.sqf47
-rw-r--r--Common/Config/Core_Artillery/Vanilla/Artillery_CDF.sqf43
-rw-r--r--Common/Config/Core_Artillery/Vanilla/Artillery_INS.sqf43
-rw-r--r--Common/Config/Core_Artillery/Vanilla/Artillery_RU.sqf43
-rw-r--r--Common/Config/Core_Artillery/Vanilla/Artillery_USMC.sqf59
-rw-r--r--Common/Config/Core_Definition/Arrowhead/Definition_US_TKA.sqf27
-rw-r--r--Common/Config/Core_Definition/CombinedOps/Definition_US_INS.sqf32
-rw-r--r--Common/Config/Core_Definition/CombinedOps/Definition_US_RU.sqf32
-rw-r--r--Common/Config/Core_Definition/Vanilla/Definition_CDF_INS.sqf27
-rw-r--r--Common/Config/Core_Definition/Vanilla/Definition_CDF_RU.sqf27
-rw-r--r--Common/Config/Core_Definition/Vanilla/Definition_USMC_INS.sqf27
-rw-r--r--Common/Config/Core_Definition/Vanilla/Definition_USMC_RU.sqf27
-rw-r--r--Common/Config/Core_Gear/Core_ACE_G.sqf407
-rw-r--r--Common/Config/Core_Gear/Core_Arrowhead_G.sqf801
-rw-r--r--Common/Config/Core_Gear/Core_BAF_G.sqf155
-rw-r--r--Common/Config/Core_Gear/Core_PMC_G.sqf107
-rw-r--r--Common/Config/Core_Gear/Core_Vanilla_G.sqf811
-rw-r--r--Common/Config/Core_Loadout/Arrowhead/Loadout_TK.sqf355
-rw-r--r--Common/Config/Core_Loadout/Arrowhead/Loadout_TKA.sqf355
-rw-r--r--Common/Config/Core_Loadout/Arrowhead/Loadout_US.sqf450
-rw-r--r--Common/Config/Core_Loadout/CombinedOps/Loadout_RU.sqf483
-rw-r--r--Common/Config/Core_Loadout/CombinedOps/Loadout_US.sqf574
-rw-r--r--Common/Config/Core_Loadout/Vanilla/Loadout_CDF.sqf306
-rw-r--r--Common/Config/Core_Loadout/Vanilla/Loadout_INS.sqf306
-rw-r--r--Common/Config/Core_Loadout/Vanilla/Loadout_RU.sqf320
-rw-r--r--Common/Config/Core_Loadout/Vanilla/Loadout_USMC.sqf331
-rw-r--r--Common/Config/Core_Occupation/Occupation_CDF.sqf188
-rw-r--r--Common/Config/Core_Occupation/Occupation_INS.sqf188
-rw-r--r--Common/Config/Core_Occupation/Occupation_RU.sqf177
-rw-r--r--Common/Config/Core_Occupation/Occupation_TKA.sqf176
-rw-r--r--Common/Config/Core_Occupation/Occupation_US.sqf172
-rw-r--r--Common/Config/Core_Occupation/Occupation_USMC.sqf173
-rw-r--r--Common/Config/Core_Resistance/Resistance_GUE.sqf100
-rw-r--r--Common/Config/Core_Resistance/Resistance_PMC.sqf127
-rw-r--r--Common/Config/Core_Resistance/Resistance_TKGUE.sqf110
-rw-r--r--Common/Config/Core_Squads/Arrowhead/Squad_TK.sqf285
-rw-r--r--Common/Config/Core_Squads/Arrowhead/Squad_TKA.sqf45
-rw-r--r--Common/Config/Core_Squads/Arrowhead/Squad_US.sqf45
-rw-r--r--Common/Config/Core_Squads/CombinedOps/Squad_US_Camo.sqf51
-rw-r--r--Common/Config/Core_Squads/Squads_GetFactionGroups.sqf78
-rw-r--r--Common/Config/Core_Squads/Vanilla/Squad_CDF.sqf45
-rw-r--r--Common/Config/Core_Squads/Vanilla/Squad_INS.sqf45
-rw-r--r--Common/Config/Core_Squads/Vanilla/Squad_RU.sqf70
-rw-r--r--Common/Config/Core_Squads/Vanilla/Squad_USMC.sqf51
-rw-r--r--Common/Config/Core_Structures/Arrowhead/Structures_TKA.sqf162
-rw-r--r--Common/Config/Core_Structures/Arrowhead/Structures_US.sqf166
-rw-r--r--Common/Config/Core_Structures/CombinedOps/Structures_CDF.sqf161
-rw-r--r--Common/Config/Core_Structures/CombinedOps/Structures_INS.sqf162
-rw-r--r--Common/Config/Core_Structures/CombinedOps/Structures_TKA.sqf163
-rw-r--r--Common/Config/Core_Structures/CombinedOps/Structures_US.sqf167
-rw-r--r--Common/Config/Core_Structures/Vanilla/Structures_CDF.sqf162
-rw-r--r--Common/Config/Core_Structures/Vanilla/Structures_INS.sqf163
-rw-r--r--Common/Config/Core_Structures/Vanilla/Structures_RU.sqf165
-rw-r--r--Common/Config/Core_Structures/Vanilla/Structures_USMC.sqf162
-rw-r--r--Common/Config/Core_Units/Arrowhead/Units_Aircraft_TK.sqf20
-rw-r--r--Common/Config/Core_Units/Arrowhead/Units_Aircraft_TKA.sqf17
-rw-r--r--Common/Config/Core_Units/Arrowhead/Units_Aircraft_US.sqf27
-rw-r--r--Common/Config/Core_Units/Arrowhead/Units_Airport_TK.sqf13
-rw-r--r--Common/Config/Core_Units/Arrowhead/Units_Airport_TKA.sqf13
-rw-r--r--Common/Config/Core_Units/Arrowhead/Units_Airport_US.sqf12
-rw-r--r--Common/Config/Core_Units/Arrowhead/Units_Barracks_TK.sqf33
-rw-r--r--Common/Config/Core_Units/Arrowhead/Units_Barracks_TKA.sqf34
-rw-r--r--Common/Config/Core_Units/Arrowhead/Units_Barracks_TKGUE.sqf20
-rw-r--r--Common/Config/Core_Units/Arrowhead/Units_Barracks_US.sqf132
-rw-r--r--Common/Config/Core_Units/Arrowhead/Units_Depot_TK.sqf15
-rw-r--r--Common/Config/Core_Units/Arrowhead/Units_Depot_TKA.sqf15
-rw-r--r--Common/Config/Core_Units/Arrowhead/Units_Depot_US.sqf15
-rw-r--r--Common/Config/Core_Units/Arrowhead/Units_Heavy_TK.sqf14
-rw-r--r--Common/Config/Core_Units/Arrowhead/Units_Heavy_TKA.sqf11
-rw-r--r--Common/Config/Core_Units/Arrowhead/Units_Heavy_TKGUE.sqf7
-rw-r--r--Common/Config/Core_Units/Arrowhead/Units_Heavy_US.sqf21
-rw-r--r--Common/Config/Core_Units/Arrowhead/Units_Light_TK.sqf29
-rw-r--r--Common/Config/Core_Units/Arrowhead/Units_Light_TKA.sqf25
-rw-r--r--Common/Config/Core_Units/Arrowhead/Units_Light_TKGUE.sqf13
-rw-r--r--Common/Config/Core_Units/Arrowhead/Units_Light_US.sqf34
-rw-r--r--Common/Config/Core_Units/Arrowhead/Units_Special_TKA.sqf70
-rw-r--r--Common/Config/Core_Units/Arrowhead/Units_Special_US.sqf70
-rw-r--r--Common/Config/Core_Units/CombinedOps/Units_Aircraft_RU.sqf28
-rw-r--r--Common/Config/Core_Units/CombinedOps/Units_Aircraft_US.sqf38
-rw-r--r--Common/Config/Core_Units/CombinedOps/Units_Airport_RU.sqf16
-rw-r--r--Common/Config/Core_Units/CombinedOps/Units_Airport_US.sqf16
-rw-r--r--Common/Config/Core_Units/CombinedOps/Units_Barracks_GUE.sqf42
-rw-r--r--Common/Config/Core_Units/CombinedOps/Units_Barracks_RU.sqf65
-rw-r--r--Common/Config/Core_Units/CombinedOps/Units_Barracks_US.sqf163
-rw-r--r--Common/Config/Core_Units/CombinedOps/Units_Depot_RU.sqf21
-rw-r--r--Common/Config/Core_Units/CombinedOps/Units_Depot_US.sqf22
-rw-r--r--Common/Config/Core_Units/CombinedOps/Units_Heavy_GUE.sqf9
-rw-r--r--Common/Config/Core_Units/CombinedOps/Units_Heavy_RU.sqf25
-rw-r--r--Common/Config/Core_Units/CombinedOps/Units_Heavy_US.sqf52
-rw-r--r--Common/Config/Core_Units/CombinedOps/Units_Light_GUE.sqf20
-rw-r--r--Common/Config/Core_Units/CombinedOps/Units_Light_RU.sqf50
-rw-r--r--Common/Config/Core_Units/CombinedOps/Units_Light_US.sqf75
-rw-r--r--Common/Config/Core_Units/CombinedOps/Units_Special_RU.sqf70
-rw-r--r--Common/Config/Core_Units/CombinedOps/Units_Special_US.sqf74
-rw-r--r--Common/Config/Core_Units/Vanilla/Units_Aircraft_CDF.sqf15
-rw-r--r--Common/Config/Core_Units/Vanilla/Units_Aircraft_INS.sqf15
-rw-r--r--Common/Config/Core_Units/Vanilla/Units_Aircraft_RU.sqf23
-rw-r--r--Common/Config/Core_Units/Vanilla/Units_Aircraft_USMC.sqf21
-rw-r--r--Common/Config/Core_Units/Vanilla/Units_Airport_CDF.sqf11
-rw-r--r--Common/Config/Core_Units/Vanilla/Units_Airport_INS.sqf11
-rw-r--r--Common/Config/Core_Units/Vanilla/Units_Airport_RU.sqf13
-rw-r--r--Common/Config/Core_Units/Vanilla/Units_Airport_USMC.sqf16
-rw-r--r--Common/Config/Core_Units/Vanilla/Units_Barracks_CDF.sqf23
-rw-r--r--Common/Config/Core_Units/Vanilla/Units_Barracks_GUE.sqf26
-rw-r--r--Common/Config/Core_Units/Vanilla/Units_Barracks_INS.sqf20
-rw-r--r--Common/Config/Core_Units/Vanilla/Units_Barracks_RU.sqf35
-rw-r--r--Common/Config/Core_Units/Vanilla/Units_Barracks_USMC.sqf35
-rw-r--r--Common/Config/Core_Units/Vanilla/Units_Depot_CDF.sqf15
-rw-r--r--Common/Config/Core_Units/Vanilla/Units_Depot_INS.sqf15
-rw-r--r--Common/Config/Core_Units/Vanilla/Units_Depot_RU.sqf18
-rw-r--r--Common/Config/Core_Units/Vanilla/Units_Depot_USMC.sqf19
-rw-r--r--Common/Config/Core_Units/Vanilla/Units_Heavy_CDF.sqf9
-rw-r--r--Common/Config/Core_Units/Vanilla/Units_Heavy_GUE.sqf7
-rw-r--r--Common/Config/Core_Units/Vanilla/Units_Heavy_INS.sqf9
-rw-r--r--Common/Config/Core_Units/Vanilla/Units_Heavy_RU.sqf11
-rw-r--r--Common/Config/Core_Units/Vanilla/Units_Heavy_USMC.sqf9
-rw-r--r--Common/Config/Core_Units/Vanilla/Units_Light_CDF.sqf18
-rw-r--r--Common/Config/Core_Units/Vanilla/Units_Light_GUE.sqf12
-rw-r--r--Common/Config/Core_Units/Vanilla/Units_Light_INS.sqf19
-rw-r--r--Common/Config/Core_Units/Vanilla/Units_Light_RU.sqf26
-rw-r--r--Common/Config/Core_Units/Vanilla/Units_Light_USMC.sqf24
-rw-r--r--Common/Config/Core_Units/Vanilla/Units_Special_CDF.sqf70
-rw-r--r--Common/Config/Core_Units/Vanilla/Units_Special_INS.sqf70
-rw-r--r--Common/Config/Core_Units/Vanilla/Units_Special_RU.sqf70
-rw-r--r--Common/Config/Core_Units/Vanilla/Units_Special_USMC.sqf70
-rw-r--r--Common/Config/readme.txt38
-rw-r--r--Common/Functions/Common_BackpackHasSpace.sqf16
-rw-r--r--Common/Functions/Common_BalanceInit.sqf48
-rw-r--r--Common/Functions/Common_BuildingInRange.sqf17
-rw-r--r--Common/Functions/Common_ChangeClientFunds.sqf7
-rw-r--r--Common/Functions/Common_ChangeSideSupply.sqf11
-rw-r--r--Common/Functions/Common_ChangeTeamFunds.sqf8
-rw-r--r--Common/Functions/Common_CivilianKilled.sqf29
-rw-r--r--Common/Functions/Common_CreateUnit.sqf28
-rw-r--r--Common/Functions/Common_CreateVehicle.sqf20
-rw-r--r--Common/Functions/Common_EquipArtillery.sqf19
-rw-r--r--Common/Functions/Common_EquipBackpack.sqf9
-rw-r--r--Common/Functions/Common_EquipLoadout.sqf26
-rw-r--r--Common/Functions/Common_FireArtillery.sqf65
-rw-r--r--Common/Functions/Common_GetAIDigit.sqf21
-rw-r--r--Common/Functions/Common_GetClientID.sqf6
-rw-r--r--Common/Functions/Common_GetClientIDFromTeam.sqf11
-rw-r--r--Common/Functions/Common_GetClientTeam.sqf7
-rw-r--r--Common/Functions/Common_GetClosestLocation.sqf5
-rw-r--r--Common/Functions/Common_GetClosestLocationBySide.sqf21
-rw-r--r--Common/Functions/Common_GetCommanderFromVotes.sqf36
-rw-r--r--Common/Functions/Common_GetCommanderTeam.sqf7
-rw-r--r--Common/Functions/Common_GetCommanderVotes.sqf19
-rw-r--r--Common/Functions/Common_GetConfigInfo.sqf8
-rw-r--r--Common/Functions/Common_GetConfigVehicleCrewSlot.sqf21
-rw-r--r--Common/Functions/Common_GetConfigVehicleTurrets.sqf16
-rw-r--r--Common/Functions/Common_GetConfigVehicleTurretsReturn.sqf54
-rw-r--r--Common/Functions/Common_GetFactories.sqf10
-rw-r--r--Common/Functions/Common_GetFriendlyCamps.sqf14
-rw-r--r--Common/Functions/Common_GetGroupFromConfig.sqf23
-rw-r--r--Common/Functions/Common_GetHostilesInArea.sqf18
-rw-r--r--Common/Functions/Common_GetLiveUnits.sqf8
-rw-r--r--Common/Functions/Common_GetNameSpace.sqf5
-rw-r--r--Common/Functions/Common_GetPositionFrom.sqf11
-rw-r--r--Common/Functions/Common_GetRandomPosition.sqf12
-rw-r--r--Common/Functions/Common_GetRespawnCamps.sqf14
-rw-r--r--Common/Functions/Common_GetSafePlace.sqf27
-rw-r--r--Common/Functions/Common_GetSideFromID.sqf7
-rw-r--r--Common/Functions/Common_GetSideHQ.sqf1
-rw-r--r--Common/Functions/Common_GetSideHQDeployed.sqf1
-rw-r--r--Common/Functions/Common_GetSideID.sqf7
-rw-r--r--Common/Functions/Common_GetSideStructures.sqf1
-rw-r--r--Common/Functions/Common_GetSideSupply.sqf1
-rw-r--r--Common/Functions/Common_GetSideTowns.sqf10
-rw-r--r--Common/Functions/Common_GetSideUpgrades.sqf1
-rw-r--r--Common/Functions/Common_GetSleepFPS.sqf11
-rw-r--r--Common/Functions/Common_GetTeamArtillery.sqf32
-rw-r--r--Common/Functions/Common_GetTeamAutonomous.sqf3
-rw-r--r--Common/Functions/Common_GetTeamFunds.sqf7
-rw-r--r--Common/Functions/Common_GetTeamMoveMode.sqf3
-rw-r--r--Common/Functions/Common_GetTeamMovePos.sqf3
-rw-r--r--Common/Functions/Common_GetTeamRespawn.sqf3
-rw-r--r--Common/Functions/Common_GetTeamType.sqf3
-rw-r--r--Common/Functions/Common_GetTeamVehicles.sqf30
-rw-r--r--Common/Functions/Common_GetTotalCamps.sqf7
-rw-r--r--Common/Functions/Common_GetTotalCampsOnSide.sqf15
-rw-r--r--Common/Functions/Common_GetTotalSupplyValue.sqf13
-rw-r--r--Common/Functions/Common_GetTownsHeld.sqf8
-rw-r--r--Common/Functions/Common_GetTownsIncome.sqf18
-rw-r--r--Common/Functions/Common_GetTurretsMags.sqf42
-rw-r--r--Common/Functions/Common_GetUnitVehicle.sqf6
-rw-r--r--Common/Functions/Common_GetUnitsBelowHeight.sqf11
-rw-r--r--Common/Functions/Common_GetVehicleMags.sqf4
-rw-r--r--Common/Functions/Common_HandleArtillery.sqf104
-rw-r--r--Common/Functions/Common_HandleIncomingMissile.sqf22
-rw-r--r--Common/Functions/Common_IsArtillery.sqf12
-rw-r--r--Common/Functions/Common_PlaceNear.sqf34
-rw-r--r--Common/Functions/Common_PlaceSafe.sqf28
-rw-r--r--Common/Functions/Common_RearmVehicle.sqf39
-rw-r--r--Common/Functions/Common_RearmVehicleOA.sqf51
-rw-r--r--Common/Functions/Common_RevealArea.sqf11
-rw-r--r--Common/Functions/Common_SetCommanderVotes.sqf14
-rw-r--r--Common/Functions/Common_SetNamespace.sqf15
-rw-r--r--Common/Functions/Common_SetTeamAutonomous.sqf8
-rw-r--r--Common/Functions/Common_SetTeamMoveMode.sqf8
-rw-r--r--Common/Functions/Common_SetTeamMovePos.sqf8
-rw-r--r--Common/Functions/Common_SetTeamRespawn.sqf8
-rw-r--r--Common/Functions/Common_SetTeamType.sqf8
-rw-r--r--Common/Functions/Common_SetTurretsMags.sqf30
-rw-r--r--Common/Functions/Common_SortByDistance.sqf24
-rw-r--r--Common/Functions/Common_SpawnTurrets.sqf22
-rw-r--r--Common/Functions/Common_UnitKilled.sqf196
-rw-r--r--Common/Functions/Common_UpdateStatistics.sqf1
-rw-r--r--Common/Functions/Common_UseStationaryDefense.sqf32
-rw-r--r--Common/Init/Init_Airfield.sqf9
-rw-r--r--Common/Init/Init_Boundaries.sqf38
-rw-r--r--Common/Init/Init_Camp.sqf85
-rw-r--r--Common/Init/Init_Common.sqf285
-rw-r--r--Common/Init/Init_CommonConstants.sqf492
-rw-r--r--Common/Init/Init_Location.sqf87
-rw-r--r--Common/Init/Init_Neighbors.sqf232
-rw-r--r--Common/Init/Init_PublicVariables.sqf62
-rw-r--r--Common/Init/Init_TownMode.sqf53
-rw-r--r--Common/Init/Init_Towns.sqf25
-rw-r--r--Common/Module/CIPHER/CIPHER_Init.sqf91
-rw-r--r--Common/Module/CIPHER/CIPHER_Sort.sqf63
-rw-r--r--LICENSE630
-rw-r--r--Rsc/Dialogs.hpp3785
-rw-r--r--Rsc/Header.hpp22
-rw-r--r--Rsc/Identities.hpp42
-rw-r--r--Rsc/Parameters.hpp693
-rw-r--r--Rsc/Ressources.hpp1001
-rw-r--r--Rsc/Sounds.hpp4
-rw-r--r--Rsc/Styles.hpp31
-rw-r--r--Rsc/Titles.hpp430
-rw-r--r--Server/AI/AI_AddMultiplayerRespawnEH.sqf1
-rw-r--r--Server/AI/AI_AdvancedRespawn.sqf119
-rw-r--r--Server/AI/AI_Resistance.sqf17
-rw-r--r--Server/AI/AI_SquadRespawn.sqf104
-rw-r--r--Server/AI/AI_TLWPHandler.sqs39
-rw-r--r--Server/AI/AI_UpdateSupplyTruck.sqf24
-rw-r--r--Server/AI/AI_Upgrade.sqf32
-rw-r--r--Server/AI/Orders/AI_MoveTo.sqf17
-rw-r--r--Server/AI/Orders/AI_Patrol.sqf34
-rw-r--r--Server/AI/Orders/AI_TownPatrol.sqf71
-rw-r--r--Server/AI/Orders/AI_WPAdd.sqf39
-rw-r--r--Server/AI/Orders/AI_WPRemove.sqf6
-rw-r--r--Server/Config/Config_Allies.sqf454
-rw-r--r--Server/Config/Config_Civilians.sqf139
-rw-r--r--Server/Config/Config_HugeTown.sqf13
-rw-r--r--Server/Config/Config_HugeTown2.sqf13
-rw-r--r--Server/Config/Config_LargeTown.sqf13
-rw-r--r--Server/Config/Config_LargeTown2.sqf13
-rw-r--r--Server/Config/Config_MediumTown.sqf13
-rw-r--r--Server/Config/Config_MediumTown1Tank.sqf13
-rw-r--r--Server/Config/Config_MediumTown2.sqf13
-rw-r--r--Server/Config/Config_MediumTown2Tank.sqf13
-rw-r--r--Server/Config/Config_Occupation.sqf925
-rw-r--r--Server/Config/Config_Resistance.sqf276
-rw-r--r--Server/Config/Config_SmallTown.sqf13
-rw-r--r--Server/Config/Config_SmallTown2.sqf13
-rw-r--r--Server/Config/Config_Town.sqf25
-rw-r--r--Server/Construction/Construction_HQSite.sqf83
-rw-r--r--Server/Construction/Construction_MediumSite.sqf135
-rw-r--r--Server/Construction/Construction_SmallSite.sqf126
-rw-r--r--Server/Construction/Construction_StationaryDefense.sqf94
-rw-r--r--Server/FSM/aibase.fsm677
-rw-r--r--Server/FSM/aicommander.fsm2025
-rw-r--r--Server/FSM/aiteam.fsm1235
-rw-r--r--Server/FSM/allies.fsm274
-rw-r--r--Server/FSM/allies_team.fsm184
-rw-r--r--Server/FSM/basearea.fsm141
-rw-r--r--Server/FSM/basepatrol.fsm303
-rw-r--r--Server/FSM/conquest.fsm134
-rw-r--r--Server/FSM/emptyvehiclescollector.fsm102
-rw-r--r--Server/FSM/fasttime.fsm101
-rw-r--r--Server/FSM/garbagecollector.fsm165
-rw-r--r--Server/FSM/missions.fsm233
-rw-r--r--Server/FSM/queryhandler.fsm153
-rw-r--r--Server/FSM/respatrol.fsm336
-rw-r--r--Server/FSM/resstriker.fsm303
-rw-r--r--Server/FSM/supplytruck.fsm287
-rw-r--r--Server/FSM/townpatrol.fsm217
-rw-r--r--Server/FSM/updatecamp.fsm259
-rw-r--r--Server/FSM/updateresources.fsm212
-rw-r--r--Server/FSM/updateserver.fsm424
-rw-r--r--Server/FSM/updatetown.fsm595
-rw-r--r--Server/FSM/updatetownai.fsm1377
-rw-r--r--Server/FSM/updatetowndefenses.fsm631
-rw-r--r--Server/FSM/updatetownoccupation.fsm730
-rw-r--r--Server/FSM/weather.fsm100
-rw-r--r--Server/FSM/workers.fsm323
-rw-r--r--Server/Functions/Server_AlliesBuyUnit.sqf144
-rw-r--r--Server/Functions/Server_BuildingDamaged.sqf18
-rw-r--r--Server/Functions/Server_BuildingHandleDamages.sqf22
-rw-r--r--Server/Functions/Server_BuildingKilled.sqf72
-rw-r--r--Server/Functions/Server_BuyUnit.sqf163
-rw-r--r--Server/Functions/Server_CanUpdateTeam.sqf19
-rw-r--r--Server/Functions/Server_ChangeAICommanderFunds.sqf7
-rw-r--r--Server/Functions/Server_CreateDefenseTemplate.sqf36
-rw-r--r--Server/Functions/Server_CreateTeam.sqf47
-rw-r--r--Server/Functions/Server_GetAICommanderFunds.sqf1
-rw-r--r--Server/Functions/Server_HQKilled.sqf46
-rw-r--r--Server/Functions/Server_HandleBuildingDamage.sqf3
-rw-r--r--Server/Functions/Server_HandleBuildingRepair.sqf104
-rw-r--r--Server/Functions/Server_HandleDefense.sqf40
-rw-r--r--Server/Functions/Server_HandleEmptyVehicle.sqf36
-rw-r--r--Server/Functions/Server_HandleReloadDefense.sqf71
-rw-r--r--Server/Functions/Server_HandleSPVF.sqf16
-rw-r--r--Server/Functions/Server_HandleSpecial.sqf48
-rw-r--r--Server/Functions/Server_MHQRepair.sqf38
-rw-r--r--Server/Functions/Server_PlaceJoiningUnit.sqf18
-rw-r--r--Server/Functions/Server_SelectOccupTeam.sqf41
-rw-r--r--Server/Functions/Server_SelectResTeam.sqf144
-rw-r--r--Server/Functions/Server_SetCampsToSide.sqf30
-rw-r--r--Server/Functions/Server_SideMessage.sqf94
-rw-r--r--Server/Functions/Server_TrashObject.sqf34
-rw-r--r--Server/Functions/Server_UpdateTeam.sqf8
-rw-r--r--Server/Init/Init_Defenses.sqf109
-rw-r--r--Server/Init/Init_Server.sqf532
-rw-r--r--Server/Init/Init_Towns.sqf214
-rw-r--r--Server/Missions/M_BASE_Attack/m_init.sqf169
-rw-r--r--Server/Missions/M_PLAYERS_Attack_Air/m_init.sqf128
-rw-r--r--Server/Missions/M_TOWN_Attack/m_init.sqf160
-rw-r--r--Server/Missions/M_UAV_RetrieveModule/m_init.sqf503
-rw-r--r--Server/Module/NEURO/NEURO.sqf240
-rw-r--r--Server/Module/UPSMON/Init_UPSMON.sqf576
-rw-r--r--Server/Module/UPSMON/UPSMON.sqf2575
-rw-r--r--Server/Module/UPSMON/UPSMON/!R/R_functions.sqf343
-rw-r--r--Server/Module/UPSMON/UPSMON/!R/markerAlpha.sqf14
-rw-r--r--Server/Module/UPSMON/UPSMON/MON_artillery_add.sqf64
-rw-r--r--Server/Module/UPSMON/UPSMON/MON_spawn.sqf115
-rw-r--r--Server/Module/UPSMON/UPSMON/MON_surrended.sqf23
-rw-r--r--Server/Module/UPSMON/UPSMON/actions/followme.sqf93
-rw-r--r--Server/Module/UPSMON/UPSMON/common/MON_functions.sqf2204
-rw-r--r--Server/PVFunctions/RequestChangeScore.sqf12
-rw-r--r--Server/PVFunctions/RequestCommanderVote.sqf20
-rw-r--r--Server/PVFunctions/RequestDefense.sqf11
-rw-r--r--Server/PVFunctions/RequestJoin.sqf28
-rw-r--r--Server/PVFunctions/RequestMHQRepair.sqf1
-rw-r--r--Server/PVFunctions/RequestSpecial.sqf1
-rw-r--r--Server/PVFunctions/RequestStructure.sqf12
-rw-r--r--Server/PVFunctions/RequestTeamUpdate.sqf26
-rw-r--r--Server/PVFunctions/RequestUpgrade.sqf1
-rw-r--r--Server/PVFunctions/RequestVehicleLock.sqf10
-rw-r--r--Server/PVFunctions/RequestWorker.sqf19
-rw-r--r--Server/Server_PlayerConnected.sqf109
-rw-r--r--Server/Server_PlayerDisconnected.sqf87
-rw-r--r--Server/Server_VoteForCommander.sqf38
-rw-r--r--Server/Support/Support_ParaAmmo.sqf107
-rw-r--r--Server/Support/Support_ParaVehicles.sqf89
-rw-r--r--Server/Support/Support_Paratroopers.sqf79
-rw-r--r--Server/Support/Support_UAV.sqf20
-rw-r--r--briefing.html2
-rw-r--r--briefing.sqf8
-rw-r--r--description.ext107
-rw-r--r--initJIPCompatible.sqf301
-rw-r--r--mission.sqm4402
-rw-r--r--readme.nfo28
-rw-r--r--stringtable.xml3691
-rw-r--r--version.sqf32
633 files changed, 77217 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..0a1d512
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,6 @@
+*.pbo
+.hemttout
+hemtt
+hemtt.exe
+*.biprivatekey
+*.hemttprivatekey
diff --git a/.hemtt/project.toml b/.hemtt/project.toml
new file mode 100644
index 0000000..5fbd25a
--- /dev/null
+++ b/.hemtt/project.toml
@@ -0,0 +1,4 @@
+name = "Arma 2 Warfare Chernarus mission modified by RFP"
+author = "RFP"
+prefix = "RFP"
+mainprefix = "z"
diff --git a/Client/Action/Action_Build.sqf b/Client/Action/Action_Build.sqf
new file mode 100644
index 0000000..e61bb1a
--- /dev/null
+++ b/Client/Action/Action_Build.sqf
@@ -0,0 +1 @@
+[player,player,2,MCoin,getpos player,(sideJoined) Call GetSideHQ] ExecVM "Client\Module\CoIn\coin_interface.sqf"; \ No newline at end of file
diff --git a/Client/Action/Action_BuildRepair.sqf b/Client/Action/Action_BuildRepair.sqf
new file mode 100644
index 0000000..3437303
--- /dev/null
+++ b/Client/Action/Action_BuildRepair.sqf
@@ -0,0 +1 @@
+[player,player,2,RCoin,getpos player,_this select 0] ExecVM "Client\Module\CoIn\coin_interface.sqf"; \ No newline at end of file
diff --git a/Client/Action/Action_EjectCargo.sqf b/Client/Action/Action_EjectCargo.sqf
new file mode 100644
index 0000000..a10bfd1
--- /dev/null
+++ b/Client/Action/Action_EjectCargo.sqf
@@ -0,0 +1,23 @@
+Private ["_cargo","_vehicle"];
+
+_vehicle = _this select 0;
+
+//--- Get the crew.
+_cargo = (crew _vehicle) - [driver _vehicle, gunner _vehicle, commander _vehicle];
+
+{
+ if (alive _x && _vehicle == vehicle _x) then {
+ if (local _x) then {
+ //--- Dealing with a local unit, probably an AI.
+ unassignVehicle _x;
+ _x action ["EJECT", _vehicle];
+ } else {
+ //--- Dealing with a player or a non local unit.
+ if (isPlayer(leader (group _x))) then {
+ WFBE_PerformAction = [vehicleVarName(leader(group _x)),'CLTFNCPERFORMACTION',[_x, "EJECT", _vehicle]];
+ publicVariable 'WFBE_PerformAction';
+ };
+ };
+ };
+ sleep 1;
+} forEach _cargo; \ No newline at end of file
diff --git a/Client/Action/Action_HALO.sqf b/Client/Action/Action_HALO.sqf
new file mode 100644
index 0000000..57aacf9
--- /dev/null
+++ b/Client/Action/Action_HALO.sqf
@@ -0,0 +1,9 @@
+Private ["_act","_caller","_vehicle"];
+
+_vehicle = _this select 0;
+_caller = _this select 1;
+_act = _this select 2;
+
+_caller action ["EJECT",_vehicle];
+_caller setVelocity [0,0,0];
+[_caller] Exec "ca\air2\Halo\data\Scripts\HALO_getout.sqs"; \ No newline at end of file
diff --git a/Client/Action/Action_Menu.sqf b/Client/Action/Action_Menu.sqf
new file mode 100644
index 0000000..acb0e60
--- /dev/null
+++ b/Client/Action/Action_Menu.sqf
@@ -0,0 +1 @@
+createDialog "WF_Menu"; \ No newline at end of file
diff --git a/Client/Action/Action_Push.sqf b/Client/Action/Action_Push.sqf
new file mode 100644
index 0000000..8d2429c
--- /dev/null
+++ b/Client/Action/Action_Push.sqf
@@ -0,0 +1,8 @@
+Private ["_dir","_speed","_vehicle","_vel"];
+
+_vehicle = _this select 0;
+
+_vel = velocity _vehicle;
+_dir = direction _vehicle;
+_speed = 10;
+_vehicle setVelocity [(_vel select 0)+((sin _dir)*_speed),(_vel select 1)+((cos _dir)*_speed),(_vel select 2)]; \ No newline at end of file
diff --git a/Client/Action/Action_RepairMHQ.sqf b/Client/Action/Action_RepairMHQ.sqf
new file mode 100644
index 0000000..4a7eddc
--- /dev/null
+++ b/Client/Action/Action_RepairMHQ.sqf
@@ -0,0 +1,29 @@
+Private ["_currency","_currencySym","_hq","_isBeingFixed","_repairPrice","_vehicle"];
+
+_vehicle = _this select 0;
+
+_hq = (sideJoinedText) Call GetSideHQ;
+if (alive _hq || (_hq distance _vehicle > 30)) exitWith {hint (localize "STR_WF_INFO_Repair_MHQ_None")};
+
+//--- Is HQ already being fixed?
+_isBeingFixed = WF_Logic getVariable Format ["%1MHQRepair",sideJoinedText];
+if (_isBeingFixed) exitWith {hint (localize "STR_WF_INFO_Repair_MHQ_BeingRepaired")};
+
+_repairPrice = 'WFBE_MHQREPAIRPRICE' Call GetNamespace;
+_currency = if !(paramMoneyOnly) then {(sideJoined) Call GetSideSupply} else {Call GetPlayerFunds};
+_currencySym = if !(paramMoneyOnly) then {"S"} else {"$"};
+if (_currency < _repairPrice) exitWith {hint Format [localize "STR_WF_INFO_Repair_MHQ_Funds",_currencySym,_repairPrice - _currency]};
+
+if !(paramMoneyOnly) then {
+ [sideJoined,-_repairPrice] Call ChangeSideSupply;
+} else {
+ -(_repairPrice) Call ChangePlayerFunds;
+};
+
+WFBE_RequestMHQRepair = ['SRVFNCREQUESTMHQREPAIR',sideJoined];
+publicVariable 'WFBE_RequestMHQRepair';
+if (isHostedServer) then {['SRVFNCREQUESTMHQREPAIR',sideJoined] Spawn HandleSPVF};
+
+WF_Logic setVariable [Format ["%1MHQRepair",sideJoinedText],true,true];
+
+hint (localize "STR_WF_INFO_Repair_MHQ_Repair"); \ No newline at end of file
diff --git a/Client/Action/Action_TaxiReverse.sqf b/Client/Action/Action_TaxiReverse.sqf
new file mode 100644
index 0000000..6b1b8b5
--- /dev/null
+++ b/Client/Action/Action_TaxiReverse.sqf
@@ -0,0 +1,8 @@
+Private ["_dir","_speed","_vehicle","_vel"];
+
+_vehicle = _this select 0;
+
+_vel = velocity _vehicle;
+_dir = direction _vehicle;
+_speed = -5;
+_vehicle setVelocity [(_vel select 0)+((sin _dir)*_speed),(_vel select 1)+((cos _dir)*_speed),(_vel select 2)]; \ No newline at end of file
diff --git a/Client/Action/Action_ToggleLock.sqf b/Client/Action/Action_ToggleLock.sqf
new file mode 100644
index 0000000..e0a5add
--- /dev/null
+++ b/Client/Action/Action_ToggleLock.sqf
@@ -0,0 +1,7 @@
+Private ["_lock","_vehicle"];
+
+_vehicle = _this select 0;
+
+_lock = if (locked _vehicle) then {false} else {true};
+
+[_vehicle,_lock] Call CLTFNCSetVehicleLock; \ No newline at end of file
diff --git a/Client/Action/Action_ToggleMHQLock.sqf b/Client/Action/Action_ToggleMHQLock.sqf
new file mode 100644
index 0000000..3edb19a
--- /dev/null
+++ b/Client/Action/Action_ToggleMHQLock.sqf
@@ -0,0 +1,9 @@
+Private ["_lock","_MHQ"];
+
+_MHQ = _this select 0;
+
+_lock = if (locked _MHQ) then {false} else {true};
+
+WFBE_RequestVehicleLock = ['SRVFNCREQUESTVEHICLELOCK',[_MHQ,_lock]];
+publicVariable 'WFBE_RequestVehicleLock';
+if (isHostedServer) then {['SRVFNCREQUESTVEHICLELOCK',[_MHQ,_lock]] Spawn HandleSPVF};
diff --git a/Client/Client_EndGame.sqf b/Client/Client_EndGame.sqf
new file mode 100644
index 0000000..e6ccb0f
--- /dev/null
+++ b/Client/Client_EndGame.sqf
@@ -0,0 +1,67 @@
+Private ['_HQ','_base','_blist','_camShotOrder','_camera','_nvgstate','_position','_secTarget','_side','_track','_vehi'];
+
+_side = _this select 0;
+_blist = _this select 1;
+
+[_side] ExecVM "Client\GUI\GUI_EndOfGameStats.sqf";
+//_track = if (WF_A2_Vanilla) then {"Track21_Rise_Of_The_Fallen"} else {"EP1_Track15"}; //---old
+_track = if (WF_A2_Vanilla) then {["Track21_Rise_Of_The_Fallen",41]} else {["EP1_Track13",91]}; //---changed-MrNiceGuy
+playMusic _track;
+_base = WestMHQ;
+_secTarget = EastMHQ;
+if (_side == West) then {_base = EastMHQ;_secTarget = WestMHQ};
+_position = getPos _base;
+
+_blist = [_secTarget,_blist] Call SortByDistance;
+_blist = [_secTarget] + _blist;
+
+//--- Safety Pos.
+_HQ = (sideJoinedText) Call GetSideHQ;
+_vehi = vehicle player;
+if (_vehi != player) then {player action ["EJECT", _vehi];_vehi = player};
+_vehi setVelocity [0,0,-0.1];
+_vehi setPos ([getPos _HQ,20,30] Call GetRandomPosition);
+
+if (!isNil "DeathCamera") then {
+ DeathCamera cameraEffect["TERMINATE","BACK"];
+ camDestroy DeathCamera;
+ "colorCorrections" ppEffectEnable false;
+ "dynamicBlur" ppEffectEnable false;
+};
+
+_camera = "camera" camCreate _position;
+_camera camSetDir 0;
+_camera camSetFov 0.200;
+_camera cameraEffect["Internal","back"];
+_camera camSetTarget getPos _base;
+_camera camSetRelPos [160.80,130.29,140.07];
+_camera camCommit 0;
+_nvgstate = if (daytime > 18.5 || daytime < 5.5) then {true} else {false};
+camUseNVG _nvgstate;
+
+waitUntil {camCommitted _camera};
+
+_camera camSetRelPos [-190.71,190.55,180.94];
+_camera camCommit 10;
+
+waitUntil {camCommitted _camera};
+
+_camShotOrder = [[0,100,35],[50,0,20],[0,-50,20],[-50,0,20]];
+
+{
+ _camera camSetPos getPos _x;
+ _camera camSetTarget getPos _x;
+
+ {
+ _camera camSetRelPos _x;
+ _camera camCommit 5;
+ waitUntil {camCommitted _camera};
+ } forEach _camShotOrder;
+
+ _camera camSetRelPos [0,100,35];
+ _camera camCommit 5;
+ waitUntil {camCommitted _camera};
+} forEach _blist;
+
+sleep 3;
+failMission "END1"; \ No newline at end of file
diff --git a/Client/Client_Killed.sqf b/Client/Client_Killed.sqf
new file mode 100644
index 0000000..ac723b7
--- /dev/null
+++ b/Client/Client_Killed.sqf
@@ -0,0 +1,55 @@
+/* Player KEH. */
+
+
+private ["_isInertObject","_killer","_isTKFriendly"];
+if (playerDead) exitWith {};
+playerDead = true;
+
+{player removeAction 0} forEach [0,1,2,3,4,5];
+if !(isNil "HQAction") then {player removeAction HQAction};
+player removeAction Options;
+
+deathLocation = getPos player;
+
+if (mysql) then {
+ Private ['_isInertObject','_isTKFriendly','_killer'];
+ _killer = _this select 1;
+ _isTKFriendly = if (side _killer == sideJoined && !isPlayer(_killer)) then {true} else {false};
+ _isInertObject = false;
+ if (vehicle _killer == _killer) then {
+ _isInertObject = if (count(crew _killer) == 0) then {true} else {false};
+ };
+
+ if (_this select 0 == _killer || _isTKFriendly || _isInertObject) then {
+ WF_Logic setVariable ["WF_MYSQL_CLIENT",(WF_Logic getVariable "WF_MYSQL_CLIENT") + [Format ["MYSQLDATA_WFBE_Update%1%2suicide%3",getPlayerUID(player),name player,worldName]],true];
+ };
+};
+
+closeDialog 0;
+
+sleep 0.11;
+
+"dynamicBlur" ppEffectEnable true;
+"dynamicBlur" ppEffectAdjust [1];
+"dynamicBlur" ppEffectCommit 0.1;
+"colorCorrections" ppEffectAdjust [1, 1, 0, [0.1, 0.0, 0.0, 1], [1.0, 0.5, 0.5, 0.1], [0.199, 0.587, 0.114, 0.0]];
+"colorCorrections" ppEffectCommit 0.1;
+"colorCorrections" ppEffectEnable true;
+"colorCorrections" ppEffectAdjust [1, 1, 0, [0.1, 0.0, 0.0, 0.5], [1.0, 0.5, 0.5, 0.1], [0.199, 0.587, 0.114, 0.0]];
+"colorCorrections" ppEffectCommit 0.3;
+
+DeathCamera = "camera" camCreate deathLocation;
+DeathCamera camSetDir 0;
+DeathCamera camSetFov 1;
+DeathCamera cameraEffect["Internal","TOP"];
+
+DeathCamera camSetTarget deathLocation;
+DeathCamera camSetPos [deathLocation select 0,(deathLocation select 1) + 2,5];
+DeathCamera camCommit 0;
+
+waitUntil {camCommitted DeathCamera};
+
+DeathCamera camSetPos [deathLocation select 0,(deathLocation select 1) + 2,30];
+DeathCamera camCommit ('WFBE_RESPAWNDELAY' Call GetNamespace)+2;
+
+createDialog "RscMenu_Respawn"; \ No newline at end of file
diff --git a/Client/FSM/conquest_helper.fsm b/Client/FSM/conquest_helper.fsm
new file mode 100644
index 0000000..fab822e
--- /dev/null
+++ b/Client/FSM/conquest_helper.fsm
@@ -0,0 +1,148 @@
+/*%FSM<COMPILE "E:\Bohemia Interactive\ArmA 2\FSM Editor Personal Edition\scriptedFSM.cfg, conquest_helper">*/
+/*%FSM<HEAD>*/
+/*
+item0[] = {"Init",0,4346,53.240814,-221.988968,143.240845,-171.989166,0.000000,"Init"};
+item1[] = {"End",1,250,-216.387955,-52.508366,-126.387947,-2.508394,0.000000,"End"};
+item2[] = {"Update_Conquest",2,250,-82.090652,-139.314026,7.909359,-89.314034,0.000000,"Update" \n "Conquest"};
+item3[] = {"Loop",4,218,53.846153,-139.681244,143.846161,-89.681236,0.000000,"Loop"};
+item4[] = {"Gameover",4,218,-216.387955,-139.464890,-126.387947,-89.464890,0.000000,"Gameover"};
+link0[] = {0,3};
+link1[] = {2,3};
+link2[] = {2,4};
+link3[] = {3,2};
+link4[] = {4,1};
+globals[] = {0.000000,0,0,0,0,640,480,1,8,6316128,1,-348.696411,348.696136,79.849762,-328.514618,921,592,1};
+window[] = {0,-1,-1,-1,-1,837,100,1513,100,1,939};
+*//*%FSM</HEAD>*/
+class FSM
+{
+ fsmName = "conquest_helper";
+ class States
+ {
+ /*%FSM<STATE "Init">*/
+ class Init
+ {
+ name = "Init";
+ init = /*%FSM<STATEINIT""">*/"_ntime = 0;"/*%FSM</STATEINIT""">*/;
+ precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
+ class Links
+ {
+ /*%FSM<LINK "Loop">*/
+ class Loop
+ {
+ priority = 0.000000;
+ to="Update_Conquest";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/"time > _ntime"/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ };
+ };
+ /*%FSM</STATE>*/
+ /*%FSM<STATE "End">*/
+ class End
+ {
+ name = "End";
+ init = /*%FSM<STATEINIT""">*/""/*%FSM</STATEINIT""">*/;
+ precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
+ class Links
+ {
+ };
+ };
+ /*%FSM</STATE>*/
+ /*%FSM<STATE "Update_Conquest">*/
+ class Update_Conquest
+ {
+ name = "Update_Conquest";
+ init = /*%FSM<STATEINIT""">*/"_t = [];" \n
+ "" \n
+ "{" \n
+ " if ((_x getVariable 'sideID') == sideID) then {_t = _t + [_x]};" \n
+ "} forEach towns;" \n
+ "" \n
+ "_set = [];" \n
+ "" \n
+ "if (count _t > 0) then {" \n
+ " {" \n
+ " _neighbors = _x getVariable ""neighbors"";" \n
+ " " \n
+ " if !(isNil ""_neighbors"") then {" \n
+ " {" \n
+ " if ((_x getVariable 'sideID') != sideID) then {" \n
+ " if (isNil {_x getVariable ""wfbe_marker""}) then {" \n
+ " _marker = Format [""wfbe_conquest_%1"", buildingMarker];" \n
+ " buildingMarker = buildingMarker + 1;" \n
+ " _x setVariable ['wfbe_marker', _marker];" \n
+ " createMarkerLocal [_marker, getPos _x];" \n
+ " _marker setMarkerColorLocal ""ColorOrange"";" \n
+ " _marker setMarkerShapeLocal ""ELLIPSE"";" \n
+ " _marker setMarkerAlphaLocal 0.4;" \n
+ " _marker setMarkerBrushLocal ""SOLID"";" \n
+ " _marker setMarkerSizeLocal [300,300];" \n
+ " };" \n
+ " if !(_x in _set) then {_set = _set + [_x]};" \n
+ " };" \n
+ " } forEach _neighbors;" \n
+ " };" \n
+ " } forEach _t;" \n
+ "} else {" \n
+ " _hq = (sideJoined) Call GetSideHQ;" \n
+ " _nearest = ([_hq, towns] Call SortByDistance) select 0;" \n
+ " if (isNil {_nearest getVariable ""wfbe_marker""}) then {" \n
+ " _marker = Format [""wfbe_conquest_%1"", buildingMarker];" \n
+ " buildingMarker = buildingMarker + 1;" \n
+ " _nearest setVariable ['wfbe_marker', _marker];" \n
+ " createMarkerLocal [_marker, getPos _nearest];" \n
+ " _marker setMarkerColorLocal ""ColorOrange"";" \n
+ " _marker setMarkerShapeLocal ""ELLIPSE"";" \n
+ " _marker setMarkerAlphaLocal 0.4;" \n
+ " _marker setMarkerBrushLocal ""SOLID"";" \n
+ " _marker setMarkerSizeLocal [300,300];" \n
+ " };" \n
+ " _set = [_nearest];" \n
+ "};" \n
+ "" \n
+ "_set = towns - _set;" \n
+ "{" \n
+ " if !(isNil {_x getVariable ""wfbe_marker""}) then {" \n
+ " deleteMarkerLocal (_x getVariable ""wfbe_marker"");" \n
+ " _x setVariable [""wfbe_marker"", nil];" \n
+ " };" \n
+ "} forEach _set;" \n
+ "" \n
+ "_ntime = time + 10;"/*%FSM</STATEINIT""">*/;
+ precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
+ class Links
+ {
+ /*%FSM<LINK "Gameover">*/
+ class Gameover
+ {
+ priority = 0.000000;
+ to="End";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/"gameOver"/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ /*%FSM<LINK "Loop">*/
+ class Loop
+ {
+ priority = 0.000000;
+ to="Update_Conquest";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/"time > _ntime"/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ };
+ };
+ /*%FSM</STATE>*/
+ };
+ initState="Init";
+ finalStates[] =
+ {
+ "End",
+ };
+};
+/*%FSM</COMPILE>*/ \ No newline at end of file
diff --git a/Client/FSM/fasttimecli.fsm b/Client/FSM/fasttimecli.fsm
new file mode 100644
index 0000000..870b433
--- /dev/null
+++ b/Client/FSM/fasttimecli.fsm
@@ -0,0 +1,171 @@
+/*%FSM<COMPILE "D:\ArmA2\FSM Editor Personal Edition\scriptedFSM.cfg, fasttime">*/
+/*%FSM<HEAD>*/
+/*
+item0[] = {"Init",0,250,-64.063538,-295.568512,25.936447,-245.568604,0.000000,"Init"};
+item1[] = {"Update_Time",2,250,-66.836029,-56.267544,23.163887,-6.267582,0.000000,"Update Time"};
+item2[] = {"End",1,250,-218.006683,15.304325,-128.006653,65.304314,0.000000,"End"};
+item3[] = {"Loop",4,218,65.605347,-56.267605,155.605377,-6.267574,0.000000,"Loop"};
+item4[] = {"Gameover",4,218,-216.668854,-56.267559,-126.668869,-6.267574,0.000000,"Gameover"};
+item5[] = {"Wait_for_Init",4,218,65.886307,-194.314407,155.886276,-144.314407,0.000000,"Wait for Init"};
+item6[] = {"Advanced_Init",2,250,-63.879562,-194.314392,26.121157,-144.314392,0.000000,"Advanced Init"};
+item7[] = {"_",8,218,-34.448154,-230.434799,-2.642141,-207.859543,0.000000,""};
+item8[] = {"Init_Done",2,4346,191.498337,-194.033432,281.498260,-144.033432,0.000000,"Init Done"};
+item9[] = {"Init_Done",4,218,-63.535187,-123.100403,26.464882,-73.100349,0.000000,"Init Done"};
+item10[] = {"",7,210,233.129700,-102.521011,241.129700,-94.521011,0.000000,""};
+link0[] = {0,7};
+link1[] = {1,3};
+link2[] = {1,4};
+link3[] = {3,1};
+link4[] = {4,2};
+link5[] = {5,8};
+link6[] = {6,5};
+link7[] = {6,9};
+link8[] = {7,6};
+link9[] = {8,5};
+link10[] = {8,10};
+link11[] = {9,1};
+link12[] = {10,9};
+globals[] = {0.000000,0,0,0,0,640,480,1,14,6316128,1,-395.307037,395.306915,79.046959,-351.956635,897,489,1};
+window[] = {0,-1,-1,-1,-1,734,100,1360,100,1,915};
+*//*%FSM</HEAD>*/
+class FSM
+{
+ fsmName = "fasttime";
+ class States
+ {
+ /*%FSM<STATE "Init">*/
+ class Init
+ {
+ name = "Init";
+ init = /*%FSM<STATEINIT""">*/"_currentTime = 0;" \n
+ "_lastUpdate = time;"/*%FSM</STATEINIT""">*/;
+ precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
+ class Links
+ {
+ /*%FSM<LINK "_">*/
+ class _
+ {
+ priority = 0.000000;
+ to="Advanced_Init";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/""/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ };
+ };
+ /*%FSM</STATE>*/
+ /*%FSM<STATE "Update_Time">*/
+ class Update_Time
+ {
+ name = "Update_Time";
+ init = /*%FSM<STATEINIT""">*/"_currentTime = WF_Logic getVariable ""currentTime"";" \n
+ "SkipTime (_currentTime - DayTime);" \n
+ "_lastUpdate = time;"/*%FSM</STATEINIT""">*/;
+ precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
+ class Links
+ {
+ /*%FSM<LINK "Gameover">*/
+ class Gameover
+ {
+ priority = 0.000000;
+ to="End";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/"gameOver"/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ /*%FSM<LINK "Loop">*/
+ class Loop
+ {
+ priority = 0.000000;
+ to="Update_Time";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/"time - _lastUpdate > 1 && !gameOver"/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ };
+ };
+ /*%FSM</STATE>*/
+ /*%FSM<STATE "End">*/
+ class End
+ {
+ name = "End";
+ init = /*%FSM<STATEINIT""">*/""/*%FSM</STATEINIT""">*/;
+ precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
+ class Links
+ {
+ };
+ };
+ /*%FSM</STATE>*/
+ /*%FSM<STATE "Advanced_Init">*/
+ class Advanced_Init
+ {
+ name = "Advanced_Init";
+ init = /*%FSM<STATEINIT""">*/"_currentTime = WF_Logic getVariable ""currentTime"""/*%FSM</STATEINIT""">*/;
+ precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
+ class Links
+ {
+ /*%FSM<LINK "Init_Done">*/
+ class Init_Done
+ {
+ priority = 0.000000;
+ to="Update_Time";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/"!isNil ""_currentTime"""/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/"_currentTime = WF_Logic getVariable ""currentTime"""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ /*%FSM<LINK "Wait_for_Init">*/
+ class Wait_for_Init
+ {
+ priority = 0.000000;
+ to="Init_Done";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/"isNil ""_currentTime"""/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/"_currentTime = WF_Logic getVariable ""currentTime"""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ };
+ };
+ /*%FSM</STATE>*/
+ /*%FSM<STATE "Init_Done">*/
+ class Init_Done
+ {
+ name = "Init_Done";
+ init = /*%FSM<STATEINIT""">*/"_currentTime = WF_Logic getVariable ""currentTime"";"/*%FSM</STATEINIT""">*/;
+ precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
+ class Links
+ {
+ /*%FSM<LINK "Init_Done">*/
+ class Init_Done
+ {
+ priority = 0.000000;
+ to="Update_Time";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/"!isNil ""_currentTime"""/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/"_currentTime = WF_Logic getVariable ""currentTime"""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ /*%FSM<LINK "Wait_for_Init">*/
+ class Wait_for_Init
+ {
+ priority = 0.000000;
+ to="Init_Done";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/"isNil ""_currentTime"""/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/"_currentTime = WF_Logic getVariable ""currentTime"""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ };
+ };
+ /*%FSM</STATE>*/
+ };
+ initState="Init";
+ finalStates[] =
+ {
+ "End"
+ };
+};
+/*%FSM</COMPILE>*/ \ No newline at end of file
diff --git a/Client/FSM/overcast.fsm b/Client/FSM/overcast.fsm
new file mode 100644
index 0000000..4c815fd
--- /dev/null
+++ b/Client/FSM/overcast.fsm
@@ -0,0 +1,177 @@
+/*%FSM<COMPILE "D:\ArmA2\FSM Editor Personal Edition\scriptedFSM.cfg, overcast">*/
+/*%FSM<HEAD>*/
+/*
+item0[] = {"Init",0,250,-64.063538,-295.568512,25.936447,-245.568604,0.000000,"Init"};
+item1[] = {"Update_Weather",2,4346,-66.836029,-56.267544,23.163887,-6.267582,0.000000,"Update Weather"};
+item2[] = {"End",1,250,-218.006683,15.304325,-128.006653,65.304314,0.000000,"End"};
+item3[] = {"Loop",4,218,65.605347,-56.267605,155.605377,-6.267574,0.000000,"Loop"};
+item4[] = {"Gameover",4,218,-216.668854,-56.267559,-126.668869,-6.267574,0.000000,"Gameover"};
+item5[] = {"Wait_for_Init",4,218,65.886307,-194.314407,155.886276,-144.314407,0.000000,"Wait for Init"};
+item6[] = {"Advanced_Init",2,250,-63.879562,-194.314392,26.121157,-144.314392,0.000000,"Advanced Init"};
+item7[] = {"_",8,218,-34.448154,-230.434799,-2.642141,-207.859543,0.000000,""};
+item8[] = {"Wait",2,250,192.379745,-194.033447,282.379883,-144.033447,0.000000,"Wait"};
+item9[] = {"Init_Done",4,218,-63.535187,-123.100403,26.464882,-73.100349,0.000000,"Init Done"};
+item10[] = {"",7,210,233.129700,-102.521011,241.129700,-94.521011,0.000000,""};
+link0[] = {0,7};
+link1[] = {1,3};
+link2[] = {1,4};
+link3[] = {3,1};
+link4[] = {4,2};
+link5[] = {5,8};
+link6[] = {6,5};
+link7[] = {6,9};
+link8[] = {7,6};
+link9[] = {8,5};
+link10[] = {8,10};
+link11[] = {9,1};
+link12[] = {10,9};
+globals[] = {0.000000,0,0,0,0,640,480,1,14,6316128,1,-395.307037,395.306915,79.046959,-351.956635,897,514,1};
+window[] = {0,-1,-1,-1,-1,659,25,1285,25,1,915};
+*//*%FSM</HEAD>*/
+class FSM
+{
+ fsmName = "overcast";
+ class States
+ {
+ /*%FSM<STATE "Init">*/
+ class Init
+ {
+ name = "Init";
+ init = /*%FSM<STATEINIT""">*/"_lastOverCast = -1;" \n
+ "_overCast = 0;" \n
+ "_lastUpdate = time;"/*%FSM</STATEINIT""">*/;
+ precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
+ class Links
+ {
+ /*%FSM<LINK "_">*/
+ class _
+ {
+ priority = 0.000000;
+ to="Advanced_Init";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/""/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ };
+ };
+ /*%FSM</STATE>*/
+ /*%FSM<STATE "Update_Weather">*/
+ class Update_Weather
+ {
+ name = "Update_Weather";
+ init = /*%FSM<STATEINIT""">*/"_overCast = WF_Logic getVariable ""overCast"";" \n
+ "if (_overCast != _lastOverCast) then {" \n
+ " ('WFBE_WEATHERTRANSITION' Call GetNamespace) setOvercast _overCast;" \n
+ " _lastOverCast = _overCast;" \n
+ "};" \n
+ "_lastUpdate = time;"/*%FSM</STATEINIT""">*/;
+ precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
+ class Links
+ {
+ /*%FSM<LINK "Gameover">*/
+ class Gameover
+ {
+ priority = 0.000000;
+ to="End";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/"gameOver"/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ /*%FSM<LINK "Loop">*/
+ class Loop
+ {
+ priority = 0.000000;
+ to="Update_Weather";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/"time - _lastUpdate > 5 && !gameOver"/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ };
+ };
+ /*%FSM</STATE>*/
+ /*%FSM<STATE "End">*/
+ class End
+ {
+ name = "End";
+ init = /*%FSM<STATEINIT""">*/""/*%FSM</STATEINIT""">*/;
+ precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
+ class Links
+ {
+ };
+ };
+ /*%FSM</STATE>*/
+ /*%FSM<STATE "Advanced_Init">*/
+ class Advanced_Init
+ {
+ name = "Advanced_Init";
+ init = /*%FSM<STATEINIT""">*/"_overCast = WF_Logic getVariable ""overCast"""/*%FSM</STATEINIT""">*/;
+ precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
+ class Links
+ {
+ /*%FSM<LINK "Init_Done">*/
+ class Init_Done
+ {
+ priority = 0.000000;
+ to="Update_Weather";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/"!isNil ""_overCast"""/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/"_overCast = WF_Logic getVariable ""overCast"";" \n
+ "if (time > 10) then {0 setOvercast _overCast;_lastOverCast = _overCast};"/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ /*%FSM<LINK "Wait_for_Init">*/
+ class Wait_for_Init
+ {
+ priority = 0.000000;
+ to="Wait";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/"isNil ""_overCast"""/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/"_overCast = WF_Logic getVariable ""overCast"""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ };
+ };
+ /*%FSM</STATE>*/
+ /*%FSM<STATE "Wait">*/
+ class Wait
+ {
+ name = "Wait";
+ init = /*%FSM<STATEINIT""">*/"_overCast = WF_Logic getVariable ""overCast"";"/*%FSM</STATEINIT""">*/;
+ precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
+ class Links
+ {
+ /*%FSM<LINK "Init_Done">*/
+ class Init_Done
+ {
+ priority = 0.000000;
+ to="Update_Weather";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/"!isNil ""_overCast"""/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/"_overCast = WF_Logic getVariable ""overCast"";" \n
+ "if (time > 10) then {0 setOvercast _overCast;_lastOverCast = _overCast};"/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ /*%FSM<LINK "Wait_for_Init">*/
+ class Wait_for_Init
+ {
+ priority = 0.000000;
+ to="Wait";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/"isNil ""_overCast"""/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/"_overCast = WF_Logic getVariable ""overCast"""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ };
+ };
+ /*%FSM</STATE>*/
+ };
+ initState="Init";
+ finalStates[] =
+ {
+ "End"
+ };
+};
+/*%FSM</COMPILE>*/ \ No newline at end of file
diff --git a/Client/FSM/resources_cli.fsm b/Client/FSM/resources_cli.fsm
new file mode 100644
index 0000000..24899bb
--- /dev/null
+++ b/Client/FSM/resources_cli.fsm
@@ -0,0 +1,111 @@
+/*%FSM<COMPILE "D:\ArmA2\FSM Editor Personal Edition\scriptedFSM.cfg, resources_cli">*/
+/*%FSM<HEAD>*/
+/*
+item0[] = {"Init",0,250,65.361679,-140.426117,155.361542,-90.426193,0.000000,"Init"};
+item1[] = {"Update_Income",2,4346,-66.836029,-56.267544,23.163887,-6.267582,0.000000,"Update Income"};
+item2[] = {"End",1,250,-218.006683,15.304325,-128.006653,65.304314,0.000000,"End"};
+item3[] = {"Loop",4,218,65.605347,-56.267605,155.605377,-6.267574,0.000000,"Loop"};
+item4[] = {"Gameover",4,218,-216.668854,-56.267559,-126.668869,-6.267574,0.000000,"Gameover"};
+link0[] = {0,3};
+link1[] = {1,3};
+link2[] = {1,4};
+link3[] = {3,1};
+link4[] = {4,2};
+globals[] = {0.000000,0,0,0,0,640,480,1,14,6316128,1,-365.650940,391.210938,85.220795,-348.477112,758,514,1};
+window[] = {0,-1,-1,-1,-1,734,100,1360,100,1,776};
+*//*%FSM</HEAD>*/
+class FSM
+{
+ fsmName = "resources_cli";
+ class States
+ {
+ /*%FSM<STATE "Init">*/
+ class Init
+ {
+ name = "Init";
+ init = /*%FSM<STATEINIT""">*/"_pside = _this;" \n
+ "" \n
+ "_lastUpdate = time;" \n
+ "" \n
+ "_is = 'WFBE_INCOMESYSTEM' Call GetNamespace;" \n
+ "_ii = 'WFBE_INCOMEINTERVAL' Call GetNamespace;"/*%FSM</STATEINIT""">*/;
+ precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
+ class Links
+ {
+ /*%FSM<LINK "Loop">*/
+ class Loop
+ {
+ priority = 0.000000;
+ to="Update_Income";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/"time - _lastUpdate > _ii && !gameOver"/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ };
+ };
+ /*%FSM</STATE>*/
+ /*%FSM<STATE "Update_Income">*/
+ class Update_Income
+ {
+ name = "Update_Income";
+ init = /*%FSM<STATEINIT""">*/"_lastUpdate = time;" \n
+ "" \n
+ "_income = 0;" \n
+ "" \n
+ "//--- Income Getter." \n
+ "{" \n
+ " _side = (_x getVariable ""sideID"") Call GetSideFromID;" \n
+ " _supply = _x getVariable ""supplyValue"";" \n
+ " if (_side == _pside) then {_income = _income + (_supply / _is)};" \n
+ "} forEach towns;" \n
+ "" \n
+ "//--- Only change the funds if needed." \n
+ "if (_income > 0) then {" \n
+ " (_income) Call ChangePlayerFunds;" \n
+ "};"/*%FSM</STATEINIT""">*/;
+ precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
+ class Links
+ {
+ /*%FSM<LINK "Gameover">*/
+ class Gameover
+ {
+ priority = 0.000000;
+ to="End";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/"gameOver"/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ /*%FSM<LINK "Loop">*/
+ class Loop
+ {
+ priority = 0.000000;
+ to="Update_Income";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/"time - _lastUpdate > _ii && !gameOver"/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ };
+ };
+ /*%FSM</STATE>*/
+ /*%FSM<STATE "End">*/
+ class End
+ {
+ name = "End";
+ init = /*%FSM<STATEINIT""">*/""/*%FSM</STATEINIT""">*/;
+ precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
+ class Links
+ {
+ };
+ };
+ /*%FSM</STATE>*/
+ };
+ initState="Init";
+ finalStates[] =
+ {
+ "End",
+ };
+};
+/*%FSM</COMPILE>*/ \ No newline at end of file
diff --git a/Client/FSM/updateactions.fsm b/Client/FSM/updateactions.fsm
new file mode 100644
index 0000000..27d60ad
--- /dev/null
+++ b/Client/FSM/updateactions.fsm
@@ -0,0 +1,138 @@
+/*%FSM<COMPILE "D:\ArmA2\FSM Editor Personal Edition\scriptedFSM.cfg, updateactions">*/
+/*%FSM<HEAD>*/
+/*
+item0[] = {"Init",0,250,-64.944939,-176.579712,25.055046,-126.579880,0.000000,"Init"};
+item1[] = {"Check_Player",2,250,-66.836029,-56.267544,23.163887,-6.267582,0.000000,"Check Player"};
+item2[] = {"End",1,250,-218.006683,15.304325,-128.006653,65.304314,0.000000,"End"};
+item3[] = {"Loop",4,218,65.605347,-56.267605,155.605377,-6.267574,0.000000,"Loop"};
+item4[] = {"Not_Alive",4,218,-216.668854,-56.267559,-126.668869,-6.267574,1.000000,"Not Alive"};
+item5[] = {"Update_Actions",2,4346,66.545509,15.865158,156.545563,65.865219,0.000000,"Update Actions"};
+item6[] = {"Alive",4,218,-66.545601,15.865162,23.454397,65.865189,0.000000,"Alive"};
+item7[] = {"_",8,218,-37.459465,-108.411957,-3.868937,-87.498108,0.000000,""};
+link0[] = {0,7};
+link1[] = {1,3};
+link2[] = {1,4};
+link3[] = {1,6};
+link4[] = {3,1};
+link5[] = {4,2};
+link6[] = {5,3};
+link7[] = {6,5};
+link8[] = {7,1};
+globals[] = {0.000000,0,0,0,0,640,480,1,29,6316128,1,-395.307037,395.306915,167.465607,-285.572937,407,514,1};
+window[] = {0,-1,-1,-1,-1,834,200,1460,200,1,425};
+*//*%FSM</HEAD>*/
+class FSM
+{
+ fsmName = "updateactions";
+ class States
+ {
+ /*%FSM<STATE "Init">*/
+ class Init
+ {
+ name = "Init";
+ init = /*%FSM<STATEINIT""">*/"_optionsID = -1;" \n
+ "_lastVehicle = player;" \n
+ "_UpdateActions = true;" \n
+ "_lastUpdate = time;"/*%FSM</STATEINIT""">*/;
+ precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
+ class Links
+ {
+ /*%FSM<LINK "_">*/
+ class _
+ {
+ priority = 0.000000;
+ to="Check_Player";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/""/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ };
+ };
+ /*%FSM</STATE>*/
+ /*%FSM<STATE "Check_Player">*/
+ class Check_Player
+ {
+ name = "Check_Player";
+ init = /*%FSM<STATEINIT""">*/"if (Vehicle player != _lastVehicle) then {_UpdateActions = true};" \n
+ "" \n
+ "_lastUpdate = time;"/*%FSM</STATEINIT""">*/;
+ precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
+ class Links
+ {
+ /*%FSM<LINK "Not_Alive">*/
+ class Not_Alive
+ {
+ priority = 1.000000;
+ to="End";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/"gameOver || !alive player"/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ /*%FSM<LINK "Alive">*/
+ class Alive
+ {
+ priority = 0.000000;
+ to="Update_Actions";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/"alive player && !gameOver && _UpdateActions"/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ /*%FSM<LINK "Loop">*/
+ class Loop
+ {
+ priority = 0.000000;
+ to="Check_Player";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/"time - _lastUpdate > 0.5 && !gameOver && alive player && !_UpdateActions"/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ };
+ };
+ /*%FSM</STATE>*/
+ /*%FSM<STATE "End">*/
+ class End
+ {
+ name = "End";
+ init = /*%FSM<STATEINIT""">*/"_lastVehicle RemoveAction _optionsID"/*%FSM</STATEINIT""">*/;
+ precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
+ class Links
+ {
+ };
+ };
+ /*%FSM</STATE>*/
+ /*%FSM<STATE "Update_Actions">*/
+ class Update_Actions
+ {
+ name = "Update_Actions";
+ init = /*%FSM<STATEINIT""">*/"_UpdateActions = false;" \n
+ "_vehicle = Vehicle player;" \n
+ "if (_vehicle != player) then {_optionsID = _vehicle addAction [""<t color='#42b6ff'>"" + (localize ""STR_WF_Options"") + ""</t>"",""Client\Action\Action_Menu.sqf"", """", 1, false, true, """", """"]} else {_lastVehicle RemoveAction _optionsID};" \n
+ "_lastVehicle = _vehicle;"/*%FSM</STATEINIT""">*/;
+ precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
+ class Links
+ {
+ /*%FSM<LINK "Loop">*/
+ class Loop
+ {
+ priority = 0.000000;
+ to="Check_Player";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/"time - _lastUpdate > 0.5 && !gameOver && alive player && !_UpdateActions"/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ };
+ };
+ /*%FSM</STATE>*/
+ };
+ initState="Init";
+ finalStates[] =
+ {
+ "End"
+ };
+};
+/*%FSM</COMPILE>*/ \ No newline at end of file
diff --git a/Client/FSM/updateavailableactions.fsm b/Client/FSM/updateavailableactions.fsm
new file mode 100644
index 0000000..ca1ee4c
--- /dev/null
+++ b/Client/FSM/updateavailableactions.fsm
@@ -0,0 +1,268 @@
+/*%FSM<COMPILE "D:\ArmA2\FSM Editor Personal Edition\scriptedFSM.cfg, updateavailableactions">*/
+/*%FSM<HEAD>*/
+/*
+item0[] = {"Init",0,4346,64.986191,-133.045959,154.986206,-83.046036,0.000000,"Init"};
+item1[] = {"Update_Client_Ac",2,250,-66.836029,-56.267544,23.163887,-6.267582,0.000000,"Update Client" \n "Actions"};
+item2[] = {"End",1,250,-207.023727,26.287281,-117.023697,76.287277,0.000000,"End"};
+item3[] = {"Loop",4,218,65.605347,-56.267605,155.605377,-6.267574,0.000000,"Loop"};
+item4[] = {"Gameover",4,218,-64.280334,28.850353,25.719648,78.850410,0.000000,"Gameover"};
+link0[] = {0,3};
+link1[] = {1,3};
+link2[] = {1,4};
+link3[] = {3,1};
+link4[] = {4,2};
+globals[] = {0.000000,0,0,0,0,640,480,1,38,6316128,1,-317.581665,500.648590,697.417725,-204.557556,596,657,1};
+window[] = {0,-1,-1,-1,-1,802,25,1285,25,1,614};
+*//*%FSM</HEAD>*/
+class FSM
+{
+ fsmName = "updateavailableactions";
+ class States
+ {
+ /*%FSM<STATE "Init">*/
+ class Init
+ {
+ name = "Init";
+ init = /*%FSM<STATEINIT""">*/"_lastUpdate = time;" \n
+ "_txt = '';" \n
+ "_handle = nil;" \n
+ "_ft = 'WFBE_FASTTRAVEL' Call GetNamespace;" \n
+ "_ftr = 'WFBE_FASTTRAVELRANGE' Call GetNamespace;" \n
+ "_mhqbr = 'WFBE_MHQBUILDINGRANGE' Call GetNamespace;" \n
+ "_pur = 'WFBE_PURCHASEUNITSRANGE' Call GetNamespace;" \n
+ "_pura = 'WFBE_PURCHASEUNITSRANGEAIR' Call GetNamespace;" \n
+ "_ccr = 'WFBE_COMMANDCENTERRANGE' Call GetNamespace;" \n
+ "_pgr = 'WFBE_PURCHASEGEARRANGE' Call GetNamespace;" \n
+ "_rptr = 'WFBE_REPAIRTRUCKRANGE' Call GetNamespace;" \n
+ "_spr = 'WFBE_SERVICEPOINTRANGE' Call GetNamespace;" \n
+ "_tpr = 'WFBE_TOWNBUILDPROTECTIONRANGE' Call GetNamespace;" \n
+ "_tcr = 'WFBE_TOWNCAPTURERANGE' Call GetNamespace;" \n
+ "_is = 'WFBE_INCOMESYSTEM' Call GetNamespace;" \n
+ "_ac = 'WFBE_ARTILLERYCOMPUTER' Call GetNamespace;" \n
+ "_buygearfrom = missionNamespace getVariable ""WFBE_TOWNGEAR"";" \n
+ "_acenabled = false;" \n
+ "" \n
+ "_fastTravel = false;" \n
+ "" \n
+ "_commandCenter = objNull;" \n
+ "" \n
+ "_typeRepair = Format['WFBE_%1REPAIRTRUCKS',sideJoinedText] Call GetNamespace;" \n
+ "" \n
+ "//--- Keep actions updated (GUI). - changed-MrNiceGuy " \n
+ "12450 cutRsc [""OptionsAvailable"",""PLAIN"",0];" \n
+ "_icons = [" \n
+ """Client\Images\icon_wf_building_mhq.paa"", //mhq deployable" \n
+ """Client\Images\icon_wf_building_barracks.paa"", //barracks " \n
+ """Client\Images\icon_wf_building_gear.paa"", //gear avail" \n
+ """Client\Images\icon_wf_building_lvs.paa"", //lvsp" \n
+ """Client\Images\icon_wf_building_hvs.paa"", //hvsp" \n
+ """Client\Images\icon_wf_building_air.paa"", //helipad" \n
+ """Client\Images\icon_wf_building_hangar.paa"", //hangar" \n
+ """Client\Images\icon_wf_building_repair.paa"", //rearm | repair | refuel" \n
+ """Client\Images\icon_wf_building_firstaid.paa"", //heal " \n
+ """Client\Images\icon_wf_support_fasttravel.paa"", //fast travel" \n
+ """Client\Images\icon_wf_building_cc.paa"", //command center" \n
+ """Client\Images\icon_wf_building_aa_radar.paa"", //AA radar" \n
+ """Client\Images\icon_wf_building_am_radar.paa"", //ARTY radar" \n
+ """Client\Images\icon_wf_support_transport.paa"", //transport" \n
+ """Client\Images\icon_wf_support_supplydrop.paa"", //supply drop" \n
+ """Client\Images\icon_wf_support_artilery.paa"", //ARTY" \n
+ """Client\Images\icon_wf_support_mortar.paa"", //ARTY - mortar" \n
+ """Client\Images\icon_wf_support_cas.paa"", //CAS" \n
+ """Client\Images\icon_wf_support_uav.paa"" //UAV" \n
+ "];" \n
+ "" \n
+ "_buildings = (sideJoinedText) Call GetSideStructures;"/*%FSM</STATEINIT""">*/;
+ precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
+ class Links
+ {
+ /*%FSM<LINK "Loop">*/
+ class Loop
+ {
+ priority = 0.000000;
+ to="Update_Client_Ac";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/"(time - _lastUpdate > 5 || WFBE_ForceUpdate) && !gameOver"/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ };
+ };
+ /*%FSM</STATE>*/
+ /*%FSM<STATE "Update_Client_Ac">*/
+ class Update_Client_Ac
+ {
+ name = "Update_Client_Ac";
+ init = /*%FSM<STATEINIT""">*/"_buildings = (sideJoinedText) Call GetSideStructures;" \n
+ "_base = (sideJoinedText) Call GetSideHQ;" \n
+ "_upgrades = (sideJoinedText) Call GetSideUpgrades;" \n
+ " " \n
+ "_purchaseRange = if (commandInRange) then {_ccr} else {_pur};" \n
+ " " \n
+ "_nearTown = [player,towns] Call SortByDistance;" \n
+ "_closest = _nearTown select 0;" \n
+ "" \n
+ "if (!isNull(commanderTeam) && paramHighCommand) then {" \n
+ " if (commanderTeam == group player) then {" \n
+ " {if !(isNil '_x') then {if !(_x in (hcAllGroups player)) then {player HCSetGroup [_x]}}} forEach clientTeams;" \n
+ " };" \n
+ "};" \n
+ "" \n
+ "//--- Boundaries are limited ?" \n
+ "if (paramBoundaries) then {" \n
+ " _isOnMap = Call BoundariesIsOnMap;" \n
+ " if !(_isOnMap && alive player) then {" \n
+ " if !(paramBoundariesRunning) then {_handle = [] Spawn BoundariesHandleOnMap};" \n
+ " } else {" \n
+ " if !(isNil '_handle') then {terminate _handle;_handle = nil};" \n
+ " paramBoundariesRunning = false;" \n
+ " };" \n
+ "};" \n
+ "" \n
+ "//--- Map info." \n
+ "if (visibleMap) then {" \n
+ " if (!isNull commanderTeam) then {_txt = format [localize 'STR_WF_Commander',name (leader commanderTeam)]} else {_txt = format [localize 'STR_WF_Commander',localize 'STR_WF_AI']};" \n
+ " _txt = _txt + ' ' + Format [localize ""STR_WF_Income"",Call GetPlayerFunds,(sideJoined) Call GetIncome];" \n
+ " if (_is in [3,4]) then {_txt = _txt + Format["" (%1%2)"", Call Compile Format[""%1CommanderPercent"",sideJoined],""%""]};" \n
+ " if !(paramMoneyOnly) then {_txt = _txt + ' ' + localize 'STR_WF_UPGRADE_Supply' + ': '+ str((sideJoined) Call GetSideSupply)};" \n
+ " (findDisplay 12 displayCtrl 116) ctrlSetText _txt;" \n
+ "};" \n
+ "" \n
+ "//--- HQ." \n
+ "if !(isNull _base) then {hqInRange = if ((player distance _base < _mhqbr)&&(alive _base)&&(player distance _closest > _tpr)) then {true} else {false}};" \n
+ "" \n
+ "barracksInRange = if (isNull (['BARRACKSTYPE',_buildings,_purchaseRange,sideJoined,player] Call BuildingInRange)) then {false} else {true};" \n
+ "gearInRange = if (isNull (['BARRACKSTYPE',_buildings,_pgr,sideJoined,player] Call BuildingInRange)) then {false} else {true};" \n
+ "if !(gearInRange) then {" \n
+ " if (_buygearfrom in [1,2,3]) then {" \n
+ " _lookfor = switch (_buygearfrom) do { case 1:{WFCAMP}; case 2:{WFDEPOT}; case 3:{WFCAMP + WFDEPOT}; default{[]}};" \n
+ " _nObjects = nearestObjects [player, _lookfor, 5];" \n
+ " _nObject = if (count _nObjects > 0) then {_nObjects select 0} else {objNull};" \n
+ " if !(isNull _nObject) then {" \n
+ " _sideID = _nObject getVariable ""sideID"";" \n
+ " if !(isNil '_sideID') then {" \n
+ " if (!gearInRange && sideID == _sideID) then {gearInRange = true} else {gearInRange = false};" \n
+ " };" \n
+ " };" \n
+ " };" \n
+ "};" \n
+ "" \n
+ "lightInRange = if (isNull (['LIGHTTYPE',_buildings,_purchaseRange,sideJoined,player] Call BuildingInRange)) then {false} else {true};" \n
+ "heavyInRange = if (isNull (['HEAVYTYPE',_buildings,_purchaseRange,sideJoined,player] Call BuildingInRange)) then {false} else {true};" \n
+ "aircraftInRange = if (isNull (['AIRCRAFTTYPE',_buildings,_purchaseRange,sideJoined,player] Call BuildingInRange)) then {false} else {true};" \n
+ "serviceInRange = if (isNull (['SERVICEPOINTTYPE',_buildings,_spr,sideJoined,player] Call BuildingInRange)) then {false} else {true};" \n
+ "" \n
+ "if !(serviceInRange) then {" \n
+ " _checks = (getPos player) nearEntities[_typeRepair,_rptr];" \n
+ " if (count _checks > 0) then {serviceInRange = true};" \n
+ "};" \n
+ "" \n
+ "if (paramAARadar) then {" \n
+ " _checks = [sideJoined, Format [""WFBE_%1AARADARTYPE"",sideJoinedText] Call GetNamespace,_buildings] Call GetFactories;" \n
+ " if (count _checks > 0) then {antiAirRadarInRange = true} else {antiAirRadarInRange = false};" \n
+ "};" \n
+ "" \n
+ "//--- Town Depot." \n
+ "_nObjects = nearestObjects [vehicle player, WFDEPOT,('WFBE_TOWNPURCHASERANGE' Call GetNamespace)];" \n
+ "_nObject = if (count _nObjects > 0) then {_nObjects select 0} else {objNull};" \n
+ "if (!isNull _nObject) then {" \n
+ " _sideID = _nObject getVariable ""sideID"";" \n
+ " if !(isNil ""_sideID"") then {" \n
+ " if (_sideID == sideID) then {if (vehicle player distance _nObject < _tcr) then {serviceInRange = true;depotInRange = true} else {depotInRange = false}};" \n
+ " };" \n
+ "} else {depotInRange = false};" \n
+ "" \n
+ "_checks = ['COMMANDCENTERTYPE',_buildings,_ccr,sideJoined,player] Call BuildingInRange;" \n
+ "_commandCenter = _checks;" \n
+ "commandInRange = if (isNull _checks) then {false} else {true};" \n
+ "" \n
+ "//--- Airport." \n
+ "if (paramHangars) then {" \n
+ " _sorted = [player,Airfields] Call SortByDistance;" \n
+ " if (count _sorted > 0) then {" \n
+ " if ((_sorted select 0) distance player < _pura && alive(_sorted select 0)) then {hangarInRange = true} else {hangarInRange = false};" \n
+ " } else {hangarInRange = false};" \n
+ "};" \n
+ "" \n
+ "//--- Fast Travel." \n
+ "if ((_ft > 0) && commandInRange) then {" \n
+ " _fastTravel = false;" \n
+ " _isDeployed = (sideJoinedText) Call GetSideHQDeployed;" \n
+ " if (_upgrades select 12 > 0) then {" \n
+ " if (player distance _base < _ftr && alive _base && _isDeployed) then {_fastTravel = true} else {" \n
+ " _closest = _nearTown select 0;" \n
+ " _sideID = _closest getVariable 'sideID';" \n
+ " if (player distance _closest < _ftr && _sideID == sideID) then {_fastTravel = true} else {" \n
+ " if (!isNull _commandCenter) then {" \n
+ " if (player distance _commandCenter < _ftr) then {_fastTravel = true};" \n
+ " };" \n
+ " };" \n
+ " }; " \n
+ " }; " \n
+ "};" \n
+ "" \n
+ "//--- AC." \n
+ "if (_ac == 1 && !_acenabled && !WF_A2_Vanilla) then {" \n
+ " if ((_upgrades select 10) == 3) then {Call Compile ""enableEngineArtillery true;"";_acenabled = true};" \n
+ "};" \n
+ "" \n
+ "_usable = [hqInRange,barracksInRange,gearInRange,lightInRange,heavyInRange,aircraftInRange,hangarInRange,serviceInRange,serviceInRange,_fastTravel,commandInRange,antiAirRadarInRange];" \n
+ "" \n
+ "_c = 0;" \n
+ "if (isNull ([""currentCutDisplay""] call BIS_FNC_GUIget)) then {12450 cutRsc[""OptionsAvailable"",""PLAIN"",0]};" \n
+ "{" \n
+ " if (_x) then {" \n
+ " (([""currentCutDisplay""] call BIS_FNC_GUIget) DisplayCtrl (3500 + _c)) CtrlSetText (_icons select _c);" \n
+ " } else {" \n
+ " (([""currentCutDisplay""] call BIS_FNC_GUIget) DisplayCtrl (3500 + _c)) CtrlSetText """";" \n
+ " };" \n
+ " _c = _c + 1;" \n
+ "}forEach _usable;" \n
+ "" \n
+ "if (WFBE_ForceUpdate) then {WFBE_ForceUpdate = false};" \n
+ "_lastUpdate = time;"/*%FSM</STATEINIT""">*/;
+ precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
+ class Links
+ {
+ /*%FSM<LINK "Gameover">*/
+ class Gameover
+ {
+ priority = 0.000000;
+ to="End";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/"gameOver"/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ /*%FSM<LINK "Loop">*/
+ class Loop
+ {
+ priority = 0.000000;
+ to="Update_Client_Ac";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/"(time - _lastUpdate > 5 || WFBE_ForceUpdate) && !gameOver"/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ };
+ };
+ /*%FSM</STATE>*/
+ /*%FSM<STATE "End">*/
+ class End
+ {
+ name = "End";
+ init = /*%FSM<STATEINIT""">*/""/*%FSM</STATEINIT""">*/;
+ precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
+ class Links
+ {
+ };
+ };
+ /*%FSM</STATE>*/
+ };
+ initState="Init";
+ finalStates[] =
+ {
+ "End"
+ };
+};
+/*%FSM</COMPILE>*/ \ No newline at end of file
diff --git a/Client/FSM/updatecapture.fsm b/Client/FSM/updatecapture.fsm
new file mode 100644
index 0000000..0dd0934
--- /dev/null
+++ b/Client/FSM/updatecapture.fsm
@@ -0,0 +1,262 @@
+/*%FSM<COMPILE "D:\ArmA2\FSM Editor Personal Edition\scriptedFSM.cfg, updatecapture">*/
+/*%FSM<HEAD>*/
+/*
+item0[] = {"Init",0,4346,64.981941,-136.945908,154.981949,-86.946060,0.000000,"Init"};
+item1[] = {"Check_Towns",2,250,-66.836029,-56.267544,23.163887,-6.267582,0.000000,"Check Towns"};
+item2[] = {"End",1,250,-218.006683,15.304325,-128.006653,65.304314,0.000000,"End"};
+item3[] = {"Loop",4,218,65.605347,-56.267605,155.605377,-6.267574,0.000000,"Loop"};
+item4[] = {"Gameover",4,218,-216.668854,-56.267559,-126.668869,-6.267574,0.000000,"Gameover"};
+item5[] = {"Update_Capture",2,250,66.545486,22.916348,156.545471,72.916397,0.000000,"Update Capture"};
+item6[] = {"In_Range",4,218,-66.545563,22.916351,23.454376,72.916374,0.000000,"In Range"};
+item7[] = {"Not_in_Range",4,218,-167.954971,85.174767,-77.955025,135.174774,0.000000,"Not in Range"};
+item8[] = {"Hide",2,250,215.453018,86.056137,305.453064,136.056137,0.000000,"Hide"};
+link0[] = {0,3};
+link1[] = {1,3};
+link2[] = {1,4};
+link3[] = {1,6};
+link4[] = {1,7};
+link5[] = {3,1};
+link6[] = {4,2};
+link7[] = {5,3};
+link8[] = {6,5};
+link9[] = {7,8};
+link10[] = {8,3};
+globals[] = {0.000000,0,0,0,0,640,480,1,25,6316128,1,-526.153625,526.153442,261.834167,-341.160065,1024,906,1};
+window[] = {2,-1,-1,-1,-1,834,200,1460,200,3,1042};
+*//*%FSM</HEAD>*/
+class FSM
+{
+ fsmName = "updatecapture";
+ class States
+ {
+ /*%FSM<STATE "Init">*/
+ class Init
+ {
+ name = "Init";
+ init = /*%FSM<STATEINIT""">*/"disableSerialization;" \n
+ "_delay = 4;" \n
+ "_lastCheck = """";" \n
+ "_lastSID = -1;" \n
+ "_lastUpdate = time;" \n
+ "" \n
+ "_tcarm = 'WFBE_TOWNCAPTUREASSISTRANGEMODIFIER' Call GetNamespace;" \n
+ "" \n
+ "_colorBlue = [0,0,0.7,0.7];" \n
+ "_colorGreen = [0,0.7,0,0.7];" \n
+ "_colorRed = [0.7,0,0,0.7];" \n
+ "" \n
+ "_colorFriendly = switch ('Friendly' Call GetMarkerColoration) do {" \n
+ " case ""ColorGreen"": {_colorGreen};" \n
+ " case ""ColorBlue"": {_colorBlue};" \n
+ " case ""ColorRed"": {_colorRed};" \n
+ " default {_colorGreen};" \n
+ "};" \n
+ "" \n
+ "_colorEnemy = switch ('Enemy' Call GetMarkerColoration) do {" \n
+ " case ""ColorGreen"": {_colorGreen};" \n
+ " case ""ColorBlue"": {_colorBlue};" \n
+ " case ""ColorRed"": {_colorRed};" \n
+ " default {_colorRed};" \n
+ "};" \n
+ "" \n
+ "_coloResistance = switch ('Resistance' Call GetMarkerColoration) do {" \n
+ " case ""ColorGreen"": {_colorGreen};" \n
+ " case ""ColorBlue"": {_colorBlue};" \n
+ " case ""ColorRed"": {_colorRed};" \n
+ " default {_colorBlue};" \n
+ "};"/*%FSM</STATEINIT""">*/;
+ precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
+ class Links
+ {
+ /*%FSM<LINK "Loop">*/
+ class Loop
+ {
+ priority = 0.000000;
+ to="Check_Towns";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/"time - _lastUpdate > 2 && !gameOver"/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ };
+ };
+ /*%FSM</STATE>*/
+ /*%FSM<STATE "Check_Towns">*/
+ class Check_Towns
+ {
+ name = "Check_Towns";
+ init = /*%FSM<STATEINIT""">*/"_sorted = [player,towns] Call SortByDistance;" \n
+ "_nearest = _sorted select 0;" \n
+ "_range = (_nearest getVariable ""range"") * _tcarm;" \n
+ "" \n
+ "_update = false;" \n
+ "if (player distance _nearest < _range && alive player) then {_update = true};" \n
+ "" \n
+ "_lastUpdate = time;"/*%FSM</STATEINIT""">*/;
+ precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
+ class Links
+ {
+ /*%FSM<LINK "Gameover">*/
+ class Gameover
+ {
+ priority = 0.000000;
+ to="End";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/"gameOver"/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ /*%FSM<LINK "In_Range">*/
+ class In_Range
+ {
+ priority = 0.000000;
+ to="Update_Capture";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/"_update && !gameOver"/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ /*%FSM<LINK "Not_in_Range">*/
+ class Not_in_Range
+ {
+ priority = 0.000000;
+ to="Hide";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/"!_update && !gameOver"/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ /*%FSM<LINK "Loop">*/
+ class Loop
+ {
+ priority = 0.000000;
+ to="Check_Towns";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/"time - _lastUpdate > 2 && !gameOver"/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ };
+ };
+ /*%FSM</STATE>*/
+ /*%FSM<STATE "End">*/
+ class End
+ {
+ name = "End";
+ init = /*%FSM<STATEINIT""">*/""/*%FSM</STATEINIT""">*/;
+ precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
+ class Links
+ {
+ };
+ };
+ /*%FSM</STATE>*/
+ /*%FSM<STATE "Update_Capture">*/
+ class Update_Capture
+ {
+ name = "Update_Capture";
+ init = /*%FSM<STATEINIT""">*/"_sideID = _nearest getVariable ""sideID"";" \n
+ "if (isNil '_sideID') then {_sideID = -1};" \n
+ "_curSV = _nearest getVariable ""supplyValue"";" \n
+ "_maxSV = _nearest getVariable ""maxSupplyValue"";" \n
+ "_txt = """";" \n
+ "_nObjects = nearestObjects [player, WFCAMP, 10];" \n
+ "_nObject = if (count _nObjects > 0) then {_nObjects select 0} else {objNull};" \n
+ "if !(isNull _nObject) then {" \n
+ " _sideID = _nObject getVariable ""sideID"";" \n
+ " if !(isNil '_sideID') then {" \n
+ " _curSV = _nObject getVariable ""supplyValue"";" \n
+ " if (_lastCheck == ""Town"") then {_delay = 0};" \n
+ " _lastCheck = ""Camp"";" \n
+ " } else {" \n
+ " _sideID = -1;" \n
+ " };" \n
+ " if (player distance _nObject >= 10) then {" \n
+ " _lastCheck = ""Town"";" \n
+ " _sideID = _nearest getVariable ""sideID"";" \n
+ " _curSV = _nearest getVariable ""supplyValue"";" \n
+ " _txt = Format [""SV: %1/%2"",_curSV,_maxSV];" \n
+ " };" \n
+ "} else {" \n
+ " if (_lastCheck == ""Camp"") then {_delay = 0};" \n
+ " _lastCheck = ""Town"";" \n
+ " _txt = Format [""SV: %1/%2"",_curSV,_maxSV];" \n
+ "};" \n
+ "" \n
+ "_barColor = [];" \n
+ "if (_sideID == RESISTANCEID || _sideID == -1) then {_barColor = _coloResistance};" \n
+ "if ((_sideID == WESTID)&&(sideID == WESTID) || (_sideID == EASTID)&&(sideID == EASTID)) then {_barColor = _colorFriendly}; //--- Green" \n
+ "if ((_sideID == WESTID)&&(sideID == EASTID) || (_sideID == EASTID)&&(sideID == WESTID)) then {_barColor = _colorEnemy};" \n
+ "if (_sideID != _lastSID) then {_delay = 0};" \n
+ "if (isNull ([""currentCutDisplay""] call BIS_FNC_GUIget)) then {12450 cutRsc[""OptionsAvailable"",""PLAIN"",0];_delay = 0};" \n
+ "if (!isNull ([""currentCutDisplay""] call BIS_FNC_GUIget)) then {" \n
+ " _control = ([""currentCutDisplay""] call BIS_FNC_GUIget) DisplayCtrl 3800;" \n
+ " _control ctrlShow true;" \n
+ " _control CtrlSetBackgroundColor _barColor;" \n
+ " _backgroundControl = ([""currentCutDisplay""] call BIS_FNC_GUIget) DisplayCtrl 3600;" \n
+ " _backgroundControl ctrlShow true;" \n
+ " _backgroundControl CtrlSetBackgroundColor [0.1882, 0.2588, 0.149, 0.76];" \n
+ " _textControl = ([""currentCutDisplay""] call BIS_FNC_GUIget) DisplayCtrl 3900;" \n
+ " _textControl ctrlShow true;" \n
+ " _textControl ctrlSetText _txt;" \n
+ " _maxWidth = (CtrlPosition _backgroundControl Select 2) - 0.02;" \n
+ " _position = CtrlPosition _control;" \n
+ " _position Set[2,_maxWidth * _curSV / _maxSV];" \n
+ " _control CtrlSetPosition _position;" \n
+ " _control CtrlCommit _delay;" \n
+ " _delay = 4;" \n
+ " _lastSID = _sideID;" \n
+ "};"/*%FSM</STATEINIT""">*/;
+ precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
+ class Links
+ {
+ /*%FSM<LINK "Loop">*/
+ class Loop
+ {
+ priority = 0.000000;
+ to="Check_Towns";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/"time - _lastUpdate > 2 && !gameOver"/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ };
+ };
+ /*%FSM</STATE>*/
+ /*%FSM<STATE "Hide">*/
+ class Hide
+ {
+ name = "Hide";
+ init = /*%FSM<STATEINIT""">*/"_delay = 0;" \n
+ "if (isNull ([""currentCutDisplay""] call BIS_FNC_GUIget)) then {12450 cutRsc[""OptionsAvailable"",""PLAIN"",0]};" \n
+ "if (!isNull ([""currentCutDisplay""] call BIS_FNC_GUIget)) then {" \n
+ " _control = ([""currentCutDisplay""] call BIS_FNC_GUIget) DisplayCtrl 3800;" \n
+ " _backgroundControl = ([""currentCutDisplay""] call BIS_FNC_GUIget) DisplayCtrl 3600;" \n
+ " _textControl = ([""currentCutDisplay""] call BIS_FNC_GUIget) DisplayCtrl 3900;" \n
+ " _control ctrlShow false;" \n
+ " _backgroundControl ctrlShow false;" \n
+ " _textControl ctrlShow false;" \n
+ "};"/*%FSM</STATEINIT""">*/;
+ precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
+ class Links
+ {
+ /*%FSM<LINK "Loop">*/
+ class Loop
+ {
+ priority = 0.000000;
+ to="Check_Towns";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/"time - _lastUpdate > 2 && !gameOver"/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ };
+ };
+ /*%FSM</STATE>*/
+ };
+ initState="Init";
+ finalStates[] =
+ {
+ "End"
+ };
+};
+/*%FSM</COMPILE>*/ \ No newline at end of file
diff --git a/Client/FSM/updateclient.fsm b/Client/FSM/updateclient.fsm
new file mode 100644
index 0000000..f6f1538
--- /dev/null
+++ b/Client/FSM/updateclient.fsm
@@ -0,0 +1,175 @@
+/*%FSM<COMPILE "D:\ArmA2\FSM Editor Personal Edition\scriptedFSM.cfg, updateclient">*/
+/*%FSM<HEAD>*/
+/*
+item0[] = {"Init",0,250,66.278671,-152.869141,156.278748,-102.869209,0.000000,"Init"};
+item1[] = {"Update_Client",2,250,-66.836029,-56.267544,23.163887,-6.267582,0.000000,"Update Client"};
+item2[] = {"End",1,250,-218.006683,15.304325,-128.006653,65.304314,0.000000,"End"};
+item3[] = {"Loop",4,218,65.605347,-56.267605,155.605377,-6.267574,0.000000,"Loop"};
+item4[] = {"Gameover",4,218,-216.668854,-56.267559,-126.668869,-6.267574,0.000000,"Gameover"};
+item5[] = {"Update_Commander",2,4346,66.545486,22.916348,156.545471,72.916397,0.000000,"Update" \n "Commander"};
+item6[] = {"Change_Commander",4,218,-66.545563,22.916351,23.454376,72.916374,0.000000,"Change" \n "Commander"};
+link0[] = {0,3};
+link1[] = {1,3};
+link2[] = {1,4};
+link3[] = {1,6};
+link4[] = {3,1};
+link5[] = {4,2};
+link6[] = {5,3};
+link7[] = {6,5};
+globals[] = {0.000000,0,0,0,0,640,480,1,22,6316128,1,-345.209412,345.209290,108.499458,-297.536255,1028,906,1};
+window[] = {2,-1,-1,-1,-1,834,200,1652,200,3,1046};
+*//*%FSM</HEAD>*/
+class FSM
+{
+ fsmName = "updateclient";
+ class States
+ {
+ /*%FSM<STATE "Init">*/
+ class Init
+ {
+ name = "Init";
+ init = /*%FSM<STATEINIT""">*/"commanderTeam = (SideJoined) Call GetCommanderTeam;" \n
+ "" \n
+ "_lastCommanderTeam = commanderTeam;" \n
+ "_changeCommander = false;" \n
+ "_timer = 0;" \n
+ "_lastUpdate = time;"/*%FSM</STATEINIT""">*/;
+ precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
+ class Links
+ {
+ /*%FSM<LINK "Loop">*/
+ class Loop
+ {
+ priority = 0.000000;
+ to="Update_Client";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/"time - _lastUpdate > 1 && !gameOver"/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ };
+ };
+ /*%FSM</STATE>*/
+ /*%FSM<STATE "Update_Client">*/
+ class Update_Client
+ {
+ name = "Update_Client";
+ init = /*%FSM<STATEINIT""">*/"commanderTeam = (sideJoined) Call GetCommanderTeam;" \n
+ "if (IsNull commanderTeam && !IsNull _lastCommanderTeam) then {_changeCommander = true};" \n
+ "if (!IsNull commanderTeam && IsNull _lastCommanderTeam) then {_changeCommander = true};" \n
+ "if (!isNull commanderTeam && !isNull _lastCommanderTeam) then {" \n
+ " if (commanderTeam != _lastCommanderTeam) then {_changeCommander = true};" \n
+ "};" \n
+ "" \n
+ "_lastUpdate = time;"/*%FSM</STATEINIT""">*/;
+ precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
+ class Links
+ {
+ /*%FSM<LINK "Gameover">*/
+ class Gameover
+ {
+ priority = 0.000000;
+ to="End";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/"gameOver"/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ /*%FSM<LINK "Change_Commander">*/
+ class Change_Commander
+ {
+ priority = 0.000000;
+ to="Update_Commander";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/"_changeCommander && !gameOver"/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ /*%FSM<LINK "Loop">*/
+ class Loop
+ {
+ priority = 0.000000;
+ to="Update_Client";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/"time - _lastUpdate > 1 && !gameOver"/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ };
+ };
+ /*%FSM</STATE>*/
+ /*%FSM<STATE "End">*/
+ class End
+ {
+ name = "End";
+ init = /*%FSM<STATEINIT""">*/""/*%FSM</STATEINIT""">*/;
+ precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
+ class Links
+ {
+ };
+ };
+ /*%FSM</STATE>*/
+ /*%FSM<STATE "Update_Commander">*/
+ class Update_Commander
+ {
+ name = "Update_Commander";
+ init = /*%FSM<STATEINIT""">*/"_changeCommander = false;" \n
+ "_lastCommanderTeam = commanderTeam; " \n
+ "_MHQ = (sideJoinedText) Call GetSideHQ;" \n
+ "" \n
+ "if (IsNull commanderTeam) then {" \n
+ " if (!IsNull _MHQ) then {" \n
+ " _MHQ RemoveAction 0;" \n
+ " _MHQ RemoveAction 1;" \n
+ " _MHQ RemoveAction 2;" \n
+ " _MHQ RemoveAction 3;" \n
+ " };" \n
+ " if (!isNil ""HQAction"") then {player removeAction HQAction};" \n
+ " if (count (hcAllGroups player) > 0) then {HCRemoveAllGroups player};" \n
+ " {[_x,false] Call SetTeamAutonomous} forEach clientTeams;" \n
+ "};" \n
+ " " \n
+ "if (!isNull(commanderTeam)) then {" \n
+ " if (commanderTeam == Group player) then {" \n
+ " if (!IsNull _MHQ) then {" \n
+ " _MHQ addAction [localize ""STR_WF_Unlock_MHQ"",""Client\Action\Action_ToggleLock.sqf"", [], 95, false, true, '', 'alive _target && locked _target'];" \n
+ " _MHQ addAction [localize ""STR_WF_Lock_MHQ"",""Client\Action\Action_ToggleLock.sqf"", [], 94, false, true, '', 'alive _target && !(locked _target)'];" \n
+ " };" \n
+ " _deployed = (sideJoinedText) Call GetSideHQDeployed;" \n
+ " if (_deployed) then {" \n
+ " ['WFBE_AREAHQDEPLOYED' Call GetNameSpace,true,MCoin] Call Compile PreprocessFile ""Client\Init\Init_Coin.sqf"";" \n
+ " } else {" \n
+ " ['WFBE_AREAHQUNDEPLOYED' Call GetNamespace,false,MCoin] Call Compile PreprocessFile ""Client\Init\Init_Coin.sqf"";" \n
+ " };" \n
+ " HQAction = leader(group player) addAction [localize ""STR_WF_BuildMenu"",""Client\Action\Action_Build.sqf"", [_MHQ], 100, false, true, """", ""hqInRange && canBuildWHQ && (_target == player)""]; " \n
+ " if (paramHighCommand) then {player setVariable [""BIS_HC_scope"",HC];{if !(isNil '_x') then {player HCSetGroup [_x]; [_x,false] Call SetTeamAutonomous}} forEach clientTeams};" \n
+ " [Localize ""STR_WF_CHAT_PlayerCommander""] Call TitleTextMessage;" \n
+ " } else {" \n
+ " if (!isNil ""HQAction"") then {player removeAction HQAction};" \n
+ " if (count (hcAllGroups player) > 0 && paramHighCommand) then {HCRemoveAllGroups player};" \n
+ " };" \n
+ "};"/*%FSM</STATEINIT""">*/;
+ precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
+ class Links
+ {
+ /*%FSM<LINK "Loop">*/
+ class Loop
+ {
+ priority = 0.000000;
+ to="Update_Client";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/"time - _lastUpdate > 1 && !gameOver"/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ };
+ };
+ /*%FSM</STATE>*/
+ };
+ initState="Init";
+ finalStates[] =
+ {
+ "End"
+ };
+};
+/*%FSM</COMPILE>*/ \ No newline at end of file
diff --git a/Client/FSM/updatesalvage.fsm b/Client/FSM/updatesalvage.fsm
new file mode 100644
index 0000000..2030f0c
--- /dev/null
+++ b/Client/FSM/updatesalvage.fsm
@@ -0,0 +1,165 @@
+/*%FSM<COMPILE "D:\ArmA2\FSM Editor Personal Edition\scriptedFSM.cfg, updatesalvage">*/
+/*%FSM<HEAD>*/
+/*
+item0[] = {"Init",0,250,-64.944939,-176.579712,25.055046,-126.579880,0.000000,"Init"};
+item1[] = {"Check_Towns",2,250,-66.836029,-56.267544,23.163887,-6.267582,0.000000,"Check Towns"};
+item2[] = {"End",1,250,-218.006683,15.304325,-128.006653,65.304314,0.000000,"End"};
+item3[] = {"Loop",4,218,65.605347,-56.267605,155.605377,-6.267574,0.000000,"Loop"};
+item4[] = {"Truck_is_Dead",4,218,-216.668854,-56.267559,-126.668869,-6.267574,1.000000,"Truck is" \n "Dead"};
+item5[] = {"Check_Wrecks",2,4346,66.545509,15.865158,156.545563,65.865219,0.000000,"Check Wrecks"};
+item6[] = {"Has_Driver",4,218,-66.545601,15.865162,23.454397,65.865189,0.000000,"Has Driver"};
+item7[] = {"_",8,218,-37.459465,-108.411957,-3.868937,-87.498108,0.000000,""};
+link0[] = {0,7};
+link1[] = {1,3};
+link2[] = {1,4};
+link3[] = {1,6};
+link4[] = {3,1};
+link5[] = {4,2};
+link6[] = {5,3};
+link7[] = {6,5};
+link8[] = {7,1};
+globals[] = {0.000000,0,0,0,0,640,480,1,29,6316128,1,-280.138428,228.260757,186.219727,-258.197296,588,514,1};
+window[] = {0,-1,-1,-1,-1,732,48,1308,98,1,606};
+*//*%FSM</HEAD>*/
+class FSM
+{
+ fsmName = "updatesalvage";
+ class States
+ {
+ /*%FSM<STATE "Init">*/
+ class Init
+ {
+ name = "Init";
+ init = /*%FSM<STATEINIT""">*/"_vehicle = _this select 0;" \n
+ "" \n
+ "_salvagerRange = 'WFBE_SALVAGERRANGE' Call GetNamespace;" \n
+ "_percentage = 'WFBE_SALVAGERPERCENT' Call GetNamespace;" \n
+ "" \n
+ "_lastUpdate = time;"/*%FSM</STATEINIT""">*/;
+ precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
+ class Links
+ {
+ /*%FSM<LINK "_">*/
+ class _
+ {
+ priority = 0.000000;
+ to="Check_Towns";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/""/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ };
+ };
+ /*%FSM</STATE>*/
+ /*%FSM<STATE "Check_Towns">*/
+ class Check_Towns
+ {
+ name = "Check_Towns";
+ init = /*%FSM<STATEINIT""">*/"_lastUpdate = time;"/*%FSM</STATEINIT""">*/;
+ precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
+ class Links
+ {
+ /*%FSM<LINK "Truck_is_Dead">*/
+ class Truck_is_Dead
+ {
+ priority = 1.000000;
+ to="End";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/"gameOver || !(alive _vehicle)"/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ /*%FSM<LINK "Has_Driver">*/
+ class Has_Driver
+ {
+ priority = 0.000000;
+ to="Check_Wrecks";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/"!(isNull (driver _vehicle)) && !gameOver && alive _vehicle"/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ /*%FSM<LINK "Loop">*/
+ class Loop
+ {
+ priority = 0.000000;
+ to="Check_Towns";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/"time - _lastUpdate > 5 && !gameOver && alive _vehicle"/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ };
+ };
+ /*%FSM</STATE>*/
+ /*%FSM<STATE "End">*/
+ class End
+ {
+ name = "End";
+ init = /*%FSM<STATEINIT""">*/""/*%FSM</STATEINIT""">*/;
+ precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
+ class Links
+ {
+ };
+ };
+ /*%FSM</STATE>*/
+ /*%FSM<STATE "Check_Wrecks">*/
+ class Check_Wrecks
+ {
+ name = "Check_Wrecks";
+ init = /*%FSM<STATEINIT""">*/"_vehicles = nearestObjects [getPos _vehicle, ['Car','Motorcycle','Ship','Air','Tank','StaticWeapon'],_salvagerRange];" \n
+ "" \n
+ "_wrecks = [];" \n
+ "{" \n
+ " if !(alive _x) then {_wrecks = _wrecks + [_x]};" \n
+ "} forEach _vehicles;" \n
+ "" \n
+ "_hqw = (west) Call GetSideHQ;" \n
+ "_hqe = (east) Call GetSideHQ;" \n
+ "" \n
+ "_wrecks = _wrecks - [_hqw,_hqe];" \n
+ "" \n
+ "_overAllCost = 0;" \n
+ "{" \n
+ " _isNeeded = _x getVariable 'keepAlive';" \n
+ " " \n
+ " if (isNil '_isNeeded') then {" \n
+ " _get = (typeOf _x) Call GetNamespace;" \n
+ " _salvageCost = 250;" \n
+ " if !(isNil '_get') then {" \n
+ " _salvageCost = round(((_get select QUERYUNITPRICE)*_percentage) / 100);" \n
+ " };" \n
+ " " \n
+ " _overAllCost = _overAllCost + _salvageCost;" \n
+ " (Format [localize 'STR_WF_CHAT_Salvaged_Unit',_salvageCost,[typeOf _x,'displayName'] Call GetConfigInfo]) Call GroupChatMessage;" \n
+ " " \n
+ " deleteVehicle _x;" \n
+ " };" \n
+ "} foreach _wrecks;" \n
+ "" \n
+ "if (_overAllCost > 0) then {(_overAllCost) Call ChangePlayerfunds};"/*%FSM</STATEINIT""">*/;
+ precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
+ class Links
+ {
+ /*%FSM<LINK "Loop">*/
+ class Loop
+ {
+ priority = 0.000000;
+ to="Check_Towns";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/"time - _lastUpdate > 5 && !gameOver && alive _vehicle"/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ };
+ };
+ /*%FSM</STATE>*/
+ };
+ initState="Init";
+ finalStates[] =
+ {
+ "End",
+ };
+};
+/*%FSM</COMPILE>*/ \ No newline at end of file
diff --git a/Client/FSM/updatesupply.fsm b/Client/FSM/updatesupply.fsm
new file mode 100644
index 0000000..1340f01
--- /dev/null
+++ b/Client/FSM/updatesupply.fsm
@@ -0,0 +1,213 @@
+/*%FSM<COMPILE "F:\ArmA2\FSM Editor Personal Edition\scriptedFSM.cfg, updatesupply">*/
+/*%FSM<HEAD>*/
+/*
+item0[] = {"Init",0,250,-64.944939,-176.579712,25.055046,-126.579880,0.000000,"Init"};
+item1[] = {"Check_Towns",2,250,-66.836029,-56.267544,23.163887,-6.267582,0.000000,"Check Towns"};
+item2[] = {"End",1,250,-218.006683,15.304325,-128.006653,65.304314,0.000000,"End"};
+item3[] = {"Loop",4,218,65.605347,-56.267605,155.605377,-6.267574,0.000000,"Loop"};
+item4[] = {"Truck_is_Dead",4,218,-216.668854,-56.267559,-126.668869,-6.267574,1.000000,"Truck is" \n "Dead"};
+item5[] = {"Truck_Check",2,4346,66.545509,15.865158,156.545563,65.865219,0.000000,"Truck Check"};
+item6[] = {"Has_Driver",4,218,-66.545601,15.865162,23.454397,65.865189,0.000000,"Has Driver"};
+item7[] = {"_",8,218,-37.459465,-108.411957,-3.868937,-87.498108,0.000000,""};
+link0[] = {0,7};
+link1[] = {1,3};
+link2[] = {1,4};
+link3[] = {1,6};
+link4[] = {3,1};
+link5[] = {4,2};
+link6[] = {5,3};
+link7[] = {6,5};
+link8[] = {7,1};
+globals[] = {0.000000,0,0,0,0,640,480,1,29,6316128,1,-395.307037,395.306915,167.465607,-285.572937,588,519,1};
+window[] = {0,-1,-1,-1,-1,745,56,1316,111,1,606};
+*//*%FSM</HEAD>*/
+class FSM
+{
+ fsmName = "updatesupply";
+ class States
+ {
+ /*%FSM<STATE "Init">*/
+ class Init
+ {
+ name = "Init";
+ init = /*%FSM<STATEINIT""">*/"_vehicle = _this select 0;" \n
+ "_side = _this select 1;" \n
+ "_driver = driver _vehicle;" \n
+ "_lastDriver = driver _vehicle;" \n
+ "" \n
+ "_SV = 1000;" \n
+ "_currentSV = 0;" \n
+ "_maxSV = 0;" \n
+ "_timer = 0;" \n
+ "_exit = false;" \n
+ "_canDeliver = false;" \n
+ "_hq = (sideJoinedText) Call GetSideHQ;" \n
+ "_lastDestination = _hq;" \n
+ "_delRange = 'WFBE_DELIVERYRANGE' Call GetNamespace;" \n
+ "_fpsp = 'WFBE_FUNDSPERSUPPLYPOINT' Call GetNamespace;" \n
+ "_spsp = 'WFBE_SCOREPERSUPPLYPOINT' Call GetNamespace;" \n
+ "" \n
+ "_lastUpdate = time;"/*%FSM</STATEINIT""">*/;
+ precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
+ class Links
+ {
+ /*%FSM<LINK "_">*/
+ class _
+ {
+ priority = 0.000000;
+ to="Check_Towns";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/""/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ };
+ };
+ /*%FSM</STATE>*/
+ /*%FSM<STATE "Check_Towns">*/
+ class Check_Towns
+ {
+ name = "Check_Towns";
+ init = /*%FSM<STATEINIT""">*/"if (!alive _vehicle || isNull _vehicle) then {_exit = true}; " \n
+ "" \n
+ "_driver = driver _vehicle;" \n
+ "_hasDriver = false;" \n
+ "_playerInVehicle = false;" \n
+ "if (!IsNull _driver) then {" \n
+ " if (Alive _driver) then {_hasDriver = true};" \n
+ " if (isPlayer _driver) then {_playerInVehicle = true};" \n
+ "};" \n
+ "" \n
+ "_lastDriver = _driver;" \n
+ "_lastUpdate = time;"/*%FSM</STATEINIT""">*/;
+ precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
+ class Links
+ {
+ /*%FSM<LINK "Truck_is_Dead">*/
+ class Truck_is_Dead
+ {
+ priority = 1.000000;
+ to="End";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/"gameOver || _exit"/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ /*%FSM<LINK "Has_Driver">*/
+ class Has_Driver
+ {
+ priority = 0.000000;
+ to="Truck_Check";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/"_hasDriver && !gameOver && !_exit"/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ /*%FSM<LINK "Loop">*/
+ class Loop
+ {
+ priority = 0.000000;
+ to="Check_Towns";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/"time - _lastUpdate > 3 && !gameOver && !_exit"/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ };
+ };
+ /*%FSM</STATE>*/
+ /*%FSM<STATE "End">*/
+ class End
+ {
+ name = "End";
+ init = /*%FSM<STATEINIT""">*/""/*%FSM</STATEINIT""">*/;
+ precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
+ class Links
+ {
+ };
+ };
+ /*%FSM</STATE>*/
+ /*%FSM<STATE "Truck_Check">*/
+ class Truck_Check
+ {
+ name = "Truck_Check";
+ init = /*%FSM<STATEINIT""">*/"if (!isNull _driver) then {" \n
+ " if (_driver != _lastDriver) then {" \n
+ " _lastDriver = _driver;" \n
+ " if (_playerInVehicle) then {" \n
+ " _txt = localize ""STR_WF_INFO_Supply_Full"";" \n
+ " if (_SV != 1000) then {_txt = Format [localize ""STR_WF_INFO_Supply_Status"",_SV]};" \n
+ " hint _txt;" \n
+ " };" \n
+ " };" \n
+ "};" \n
+ " " \n
+ "_hq = (sideJoinedText) Call GetSideHQ;" \n
+ "_isDeployed = (sideJoinedText) Call GetSideHQDeployed;" \n
+ "if (_vehicle Distance _hq < 70 && _SV != 1000 && getDammage _hq < 1 && _isDeployed) then {_SV = 1000;_vehicle setFuel 1;_lastDestination = _hq;if (_playerInVehicle) then {hint (localize ""STR_WF_INFO_Supply_Full"")}};" \n
+ "" \n
+ "if (_SV != 1000) then {" \n
+ " _buildings = (sideJoinedText) Call GetSideStructures;" \n
+ " _checks = [sideJoined,Format [""WFBE_%1SERVICEPOINTTYPE"",sideJoinedText] Call GetNamespace,_buildings] Call GetFactories;" \n
+ " if (count _checks > 0) then {" \n
+ " _sorted = [_vehicle,_checks] Call SortByDistance;" \n
+ " _nearest = _sorted select 0;" \n
+ " if (_vehicle distance _nearest < 70) then {_SV = 1000;_vehicle setFuel 1;_lastDestination = _nearest;if (_playerInVehicle) then {hint (localize ""STR_WF_INFO_Supply_Full"")}};" \n
+ " };" \n
+ "};" \n
+ "" \n
+ "_loc = [_vehicle,towns] Call SortByDistance;" \n
+ "_closest = _loc select 0;" \n
+ "_name = _closest getVariable ""name"";" \n
+ "_locationSide = (_closest getVariable ""sideID"") Call GetSideFromID;" \n
+ "" \n
+ "_canDeliver = if (_locationSide == _side) then {true} else {false};" \n
+ "" \n
+ "if ((_vehicle Distance _closest < _delRange)&&(_canDeliver)&&(_lastDestination != _closest)) then {" \n
+ " _lastDestination = _closest;" \n
+ " _currentSV = _closest getVariable ""supplyValue"";" \n
+ " _maxSV = _closest getVariable ""maxSupplyValue"";" \n
+ " if (_SV > _currentSV) then {" \n
+ " if (_currentSV != _maxSV) then {" \n
+ " _upgrades = (sideJoinedText) Call GetSideUpgrades;" \n
+ " _increaseOf = (Format[""WFBE_MAXSUPPLYTRUCKSSV%1"",_upgrades select 6] Call GetNamespace);" \n
+ " _currentSV = _currentSV + _increaseOf;" \n
+ " if (_currentSV > _maxSV) then {_currentSV = _maxSV};" \n
+ " _closest setVariable [""supplyValue"",_currentSV,true];" \n
+ " };" \n
+ " _SV = _currentSV;" \n
+ " _funds = _SV * _fpsp * 2;" \n
+ " hint Format[localize ""STR_WF_INFO_Supply_Deliver"",_name,_SV,_maxSV,_funds];" \n
+ " _funds Call ChangePlayerFunds;" \n
+ " } else {" \n
+ " hint Format[localize ""STR_WF_INFO_Supply_Equal"",_name,_currentSV,_maxSV];" \n
+ " _SV = _currentSV;" \n
+ " };" \n
+ " WFBE_RequestChangeScore = ['SRVFNCREQUESTCHANGESCORE',[player,score player + _spsp]];" \n
+ " publicVariable 'WFBE_RequestChangeScore';" \n
+ " if (isHostedServer) then {['SRVFNCREQUESTCHANGESCORE',[player,score player + _spsp]] Spawn HandleSPVF};" \n
+ "};"/*%FSM</STATEINIT""">*/;
+ precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
+ class Links
+ {
+ /*%FSM<LINK "Loop">*/
+ class Loop
+ {
+ priority = 0.000000;
+ to="Check_Towns";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/"time - _lastUpdate > 3 && !gameOver && !_exit"/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ };
+ };
+ /*%FSM</STATE>*/
+ };
+ initState="Init";
+ finalStates[] =
+ {
+ "End"
+ };
+};
+/*%FSM</COMPILE>*/ \ No newline at end of file
diff --git a/Client/FSM/updateteamsmarkers.fsm b/Client/FSM/updateteamsmarkers.fsm
new file mode 100644
index 0000000..a304236
--- /dev/null
+++ b/Client/FSM/updateteamsmarkers.fsm
@@ -0,0 +1,125 @@
+/*%FSM<COMPILE "D:\ArmA2\FSM Editor Personal Edition\scriptedFSM.cfg, updateteamsmarkers">*/
+/*%FSM<HEAD>*/
+/*
+item0[] = {"Init",0,250,66.542603,-131.405823,156.542603,-81.406097,0.000000,"Init"};
+item1[] = {"Update_Markers",2,4346,-66.836029,-56.267544,23.163887,-6.267582,0.000000,"Update Markers"};
+item2[] = {"End",1,250,-194.208939,14.422928,-104.208908,64.422928,0.000000,"End"};
+item3[] = {"Loop",4,218,65.605347,-56.267605,155.605377,-6.267574,0.000000,"Loop"};
+item4[] = {"Gameover",4,218,-192.871109,-57.148956,-102.871117,-7.148972,0.000000,"Gameover"};
+link0[] = {0,3};
+link1[] = {1,3};
+link2[] = {1,4};
+link3[] = {3,1};
+link4[] = {4,2};
+globals[] = {0.000000,0,0,0,0,640,480,1,14,6316128,1,-395.307037,395.306915,79.046959,-351.956635,725,514,1};
+window[] = {0,-1,-1,-1,-1,734,100,1360,100,1,743};
+*//*%FSM</HEAD>*/
+class FSM
+{
+ fsmName = "updateteamsmarkers";
+ class States
+ {
+ /*%FSM<STATE "Init">*/
+ class Init
+ {
+ name = "Init";
+ init = /*%FSM<STATEINIT""">*/"_sideText = sideJoinedText;" \n
+ "_label = """";" \n
+ "" \n
+ "_count = 1;" \n
+ "{" \n
+ " _marker = Format[""%1AdvancedSquad%2Marker"",_sideText,_count];" \n
+ " createMarkerLocal [_marker,[0,0,0]];" \n
+ " _marker setMarkerTypeLocal ""b_inf"";" \n
+ " _marker setMarkerColorLocal ""ColorBlue"";" \n
+ " _marker setMarkerSizeLocal [1,1];" \n
+ " _count = _count +1;" \n
+ "} forEach clientTeams;" \n
+ "" \n
+ "_lastUpdate = time;"/*%FSM</STATEINIT""">*/;
+ precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
+ class Links
+ {
+ /*%FSM<LINK "Loop">*/
+ class Loop
+ {
+ priority = 0.000000;
+ to="Update_Markers";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/"time - _lastUpdate > 1 && !gameOver"/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ };
+ };
+ /*%FSM</STATE>*/
+ /*%FSM<STATE "Update_Markers">*/
+ class Update_Markers
+ {
+ name = "Update_Markers";
+ init = /*%FSM<STATEINIT""">*/"_count = 1;" \n
+ "{" \n
+ " if !(isNil '_x') then {" \n
+ " _markerType = ""b_inf"";" \n
+ " _marker = Format[""%1AdvancedSquad%2Marker"",_sideText,_count];" \n
+ " " \n
+ " if (alive (leader _x)) then {" \n
+ " _label = """";" \n
+ " if (isPlayer (leader _x)) then {_label = Format[""%1 [%2]"",name (leader _x),_count]} else {_label = Format[""AI [%1]"",_count]};" \n
+ " _marker setMarkerTextLocal _label;" \n
+ " _marker setMarkerPosLocal GetPos (leader _x);" \n
+ " } else {" \n
+ " _markerType = ""b_empty"";" \n
+ " };" \n
+ " " \n
+ " _marker setMarkerTypeLocal _markerType;" \n
+ " };" \n
+ " _count = _count + 1;" \n
+ "} forEach clientTeams;" \n
+ "" \n
+ "_lastUpdate = time;"/*%FSM</STATEINIT""">*/;
+ precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
+ class Links
+ {
+ /*%FSM<LINK "Gameover">*/
+ class Gameover
+ {
+ priority = 0.000000;
+ to="End";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/"gameOver"/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ /*%FSM<LINK "Loop">*/
+ class Loop
+ {
+ priority = 0.000000;
+ to="Update_Markers";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/"time - _lastUpdate > 1 && !gameOver"/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ };
+ };
+ /*%FSM</STATE>*/
+ /*%FSM<STATE "End">*/
+ class End
+ {
+ name = "End";
+ init = /*%FSM<STATEINIT""">*/""/*%FSM</STATEINIT""">*/;
+ precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
+ class Links
+ {
+ };
+ };
+ /*%FSM</STATE>*/
+ };
+ initState="Init";
+ finalStates[] =
+ {
+ "End"
+ };
+};
+/*%FSM</COMPILE>*/ \ No newline at end of file
diff --git a/Client/FSM/updatetownmarkers.fsm b/Client/FSM/updatetownmarkers.fsm
new file mode 100644
index 0000000..ac92ea9
--- /dev/null
+++ b/Client/FSM/updatetownmarkers.fsm
@@ -0,0 +1,112 @@
+/*%FSM<COMPILE "F:\ArmA2\FSM Editor Personal Edition\scriptedFSM.cfg, updatetownmarkers">*/
+/*%FSM<HEAD>*/
+/*
+item0[] = {"Init",0,250,64.620567,-141.323822,154.620590,-91.323967,0.000000,"Init"};
+item1[] = {"Check_Towns",2,250,-65.773369,-55.204887,24.226547,-5.204931,0.000000,"Check Towns"};
+item2[] = {"End",1,250,-218.006683,15.304325,-128.006653,65.304314,0.000000,"End"};
+item3[] = {"Loop",4,4314,65.605347,-56.267605,155.605377,-6.267574,0.000000,"Loop"};
+item4[] = {"Gameover",4,218,-216.668854,-56.267559,-126.668869,-6.267574,0.000000,"Gameover"};
+link0[] = {0,3};
+link1[] = {1,3};
+link2[] = {1,4};
+link3[] = {3,1};
+link4[] = {4,2};
+globals[] = {0.000000,0,0,0,0,640,480,1,30,6316128,1,-395.307037,395.306915,93.428192,-337.575409,744,519,1};
+window[] = {0,-1,-1,-1,-1,721,66,1398,87,1,762};
+*//*%FSM</HEAD>*/
+class FSM
+{
+ fsmName = "updatetownmarkers";
+ class States
+ {
+ /*%FSM<STATE "Init">*/
+ class Init
+ {
+ name = "Init";
+ init = /*%FSM<STATEINIT""">*/"_lastUpdate = time;" \n
+ "_lastSV = [];" \n
+ "" \n
+ "_tcarm = 'WFBE_TOWNCAPTUREASSISTRANGEMODIFIER' Call GetNamespace;"/*%FSM</STATEINIT""">*/;
+ precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
+ class Links
+ {
+ /*%FSM<LINK "Loop">*/
+ class Loop
+ {
+ priority = 0.000000;
+ to="Check_Towns";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/"time - _lastUpdate > 5 && !gameOver"/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ };
+ };
+ /*%FSM</STATE>*/
+ /*%FSM<STATE "Check_Towns">*/
+ class Check_Towns
+ {
+ name = "Check_Towns";
+ init = /*%FSM<STATEINIT""">*/"_count = 0;" \n
+ "_units = (Units Group player) Call GetLiveUnits;" \n
+ "while {_count < totalTowns} do {" \n
+ " _location = towns Select _count;" \n
+ " _locationName = _location getVariable ""name"";" \n
+ " _maxSV = _location getVariable ""maxSupplyValue"";" \n
+ " _range = (_location getVariable ""range"") * _tcarm;" \n
+ " _sideID = _location getVariable ""sideID"";" \n
+ " _SV = _location getVariable ""supplyValue"";" \n
+ " _visible = false;" \n
+ " if (_sideID == sideID) then {_visible = true} else {{if (_x Distance _location < _range) then {_visible = true}} ForEach _units};" \n
+ " _marker = Format[""%1Depot"",Str _location];" \n
+ " if (_visible) then {_marker SetMarkerTextLocal Format["" SV: %1/%2"",_SV,_maxSV]} else {_marker SetMarkerTextLocal """"};" \n
+ " _lastSV set [_count,_SV];" \n
+ " _count = _count + 1;" \n
+ "};" \n
+ "" \n
+ "_lastUpdate = time;"/*%FSM</STATEINIT""">*/;
+ precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
+ class Links
+ {
+ /*%FSM<LINK "Gameover">*/
+ class Gameover
+ {
+ priority = 0.000000;
+ to="End";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/"gameOver"/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ /*%FSM<LINK "Loop">*/
+ class Loop
+ {
+ priority = 0.000000;
+ to="Check_Towns";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/"time - _lastUpdate > 5 && !gameOver"/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ };
+ };
+ /*%FSM</STATE>*/
+ /*%FSM<STATE "End">*/
+ class End
+ {
+ name = "End";
+ init = /*%FSM<STATEINIT""">*/""/*%FSM</STATEINIT""">*/;
+ precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
+ class Links
+ {
+ };
+ };
+ /*%FSM</STATE>*/
+ };
+ initState="Init";
+ finalStates[] =
+ {
+ "End"
+ };
+};
+/*%FSM</COMPILE>*/ \ No newline at end of file
diff --git a/Client/Functions/Client_BuildUnit.sqf b/Client/Functions/Client_BuildUnit.sqf
new file mode 100644
index 0000000..ae71a20
--- /dev/null
+++ b/Client/Functions/Client_BuildUnit.sqf
@@ -0,0 +1,240 @@
+Private ["_building","_cpt","_commander","_created","_crew","_currentUnit","_description","_direction","_distance","_driver","_extracrew","_factory","_factoryPosition","_factoryType","_group","_gunner","_index","_init","_isArtillery","_isMan","_locked","_longest","_position","_queu","_queu2","_ret","_show","_soldier","_waitTime","_txt","_type","_upgrades","_unique","_unit","_vehi","_vehicle","_vehicles"];
+_building = _this select 0;
+_unit = _this select 1;
+_vehi = _this select 2;
+_factory = _this select 3;
+_cpt = _this select 4;
+
+_isMan = if (_unit isKindOf "Man") then {true} else {false};
+
+unitQueu = unitQueu + _cpt;
+
+_distance = 0;
+_direction = 0;
+_longest = 0;
+_position = 0;
+_waitTime = 0;
+_factoryType = "";
+_description = "";
+
+_currentUnit = _unit Call GetNamespace;
+_waitTime = _currentUnit select QUERYUNITTIME;
+_description = _currentUnit select QUERYUNITLABEL;
+
+_type = typeOf _building;
+_index = (Format ["WFBE_%1STRUCTURENAMES",sideJoinedText] Call GetNamespace) find _type;
+if (_index != -1) then {
+ _distance = (Format ["WFBE_%1STRUCTUREDISTANCES",sideJoinedText] Call GetNamespace) select _index;
+ _direction = (Format ["WFBE_%1STRUCTUREDIRECTIONS",sideJoinedText] Call GetNamespace) select _index;
+ _factoryType = (Format ["WFBE_%1STRUCTURES",sideJoinedText] Call GetNamespace) select _index;
+ _position = [getPos _building,_distance,getDir _building + _direction] Call GetPositionFrom;
+ _longest = Format ["WFBE_LONGEST%1BUILDTIME",_factoryType] Call GetNamespace;
+} else {
+ if (_type in WFDEPOT) then {
+ _distance = depotDistance;
+ _direction = depotDirection;
+ _factoryType = "Depot";
+ };
+ if (_type in WFHANGAR) then {
+ _distance = airportDistance;
+ _direction = airportDirection;
+ _factoryType = "Airport";
+ };
+ _position = [getPos _building,_distance,getDir _building + _direction] Call GetPositionFrom;
+ _longest = Format ["WFBE_LONGEST%1BUILDTIME",_factoryType] Call GetNamespace;
+};
+
+_unique = varQueu;
+varQueu = (random 10)+(random 100)+(random 1000);
+_queu = _building getVariable "queu";
+if (isNil "_queu") then {_queu = []};
+_queu = _queu + [_unique];
+_building setVariable ["queu",_queu,true];
+
+_ret = 0;
+_queu2 = [0];
+
+if (count _queu > 0) then {_queu2 = _building getVariable "queu"};
+
+_show = false;
+while {_unique != _queu select 0 && alive _building && !isNull _building} do {
+ sleep 4;
+ _show = true;
+ _ret = _ret + 4;
+ _queu = _building getVariable "queu";
+
+ if (_queu select 0 == _queu2 select 0) then {
+ if (_ret > _longest) then {
+ if (count _queu > 0) then {
+ _queu = _building getVariable "queu";
+ _queu = _queu - [_queu select 0];
+ _building setVariable ["queu",_queu,true];
+ };
+ };
+ };
+ if (count _queu != count _queu2) then {
+ _ret = 0;
+ _queu2 = _building getVariable "queu";
+ };
+};
+
+if (_show) then {hint(parseText(Format [localize "STR_WF_INFO_BuyEffective",_description]))};
+
+sleep _waitTime;
+
+_queu = _building getVariable "queu";
+_queu = _queu - [_unique];
+_building setVariable ["queu",_queu,true];
+
+_group = group player;
+if !(alive _building) exitWith {
+ unitQueu = unitQueu - _cpt;
+ [Format["WFBE_C_QUEUE_%1",_factory],(Format["WFBE_C_QUEUE_%1",_factory] Call GetNamespace)-1,true] Call SetNamespace;
+};
+
+_created = objNull;
+if (_isMan) then {
+ _soldier = [_unit,_group,_position,sideJoined] Call CreateMan;
+ _created = _soldier;
+ [sideJoinedText,'UnitsCreated',1] Call UpdateStatistics;
+} else {
+ _driver = _vehi select 0;
+ _gunner = _vehi select 1;
+ _commander = _vehi select 2;
+ _extracrew = _vehi select 3;
+ _locked = _vehi select 4;
+ _vehicle = [_unit,_position,sideJoined,_locked] Call CreateVehi;
+ _created = _vehicle;
+ clientTeam reveal _vehicle;
+ _factoryPosition = getPos _building;
+ _vehicle setDir -((((_position select 1) - (_factoryPosition select 1)) atan2 ((_position select 0) - (_factoryPosition select 0))) - 90);
+ _vehicle setVelocity [0,0,-1];
+ _vehicles = (WF_Logic getVariable "emptyVehicles") + [_vehicle];
+ WF_Logic setVariable ["emptyVehicles",_vehicles,true];
+
+ if (isHostedServer) then {_vehicle setVariable ["WFBE_Taxi_Prohib", true]};
+
+ //--- Clear the vehicle.
+ clearWeaponCargo _vehicle;
+ clearMagazineCargo _vehicle;
+
+ /* Section: Init */
+
+ //--- Units that can lift vehicles.
+ if (_unit in Zeta_Lifter) then {
+ _upgrades = (sideJoinedText) Call GetSideUpgrades;
+ if (_upgrades select 8 > 0) then {_vehicle addAction [localize "STR_WF_Lift","Client\Module\ZetaCargo\Zeta_Hook.sqf"]};
+ };
+
+ //--- Lock / Unlock.
+ _vehicle addAction [localize "STR_WF_Unlock","Client\Action\Action_ToggleLock.sqf", [], 95, false, true, '', 'alive _target && locked _target'];
+ _vehicle addAction [localize "STR_WF_Lock","Client\Action\Action_ToggleLock.sqf", [], 94, false, true, '', 'alive _target && !(locked _target)'];
+
+ //--- Repair Truck.
+ if (_unit in (Format['WFBE_%1REPAIRTRUCKS',sideJoinedText] Call GetNamespace)) then {
+ if (('WFBE_VICTORYCONDITION' Call GetNamespace) != 1) then {
+ _vehicle setVehicleInit Format ["this addAction [localize 'STR_WF_BuildMenu_Repair','Client\Action\Action_BuildRepair.sqf', [], 99, false, true, '', 'side player == side _target && alive _target && player distance _target <= %1'];this addAction [localize 'STR_WF_Repair_MHQ','Client\Action\Action_RepairMHQ.sqf', [], 98, false, true, '', 'alive _target']",'WFBE_REPAIRTRUCKRANGE' Call GetNamespace];
+ } else {
+ _vehicle setVehicleInit Format ["this addAction [localize 'STR_WF_BuildMenu_Repair','Client\Action\Action_BuildRepair.sqf', [], 99, false, true, '', 'side player == side _target && alive _target && player distance _target <= %1']",'WFBE_REPAIRTRUCKRANGE' Call GetNamespace];
+ };
+ processInitCommands;
+ };
+
+ //--- Supply Truck.
+ if (_unit in (Format['WFBE_%1SUPPLYTRUCKS',sideJoinedText] Call GetNamespace)) then {[_vehicle,sideJoined] ExecFSM 'Client\FSM\updatesupply.fsm'};
+
+ //--- Salvage Truck.
+ if (_unit in (Format['WFBE_%1SALVAGETRUCK',sideJoinedText] Call GetNamespace)) then {[_vehicle] ExecFSM 'Client\FSM\updatesalvage.fsm'};
+
+ //--- Deal with ship units.
+ if (_unit isKindOf "Ship") then {_vehicle addAction [localize "STR_WF_Push","Client\Action\Action_Push.sqf", [], 93, false, true, "", "driver _target == _this && alive _target && speed _target < 30"]};
+
+ //--- Deal with Air units.
+ if (_unit isKindOf "Air") then {
+ _init = "";
+
+ //--- Add HALO + Cargo Eject to the vehicle if it can transport soldiers.
+ if !(_isMan) then {
+ if ((getNumber (configFile >> 'CfgVehicles' >> _unit >> 'transportSoldier')) > 0) then {
+ _init = _init + Format["this AddAction ['HALO','Client\Action\Action_HALO.sqf', [], 97, false, true, '', 'getPos _target select 2 >= %1 && alive _target'];this addAction [localize 'STR_WF_Cargo_Eject','Client\Action\Action_EjectCargo.sqf', [], 99, false, true, '', 'driver _target == _this && alive _target'];",('WFBE_HALOJUMPHEIGHT' Call GetNamespace)];
+ };
+ };
+
+ //--- Countermeasures parameter (Vanilla).
+ if (paramCounterMeasures) then {
+ _upgrades = (sideJoinedText) Call GetSideUpgrades;
+ if (_upgrades select 9 > 0) then {_init = _init + "nullReturn = [this] ExecVM 'Client\Module\CM\CM_Init.sqf';this addEventHandler ['incomingMissile',{_this Spawn CM_Countermeasures}];"};
+ };
+
+ //--- AAR Tracking.
+ if (paramAARadar) then {_init = _init + Format["nullReturn = [this,%1] ExecVM 'Common\Common_AARadarMarkerUpdate.sqf';",sideJoined]};
+
+ //--- Planes have a Taxi Reverse feature.
+ if (_unit isKindOf "Plane") then {_vehicle addAction [localize "STR_WF_TaxiReverse","Client\Action\Action_TaxiReverse.sqf", [], 92, false, true, "", "driver _target == _this && alive _target && speed _target < 4 && speed _target > -4 && getPos _target select 2 < 4"]};
+
+ //--- Process the init.
+ if (_init != "") then {_vehicle setVehicleInit _init; processInitCommands};
+ };
+
+ //--- Units Balancing.
+ if (_unit in ('WFBE_BALANCEDUNITS' Call GetNamespace) && paramBalancing) then {[_vehicle] Spawn BalanceInit};
+
+ //--- Are we dealing with an artillery unit.
+ _isArtillery = [_unit,sideJoinedText] Call IsArtillery;
+ if (_isArtillery != -1) then {[_vehicle,_isArtillery,sideJoinedText] Call EquipArtillery};
+
+ /* Section: Creation */
+
+ [sideJoinedText,'VehiclesCreated',1] Call UpdateStatistics;
+ _built = 0;
+ _group addVehicle _vehicle;
+
+ //--- Empty Vehicle.
+ if (!_driver && !_gunner && !_commander) exitWith {};
+
+ //--- Crew Management.
+ _crew = Format ["WFBE_%1SOLDIER",sideJoinedText] Call GetNamespace;
+ if (_unit isKindOf "Tank") then {_crew = Format ["WFBE_%1CREW",sideJoinedText] Call GetNamespace};
+ if (_unit isKindOf "Air") then {_crew = Format ["WFBE_%1PILOT",sideJoinedText] Call GetNamespace};
+
+ //--- Driver.
+ if (_driver) then {
+ _soldier = [_crew,_group,_position,sideJoined] Call CreateMan;
+ [_soldier] allowGetIn true;
+ _soldier moveInDriver _vehicle;
+ };
+
+ //--- Gunner.
+ if (_gunner) then {
+ _soldier = [_crew,_group,_position,sideJoined] Call CreateMan;
+ [_soldier] allowGetIn true;
+ _soldier moveInGunner _vehicle;
+ };
+
+ //--- Commander.
+ if (_commander) then {
+ _soldier = [_crew,_group,_position,sideJoined] Call CreateMan;
+ [_soldier] allowGetIn true;
+ _soldier moveInCommander _vehicle;
+ };
+
+ //--- Extra vehicle turrets.
+ if (_extracrew) then {
+ Private ["_turrets"];
+ _turrets = _currentUnit select QUERYUNITTURRETS;
+
+ {
+ if (isNull (_vehicle turretUnit _x)) then {
+ _soldier = [_crew,_group,_position,sideJoined] Call CreateMan;
+ [_soldier] allowGetIn true;
+ _soldier moveInTurret [_vehicle, _x];
+ };
+ } forEach _turrets;
+ };
+ [sideJoinedText,'UnitsCreated',_cpt] Call UpdateStatistics;
+};
+
+unitQueu = unitQueu - _cpt;
+
+[Format["WFBE_C_QUEUE_%1",_factory],(Format["WFBE_C_QUEUE_%1",_factory] Call GetNamespace)-1,true] Call SetNamespace;
+hint parseText(Format [localize "STR_WF_INFO_Build_Complete",_description]); \ No newline at end of file
diff --git a/Client/Functions/Client_ChangePlayerFunds.sqf b/Client/Functions/Client_ChangePlayerFunds.sqf
new file mode 100644
index 0000000..6732640
--- /dev/null
+++ b/Client/Functions/Client_ChangePlayerFunds.sqf
@@ -0,0 +1 @@
+[clientTeam, _this] Call ChangeTeamFunds; \ No newline at end of file
diff --git a/Client/Functions/Client_CommandChatMessage.sqf b/Client/Functions/Client_CommandChatMessage.sqf
new file mode 100644
index 0000000..38de886
--- /dev/null
+++ b/Client/Functions/Client_CommandChatMessage.sqf
@@ -0,0 +1 @@
+player commandChat _this; \ No newline at end of file
diff --git a/Client/Functions/Client_CommanderUpgrade.sqf b/Client/Functions/Client_CommanderUpgrade.sqf
new file mode 100644
index 0000000..366fa31
--- /dev/null
+++ b/Client/Functions/Client_CommanderUpgrade.sqf
@@ -0,0 +1,34 @@
+private ["_i","_index","_index2","_name","_time","_upgrades"];
+_time = _this select 0;
+_index = _this select 1;
+_index2 = _this select 2;
+_name = _this select 3;
+isUpgrading = true;
+
+hint Format [localize "STR_WF_Upgrade_Start",_name];
+
+WFBE_RequestChangeScore = ['SRVFNCREQUESTCHANGESCORE',[player,score player + ('WFBE_COMMANDERUPGRADESCORE' Call GetNamespace)]];
+publicVariable 'WFBE_RequestChangeScore';
+if (!isMultiplayer || (isServer && local player)) then {['SRVFNCREQUESTCHANGESCORE',[player,score player + ('WFBE_COMMANDERUPGRADESCORE' Call GetNamespace)]] Spawn HandleSPVF};
+
+_i = _time;
+while {_i > 0} do {
+ _i = _i - 1;
+ upgradingTime = _i;
+ sleep 1;
+};
+_upgrades = (sideJoinedText) Call GetSideUpgrades;
+_upgrades Set [_index,_index2 + 1];
+Call Compile Format ["%1Upgrades = _upgrades; publicVariable '%1Upgrades';",sideJoinedText];
+upgradingTime = -1;
+isUpgrading = false;
+hint Format [localize "STR_WF_Upgrade_Complete",_name,_index2 + 1];
+WFBE_LocalizeMessage = [sideJoined,'CLTFNCLOCALIZEMESSAGE',['UpgradeComplete',_index,(_index2 + 1)]];
+publicVariable 'WFBE_LocalizeMessage';
+if (!isMultiplayer || (isServer && local player) || local player) then {[sideJoined,'CLTFNCLOCALIZEMESSAGE',['UpgradeComplete',_index,(_index2 + 1)]] Spawn HandlePVF};
+
+sleep 0.3;
+
+WFBE_RequestSpecial = ['SRVFNCREQUESTSPECIAL',['upgrade',sideJoined]];
+publicVariable 'WFBE_RequestSpecial';
+if (!isMultiplayer || (isServer && local player)) then {['SRVFNCREQUESTSPECIAL',['upgrade',sideJoined]] Spawn HandleSPVF};
diff --git a/Client/Functions/Client_DebugHint.sqf b/Client/Functions/Client_DebugHint.sqf
new file mode 100644
index 0000000..5c6af51
--- /dev/null
+++ b/Client/Functions/Client_DebugHint.sqf
@@ -0,0 +1,8 @@
+Private ["_string"];
+
+_string = _this;
+if (isMultiplayer) then {
+ hint _string;
+} else {
+ hintC _string;
+}; \ No newline at end of file
diff --git a/Client/Functions/Client_DisplayInventory.sqf b/Client/Functions/Client_DisplayInventory.sqf
new file mode 100644
index 0000000..7765609
--- /dev/null
+++ b/Client/Functions/Client_DisplayInventory.sqf
@@ -0,0 +1,98 @@
+Private ['_cost','_count','_get','_inventoryGUI','_inventorySlots','_items','_loadout','_misca','_miscInvGUI','_miscItemSlots','_primary','_secondary','_sidearm','_sidearmInvGUI','_sidearmInventorySlots','_slot','_sorted'];
+_loadout = _this select 0;
+_items = _this select 1;
+
+_inventoryGUI = 3503;
+_sidearmInvGUI = 3515;
+_miscInvGUI = 3523;
+
+for [{_count = 0},{_count < 12},{_count = _count + 1}] do {CtrlSetText[_inventoryGUI + _count,"\Ca\UI\Data\ui_gear_mag_gs.paa"]};
+for [{_count = 0},{_count < 8},{_count = _count + 1}] do {CtrlSetText[_sidearmInvGUI + _count,"\Ca\UI\Data\ui_gear_mag_gs.paa"]};
+for [{_count = 0},{_count < 12},{_count = _count + 1}] do {CtrlSetText[_miscInvGUI + _count,"\Ca\UI\Data\ui_gear_eq_gs.paa"]};
+
+_cost = 0;
+_slot = 0;
+_inventorySlots = [];
+_sidearmInventorySlots = [];
+_miscItemSlots = [];
+
+_primary = [];
+_secondary = [];
+_sidearm = [];
+_misca = [];
+
+{
+ _get = _x Call GetNamespace;
+
+ if !(isNil '_get') then {
+ switch (_get select QUERYGEARTYPE) do {
+ case 'primary': {_primary = _primary + [_x]};
+ case 'secondary': {_secondary = _secondary + [_x]};
+ case 'sidearm': {_sidearm = _sidearm + [_x]};
+ case 'CfgMagazines': {_misca = _misca + [_x]};
+ case 'CfgWeapons': {_misca = _misca + [_x]};
+ };
+ };
+
+} forEach _loadout;
+
+_sorted = _primary + _secondary + _misca;
+_sidearm = _sidearm + _misca;
+
+{
+ _get = _x Call GetNamespace;
+
+ if !(isNil '_get') then {
+ if (!(_get select QUERYGEARHANDGUNPOOL)) then {
+ ctrlSetText[_inventoryGUI + _slot,(_get select QUERYGEARPICTURE)];
+ _cost = _cost + (_get select QUERYGEARCOST);
+ _slot = _slot + 1;
+ _inventorySlots = _inventorySlots + [_x];
+ for [{_count = (_get Select QUERYGEARSPACE) - 1},{_count > 0},{_count = _count - 1}] do {
+ ctrlSetText[_inventoryGUI + _slot,""];
+ _slot = _slot + 1;
+ _inventorySlots = _inventorySlots + [""];
+ };
+ };
+ };
+} forEach _sorted;
+
+_slot = 0;
+
+{
+ _get = _x Call GetNamespace;
+
+ if !(isNil '_get') then {
+ if (_get select QUERYGEARHANDGUNPOOL) then {
+ ctrlSetText[_sidearmInvGUI + _slot,(_get select QUERYGEARPICTURE)];
+ _cost = _cost + (_get select QUERYGEARCOST);
+ _slot = _slot + 1;
+ _sidearmInventorySlots = _sidearmInventorySlots + [_x];
+ for [{_count = (_get Select QUERYGEARSPACE) - 1},{_count > 0},{_count = _count - 1}] do {
+ ctrlSetText[_sidearmInvGUI + _slot,""];
+ _slot = _slot + 1;
+ _sidearmInventorySlots = _sidearmInventorySlots + [""];
+ };
+ };
+ };
+} forEach _sidearm;
+
+_slot = 0;
+
+{
+ _get = _x Call GetNamespace;
+
+ if !(isNil '_get') then {
+ CtrlSetText[_miscInvGUI + _slot,(_get select QUERYGEARPICTURE)];
+ _slot = _slot + 1;
+ _miscItemSlots = _miscItemSlots + [_x];
+ _cost = _cost + (_get select QUERYGEARCOST);
+ for [{_count = (_get Select QUERYGEARSPACE) - 1},{_count > 0},{_count = _count - 1}] do {
+ ctrlSetText[_miscInvGUI + _slot,""];
+ _slot = _slot + 1;
+ _miscItemSlots = _miscItemSlots + [""];
+ };
+ };
+} forEach _items;
+
+[_inventorySlots,_sidearmInventorySlots,_miscItemSlots,_cost] \ No newline at end of file
diff --git a/Client/Functions/Client_EquipDefaultLoadout.sqf b/Client/Functions/Client_EquipDefaultLoadout.sqf
new file mode 100644
index 0000000..29c2f45
--- /dev/null
+++ b/Client/Functions/Client_EquipDefaultLoadout.sqf
@@ -0,0 +1,17 @@
+private ["_unit", "_defaultWeap", "_defaultAmmo"];
+
+_unit = _this;
+
+_defaultWeap = Format ["WFBE_%1DEFAULTWEAPONS",sideJoinedText] Call GetNamespace;
+_defaultAmmo = Format ["WFBE_%1DEFAULTAMMO",sideJoinedText] Call GetNamespace;
+
+if (paramAceWounds) then
+{
+ _defaultAmmo = _defaultAmmo + [ 'ACE_Bandage', 'ACE_Bandage', 'ACE_Morphine', 'ACE_Morphine' ];
+ if(getNumber(configFile >> "CfgVehicles" >> (typeOf _unit) >> "attendant") == 1) then
+ {
+ _defaultAmmo = _defaultAmmo + [ 'ACE_Epinephrine', 'ACE_Epinephrine', 'ACE_Medkit', 'ACE_Medkit' ];
+ };
+};
+
+[_unit,_defaultWeap,_defaultAmmo] Call EquipLoadout; \ No newline at end of file
diff --git a/Client/Functions/Client_FX.sqf b/Client/Functions/Client_FX.sqf
new file mode 100644
index 0000000..7fc9d21
--- /dev/null
+++ b/Client/Functions/Client_FX.sqf
@@ -0,0 +1,50 @@
+Private ["_index"];
+_index = _this select 0;
+
+switch (_index) do {
+ case 0: {
+ // None.
+ "colorCorrections" ppEffectEnable false;
+ "chromAberration" ppEffectEnable false;
+ "radialBlur" ppEffectEnable false;
+ "filmGrain" ppEffectEnable false;
+ };
+ case 1: {
+ // High contrast postprocess added.
+ "colorCorrections" ppEffectAdjust [1, 0.9, -0.002, [0.0, 0.0, 0.0, 0.0], [1.0, 0.6, 0.4, 0.6], [0.199, 0.587, 0.114, 0.0]];
+ "colorCorrections" ppEffectCommit 1;
+ "colorCorrections" ppEffectEnable true;
+ };
+ case 2: {
+ // Blue color corrections added (movie night style).
+ "colorCorrections" ppEffectAdjust [1, 1, 0, [0.0, 0.0, 0.0, 0.0], [0.6, 0.6, 1.8, 0.7], [0.199, 0.587, 0.114, 0.0]];
+ "colorCorrections" ppEffectCommit 1;
+ "colorCorrections" ppEffectEnable true;
+ };
+ case 3: {
+ // Color corrections.
+ "colorCorrections" ppEffectAdjust [1, 0.8, -0.002, [0.0, 0.0, 0.0, 0.0], [0.6, 0.7, 0.8, 0.65], [0.199, 0.587, 0.114, 0.0]];
+ "colorCorrections" ppEffectCommit 1;
+ "colorCorrections" ppEffectEnable true;
+ };
+ case 4: {
+ // Color corrections.
+ "colorCorrections" ppEffectAdjust [1, 1, -0.0045, [0.0, 0.0, 0.0, 0.0], [1, 0.6, 0.4, 0.4], [0.199, 0.587, 0.114, 0.0]];
+ "colorCorrections" ppEffectCommit 1;
+ "colorCorrections" ppEffectEnable true;
+ // Light film grain.
+ "filmGrain" ppEffectEnable true;
+ "filmGrain" ppEffectAdjust [0.02, 1, 1, 0.1, 1, false];
+ "filmGrain" ppEffectCommit 1;
+ };
+ case 5: {
+ // Color corrections.
+ "colorCorrections" ppEffectAdjust [1, 1, -0.002, [0.1, 0.05, 0.0, 0.02], [1.2, 1.0, 0.8, 0.666], [0.5, 0.5, 0.5, 0.0]];
+ "colorCorrections" ppEffectCommit 1;
+ "colorCorrections" ppEffectEnable true;
+ // Light film grain.
+ "filmGrain" ppEffectEnable true;
+ "filmGrain" ppEffectAdjust [0.02, 1, 1, 0.1, 1, false];
+ "filmGrain" ppEffectCommit 1;
+ };
+}; \ No newline at end of file
diff --git a/Client/Functions/Client_GetIncome.sqf b/Client/Functions/Client_GetIncome.sqf
new file mode 100644
index 0000000..c3e2529
--- /dev/null
+++ b/Client/Functions/Client_GetIncome.sqf
@@ -0,0 +1,33 @@
+Private["_commanderTeam","_income","_incomeSystem","_side"];
+
+_side = _this;
+_incomeSystem = 'WFBE_INCOMESYSTEM' Call GetNamespace;
+_income = (_side) Call GetTownsIncome;
+
+switch (_incomeSystem) do {
+ case 2: {_income = round(_income /2)};
+ case 3: {
+ Private["_ply"];
+ _commanderTeam = (_side) Call GetCommanderTeam;
+ if (isNull _commanderTeam) then {_commanderTeam = grpNull};
+ _ply = round(_income * (((100 - (Call Compile Format ["%1CommanderPercent",_side]))/100)/maxPlayers));
+ if (_commanderTeam == group player) then {
+ _income = round((_income * ((Call Compile Format ["%1CommanderPercent",_side])/100)) / ('WFBE_INC_DIVIDE_COM' Call GetNamespace)) + _ply;
+ } else {
+ _income = _ply;
+ };
+ };
+ case 4: {
+ Private["_ply"];
+ _commanderTeam = (_side) Call GetCommanderTeam;
+ if (isNull _commanderTeam) then {_commanderTeam = grpNull};
+ _ply = round(_income * (100 - (Call Compile Format ["%1CommanderPercent",_side])) / 100);
+ if (_commanderTeam == group player) then {
+ _income = _ply + round((_income - _ply)*maxPlayers);
+ } else {
+ _income = _ply;
+ };
+ };
+};
+
+_income \ No newline at end of file
diff --git a/Client/Functions/Client_GetMarkerColoration.sqf b/Client/Functions/Client_GetMarkerColoration.sqf
new file mode 100644
index 0000000..33920a6
--- /dev/null
+++ b/Client/Functions/Client_GetMarkerColoration.sqf
@@ -0,0 +1 @@
+Private ["_color","_colorationMode","_colorFor"]; _colorFor = _this; _colorationMode = 'WFBE_MAPCOLORATION' Call GetNamespace; _color = ""; switch (_colorFor) do { case "Friendly": { switch (_colorationMode) do { case 0: {_color = "ColorGreen"}; case 1: {_color = if (sideJoined == west) then {"ColorBlue"} else {"ColorRed"}}; }; }; case "Enemy": { switch (_colorationMode) do { case 0: {_color = "ColorRed"}; case 1: {_color = if (sideJoined == west) then {"ColorRed"} else {"ColorBlue"}}; }; }; case "Resistance": { switch (_colorationMode) do { case 0: {_color = "ColorBlue"}; case 1: {_color = "ColorGreen"}; }; }; case "Leader": { switch (_colorationMode) do { case 0: {_color = "ColorBlue"}; case 1: {_color = "ColorBlue"}; }; }; }; _color \ No newline at end of file
diff --git a/Client/Functions/Client_GetPlayerFunds.sqf b/Client/Functions/Client_GetPlayerFunds.sqf
new file mode 100644
index 0000000..6c8989d
--- /dev/null
+++ b/Client/Functions/Client_GetPlayerFunds.sqf
@@ -0,0 +1 @@
+(clientTeam) Call GetTeamFunds \ No newline at end of file
diff --git a/Client/Functions/Client_GetRespawnAvailable.sqf b/Client/Functions/Client_GetRespawnAvailable.sqf
new file mode 100644
index 0000000..4155ee8
--- /dev/null
+++ b/Client/Functions/Client_GetRespawnAvailable.sqf
@@ -0,0 +1,58 @@
+Private ["_availableSpawn","_buildings","_checks","_deathLoc","_farps","_hq","_mobileRespawns","_range","_side","_sideText","_upgrades"];
+
+_side = _this select 0;
+_deathLoc = _this select 1;
+_sideText = str _side;
+
+//--- Base.
+_hq = (_sideText) Call GetSideHQ;
+_availableSpawn = [_hq];
+_buildings = (_sideText) Call GetSideStructures;
+_checks = [_side,Format ["WFBE_%1BARRACKSTYPE",_sideText] Call GetNamespace,_buildings] Call GetFactories;
+if (count _checks > 0) then {_availableSpawn = _availableSpawn + _checks};
+_checks = [_side,Format ["WFBE_%1LIGHTTYPE",_sideText] Call GetNamespace,_buildings] Call GetFactories;
+if (count _checks > 0) then {_availableSpawn = _availableSpawn + _checks};
+_checks = [_side,Format ["WFBE_%1COMMANDCENTERTYPE",_sideText] Call GetNamespace,_buildings] Call GetFactories;
+if (count _checks > 0) then {_availableSpawn = _availableSpawn + _checks};
+_checks = [_side,Format ["WFBE_%1HEAVYTYPE",_sideText] Call GetNamespace,_buildings] Call GetFactories;
+if (count _checks > 0) then {_availableSpawn = _availableSpawn + _checks};
+_checks = [_side,Format ["WFBE_%1AIRCRAFTTYPE",_sideText] Call GetNamespace,_buildings] Call GetFactories;
+if (count _checks > 0) then {_availableSpawn = _availableSpawn + _checks};
+_checks = [_side,Format ["WFBE_%1SERVICEPOINTTYPE",_sideText] Call GetNamespace,_buildings] Call GetFactories;
+if (count _checks > 0) then {_availableSpawn = _availableSpawn + _checks};
+
+//--- HQ is dead, but we can spawn at other buildings.
+if (!alive _hq && count _availableSpawn > 1) then {_availableSpawn = _availableSpawn - [_hq]};
+
+//--- Mobile respawn.
+if (paramMobileRespawn) then {
+ _mobileRespawns = Format ["WFBE_%1AMBULANCES",_sideText] Call GetNamespace;
+ _upgrades = (_sideText) Call GetSideUpgrades;
+ _range = (Format["WFBE_RESPAWNMOBILERANGE%1",(_upgrades select 7)] Call GetNamespace);
+ _checks = _deathLoc nearEntities[_mobileRespawns,_range];
+ if (count _checks > 0) then {
+ {
+ if (_x emptyPositions "cargo" > 0) then {
+ _availableSpawn = _availableSpawn + [_x];
+ };
+ } forEach _checks;
+ };
+};
+
+//--- MASH.
+if (paramRespawnMASH) then {
+ _farps = Format ["WFBE_%1FARP",_sideText] Call GetNamespace;
+ _upgrades = (_sideText) Call GetSideUpgrades;
+ _range = (Format["WFBE_RESPAWNMOBILERANGE%1",(_upgrades select 7)] Call GetNamespace);
+ _checks = nearestObjects [_deathLoc, [_farps], _range];
+ if (count _checks > 0) then {
+ {if (alive _x) then {_availableSpawn = _availableSpawn + [_x]}} forEach _checks;
+ };
+};
+
+//--- Camps.
+if (('WFBE_RESPAWNCAMPSMODE' Call GetNamespace) > 0) then {
+ _availableSpawn = _availableSpawn + ([_deathLoc, _side] Call GetRespawnCamps);
+};
+
+_availableSpawn \ No newline at end of file
diff --git a/Client/Functions/Client_GetStructureMarkerLabel.sqf b/Client/Functions/Client_GetStructureMarkerLabel.sqf
new file mode 100644
index 0000000..50e14bb
--- /dev/null
+++ b/Client/Functions/Client_GetStructureMarkerLabel.sqf
@@ -0,0 +1,16 @@
+Private["_class","_label","_structure"];
+
+_structure = _this Select 0;
+
+_label = "";
+_class = TypeOf _structure;
+
+if (_class == EASTBAR || _class == WESTBAR) then {_label = "B"};
+if (_class == EASTLVF || _class == WESTLVF) then {_label = "L"};
+if (_class == EASTCC || _class == WESTCC) then {_label = "C"};
+if (_class == EASTHEAVY || _class == WESTHEAVY) then {_label = "H"};
+if (_class == EASTAIR || _class == WESTAIR) then {_label = "A"};
+if (_class == EASTSP || _class == WESTSP) then {_label = "S"};
+if (_class == EASTAAR || _class == WESTAAR) then {_label = "AAR"};
+
+_label \ No newline at end of file
diff --git a/Client/Functions/Client_GetTime.sqf b/Client/Functions/Client_GetTime.sqf
new file mode 100644
index 0000000..995efdc
--- /dev/null
+++ b/Client/Functions/Client_GetTime.sqf
@@ -0,0 +1 @@
+Private ["_days","_hours","_minutes","_seconds","_uptime"]; _days = 0; _hours = 0; _minutes = 0; _seconds = 0; _uptime = time; _days = floor(_uptime / 86400); _hours = floor((_uptime - (_days * 86400)) / 3600); _minutes = floor((_uptime - (_hours * 3600) - (_days * 86400)) / 60); _seconds = floor(_uptime - (_minutes * 60) - (_hours * 3600) -(_days * 86400)); [_days,_hours,_minutes,_seconds] \ No newline at end of file
diff --git a/Client/Functions/Client_GroupChatMessage.sqf b/Client/Functions/Client_GroupChatMessage.sqf
new file mode 100644
index 0000000..f13fb76
--- /dev/null
+++ b/Client/Functions/Client_GroupChatMessage.sqf
@@ -0,0 +1 @@
+player groupChat _this \ No newline at end of file
diff --git a/Client/Functions/Client_HandleHQAction.sqf b/Client/Functions/Client_HandleHQAction.sqf
new file mode 100644
index 0000000..b8e4e60
--- /dev/null
+++ b/Client/Functions/Client_HandleHQAction.sqf
@@ -0,0 +1,12 @@
+Private ['_hq'];
+_hq = _this;
+
+if (isNull _hq) exitWith {};
+
+/* Lag Handler */
+while {!isNull _hq} do {
+ canBuildWHQ = false;
+ sleep 0.21;
+};
+
+canBuildWHQ = true; \ No newline at end of file
diff --git a/Client/Functions/Client_HandleOnMap.sqf b/Client/Functions/Client_HandleOnMap.sqf
new file mode 100644
index 0000000..c98f961
--- /dev/null
+++ b/Client/Functions/Client_HandleOnMap.sqf
@@ -0,0 +1,17 @@
+Private ['_isOnMap','_timeToKill'];
+
+_timeToKill = 'WFBE_OFFMAPMAXTIME' Call GetNamespace;
+paramBoundariesRunning = true;
+
+while {true} do {
+ sleep 1;
+ _isOnMap = Call BoundariesIsOnMap;
+ if !(_isOnMap) then {
+ hint parseText(Format[localize 'STR_WF_INFO_OffmapWarning',_timeToKill]);
+ _timeToKill = _timeToKill - 1;
+ };
+ if (_timeToKill < 0 || _isOnMap || !(alive player)) exitWith {
+ if !(_isOnMap && alive player) then {(vehicle player) setDamage 1};
+ paramBoundariesRunning = false;
+ };
+}; \ No newline at end of file
diff --git a/Client/Functions/Client_HandlePVF.sqf b/Client/Functions/Client_HandlePVF.sqf
new file mode 100644
index 0000000..3d61118
--- /dev/null
+++ b/Client/Functions/Client_HandlePVF.sqf
@@ -0,0 +1,30 @@
+/*
+ description:
+ - New network system handler.
+ destination:
+ - Nil: Everyone
+ - String: vehicleVarName of the unit to trigger on.
+ - Side: A side
+ note:
+ - addPublicVariableEventHandler is triggered everywhere BUT on the caller.
+ usage:
+ - [destination,client PVF to run,parameters]
+*/
+
+Private ["_destination","_exit","_parameters","_publicVar","_script"];
+_publicVar = _this;
+_exit = true;
+
+_destination = _publicVar select 0;
+if (isNil '_destination') then {_destination = 0;_exit = false};
+if (typeName(_destination) == 'SIDE') then {if (sideJoined == _destination) then {_exit = false}};
+if (typeName(_destination) == 'STRING') then {
+ if (vehicleVarName player == _destination) then {_exit = false};
+};
+
+if (_exit) exitWith {};
+
+_script = _publicVar select 1;
+_parameters = if (count _this > 2) then {_publicVar select 2} else {[]};
+
+_parameters Spawn (Call Compile _script); \ No newline at end of file
diff --git a/Client/Functions/Client_InitTownsAndCamps.sqf b/Client/Functions/Client_InitTownsAndCamps.sqf
new file mode 100644
index 0000000..cdddcbc
--- /dev/null
+++ b/Client/Functions/Client_InitTownsAndCamps.sqf
@@ -0,0 +1,40 @@
+Private ["_camp","_campSideID","_camps","_count","_count1","_marker","_town","_townSideID"];
+
+for [{_count = totalTowns - 1},{_count >= 0},{_count = _count - 1}] do {
+ _town = towns select _count;
+ _townSideID = _town getVariable "sideID";
+
+ if (sideID == _townSideID) then {
+ _marker = Format["%1Depot",str _town];
+ _marker setMarkerColorLocal ("Friendly" Call GetMarkerColoration);
+ };
+
+ while {true} do {
+ sleep .005;
+ _camps = _town getVariable "camps";
+ if !(isNil "_camps") exitWith {};
+ };
+ _camps = _town getVariable "camps";
+
+ for [{_count1 = count _camps - 1},{_count1 >= 0},{_count1 = _count1 - 1}] do {
+ _camp = _camps select _count1;
+ if !(isNull _camp) then {
+ _marker = Format["%1Camp%2",str _town,_camps find _camp];
+
+ while {true} do {
+ sleep .005;
+ _campSideID = _camp getVariable "sideID";
+ if !(isNil "_campSideID") exitWith {};
+ };
+ _campSideID = _camp getVariable "sideID";
+
+ if (sideID == _campSideID) then {
+ _marker setMarkerColorLocal ("Friendly" Call GetMarkerColoration);
+ } else{
+ if (_townSideID == sideID) then {
+ _marker setMarkerColorLocal ("Enemy" Call GetMarkerColoration);
+ };
+ };
+ };
+ };
+}; \ No newline at end of file
diff --git a/Client/Functions/Client_IsOnMap.sqf b/Client/Functions/Client_IsOnMap.sqf
new file mode 100644
index 0000000..db72724
--- /dev/null
+++ b/Client/Functions/Client_IsOnMap.sqf
@@ -0,0 +1,17 @@
+Private ['_adis','_bdis','_borderdis','_boundary','_difx','_dify','_dir','_position','_positiondis','_sqrradH','_sqrradHR'];
+
+_boundary = 'WFBE_BOUNDARIESXY' Call GetNamespace;
+_sqrradH = _boundary / 2;
+_sqrradHR = [_sqrradH,_sqrradH];
+_position = [getPos player select 0, getPos player select 1];
+
+_difx = (_position select 0) - _sqrradH;
+_dify = (_position select 1) - _sqrradH;
+_dir = atan (_difx / _dify);
+if (_dify < 0) then {_dir = _dir + 180};
+_adis = abs (_sqrradH / cos (90 - _dir));
+_bdis = abs (_sqrradH / cos _dir);
+_borderdis = _adis min _bdis;
+_positiondis = _position distance _sqrradHR;
+
+if (_positiondis < _borderdis) then {true} else {false} \ No newline at end of file
diff --git a/Client/Functions/Client_MarkerAnim.sqf b/Client/Functions/Client_MarkerAnim.sqf
new file mode 100644
index 0000000..beb85b2
--- /dev/null
+++ b/Client/Functions/Client_MarkerAnim.sqf
@@ -0,0 +1,45 @@
+Private ["_additionalErase","_direction","_expand","_markerColor","_markerMax","_markerMin","_markerName","_markerPosition","_markerSize","_markerType"];
+_markerName = _this select 0;
+_markerPosition = _this select 1;
+_markerType = _this select 2;
+_markerSize = _this select 3;
+_markerColor = _this select 4;
+_markerMin = _this select 5;
+_markerMax = _this select 6;
+_additionalErase = "";
+if (count _this > 7) then {_additionalErase = _this select 7};
+
+deleteMarkerLocal _markerName;
+CreateMarkerLocal [_markerName,_markerPosition];
+_markerName setMarkerTypeLocal _markerType;
+_markerName setMarkerColorLocal _markerColor;
+_markerName setMarkerSizeLocal [_markerSize,_markerSize];
+
+_difference = (_markerMax - _markerMin)/10;
+_direction = 0;
+_expand = true;
+activeAnimMarker = true;
+
+if (_additionalErase != "") then {
+ Private ["_pr"];
+ _pr = 'WFBE_PATROLRANGE' Call GetNamespace;
+ createMarkerLocal [_additionalErase,_markerPosition];
+ _additionalErase setMarkerShapeLocal "Ellipse";
+ _additionalErase setMarkerColorLocal _markerColor;
+ _additionalErase setMarkerSizeLocal [_pr,_pr];
+};
+
+while {activeAnimMarker} do {
+ sleep 0.03;
+
+ _direction = (_direction + 1) % 360;
+ _markerName setMarkerDirLocal _direction;
+ _markerName setMarkerSizeLocal [_markerSize,_markerSize];
+
+ if (_markerSize > _markerMax) then {_expand = false};
+ if (_markerSize < _markerMin) then {_expand = true};
+ if (_expand) then {_markerSize = _markerSize + _difference} else {_markerSize = _markerSize - _difference};
+};
+
+deleteMarkerLocal _markerName;
+if (_additionalErase != "") then {deleteMarkerLocal _additionalErase}; \ No newline at end of file
diff --git a/Client/Functions/Client_OnRespawnHandler.sqf b/Client/Functions/Client_OnRespawnHandler.sqf
new file mode 100644
index 0000000..fe6c57d
--- /dev/null
+++ b/Client/Functions/Client_OnRespawnHandler.sqf
@@ -0,0 +1,78 @@
+Private ["_buildings","_charge","_funds","_loadDefault","_listbp","_mode","_price","_safeArray","_skip","_spawn","_spawnInside","_temp","_unit","_weaps"];
+
+_unit = _this select 0;
+_spawn = _this select 1;
+_loadDefault = true;
+
+//--- Respawn.
+_spawnInside = false;
+if ((typeOf _spawn) in (Format ["WFBE_%1AMBULANCES",sideJoinedText] Call GetNamespace) && alive _spawn) then {
+ if (_spawn emptyPositions "cargo" > 0 && !(locked _spawn)) then {_unit moveInCargo _spawn;_spawnInside = true};
+};
+
+if !(_spawnInside) then {_unit setPos ([getPos _spawn,10,20] Call GetRandomPosition)};
+
+//--- Loadout.
+if (!isNil "respawnWeapons" && !WFBE_RespawnDefaultGear) then {
+ _mode = 'WFBE_RESPAWNPENALTY' Call GetNamespace;
+
+ if (_mode in [0,2,3,4,5]) then {
+ //--- Calculate the price/funds.
+ if (_mode != 0) then {
+ _price = 0;
+
+ //--- Get the mode pricing.
+ switch (_mode) do {
+ case 2: {_price = respawnGearCost};
+ case 3: {_price = round(respawnGearCost/2)};
+ case 4: {_price = round(respawnGearCost/4)};
+ case 5: {_price = respawnGearCost};
+ };
+
+ //--- Are we charging only on mobile respawn?
+ _charge = true;
+ if (_mode == 5) then {
+ _buildings = (sideJoinedText) Call GetSideStructures;
+ if (_spawn in _buildings || _spawn == ((sideJoinedText) Call GetSideHQ)) then {_charge = false};
+ };
+
+ if (_charge) then {
+ //--- Charge if possible.
+ _funds = Call GetPlayerFunds;
+ if (_funds < _price) then {
+ // Just take it down to zero.
+ _price = _funds;
+ };
+ -(_price) Call ChangePlayerFunds;
+ (Format[localize 'STR_WF_CHAT_Gear_RespawnCharge',_price]) Call GroupChatMessage;
+ };
+ };
+
+ //--- Use the respawn loadout.
+ if(WF_ACE) then
+ {
+ [player, respawnWeapons, respawnAmmo] Call EquipLoadout;
+ player setVariable ["ACE_weapononback", respawnWeaponOnBack];
+ _safeArray = respawnAceRuckContents select 1;
+ player setVariable ["ACE_RuckMagContents", +_safeArray];
+ _safeArray = respawnAceRuckContents select 0;
+ player setVariable ["ACE_RuckWepContents", +_safeArray];
+ }
+ else
+ {
+ _temp = +(respawnWeapons);
+ _listbp = 'WFBE_BACKPACKS' Call GetNamespace;
+ {if (_x in _listbp) then {_temp = _temp - [_x]}} forEach respawnWeapons;
+ _weaps = _temp;
+
+ [_unit,_weaps,respawnAmmo] Call EquipLoadout;
+ if !(WF_A2_Vanilla) then {Call RespawningBag};
+ };
+ _loadDefault = false;
+ };
+};
+
+//--- Load the default loadout.
+if (_loadDefault) then {
+ player Call EquipDefaultLoadout;
+}; \ No newline at end of file
diff --git a/Client/Functions/Client_PreRespawnHandler.sqf b/Client/Functions/Client_PreRespawnHandler.sqf
new file mode 100644
index 0000000..189fe60
--- /dev/null
+++ b/Client/Functions/Client_PreRespawnHandler.sqf
@@ -0,0 +1,15 @@
+Private ["_hq","_unit"];
+
+_unit = _this;
+
+(_unit) Call WFBE_SK_FNC_Apply;
+[] ExecFSM "Client\FSM\updateactions.fsm";
+
+Options = _unit addAction ["<t color='#42b6ff'>" + (localize "STR_WF_Options") + "</t>","Client\Action\Action_Menu.sqf", "", 1, false, true, "", "_target == player"];
+
+if (!isNull commanderTeam) then {
+ _hq = (sideJoinedText) Call GetSideHQ;
+ if (commanderTeam == group _unit) then {HQAction = _unit addAction [localize "STR_WF_BuildMenu","Client\Action\Action_Build.sqf", [_hq], 100, false, true, "", "hqInRange && canBuildWHQ && (_target == player)"]};
+};
+
+[sideJoinedText,'UnitsCreated',1] Call UpdateStatistics; \ No newline at end of file
diff --git a/Client/Functions/Client_ReplaceArray.sqf b/Client/Functions/Client_ReplaceArray.sqf
new file mode 100644
index 0000000..b05136c
--- /dev/null
+++ b/Client/Functions/Client_ReplaceArray.sqf
@@ -0,0 +1,12 @@
+Private ['_array','_indexExcluded','_newArray','_z'];
+_array = _this select 0;
+_indexExcluded = _this select 1;
+
+_newArray = [];
+for [{_z = 0},{_z < count(_array)},{_z = _z + 1}] do {
+ if (_z != _indexExcluded) then {
+ _newArray = _newArray + [_array select _z];
+ };
+};
+
+_newArray \ No newline at end of file
diff --git a/Client/Functions/Client_ReplaceInventoryAmmo.sqf b/Client/Functions/Client_ReplaceInventoryAmmo.sqf
new file mode 100644
index 0000000..810e4e2
--- /dev/null
+++ b/Client/Functions/Client_ReplaceInventoryAmmo.sqf
@@ -0,0 +1,65 @@
+Private ['_freeSpace','_futureSpace','_get','_limit','_magazines','_newMag','_newMagIsSide','_newMagSpace','_oldMags','_presentMags','_replacement','_rlIndex','_size','_spaceToReduce','_totalToReplace','_z'];
+_newMag = _this select 0;
+_oldMags = _this select 1;
+_magazines = _this select 2;
+
+_presentMags = [];
+_replacement = [];
+_size = 0;
+_spaceToReduce = 0;
+
+{
+ Private['_cmag','_ct'];
+ _cmag = _x;
+ _ct = {_x == _cmag} count _oldMags;
+
+ if (_ct > 0) then {
+ _get = _cmag Call GetNamespace;
+ _presentMags = _presentMags + [_cmag];
+ _spaceToReduce = _spaceToReduce + (_get select QUERYGEARSPACE);
+ };
+} forEach _magazines;
+
+if (_newMag == "") exitWith {_magazines - _presentMags};
+
+_get = _newMag Call GetNamespace;
+_newMagSpace = _get select QUERYGEARSPACE;
+_newMagIsSide = _get select QUERYGEARHANDGUNPOOL;
+_limit = if (_newMagIsSide) then {8} else {12};
+
+if (_newMagIsSide) then {
+ {
+ _get = _x Call GetNamespace;
+
+ if !(isNil '_get') then {
+ if (_get select QUERYGEARHANDGUNPOOL) then {
+ _size = _size + (_get select QUERYGEARSPACE);
+ };
+ };
+ } forEach _magazines;
+} else {
+ {
+ _get = _x Call GetNamespace;
+
+ if !(isNil '_get') then {
+ if !(_get select QUERYGEARHANDGUNPOOL) then {
+ _size = _size + (_get select QUERYGEARSPACE);
+ };
+ };
+ } forEach _magazines;
+};
+
+_totalToReplace = count _presentMags;
+_freeSpace = _size - _spaceToReduce;
+
+_futureSpace = _totalToReplace * _newMagSpace;
+while {(_futureSpace + _freeSpace) > _limit} do {
+ _totalToReplace = _totalToReplace - 1;
+ _futureSpace = _totalToReplace * _newMagSpace;
+};
+
+for [{_z = 0},{_z < _totalToReplace},{_z = _z + 1}] do {_replacement = _replacement + [_newMag]};
+
+_magazines = (_magazines - _presentMags) + _replacement;
+
+_magazines \ No newline at end of file
diff --git a/Client/Functions/Client_RequestFireMission.sqf b/Client/Functions/Client_RequestFireMission.sqf
new file mode 100644
index 0000000..8657fa7
--- /dev/null
+++ b/Client/Functions/Client_RequestFireMission.sqf
@@ -0,0 +1,25 @@
+Private ["_count","_destination","_index","_type","_units"];
+
+_destination = _this select 0;
+_index = _this select 1;
+_type = 0;
+
+scopeName "FireMission";
+
+_units = [group player,false,_index,sideJoinedText] Call GetTeamArtillery;
+
+if (count _units < 1) exitWith {};
+_type = ((Format ['WFBE_%1_ARTILLERY_NAMES',sideJoinedText] Call GetNamespace) select _index) find (typeOf (_units select 0));
+
+if (_type < 0) exitWith {_type};
+
+_units = [group player,false,_index,sideJoinedText] Call GetTeamArtillery;
+if (Count _units < 1) then {breakTo "FireMission"};
+
+for [{_count = count _units - 1},{_count >= 0},{_count = _count - 1}] do {
+ [_units select _count,_destination,Side player,artyRange,_index] Spawn FireArtillery;
+};
+
+//Keep weapons reloaded.
+_units = [Group player,true,_index,sideJoinedText] Call GetTeamArtillery;
+{if (!someAmmo _x) then {[_x,sideJoinedText] Call RearmVehicle}} forEach _units; \ No newline at end of file
diff --git a/Client/Functions/Client_RespawnBag.sqf b/Client/Functions/Client_RespawnBag.sqf
new file mode 100644
index 0000000..dd20527
--- /dev/null
+++ b/Client/Functions/Client_RespawnBag.sqf
@@ -0,0 +1,33 @@
+private ["_add"];
+
+if !(isNil 'respawnBag') then {
+ _add = false;
+ /* Player did purchase a backpack and have one by default */
+ if !(isNull (unitBackPack player)) then {
+ /* If the backpack type is different from the current one, then we remove it */
+ if (typeOf (unitBackPack player) != respawnBag) then {
+ removeBackpack player;
+ _add = true;
+ };
+ } else {
+ _add = true;
+ };
+
+ /* We give a new backpack to the player */
+ if (_add) then {player addBackpack respawnBag};
+
+ /* We clear the new backpack content */
+ clearMagazineCargo (unitBackpack player);
+
+ /* We add the player's backpack content inside the new one */
+ if (count (respawnBagContent select 0) > 0) then {
+ for '_u' from 0 to count(respawnBagContent select 0)-1 do {
+ (unitBackpack player) addMagazineCargo [(respawnBagContent select 0) select _u, (respawnBagContent select 1) select _u];
+ };
+ };
+} else {
+ /* Player did not purchase a backpack but have one by default */
+ if !(isNull (unitBackPack player)) then {
+ removeBackpack player;
+ };
+}; \ No newline at end of file
diff --git a/Client/Functions/Client_ReturnArraySortAsc.sqf b/Client/Functions/Client_ReturnArraySortAsc.sqf
new file mode 100644
index 0000000..82b1bcb
--- /dev/null
+++ b/Client/Functions/Client_ReturnArraySortAsc.sqf
@@ -0,0 +1,30 @@
+/* Only use string ! */
+Private['_ammo','_asciAr','_copy','_i','_index','_k','_list','_lowest','_unit','_weapon','_weapons'];
+
+_list = _this;
+_temp = [];
+
+_asciAr = [];
+/* Get the ascii value */
+{
+ _asciAr = _asciAr + [(toArray(_x)) select 0];
+} forEach _list;
+_copy = +_asciAr;
+
+_lowest = 100000;
+_index = -1;
+for [{_i = 0},{_i < count _asciAr},{_i = _i + 1}] do {
+ /* Get Lowest */
+ for [{_k = 0},{_k < count _copy},{_k = _k + 1}] do {
+ if (_lowest > (_copy select _k) && (_copy select _k) != -1) then {
+ _lowest = _copy select _k;
+ _index = _k;
+ };
+ };
+
+ _temp = _temp + [_index];
+ _copy set [_index, -1];
+ _lowest = 100000;
+};
+
+_temp \ No newline at end of file
diff --git a/Client/Functions/Client_SetControlFadeAnim.sqf b/Client/Functions/Client_SetControlFadeAnim.sqf
new file mode 100644
index 0000000..941de91
--- /dev/null
+++ b/Client/Functions/Client_SetControlFadeAnim.sqf
@@ -0,0 +1,28 @@
+Private ["_color","_control","_duration","_text","_textcontent"];
+_control = _this select 0;
+_text = _this select 1;
+_duration = _this select 2;
+_color = _this select 3;
+
+//--- Animate.
+_textcontent = parsetext (Format["<t size='0.8' color='#%1' font='Zeppelin33'>%2</t>",_color,_text]);
+with uinamespace do {
+ (currentBEDialog displayCtrl _control) ctrlSetStructuredText _textcontent;
+ (currentBEDialog displayCtrl _control) ctrlShow true;
+};
+
+_i = 0;
+while {_i < _duration} do {
+ with uinamespace do {
+ (currentBEDialog displayCtrl _control) ctrlSetFade (_i % 2);
+ (currentBEDialog displayCtrl _control) ctrlCommit 1;
+ };
+
+ _i = _i + 1;
+ sleep 1;
+};
+
+with uinamespace do {
+ (currentBEDialog displayCtrl _control) ctrlSetStructuredText parseText ("");
+ (currentBEDialog displayCtrl _control) ctrlShow false;
+}; \ No newline at end of file
diff --git a/Client/Functions/Client_SetControlFadeAnimStop.sqf b/Client/Functions/Client_SetControlFadeAnimStop.sqf
new file mode 100644
index 0000000..6f39abe
--- /dev/null
+++ b/Client/Functions/Client_SetControlFadeAnimStop.sqf
@@ -0,0 +1,9 @@
+Private ["_control","_duration","_text","_textcontent"];
+_control = _this select 0;
+
+with uinamespace do {
+ if !(ctrlShown (currentBEDialog displayCtrl _control)) exitWith {};
+
+ (currentBEDialog displayCtrl _control) ctrlSetStructuredText parseText ("");
+ (currentBEDialog displayCtrl _control) ctrlShow false;
+}; \ No newline at end of file
diff --git a/Client/Functions/Client_SetGroupsID.sqf b/Client/Functions/Client_SetGroupsID.sqf
new file mode 100644
index 0000000..6c6ab62
--- /dev/null
+++ b/Client/Functions/Client_SetGroupsID.sqf
@@ -0,0 +1,13 @@
+Private ["_m","_milalpha","_u"];
+
+_milalpha = ["Alpha","Bravo","Charlie","Delta","Echo","Foxtrot","Golf","Hotel","India","Juliet","Kilo","Lima","Mike",
+"November","Oscar","Papa","Quebec","Romeo","Sierra","Tango","Uniform","Victor","Whiskey","X-Ray","Yankee","Zulu",
+"Razor","Fatman","StarForce","Frostbite","Battlemage","Manhattan","Firefly","Swordsman","Sabre","Hammer","Reaper",
+"Anvil","Fortune"];
+
+_u = 0;
+_m = count _milalpha;
+{
+ if !(isNil '_x' && _u < _m) then {_x setGroupID [_milalpha select _u]};
+ _u = _u + 1;
+} forEach clientTeams \ No newline at end of file
diff --git a/Client/Functions/Client_SupportHeal.sqf b/Client/Functions/Client_SupportHeal.sqf
new file mode 100644
index 0000000..4680487
--- /dev/null
+++ b/Client/Functions/Client_SupportHeal.sqf
@@ -0,0 +1,99 @@
+Private ['_airCoef','_artCoef','_cts','_distanceMin','_heaCoef','_healTime','_i','_ligCoef','_name','_nearIsDP','_nearIsRT','_nearIsSP','_repairRange','_spType','_supportRange','_supports','_typeRepair','_veh'];
+_veh = _this select 0;
+_supports = _this select 1;
+_typeRepair = _this select 2;
+_spType = _this select 3;
+_supportRange = 'WFBE_SUPPORTRANGE' Call GetNamespace;
+_repairRange = 'WFBE_REPAIRTRUCKRANGE' Call GetNamespace;
+
+//--- Retrieve Informations.
+_name = [typeOf _veh, 'displayName'] Call GetConfigInfo;
+_healTime = 'WFBE_SUPPORTHEALTIME' Call GetNamespace;
+
+//--- SP?
+_nearIsSP = false;
+_nearIsDP = false;
+_nearIsRT = false;
+{
+ if ((typeOf _x) == _spType) then {_nearIsSP = true};
+ if ((typeOf _x) in WFDEPOT) then {_nearIsDP = true};
+ if ((typeOf _x) in _typeRepair) then {_nearIsRT = true};
+} forEach _supports;
+
+//--- Coefficient Vary depending on the support type.
+_airCoef = 1;
+_artCoef = 1;
+_heaCoef = 1;
+_ligCoef = 1;
+if (_nearIsRT) then {
+ _airCoef = 2.8;
+ _artCoef = 2.4;
+ _heaCoef = 2.2;
+ _ligCoef = 2.0;
+};
+if (_nearIsDP) then {
+ _airCoef = 2.3;
+ _artCoef = 2.1;
+ _heaCoef = 1.9;
+ _ligCoef = 1.7;
+};
+if (_nearIsSP) then {
+ _airCoef = 1.8;
+ _artCoef = 1.6;
+ _heaCoef = 1.4;
+ _ligCoef = 1.2;
+};
+
+//--- Class Malus.
+if (_veh isKindOf 'Air') then {_healTime = round(_healTime * (_airCoef + getDammage _veh))};
+if (_veh isKindOf 'StaticWeapon') then {_healTime = round(_healTime * (_artCoef + getDammage _veh))};
+if (_veh isKindOf 'Tank') then {_healTime = round(_healTime * (_heaCoef + getDammage _veh))};
+if (_veh isKindOf 'Car' || _veh isKindOf 'Motorcycle') then {_healTime = round(_healTime * (_ligCoef + getDammage _veh))};
+
+//--- Inform the player.
+hint parseText(Format[localize "STR_WF_INFO_Healing",_name,_healTime]);
+
+//--- Make sure that we still have something as a support.
+_cts = 0;
+_i = 0;
+while {true} do {
+ sleep 1;
+
+ //--- Check the distance & alive.
+ _cts = 0;
+ {
+ _distanceMin = if ((typeOf _x) in _typeRepair) then {_repairRange} else {_supportRange};
+ if ((alive _x) && ((_veh distance _x) < _distanceMin)) then {_cts = _cts + 1};
+ } forEach _supports;
+
+ _i = _i + 1;
+
+ if (_cts == 0 || !(alive _veh) || (getPos _veh) select 2 > 2) exitWith {hint parseText(Format[localize "STR_WF_INFO_Heal_Failed",_name])};
+ if (_i >= _healTime) exitWith {hint parseText(Format[localize "STR_WF_INFO_Heal_Success",_name])};
+};
+
+//--- Heal the damages?
+if (_cts != 0) then {
+ if (_veh isKindOf "Man") then {
+ _veh setDammage 0;
+ if (paramAceWounds) then
+ {
+ _veh call ace_sys_wounds_fnc_RemoveBleed;
+ _veh call ace_sys_wounds_fnc_RemovePain;
+ _vel call ace_sys_wounds_fnc_RemoveUncon;
+ };
+ } else {
+ _crews = crew _veh;
+ if (count _crews > 0) then {
+ {
+ _x setDammage 0;
+ if (paramAceWounds) then
+ {
+ _x call ace_sys_wounds_fnc_RemoveBleed;
+ _x call ace_sys_wounds_fnc_RemovePain;
+ _x call ace_sys_wounds_fnc_RemoveUncon;
+ };
+ } forEach _crews
+ };
+ };
+}; \ No newline at end of file
diff --git a/Client/Functions/Client_SupportRearm.sqf b/Client/Functions/Client_SupportRearm.sqf
new file mode 100644
index 0000000..ac2697e
--- /dev/null
+++ b/Client/Functions/Client_SupportRearm.sqf
@@ -0,0 +1,78 @@
+Private ['_airCoef','_artCoef','_cts','_distanceMin','_heaCoef','_i','_ligCoef','_name','_nearIsDP','_nearIsRT','_nearIsSP','_repairRange','_rearmTime','_spType','_supportRange','_supports','_typeRepair','_veh'];
+_veh = _this select 0;
+_supports = _this select 1;
+_typeRepair = _this select 2;
+_spType = _this select 3;
+_supportRange = 'WFBE_SUPPORTRANGE' Call GetNamespace;
+_repairRange = 'WFBE_REPAIRTRUCKRANGE' Call GetNamespace;
+
+//--- Retrieve Informations.
+_name = [typeOf _veh, 'displayName'] Call GetConfigInfo;
+_rearmTime = 'WFBE_SUPPORTREARMTIME' Call GetNamespace;
+
+//--- SP?
+_nearIsSP = false;
+_nearIsDP = false;
+_nearIsRT = false;
+{
+ if ((typeOf _x) == _spType) then {_nearIsSP = true};
+ if ((typeOf _x) in WFDEPOT) then {_nearIsDP = true};
+ if ((typeOf _x) in _typeRepair) then {_nearIsRT = true};
+} forEach _supports;
+
+//--- Coefficient Vary depending on the support type.
+_airCoef = 1;
+_artCoef = 1;
+_heaCoef = 1;
+_ligCoef = 1;
+if (_nearIsRT) then {
+ _airCoef = 3.4;
+ _artCoef = 3;
+ _heaCoef = 2.8;
+ _ligCoef = 2.6;
+};
+if (_nearIsDP) then {
+ _airCoef = 2.5;
+ _artCoef = 2.4;
+ _heaCoef = 2.2;
+ _ligCoef = 2;
+};
+if (_nearIsSP) then {
+ _airCoef = 1.9;
+ _artCoef = 1.7;
+ _heaCoef = 1.5;
+ _ligCoef = 1.2;
+};
+
+//--- Class Malus.
+if (_veh isKindOf 'Air') then {_rearmTime = round(_rearmTime * _airCoef)};
+if (_veh isKindOf 'StaticWeapon') then {_rearmTime = round(_rearmTime * _artCoef)};
+if (_veh isKindOf 'Tank') then {_rearmTime = round(_rearmTime * _heaCoef)};
+if (_veh isKindOf 'Car' || _veh isKindOf 'Motorcycle') then {_rearmTime = round(_rearmTime * _ligCoef)};
+
+//--- Inform the player.
+hint parseText(Format[localize "STR_WF_INFO_Rearming",_name,_rearmTime]);
+
+//--- Make sure that we still have something as a support.
+_cts = 0;
+_i = 0;
+while {true} do {
+ sleep 1;
+
+ //--- Check the distance & alive.
+ _cts = 0;
+ {
+ _distanceMin = if ((typeOf _x) in _typeRepair) then {_repairRange} else {_supportRange};
+ if ((alive _x) && ((_veh distance _x) < _distanceMin)) then {_cts = _cts + 1};
+ } forEach _supports;
+
+ _i = _i + 1;
+
+ if (_cts == 0 || !(alive _veh) || (getPos _veh) select 2 > 2) exitWith {hint parseText(Format[localize "STR_WF_INFO_Rearm_Failed",_name])};
+ if (_i >= _rearmTime) exitWith {hint parseText(Format[localize "STR_WF_INFO_Rearm_Success",_name])};
+};
+
+//--- Rearm?
+if (_cts != 0) then {
+ [_veh,sideJoined] Spawn RearmVehicle;
+}; \ No newline at end of file
diff --git a/Client/Functions/Client_SupportRefuel.sqf b/Client/Functions/Client_SupportRefuel.sqf
new file mode 100644
index 0000000..25cef76
--- /dev/null
+++ b/Client/Functions/Client_SupportRefuel.sqf
@@ -0,0 +1,78 @@
+Private ['_airCoef','_artCoef','_cts','_distanceMin','_heaCoef','_i','_ligCoef','_name','_nearIsDP','_nearIsRT','_nearIsSP','_repairRange','_refTime','_spType','_supportRange','_supports','_typeRepair','_veh'];
+_veh = _this select 0;
+_supports = _this select 1;
+_typeRepair = _this select 2;
+_spType = _this select 3;
+_supportRange = 'WFBE_SUPPORTRANGE' Call GetNamespace;
+_repairRange = 'WFBE_REPAIRTRUCKRANGE' Call GetNamespace;
+
+//--- Retrieve Informations.
+_name = [typeOf _veh, 'displayName'] Call GetConfigInfo;
+_refTime = 'WFBE_SUPPORTREFUELTIME' Call GetNamespace;
+
+//--- SP?
+_nearIsSP = false;
+_nearIsDP = false;
+_nearIsRT = false;
+{
+ if ((typeOf _x) == _spType) then {_nearIsSP = true};
+ if ((typeOf _x) in WFDEPOT) then {_nearIsDP = true};
+ if ((typeOf _x) in _typeRepair) then {_nearIsRT = true};
+} forEach _supports;
+
+//--- Coefficient Vary depending on the support type.
+_airCoef = 1;
+_artCoef = 1;
+_heaCoef = 1;
+_ligCoef = 1;
+if (_nearIsRT) then {
+ _airCoef = 2.8;
+ _artCoef = 2.4;
+ _heaCoef = 2.2;
+ _ligCoef = 2.0;
+};
+if (_nearIsDP) then {
+ _airCoef = 2.3;
+ _artCoef = 2.1;
+ _heaCoef = 1.9;
+ _ligCoef = 1.7;
+};
+if (_nearIsSP) then {
+ _airCoef = 1.8;
+ _artCoef = 1.6;
+ _heaCoef = 1.4;
+ _ligCoef = 1.2;
+};
+
+//--- Class Malus.
+if (_veh isKindOf 'Air') then {_refTime = round(_refTime * (_airCoef + (1 - fuel _veh)))};
+if (_veh isKindOf 'StaticWeapon') then {_refTime = round(_refTime * (_artCoef + (1 - fuel _veh)))};
+if (_veh isKindOf 'Tank') then {_refTime = round(_refTime * (_heaCoef + (1 - fuel _veh)))};
+if (_veh isKindOf 'Car' || _veh isKindOf 'Motorcycle') then {_refTime = round(_refTime * (_ligCoef + (1 - fuel _veh)))};
+
+//--- Inform the player.
+hint parseText(Format[localize "STR_WF_INFO_Refueling",_name,_refTime]);
+
+//--- Make sure that we still have something as a support.
+_cts = 0;
+_i = 0;
+while {true} do {
+ sleep 1;
+
+ //--- Check the distance & alive.
+ _cts = 0;
+ {
+ _distanceMin = if ((typeOf _x) in _typeRepair) then {_repairRange} else {_supportRange};
+ if ((alive _x) && ((_veh distance _x) < _distanceMin)) then {_cts = _cts + 1};
+ } forEach _supports;
+
+ _i = _i + 1;
+
+ if (_cts == 0 || !(alive _veh) || (getPos _veh) select 2 > 2) exitWith {hint parseText(Format[localize "STR_WF_INFO_Refueling_Failed",_name])};
+ if (_i >= _refTime) exitWith {hint parseText(Format[localize "STR_WF_INFO_Refueling_Success",_name])};
+};
+
+//--- Refuel the vehicle?
+if (_cts != 0) then {
+ _veh setFuel 1;
+}; \ No newline at end of file
diff --git a/Client/Functions/Client_SupportRepair.sqf b/Client/Functions/Client_SupportRepair.sqf
new file mode 100644
index 0000000..57169f2
--- /dev/null
+++ b/Client/Functions/Client_SupportRepair.sqf
@@ -0,0 +1,78 @@
+Private ['_airCoef','_artCoef','_cts','_distanceMin','_heaCoef','_i','_ligCoef','_name','_nearIsDP','_nearIsRT','_nearIsSP','_repairRange','_repTime','_spType','_supportRange','_supports','_typeRepair','_veh'];
+_veh = _this select 0;
+_supports = _this select 1;
+_typeRepair = _this select 2;
+_spType = _this select 3;
+_supportRange = 'WFBE_SUPPORTRANGE' Call GetNamespace;
+_repairRange = 'WFBE_REPAIRTRUCKRANGE' Call GetNamespace;
+
+//--- Retrieve Informations.
+_name = [typeOf _veh, 'displayName'] Call GetConfigInfo;
+_repTime = 'WFBE_SUPPORTREPAIRTIME' Call GetNamespace;
+
+//--- SP?
+_nearIsSP = false;
+_nearIsDP = false;
+_nearIsRT = false;
+{
+ if ((typeOf _x) == _spType) then {_nearIsSP = true};
+ if ((typeOf _x) in WFDEPOT) then {_nearIsDP = true};
+ if ((typeOf _x) in _typeRepair) then {_nearIsRT = true};
+} forEach _supports;
+
+//--- Coefficient Vary depending on the support type.
+_airCoef = 1;
+_artCoef = 1;
+_heaCoef = 1;
+_ligCoef = 1;
+if (_nearIsRT) then {
+ _airCoef = 2.4;
+ _artCoef = 1.8;
+ _heaCoef = 1.6;
+ _ligCoef = 1.4;
+};
+if (_nearIsDP) then {
+ _airCoef = 1.9;
+ _artCoef = 1.5;
+ _heaCoef = 1.3;
+ _ligCoef = 1.1;
+};
+if (_nearIsSP) then {
+ _airCoef = 1.4;
+ _artCoef = 1;
+ _heaCoef = 0.8;
+ _ligCoef = 0.6;
+};
+
+//--- Class Malus.
+if (_veh isKindOf 'Air') then {_repTime = round(_repTime * (_airCoef + getDammage _veh))};
+if (_veh isKindOf 'StaticWeapon') then {_repTime = round(_repTime * (_artCoef + getDammage _veh))};
+if (_veh isKindOf 'Tank') then {_repTime = round(_repTime * (_heaCoef + getDammage _veh))};
+if (_veh isKindOf 'Car' || _veh isKindOf 'Motorcycle') then {_repTime = round(_repTime * (_ligCoef + getDammage _veh))};
+
+//--- Inform the player.
+hint parseText(Format[localize "STR_WF_INFO_Repairing",_name,_repTime]);
+
+//--- Make sure that we still have something as a support.
+_cts = 0;
+_i = 0;
+while {true} do {
+ sleep 1;
+
+ //--- Check the distance & alive.
+ _cts = 0;
+ {
+ _distanceMin = if ((typeOf _x) in _typeRepair) then {_repairRange} else {_supportRange};
+ if ((alive _x) && ((_veh distance _x) < _distanceMin)) then {_cts = _cts + 1};
+ } forEach _supports;
+
+ _i = _i + 1;
+
+ if (_cts == 0 || !(alive _veh) || (getPos _veh) select 2 > 2) exitWith {hint parseText(Format[localize "STR_WF_INFO_Repair_Failed",_name])};
+ if (_i >= _repTime) exitWith {hint parseText(Format[localize "STR_WF_INFO_Repair_Success",_name])};
+};
+
+//--- Fix the damages?
+if (_cts != 0) then {
+ _veh setDammage 0;
+}; \ No newline at end of file
diff --git a/Client/Functions/Client_TaskSystem.sqf b/Client/Functions/Client_TaskSystem.sqf
new file mode 100644
index 0000000..3072fb2
--- /dev/null
+++ b/Client/Functions/Client_TaskSystem.sqf
@@ -0,0 +1,69 @@
+Private ["_i","_location","_locations","_next","_sideID","_sorted","_task","_type"];
+_type = _this select 0;
+_location = if (count _this > 1) then {_this select 1} else {objNull};
+
+switch (_type) do {
+ //--- Complete Towns set initialization.
+ case "TownAddComplete": {
+ //--- Todo: improve the sort by with other digits instead of the first one.
+ sleep 4;
+ Private ["_addOrder","_returned","_town","_towns","_townsLabel"];
+ _townsLabel = [];
+ {_townsLabel = _townsLabel + [_x getVariable 'name']} forEach towns;
+ _towns = ([_townsLabel,true,towns] Call CIPHER_SortArray) select 1;
+
+ for '_i' from 0 to count(_towns)-1 do {
+ _town = _towns select _i;
+ waitUntil {_sideID = _town getVariable 'sideID';!isNil '_sideID'};
+ _sideID = _town getVariable "sideID";
+ _task = player createSimpleTask [Format["TakeTowns_%1",str _town]];
+ if (_sideID != sideID) then {
+ _task setSimpleTaskDescription [Format[localize "STR_WF_TaskTown",_town getVariable "name"], Format [localize "STR_WF_CHAT_TaskTown_Display",_town getVariable "name"], Format [localize "STR_WF_CHAT_TaskTown_Display",_town getVariable "name"]];
+ } else {
+ _task setSimpleTaskDescription [Format[localize "STR_WF_TaskTown_Complete",_town getVariable "name"], Format [localize "STR_WF_CHAT_TaskTown_Display",_town getVariable "name"], Format [localize "STR_WF_CHAT_TaskTown_Display",_town getVariable "name"]];
+ _task setTaskState "Succeeded";
+ };
+ _task setSimpleTaskDestination (getPos _town);
+ _town setVariable ['taskLink',_task];
+ };
+
+ ["TownAssignClosest"] Spawn TaskSystem;
+ };
+
+ //--- Assign the closest town to the player.
+ case "TownAssignClosest": {
+ sleep 4;
+ _next = [player,sideJoined] Call GetClosestLocationBySide;
+ if !(isNull _next) then {
+ ["TownHintNew",_next] Spawn TaskSystem;
+ _task = (_next getVariable 'taskLink');
+ /* Keep the commander order ! */
+ if (!isNull comTask) then {
+ if (taskState comTask == "Succeeded") then {player setCurrentTask _task};
+ } else {
+ player setCurrentTask _task;
+ };
+ };
+ };
+
+ //--- Update a town's value.
+ case "TownUpdate": {
+ _task = _location getVariable 'taskLink';
+ _sideID = _location getVariable "sideID";
+ if !(isNil '_task') then {
+ if (_sideID == sideID) then {
+ _task setTaskState "Succeeded";
+ _task setSimpleTaskDescription [Format[localize "STR_WF_TaskTown_Complete",_location getVariable "name"], Format [localize "STR_WF_CHAT_TaskTown_Display",_location getVariable "name"], Format [localize "STR_WF_CHAT_TaskTown_Display",_location getVariable "name"]];
+ } else {
+ _task setTaskState "Created";
+ _task setSimpleTaskDescription [Format[localize "STR_WF_TaskTown",_location getVariable "name"], Format [localize "STR_WF_CHAT_TaskTown_Display",_location getVariable "name"], Format [localize "STR_WF_CHAT_TaskTown_Display",_location getVariable "name"]];
+ };
+ }
+ };
+
+ //--- Hint for a new town task.
+ case "TownHintNew": {taskHint [format [localize "str_taskNew" + "\n%1",Format [localize "STR_WF_CHAT_TaskTown_Display",_location getVariable "name"]], [1,1,1,1], "taskNew"]};
+
+ //--- Hint for a completed town task.
+ case "TownHintDone": {taskHint [format [localize "str_taskAccomplished" + "\n%1",Format [localize "STR_WF_CHAT_TaskTown_Display",_location getVariable "name"]], [1,1,1,1], "taskDone"]};
+}; \ No newline at end of file
diff --git a/Client/Functions/Client_TitleTextMessage.sqf b/Client/Functions/Client_TitleTextMessage.sqf
new file mode 100644
index 0000000..113e55b
--- /dev/null
+++ b/Client/Functions/Client_TitleTextMessage.sqf
@@ -0,0 +1,7 @@
+Private["_message","_style"];
+
+_message = _this Select 0;
+_style = "PLAIN";
+if (Count _this > 1) then {_style = _this Select 1};
+
+12451 cutText ["\n\n\n\n\n\n\n" + _message,_style]; \ No newline at end of file
diff --git a/Client/Functions/Client_UIAddItem.sqf b/Client/Functions/Client_UIAddItem.sqf
new file mode 100644
index 0000000..b7e84f6
--- /dev/null
+++ b/Client/Functions/Client_UIAddItem.sqf
@@ -0,0 +1,11 @@
+Private ['_items','_limit','_mag','_size'];
+_items = _this select 0;
+_mag = _this select 1;
+_size = 0;
+_limit = 12;
+
+{_size = _size + 1} forEach _items;
+
+if (_size + 1 <= _limit) then {_items = _items + [_mag]};
+
+_items \ No newline at end of file
diff --git a/Client/Functions/Client_UIAddMagazine.sqf b/Client/Functions/Client_UIAddMagazine.sqf
new file mode 100644
index 0000000..509c515
--- /dev/null
+++ b/Client/Functions/Client_UIAddMagazine.sqf
@@ -0,0 +1,35 @@
+private ["_get","_limit","_newMagSpace","_newMagSideInv","_mag","_magazines","_size"];
+_magazines = _this select 0;
+_mag = _this select 1;
+_size = 0;
+_limit = 12;
+
+_get = _mag Call GetNamespace;
+_newMagSpace = _get select QUERYGEARSPACE;
+_newMagSideInv = _get select QUERYGEARHANDGUNPOOL;
+_limit = if (_newMagSideInv) then {8} else {12};
+
+if (_newMagSideInv) then {
+ {
+ _get = _x Call GetNamespace;
+
+ if !(isNil '_get') then {
+ if (_get select QUERYGEARHANDGUNPOOL) then {
+ _size = _size + (_get select QUERYGEARSPACE);
+ };
+ };
+ } forEach _magazines;
+} else {
+ {
+ _get = _x Call GetNamespace;
+
+ if !(isNil '_get') then {
+ if !(_get select QUERYGEARHANDGUNPOOL) then {
+ _size = _size + (_get select QUERYGEARSPACE);
+ };
+ };
+ } forEach _magazines;
+};
+
+if (_size + _newMagSpace <= _limit) then {_magazines = _magazines + [_mag]};
+_magazines \ No newline at end of file
diff --git a/Client/Functions/Client_UIChangeComboBuyUnits.sqf b/Client/Functions/Client_UIChangeComboBuyUnits.sqf
new file mode 100644
index 0000000..6867d89
--- /dev/null
+++ b/Client/Functions/Client_UIChangeComboBuyUnits.sqf
@@ -0,0 +1,15 @@
+Private['_get','_lb','_type'];
+_lb = _this select 0;
+_type = _this select 1;
+
+lbClear _lb;
+{
+ lbAdd [_lb,_x];
+} forEach (Format["WFBE_%1%2FACTIONS",sideJoinedText,_type] Call GetNamespace);
+
+_get = Format["WFBE_%1%2CURRENTFACTIONSELECTED",sideJoinedText,_type] Call GetNamespace;
+if (isNil '_get') then {
+ lbSetCurSel [_lb,0];
+} else {
+ lbSetCurSel [_lb,_get];
+}; \ No newline at end of file
diff --git a/Client/Functions/Client_UIFillListBuyUnits.sqf b/Client/Functions/Client_UIFillListBuyUnits.sqf
new file mode 100644
index 0000000..78e8881
--- /dev/null
+++ b/Client/Functions/Client_UIFillListBuyUnits.sqf
@@ -0,0 +1,35 @@
+Private ['_addin','_c','_currentUpgrades','_filler','_filter','_i','_listBox','_listNames','_u','_value'];
+_listNames = _this select 0;
+_filler = _this select 1;
+_listBox = _this select 2;
+_value = _this select 3;
+_u = 0;
+_i = 0;
+
+_currentUpgrades = (sideJoinedText) Call GetSideUpgrades;
+_filter = Format["WFBE_%1%2CURRENTFACTIONSELECTED",sideJoinedText,_filler] Call GetNamespace;
+if (isNil '_filter') then {_filter = "nil"} else {
+ if (_filter == 0) then {
+ _filter = 'nil';
+ } else {
+ _filter = ((Format["WFBE_%1%2FACTIONS",sideJoinedText,_filler] Call GetNamespace) select _filter);
+ };
+};
+
+lnbClear _listBox;
+{
+ _addin = true;
+ _c = _x Call GetNamespace;
+ if (_filter != "nil") then {
+ if ((_c select QUERYUNITFACTION) != _filter) then {_addin = false};
+ };
+ if ((_c select QUERYUNITUPGRADE) <= (_currentUpgrades select _value) && _addin) then {
+ lnbAddRow [_listBox,['$'+str (_c select QUERYUNITPRICE),(_c select QUERYUNITLABEL)]];
+ lnbSetData [_listBox,[_i,0],_filler];
+ lnbSetValue [_listBox,[_i,0],_u];
+ _i = _i + 1;
+ };
+ _u = _u + 1;
+} forEach _listNames;
+
+if (_i > 0) then {lnbSetCurSelRow [_listBox,0]} else {lnbSetCurSelRow [_listBox,-1]}; \ No newline at end of file
diff --git a/Client/Functions/Client_UIFillListTeamOrders.sqf b/Client/Functions/Client_UIFillListTeamOrders.sqf
new file mode 100644
index 0000000..8d3a0f8
--- /dev/null
+++ b/Client/Functions/Client_UIFillListTeamOrders.sqf
@@ -0,0 +1,42 @@
+Private ['_color','_extra','_i','_isVehicle','_listBox','_listContent','_pic','_unit'];
+_listContent = _this select 0;
+_listBox = _this select 1;
+_i = 0;
+_pic = "";
+
+lnbClear _listBox;
+
+{
+ _unit = vehicle _x;
+ _isVehicle = if (_x != _unit) then {true} else {false};
+
+ _color = [];
+ _extra = "";
+ if (round(((getDammage _unit)*-100)+100) < 75) then {
+ _color = [0.875, 0.5, 0, 1];
+ _extra = "[Injured] ";
+ if (round(((getDammage _unit)*-100)+100) < 50) then {
+ _extra = "[Injured] ";
+ _color = [0.875, 0, 0, 1];
+ if !(alive _x) then {_extra = "[Dead]"};
+ };
+ };
+ if (count _color == 0 && _isVehicle) then {
+ if !(canMove _unit) then {
+ _extra = "[Immobilized] ";
+ _color = [0.875, 0.875, 0, 1];
+ };
+ };
+
+ lnbAddRow [_listBox,[str(round(((getDammage _unit)*-100)+100)) + "%",_extra+"("+([typeOf _unit, 'displayName'] Call GetConfigInfo)+") "+name _x]];
+ _pic = if (_isVehicle) then {[typeOf _unit, 'picture'] Call GetConfigInfo} else {[typeOf _unit, 'portrait'] Call GetConfigInfo};
+ lnbSetPicture [_listBox,[_i,1],_pic];
+
+ if (count _color > 0) then {
+ lnbSetColor [_listBox,[_i,0],_color];
+ lnbSetColor [_listBox,[_i,1],_color];
+ };
+ _i = _i + 1;
+} forEach _listContent;
+
+if (_i > 0) then {lnbSetCurSelRow [_listBox,0]} else {lnbSetCurSelRow [_listBox,-1]}; \ No newline at end of file
diff --git a/Client/Functions/Client_UIFindLBValue.sqf b/Client/Functions/Client_UIFindLBValue.sqf
new file mode 100644
index 0000000..ae06622
--- /dev/null
+++ b/Client/Functions/Client_UIFindLBValue.sqf
@@ -0,0 +1,12 @@
+Private ['_itemsCount','_listbox','_retVal','_value'];
+_listbox = _this select 0;
+_value = _this select 1;
+
+_itemsCount = lbSize _listbox;
+
+_retVal = -1;
+for '_i' from 0 to _itemsCount-1 do {
+ if (lbValue[_listbox, _i] == _value) exitWith {_retVal = _i};
+};
+
+_retVal \ No newline at end of file
diff --git a/Client/Functions/Client_UIGearFillList.sqf b/Client/Functions/Client_UIGearFillList.sqf
new file mode 100644
index 0000000..2eb0d55
--- /dev/null
+++ b/Client/Functions/Client_UIGearFillList.sqf
@@ -0,0 +1,40 @@
+Private ['_add','_currentGearUpgr','_filler','_get','_i','_listBox','_listNames','_u'];
+_listNames = _this select 0;
+_filler = _this select 1;
+_listBox = _this select 2;
+_u = 0;
+_i = 0;
+_get = [];
+
+_currentGearUpgr = ((sideJoinedText) Call GetSideUpgrades) select 13;
+
+{
+ /* Get */
+ if (_filler == 'secondary' || _filler == 'all') then {
+ _get = (_x+'_W') Call GetNamespace;
+ if (isNil '_get') then {
+ _get = _x Call GetNamespace;
+ };
+ } else {
+ _get = _x Call GetNamespace;
+ };
+
+ if !(isNil '_get') then {
+ if ((_get select QUERYGEARUPGRADE) <= _currentGearUpgr) then {
+ _add = true;
+ if (paramGearRestriction && !gearInRange) then {
+ if !(_get select QUERYGEARALLOWED) then {_add = false};
+ };
+ if (_add) then {
+ lnbAddRow [_listBox,['$'+str (_get Select QUERYGEARCOST),(_get select QUERYGEARLABEL)]];
+ lnbSetPicture [_listBox,[_i,0],_get select QUERYGEARPICTURE];
+ lnbSetData [_listBox,[_i,0],_filler];
+ lnbSetValue [_listBox,[_i,0],_u];
+ _i = _i + 1;
+ };
+ };
+ };
+ _u = _u + 1;
+} forEach _listNames;
+
+lnbSetCurSelRow [_listBox,0] \ No newline at end of file
diff --git a/Client/Functions/Client_UIGearFillTemplateList.sqf b/Client/Functions/Client_UIGearFillTemplateList.sqf
new file mode 100644
index 0000000..25dc6cc
--- /dev/null
+++ b/Client/Functions/Client_UIGearFillTemplateList.sqf
@@ -0,0 +1,31 @@
+Private ['_add','_currentUpgrades','_filler','_i','_listBox','_listCosts','_listNames','_listPictures','_listUpgrades','_listAllowed','_u'];
+_listCosts = _this select 0;
+_listNames = _this select 1;
+_listPictures = _this select 2;
+_listUpgrades = _this select 3;
+_listAllowed = _this select 4;
+_filler = _this select 5;
+_listBox = _this select 6;
+_u = 0;
+_i = 0;
+
+_currentUpgrades = (sideJoinedText) Call GetSideUpgrades;
+
+{
+ if ((_listUpgrades select _u) <= (_currentUpgrades select 13)) then {
+ _add = true;
+ if (gearRestriction && !gearInRange) then {
+ if !(_listAllowed select _u) then {_add = false};
+ };
+ if (_add) then {
+ lnbAddRow [_listBox,['$'+str (_listCosts Select _u),_x]];
+ lnbSetPicture [_listBox,[_i,0],_listPictures select _u];
+ lnbSetData [_listBox,[_i,0],_filler];
+ lnbSetValue [_listBox,[_i,0],_u];
+ _i = _i + 1;
+ };
+ };
+ _u = _u + 1;
+} forEach _listNames;
+
+lnbSetCurSelRow [_listBox,0] \ No newline at end of file
diff --git a/Client/GUI/GUI_ArtilleryMenu.sqf b/Client/GUI/GUI_ArtilleryMenu.sqf
new file mode 100644
index 0000000..82aec12
--- /dev/null
+++ b/Client/GUI/GUI_ArtilleryMenu.sqf
@@ -0,0 +1,649 @@
+
+private ["_canFT","_startPoint","_closest","_sorted","_buildings","_checks","_sideID","_camps","_allCamps","_locations","_skip","_FTLocations","_markerName","_markers","_i","_lastUpdate","_base","_isDeployed","_currentLevel","_commander","_enable","_callPos","_travelingWith","_destination","_compass","_GPS","_pad","_radio","_watch","_locationPosition","_camera","_delay","_obj","_nukeMarker","_fireTime","_status","_txt","_units","_currentUpgrades","_funds","_lastRange","_display","_ftr","_marker","_area","_map","_pard","_IDCS"];
+disableSerialization;
+
+_display = _this select 0;
+_lastRange = artyRange;
+_lastUpdate = 0;
+_listBox = 17019;
+
+sliderSetRange[17005,10,'WFBE_MAXARTILLERYAREA' Call GetNamespace];
+sliderSetPosition[17005,artyRange];
+
+ctrlSetText [17025,localize "STR_WF_ArtilleryOverview" + " :"];
+
+_markers = [];
+_FTLocations = [];
+_checks = [];
+_fireTime = 0;
+_status = 0;
+_canFT = false;
+_forceReload = true;
+_ft = 'WFBE_FASTTRAVEL' Call GetNamespace;
+_ftr = 'WFBE_FASTTRAVELRANGE' Call GetNamespace;
+_startPoint = objNull;
+
+_marker = "artilleryMarker";
+createMarkerLocal [_marker,artyPos];
+_marker setMarkerTypeLocal "mil_destroy";
+_marker setMarkerColorLocal "ColorRed";
+_marker setMarkerSizeLocal [1,1];
+
+_area = "artilleryAreaMarker";
+createMarkerLocal [_area,artyPos];
+_area setMarkerShapeLocal "Ellipse";
+_area setMarkerColorLocal "ColorRed";
+_area setMarkerSizeLocal [artyRange,artyRange];
+
+_map = _display DisplayCtrl 17002;
+_listboxControl = _display DisplayCtrl _listBox;
+
+_pard = 'WFBE_PARADELAY' Call GetNamespace;
+{lbAdd[17008,_x]} forEach (Format ["WFBE_%1_ARTILLERY_DESC",sideJoinedText] Call GetNamespace);
+lbSetCurSel[17008,0];
+
+_IDCS = [17005,17006,17007,17008];
+if !(paramArty) then {{ctrlEnable [_x,false]} forEach _IDCS};
+
+{ctrlEnable [_x, false]} forEach [17010,17011,17012,17013,17014,17015,17017,17018,17020];
+
+MenuAction = -1;
+mouseButtonUp = -1;
+_currentValue = -1;
+_currentFee = -1;
+_currentSpecial = "";
+_currentFee = -1;
+
+//--- Support List.
+_lastSel = -1;
+_addToList = [localize 'STR_WF_FastTravel',localize 'STR_WF_ICBM',localize 'STR_WF_Paradrop_Ammo',localize 'STR_WF_Paradrop_Vehicle',localize 'STR_WF_Paratroop',localize 'STR_WF_UnitCam',localize 'STR_WF_UAV',localize 'STR_WF_UAV_Destroy',localize 'STR_WF_UAV_RemoteControl'];
+_addToListID = ["Fast_Travel","ICBM","Paradrop_Ammo","Paradrop_Vehicle","Paratroopers","Units_Camera","UAV","UAV_Destroy","UAV_Remote_Control"];
+_addToListFee = [0,150000,9500,3500,8500,0,12500,0,0];
+_addToListInterval = [0,1000,800,600,900,0,0,0,0];
+
+for '_i' from 0 to count(_addToList)-1 do {
+ lbAdd [_listBox,_addToList select _i];
+ lbSetValue [_listBox, _i, _i];
+};
+
+lbSort _listboxControl;
+
+//--- Artillery Mode.
+_mode = 'WFBE_V_ARTILLERYMINMAP' Call GetNamespace;
+if (isNil '_mode') then {_mode = 2;['WFBE_V_ARTILLERYMINMAP',_mode,true] Call SetNamespace};
+_trackingArray = [];
+_trackingArrayID = [];
+_lastArtyUpdate = -60;
+_minRange = 100;
+_maxRange = 200;
+_requestMarkerTransition = false;
+_requestRangedList = true;
+_startLoad = true;
+
+//--- Startup coloration.
+with uinamespace do {
+ currentBEDialog = _display;
+ switch (_mode) do {
+ case 0: {(currentBEDialog displayCtrl 17023) ctrlSetTextColor [1,1,1,1]};
+ case 1: {(currentBEDialog displayCtrl 17023) ctrlSetTextColor [0,0.635294,0.909803,1]};
+ case 2: {(currentBEDialog displayCtrl 17023) ctrlSetTextColor [0.6,0.850980,0.917647,1]};
+ };
+};
+
+lbSetCurSel[_listbox, 0];
+
+_textAnimHandler = [] spawn {};
+
+while {alive player && dialog} do {
+ if (side player != sideJoined) exitWith {deleteMarkerLocal _marker;deleteMarkerLocal _area;{deleteMarkerLocal _x} forEach _markers;closeDialog 0};
+ if (!dialog) exitWith {deleteMarkerLocal _marker;deleteMarkerLocal _area;{deleteMarkerLocal _x} forEach _markers};
+
+ _currentUpgrades = (sideJoinedText) Call GetSideUpgrades;
+
+ if (_ft > 0) then {
+ //--- TODO: Travel fee, mod parameter > FT free or pay, do a clt fct.
+ _currentLevel = _currentUpgrades select 12;
+ if (time - _lastUpdate > 15 && _currentLevel > 0) then {
+ {deleteMarkerLocal _x} forEach _markers;
+ _markers = [];
+ _FTLocations = [];
+ _canFT = false;
+ _startPoint = objNull;
+ _lastUpdate = time;
+ _base = (sideJoinedText) Call GetSideHQ;
+ _isDeployed = (sideJoinedText) Call GetSideHQDeployed;
+ if (player distance _base < _ftr && alive _base && vehicle player != _base && _isDeployed) then {
+ _canFT = true;
+ _startPoint = _base;
+ } else {
+ _sorted = [player,towns] Call SortByDistance;
+ _closest = _sorted select 0;
+ _sideID = _closest getVariable "sideID";
+ _camps = [_closest,sideJoined] Call GetFriendlyCamps;
+ _allCamps = _closest getVariable "camps";
+ if (_sideID == sideID && player distance _closest < _ftr && (count _camps == count _allCamps)) then {_canFT = true;_startPoint = _closest} else {
+ _buildings = (sideJoinedText) Call GetSideStructures;
+ _checks = [sideJoined,Format ["WFBE_%1COMMANDCENTERTYPE",sideJoinedText] Call GetNamespace,_buildings] Call GetFactories;
+ if (count _checks > 0) then {
+ _sorted = [player,_checks] Call SortByDistance;
+ _closest = _sorted select 0;
+ if (player distance _closest < _ftr) then {
+ _canFT = true;
+ _closest = _sorted select 0;
+ _startPoint = _closest;
+ };
+ };
+ };
+ };
+ if (!canMove (vehicle player)) then {_canFT = false};
+ if (_canFT) then {
+ _buildings = (sideJoinedText) Call GetSideStructures;
+ _checks = [sideJoined,Format ["WFBE_%1COMMANDCENTERTYPE",sideJoinedText] Call GetNamespace,_buildings] Call GetFactories;
+ _locations = towns + _checks;
+ if (alive _base && _isDeployed) then {_locations = _locations + [_base]};
+ _i = 0;
+ _fee = 0;
+ _funds = if (_ft == 2) then {Call GetPlayerFunds} else {0};
+ {
+ if (_x distance player <= ('WFBE_FASTTRAVELMAXRANGE' Call GetNamespace) && _x distance player > _ftr) then {
+ _skip = false;
+ if (_x in towns) then {
+ _sideID = _x getVariable "sideID";
+ _camps = [_x,sideJoined] Call GetFriendlyCamps;
+ _allCamps = _x getVariable "camps";
+ if (_sideID != sideID || (count _camps != count _allCamps)) then {_skip = true};
+ if (_ft == 2) then {
+ _fee = round(((_x distance player)/1000) * ('WFBE_FASTTRAVELPRICEKM' Call GetNamespace));
+ if (_funds < _fee) then {_skip = true};
+ };
+ };
+ if !(_skip) then {
+ _FTLocations = _FTLocations + [_x];
+ _markerName = Format ["FTMarker%1",_i];
+ _markers = _markers + [_markerName];
+ createMarkerLocal [_markerName,getPos _x];
+ _markerName setMarkerTypeLocal "mil_circle";
+ _markerName setMarkerColorLocal "ColorYellow";
+ _markerName setMarkerSizeLocal [1,1];
+ //--- Fee, Cheap marker stuff, TBD: Add prompt or something.
+ if (_ft == 2) then {
+ _markerName = Format ["FTMarker%1%1",_i];
+ _markers = _markers + [_markerName];
+ createMarkerLocal [_markerName,[(getPos _x select 0)-5,(getPos _x select 1)+75]];
+ _markerName setMarkerTypeLocal "mil_circle";
+ _markerName setMarkerColorLocal "ColorYellow";
+ _markerName setMarkerSizeLocal [0,0];
+ _markerName setMarkerTextLocal Format ["$ %1.",_fee];
+ };
+ _i = _i + 1;
+ };
+ };
+ } forEach _locations;
+ };
+ };
+ };
+
+ _currentSel = lbCurSel(_listBox);
+
+ //--- Special changed or a reload is requested.
+ if (_currentSel != _lastSel || _forceReload) then {
+ _currentValue = lbValue[_listBox, _currentSel];
+
+ _currentSpecial = _addToListID select _currentValue;
+ _currentFee = _addToListFee select _currentValue;
+ _currentInterval = _addToListInterval select _currentValue;
+
+ _forceReload = false;
+ _controlEnable = false;
+
+ _funds = Call GetPlayerFunds;
+
+ ctrlSetText[17021,Format ["%1: $%2.",localize 'STR_WF_Price',_currentFee]];
+
+ //--- Enabled or disabled?
+ switch (_currentSpecial) do {
+ case "Fast_Travel": {
+ if (_ft > 0) then {
+ _currentLevel = _currentUpgrades select 12;
+ _controlEnable = if (count _FTLocations > 0 && _currentLevel > 0) then {true} else {false};
+ };
+ };
+ case "ICBM": {
+ if (paramICBM) then {
+ _commander = false;
+ if (!isNull(commanderTeam)) then {
+ if (commanderTeam == group player) then {_commander = true};
+ };
+ _currentLevel = _currentUpgrades select 11;
+ _controlEnable = if (_currentLevel > 0 && _commander && _funds >= _currentFee) then {true} else {false};
+ };
+ };
+ case "Paratroopers": {
+ _currentLevel = _currentUpgrades select 4;
+ _controlEnable = if (_funds >= _currentFee && _currentLevel > 0 && time - lastParaCall > _currentInterval) then {true} else {false};
+ };
+ case "Paradrop_Ammo": {
+ _currentLevel = _currentUpgrades select 16;
+ _controlEnable = if (_funds >= _currentFee && _currentLevel > 0 && time - lastSupplyCall > _currentInterval) then {true} else {false};
+ };
+ case "Paradrop_Vehicle": {
+ _currentLevel = _currentUpgrades select 16;
+ _controlEnable = if (_funds >= _currentFee && _currentLevel > 0 && time - lastSupplyCall > _currentInterval) then {true} else {false};
+ };
+ case "UAV": {
+ _currentLevel = _currentUpgrades select 5;
+ _controlEnable = if (_funds >= _currentFee && _currentLevel > 0 && !(alive playerUAV)) then {true} else {false};
+ };
+ case "UAV_Destroy": {
+ _controlEnable = if (alive playerUAV) then {true} else {false};
+ };
+ case "UAV_Remote_Control": {
+ _controlEnable = if (alive playerUAV) then {true} else {false};
+ };
+ case "Units_Camera": {
+ _controlEnable = commandInRange;
+ };
+ };
+
+ ctrlEnable[17020, _controlEnable];
+ };
+
+ //--- Action triggered.
+ if (MenuAction == 20) then {
+ MenuAction = -1;
+
+ //--- Output.
+ switch (_currentSpecial) do {
+ case "Fast_Travel": {
+ MenuAction = 7;
+ if !(scriptDone _textAnimHandler) then {terminate _textAnimHandler};
+ _textAnimHandler = [17022,localize 'STR_WF_ClickOnMap',10,"1da4fd"] spawn SetControlFadeAnim;
+ };
+ case "ICBM": {
+ MenuAction = 8;
+ if !(scriptDone _textAnimHandler) then {terminate _textAnimHandler};
+ _textAnimHandler = [17022,localize 'STR_WF_ClickOnMap',10,"1da4fd"] spawn SetControlFadeAnim;
+ };
+ case "Paratroopers": {
+ MenuAction = 3;
+ if !(scriptDone _textAnimHandler) then {terminate _textAnimHandler};
+ _textAnimHandler = [17022,localize 'STR_WF_ClickOnMap',10,"1da4fd"] spawn SetControlFadeAnim;
+ };
+ case "Paradrop_Ammo": {
+ MenuAction = 10;
+ if !(scriptDone _textAnimHandler) then {terminate _textAnimHandler};
+ _textAnimHandler = [17022,localize 'STR_WF_ClickOnMap',10,"1da4fd"] spawn SetControlFadeAnim;
+ };
+ case "Paradrop_Vehicle": {
+ MenuAction = 9;
+
+ if !(scriptDone _textAnimHandler) then {terminate _textAnimHandler};
+ _textAnimHandler = [17022,localize 'STR_WF_ClickOnMap',10,"1da4fd"] spawn SetControlFadeAnim;
+ };
+ case "UAV": {
+ closeDialog 0;
+ ExecVM "Client\Module\UAV\uav.sqf";
+ };
+ case "UAV_Destroy": {
+ if !(isNull playerUAV) then {
+ {_x setDammage 1} forEach (crew playerUAV);
+ playerUAV setDammage 1;
+ playerUAV = objNull;
+ };
+ };
+ case "UAV_Remote_Control": {
+ closeDialog 0;
+ ExecVM "Client\Module\UAV\uav.sqf";
+ };
+ case "Units_Camera": {
+ closeDialog 0;
+ createDialog "RscUnitCamera";
+ };
+ };
+
+ _forceReload = true;
+ };
+
+ artyRange = floor (sliderPosition 17005);
+ if (_lastRange != artyRange) then {_area setMarkerSizeLocal [artyRange,artyRange];};
+
+ if (mouseButtonUp == 0) then {
+ mouseButtonUp = -1;
+ //--- Set Artillery Marker on map.
+ if (MenuAction == 1) then {
+ MenuAction = -1;
+ artyPos = _map posScreenToWorld[mouseX,mouseY];
+ _marker setMarkerPosLocal artyPos;
+ _area setMarkerPosLocal artyPos;
+ _requestRangedList = true;
+ };
+ //--- Paratroops.
+ if (MenuAction == 3) then {
+ MenuAction = -1;
+ _forceReload = true;
+ if !(scriptDone _textAnimHandler) then {terminate _textAnimHandler};
+ [17022] Call SetControlFadeAnimStop;
+ _callPos = _map posScreenToWorld[mouseX,mouseY];
+ if (!surfaceIsWater _callPos) then {
+ lastParaCall = time;
+ -(_currentFee) Call ChangePlayerFunds;
+ WFBE_RequestSpecial = ['SRVFNCREQUESTSPECIAL',["Paratroops",sideJoined,_callPos,clientTeam]];
+ publicVariable 'WFBE_RequestSpecial';
+ if (isHostedServer) then {['SRVFNCREQUESTSPECIAL',["Paratroops",sideJoined,_callPos,clientTeam]] Spawn HandleSPVF};
+ hint (localize "STR_WF_Paratroop_Info");
+ };
+ };
+ //--- Fast Travel.
+ if (MenuAction == 7) then {
+ MenuAction = -1;
+ _forceReload = true;
+ if !(scriptDone _textAnimHandler) then {terminate _textAnimHandler};
+ [17022] Call SetControlFadeAnimStop;
+ _callPos = _map PosScreenToWorld[mouseX,mouseY];
+ _sorted = [_callPos,_FTLocations] Call SortByDistance;
+ if (_callPos distance (_sorted select 0) < 500) then {
+ closeDialog 0;
+ deleteMarkerLocal _marker;
+ deleteMarkerLocal _area;
+
+ _destination = _sorted select 0;
+
+ if (_ft == 2) then {
+ _fee = round(((player distance _destination)/1000) * ('WFBE_FASTTRAVELPRICEKM' Call GetNamespace));
+ -(_fee) Call ChangePlayerFunds;
+ };
+
+ _travelingWith = [];
+ {if (_x distance _startPoint < _ftr && !(_x in _travelingWith) && canMove _x && !(vehicle _x isKindOf "StaticWeapon") && !stopped _x && !((currentCommand _x) in ["WAIT","STOP"])) then {_travelingWith = _travelingWith + [vehicle _x]}} forEach units (group player);
+
+ ForceMap true;
+ _compass = shownCompass;
+ _GPS = shownGPS;
+ _pad = shownPad;
+ _radio = shownRadio;
+ _watch = shownWatch;
+
+ showCompass false;
+ showGPS false;
+ showPad false;
+ showRadio false;
+ showWatch false;
+
+ mapAnimClear;
+ mapAnimCommit;
+
+ _locationPosition = getPos _destination;
+ _camera = "camera" camCreate _locationPosition;
+ _camera camSetDir 0;
+ _camera camSetFov 1;
+ _camera cameraEffect["Internal","TOP"];
+
+ _camera camSetTarget _locationPosition;
+ _camera camSetPos [_locationPosition select 0,(_locationPosition select 1) + 2,100];
+ _camera camCommit 0;
+
+ mapAnimAdd [0,0.05,GetPos _startPoint];
+ mapAnimCommit;
+
+ _delay = ((_startPoint distance _destination) / 50) * ('WFBE_FASTTRAVELTIMECOEF' Call GetNamespace);
+ mapAnimAdd [_delay,.18,getPos _destination];
+ mapAnimCommit;
+
+ waitUntil {mapAnimDone || !alive player};
+ _skip = false;
+ if (!alive player) then {_skip = true};
+ if (!_skip) then {
+ {[_x,_locationPosition,120] Call PlaceSafe} forEach _travelingWith;
+ };
+ sleep 1;
+
+ ForceMap false;
+ showCompass _compass;
+ showGPS _GPS;
+ showPad _pad;
+ showRadio _radio;
+ showWatch _watch;
+
+ _camera cameraEffect["TERMINATE","BACK"];
+ camDestroy _camera;
+ };
+ };
+ //--- ICBM Strike.
+ if (MenuAction == 8) then {
+ _forceReload = true;
+ if !(scriptDone _textAnimHandler) then {terminate _textAnimHandler};
+ [17022] Call SetControlFadeAnimStop;
+ MenuAction = -1;
+ -_currentFee Call ChangePlayerFunds;
+ _callPos = _map PosScreenToWorld[mouseX,mouseY];
+ _obj = "HeliHEmpty" createVehicle _callPos;
+ _nukeMarker = createMarkerLocal ["icbmstrike", position _obj];
+ _nukeMarker setMarkerTypeLocal "mil_warning";
+ _nukeMarker setMarkerTextLocal "ICBM";
+ _nukeMarker setMarkerColorLocal "ColorRed";
+ [_obj,_nukeMarker] Spawn NukeIncomming;
+ };
+ //--- Vehicle Paradrop.
+ if (MenuAction == 9) then {
+ _forceReload = true;
+ if !(scriptDone _textAnimHandler) then {terminate _textAnimHandler};
+ [17022] Call SetControlFadeAnimStop;
+ MenuAction = -1;
+ lastSupplyCall = time;
+ -_currentFee Call ChangePlayerFunds;
+ _callPos = _map PosScreenToWorld[mouseX,mouseY];
+ WFBE_RequestSpecial = ['SRVFNCREQUESTSPECIAL',["ParaVehi",sideJoined,_callPos,clientTeam]];
+ publicVariable 'WFBE_RequestSpecial';
+ if (isHostedServer) then {['SRVFNCREQUESTSPECIAL',["ParaVehi",sideJoined,_callPos,clientTeam]] Spawn HandleSPVF};
+ };
+ //--- Ammo Paradrop.
+ if (MenuAction == 10) then {
+ _forceReload = true;
+ if !(scriptDone _textAnimHandler) then {terminate _textAnimHandler};
+ [17022] Call SetControlFadeAnimStop;
+ MenuAction = -1;
+ lastSupplyCall = time;
+ -_currentFee Call ChangePlayerFunds;
+ _callPos = _map PosScreenToWorld[mouseX,mouseY];
+ WFBE_RequestSpecial = ['SRVFNCREQUESTSPECIAL',["ParaAmmo",sideJoined,_callPos,clientTeam]];
+ publicVariable 'WFBE_RequestSpecial';
+ if (isHostedServer) then {['SRVFNCREQUESTSPECIAL',["ParaAmmo",sideJoined,_callPos,clientTeam]] Spawn HandleSPVF};
+ };
+ };
+
+ //--- Update the Artillery Status.
+ if (paramArty) then {
+ _fireTime = (Format["WFBE_FIREMISSIONTIMEOUT%1",(_currentUpgrades select 10)] Call GetNamespace);
+ _status = round(_fireTime - (time - fireMissionTime));
+ _txt = if (time - fireMissionTime > _fireTime) then {Format['%1: <br /> %2',localize 'STR_WF_Status',localize 'STR_WF_Available']} else {Format ['%1: <br /> %2 %3',localize 'STR_WF_Status',_status,localize 'STR_WF_Seconds']};
+ (_display displayCtrl 17016) ctrlSetStructuredText (parseText _txt);
+ _enable = if (_status > 0) then {false} else {true};
+ ctrlEnable [17007,_enable];
+ };
+
+ //--- Request Fire Mission.
+ if (MenuAction == 2) then {
+ MenuAction = -1;
+ _units = [Group player,false,lbCurSel(17008),sideJoinedText] Call GetTeamArtillery;
+ if (Count _units > 0) then {
+ fireMissionTime = time;
+ [GetMarkerPos "artilleryMarker",lbCurSel(17008)] Spawn RequestFireMission;
+ } else {
+ hint (localize "STR_WF_NoArty");
+ };
+ };
+
+ //--- Arty Combo Change or Script init.
+ if (MenuAction == 200 || _startLoad) then {
+ MenuAction = -1;
+
+ _index = lbCurSel(17008);
+ _minRange = (Format ["WFBE_%1_ARTILLERY_MINRANGES",sideJoined] Call GetNamespace) select _index;
+ _maxRange = (Format ["WFBE_%1_ARTILLERY_MAXRANGES",sideJoined] Call GetNamespace) select _index;
+
+ _trackingArray = [group player,true,lbCurSel(17008),sideJoined] Call GetTeamArtillery;
+
+ _requestMarkerTransition = true;
+ _requestRangedList = true;
+ _startLoad = false;
+ };
+
+ //--- Focus on an artillery cannon.
+ if (MenuAction == 60) then {
+ MenuAction = -1;
+
+ ctrlMapAnimClear _map;
+ _map ctrlMapAnimAdd [1,.475,getPos(_trackingArray select (lnbCurSelRow 17024))];
+ ctrlMapAnimCommit _map;
+ };
+
+ //--- Flush on change.
+ if (_requestMarkerTransition) then {
+ _requestMarkerTransition = false;
+
+ {
+ _track = (_x select 0);
+ _vehicle = (_x select 1);
+
+ _vehicle setVariable ['WFBE_A_Tracked', nil];
+ deleteMarkerLocal Format ["WFBE_A_Large%1",_track];
+ deleteMarkerLocal Format ["WFBE_A_Small%1",_track];
+ } forEach _trackingArrayID;
+ _trackingArrayID = [];
+ };
+
+ //--- Artillery List.
+ if (paramArty && (_requestRangedList || time - _lastArtyUpdate > 3)) then {
+ _requestRangedList = false;
+
+ //--- No need to update the list all the time.
+ if (time - _lastArtyUpdate > 5) then {
+ _lastArtyUpdate = time;
+ _trackingArray = [group player,true,lbCurSel(17008),sideJoined] Call GetTeamArtillery;
+ };
+
+ //--- Clear & Fill;
+ lnbClear 17024;
+ _i = 0;
+ {
+ _distance = _x distance (getMarkerPos _marker);
+ _color = [0, 0.875, 0, 0.8];
+ _text = "In Range";
+ if (_distance > _maxRange) then {_color = [0.875, 0, 0, 0.8];_text = "Out of Range"};
+ if (_distance <= _minRange) then {_color = [0.875, 0.5, 0, 0.8];_text = "Too close"};
+ lnbAddRow [17024,[[typeOf _x, 'displayName'] Call GetConfigInfo,_text]];
+ lnbSetPicture [17024,[_i,0],[typeOf _x, 'picture'] Call GetConfigInfo];
+
+ lnbSetColor [17024,[_i,0],_color];
+ lnbSetColor [17024,[_i,1],_color];
+
+ _i = _i + 1;
+ } forEach _trackingArray;
+ };
+
+ //--- Artillery map toggle.
+ if (MenuAction == 40) then {
+ MenuAction = -1;
+ if (_mode == -1) then {_mode = 0};
+ _mode = if (_mode == 2) then {0} else {_mode + 1};
+ with uinamespace do {
+ switch (_mode) do {
+ case 0: {(currentBEDialog displayCtrl 17023) ctrlSetTextColor [1,1,1,1]};
+ case 1: {(currentBEDialog displayCtrl 17023) ctrlSetTextColor [0,0.635294,0.909803,1]};
+ case 2: {(currentBEDialog displayCtrl 17023) ctrlSetTextColor [0.6,0.850980,0.917647,1]};
+ };
+ };
+
+ if !(scriptDone _textAnimHandler) then {terminate _textAnimHandler};
+ _textAnimHandler = [17022,localize 'STR_WF_ArtilleryMinimapInfo',7,"f05555"] spawn SetControlFadeAnim;
+
+ ['WFBE_V_ARTILLERYMINMAP',_mode,true] Call SetNamespace;
+
+ _requestMarkerTransition = true;
+ };
+
+ //--- Update artillery display.
+ if (_mode != -1) then {
+
+ //--- Nothing.
+ if (_mode == 0) then {
+ _requestMarkerTransition = true;
+ _mode = -1;
+ };
+
+ //--- Filled Content.
+ if (_mode == 1 || _mode == 2) then {
+ //--- Remove if dead or null or sel changed.
+ {
+ _track = (_x select 0);
+ _vehicle = (_x select 1);
+
+ if !(alive _vehicle) then {
+ deleteMarkerLocal Format ["WFBE_A_Large%1",_track];
+ deleteMarkerLocal Format ["WFBE_A_Small%1",_track];
+ };
+ } forEach _trackingArrayID;
+
+ //--- No need to update the marker all the time.
+ if (time - _lastArtyUpdate > 5) then {
+ _lastArtyUpdate = time;
+ _trackingArray = [group player,true,lbCurSel(17008),sideJoined] Call GetTeamArtillery;
+ };
+
+ //--- Live Feed.
+ _trackingArrayID = [];
+ {
+ _track = _x getVariable 'WFBE_A_Tracked';
+ if (isNil '_track') then {
+ _track = buildingMarker;
+ buildingMarker = buildingMarker + 1;
+ _x setVariable ['WFBE_A_Tracked', _track];
+ _dmarker = Format ["WFBE_A_Large%1",_track];
+ createMarkerLocal [_dmarker, getPos _x];
+ _dmarker setMarkerColorLocal "ColorBlue";
+ _dmarker setMarkerShapeLocal "ELLIPSE";
+ _brush = "SOLID";
+ if (_mode == 1) then {_brush = "SOLID"};
+ if (_mode == 2) then {_brush = "BORDER"};
+ _dmarker setMarkerBrushLocal _brush;
+ _dmarker setMarkerAlphaLocal 0.4;
+ _dmarker setMarkerSizeLocal [_maxRange,_maxRange];
+ _dmarker = Format ["WFBE_A_Small%1",_track];
+ createMarkerLocal [_dmarker, getPos _x];
+ _dmarker setMarkerColorLocal "ColorBlack";
+ _dmarker setMarkerShapeLocal "ELLIPSE";
+ _dmarker setMarkerBrushLocal "SOLID";
+ _dmarker setMarkerAlphaLocal 0.4;
+ _dmarker setMarkerSizeLocal [_minRange,_minRange];
+ } else {
+ _dmarker = Format ["WFBE_A_Large%1",_track];
+ _dmarker setMarkerPosLocal (getPos _x);
+ _dmarker = Format ["WFBE_A_Small%1",_track];
+ _dmarker setMarkerPosLocal (getPos _x);
+ };
+ _trackingArrayID = _trackingArrayID + [[_track,_x]];
+ } forEach _trackingArray;
+ };
+ };
+
+ _lastRange = artyRange;
+ _lastSel = lbCurSel(_listbox);
+ sleep 0.1;
+};
+
+deleteMarkerLocal _marker;
+deleteMarkerLocal _area;
+{deleteMarkerLocal _x} forEach _markers;
+
+if !(scriptDone _textAnimHandler) then {terminate _textAnimHandler};
+
+//--- Remove Markers.
+{
+ _track = (_x select 0);
+ _vehicle = (_x select 1);
+
+ _vehicle setVariable ['WFBE_A_Tracked', nil];
+
+ deleteMarkerLocal Format ["WFBE_A_Large%1",_track];
+ deleteMarkerLocal Format ["WFBE_A_Small%1",_track];
+} forEach _trackingArrayID; \ No newline at end of file
diff --git a/Client/GUI/GUI_BuyUnits.sqf b/Client/GUI/GUI_BuyUnits.sqf
new file mode 100644
index 0000000..7f4799f
--- /dev/null
+++ b/Client/GUI/GUI_BuyUnits.sqf
@@ -0,0 +1,453 @@
+
+private ["_i","_break","_currentIDC","_type","_val","_con","_extra","_currentCost","_skip","_cpt","_size","_txt","_queu","_params","_funds","_currentRow","_currentValue","_unit","_currentUnit","_update","_driver","_updateDetails","_gunner","_commander","_factSel","_closest","_updateMap","_isLocked","_listUnits","_IDCS","_updateList","_nObjects","_sorted","_buildings","_factories","_countAlive","_nearest","_nearTown","_maxOut","_show","_c","_color","_slots","_isInfantry","_utype","_lastCheck","_value","_lastSel","_lastType","_disabledColor","_display","_enabledColor","_IDCLock","_IDCSVehi","_listBox","_comboFaction","_map","_mbu","_status","_statusLabel","_statusVals","_fillList","_changeFactionCombo"];
+disableSerialization;
+
+//--- Init.
+MenuAction = -1;
+
+_listUnits = [];
+
+_closest = objNull;
+_commander = false;
+_extracrew = false;
+_countAlive = 0;
+_currentCost = 0;
+_currentIDC = 0;
+_disabledColor = [0.4, 0.4, 0.4, 1];
+_display = _this select 0;
+_driver = false;
+_enabledColor = [1, 1, 1, 0.75];
+_gunner = false;
+_IDCLock = 12023;
+_IDCS = [12005,12006,12007,12008,12020,12021];
+_IDCSVehi = [12012,12013,12014,12041];
+_isInfantry = false;
+_isLocked = true;
+_lastCheck = 0;
+_lastSel = -1;
+_lastType = 'nil';
+_listBox = 12001;
+_comboFaction = 12026;
+_map = _display displayCtrl 12015;
+_sorted = [];
+_type = 'nil';
+_update = true;
+_updateDetails = true;
+_updateList = true;
+_updateMap = true;
+_val = 0;
+_mbu = 'WFBE_MAXGROUPSIZE' Call GetNamespace;
+
+ctrlSetText[12025,localize 'STR_WF_Faction' + ":"];
+
+//--- Get the closest Factory Type in range.
+_break = false;
+_status = [barracksInRange,lightInRange,heavyInRange,aircraftInRange,depotInRange,hangarInRange];
+_statusLabel = ['Barracks','Light','Heavy','Aircraft','Depot','Airport'];
+_statusVals = [0,1,2,3,4,3];
+for [{_i = 0},{(_i < 6) && !_break},{_i = _i + 1}] do {
+ if (_status select _i) then {
+ _break = true;
+ _currentIDC = _IDCS select _i;
+ _type = _statusLabel select _i;
+ _val = _statusVals select _i;
+ };
+};
+
+if (_type == 'nil') exitWith {closeDialog 0};
+
+//--- Destroy local variables.
+_break = nil;
+_status = nil;
+_statusLabel = nil;
+_statusVals = nil;
+
+//--- Enable the current IDC.
+_IDCS = _IDCS - [_currentIDC];
+{
+ _con = _display DisplayCtrl _x;
+ _con ctrlSetTextColor [0.4, 0.4, 0.4, 1];
+} forEach _IDCS;
+
+//--- Loop.
+while {alive player && dialog} do {
+ //--- Nothing in range? exit!.
+ if (!barracksInRange && !lightInRange && !heavyInRange && !aircraftInRange && !hangarInRange && !depotInRange) exitWith {closeDialog 0};
+ if (side player != sideJoined || !dialog) exitWith {closeDialog 0};
+
+ //--- Purchase.
+ if (MenuAction == 1) then {
+ MenuAction = -1;
+ _currentRow = lnbCurSelRow _listBox;
+ _currentValue = lnbValue[_listBox,[_currentRow,0]];
+ _unit = _listUnits select _currentValue;
+ _currentUnit = _unit Call GetNamespace;
+ _currentCost = _currentUnit select QUERYUNITPRICE;
+ _cpt = 1;
+ if !(_isInfantry) then {
+ _extra = 0;
+ if (_driver) then {_extra = _extra + 1};
+ if (_gunner) then {_extra = _extra + 1};
+ if (_commander) then {_extra = _extra + 1};
+ if (_extracrew) then {_extra = _extra + ((_currentUnit select QUERYUNITCREW) select 3)};
+ _currentCost = _currentCost + (('WFBE_CREWCOST' Call GetNamespace) * _extra);
+ };
+ if ((_currentRow) != -1) then {
+ _funds = Call GetPlayerFunds;
+ _skip = false;
+ if (_funds < _currentCost) then {_skip = true;hint parseText(Format[localize 'STR_WF_Funds_Missing',_currentCost - _funds,_currentUnit select QUERYUNITLABEL])};
+ if !(_skip) then {
+ _size = Count ((Units (group player)) Call GetLiveUnits);
+ //--- Get the infantry limit based off the infantry upgrade.
+ _realSize = ((sideJoined) Call GetSideUpgrades) select 0;
+ switch (_realSize) do {
+ case 0: {_realSize = round(_mbu / 4)};
+ case 1: {_realSize = round(_mbu / 4)*2};
+ case 2: {_realSize = round(_mbu / 4)*3};
+ case 3: {_realSize = _mbu};
+ default {_realSize = _mbu};
+ };
+ if (_isInfantry) then {if ((unitQueu + _size + 1) > _realSize) then {_skip = true;hint parseText(Format [localize 'STR_WF_MaxGroup',_realSize])}};
+
+ if (!_isInfantry && !_skip) then {
+ _cpt = 0;
+ if (_driver) then {_cpt = _cpt + 1};
+ if (_gunner) then {_cpt = _cpt + 1};
+ if (_commander) then {_cpt = _cpt + 1};
+ if (_extracrew) then {_cpt = _cpt + ((_currentUnit select QUERYUNITCREW) select 3)};
+ if ((unitQueu + _size + _cpt) > _realSize && _cpt != 0) then {_skip = true;hint parseText(Format [localize 'STR_WF_MaxGroup',_realSize])};
+ };
+ };
+ if !(_skip) then {
+ //--- Check the max queu.
+ if ((Format["WFBE_C_QUEUE_%1",_type] Call GetNamespace) < (Format["WFBE_C_QUEUE_%1_MAX",_type] Call GetNamespace)) then {
+ [Format["WFBE_C_QUEUE_%1",_type],(Format["WFBE_C_QUEUE_%1",_type] Call GetNamespace)+1,true] Call SetNamespace;
+
+ _queu = _closest getVariable 'queu';
+ _txt = parseText(Format [localize 'STR_WF_BuyEffective',_currentUnit select QUERYUNITLABEL]);
+ if (!isNil '_queu') then {if (count _queu > 0) then {_txt = parseText(Format [localize 'STR_WF_Queu',_currentUnit select QUERYUNITLABEL])}};
+ hint _txt;
+ _params = if (_isInfantry) then {[_closest,_unit,[],_type,_cpt]} else {[_closest,_unit,[_driver,_gunner,_commander,_extracrew,_isLocked],_type,_cpt]};
+ _params Spawn BuildUnit;
+ -(_currentCost) Call ChangePlayerFunds;
+ } else {
+ hint parseText(Format [localize 'STR_WF_Queu_Max',Format["WFBE_C_QUEUE_%1_MAX",_type] Call GetNamespace]);
+ };
+ };
+ };
+ };
+
+ //--- Tabs selection.
+ if (MenuAction == 101) then {MenuAction = -1;if (barracksInRange) then {_currentIDC = 12005;_type = 'Barracks';_val = 0;_update = true}};
+ if (MenuAction == 102) then {MenuAction = -1;if (lightInRange) then {_currentIDC = 12006;_type = 'Light';_val = 1;_update = true}};
+ if (MenuAction == 103) then {MenuAction = -1;if (heavyInRange) then {_currentIDC = 12007;_type = 'Heavy';_val = 2;_update = true}};
+ if (MenuAction == 104) then {MenuAction = -1;if (aircraftInRange) then {_currentIDC = 12008;_type = 'Aircraft';_val = 3;_update = true}};
+ if (MenuAction == 105) then {MenuAction = -1;if (depotInRange) then {_currentIDC = 12020;_type = 'Depot';_val = 4;_update = true}};
+ if (MenuAction == 106) then {MenuAction = -1;if (hangarInRange) then {_currentIDC = 12021;_type = 'Airport';_val = 3;_update = true}};
+
+ //--- driver-gunner-commander icons.
+ if (MenuAction == 201) then {MenuAction = -1;_driver = if (_driver) then {false} else {true};_updateDetails = true};
+ if (MenuAction == 202) then {MenuAction = -1;_gunner = if (_gunner) then {false} else {true};_updateDetails = true};
+ if (MenuAction == 203) then {MenuAction = -1;_commander = if (_commander) then {false} else {true};_updateDetails = true};
+ if (MenuAction == 204) then {MenuAction = -1;_extracrew = if (_extracrew) then {false} else {true};_updateDetails = true};
+
+ //--- Factory DropDown list value has changed.
+ if (MenuAction == 301) then {MenuAction = -1;_factSel = lbCurSel 12018;_closest = _sorted select _factSel;_updateMap = true};
+
+ //--- Selection change, we update the details.
+ if (MenuAction == 302) then {MenuAction = -1;_updateDetails = true};
+
+ //--- Faction Filter changed.
+ if (MenuAction == 303) then {MenuAction = -1;_update = true;[Format["WFBE_%1%2CURRENTFACTIONSELECTED",sideJoinedText,_type],(lbCurSel _comboFaction),true] Call SetNamespace};
+
+ //--- Lock icon.
+ if (MenuAction == 401) then {MenuAction = -1;_isLocked = if (_isLocked) then {false} else {true};_updateDetails = true};
+
+ //--- Player funds.
+ ctrlSetText [12019,Format [localize 'STR_WF_Cash',Call GetPlayerFunds]];
+
+ //--- Update tabs.
+ if (_update) then {
+ _listUnits = Format ['WFBE_%1%2UNITS',sideJoinedText,_type] Call GetNamespace;
+
+ [_comboFaction,_type] Call UIChangeComboBuyUnits;
+ [_listUnits,_type,_listBox,_val] Call UIFillListBuyUnits;
+
+ //--- Update tabs icons.
+ _IDCS = [12005,12006,12007,12008,12020,12021];
+ _IDCS = _IDCS - [_currentIDC];
+ _con = _display DisplayCtrl _currentIDC;
+ _con ctrlSetTextColor [0.75,0.75,0.75,1];
+ {_con = _display DisplayCtrl _x;_con ctrlSetTextColor [0.4, 0.4, 0.4, 1]} forEach _IDCS;
+
+ _update = false;
+ _updateList = true;
+ _updateDetails = true;
+ };
+
+ //--- Update factories.
+ if (_updateList) then {
+ switch (_type) do {
+ //--- Specials.
+ case 'Depot': {
+ _nObjects = nearestObjects [(vehicle player), WFDEPOT,('WFBE_TOWNPURCHASERANGE' Call GetNamespace)];
+ _closest = if (count _nObjects > 0) then {_nObjects select 0} else {objNull};
+ _sorted = [_closest];
+ };
+ case 'Airport': {
+ _sorted = [(vehicle player),Airfields] Call SortByDistance;
+ _closest = _sorted select 0;
+ _sorted = [_closest];
+ };
+ //--- Factories
+ default {
+ _buildings = (sideJoinedText) Call GetSideStructures;
+ _factories = [sideJoined,Format ['WFBE_%1%2TYPE',sideJoinedText,_type] Call GetNamespace,_buildings] Call GetFactories;
+ _sorted = [(vehicle player),_factories] Call SortByDistance;
+ _closest = _sorted select 0;
+ _countAlive = count _factories;
+ };
+ };
+
+ //--- Refresh the Factory DropDown list.
+ lbClear 12018;
+ {
+ _nearest = [_x,towns] Call SortByDistance;
+ _nearTown = (_nearest select 0) getVariable 'name';
+ _txt = _type + ' ' + _nearTown + ' ' + str (round((vehicle player) distance _x)) + 'M';
+ lbAdd[12018,_txt];
+ } forEach _sorted;
+ lbSetCurSel [12018,0];
+
+ _updateList = false;
+ _updateMap = true;
+ };
+
+ //--- Display Factory Queu.
+ _queu = _closest getVariable "queu";
+ _value = if (isNil '_queu') then {0} else {count (_closest getVariable "queu")};
+ ctrlSetText[12024,Format[localize 'STR_WF_Queued',str _value]];
+
+ //--- List selection changed.
+ if (_updateDetails) then {
+ _currentRow = lnbCurSelRow _listBox;
+ //--- Our list is not empty.
+ if (_currentRow != -1) then {
+ _currentValue = lnbValue[_listBox,[_currentRow,0]];
+ _unit = _listUnits select _currentValue;
+ _currentUnit = _unit Call GetNamespace;
+ ctrlSetText [12009,_currentUnit select QUERYUNITPICTURE];
+ ctrlSetText [12033,_currentUnit select QUERYUNITFACTION];
+ ctrlSetText [12035,str (_currentUnit select QUERYUNITTIME)];
+ _currentCost = _currentUnit select QUERYUNITPRICE;
+
+ _isInfantry = if (_unit isKindOf 'Man') then {true} else {false};
+
+ //--- Update driver-gunner-commander icons.
+ if !(_isInfantry) then {
+ ctrlSetText [12036,"N/A"];
+ ctrlSetText [12037,str (getNumber (configFile >> 'CfgVehicles' >> _unit >> 'transportSoldier'))];
+ ctrlSetText [12038,str (getNumber (configFile >> 'CfgVehicles' >> _unit >> 'maxSpeed'))];
+ ctrlSetText [12039,str (getNumber (configFile >> 'CfgVehicles' >> _unit >> 'armor'))];
+ if (_type != 'Depot') then {
+ _slots = _currentUnit select QUERYUNITCREW;
+
+ if (typeName _slots == "ARRAY") then {
+ _hasCommander = _slots select 0;
+ _hasGunner = _slots select 1;
+ _turretsCount = _slots select 3;
+ _extra = 0;
+
+ _maxOut = false;
+ if (_lastType != _type || _lastSel != _currentRow) then {_maxOut = true};
+
+ if (_maxOut) then {
+ _driver = true;
+ _gunner = true;
+ _commander = true;
+ _extracrew = false;
+ };
+
+ if !(_hasGunner) then {_gunner = false};
+
+ if !(_hasCommander) then {_commander = false};
+
+ if (_turretsCount == 0) then {_extracrew = false};
+
+ ctrlShow[_IDCSVehi select 0, true];
+ ctrlShow[_IDCSVehi select 1, _hasGunner];
+ ctrlShow[_IDCSVehi select 2, _hasCommander];
+ ctrlShow[_IDCSVehi select 3, if (_turretsCount == 0) then {false} else {true}];
+
+ _c = 0;
+ {
+ _color = if (_x) then {_enabledColor} else {_disabledColor};
+ _con = _display displayCtrl (_IDCSVehi select _c);
+ _con ctrlSetTextColor _color;
+
+ _c = _c + 1;
+ } forEach [_driver,_gunner,_commander,_extracrew];
+
+ if (_driver) then {_extra = _extra + 1};
+ if (_gunner) then {_extra = _extra + 1};
+ if (_commander) then {_extra = _extra + 1};
+ if (_extracrew) then {_extra = _extra + _turretsCount};
+
+ //--- Set the 'extra' price.
+ _currentCost = _currentCost + (('WFBE_CREWCOST' Call GetNamespace) * _extra);
+ } else {//--- Backward compability.
+ _c = 0;
+ _extra = 0;
+
+ //--- Enabled AI by default.
+ _extracrew = false;
+ _maxOut = false;
+ if (_lastType != _type || _lastSel != _currentRow) then {_maxOut = true};
+
+ switch (_slots) do {
+ case 1: {
+ if (_maxOut) then {_driver = true};
+ if (_driver) then {_extra = _extra + 1};
+ _gunner = false;
+ _commander = false;
+ };
+ case 2: {
+ if (_maxOut) then {_driver = true;_gunner = true};
+ if (_driver) then {_extra = _extra + 1};
+ if (_gunner) then {_extra = _extra + 1};
+ _commander = false;
+ };
+ case 3: {
+ if (_maxOut) then {_driver = true;_gunner = true;_commander = true};
+ if (_driver) then {_extra = _extra + 1};
+ if (_gunner) then {_extra = _extra + 1};
+ if (_commander) then {_extra = _extra + 1};
+ };
+ };
+
+ //--- Show the icons.
+ {
+ _show = false;
+ if (_c < _slots) then {_show = true};
+ ctrlShow [_x,_show];
+ _c = _c + 1;
+ } forEach _IDCSVehi;
+
+ //--- Mask extra crew.
+ ctrlShow[_IDCSVehi select 3, false];
+
+ _i = 0;
+
+ //--- Set the icons.
+ {
+ _color = if (_x) then {_enabledColor} else {_disabledColor};
+ _con = _display displayCtrl (_IDCSVehi select _i);
+ _con ctrlSetTextColor _color;
+ _i = _i + 1;
+ } forEach [_driver,_gunner,_commander,_extracrew];
+
+ //--- Set the 'extra' price.
+ _currentCost = _currentCost + (('WFBE_CREWCOST' Call GetNamespace) * _extra);
+ };
+ } else {
+ {ctrlShow [_x,false]} forEach (_IDCSVehi);
+ _driver = false;
+ _gunner = false;
+ _commander = false;
+ _extracrew = false;
+ };
+ } else {
+ ctrlSetText [12036,Format ["%1/100",(_currentUnit select QUERYUNITSKILL) * 100]];
+ ctrlSetText [12037,"N/A"];
+ ctrlSetText [12038,"N/A"];
+ ctrlSetText [12039,"N/A"];
+
+ {ctrlShow [_x,false]} forEach (_IDCSVehi);
+ _driver = false;
+ _gunner = false;
+ _commander = false;
+ _extracrew = false;
+
+ //--- Display a unit's loadout.
+ _weapons = (getArray (configFile >> 'CfgVehicles' >> _unit >> 'weapons')) - ['Put','Throw'];
+ _magazines = getArray (configFile >> 'CfgVehicles' >> _unit >> 'magazines');
+
+ _classMags = [];
+ _classMagsAmount = [];
+ _MagsLabel = [];
+
+ {
+ _findAt = _classMags find _x;
+ if (_findAt == -1) then {
+ _classMags = _classMags + [_x];
+ _classMagsAmount = _classMagsAmount + [1];
+ _MagsLabel = _MagsLabel + [[_x,'displayName','CfgMagazines'] Call GetConfigInfo];
+ } else {
+ _classMagsAmount set [_findAt, (_classMagsAmount select _findAt) + 1];
+ };
+ } forEach _magazines;
+ _txt = "<t color='#A7F04F' shadow='2'>" + (localize 'STR_WF_Weapons') + " :</t><br /> <t color='#D3A119' shadow='2'>{</t>";
+ for [{_i = 0},{_i < count _weapons},{_i = _i + 1}] do {
+ _txt = _txt + "<t color='#86C8FF' shadow='2'>" + ([(_weapons select _i),'displayName','CfgWeapons'] Call GetConfigInfo) + "</t>";
+ if ((_i+1) < count _weapons) then {_txt = _txt + "<t color='#D3A119' shadow='2'>,</t> "};
+ };
+ _txt = _txt + "<t color='#D3A119' shadow='2'>}</t><br /><br />";
+ _txt = _txt + "<t color='#A7F04F' shadow='2'>" + (localize 'STR_WF_Magazines') + " :</t><br /> <t color='#D3A119' shadow='2'>{</t>";
+ for [{_i = 0},{_i < count _MagsLabel},{_i = _i + 1}] do {
+ _txt = _txt + "<t color='#86C8FF' shadow='2'>" + ((_MagsLabel select _i) + "</t> <t color='#D057F8' shadow='2'>x</t> <t color='#FB7E7E' shadow='2'>" + str (_classMagsAmount select _i)) + "</t>";
+ if ((_i+1) < count _MagsLabel) then {_txt = _txt + "<t color='#D3A119' shadow='2'>,</t> "};
+ };
+ _txt = _txt + "<t color='#D3A119' shadow='2'>}</t>";
+
+ (_display displayCtrl 12022) ctrlSetStructuredText (parseText _txt);
+ };
+
+ //--- Lock Icon.
+ if !(_isInfantry) then {
+ ctrlShow[_IDCLock,true];
+ _color = if (_isLocked) then {_enabledColor} else {_disabledColor};
+ _con = _display displayCtrl _IDCLock;
+ _con ctrlSetTextColor _color;
+ } else {
+ ctrlShow[_IDCLock,false];
+ };
+
+ //--- Long description.
+ if !(_isInfantry) then {
+ if (isClass (configFile >> 'CfgVehicles' >> _unit >> 'Library')) then {
+ _txt = getText (configFile >> 'CfgVehicles' >> _unit >> 'Library' >> 'libTextDesc');
+ (_display displayCtrl 12022) ctrlSetStructuredText (parseText _txt);
+ } else {
+ (_display displayCtrl 12022) ctrlSetStructuredText (parseText '');
+ };
+ };
+
+ ctrlSetText [12034,Format ["$ %1.",_currentCost]];
+ _updateDetails = false;
+ } else {
+ {ctrlSetText [_x , ""]} forEach [12009,12010,12027,12028,12029,12030,12031,12032,12033,12034,12035,12036,12037,12038,12039];
+ (_display displayCtrl 12022) ctrlSetStructuredText (parseText '');
+ };
+ };
+
+ //--- Update the Factory Minimap position.
+ if (_updateMap) then {
+ ctrlMapAnimClear _map;
+ _map ctrlMapAnimAdd [2,.075,getPos _closest];
+ ctrlMapAnimCommit _map;
+ _updateMap = false;
+ };
+
+ //--- Check that the factories of the current type are still alive.
+ _lastCheck = _lastCheck + 0.1;
+ if (_lastCheck > 2 && _type != 'Depot' && _type != 'Airport') then {
+ _lastCheck = 0;
+ _buildings = (sideJoinedText) Call GetSideStructures;
+ _factories = [sideJoined,Format ['WFBE_%1%2TYPE',sideJoinedText,_type] Call GetNamespace,_buildings] Call GetFactories;
+ if (count _factories != _countAlive) then {_updateList = true};
+ };
+
+ _lastSel = lnbCurSelRow _listBox;
+ _lastType = _type;
+ sleep 0.1;
+}; \ No newline at end of file
diff --git a/Client/GUI/GUI_ClearCurrentCutDisplay.sqf b/Client/GUI/GUI_ClearCurrentCutDisplay.sqf
new file mode 100644
index 0000000..610fbfe
--- /dev/null
+++ b/Client/GUI/GUI_ClearCurrentCutDisplay.sqf
@@ -0,0 +1 @@
+["currentCutDisplay", displayNull] call BIS_FNC_GUIset; \ No newline at end of file
diff --git a/Client/GUI/GUI_CommandMenu.sqf b/Client/GUI/GUI_CommandMenu.sqf
new file mode 100644
index 0000000..c373036
--- /dev/null
+++ b/Client/GUI/GUI_CommandMenu.sqf
@@ -0,0 +1,53 @@
+
+private ["_enable","_exited"];
+MenuAction = -1;
+
+while {alive player && dialog} do {
+ //--- Command AI.
+ _enable = false;
+ if (!isNull(commanderTeam)) then {if (commanderTeam == group player) then {_enable = true}};
+ ctrlEnable [13001,_enable]; //--- Team Orders
+ ctrlEnable [13004,_enable]; //--- Commander Menu
+ ctrlEnable [13002,commandInRange]; //--- Special Menu
+ ctrlEnable [13003,commandInRange]; //--- Upgrade Menu
+
+ sleep 0.1;
+
+ if (side player != sideJoined) exitWith {closeDialog 0};
+ if !(dialog) exitWith {};
+
+ //--- Command AI.
+ if (MenuAction == 1) exitWith {
+ MenuAction = -1;
+ CloseDialog 0;
+ CreateDialog "RscOrderMenu";
+ };
+
+ //--- Artillery Menu.
+ if (MenuAction == 2) exitWith {
+ MenuAction = -1;
+ CloseDialog 0;
+ CreateDialog "RscArtilleryMenu";
+ };
+
+ //--- Upgrade Menu.
+ if (MenuAction == 3) exitWith {
+ MenuAction = -1;
+ CloseDialog 0;
+ CreateDialog "RscUpgradeMenu";
+ };
+
+ //--- Commander Menu.
+ if (MenuAction == 4) exitWith {
+ MenuAction = -1;
+ CloseDialog 0;
+ CreateDialog "RscCommanderMenu";
+ };
+
+ //--- Support Menu.
+ if (MenuAction == 5) exitWith {
+ MenuAction = -1;
+ CloseDialog 0;
+ CreateDialog "RscSupportMenu";
+ };
+}; \ No newline at end of file
diff --git a/Client/GUI/GUI_CommanderMenu.sqf b/Client/GUI/GUI_CommanderMenu.sqf
new file mode 100644
index 0000000..20864e3
--- /dev/null
+++ b/Client/GUI/GUI_CommanderMenu.sqf
@@ -0,0 +1,159 @@
+disableSerialization;
+
+_display = _this select 0;
+_map = _display DisplayCtrl 23002;
+
+_hqDeployed = (sideJoined) Call GetSideHQDeployed;
+if (!_hqDeployed || !paramUseWorkers) then {ctrlEnable [23004, false];ctrlEnable [23006, false]};
+if !(paramUseWorkers) then {ctrlSetText[23005, localize 'STR_WF_Disabled']};
+
+MenuAction = -1;
+
+_maxWorkers = 'WFBE_WORKERS_MAX' Call GetNamespace;
+_workerPrice = 'WFBE_WORKERS_PRICE' Call GetNamespace;
+_incomeSystem = 'WFBE_INCOMESYSTEM' Call GetNamespace;
+_incomeDividision = 'WFBE_INC_DIVIDE_COM' Call GetNamespace;
+_aliveWorkers = [];
+_workers = [];
+_lastWorkersUpdate = -10;
+_lastComboUpdate = -30;
+_lastPurchase = -5;
+_income = 0;
+_updateComboWorker = true;
+_hasStarted = true;
+
+if (_incomeSystem in [3,4]) then {
+ sliderSetRange[23010,0,100];
+ _income = Call Compile Format["%1CommanderPercent",sideJoined];
+ sliderSetPosition[23010, _income];
+} else {
+ ctrlEnable [23012, false];
+};
+
+while {alive player && dialog} do {
+ if (side player != sideJoined) exitWith {closeDialog 0};
+ if !(dialog) exitWith {};
+
+ _funds = Call GetPlayerFunds;
+
+ //--- Income System.
+ if (_incomeSystem in [3,4]) then {
+ ctrlSetText[23011, Format["%1%2",_income,"%"]];
+ _currentPercent = Call Compile Format["%1CommanderPercent",sideJoined];
+
+ _income = floor(sliderPosition 23010);
+
+ sliderSetPosition[23010, _income];
+
+ _calInc = (sideJoined) Call GetTownsIncome;
+
+ if (_currentPercent != _income || _hasStarted) then {
+ if (_hasStarted) then {_hasStarted = false};
+
+ _income_players = 0;
+ _income_commander = 0;
+ switch (_incomeSystem) do {
+ case 3: {
+ _income_players = round(_calInc * (((100 - _income)/100)/maxPlayers));
+ _income_commander = round((_calInc * (_income/100)) / _incomeDividision) + _income_players;
+ };
+ case 4: {
+ _income_players = round(_calInc * (100 - _income) / 100);
+ _income_commander = round((_calInc - _income_players)*maxPlayers) + _income_players;
+ };
+ };
+
+ ctrlSetText [23013, localize 'STR_WF_Income_Sys_Com' + ": $" + str(_income_commander) + "."];
+ ctrlSetText [23014, localize 'STR_WF_Income_Sys_Ply' + ": $" + str(_income_players) + "."];
+ };
+
+ if (MenuAction == 3) then {
+ MenuAction = -1;
+
+ if (_currentPercent != _income) then {
+ Call Compile Format["%1CommanderPercent = _income; publicVariable '%1CommanderPercent';",sideJoined];
+ };
+ };
+ };
+
+ //--- Workers System.
+ if (paramUseWorkers) then {
+ if (time - _lastComboUpdate > 5) then {
+ _updateComboWorker = true;
+ _lastComboUpdate = time;
+ };
+
+ _workers = Call Compile Format ["WF_%1Workers",sideJoinedText];
+ if (time - _lastWorkersUpdate > 5) then {_aliveWorkers = (_workers) Call GetLiveUnits;_lastWorkersUpdate = time};
+ _hqDeployed = (sideJoined) Call GetSideHQDeployed;
+
+ if (!_hqDeployed || time - _lastPurchase < 3 || count _aliveWorkers >= _maxWorkers || _funds < _workerPrice) then {ctrlEnable [23004, false]} else {ctrlEnable [23004, true]};
+
+ //--- Workers tracker.
+ if (_updateComboWorker) then {
+ _updateComboWorker = false;
+ lbClear 23007;
+
+ for '_i' from 0 to count(_aliveWorkers)-1 do {
+ lbAdd [23007, localize "STR_WF_Workers" + " " + str(_i+1)];
+ };
+ };
+
+ ctrlSetText [23005, Format ["$%1. (%2/%3)",_workerPrice,count _aliveWorkers,_maxWorkers]];
+ };
+
+ //--- Hire Workers.
+ if (MenuAction == 1) then {
+ MenuAction = -1;
+
+ //--- Which index.
+ _index = 0;
+ for '_i' from 0 to count(_workers)-1 do {
+ if (isNull (_workers select _i)) exitWith {_index = _i};
+ };
+
+ if (_index == 0 && count(_workers) > 0) then {_index = count _workers};
+
+ if (count _aliveWorkers <= _maxWorkers && _hqDeployed) then {
+ -(_workerPrice) Call ChangePlayerFunds;
+
+ WFBE_RequestWorker = ['SRVFNCREQUESTWORKER',[sideJoined,(sideJoined) Call GetSideHQ,_index]];
+ publicVariable 'WFBE_RequestWorker';
+ if (isHostedServer) then {['SRVFNCREQUESTWORKER',[sideJoined,(sideJoined) Call GetSideHQ,_index]] Spawn HandleSPVF};
+
+ _workers set [_index, WF_Logic];
+ Call Compile Format ["WF_%1Workers = _workers; publicVariable 'WF_%1Workers';",sideJoinedText];
+
+ _lastPurchase = time;
+ _lastWorkersUpdate = -10;
+ _updateComboWorker = true;
+ };
+ };
+
+ //--- Disband Worker.
+ if (MenuAction == 2) then {
+ MenuAction = -1;
+
+ _value = lbCurSel 23007;
+
+ if (_value != -1) then {
+ (_aliveWorkers select _value) setDammage 1;
+ _lastWorkersUpdate = -10;
+ _updateComboWorker = true;
+ };
+ };
+
+ //--- Minimap update.
+ if (MenuAction == 100) then {
+ MenuAction = -1;
+ _value = lbCurSel 23007;
+
+ if (_value != -1) then {
+ ctrlMapAnimClear _map;
+ _map ctrlMapAnimAdd [1,.175,getPos(_aliveWorkers select _value)];
+ ctrlMapAnimCommit _map;
+ };
+ };
+
+ sleep 0.1;
+}; \ No newline at end of file
diff --git a/Client/GUI/GUI_Display_Parameters.sqf b/Client/GUI/GUI_Display_Parameters.sqf
new file mode 100644
index 0000000..84e7956
--- /dev/null
+++ b/Client/GUI/GUI_Display_Parameters.sqf
@@ -0,0 +1,30 @@
+/* Ingame parameters dump. */
+
+for [{_i = 0},{_i < (count (missionConfigFile/"Params"))},{_i = _i + 1}] do {
+ _paramName = (configName ((missionConfigFile >> "Params") select _i));
+ _text = getText (missionConfigFile >> "Params" >> _paramName >> "title");
+ _values = getArray (missionConfigFile >> "Params" >> _paramName >> "values");
+ _texts = getArray (missionConfigFile >> "Params" >> _paramName >> "texts");
+
+ _value = if (isMultiplayer) then {paramsArray select _i} else {getNumber (missionConfigFile >> "Params" >> _paramName >> "default")};
+ _status = _texts select (_values find _value);
+
+ lnbAddRow [22003,[_text,_status]];
+};
+
+while {alive player && dialog} do {
+/*---it is in the Main Menu now //MrNiceGuy
+ _uptime = Call GetTime;
+ ctrlSetText [22005,Format[localize 'STR_WF_MAIN_Uptime',_uptime select 0,_uptime select 1,_uptime select 2, _uptime select 3]];
+*/
+ sleep 0.1;
+ if (side player != sideJoined) exitWith {closeDialog 0};
+ if (!dialog) exitWith {};
+
+ //--- Back Button.
+ if (MenuAction == 1) exitWith { //---added-MrNiceGuy
+ MenuAction = -1;
+ closeDialog 0;
+ createDialog "WF_Menu";
+ };
+}; \ No newline at end of file
diff --git a/Client/GUI/GUI_EASA.sqf b/Client/GUI/GUI_EASA.sqf
new file mode 100644
index 0000000..590a019
--- /dev/null
+++ b/Client/GUI/GUI_EASA.sqf
@@ -0,0 +1,50 @@
+
+private ["_i","_j","_listPrice","_listDesc","_cdata","_funds","_iddx","_type","_data","_listBox"];
+MenuAction = -1;
+
+_type = ('WFBE_EASA_Vehicles' Call GetNamespace) find (typeOf (vehicle player));
+if (_type == -1) exitWith {diag_log Format['[WFBE (ERROR)][frameno:%2 | ticktime:%3] GUI_EASA: The player vehicle was not found within the list (%1)',_type,diag_frameno,diag_tickTime]};
+_data = (('WFBE_EASA_Loadouts' Call GetNamespace) select _type);
+
+
+_listPrice = [];
+_listDesc = [];
+_listBox = 23003;
+for [{_i = 0},{_i < count(_data)},{_i = _i + 1}] do {
+ _cdata = _data select _i;
+ for [{_j = 0},{_j < count(_cdata)},{_j = _j + 1}] do {
+ if (_j == 0) then {_listPrice = _listPrice + [(_cdata select 0) select 0]};
+ if (_j == 1) then {
+ _listDesc = _listDesc + [(_cdata select 1) select 0];
+ lnbAddRow [_listBox,["$"+str((_cdata select 0) select 0)+".",(_cdata select 1) select 0]]};
+ if (_j > 1) then {
+ };
+ };
+};
+
+if (count _listPrice > 0) then {lnbSetCurSelRow [_listBox,0]} else {lnbSetCurSelRow [_listBox,-1]};
+
+while {alive player && dialog} do {
+ sleep 0.1;
+
+ if (side player != sideJoined) exitWith {closeDialog 0};
+ if !(dialog) exitWith {};
+
+ //--- Command AI.
+ if (MenuAction == 101) then {
+ MenuAction = -1;
+ _funds = Call GetPlayerFunds;
+
+ _iddx = lnbCurSelRow _listBox;
+ if (_iddx != -1) then {
+ if (_funds > (_listPrice select _iddx)) then {
+ [vehicle player, _iddx, true] Call EASA_Equip;
+ -(_listPrice select _iddx) Call ChangePlayerFunds;
+ hint parseText(Format[localize 'STR_WF_EASA_Purchase',(_listDesc select _iddx)]);
+ closeDialog 0;
+ } else {
+ hint parseText(Format[localize 'STR_WF_Funds_Missing',(_listPrice select _iddx) - _funds,_listDesc select _iddx]);
+ };
+ };
+ };
+}; \ No newline at end of file
diff --git a/Client/GUI/GUI_EndOfGameStats.sqf b/Client/GUI/GUI_EndOfGameStats.sqf
new file mode 100644
index 0000000..af224cb
--- /dev/null
+++ b/Client/GUI/GUI_EndOfGameStats.sqf
@@ -0,0 +1,184 @@
+
+private ["_sideText","_recruited","_casualties","_created","_lost","_eastRecruitedCount","_eastCasualtyCount","_eastCreatedCount","_eastLostCount","_westRecruitedCount","_westCasualtyCount","_westCreatedCount","_westLostCount","_timePassed","_side","_sideName","_width","_eastUnitsCreated","_eastCasualties","_eastVehiclesCreated","_eastVehiclesLost","_westUnitsCreated","_westCasualties","_westVehiclesCreated","_westVehiclesLost","_eastCreatedRate","_eastLostRate","_eastRecruitedRate","_eastCasualtiesRate","_westCreatedRate","_westLostRate","_westRecruitedRate","_westCasualtiesRate","_westRecruitedCounter","_westRecruitedBar","_westCasualtyCounter","_westCasualtyBar","_westCreatedCounter","_westCreatedBar","_westLostCounter","_westLostBar","_position","_eastRecruitedCounter","_eastRecruitedBar","_eastCasualtyCounter","_eastCasualtyBar","_eastCreatedCounter","_eastCreatedBar","_eastLostCounter","_eastLostBar"];
+disableSerialization;
+
+12450 cutText ["","PLAIN",0];
+
+_side = _this Select 0;
+_sideText = Localize "STR_WF_PARAMETER_Side_East";
+if (_side == West) then {_sideText = Localize "STR_WF_PARAMETER_Side_West"};
+_sideName = Format[Localize "STR_WF_END_Victory",_sideText];
+
+_width = 0.4;
+TitleText["","PLAIN"];
+sleep 0.5;
+CutRsc["EndOfGameStats","PLAIN",0];
+
+_eastUnitsCreated = WF_Logic getVariable "eastUnitsCreated";
+_eastCasualties = WF_Logic getVariable "eastCasualties";
+_eastVehiclesCreated = WF_Logic getVariable "eastVehiclesCreated";
+_eastVehiclesLost = WF_Logic getVariable "eastVehiclesLost";
+_westUnitsCreated = WF_Logic getVariable "westUnitsCreated";
+_westCasualties = WF_Logic getVariable "westCasualties";
+_westVehiclesCreated = WF_Logic getVariable "westVehiclesCreated";
+_westVehiclesLost = WF_Logic getVariable "westVehiclesLost";
+
+_eastCreatedRate = _eastVehiclesCreated / 5 * .1;
+_eastLostRate = _eastVehiclesLost / 5 * .1;
+_eastRecruitedRate = _eastUnitsCreated / 5 * .1;
+_eastCasualtiesRate = _eastCasualties / 5 * .1;
+
+_westCreatedRate = _westVehiclesCreated / 5 * .1;
+_westLostRate = _westVehiclesLost / 5 * .1;
+_westRecruitedRate = _westUnitsCreated / 5 * .1;
+_westCasualtiesRate = _westCasualties / 5 * .1;
+
+waitUntil {!isNull (["currentCutDisplay"] call BIS_FNC_GUIget)};
+((["currentCutDisplay"] call BIS_FNC_GUIget) DisplayCtrl 90001) CtrlSetText _sideName;
+
+_westRecruitedCounter = (["currentCutDisplay"] call BIS_FNC_GUIget) DisplayCtrl 90200;
+_westRecruitedBar = (["currentCutDisplay"] call BIS_FNC_GUIget) DisplayCtrl 90201;
+_westCasualtyCounter = (["currentCutDisplay"] call BIS_FNC_GUIget) DisplayCtrl 90202;
+_westCasualtyBar = (["currentCutDisplay"] call BIS_FNC_GUIget) DisplayCtrl 90203;
+_westCreatedCounter = (["currentCutDisplay"] call BIS_FNC_GUIget) DisplayCtrl 90204;
+_westCreatedBar = (["currentCutDisplay"] call BIS_FNC_GUIget) DisplayCtrl 90205;
+_westLostCounter = (["currentCutDisplay"] call BIS_FNC_GUIget) DisplayCtrl 90206;
+_westLostBar = (["currentCutDisplay"] call BIS_FNC_GUIget) DisplayCtrl 90207;
+
+_position = CtrlPosition _westRecruitedBar;
+_recruited = _width * (_westUnitsCreated / 500);
+if (_recruited > _width) then {_recruited = _width};
+_position Set[2,0];
+_westRecruitedBar CtrlSetPosition _position;
+_westRecruitedBar CtrlCommit 0;
+_position Set[2,_recruited];
+_westRecruitedBar CtrlSetPosition _position;
+_westRecruitedBar CtrlCommit 8;
+
+_position = CtrlPosition _westCasualtyBar;
+_casualties = _width * (_westCasualties / 500);
+if (_casualties > _width) then {_casualties = _width};
+_position Set[2,0];
+_westCasualtyBar CtrlSetPosition _position;
+_westCasualtyBar CtrlCommit 0;
+_position Set[2,_casualties];
+_westCasualtyBar CtrlSetPosition _position;
+_westCasualtyBar CtrlCommit 8;
+
+_position = CtrlPosition _westCreatedBar;
+_created = _width * (_westVehiclesCreated / 150);
+if (_created > _width) then {_created = _width};
+_position Set[2,0];
+_westCreatedBar CtrlSetPosition _position;
+_westCreatedBar CtrlCommit 0;
+_position Set[2,_created];
+_westCreatedBar CtrlSetPosition _position;
+_westCreatedBar CtrlCommit 8;
+
+_position = CtrlPosition _westLostBar;
+_lost = _width * (_westVehiclesLost / 150);
+if (_lost > _width) then {_lost = _width};
+_position Set[2,0];
+_westLostBar CtrlSetPosition _position;
+_westLostBar CtrlCommit 0;
+_position Set[2,_lost];
+_westLostBar CtrlSetPosition _position;
+_westLostBar CtrlCommit 8;
+
+_eastRecruitedCounter = (["currentCutDisplay"] call BIS_FNC_GUIget) DisplayCtrl 90101;
+_eastRecruitedBar = (["currentCutDisplay"] call BIS_FNC_GUIget) DisplayCtrl 90102;
+_eastCasualtyCounter = (["currentCutDisplay"] call BIS_FNC_GUIget) DisplayCtrl 90103;
+_eastCasualtyBar = (["currentCutDisplay"] call BIS_FNC_GUIget) DisplayCtrl 90104;
+_eastCreatedCounter = (["currentCutDisplay"] call BIS_FNC_GUIget) DisplayCtrl 90105;
+_eastCreatedBar = (["currentCutDisplay"] call BIS_FNC_GUIget) DisplayCtrl 90106;
+_eastLostCounter = (["currentCutDisplay"] call BIS_FNC_GUIget) DisplayCtrl 90107;
+_eastLostBar = (["currentCutDisplay"] call BIS_FNC_GUIget) DisplayCtrl 90108;
+
+_position = CtrlPosition _eastRecruitedBar;
+_recruited = _width * (_eastUnitsCreated / 500);
+if (_recruited > _width) then {_recruited = _width};
+_position Set[2,0];
+_eastRecruitedBar CtrlSetPosition _position;
+_eastRecruitedBar CtrlCommit 0;
+_position Set[2,_recruited];
+_eastRecruitedBar CtrlSetPosition _position;
+_eastRecruitedBar CtrlCommit 8;
+
+_position = CtrlPosition _eastCasualtyBar;
+_casualties = _width * (_eastCasualties / 500);
+if (_casualties > _width) then {_casualties = _width};
+_position Set[2,0];
+_eastCasualtyBar CtrlSetPosition _position;
+_eastCasualtyBar CtrlCommit 0;
+_position Set[2,_casualties];
+_eastCasualtyBar CtrlSetPosition _position;
+_eastCasualtyBar CtrlCommit 8;
+
+_position = CtrlPosition _eastCreatedBar;
+_created = _width * (_eastVehiclesCreated / 150);
+if (_created > _width) then {_created = _width};
+_position Set[2,0];
+_eastCreatedBar CtrlSetPosition _position;
+_eastCreatedBar CtrlCommit 0;
+_position Set[2,_created];
+_eastCreatedBar CtrlSetPosition _position;
+_eastCreatedBar CtrlCommit 8;
+
+_position = CtrlPosition _eastLostBar;
+_lost = _width * (_eastVehiclesLost / 150);
+if (_lost > _width) then {_lost = _width};
+_position Set[2,0];
+_eastLostBar CtrlSetPosition _position;
+_eastLostBar CtrlCommit 0;
+_position Set[2,_lost];
+_eastLostBar CtrlSetPosition _position;
+_eastLostBar CtrlCommit 8;
+
+_timePassed = 0;
+_eastCasualtyCount = 0;
+_eastRecruitedCount = 0;
+_eastCreatedCount = 0;
+_eastLostCount = 0;
+
+_westCasualtyCount = 0;
+_westRecruitedCount = 0;
+_westCreatedCount = 0;
+_westLostCount = 0;
+
+while {_timePassed < 8} do {
+ sleep 0.1;
+
+ _eastRecruitedCount = _eastRecruitedCount + _eastRecruitedRate;
+ if (_eastRecruitedCount > _eastUnitsCreated) then {_eastRecruitedCount = _eastUnitsCreated};
+ _eastRecruitedCounter CtrlSetText Format["%1",_eastRecruitedCount - (_eastRecruitedCount % 1)];
+
+ _eastCasualtyCount = _eastCasualtyCount + _eastCasualtiesRate;
+ if (_eastCasualtyCount > _eastCasualties) then {_eastCasualtyCount = _eastCasualties};
+ _eastCasualtyCounter CtrlSetText Format["%1",_eastCasualtyCount - (_eastCasualtyCount % 1)];
+
+ _eastCreatedCount = _eastCreatedCount + _eastCreatedRate;
+ if (_eastCreatedCount > _eastVehiclesCreated) then {_eastCreatedCount = _eastVehiclesCreated};
+ _eastCreatedCounter CtrlSetText Format["%1",_eastCreatedCount - (_eastCreatedCount % 1)];
+
+ _eastLostCount = _eastLostCount + _eastLostRate;
+ if (_eastLostCount > _eastVehiclesLost) then {_eastLostCount = _eastVehiclesLost};
+ _eastLostCounter CtrlSetText Format["%1",_eastLostCount - (_eastLostCount % 1)];
+
+ _westRecruitedCount = _westRecruitedCount + _westRecruitedRate;
+ if (_westRecruitedCount > _westUnitsCreated) then {_westRecruitedCount = _westUnitsCreated};
+ _westRecruitedCounter CtrlSetText Format["%1",_westRecruitedCount - (_westRecruitedCount % 1)];
+
+ _westCasualtyCount = _westCasualtyCount + _westCasualtiesRate;
+ if (_westCasualtyCount > _westCasualties) then {_westCasualtyCount = _westCasualties};
+ _westCasualtyCounter CtrlSetText Format["%1",_westCasualtyCount - (_westCasualtyCount % 1)];
+
+ _westCreatedCount = _westCreatedCount + _westCreatedRate;
+ if (_westCreatedCount > _westVehiclesCreated) then {_westCreatedCount = _westVehiclesCreated};
+ _westCreatedCounter CtrlSetText Format["%1",_westCreatedCount - (_westCreatedCount % 1)];
+
+ _westLostCount = _westLostCount + _westLostRate;
+ if (_westLostCount > _westVehiclesLost) then {_westLostCount = _westVehiclesLost};
+ _westLostCounter CtrlSetText Format["%1",_westLostCount - (_westLostCount % 1)];
+
+ _timePassed = _timePassed + 0.1;
+}; \ No newline at end of file
diff --git a/Client/GUI/GUI_GearAce.sqf b/Client/GUI/GUI_GearAce.sqf
new file mode 100644
index 0000000..e92a7e2
--- /dev/null
+++ b/Client/GUI/GUI_GearAce.sqf
@@ -0,0 +1,1415 @@
+private ["_indexWeapons", "_indexMagazines", "_indexOnBack", "_indexRuckWeapons", "_indexRuckMags", "_indexPrimary", "_indexSecondary", "_indexSidearm", "_typesIFAK", "_filterNames", "_primary", "_secondary", "_sidearm", "_misc", "_magazine", "_all", "_primaryBackpack", "_secondaryBackpack", "_sidearmBackpack", "_miscBackpack", "_allBackpack", "_currentGear", "_currentWeaponUIState", "_currentMagazineUIState", "_getCompatibleMagazines", "_weapon", "_weaponMags", "_mags", "_muzzles", "_getItemDataByConfigType", "_data", "_configType", "_item", "_W", "_getItemDataByFilterType", "_filter", "_get", "_inventoryToGear", "_ret", "_unit", "_backwep", "_current", "_ruckmags", "_ruckweapons", "_safeArray", "_getItemCost", "_itemName", "_getItemWeight", "_getRuckItemsVolume", "_gear", "_volume", "_getGearCost", "_price", "_cost", "_getGearWeight", "_weight", "_totalWeight", "_fillInBlankImages", "_i", "_renderGear", "_pic", "_itemIndex", "_specialIndex", "_mainMagIndex", "_sideMagIndex", "_ifakCount", "_isIFAK", "_wob", "_weaponUIState", "_magazineUIState", "_magazineSpace", "_forEachIndex", "_getItemCountByType", "_count", "_itemType", "_countThisOne", "_renderRuckContents", "_u", "_capacity", "_getGearRuck", "_getMagazineCountByPool", "_handgunpool", "_addMagazineToGear", "_magCount", "_magLimit", "_magSize", "_oldMagazines", "_applyGearToUnit", "_maybeRuck", "_addItemToRuck", "_ruck", "_size", "_added", "_packable", "_currentUnit", "_initialCost", "_updateGear", "_updateMainList", "_updateSecondaryList", "_updateUnit", "_backpackSelected", "_selectedWeapon", "_currentFilter", "_defaultWeap", "_defaultAmmo", "_defaultLoadoutCost", "_lbSelChanged", "_mainCommand", "_inventoryClick", "_gearAction", "_weaponList", "_magazineList", "_funds", "_respawnCost", "_mag", "_ruckIndex", "_ruckItemClass", "_ruckItem", "_add", "_itemCount", "_temp", "_respawnPenalty","_divisor"];
+
+_indexWeapons = 0;
+_indexMagazines = 1;
+_indexOnBack = 2;
+_indexRuckWeapons = 3;
+_indexRuckMags = 4;
+_indexPrimary = 5;
+_indexSecondary = 6;
+_indexSidearm = 7;
+_typesIFAK = [ "ACE_Morphine", "ACE_Bandage", "ACE_Epinephrine" ];
+_filterNames = [ "all", "primary", "secondary", "sidearm", "misc" ];
+
+_primary = +(WF_Logic getVariable 'primaryClasses');
+_secondary = +(WF_Logic getVariable 'secondaryClasses');
+_sidearm = +(WF_Logic getVariable 'sidearmClasses');
+_misc = +(WF_Logic getVariable 'miscClasses');
+_magazine = +(WF_Logic getVariable 'magazineClasses');
+
+_all = _primary + _secondary + _sidearm + _misc;
+
+_primaryBackpack = [];
+_secondaryBackpack = [];
+_sidearmBackpack = _sidearm;
+_miscBackpack = _misc + _magazine;
+_allBackpack = _misc + _sidearm + _magazine;
+
+// Gear Array. Many methods use this format. It is:
+// 0: Weapons
+// 1: Magazines
+// 2: ACE weapon on back
+// 3: Weapons in rucksack as a sequence of doubles: [ item, quantity ]
+// 4: Magazines in rucksack as a sequence of doubles: [ item, quantity ]
+// 5: Current primary weapon
+// 6: Current secondary weapon
+// 7: Current sidearm
+_currentGear = [ [], [], "", [], [], "", "", "" ];
+
+// The following twe are arrays of doubles. Each double is [id, index] that maps
+// UI controls to gear in the _currentGear structure.
+//
+// id: Control ID of a control in the gear dialog.
+// index: index into the magazine or weapon array in _currentGear that corresponds to the
+// weapon or magazine represented by the control in question.
+_currentWeaponUIState = [];
+_currentMagazineUIState = [];
+
+// Given a weapon class, get the magazines that will fit in it.
+_getCompatibleMagazines =
+{
+ private ["_weapon","_weaponMags","_mags","_muzzles","_supportedMags","_csw"];
+
+ _weapon = _this;
+ _weaponMags = [];
+ _supportedMags = _magazine + _misc;
+
+ _csw = "";
+
+ if(isText(configFile >> "CfgWeapons" >> _weapon >> "ace_crewmgtype")) then
+ {
+ _csw = getText(configFile >> "CfgWeapons" >> _weapon >> "ace_crewmgtype");
+ };
+
+ if(_csw == "" && isText(configFile >> "CfgWeapons" >> _weapon >> "ace_crewtripodtype")) then
+ {
+ _csw = getText(configFile >> "CfgWeapons" >> _weapon >> "ace_crewtripodtype");
+ };
+
+ if(_csw != "") then
+ {
+ _mags = getArray(configFile >> "CfgVehicles" >> _csw >> "ace_crewdummymags");
+ if(!isNil "_mags") then
+ {
+ {
+ if(!(_x in _weaponMags) && _x in _supportedMags) then
+ {
+ _weaponMags = _weaponMags + [ _x ];
+ };
+ } forEach(_mags);
+ };
+ }
+ else
+ {
+ // Disposable weapons have no magazines.
+ if(getNumber(configFile >> "CfgWeapons" >> _weapon >> "ace_disposable") != 1) then
+ {
+ // Main muzzle magazines...
+ _mags = getArray (configFile >> "CfgWeapons" >> _weapon >> "magazines");
+ if (!isNil "_mags") then
+ {
+ {
+ if(!(_x in _weaponMags) && _x in _supportedMags) then
+ {
+ _weaponMags = _weaponMags + [ _x ];
+ };
+ } forEach(_mags);
+ };
+
+ _muzzles = getArray (configFile >> "CfgWeapons" >> _weapon >> "muzzles");
+ if(!isNil "_muzzles") then
+ {
+ {
+ if ((typeName _x) == "STRING") then
+ {
+ _mags = getArray (configFile >> "CfgWeapons" >> _weapon >> _x >> "magazines");
+ if (!isNil "_mags") then
+ {
+ {
+ if(!(_x in _weaponMags) && _x in _supportedMags) then
+ {
+ _weaponMags = _weaponMags + [_x];
+ };
+ } forEach(_mags);
+ };
+ };
+ } forEach(_muzzles);
+ };
+ };
+ };
+ _weaponMags
+};
+
+// arg 0: item class
+// arg 1: true if weapon, false if magazine
+// returns item data
+_getItemDataByConfigType =
+{
+ private ["_data", "_configType", "_item"];
+
+ _item = _this select 0;
+ _configType = _this select 1;
+ _data = nil;
+ if(_configType && !(isNil "_item")) then
+ {
+ _data = (_item+'_W') Call GetNamespace;
+ };
+ if(isNil "_data") then
+ {
+ _data = _item Call GetNamespace;
+ };
+ _data
+};
+
+// arg 0: item class
+// arg 1: filter type e.g. "all" or "sidearm"
+// returns item data
+_getItemDataByFilterType =
+{
+ private [ "_item", "_filter", "_get" ];
+
+ _item = _this select 0;
+ _filter = _this select 1;
+
+ if (_filter == 'secondary' || _filter == 'all') then {
+ _get = (_item+'_W') Call GetNamespace;
+ if (isNil '_get') then {
+ _get = _item Call GetNamespace;
+ };
+ } else {
+ _get = _item Call GetNamespace;
+ };
+ _get
+};
+
+// Argument 0: a unit
+//
+// Takes that unit's inventory and returns a gear array from it (see above).
+_inventoryToGear = {
+ private ["_ret","_unit","_backwep","_get","_current","_ruckmags","_ruckweapons","_temp"];
+
+ _unit = _this select 0;
+
+ _ret = [ [], [], "", [], [], "", "", "" ];
+
+ _backwep = _unit getVariable "ACE_weapononback";
+ if (!isNil "_backwep") then
+ {
+ if ((typeName _backwep) == "STRING") then
+ {
+ _ret set [ _indexOnBack, _backwep ];
+ };
+ };
+
+ _temp = [];
+ {
+ _get = [ _x, true ] call _getItemDataByConfigType;
+ if(!isNil "_get") then
+ {
+ _temp = _temp + [_x];
+ };
+ } forEach(weapons _unit);
+ _ret set [ _indexWeapons, _temp ];
+
+ _temp = [];
+ {
+ _get = [ _x, false ] call _getItemDataByConfigType;
+ if(!isNil "_get") then
+ {
+ _temp = _temp + [_x];
+ };
+ } forEach(magazines _unit);
+ _ret set [ _indexMagazines, _temp ];
+
+ _get = [ primaryWeapon _unit, true ] call _getItemDataByConfigType;
+ if(!isNil "_get") then
+ {
+ _ret set [ _indexPrimary, primaryWeapon _unit ];
+ }
+ else
+ {
+ _ret set [ _indexPrimary, "" ];
+ };
+
+ _get = [ secondaryWeapon _unit, true ] call _getItemDataByConfigType;
+ if(!isNil "_get") then
+ {
+ _ret set [ _indexSecondary, secondaryWeapon _unit ];
+ }
+ else
+ {
+ _ret set [ _indexSecondary, "" ];
+ };
+
+ {
+ if (_x in _sidearm) exitWith
+ {
+ _ret set [ _indexSidearm, _x ];
+ };
+ } forEach(_ret select _indexWeapons);
+
+ if ([_unit] call ACE_fnc_HasRuck) then {
+ _ruckmags = _unit getVariable "ACE_RuckMagContents";
+ _ruckweapons = _unit getVariable "ACE_RuckWepContents";
+ if(!isNil "_ruckweapons") then
+ {
+ _temp = [];
+ {
+ _get = [ _x select 0, true ] call _getItemDataByConfigType;
+ if(!isNil "_get") then
+ {
+ _temp = _temp + [_x];
+ };
+ } forEach(_ruckweapons);
+ _ret set [ _indexRuckWeapons, _temp ];
+ };
+ if(!isNil "_ruckmags") then
+ {
+ _temp = [];
+ {
+ _get = [ _x select 0, false ] call _getItemDataByConfigType;
+ if(!isNil "_get") then
+ {
+ _temp = _temp + [_x];
+ };
+ } forEach(_ruckmags);
+ _ret set [ _indexRuckMags, _temp ];
+ };
+ };
+
+ _ret
+};
+
+// Get an item's cost.
+// Arguments [ item-name, is-weapon ]
+// is-weapon is true for weapons or false for magazines
+_getItemCost =
+{
+ private ["_itemName", "_configType","_ret","_get"];
+ _itemName = _this select 0;
+ _configType = _this select 1;
+ _get = [ _itemName, _configType] call _getItemDataByConfigType;
+ _ret = 0;
+ if(!isNil "_get") then
+ {
+ _ret = _get select QUERYGEARCOST;
+ };
+ _ret
+};
+
+// Get an item's weight
+// Arguments [ item-name, config-type ]
+// config-type is usually CfgWeapons or CfgMagazines.
+_getItemWeight =
+{
+ private ["_itemName", "_configType","_ret"];
+ _itemName = _this select 0;
+ _configType = _this select 1;
+ _ret = getNumber (configFile >> _configType >> _itemName >> "ACE_Weight");
+ _ret
+};
+
+// arg: gear array
+// returns: total volume of gear in ruck sack
+_getRuckItemsVolume =
+{
+ private ["_gear", "_volume"];
+
+ _gear = _this;
+ _volume = 0;
+
+ {
+ _volume = _volume +
+ (getNumber(configFile >> "CfgWeapons" >> (_x select 0) >> "ACE_size") * (_x select 1));
+ } forEach(_gear select _indexRuckWeapons);
+
+ {
+ _volume = _volume +
+ (getNumber(configFile >> "CfgMagazines" >> (_x select 0) >> "ACE_size") * (_x select 1));
+ } forEach(_gear select _indexRuckMags);
+ _volume
+};
+
+// Takes a gear array for an argument and returns its cost.
+_getGearCost =
+{
+ private ["_gear","_get","_price","_cost"];
+
+ _gear = _this;
+ _price = 0;
+
+ {
+ _cost = [_x, true] call _getItemCost;
+ if(!isNil "_cost") then
+ {
+ _price = _price + _cost;
+ };
+ } forEach(_gear select _indexWeapons);
+
+ {
+ _cost = [_x, false] call _getItemCost;
+ if(!isNil "_cost") then
+ {
+ _price = _price + _cost;
+ };
+ } forEach(_gear select _indexMagazines);
+
+ if((_gear select _indexOnBack) != "") then
+ {
+ _cost = [_gear select _indexOnBack, true] call _getItemCost;
+ if(!isNil "_cost") then
+ {
+ _price = _price + _cost;
+ };
+ };
+
+ {
+ _cost = [_x select 0, true] call _getItemCost;
+ if(!isNil "_cost") then
+ {
+ _price = _price + (_cost * (_x select 1));
+ };
+ } forEach(_gear select _indexRuckWeapons);
+
+ {
+ _cost = [_x select 0, false] call _getItemCost;
+ if(!isNil "_cost") then
+ {
+ _price = _price + (_cost * (_x select 1));
+ };
+ } forEach(_gear select _indexRuckMags);
+ _price
+};
+
+// Takes a gear array for an argument and returns its totalweight.
+_getGearWeight =
+{
+ private ["_gear","_get","_weight","_totalWeight"];
+
+ _gear = _this;
+ _totalWeight = 0;
+
+ {
+ _weight = [_x, "CfgWeapons"] call _getItemWeight;
+ if(!isNil "_weight") then
+ {
+ _totalWeight = _totalWeight + _weight;
+ };
+ } forEach(_gear select _indexWeapons);
+
+ {
+ _weight = [_x, "CfgMagazines"] call _getItemWeight;
+ if(!isNil "_weight") then
+ {
+ _totalWeight = _totalWeight + _weight;
+ };
+ } forEach(_gear select _indexMagazines);
+
+ _weight = [_gear select _indexOnBack, "CfgWeapons"] call _getItemWeight;
+ if(!isNil "_weight") then
+ {
+ _totalWeight = _totalWeight + _weight;
+ };
+
+ {
+ _weight = [_x select 0, "CfgWeapons"] call _getItemWeight;
+ if(!isNil "_weight") then
+ {
+ _totalWeight = _totalWeight + (_weight * (_x select 1));
+ };
+ } forEach(_gear select _indexRuckWeapons);
+
+ {
+ _weight = [_x select 0, "CfgMagazines"] call _getItemWeight;
+ if(!isNil "_weight") then
+ {
+ _totalWeight = _totalWeight + (_weight * (_x select 1));
+ };
+ } forEach(_gear select _indexRuckMags);
+ _totalWeight
+};
+
+// Fill in base blank-slot images to the UI
+_fillInBlankImages =
+{
+ ctrlSetText [107, "\ca\ui\data\ui_gear_gun_gs.paa"];
+ ctrlSetText [108, "\ca\ui\data\ui_gear_sec_gs.paa"];
+
+ for "_i" from 109 to 120 do
+ {
+ ctrlSetText [_i, "\ca\ui\data\ui_gear_mag_gs.paa"];
+ };
+
+ ctrlSetText [121, "\ca\ui\data\ui_gear_hgun_gs.paa"];
+
+ for "_i" from 122 to 129 do
+ {
+ ctrlSetText [_i, "\ca\ui\data\ui_gear_hgunmag_gs.paa"];
+ };
+
+ for "_i" from 130 to 131 do
+ {
+ ctrlSetText [_i, "\ca\ui\data\ui_gear_eq_gs.paa"];
+ };
+
+ for "_i" from 134 to 145 do
+ {
+ ctrlSetText [_i, "\ca\ui\data\ui_gear_eq_gs.paa"];
+ };
+
+ ctrlSetText [90020, "\ca\ui\data\ui_gear_gun_gs.paa"];
+ ctrlSetText [90104, "\x\ace\addons\sys_wounds\data\equip\m_morphine_ca.paa"];
+ ctrlSetText [90105, "\x\ace\addons\sys_wounds\data\equip\m_bandage_ca.paa"];
+ ctrlSetText [90106, "\x\ace\addons\sys_wounds\data\equip\m_epi_ca.paa"];
+};
+
+// Takes a gear array and renders it to the UI
+// Returns an array of 2 arrays. The 2 arrays returned are of the format of
+// _currentWeaponUIState and _currentMagazineUIState respectively. See top of file
+// for details.
+_renderGear =
+{
+ private ["_gear","_get","_pic","_itemIndex","_specialIndex","_mainMagIndex","_sideMagIndex","_ifakCount","_item","_isIFAK","_wob",
+ "_weight","_weaponUIState", "_magazineUIState","_magazineSpace"];
+ _gear = _this;
+
+ call _fillInBlankImages;
+
+ _specialIndex = 0;
+ _mainMagIndex = 0;
+ _sideMagIndex = 0;
+ _itemIndex = 0;
+ _ifakCount = [ 0, 0, 0 ];
+ _isIFAK = false;
+ _weaponUIState = [];
+ _magazineUIState = [];
+
+ {
+ _get = [_x, true] call _getItemDataByConfigType;
+ if (!isNil "_get") then
+ {
+ _pic = _get select QUERYGEARPICTURE;
+ if((_get select QUERYGEARTYPE) == "Item" && _itemIndex < 12) then
+ {
+ ctrlSetText [134+_itemIndex, _pic];
+ _weaponUIState = _weaponUIState + [ [134+_itemIndex, _forEachIndex] ];
+ _itemIndex = _itemIndex + 1;
+ }
+ else
+ {
+ if (_x == (_gear select _indexPrimary)) then
+ {
+ ctrlSetText [107, _pic];
+ _weaponUIState = _weaponUIState + [ [107, _forEachIndex] ];
+ }
+ else
+ {
+ if(_x == (_gear select _indexSecondary)) then
+ {
+ _weaponUIState = _weaponUIState + [ [108, _forEachIndex] ];
+ ctrlSetText [108, _pic];
+ }
+ else
+ {
+ if(_x == (_gear select _indexSidearm)) then
+ {
+ _weaponUIState = _weaponUIState + [ [121, _forEachIndex] ];
+ ctrlSetText [121, _pic];
+ }
+ else
+ {
+ ctrlSetText [130+_specialIndex, _pic];
+ _weaponUIState = _weaponUIState + [ [130+_specialIndex, _forEachIndex] ];
+ _specialIndex = _specialIndex + 1;
+ };
+ };
+ };
+ };
+ };
+ } forEach(_gear select _indexWeapons);
+
+ {
+ _get = [_x, false] call _getItemDataByConfigType;
+ if (!isNil "_get") then
+ {
+ _item = _x;
+ _isIFAK = false;
+ {
+ if(_x == _item &&
+ (_ifakCount select _forEachIndex) < 2) exitWith
+ {
+ _ifakCount set [_forEachIndex, (_ifakCount select _forEachIndex) + 1];
+ _isIFAK = true;
+ };
+ } forEach(_typesIFAK);
+
+ if(!_isIFAK) then
+ {
+ _pic = _get select QUERYGEARPICTURE;
+ _magazineSpace = _get select QUERYGEARSPACE;
+ if(_magazineSpace < 1) then
+ {
+ _magazineSpace = 1;
+ };
+ if(!(_get select QUERYGEARHANDGUNPOOL)) then
+ {
+ if((_mainMagIndex + _magazineSpace) <= 12) then
+ {
+ ctrlSetText [109+_mainMagIndex, _pic];
+ _magazineUIState = _magazineUIState + [ [109+_mainMagIndex, _forEachIndex] ];
+ _mainMagIndex = _mainMagIndex + 1;
+
+ _magazineSpace = _magazineSpace - 1;
+ while { _magazineSpace > 0 } do
+ {
+ ctrlSetText [109+_mainMagIndex, ""];
+ _magazineSpace = _magazineSpace - 1;
+ _mainMagIndex = _mainMagIndex + 1;
+ };
+ };
+ }
+ else
+ {
+ if((_sideMagIndex + _magazineSpace) <= 8) then
+ {
+ ctrlSetText [122+_sideMagIndex, _pic];
+ _magazineUIState = _magazineUIState + [ [122+_sideMagIndex, _forEachIndex] ];
+ _sideMagIndex = _sideMagIndex + 1;
+
+ _magazineSpace = _magazineSpace - 1;
+ while { _magazineSpace > 0 } do
+ {
+ ctrlSetText [122+_sideMagIndex, ""];
+ _magazineSpace = _magazineSpace - 1;
+ _sideMagIndex = _sideMagIndex + 1;
+ };
+ };
+ };
+ };
+ };
+ } forEach(_gear select _indexMagazines);
+
+ {
+ ctrlSetText [90107 + _forEachIndex, str _x];
+ } forEach(_ifakCount);
+
+ _wob = _gear select _indexOnBack;
+
+ if(!isNil "_wob" && _wob != '') then
+ {
+ _get = [_wob, true] call _getItemDataByConfigType;
+ ctrlSetText [90020, _get select QUERYGEARPICTURE];
+ };
+
+ _weight = _gear call _getGearWeight;
+ ctrlSetText [90009, format ["%1 kg", _weight]];
+
+ [ _weaponUIState, _magazineUIState ]
+};
+
+// Given a gear array, get the number of "special" items (binocs, rangefinder, etc.) in it.
+// arg0: gear array
+// arg1: type of item e.g. "Special"
+// returns: number of that type contained in gear array.
+_getItemCountByType =
+{
+ private [ "_gear", "_count", "_get", "_itemType", "_countThisOne" ];
+
+ _gear = _this select 0;
+ _itemType = _this select 1;
+
+ _count =
+ {
+ _countThisOne = false;
+ _get = [ _x, true ] call _getItemDataByConfigType;
+ if (!isNil "_get" && (_get select QUERYGEARTYPE) == _itemType) then
+ {
+ _countThisOne = true;
+ }
+ else
+ {
+ _countThisOne = false;
+ };
+ _countThisOne
+ } count (_gear select _indexWeapons);
+ _count
+};
+
+_renderRuckContents =
+{
+ private [ "_gear", "_get", "_i", "_u", "_capacity", "_volume" ];
+ _gear = _this;
+
+ lnbClear 3701;
+ _i = 0;
+ _u = 0;
+ _volume = 0;
+ {
+ _get = [ _x select 0, true ] call _getItemDataByConfigType;
+ if (!isNil "_get") then
+ {
+ lnbAddRow [3701,[str (_x select 1) + "x",(_get select QUERYGEARLABEL)]];
+ lnbSetPicture [3701,[_i,0],_get select QUERYGEARPICTURE];
+ lnbSetData [3701,[_i,0],"CfgWeapons"];
+ lnbSetValue [3701,[_i,0],_u];
+ _i = _i + 1;
+ _u = _u + 1;
+ _volume = _volume + getNumber(configFile >> "CfgWeapons" >> (_x select 0) >> "ACE_size") * (_x select 1);
+ };
+ } forEach(_gear select _indexRuckWeapons);
+
+ _u = 0;
+ {
+ _get = [ _x select 0, false ] call _getItemDataByConfigType;
+ if (!isNil "_get") then
+ {
+ lnbAddRow [3701,[str (_x select 1) + "x",(_get select QUERYGEARLABEL)]];
+ lnbSetPicture [3701,[_i,0],_get select QUERYGEARPICTURE];
+ lnbSetData [3701,[_i,0],"CfgMagazines"];
+ lnbSetValue [3701,[_i,0],_u];
+ _i = _i + 1;
+ _u = _u + 1;
+ _volume = _volume + getNumber(configFile >> "CfgMagazines" >> (_x select 0) >> "ACE_size") * (_x select 1);
+ };
+ } forEach(_gear select _indexRuckMags);
+
+ _capacity = getNumber(configFile >> "CfgWeapons" >> (_gear call _getGearRuck) >> "ACE_PackSize");
+ ctrlSetText [90000, format [localize "STR_WF_Ruck_Space_Free", _capacity - _volume]];
+};
+
+// arg0: gear array
+// arg1: true if we are looking at handgun magazines
+// returns number of magazines slots consumed (taking magazine size into account)
+// in handgun pool or main pool (according to arg1)
+_getMagazineCountByPool =
+{
+ private [ "_gear", "_get", "_handgunpool", "_count", "_isIFAK", "_ifakCount", "_item" ];
+
+ _gear = _this select 0;
+ _handgunpool = _this select 1;
+ _count = 0;
+ _ifakCount = [ 0, 0, 0 ];
+
+ {
+ _isIFAK = false;
+ _item = _x;
+ {
+ if(_x == _item &&
+ (_ifakCount select _forEachIndex) < 2) exitWith
+ {
+ _ifakCount set [_forEachIndex, (_ifakCount select _forEachIndex) + 1];
+ _isIFAK = true;
+ };
+ } forEach(_typesIFAK);
+
+ if (!_isIFAK) then
+ {
+ _get = [_item, false] call _getItemDataByConfigType;
+ if((_handgunpool && (_get select QUERYGEARHANDGUNPOOL)) ||
+ (!_handgunpool && !(_get select QUERYGEARHANDGUNPOOL))) then
+ {
+ if((_get select QUERYGEARSPACE) == 0) then
+ {
+ _count = _count + 1;
+ }
+ else
+ {
+ _count = _count + (_get select QUERYGEARSPACE);
+ };
+ };
+ };
+ } forEach(_gear select _indexMagazines);
+ _count
+};
+
+// arg0: gear array
+// arg1: magazine to add
+// arg2: (optional) item data on the magazine we are adding.
+// Will only succeed if the magazine fits.
+_addMagazineToGear =
+{
+ private [ "_gear", "_magazine", "_get", "_magCount", "_magLimit", "_magSize", "_oldMagazines" ];
+
+ _gear = _this select 0;
+ _magazine = _this select 1;
+
+ if ((count _this) >= 3) then
+ {
+ _get = _this select 2;
+ }
+ else
+ {
+ _get = [_magazine, false] call _getItemDataByConfigType;
+ };
+
+ // Add magazines to a temporary copy of the gear array, and see if it's too much.
+ // This handles the IFAK stuff (infantry first aid kit) for us.
+ _oldMagazines = _gear select _indexMagazines;
+ _gear set [_indexMagazines,
+ _oldMagazines + [ _magazine ] ];
+ _magCount = [ _gear, _get select QUERYGEARHANDGUNPOOL] call _getMagazineCountByPool;
+ _magLimit = if(_get select QUERYGEARHANDGUNPOOL) then { 8 } else { 12 };
+
+ // DEBUG
+ diag_log format ["WFBE (AceGear): magCount: %1 magLimit: %2 mag: ", _magCount, _magLimit, _magazine ];
+
+ if(_magCount > _magLimit) then
+ {
+ // Doesn't fit; revert back
+ _gear set [ _indexMagazines, _oldMagazines ];
+ };
+};
+
+// arg0: unit
+// arg1: gear array
+// equip that gear to the unit.
+_applyGearToUnit =
+{
+ private ["_gear","_unit","_muzzles"];
+
+ _unit = _this select 0;
+ _gear = _this select 1;
+
+ removeAllWeapons _unit;
+ removeAllItems _unit;
+ removeBackpack _unit;
+ {_unit addMagazine _x} foreach (_gear select _indexMagazines);
+ {_unit addWeapon _x} foreach (_gear select _indexWeapons);
+ if (primaryWeapon _unit != "") then
+ {
+ _unit selectWeapon (primaryWeapon _unit);
+ _muzzles = getArray(configFile>>"cfgWeapons" >> primaryWeapon _unit >> "muzzles");
+ _unit selectWeapon (_muzzles select 0);
+ };
+
+ _safeArray = _gear select _indexRuckMags;
+ _unit setVariable ["ACE_RuckMagContents", +_safeArray];
+ _safeArray = _gear select _indexRuckWeapons;
+ _unit setVariable ["ACE_RuckWepContents", +_safeArray];
+
+ if((_gear select _indexOnBack) != "") then
+ {
+ _unit setVariable ["ACE_weapononback", _gear select _indexOnBack];
+ }
+ else
+ {
+ _unit setVariable ["ACE_weapononback", ""];
+ };
+};
+
+// arg: gear array
+// returns: rucksack in gear or ""
+_getGearRuck =
+{
+ private ["_gear","_maybeRuck"];
+
+ _gear = _this;
+ _maybeRuck = _gear select _indexSecondary;
+ if(!isNumber(configFile >> "CfgWeapons" >> _maybeRuck >> "ACE_PackSize")) then
+ {
+ _maybeRuck = _gear select _indexOnBack;
+ if(isClass(configFile >> "CfgWeapons" >> _maybeRuck)) then
+ {
+ if(!isNumber(configFile >> "CfgWeapons" >> _maybeRuck >> "ACE_PackSize")) then
+ {
+ _maybeRuck = "";
+ };
+ }
+ else
+ {
+ _maybeRuck = "";
+ };
+ };
+ _maybeRuck
+};
+
+// arg 0: item
+// arg 1: config type (CfgWeapons, etc.)
+// arg 2: gear array
+_addItemToRuck =
+{
+ private [ "_item", "_gear", "_configType", "_ruck", "_capacity", "_size", "_added", "_packable" ];
+
+ _item = _this select 0;
+ _configType = _this select 1;
+ _gear = _this select 2;
+ _packable = true;
+
+ if(getNumber(configFile >> _configType >> _item >> "ACE_NoPack") == 1 ||
+ getNumber(configFile >> _configType >> _item >> "ACE_disposable") == 1) then
+ {
+ _packable = false;
+ };
+
+ _ruck = _gear call _getGearRuck;
+ _capacity = 0;
+ if(_ruck != "") then
+ {
+ _capacity = getNumber(configFile >> "CfgWeapons" >> _ruck >> "ACE_PackSize");
+ };
+ _size = getNumber(configFile >> _configType >> _item >> "ACE_size");
+ _size = _size + (_gear call _getRuckItemsVolume);
+ if(_packable && _size <= _capacity) then
+ {
+ if(_configType == "CfgWeapons") then
+ {
+ _added = false;
+ {
+ if((_x select 0) == _item) exitWith
+ {
+ _added = true;
+ _x set [1, (_x select 1) + 1];
+ };
+ } forEach(_gear select _indexRuckWeapons);
+ if(!_added) then
+ {
+ _gear set [_indexRuckWeapons,
+ (_gear select _indexRuckWeapons) +
+ [ [ _item, 1 ] ] ];
+ };
+ }
+ else
+ {
+ _added = false;
+ {
+ if((_x select 0) == _item) exitWith
+ {
+ _added = true;
+ _x set [1, (_x select 1) + 1];
+ };
+ } forEach(_gear select _indexRuckMags);
+ if(!_added) then
+ {
+ _gear set [_indexRuckMags,
+ (_gear select _indexRuckMags) +
+ [ [ _item, 1 ] ] ];
+ };
+ };
+ };
+};
+
+_currentUnit = 0;
+{
+ if(isPlayer _x) exitWith
+ {
+ _currentUnit = _forEachIndex;
+ };
+} forEach(units group player);
+
+_currentGear = [player] call _inventoryToGear;
+_initialCost = _currentGear call _getGearCost;
+_updateGear = true;
+_updateMainList = true;
+_updateSecondaryList = true;
+_updateUnit = true;
+_backpackSelected = false;
+_selectedWeapon = '';
+_currentMagazineUIState = [];
+_currentWeaponUIState = [];
+_currentFilter = 0;
+_updateCosts = true;
+
+_defaultWeap = Format ["WFBE_%1DEFAULTWEAPONS",sideJoinedText] Call GetNamespace;
+_defaultAmmo = Format ["WFBE_%1DEFAULTAMMO",sideJoinedText] Call GetNamespace;
+
+if (paramAceWounds) then
+{
+ _defaultAmmo = _defaultAmmo + [ 'ACE_Morphine', 'ACE_Morphine', 'ACE_Bandage', 'ACE_Bandage' ];
+ if(getNumber(configFile >> "CfgVehicles" >> (typeOf player) >> "attendant") == 1) then
+ {
+ _defaultAmmo = _defaultAmmo + [ 'ACE_Epinephrine', 'ACE_Epinephrine', 'ACE_Medkit', 'ACE_Medkit' ];
+ };
+};
+
+_defaultLoadoutCost = [ _defaultWeap, _defaultAmmo, "", [], [], "", "", "" ] call _getGearCost;
+
+WF_Logic setVariable ['InventoryClick',-1];
+WF_Logic setVariable ['lbMainAction',''];
+WF_Logic setVariable ['lbChange',false];
+WF_Logic setVariable ['WF_Gear_Action',""];
+
+call _fillInBlankImages;
+
+// And now the main UI loop.
+while {alive player && dialog} do {
+ _lbSelChanged = WF_Logic getVariable 'lbChange';
+ _mainCommand = WF_Logic getVariable 'lbMainAction';
+ _inventoryClick = WF_Logic getVariable 'InventoryClick';
+ _gearAction = WF_Logic getVariable 'WF_Gear_Action';
+
+ if (_lbSelChanged) then
+ {
+ WF_Logic setVariable ['lbChange',false];
+ _weaponList = call compile format ["_%1%2", _filterNames select _currentFilter,
+ if(_backpackSelected) then { "Backpack" } else { "" }];
+ _selectedWeapon = _weaponList select lnbValue [3700, [lnbCurSelRow 3700, 0]];
+ _get = [_selectedWeapon, _filterNames select _currentFilter] call _getItemDataByFilterType;
+ _configType = _get select QUERYGEARCLASS;
+
+ if(!_backpackSelected) then
+ {
+ _weight = getNumber(configFile >> _configType >> _selectedWeapon >> "ACE_weight");
+ ctrlSetText [ 90005, format [ "%1 kg", _weight ]];
+ _updateSecondaryList = true;
+ };
+ };
+
+ if (_inventoryClick != -1) then
+ {
+ WF_Logic setVariable ['InventoryClick',-1];
+ if(_inventoryClick == 90020) then
+ {
+ _currentGear set [_indexOnBack, ""];
+ _updateGear = true;
+ }
+ else
+ {
+ {
+ if(_inventoryClick == (_x select 0)) exitWith
+ {
+ _weapon = (_currentGear select _indexWeapons) select (_x select 1);
+
+ if (_weapon == (_currentGear select _indexPrimary)) then
+ {
+ _currentGear set [_indexPrimary, ""];
+ };
+ if (_weapon == (_currentGear select _indexSecondary)) then
+ {
+ _currentGear set [_indexSecondary, ""];
+ };
+ if (_weapon == (_currentGear select _indexSidearm)) then
+ {
+ _currentGear set [_indexSidearm, ""];
+ };
+ if (_weapon == (_currentGear select _indexOnBack)) then
+ {
+ _currentGear set [_indexOnBack, ""];
+ };
+
+ (_currentGear select _indexWeapons) set [_x select 1, 0];
+ _currentGear set [_indexWeapons,
+ (_currentGear select _indexWeapons) - [ 0 ]];
+ };
+ } forEach(_currentWeaponUIState);
+ };
+
+ {
+ if(_inventoryClick == (_x select 0)) exitWith
+ {
+ (_currentGear select _indexMagazines) set [_x select 1, 0];
+ _currentGear set [_indexMagazines,
+ (_currentGear select _indexMagazines) - [ 0 ]];
+ };
+ } forEach(_currentMagazineUIState);
+
+ // If ruck was removed, remove contents too.
+ if ((_currentGear call _getGearRuck) == "") then
+ {
+ _currentGear set [_indexRuckWeapons, []];
+ _currentGear set [_indexRuckMags, []];
+ if(_backpackSelected) then
+ {
+ _backpackSelected = false;
+ _updateSecondaryList = true;
+ };
+ };
+ _updateGear = true;
+ };
+
+ if (_mainCommand != '') then
+ {
+ WF_Logic setVariable ['lbMainAction',''];
+ _weaponList = call compile format ["_%1%2", _filterNames select _currentFilter,
+ if(_backpackSelected) then { "Backpack" } else { "" }];
+ if (_selectedWeapon != '') then
+ {
+ _magazineList = _selectedWeapon call _getCompatibleMagazines;
+ }
+ else
+ {
+ _magazineList = [];
+ };
+
+ switch (_mainCommand) do
+ {
+ case 'unitPlus': {
+ _currentUnit = _currentUnit + 1;
+ if(_currentUnit >= (count units group player)) then
+ {
+ _currentUnit = 0;
+ };
+ _updateUnit = true;
+ };
+
+ case 'unitMinus': {
+ _currentUnit = _currentUnit - 1;
+ if(_currentUnit < 0) then
+ {
+ _currentUnit = (count units group player) - 1;
+ };
+ _updateUnit = true;
+ };
+
+ case 'filterPlus': {
+ _currentFilter = _currentFilter + 1;
+ if(_currentFilter >= 5) then
+ {
+ _currentFilter = 0;
+ };
+ ctrlSetText [148, format ["\ca\ui\data\igui_gear_filter_%1_ca.paa",
+ _currentFilter+1]];
+ _updateMainList = true;
+ };
+
+ case 'filterMinus': {
+ _currentFilter = _currentFilter - 1;
+ if(_currentFilter < 0) then
+ {
+ _currentFilter = 4;
+ };
+ ctrlSetText [148, format ["\ca\ui\data\igui_gear_filter_%1_ca.paa",
+ _currentFilter+1]];
+ _updateMainList = true;
+ };
+
+ case 'buy': {
+ _funds = call GetPlayerFunds;
+ _cost = (_currentGear call _getGearCost) - _initialCost;
+ if(_funds >= _cost) then
+ {
+ (-_cost) Call ChangePlayerFunds;
+ _unit = (units group player) select _currentUnit;
+ if(isNil "_unit" || !alive _unit) then
+ {
+ _currentUnit = 0;
+ _updateUnit = true;
+ }
+ else
+ {
+ [ _unit, _currentGear] call _applyGearToUnit;
+ if (isPlayer _unit) then
+ {
+ respawnGearCost = _respawnCost;
+ respawnWeapons = _currentGear select _indexWeapons;
+ respawnAmmo = _currentGear select _indexMagazines;
+ respawnWeaponOnBack = _currentGear select _indexOnBack;
+ respawnAceRuckContents = [ _currentGear select _indexRuckWeapons,
+ _currentGear select _indexRuckMags ];
+ };
+ _initialCost = (_currentGear call _getGearCost);
+ _updateGear = true;
+ };
+ }
+ else
+ {
+ hint parseText(Format [localize "STR_WF_Funds_Missing_Gear",_cost - _funds]);
+ };
+ };
+
+ case 'addMagazine': {
+ if(!_backpackSelected) then
+ {
+ _mag = _magazineList select lnbValue [3701, [lnbCurSelRow 3701, 0]];
+ [ _currentGear, _mag ] call _addMagazineToGear;
+ _updateGear = true;
+ }
+ else
+ {
+ // A double click in ruck mode actually means remove from inventory.
+ _ruckIndex = lnbValue [3701, [lnbCurSelRow 3701, 0]];
+ _ruckItemClass = lnbData [3701, [lnbCurSelRow 3701, 0]];
+
+ if(_ruckItemClass == "CfgWeapons") then
+ {
+ _ruckItem = (_currentGear select _indexRuckWeapons) select _ruckIndex;
+ if((_ruckItem select 1) > 1) then
+ {
+ _ruckItem set [1, (_ruckItem select 1) - 1];
+ }
+ else
+ {
+ (_currentGear select _indexRuckWeapons) set [_ruckIndex, 0];
+ _currentGear set [_indexRuckWeapons,
+ (_currentGear select _indexRuckWeapons) - [ 0 ]];
+ };
+ }
+ else
+ {
+ _ruckItem = (_currentGear select _indexRuckMags) select _ruckIndex;
+ if((_ruckItem select 1) > 1) then
+ {
+ _ruckItem set [1, (_ruckItem select 1) - 1];
+ }
+ else
+ {
+ (_currentGear select _indexRuckMags) set [_ruckIndex, 0];
+ _currentGear set [_indexRuckMags,
+ (_currentGear select _indexRuckMags) - [ 0 ]];
+ };
+ };
+ _updateSecondaryList = true;
+ _updateCosts = true;
+ };
+ };
+
+ case 'addMainItem': {
+ _weapon = _weaponList select lnbValue [3700, [lnbCurSelRow 3700, 0]];
+ _get = [_weapon, _filterNames select _currentFilter] call _getItemDataByFilterType;
+
+ if ((_get select QUERYGEARCLASS) == "CfgMagazines") then
+ {
+ if(_backpackSelected) then
+ {
+ [_weapon, "CfgMagazines", _currentGear] call _addItemToRuck;
+ _updateSecondaryList = true;
+ _updateCosts = true;
+ }
+ else
+ {
+ [_currentGear, _weapon, _get] call _addMagazineToGear;
+ _updateGear = true;
+ };
+ }
+ else
+ {
+ if(_backpackSelected) then
+ {
+ [_weapon, "CfgWeapons", _currentGear] call _addItemToRuck;
+ _updateSecondaryList = true;
+ _updateCosts = true;
+ }
+ else
+ {
+ _add = false;
+ if (_weapon in _primary) then
+ {
+ if ((_currentGear select _indexPrimary) != '') then
+ {
+ _currentGear set [ _indexWeapons,
+ (_currentGear select _indexWeapons) - [ _currentGear select _indexPrimary ] ];
+ };
+ _currentGear set [_indexPrimary, _weapon];
+ _add = true;
+ }
+ else
+ {
+ if (_weapon in _secondary) then
+ {
+ if ((_currentGear select _indexSecondary) != '') then
+ {
+ _currentGear set [ _indexWeapons,
+ (_currentGear select _indexWeapons) - [ _currentGear select _indexSecondary ] ];
+ };
+ _currentGear set [_indexSecondary, _weapon];
+ _add = true;
+ }
+ else
+ {
+ if (_weapon in _sidearm) then
+ {
+ if ((_currentGear select _indexSidearm) != '') then
+ {
+ _currentGear set [ _indexWeapons,
+ (_currentGear select _indexWeapons) - [ _currentGear select _indexSidearm ] ];
+ };
+ _currentGear set [_indexSidearm, _weapon];
+ _add = true;
+ }
+ else
+ {
+ if ((_get select QUERYGEARTYPE) == "Special") then
+ {
+ _itemCount = [_currentGear, "Special"] call _getItemCountByType;
+ if(_itemCount < 2) then
+ {
+ _add = true;
+ };
+ };
+
+ if((_get select QUERYGEARTYPE) == "Item") then
+ {
+ _itemCount = [_currentGear, "Item"] call _getItemCountByType;
+ if(_itemCount < 12) then
+ {
+ _add = true;
+ };
+ };
+ };
+ };
+ };
+
+ if(_add) then
+ {
+ _currentGear set [ _indexWeapons,
+ (_currentGear select _indexWeapons) + [ _weapon ]];
+ _updateGear = true;
+ };
+ };
+ };
+ };
+ };
+ };
+
+ if(_gearAction != "") then
+ {
+ WF_Logic setVariable ["WF_Gear_Action",""];
+ switch(_gearAction) do
+ {
+ case 'backpack': {
+ if(_backpackSelected) then
+ {
+ _backpackSelected = false;
+ _updateSecondaryList = true;
+ _updateMainList = true;
+ }
+ else
+ {
+ if((_currentGear call _getGearRuck) != "") then
+ {
+ _backpackSelected = true;
+ _updateSecondaryList = true;
+ _updateMainList = true;
+ };
+ };
+ };
+
+ case 'reload': {
+ if(!isNil "respawnWeapons") then
+ {
+ _currentGear set [_indexWeapons, respawnWeapons];
+ _currentGear set [_indexMagazines, respawnAmmo];
+ _currentGear set [_indexOnBack, respawnWeaponOnBack];
+ _currentGear set [_indexRuckWeapons, respawnAceRuckContents select 0];
+ _currentGear set [_indexRuckMags, respawnAceRuckContents select 1];
+ }
+ else
+ {
+ _currentGear set [_indexWeapons, Format ["WFBE_%1DEFAULTWEAPONS",sideJoinedText] Call GetNamespace];
+ _currentGear set [_indexMagazines, Format ["WFBE_%1DEFAULTAMMO",sideJoinedText] Call GetNamespace];
+ _currentGear set [_indexOnBack, ""];
+ _currentGear set [_indexRuckWeapons, []];
+ _currentGear set [_indexRuckMags, []];
+ };
+
+ {
+ if(_x in _primary) then
+ {
+ _currentGear set [_indexPrimary, _x];
+ };
+
+ if(_x in _secondary) then
+ {
+ _currentGear set [_indexSecondary, _x];
+ };
+
+ if(_x in _sidearm) then
+ {
+ _currentGear set [_indexSidearm, _x];
+ };
+ } forEach(_currentGear select _indexWeapons);
+
+ _updateGear = true;
+ };
+
+ case 'clear': {
+ _currentGear = [ [], [], "", [], [], "", "", "" ];
+ _updateGear = true;
+ };
+
+ case 'primary_onback': {
+ if ((_currentGear select _indexPrimary) != '') then
+ {
+ _weapon = _currentGear select _indexPrimary;
+ _currentGear set [ _indexWeapons,
+ (_currentGear select _indexWeapons) - [ _currentGear select _indexPrimary ] ];
+ _currentGear set [_indexPrimary, ""];
+ _currentGear set [_indexOnBack, _weapon];
+ _updateGear = true;
+ };
+ };
+
+ case 'secondary_onback': {
+ if ((_currentGear select _indexSecondary) != '') then
+ {
+ _weapon = _currentGear select _indexSecondary;
+ _currentGear set [ _indexWeapons,
+ (_currentGear select _indexWeapons) - [ _currentGear select _indexSecondary ] ];
+ _currentGear set [_indexSecondary, ""];
+ _currentGear set [_indexOnBack, _weapon];
+ _updateGear = true;
+ };
+ };
+ };
+ };
+
+ if (_updateUnit) then
+ {
+ _unit = (units group player) select _currentUnit;
+ _backpackSelected = false;
+ _currentGear = [_unit] call _inventoryToGear;
+ _updateGear = true;
+ _updateMainList = true;
+ _updateSecondaryList = true;
+ ctrlSetText [101, format ["[%1] " + name _unit, _currentUnit]];
+ _initialCost = _currentGear call _getGearCost;
+ _updateUnit = false;
+ };
+
+ if (_updateGear) then
+ {
+ _temp = _currentGear call _renderGear;
+ _currentWeaponUIState = _temp select 0;
+ _currentMagazineUIState = _temp select 1;
+ _updateGear = false;
+ _updateCosts = true;
+ };
+
+ if(_updateCosts) then
+ {
+ _updateCosts = false;
+ _cost = _currentGear call _getGearCost;
+ ctrlSetText [152, (localize "STR_WF_GEAR_CostLabel") + " " + (format [localize "STR_WF_GEAR_Cost", _cost - _initialCost])];
+ ctrlSetText [150, (localize "STR_WF_GEAR_CashLabel") + " " + (format [localize "STR_WF_GEAR_Cost", call GetPlayerFunds])];
+
+ _respawnCost = _cost - _defaultLoadoutCost;
+ if(_respawnCost < 0) then
+ {
+ _respawnCost = 0;
+ };
+
+ _respawnPenalty = 'WFBE_RESPAWNPENALTY' Call GetNamespace;
+
+ if (isPlayer (units group player select _currentUnit) && _respawnPenalty in [2,3,4,5]) then
+ {
+ _divisor = 1;
+ switch (_respawnPenalty) do
+ {
+ case 3: {_divisor = 2};
+ case 4: {_divisor = 4};
+ };
+ ctrlSetText [151, format [localize "STR_WF_Respawn_Cost", round (_respawnCost / _divisor) ]];
+ }
+ else
+ {
+ ctrlSetText [151, ""];
+ };
+ };
+
+ if(_updateMainList) then
+ {
+ lnbClear 3700;
+ _weaponList = call compile format ["_%1%2", _filterNames select _currentFilter,
+ if(_backpackSelected) then { "Backpack" } else { "" }];
+ [_weaponList, _filterNames select _currentFilter, 3700] call UIGearFillList;
+ _updateMainList = false;
+ _selectedWeapon = "";
+ _updateSecondaryList = true;
+ };
+
+ if(_updateSecondaryList) then
+ {
+ lnbClear 3701;
+ if (_backpackSelected) then
+ {
+ _currentGear call _renderRuckContents;
+ ctrlSetText [90009, format ["%1 kg", _currentGear call _getGearWeight]];
+ }
+ else
+ {
+ ctrlSetText [90000,localize "STR_WF_Magazines"];
+ ctrlSetText [90005, ""];
+ ctrlSetText [90007, ""];
+ if (_selectedWeapon != '') then
+ {
+ _magazineList = _selectedWeapon call _getCompatibleMagazines;
+ [_magazineList, "magazine", 3701] call UIGearFillList;
+ };
+ };
+ _updateSecondaryList = false;
+ };
+ sleep 0.05;
+};
+
+WF_Logic setVariable ['InventoryClick',nil];
+WF_Logic setVariable ['lbMainAction',nil];
+WF_Logic setVariable ['lbChange',nil]; \ No newline at end of file
diff --git a/Client/GUI/GUI_GearBeta.sqf b/Client/GUI/GUI_GearBeta.sqf
new file mode 100644
index 0000000..c0d8c64
--- /dev/null
+++ b/Client/GUI/GUI_GearBeta.sqf
@@ -0,0 +1,1057 @@
+/* Important, use +array if you plan to use Setters */
+
+
+private ["_backpack","_get","_u","_unitBP","_inRange","_sideID","_nObjects","_nObject","_unitList",
+"_text","_amount","_val","_val2","_ainumber","_txt","_type","_check","_updateFiller","_manageBackpack",
+"_list","_id","_changed","_currentMags","_currentRow","_currentData","_currentValue","_currentItem",
+"_skip","_backpackloadout","_bpcost","_get2","_oldMags","_currentMagazines","_slist","_index",
+"_currentWeapons","_displayInv","_arrayType","_arrayAmount","_currentBPRow","_currentBPValue",
+"_currentBPItem","_hasSpace","_updateBackpack","_zt","_currentSpecialCost","_currentSpecials",
+"_currentItems","_currentUpgrades","_getnum","_currentPrimary","_currentPrimaryCost","_currentSecondary",
+"_currentSecondaryCost","_currentSidearm","_currentSidearmCost","_cwep","_x","_tempWeapons",
+"_tempItems","_tempMags","_tempSpecs","_currentBackpackLoadout","_currentBackpackLoadoutAmount",
+"_tfil","_currentMagValue","_currentMag","_currentBPItemValue","_itemAmount","_currentUnit","_updateUnit",
+"_currentCost","_sideGear","_found","_show","_data","_inventorySlots","_sidearmInventorySlots",
+"_miscItemSlots","_cost","_slot","_upgradeCost","_currentBackpackLoadoutCost","_currentBackpackLoadoutPictures",
+"_currentBackpackLoadoutNames","_currentBackpackLoadoutUpgrades","_currentBackpackLoadoutAllowed",
+"_temp","_weaps","_add","_funds","_template","_templateCosts","_templatePictures","_templateNames",
+"_templateMags","_templateItems","_templateSpecs","_templateUpgrades","_templateAllowed","_cAllow",
+"_desc","_pict","_upgr","_addin","_filler","_mainAction","_inventoryClick","_unitSwap","_actionSE",
+"_lastFiller","_primary","_secondary","_sidearm","_misc","_magazine","_returnProperBag","_listbp",
+"_all","_lb","_lbm","_primaryIDC","_secondaryIDC","_sidearmIDC","_specialIDC","_display","_totalWeapons",
+"_fillerIDC","_fillerTypes","_old","_disp","_buildings","_getpp","_isPrimAllowTwo","_getss","_isSecoAllowTwo",
+"_sskip","_query","_pallow","_sallow","_secondarySlotIDC"];
+
+_primary = +(WF_Logic getVariable 'primaryClasses');
+_secondary = +(WF_Logic getVariable 'secondaryClasses');
+_sidearm = +(WF_Logic getVariable 'sidearmClasses');
+_misc = +(WF_Logic getVariable 'miscClasses');
+_magazine = +(WF_Logic getVariable 'magazineClasses');
+
+_template = +(WF_Logic getVariable 'templateClasses');
+_templateCosts = +(WF_Logic getVariable 'templateCosts');
+_templatePictures = +(WF_Logic getVariable 'templatePictures');
+_templateNames = +(WF_Logic getVariable 'templateNames');
+_templateMags = +(WF_Logic getVariable 'templateMags');
+_templateItems = +(WF_Logic getVariable 'templateItems');
+_templateSpecs = +(WF_Logic getVariable 'templateSpecs');
+_templateUpgrades = +(WF_Logic getVariable 'templateUpgrades');
+_templateAllowed = +(WF_Logic getVariable 'templateAllowed');
+
+_currentUnit = player;
+_secondarySlotIDC = 3501;
+
+_returnProperBag = {
+ Private ['_bag'];
+ _bag = _this select 0;
+
+ if (_bag in ['US_Assault_Pack_Ammo_EP1','US_Assault_Pack_AmmoSAW_EP1','US_Assault_Pack_AT_EP1','US_Assault_Pack_Explosives_EP1']) then {_bag = 'US_Assault_Pack_EP1'};
+ if (_bag in ['US_Patrol_Pack_Ammo_EP1','US_Patrol_Pack_Specops_EP1']) then {_bag = 'US_Patrol_Pack_EP1'};
+ if (_bag in ['US_Backpack_AmmoMG_EP1','US_Backpack_AT_EP1','US_Backpack_Specops_EP1']) then {_bag = 'US_Backpack_EP1'};
+ if (_bag in ['TK_ALICE_Pack_Explosives_EP1','TK_ALICE_Pack_AmmoMG_EP1','TKA_ALICE_Pack_Ammo_EP1','TKG_ALICE_Pack_AmmoAK47_EP1','TKG_ALICE_Pack_AmmoAK74_EP1']) then {_bag = 'TK_ALICE_Pack_EP1'};
+ if (_bag in ['TK_Assault_Pack_RPK_EP1','TKA_Assault_Pack_Ammo_EP1']) then {_bag = 'TK_Assault_Pack_EP1'};
+ if (paramDLCBAF) then {if (_bag in ['BAF_AssaultPack_ARAmmo','BAF_AssaultPack_MGAmmo','BAF_AssaultPack_ATAmmo','BAF_AssaultPack_HATAmmo','BAF_AssaultPack_Special','BAF_AssaultPack_FAC','BAF_AssaultPack_HAAAmmo','BAF_AssaultPack_LRRAmmo']) then {_bag = 'BAF_AssaultPack_RifleAmmo'}};
+
+ _bag
+};
+
+/* Backpack management - Init */
+_backpackloadout = [];
+_backpack = [];
+
+_currentBackpackLoadout = [];
+_currentBackpackLoadoutAmount = [];
+_currentBackpackLoadoutCost = [];
+_currentBackpackLoadoutPictures = [];
+_currentBackpackLoadoutNames = [];
+_currentBackpackLoadoutUpgrades = [];
+_currentBackpackLoadoutAllowed = [];
+_unitBP = "";
+_bpcost = 0;
+_listbp = 'WFBE_BACKPACKS' Call GetNamespace;
+if !(WF_A2_Vanilla) then {
+ _u = 0;
+ _backpack = _magazine;
+ {
+ _get = '_x' Call GetNamespace;
+ if ((_get select QUERYGEARTYPE) == 'CfgMagazines') then {
+ _backpack = _backpack + [_x];
+ };
+ _u = _u + 1;
+ } forEach _misc;
+
+ if !(isNull (unitBackpack _currentUnit)) then {
+ _unitBP = typeOf (unitBackpack _currentUnit);
+ _unitBP = [_unitBP] Call _returnProperBag;
+ };
+};
+
+_all = _primary + _secondary + _sidearm + _misc;
+
+WF_Logic setVariable ['lbChange',false];
+WF_Logic setVariable ['lbMainAction',''];
+WF_Logic setVariable ['InventoryClick',-1];
+WF_Logic setVariable ['WF_GEAR_Swap',false];
+WF_Logic setVariable ['WF_Gear_Action',''];
+
+primClicked = false;
+secoClicked = false;
+sideClicked = false;
+deleteLoadout = false;
+saveLoadout = false;
+buyLoadout = false;
+_displayInv = false;
+_updateUnit = true;
+_updateFiller = false;
+_manageBackpack = false;
+_updateBackpack = false;
+
+disableSerialization;
+_lb = 3700;
+_lbm = 3701;
+_primaryIDC = 3500;
+_secondaryIDC = 3501;
+_sidearmIDC = 3502;
+_specialIDC = 3535;
+_display = _this select 0;
+
+_totalWeapons = count _primary + count _secondary + count _sidearm;
+
+_fillerIDC = [3400,3401,3402,3403,3404,3405];
+_fillerTypes = ['template','all','primary','secondary','sidearm','misc'];
+_inventorySlots = [];
+_lastFiller = 'nil';
+_id = _fillerTypes find 'primary';
+_list = [];
+_miscItemSlots = [];
+_sidearmInventorySlots = [];
+(_display DisplayCtrl (_fillerIDC select _id)) ctrlSetTextColor [1, 1, 1, 1];
+
+_currentItem = '';
+_currentMags = [];
+_currentData = '';
+_currentValue = '';
+_currentCost = 0;
+_cost = 0;
+
+_currentPrimary = '';
+_currentSecondary = '';
+_currentSidearm = '';
+_currentPrimaryCost = 0;
+_currentSecondaryCost = 0;
+_currentSidearmCost = 0;
+_currentSpecialCost = 0;
+
+_old = '';
+
+_currentWeapons = [];
+_currentSpecials = [];
+_currentItems = [];
+_currentMagazines = [];
+
+_disp = (findDisplay 16000) displayAddEventHandler ['KeyDown','_this Call WF_Gear_Hotkeys'];
+_buygearfrom = missionNamespace getVariable "WFBE_TOWNGEAR";
+
+//--- Fill the available units list.
+_unitList = [];
+_buildings = (sideJoinedText) Call GetSideStructures;
+_i = 0;
+{
+ _check = ['BARRACKSTYPE',_buildings,'WFBE_PURCHASEGEARRANGE' Call GetNamespace,sideJoined,_x] Call BuildingInRange;
+ _inRange = if (isNull _check) then {false} else {true};
+
+ if (!_inRange && _buygearfrom in [1,2,3]) then {
+ _lookfor = switch (_buygearfrom) do { case 1:{WFCAMP}; case 2:{WFDEPOT}; case 3:{WFCAMP + WFDEPOT}; default{[]}};
+ _nObjects = nearestObjects [_x, _lookfor, 25];
+ _nObject = if (count _nObjects > 0) then {_nObjects select 0} else {objNull};
+ if !(isNull _nObject) then {
+ _sideID = _nObject getVariable "sideID";
+ if !(isNil "_sideID") then {
+ if (_sideID == sideID) then {_inRange = true};
+ };
+ };
+ };
+
+ if (_inRange) then {
+ _txt = (_x) Call GetAIDigit;
+ _unitList = _unitList + [_x];
+
+ _type = [typeOf _x, 'displayName'] Call GetConfigInfo;
+ lbAdd [3854,Format["[%1] %2 (%3)",_txt,name _x,_type]];
+
+ if (_currentUnit == _x) then {lbSetCurSel[3854,_i]};
+ _i = _i + 1;
+ };
+} forEach units(group player);
+
+while {alive player && dialog} do {
+ if (Side player != sideJoined) exitWith {closeDialog 0};
+ if (!dialog) exitWith {};
+
+ //--- Something changed since the last time?
+ _filler = WF_Logic getVariable 'filler';
+ _changed = WF_Logic getVariable 'lbChange';
+ _mainAction = WF_Logic getVariable 'lbMainAction';
+ _inventoryClick = WF_Logic getVariable 'InventoryClick';
+ _unitSwap = WF_Logic getVariable 'WF_GEAR_Swap';
+ _actionSE = WF_Logic getVariable 'WF_Gear_Action';
+
+ //--- Filter Changed.
+ if (_filler != _lastFiller || _updateFiller) then {
+ _updateFiller = false;
+ _manageBackpack = false;
+ _list = Call Compile Format ['_%1',_filler];
+ lnbClear _lb;
+ if (_filler != 'template') then {
+ [_list,_filler,_lb] Call UIGearFillList;
+ } else {
+ [_templateCosts,_templateNames,_templatePictures,_templateUpgrades,_templateAllowed,_filler,_lb] Call UIGearFillTemplateList;
+ };
+ _id = _fillerTypes find _filler;
+ {(_display displayCtrl _x) ctrlSetTextColor [0.7490, 0.7490, 0.7490, 0.7]} forEach _fillerIDC;
+ (_display displayCtrl (_fillerIDC select _id)) ctrlSetTextColor [1, 1, 1, 1];
+ //--- Update the list since the filler changed.
+ _changed = true;
+ };
+
+ //--- List Selection Changed.
+ if (_changed) then {
+ if !(_manageBackpack) then {
+ WF_Logic setVariable ['lbChange',false];
+ _currentRow = lnbCurSelRow _lb;
+ _currentData = lnbData[_lb,[_currentRow,0]];
+ _currentValue = lnbValue[_lb,[_currentRow,0]];
+ _currentItem = _list select _currentValue;
+ lnbClear _lbm;
+ _get = [];
+
+ /* Get */
+ if (_filler != 'template') then {
+ if (_filler == 'secondary' || _filler == 'all') then {
+ _get = (_currentItem+'_W') Call GetNamespace;
+ if (isNil '_get') then {
+ _get = _currentItem Call GetNamespace;
+ };
+ } else {
+ _get = _currentItem Call GetNamespace;
+ };
+
+ if !(isNil '_get') then {
+ _currentMags = _get select QUERYGEARMAGAZINES;
+ if (typeName _currentMags != 'SCALAR') then {
+ if (count _currentMags > 0) then {
+ [_currentMags,'magazine',_lbm] Call UIGearFillList;
+ };
+ };
+ };
+ };
+ };
+ WF_Logic setVariable ['lbChange',false];
+ };
+
+ //--- Player have clicked on one of the listbox.
+ if (_mainAction != '') then {
+ switch (_mainAction) do {
+ case 'addWeapon': {
+ _skip = true;
+ _sskip = false;
+ _get = [];
+
+ if (_filler != 'template') then {
+ _get = (_currentItem+"_W") Call GetNamespace;
+ if (isNil '_get') then {
+ _get = _currentItem Call GetNamespace;
+ };
+ };
+
+
+ _tfil = if (_manageBackpack) then {'backpack'} else {_filler};
+ if (_tfil == 'primary' || _tfil == 'secondary' || _tfil == 'sidearm' || _tfil == 'all') then {
+ if (_currentItem in _misc) then {_skip = false;_currentValue = _currentValue - _totalWeapons};
+ if (_skip) then {
+ _slist = Call Compile Format ['_%1',_currentData];
+ _index = _slist find _currentItem;
+ if (_index != -1) then {
+ if (_filler == 'all') then {
+ if (_currentItem in _primary) then {_currentData = 'primary'} else {
+ if (_currentItem in _secondary) then {_currentData = 'secondary'} else {
+ if (_currentItem in _sidearm) then {_currentData = 'sidearm'};
+ };
+ };
+ };
+
+ /* Handle the extended inventory system if disabled */
+ _isSecoAllowTwo = true;
+ _isPrimAllowTwo = true;
+ if (paramExtendedInventory && (_tfil == 'primary' || _tfil == 'secondary' || _tfil == 'all')) then {
+ _getpp = [];
+ _getss = [];
+
+ _query = if (_currentData == 'primary') then {_currentItem} else {_currentPrimary};
+ if (_query != '') then {
+ _getpp = (_query+"_W") Call GetNamespace;
+ if (isNil '_getpp') then {
+ _getpp = _query Call GetNamespace;
+ };
+ };
+ if (_query != '') then {_isPrimAllowTwo = _getpp select QUERYGEARALLOWTWO};
+
+ _query = if (_currentData == 'secondary') then {_currentItem} else {_currentSecondary};
+ if (_query != '') then {
+ _getss = (_query+"_W") Call GetNamespace;
+ if (isNil '_getss') then {
+ _getss = _query Call GetNamespace;
+ };
+ };
+ if (_query != '') then {_isSecoAllowTwo = _getss select QUERYGEARALLOWTWO};
+
+ if (!_isSecoAllowTwo && !_isPrimAllowTwo) then {
+ _sskip = true;
+ hint parseText (localize 'STR_WF_INFO_Gear_AllowTwo');
+ };
+ };
+
+ if !(_sskip) then {
+ if (_currentData == 'secondary') then {
+ if (_currentItem in _listbp) then {
+ _unitBP = _currentItem;
+ };
+ _backpackloadout = [[],[]];
+ _bpcost = 0;
+ };
+ Call Compile Format ['_old = _current%1;_currentWeapons = _currentWeapons - [_current%1]; _current%1Cost = %2; _current%1 = "%3";ctrlSetText[_%1IDC,"%4"]',_currentData,_get select QUERYGEARCOST,_currentItem,_get select QUERYGEARPICTURE];
+ //--- New Magazines.
+ _currentMags = _get select QUERYGEARMAGAZINES;
+ //--- Old Magazines.
+ _get2 = (_old+"_W") Call GetNamespace;
+ if (isNil '_get2') then {
+ _get2 = _old Call GetNamespace;
+ };
+ if !(isNil '_get2') then {
+ if (typeName (_get2 select QUERYGEARMAGAZINES) != 'SCALAR' && typeName (_get select QUERYGEARMAGAZINES) != 'SCALAR') then {
+ _oldMags = _get2 select QUERYGEARMAGAZINES;
+ _currentMagazines = [_currentMags select 0,_oldMags,_currentMagazines] Call ReplaceInventoryAmmo;
+ };
+ if !(isNil '_get2') then {
+ if (typeName (_get2 select QUERYGEARMAGAZINES) != 'SCALAR' && typeName (_get select QUERYGEARMAGAZINES) != 'SCALAR') then {
+ _oldMags = _get2 select QUERYGEARMAGAZINES;
+ _use = "";
+ _currentUpgrades = (sideJoinedText) Call GetSideUpgrades;
+ {
+ _upgr = (missionNamespace getVariable _x) select QUERYGEARUPGRADE;
+ if ((_currentUpgrades select 13) >= _upgr) exitWith {_use = _x};
+ } forEach _currentMags;
+ _currentMagazines = [_use,_oldMags,_currentMagazines] Call ReplaceInventoryAmmo;
+ };
+ };
+ };
+ };
+ };
+ if (!_sskip) then {
+ _currentWeapons = _currentWeapons + [_currentItem];
+ _displayInv = true;
+ };
+ };
+ };
+ if (_tfil == 'backpack') then {
+ _currentBPRow = lnbCurSelRow _lb;
+ _currentBPValue = lnbValue[_lb,[_currentBPRow,0]];
+ _currentBPItem = _backpack select _currentBPValue;
+
+ _hasSpace = [_unitBP,_backpackloadout,_currentBPItem] Call BackpackHasSpace;
+
+ if (_hasSpace) then {
+ _id = (_backpackloadout select 0) find _currentBPItem;
+ if (_id == -1) then {
+ _arrayType = (_backpackloadout select 0) + [_currentBPItem];
+ _arrayAmount = (_backpackloadout select 1) + [1];
+ _backpackloadout set[0, _arrayType];
+ _backpackloadout set[1, _arrayAmount];
+ } else {
+ _arrayAmount = (_backpackloadout select 1) set [_id,((_backpackloadout select 1) select _id)+1];
+ };
+ };
+
+ _updateBackpack = true;
+ };
+ if (_filler == 'misc' || !_skip) then {
+ _type = _get select QUERYGEARTYPE;
+ if (_type == 'CfgMagazines') then {
+ _currentMagazines = [_currentMagazines,_currentItem] Call UIAddMagazine;
+ _displayInv = true;
+ };
+ if (_type == 'Special' && count _currentSpecials < 3 && !(_currentItem in _currentSpecials)) then {
+ _currentSpecials = _currentSpecials + [_currentItem];
+ _currentSpecialCost = 0;
+ _u = 0;
+ {
+ _zt = _x Call GetNamespace;
+ ctrlSetText[_specialIDC + _u,_zt select QUERYGEARPICTURE];
+ _currentSpecialCost = _currentSpecialCost + (_zt select QUERYGEARCOST);
+ _u = _u + 1;
+ } forEach _currentSpecials;
+ _displayInv = true;
+ };
+ if (_type == 'Item') then {
+ if (!(_currentItem in _currentItems)) then {
+ _currentItems = [_currentItems,_currentItem] Call UIAddItem;
+ _displayInv = true;
+ };
+ };
+ };
+ if (_tfil == 'template') then {
+ _tempWeapons = _template select _currentValue;
+ _tempItems = _templateItems select _currentValue;
+ _tempMags = _templateMags select _currentValue;
+ _tempSpecs = _templateSpecs select _currentValue;
+ _currentPrimary = '';
+ _currentSecondary = '';
+ _currentSidearm = '';
+ _currentPrimaryCost = 0;
+ _currentSecondaryCost = 0;
+ _currentSidearmCost = 0;
+ _getnum = 0;
+ _currentWeapons = [];
+ _currentItems = [];
+ _backpackloadout = [[],[]];
+ {
+ if (typeName _x == 'STRING') then {_currentItems = _currentItems + [_x]};
+ if (typeName _x == 'ARRAY') then {_backpackloadout = _x};
+ } forEach _tempItems;
+ _bpcost = 0;
+
+ if (count (_backpackloadout select 0) > 0) then {
+ _getnum = getNumber(configFile >> 'CfgVehicles' >> typeOf _currentUnit >> 'canCarryBackPack');
+ if (_getnum == 1) then {
+ _u = 0;
+ _currentUpgrades = (sideJoinedText) Call GetSideUpgrades;
+ {
+ _get = _x Call GetNamespace;
+ if !(isNil '_get') then {
+ if ((_currentUpgrades select 13) >= (_get select QUERYGEARUPGRADE)) then {
+ _bpcost = _bpcost + ((_get select QUERYGEARCOST)*((_backpackloadout select 1) select _u));
+ };
+ };
+ _u = _u + 1;
+ } forEach (_backpackloadout select 0);
+ };
+ };
+ _currentBackpackLoadout = (_backpackloadout select 0);
+ _currentBackpackLoadoutAmount = (_backpackloadout select 1);
+ {
+ _cwep = _x;
+ _get = (_x+"_W") Call GetNamespace;
+ if (isNil '_get') then {
+ _get = _x Call GetNamespace;
+ };
+
+ if (({_x == _cwep} count _primary) > 0) then {_currentWeapons = _currentWeapons + [_x];_currentPrimary = _x;_currentPrimaryCost = _get select QUERYGEARCOST;ctrlSetText[_primaryIDC,_get select QUERYGEARPICTURE]} else {
+ if (({_x == _cwep} count _secondary) > 0) then {_currentWeapons = _currentWeapons + [_x];_currentSecondary = _x;_currentSecondaryCost = _get select QUERYGEARCOST;ctrlSetText[_secondaryIDC,_get select QUERYGEARPICTURE]} else {
+ if (({_x == _cwep} count _sidearm) > 0) then {_currentWeapons = _currentWeapons + [_x];_currentSidearm = _x;_currentSidearmCost = _get select QUERYGEARCOST;ctrlSetText[_sidearmIDC,_get select QUERYGEARPICTURE]};
+ };
+ };
+ } forEach _tempWeapons;
+ if (_currentPrimary == '') then {ctrlSetText [_primaryIDC,'\ca\ui\data\ui_gear_gun_gs.paa']};
+ if (_currentSecondary == '') then {ctrlSetText [_secondaryIDC,'\ca\ui\data\ui_gear_sec_gs.paa']};
+ if (_currentSidearm == '') then {ctrlSetText [_sidearmIDC,'\ca\ui\data\ui_gear_hgun_gs.paa']};
+ if (_currentSecondary in _listbp && _getnum == 1) then {_unitBP = _currentSecondary} else {_unitBP = ""};
+ _currentMagazines = _tempMags;
+ _currentSpecials = _tempSpecs;
+ _currentSpecialCost = 0;
+ for [{_x = 0},{_x < 2},{_x = _x + 1}] do {ctrlSetText[_specialIDC + _x,'\Ca\UI\Data\ui_gear_eq_gs.paa']};
+ _u = 0;
+ {
+ _get = _x Call GetNamespace;
+ _currentSpecialCost = _currentSpecialCost + (_get select QUERYGEARCOST);
+ ctrlSetText[_specialIDC + _u,_get select QUERYGEARPICTURE];
+ _u = _u + 1;
+ } forEach _currentSpecials;
+ _displayInv = true;
+ };
+ };
+
+ case 'addMagazine': {
+ if !(_manageBackpack) then {
+ _currentMagValue = lnbValue[_lbm,[lnbCurSelRow _lbm,0]];
+ _currentMag = _currentMags select _currentMagValue;
+ _currentMagazines = [_currentMagazines,_currentMag] Call UIAddMagazine;
+ _displayInv = true;
+ } else {
+ _currentBPItemValue = lnbValue[_lbm,[lnbCurSelRow _lbm,0]];
+ //--- todo find
+ _arrayType = _backpackloadout select 0;
+ _arrayAmount = _backpackloadout select 1;
+ _itemAmount = _arrayAmount select _currentBPItemValue;
+ if ((_itemAmount -1) <= 0) then {
+ _arrayType set [_currentBPItemValue, 'nil'];
+ _arrayAmount set [_currentBPItemValue, 'nil'];
+ _arrayType = _arrayType - ['nil'];
+ _arrayAmount = _arrayAmount - ['nil'];
+ } else {
+ _arrayAmount set [_currentBPItemValue, (_arrayAmount select _currentBPItemValue)-1];
+ };
+ _backpackloadout set [0, _arrayType];
+ _backpackloadout set [1, _arrayAmount];
+ _updateBackpack = true;
+ };
+ };
+ };
+ WF_Logic setVariable ['lbMainAction',''];
+ };
+
+ //--- Remove a weapon by clicking on it.
+ if (primClicked) then {primClicked = false;if (_currentPrimary != '') then {ctrlSetText [_primaryIDC,'\ca\ui\data\ui_gear_gun_gs.paa'];_index = _primary find _currentPrimary;_currentPrimaryCost = 0;_currentWeapons = _currentWeapons - [_currentPrimary];_currentPrimary = '';_displayInv = true}};
+ if (secoClicked) then {secoClicked = false;if (_currentSecondary != '') then {ctrlSetText [_secondaryIDC,'\ca\ui\data\ui_gear_sec_gs.paa'];_index = _secondary find _currentSecondary;_currentSecondaryCost = 0;_currentWeapons = _currentWeapons - [_currentSecondary];_currentSecondary = '';_displayInv = true;_backpackloadout = [[],[]];_bpcost = 0;_unitBP = ""}};
+ if (sideClicked) then {sideClicked = false;if (_currentSidearm != '') then {ctrlSetText [_sidearmIDC,'\ca\ui\data\ui_gear_hgun_gs.paa'];_index = _sidearm find _currentSidearm;_currentSidearmCost = 0;_currentWeapons = _currentWeapons - [_currentSidearm];_currentSidearm = '';_displayInv = true}};
+
+ if (_unitSwap) then {
+ WF_Logic setVariable ['WF_GEAR_Swap',false];
+ if (count _unitList > 0) then {_currentUnit = _unitList select (lbCurSel 3854)} else {_currentUnit = player};
+ _updateUnit = true;
+ };
+
+ if (_updateUnit) then {
+ _currentWeapons = weapons _currentUnit;
+ _currentCost = 0;
+ _unitBP = "";
+ if !(isNull(unitBackpack _currentUnit)) then {
+ _unitBP = typeOf(unitBackpack _currentUnit);
+ _unitBP = [_unitBP] Call _returnProperBag;
+ _currentWeapons = _currentWeapons + [_unitBP];
+
+ //--- Retrieve the backpack content cost.
+ _backpackloadout = getMagazineCargo (unitBackPack _currentUnit);
+ _currentCost = _currentCost - _bpcost;
+ _bpcost = 0;
+ if (count (_backpackloadout select 0) > 0) then {
+ _u = 0;
+ _currentUpgrades = (sideJoinedText) Call GetSideUpgrades;
+ {
+ _get = _x Call GetNamespace;
+ if !(isNil '_get') then {
+ if ((_currentUpgrades select 13) >= (_get select QUERYGEARUPGRADE)) then {
+ _bpcost = _bpcost + ((_get select QUERYGEARCOST)*((_backpackloadout select 1) select _u));
+ };
+ };
+ _u = _u + 1;
+ } forEach (_backpackloadout select 0);
+ };
+ _currentCost = _currentCost + _bpcost;
+ };
+
+ _get = getNumber(configFile >> 'CfgVehicles' >> typeOf _currentUnit >> 'canCarryBackPack');
+ _show = if (_get == 1) then {true} else {false};
+ ctrlShow [3802,_show];
+
+ if (_manageBackpack) then {_updateFiller = true};
+
+ _currentSpecials = [];
+ _currentItems = [];
+ _currentMagazines = magazines _currentUnit;
+
+ _currentPrimary = '';
+ _currentSecondary = '';
+ _currentSidearm = '';
+
+ _sideGear = _currentWeapons;
+ {if (!(_x in _all)) then {_sideGear = _sideGear - [_x]}} forEach _currentWeapons;
+ _currentWeapons = _sideGear;
+
+ _sideGear = _currentMagazines;
+ {if (!(_x in _misc) && !(_x in _magazine)) then {_sideGear = _sideGear - [_x]}} forEach _currentMagazines;
+ _currentMagazines = _sideGear;
+
+ _currentPrimaryCost = 0;
+ _currentSecondaryCost = 0;
+ _currentSidearmCost = 0;
+ _currentSpecialCost = 0;
+
+ ctrlSetText [_primaryIDC,'\ca\ui\data\ui_gear_gun_gs.paa'];
+ ctrlSetText [_secondaryIDC,'\ca\ui\data\ui_gear_sec_gs.paa'];
+ ctrlSetText [_sidearmIDC,'\ca\ui\data\ui_gear_hgun_gs.paa'];
+ ctrlSetText [3535,'\Ca\UI\Data\ui_gear_eq_gs.paa'];
+ ctrlSetText [3536,'\Ca\UI\Data\ui_gear_eq_gs.paa'];
+
+ {
+ _cwep = _x;
+ _get = (_cwep+"_W") Call GetNamespace;
+ if (isNil '_get') then {
+ _get = _cwep Call GetNamespace;
+ };
+
+ if !(isNil '_get') then {
+ _found = false;
+ _index = {_x == _cwep} count _primary;
+ if (_index > 0) then {_currentPrimary = _cwep;_currentPrimaryCost = _get select QUERYGEARCOST;ctrlSetText[_primaryIDC,_get select QUERYGEARPICTURE];_found = true};
+ if !(_found) then {
+ _index = {_x == _cwep} count _secondary;
+ if (_index > 0) then {_currentSecondary = _cwep;_currentSecondaryCost = _get select QUERYGEARCOST;ctrlSetText[_secondaryIDC,_get select QUERYGEARPICTURE];_found = true};
+ if !(_found) then {
+ _index = {_x == _cwep} count _sidearm;
+ if (_index > 0) then {_currentSidearm = _cwep;_currentSidearmCost = _get select QUERYGEARCOST;ctrlSetText[_sidearmIDC,_get select QUERYGEARPICTURE];_found = true};
+ if !(_found) then {
+ _index = {_x == _cwep} count _misc;
+ if (_index > 0) then {
+ switch (_get select QUERYGEARTYPE) do {
+ case 'Special': {
+ _currentSpecials = _currentSpecials + [_x];
+ _currentSpecialCost = _currentSpecialCost + (_get select QUERYGEARCOST);
+ _u = 0;
+ {
+ _zt = _x Call GetNamespace;
+ ctrlSetText[_specialIDC + _u,_zt select QUERYGEARPICTURE];
+ _u = _u + 1;
+ } forEach _currentSpecials;
+ };
+ case 'Item': {
+ _currentItems = _currentItems + [_x];
+ };
+ };
+ };
+ };
+ };
+ };
+ };
+ } forEach _currentWeapons;
+
+ _currentWeapons = _currentWeapons - _misc;
+ _data = [_currentMagazines,_currentItems] Call DisplayInventory;
+ _inventorySlots = _data select 0;
+ _sidearmInventorySlots = _data select 1;
+ _miscItemSlots = _data select 2;
+ _currentCost = _currentCost + (_data select 3) + _currentPrimaryCost + _currentSecondaryCost + _currentSidearmCost + _currentSpecialCost;
+ _cost = 0;
+ _updateUnit = false;
+ };
+
+ //--- Remove a magazine by clicking on it.
+ if (_inventoryClick != -1) then {
+ //--- Main Inventory.
+ if (_inventoryClick > 3502 && _inventoryClick < 3515) then {
+ _slot = _inventoryClick - 3503;
+ if (_slot < Count _inventorySlots) then {
+ _index = _currentMagazines find (_inventorySlots Select _slot);
+ if (_index != -1) then {_currentMagazines = [_currentMagazines,_index] Call ReplaceArray};
+ };
+ };
+ //--- Handgun Inventory
+ if (_inventoryClick > 3514 && _inventoryClick < 3523) then {
+ _slot = _inventoryClick - 3515;
+ if (_slot < Count _sidearmInventorySlots) then {
+ _index = _currentMagazines find (_sidearmInventorySlots Select _slot);
+ if (_index != -1) then {_currentMagazines = [_currentMagazines,_index] Call ReplaceArray};
+ };
+ };
+ //--- Misc Inventory
+ if (_inventoryClick > 3522 && _inventoryClick < 3535) then {
+ _slot = _inventoryClick - 3523;
+ if (_slot < Count _miscItemSlots) then {
+ _index = _currentItems find (_miscItemSlots Select _slot);
+ if (_index != -1) then {_currentItems = [_currentItems,_index] Call ReplaceArray};
+ };
+ };
+ //--- Remove a special item.
+ if (_inventoryClick == 3535 || _inventoryClick == 3536) then {
+ _slot = _inventoryClick - 3535;
+ if (_slot < Count _currentSpecials) then {
+ _currentSpecialCost = 0;
+ _currentSpecials = _currentSpecials - [_currentSpecials select _slot];
+ for [{_x = 0},{_x < 2},{_x = _x + 1}] do {ctrlSetText[_specialIDC + _x,'\Ca\UI\Data\ui_gear_eq_gs.paa']};
+ _u = 0;
+ {
+ _get = _x Call GetNamespace;
+ _currentSpecialCost = _currentSpecialCost + (_get select QUERYGEARCOST);
+ ctrlSetText[_specialIDC + _u,_get select QUERYGEARPICTURE];
+ _u = _u + 1;
+ } forEach _currentSpecials;
+ };
+ };
+ WF_Logic setVariable ['InventoryClick',-1];
+ _displayInv = true;
+ };
+
+ //--- Custom UA.
+ if (_actionSE != '') then {
+ switch (_actionSE) do {
+ case 'reload': {
+ if !(isNil 'respawnWeapons') then {
+ _currentPrimary = '';
+ _currentSecondary = '';
+ _currentSidearm = '';
+ _currentPrimaryCost = 0;
+ _currentSecondaryCost = 0;
+ _currentSidearmCost = 0;
+ _currentWeapons = [];
+ _currentItems = [];
+ _currentSpecials = [];
+ _backpackloadout = [[],[]];
+
+ {
+ _cwep = _x;
+ _get = (_cwep+"_W") Call GetNamespace;
+ if (isNil '_get') then {
+ _get = _cwep Call GetNamespace;
+ };
+
+ if !(isNil '_get') then {
+ _index = {_x == _cwep} count _primary;
+ if (_index > 0) then {_currentWeapons = _currentWeapons + [_x];_currentPrimary = _x;_currentPrimaryCost = _get select QUERYGEARCOST;ctrlSetText[_primaryIDC,_get select QUERYGEARPICTURE]} else {
+ _index = {_x == _cwep} count _secondary;
+ if (_index > 0) then {_currentWeapons = _currentWeapons + [_x];_currentSecondary = _x;_currentSecondaryCost = _get select QUERYGEARCOST;ctrlSetText[_secondaryIDC,_get select QUERYGEARPICTURE]} else {
+ _index = {_x == _cwep} count _sidearm;
+ if (_index > 0) then {_currentWeapons = _currentWeapons + [_x];_currentSidearm = _x;_currentSidearmCost = _get select QUERYGEARCOST;ctrlSetText[_sidearmIDC,_get select QUERYGEARPICTURE]} else {
+ _index = {_x == _cwep} count _misc;
+ if (_index > 0) then {
+ switch (_get select QUERYGEARTYPE) do {
+ case 'Special': {
+ _currentSpecials = _currentSpecials + [_x];
+ };
+ case 'Item': {
+ _currentItems = _currentItems + [_x];
+ };
+ };
+ };
+ };
+ };
+ };
+ };
+ } forEach respawnWeapons;
+
+ if !(isNil 'respawnBagContent') then {
+ if (count (respawnBagContent select 0) > 0) then {
+ _backpackloadout = [respawnBagContent select 0,respawnBagContent select 1];
+ _bpcost = 0;
+
+ if (count (_backpackloadout select 0) > 0) then {
+ _u = 0;
+ _currentUpgrades = (sideJoinedText) Call GetSideUpgrades;
+ {
+ _get = _x Call GetNamespace;
+ if !(isNil '_get') then {
+ if ((_currentUpgrades select 13) >= (_get select QUERYGEARUPGRADE)) then {
+ _bpcost = _bpcost + ((_get select QUERYGEARCOST)*((_backpackloadout select 1) select _u));
+ };
+ };
+ _u = _u + 1;
+ } forEach (_backpackloadout select 0);
+ };
+ _currentBackpackLoadout = (_backpackloadout select 0);
+ _currentBackpackLoadoutAmount = (_backpackloadout select 1);
+ };
+ };
+
+ if (_currentSecondary in _listbp) then {
+ _unitBP = _currentSecondary;
+ };
+
+ if (_currentPrimary == '') then {ctrlSetText [_primaryIDC,'\ca\ui\data\ui_gear_gun_gs.paa']};
+ if (_currentSecondary == '') then {ctrlSetText [_secondaryIDC,'\ca\ui\data\ui_gear_sec_gs.paa']};
+ if (_currentSidearm == '') then {ctrlSetText [_sidearmIDC,'\ca\ui\data\ui_gear_hgun_gs.paa']};
+
+ _currentMagazines = respawnAmmo;
+ _currentSpecialCost = 0;
+
+ for [{_x = 0},{_x < 2},{_x = _x + 1}] do {ctrlSetText[_specialIDC + _x,'\Ca\UI\Data\ui_gear_eq_gs.paa']};
+
+ _u = 0;
+ {
+ _get = _x Call GetNamespace;
+ _currentSpecialCost = _currentSpecialCost + (_get select QUERYGEARCOST);
+ ctrlSetText[_specialIDC + _u,_get select QUERYGEARPICTURE];
+ _u = _u + 1;
+ } forEach _currentSpecials;
+
+ _displayInv = true;
+ };
+ };
+ case 'clear': {
+ _currentPrimary = '';
+ _currentSecondary = '';
+ _currentSidearm = '';
+ _unitBP = "";
+ _currentPrimaryCost = 0;
+ _currentSecondaryCost = 0;
+ _currentSidearmCost = 0;
+ _currentSpecialCost = 0;
+ _bpcost = 0;
+ _currentWeapons = [];
+ _currentItems = [];
+ _currentSpecials = [];
+ _currentMagazines = [];
+ ctrlSetText [_primaryIDC,'\ca\ui\data\ui_gear_gun_gs.paa'];
+ ctrlSetText [_secondaryIDC,'\ca\ui\data\ui_gear_sec_gs.paa'];
+ ctrlSetText [_sidearmIDC,'\ca\ui\data\ui_gear_hgun_gs.paa'];
+ for [{_x = 0},{_x < 2},{_x = _x + 1}] do {ctrlSetText[_specialIDC + _x,'\Ca\UI\Data\ui_gear_eq_gs.paa']};
+ _displayInv = true;
+ };
+ case 'backpack': {
+ if (_unitBP != "") then {
+ lnbClear _lb;
+ [_backpack,'backpack',_lb] Call UIGearFillList;
+ _manageBackpack = true;
+ _updateBackpack = true;
+ };
+ };
+ };
+ WF_Logic setVariable ['WF_Gear_Action',''];
+ };
+
+ //--- Show inventory (Icons).
+ if (_displayInv) then {
+ _displayInv = false;
+ _upgradeCost = _currentSpecialCost;
+ _data = [_currentMagazines,_currentItems] Call DisplayInventory;
+ _inventorySlots = _data select 0;
+ _sidearmInventorySlots = _data select 1;
+ _miscItemSlots = _data select 2;
+ _upgradeCost = _upgradeCost + (_data select 3);
+ if (_currentPrimary != '') then {_upgradeCost = _upgradeCost + _currentPrimaryCost};
+ if (_currentSecondary != '') then {_upgradeCost = _upgradeCost + _currentSecondaryCost};
+ if (_currentSidearm != '') then {_upgradeCost = _upgradeCost + _currentSidearmCost};
+ if !(_currentSecondary in _listbp) then {_unitBP = ""};
+ _cost = (_upgradeCost+_bpcost) - _currentCost;
+ };
+
+ //--- Update the backpack
+ if (_updateBackpack) then {
+ _updateBackpack = false;
+
+ _currentBackpackLoadout = [];
+ _currentBackpackLoadoutAmount = [];
+ _currentBackpackLoadoutCost = [];
+ _currentBackpackLoadoutPictures = [];
+ _currentBackpackLoadoutNames = [];
+ _currentBackpackLoadoutUpgrades = [];
+ _currentBackpackLoadoutAllowed = [];
+ _u = 0;
+ _cost = _cost - _bpcost;
+ _bpcost = 0;
+ if (count (_backpackloadout select 0) > 0) then {
+ _currentUpgrades = (sideJoinedText) Call GetSideUpgrades;
+ {
+ _get = _x Call GetNamespace;
+ if !(isNil '_x') then {
+ if ((_currentUpgrades select 13) >= (_get select QUERYGEARUPGRADE)) then {
+ _currentBackpackLoadout = _currentBackpackLoadout + [_x];
+ _currentBackpackLoadoutAmount = _currentBackpackLoadoutAmount + [(_backpackloadout select 1) select _u];
+ _currentBackpackLoadoutCost = _currentBackpackLoadoutCost + [_get select QUERYGEARCOST];
+ _bpcost = _bpcost + ((_get select QUERYGEARCOST)*((_backpackloadout select 1) select _u));
+ _currentBackpackLoadoutPictures = _currentBackpackLoadoutPictures + [_get select QUERYGEARPICTURE];
+ _currentBackpackLoadoutNames = _currentBackpackLoadoutNames + [str((_backpackloadout select 1) select _u)+"x "+(_get select QUERYGEARLABEL)];
+ _currentBackpackLoadoutUpgrades = _currentBackpackLoadoutUpgrades + [_get select QUERYGEARUPGRADE];
+ _currentBackpackLoadoutAllowed = _currentBackpackLoadoutAllowed + [_get select QUERYGEARALLOWED];
+ };
+ };
+ _u = _u + 1;
+ } forEach (_backpackloadout select 0);
+ };
+ _cost = _cost + _bpcost;
+ lnbClear _lbm;
+ [_currentBackpackLoadoutCost,_currentBackpackLoadoutNames,_currentBackpackLoadoutPictures,_currentBackpackLoadoutUpgrades,_currentBackpackLoadoutAllowed,'backpack',_lbm] Call UIGearFillTemplateList;
+ };
+
+ //--- Buy a loadout.
+ if (buyLoadout) then {
+ buyLoadout = false;
+ _funds = Call GetPlayerFunds;
+ if (_funds >= _cost) then {
+ (-_cost) Call ChangePlayerFunds;
+ //--- Player's respawn loadout.
+ if (_currentUnit == player && (vehicleVarName player == clientIdentification)) then {
+ respawnWeapons = _currentWeapons + _currentSpecials + _currentItems;
+ respawnAmmo = _currentMagazines;
+ if (_unitBP != '') then {
+ respawnBag = _unitBP;
+ respawnBagContent = [_currentBackpackLoadout,_currentBackpackLoadoutAmount];
+ } else {
+ respawnBag = nil;
+ respawnBagContent = [[],[]];
+ };
+ };
+
+ /* Equip the core before the backpack */
+ _weaps = _currentWeapons;
+ if !(WF_A2_Vanilla) then {
+ _temp = _weaps;
+ {
+ if (_x in _listbp) then {_temp = _temp - [_x]};
+ } forEach _weaps;
+ _weaps = _temp;
+ };
+ [_currentUnit,(_weaps + _currentSpecials + _currentItems),_currentMagazines] Call EquipLoadout;
+
+ /* Equip backpack if needed */
+ if !(WF_A2_Vanilla) then {
+ if (_unitBP != "" || !isNull (unitBackpack _currentUnit)) then {
+ _add = true;
+ if ((_unitBP == "" && !isNull (unitBackpack _currentUnit)) || (_unitBP != "" && !isNull (unitBackpack _currentUnit))) then {removeBackpack _currentUnit;};
+ if !(isNull (unitBackpack _currentUnit)) then {
+ if (typeOf (unitBackpack _currentUnit) == _unitBP) then {_add = false};
+ };
+
+ if (_add && _unitBP != "") then {
+ _currentUnit addBackpack _unitBP;
+ };
+
+ [unitBackpack _currentUnit,[_currentBackpackLoadout,_currentBackpackLoadoutAmount]] Call EquipBackpack;
+ };
+ };
+ _data = [_currentMagazines,_currentItems] Call DisplayInventory;
+ _inventorySlots = _data select 0;
+ _sidearmInventorySlots = _data select 1;
+ _miscItemSlots = _data select 2;
+ _currentCost = (_data select 3) + _currentPrimaryCost + _currentSecondaryCost + _currentSidearmCost + _currentSpecialCost + _bpcost;
+ respawnGearCost = _currentCost;
+ _cost = 0;
+ } else {
+ hint parseText(Format [localize "STR_WF_INFO_Funds_Missing_Gear",_cost - _funds]);
+ };
+ };
+
+ //--- Remove an existing template.
+ if (deleteLoadout) then {
+ deleteLoadout = false;
+ //--- Behave only on template filler.
+ if (_filler == 'template') then {
+ _currentRow = lnbCurSelRow _lb;
+ _currentValue = lnbValue[_lb,[_currentRow,0]];
+ //--- Update the templates.
+ _template set [_currentValue, "DELETE"];
+ _template = _template - ["DELETE"];
+ WF_Logic setVariable["templateClasses",_template];
+ _templateCosts set [_currentValue, "DELETE"];
+ _templateCosts = _templateCosts - ["DELETE"];
+ WF_Logic setVariable["templateCosts",_templateCosts];
+ _templatePictures set [_currentValue, "DELETE"];
+ _templatePictures = _templatePictures - ["DELETE"];
+ WF_Logic setVariable["templatePictures",_templatePictures];
+ _templateNames set [_currentValue, "DELETE"];
+ _templateNames = _templateNames - ["DELETE"];
+ WF_Logic setVariable["templateNames",_templateNames];
+ _templateMags set [_currentValue, "DELETE"];
+ _templateMags = _templateMags - ["DELETE"];
+ WF_Logic setVariable["templateMags",_templateMags];
+ _templateItems set [_currentValue, "DELETE"];
+ _templateItems = _templateItems - ["DELETE"];
+ WF_Logic setVariable["templateItems",_templateItems];
+ _templateSpecs set [_currentValue, "DELETE"];
+ _templateSpecs = _templateSpecs - ["DELETE"];
+ WF_Logic setVariable["templateSpecs",_templateSpecs];
+ _templateUpgrades set [_currentValue, "DELETE"];
+ _templateUpgrades = _templateUpgrades - ["DELETE"];
+ WF_Logic setVariable["templateUpgrades",_templateUpgrades];
+ _templateAllowed set [_currentValue, "DELETE"];
+ _templateAllowed = _templateAllowed - ["DELETE"];
+ WF_Logic setVariable["templateAllowed",_templateAllowed];
+ _updateFiller = true;
+ };
+ };
+
+ if (saveLoadout) then {
+ saveLoadout = false;
+ //--- Behave only on template filler.
+ if (_filler == 'template') then {
+ //--- Update the templates.
+ _desc = '';
+ _pict = '';
+ _temp = [];
+ _cAllow = true;
+ _upgr = 0;
+ _pallow = true;
+ _sallow = true;
+
+ if (_currentPrimary != '') then {
+ _get = _currentPrimary Call GetNamespace;
+ _temp = _temp + [_currentPrimary];
+ _desc = _desc + (_get select QUERYGEARLABEL);
+ _pict = (_get select QUERYGEARPICTURE);
+ if !(_get select QUERYGEARALLOWED) then {_cAllow = false};
+ _upgr = _get select QUERYGEARUPGRADE;
+ _pallow = _get select QUERYGEARALLOWTWO;
+ };
+ if (_currentSecondary != '') then {
+ _get = (_currentSecondary+"_W") Call GetNamespace;
+ if (isNil '_get') then {
+ _get = _currentSecondary Call GetNamespace;
+ };
+ _temp = _temp + [_currentSecondary];
+ if (_desc != '') then { _desc = _desc + "/"};
+ //--- Needless to check if the primary is prohibed.
+ _desc = _desc + (_get select QUERYGEARLABEL);
+ if (_pict == '') then {_pict = _get select QUERYGEARPICTURE};
+ if (_cAllow) then {if !(_get select QUERYGEARALLOWED) then {_cAllow = false}};
+ if ((_get select QUERYGEARUPGRADE) > _upgr) then {_upgr = (_get select QUERYGEARUPGRADE)};
+ _sallow = _get select QUERYGEARALLOWTWO;
+ };
+ if (_currentSidearm != '') then {
+ _get = _currentSidearm Call GetNamespace;
+ _temp = _temp + [_currentSidearm];
+ if (_desc != '') then { _desc = _desc + "/"};
+ //--- Needless to check if the secondary is prohibed.
+ _desc = _desc + (_get select QUERYGEARLABEL);
+ if (_pict == '') then {_pict = _get select QUERYGEARPICTURE};
+ if (_cAllow) then {if !(_get select QUERYGEARALLOWED) then {_cAllow = false}};
+ if ((_get select QUERYGEARUPGRADE) > _upgr) then {_upgr = (_get select QUERYGEARUPGRADE)};
+ };
+ //--- Handle Backpack Content.
+ _addin = [_currentItems];
+ if (_unitBP != '') then {
+ _extra = [_currentBackpackLoadout,_currentBackpackLoadoutAmount];
+ _addin = [_currentItems + [_extra]];
+ };
+ if (_pallow || _sallow || !paramExtendedInventory) then {
+ _template = _template + [_temp];
+ WF_Logic setVariable["templateClasses",_template];
+ _templateCosts = _templateCosts + [(_cost + _currentCost)];
+ WF_Logic setVariable["templateCosts",_templateCosts];
+ _templatePictures = _templatePictures + [_pict];
+ WF_Logic setVariable["templatePictures",_templatePictures];
+ _templateNames = _templateNames + [_desc];
+ WF_Logic setVariable["templateNames",_templateNames];
+ _templateMags = _templateMags + [_currentMagazines];
+ WF_Logic setVariable["templateMags",_templateMags];
+ _templateItems = _templateItems + _addin;
+ WF_Logic setVariable["templateItems",_templateItems];
+ _templateSpecs = _templateSpecs + [_currentSpecials];
+ WF_Logic setVariable["templateSpecs",_templateSpecs];
+ _templateUpgrades = _templateUpgrades + [_upgr];
+ WF_Logic setVariable["templateUpgrades",_templateUpgrades];
+ _templateAllowed = _templateAllowed + [_cAllow];
+ WF_Logic setVariable["templateAllowed",_templateAllowed];
+ _updateFiller = true;
+ } else {
+ hint parseText (localize 'STR_WF_INFO_Gear_AllowTwo');
+ };
+ };
+ };
+
+ //--- Loadout Cost.
+ ctrlSetText[3850,Format[localize 'STR_WF_GEAR_Cost',_cost]];
+ //--- Player's Cash.
+ //ctrlSetText[3851,Format["%1 $ %2.",localize 'STR_WF_GEAR_CashLabel',Call GetPlayerFunds]];
+ ctrlSetText[3851,Format["$%1",Call GetPlayerFunds]]; //---changes-MrNiceGuy
+
+ _lastFiller = _filler;
+ sleep 0.05;
+
+ //--- Back Button.
+ if (MenuAction == 1) exitWith { //---added-MrNiceGuy
+ MenuAction = -1;
+ closeDialog 0;
+ createDialog "WF_Menu";
+ };
+};
+
+//--- Variables destruction.
+WF_Logic setVariable ['lbChange',nil];
+WF_Logic setVariable ['lbMainAction',nil];
+WF_Logic setVariable ['InventoryClick',nil];
+WF_Gear_Hotkeys = nil;
+primClicked = nil;
+secoClicked = nil;
+sideClicked = nil;
+buyLoadout = nil;
+saveLoadout = nil;
+deleteLoadout = nil;
+
+(findDisplay 16000) displayRemoveEventHandler ['KeyDown',_disp]; \ No newline at end of file
diff --git a/Client/GUI/GUI_GearV.sqf b/Client/GUI/GUI_GearV.sqf
new file mode 100644
index 0000000..ef8114d
--- /dev/null
+++ b/Client/GUI/GUI_GearV.sqf
@@ -0,0 +1,774 @@
+/* Important, use +array if you plan to use Setters */
+
+private ["_inRange","_sideID","_nObjects","_nObject","_unitList","_text","_amount","_val","_val2",
+"_ainumber","_txt","_type","_check","_updateFiller","_list","_id","_changed","_get","_currentMags",
+"_currentRow","_currentData","_currentValue","_currentItem","_skip","_get2","_oldMags","_currentMagazines",
+"_slist","_index","_currentWeapons","_displayInv","_zt","_currentSpecialCost","_u",
+"_currentSpecials","_currentItems","_currentPrimary","_currentPrimaryCost","_currentSecondary",
+"_currentSecondaryCost","_currentSidearm","_currentSidearmCost","_cwep","_x","_tempWeapons",
+"_tempItems","_tempMags","_tempSpecs","_currentMagValue","_currentMag","_currentUnit","_updateUnit",
+"_sideGear","_found","_data","_inventorySlots","_sidearmInventorySlots","_miscItemSlots","_currentCost",
+"_cost","_slot","_upgradeCost","_funds","_template","_templateCosts","_templatePictures","_templateNames",
+"_templateMags","_templateItems","_templateSpecs","_templateUpgrades","_templateAllowed",
+"_cAllow","_temp","_desc","_pict","_upgr","_filler","_mainAction","_inventoryClick","_unitSwap",
+"_actionSE","_lastFiller","_primary","_secondary","_sidearm","_misc","_magazine","_all","_lb",
+"_lbm","_primaryIDC","_secondaryIDC","_sidearmIDC","_specialIDC","_display","_totalWeapons",
+"_fillerIDC","_fillerTypes","_old","_disp","_buildings","_getpp","_isPrimAllowTwo","_getss","_isSecoAllowTwo",
+"_sskip","_query","_tfil","_pallow","_sallow"];
+
+_primary = +(WF_Logic getVariable 'primaryClasses');
+_secondary = +(WF_Logic getVariable 'secondaryClasses');
+_sidearm = +(WF_Logic getVariable 'sidearmClasses');
+_misc = +(WF_Logic getVariable 'miscClasses');
+_magazine = +(WF_Logic getVariable 'magazineClasses');
+
+_template = +(WF_Logic getVariable 'templateClasses');
+_templateCosts = +(WF_Logic getVariable 'templateCosts');
+_templatePictures = +(WF_Logic getVariable 'templatePictures');
+_templateNames = +(WF_Logic getVariable 'templateNames');
+_templateMags = +(WF_Logic getVariable 'templateMags');
+_templateItems = +(WF_Logic getVariable 'templateItems');
+_templateSpecs = +(WF_Logic getVariable 'templateSpecs');
+_templateUpgrades = +(WF_Logic getVariable 'templateUpgrades');
+_templateAllowed = +(WF_Logic getVariable 'templateAllowed');
+
+_all = _primary + _secondary + _sidearm + _misc;
+
+WF_Logic setVariable ['lbChange',false];
+WF_Logic setVariable ['lbMainAction',''];
+WF_Logic setVariable ['InventoryClick',-1];
+WF_Logic setVariable ['WF_GEAR_Swap',false];
+WF_Logic setVariable ['WF_Gear_Action',''];
+
+ctrlShow[3802,false];
+
+primClicked = false;
+secoClicked = false;
+sideClicked = false;
+deleteLoadout = false;
+saveLoadout = false;
+buyLoadout = false;
+_displayInv = false;
+_updateUnit = true;
+_updateFiller = false;
+
+disableSerialization;
+_lb = 3700;
+_lbm = 3701;
+_primaryIDC = 3500;
+_secondaryIDC = 3501;
+_sidearmIDC = 3502;
+_specialIDC = 3535;
+_display = _this select 0;
+
+_totalWeapons = count _primary + count _secondary + count _sidearm;
+
+_fillerIDC = [3400,3401,3402,3403,3404,3405];
+_fillerTypes = ['template','all','primary','secondary','sidearm','misc'];
+_inventorySlots = [];
+_lastFiller = 'nil';
+_id = _fillerTypes find 'primary';
+_list = [];
+_miscItemSlots = [];
+_sidearmInventorySlots = [];
+(_display DisplayCtrl (_fillerIDC select _id)) ctrlSetTextColor [1, 1, 1, 1];
+
+_currentItem = '';
+_currentMags = [];
+_currentData = '';
+_currentValue = '';
+_currentCost = 0;
+_cost = 0;
+
+_currentPrimary = '';
+_currentSecondary = '';
+_currentSidearm = '';
+_currentPrimaryCost = 0;
+_currentSecondaryCost = 0;
+_currentSidearmCost = 0;
+_currentSpecialCost = 0;
+
+_old = '';
+
+_currentWeapons = [];
+_currentSpecials = [];
+_currentItems = [];
+_currentMagazines = [];
+
+_disp = (findDisplay 16000) displayAddEventHandler ['KeyDown','_this Call WF_Gear_Hotkeys'];
+_buygearfrom = missionNamespace getVariable "WFBE_TOWNGEAR";
+
+//--- Fill the available units list.
+_unitList = [];
+_buildings = (sideJoinedText) Call GetSideStructures;
+_i = 0;
+{
+ _check = ['BARRACKSTYPE',_buildings,'WFBE_PURCHASEGEARRANGE' Call GetNamespace,sideJoined,_x] Call BuildingInRange;
+ _inRange = if (isNull _check) then {false} else {true};
+
+ if (!_inRange && _buygearfrom in [1,2,3]) then {
+ _lookfor = switch (_buygearfrom) do { case 1:{WFCAMP}; case 2:{WFDEPOT}; case 3:{WFCAMP + WFDEPOT}; default{[]}};
+ _nObjects = nearestObjects [_x, _lookfor, 25];
+ _nObject = if (count _nObjects > 0) then {_nObjects select 0} else {objNull};
+ if !(isNull _nObject) then {
+ _sideID = _nObject getVariable "sideID";
+ if !(isNil "_sideID") then {
+ if (_sideID == sideID) then {_inRange = true};
+ };
+ };
+ };
+
+ if (_inRange) then {
+ _txt = (_x) Call GetAIDigit;
+ _unitList = _unitList + [_x];
+
+ _type = [typeOf _x, 'displayName'] Call GetConfigInfo;
+ lbAdd [3854,Format["[%1] %2 (%3)",_txt,name _x,_type]];
+
+ if (_currentUnit == _x) then {lbSetCurSel[3854,_i]};
+ _i = _i + 1;
+ };
+} forEach units(group player);
+
+_currentUnit = player;
+
+while {alive player && dialog} do {
+ if (Side player != sideJoined) exitWith {closeDialog 0};
+ if (!dialog) exitWith {};
+
+ //--- Something changed since the last time?
+ _filler = WF_Logic getVariable 'filler';
+ _changed = WF_Logic getVariable 'lbChange';
+ _mainAction = WF_Logic getVariable 'lbMainAction';
+ _inventoryClick = WF_Logic getVariable 'InventoryClick';
+ _unitSwap = WF_Logic getVariable 'WF_GEAR_Swap';
+ _actionSE = WF_Logic getVariable 'WF_Gear_Action';
+
+ //--- Filter Changed.
+ if (_filler != _lastFiller || _updateFiller) then {
+ _updateFiller = false;
+ _list = Call Compile Format ['_%1',_filler];
+ lnbClear _lb;
+ if (_filler != 'template') then {
+ [_list,_filler,_lb] Call UIGearFillList;
+ } else {
+ [_templateCosts,_templateNames,_templatePictures,_templateUpgrades,_templateAllowed,_filler,_lb] Call UIGearFillTemplateList;
+ };
+ _id = _fillerTypes find _filler;
+ {(_display displayCtrl _x) ctrlSetTextColor [0.7490, 0.7490, 0.7490, 0.7]} forEach _fillerIDC;
+ (_display displayCtrl (_fillerIDC select _id)) ctrlSetTextColor [1, 1, 1, 1];
+ //--- Update the list since the filler changed.
+ _changed = true;
+ };
+
+ //--- List Selection Changed.
+ if (_changed) then {
+ WF_Logic setVariable ['lbChange',false];
+ _currentRow = lnbCurSelRow _lb;
+ _currentData = lnbData[_lb,[_currentRow,0]];
+ _currentValue = lnbValue[_lb,[_currentRow,0]];
+ _currentItem = _list select _currentValue;
+ lnbClear _lbm;
+ _get = [];
+
+ /* Get */
+ if (_filler != 'template') then {
+ if (_filler == 'secondary' || _filler == 'all') then {
+ _get = (_currentItem+'_W') Call GetNamespace;
+ if (isNil '_get') then {
+ _get = _currentItem Call GetNamespace;
+ };
+ } else {
+ _get = _currentItem Call GetNamespace;
+ };
+
+ if !(isNil '_get') then {
+ _currentMags = _get select QUERYGEARMAGAZINES;
+ if (typeName _currentMags != 'SCALAR') then {
+ if (count _currentMags > 0) then {
+ [_currentMags,'magazine',_lbm] Call UIGearFillList;
+ };
+ };
+ };
+ };
+ };
+
+ //--- Player have clicked on one of the listbox.
+ if (_mainAction != '') then {
+ switch (_mainAction) do {
+ case 'addWeapon': {
+ _skip = true;
+ _sskip = false;
+ _get = [];
+
+ if (_filler != 'template') then {
+ _get = (_currentItem+"_W") Call GetNamespace;
+ if (isNil '_get') then {
+ _get = _currentItem Call GetNamespace;
+ };
+ };
+
+ if (_filler == 'primary' || _filler == 'secondary' || _filler == 'sidearm' || _filler == 'all') then {
+ if (_currentItem in _misc) then {_skip = false;_currentValue = _currentValue - _totalWeapons};
+ if (_skip) then {
+ _slist = Call Compile Format ['_%1',_currentData];
+ _index = _slist find _currentItem;
+ if (_index != -1) then {
+ if (_filler == 'all') then {
+ if (_currentItem in _primary) then {_currentData = 'primary'} else {
+ if (_currentItem in _secondary) then {_currentData = 'secondary'} else {
+ if (_currentItem in _sidearm) then {_currentData = 'sidearm'};
+ };
+ };
+ };
+
+ /* Handle the extended inventory system if disabled */
+ _isSecoAllowTwo = true;
+ _isPrimAllowTwo = true;
+ if (paramExtendedInventory && (_filler == 'primary' || _filler == 'secondary' || _filler == 'all')) then {
+ _getpp = [];
+ _getss = [];
+
+ _query = if (_currentData == 'primary') then {_currentItem} else {_currentPrimary};
+ if (_query != '') then {
+ _getpp = (_query+"_W") Call GetNamespace;
+ if (isNil '_getpp') then {
+ _getpp = _query Call GetNamespace;
+ };
+ };
+ if (_query != '') then {_isPrimAllowTwo = _getpp select QUERYGEARALLOWTWO};
+
+ _query = if (_currentData == 'secondary') then {_currentItem} else {_currentSecondary};
+ if (_query != '') then {
+ _getss = (_query+"_W") Call GetNamespace;
+ if (isNil '_getss') then {
+ _getss = _query Call GetNamespace;
+ };
+ };
+ if (_query != '') then {_isSecoAllowTwo = _getss select QUERYGEARALLOWTWO};
+
+ if (!_isSecoAllowTwo && !_isPrimAllowTwo) then {
+ _sskip = true;
+ hint parseText (localize 'STR_WF_INFO_Gear_AllowTwo');
+ };
+ };
+
+ if (!_sskip) then {
+ Call Compile Format ['_old = _current%1;_currentWeapons = _currentWeapons - [_current%1]; _current%1Cost = %2; _current%1 = "%3";ctrlSetText[_%1IDC,"%4"]',_currentData,_get select QUERYGEARCOST,_currentItem,_get select QUERYGEARPICTURE];
+ //--- New Magazines.
+ _currentMags = _get select QUERYGEARMAGAZINES;
+ //--- Old Magazines.
+ _get2 = (_old+"_W") Call GetNamespace;
+ if (isNil '_get2') then {
+ _get2 = _old Call GetNamespace;
+ };
+ if !(isNil '_get2') then {
+ _oldMags = _get2 select QUERYGEARMAGAZINES;
+ _use = "";
+ _currentUpgrades = (sideJoinedText) Call GetSideUpgrades;
+ {
+ _upgr = (missionNamespace getVariable _x) select QUERYGEARUPGRADE;
+ if ((_currentUpgrades select 13) >= _upgr) exitWith {_use = _x};
+ } forEach _currentMags;
+ _currentMagazines = [_use,_oldMags,_currentMagazines] Call ReplaceInventoryAmmo;
+ };
+ };
+ if !(isNil '_get2') then {
+ _oldMags = _get2 select QUERYGEARMAGAZINES;
+ _currentMagazines = [_currentMags select 0,_oldMags,_currentMagazines] Call ReplaceInventoryAmmo;
+ };
+ };
+ };
+ if (!_sskip) then {
+ _currentWeapons = _currentWeapons + [_currentItem];
+ _displayInv = true;
+ };
+ };
+ };
+ if (_filler == 'misc' || !_skip) then {
+ _type = _get select QUERYGEARTYPE;
+ if (_type == 'CfgMagazines') then {
+ _currentMagazines = [_currentMagazines,_currentItem] Call UIAddMagazine;
+ _displayInv = true;
+ };
+ if (_type == 'Special' && count _currentSpecials < 3 && !(_currentItem in _currentSpecials)) then {
+ _currentSpecials = _currentSpecials + [_currentItem];
+ _currentSpecialCost = 0;
+ _u = 0;
+ {
+ _zt = _x Call GetNamespace;
+ ctrlSetText[_specialIDC + _u,_zt select QUERYGEARPICTURE];
+ _currentSpecialCost = _currentSpecialCost + (_zt select QUERYGEARCOST);
+ _u = _u + 1;
+ } forEach _currentSpecials;
+ _displayInv = true;
+ };
+ if (_type == 'Item') then {
+ if (!(_currentItem in _currentItems)) then {
+ _currentItems = [_currentItems,_currentItem] Call UIAddItem;
+ _displayInv = true;
+ };
+ };
+ };
+ /* TODO */
+ if (_filler == 'template') then {
+ _tempWeapons = _template select _currentValue;
+ _tempItems = _templateItems select _currentValue;
+ _tempMags = _templateMags select _currentValue;
+ _tempSpecs = _templateSpecs select _currentValue;
+ _currentPrimary = '';
+ _currentSecondary = '';
+ _currentSidearm = '';
+ _currentPrimaryCost = 0;
+ _currentSecondaryCost = 0;
+ _currentSidearmCost = 0;
+ _currentWeapons = [];
+ _currentItems = _tempItems;
+ {
+ _cwep = _x;
+ _get = (_x+"_W") Call GetNamespace;
+ if (isNil '_get') then {
+ _get = _x Call GetNamespace;
+ };
+
+ if (({_x == _cwep} count _primary) > 0) then {_currentWeapons = _currentWeapons + [_x];_currentPrimary = _x;_currentPrimaryCost = _get select QUERYGEARCOST;ctrlSetText[_primaryIDC,_get select QUERYGEARPICTURE]} else {
+ if (({_x == _cwep} count _secondary) > 0) then {_currentWeapons = _currentWeapons + [_x];_currentSecondary = _x;_currentSecondaryCost = _get select QUERYGEARCOST;ctrlSetText[_secondaryIDC,_get select QUERYGEARPICTURE]} else {
+ if (({_x == _cwep} count _sidearm) > 0) then {_currentWeapons = _currentWeapons + [_x];_currentSidearm = _x;_currentSidearmCost = _get select QUERYGEARCOST;ctrlSetText[_sidearmIDC,_get select QUERYGEARPICTURE]};
+ };
+ };
+ } forEach _tempWeapons;
+ if (_currentPrimary == '') then {ctrlSetText [_primaryIDC,'\ca\ui\data\ui_gear_gun_gs.paa']};
+ if (_currentSecondary == '') then {ctrlSetText [_secondaryIDC,'\ca\ui\data\ui_gear_sec_gs.paa']};
+ if (_currentSidearm == '') then {ctrlSetText [_sidearmIDC,'\ca\ui\data\ui_gear_hgun_gs.paa']};
+ _currentMagazines = _tempMags;
+ _currentSpecials = _tempSpecs;
+ _currentSpecialCost = 0;
+ for [{_x = 0},{_x < 2},{_x = _x + 1}] do {ctrlSetText[_specialIDC + _x,'\Ca\UI\Data\ui_gear_eq_gs.paa']};
+ _u = 0;
+ {
+ _get = _x Call GetNamespace;
+ _currentSpecialCost = _currentSpecialCost + (_get select QUERYGEARCOST);
+ ctrlSetText[_specialIDC + _u,_get select QUERYGEARPICTURE];
+ _u = _u + 1;
+ } forEach _currentSpecials;
+ _displayInv = true;
+ };
+ };
+
+ case 'addMagazine': {
+ _currentMagValue = lnbValue[_lbm,[lnbCurSelRow _lbm,0]];
+ _currentMag = _currentMags select _currentMagValue;
+ _currentMagazines = [_currentMagazines,_currentMag] Call UIAddMagazine;
+ _displayInv = true;
+ };
+ };
+ WF_Logic setVariable ['lbMainAction',''];
+ };
+
+ //--- Remove a weapon by clicking on it.
+ if (primClicked) then {primClicked = false;if (_currentPrimary != '') then {ctrlSetText [_primaryIDC,'\ca\ui\data\ui_gear_gun_gs.paa'];_index = _primary find _currentPrimary;_currentPrimaryCost = 0;_currentWeapons = _currentWeapons - [_currentPrimary];_currentPrimary = '';_displayInv = true}};
+ if (secoClicked) then {secoClicked = false;if (_currentSecondary != '') then {ctrlSetText [_secondaryIDC,'\ca\ui\data\ui_gear_sec_gs.paa'];_index = _secondary find _currentSecondary;_currentSecondaryCost = 0;_currentWeapons = _currentWeapons - [_currentSecondary];_currentSecondary = '';_displayInv = true}};
+ if (sideClicked) then {sideClicked = false;if (_currentSidearm != '') then {ctrlSetText [_sidearmIDC,'\ca\ui\data\ui_gear_hgun_gs.paa'];_index = _sidearm find _currentSidearm;_currentSidearmCost = 0;_currentWeapons = _currentWeapons - [_currentSidearm];_currentSidearm = '';_displayInv = true}};
+
+ if (_unitSwap) then {
+ WF_Logic setVariable ['WF_GEAR_Swap',false];
+ if (count _unitList > 0) then {_currentUnit = _unitList select (lbCurSel 3854)} else {_currentUnit = player};
+ _updateUnit = true;
+ };
+
+ if (_updateUnit) then {
+ _currentWeapons = weapons _currentUnit;
+ _currentSpecials = [];
+ _currentItems = [];
+ _currentMagazines = magazines _currentUnit;
+
+ _currentPrimary = '';
+ _currentSecondary = '';
+ _currentSidearm = '';
+
+ _sideGear = _currentWeapons;
+ {if (!(_x in _all)) then {_sideGear = _sideGear - [_x]}} forEach _currentWeapons;
+ _currentWeapons = _sideGear;
+
+ _sideGear = _currentMagazines;
+ {if (!(_x in _misc) && !(_x in _magazine)) then {_sideGear = _sideGear - [_x]}} forEach _currentMagazines;
+ _currentMagazines = _sideGear;
+
+ _currentPrimaryCost = 0;
+ _currentSecondaryCost = 0;
+ _currentSidearmCost = 0;
+ _currentSpecialCost = 0;
+
+ ctrlSetText [_primaryIDC,'\ca\ui\data\ui_gear_gun_gs.paa'];
+ ctrlSetText [_secondaryIDC,'\ca\ui\data\ui_gear_sec_gs.paa'];
+ ctrlSetText [_sidearmIDC,'\ca\ui\data\ui_gear_hgun_gs.paa'];
+ ctrlSetText [3535,'\Ca\UI\Data\ui_gear_eq_gs.paa'];
+ ctrlSetText [3536,'\Ca\UI\Data\ui_gear_eq_gs.paa'];
+
+ {
+ _cwep = _x;
+ _get = (_cwep+"_W") Call GetNamespace;
+ if (isNil '_get') then {
+ _get = _cwep Call GetNamespace;
+ };
+
+ if !(isNil '_get') then {
+ _found = false;
+ _index = {_x == _cwep} count _primary;
+ if (_index > 0) then {_currentPrimary = _cwep;_currentPrimaryCost = _get select QUERYGEARCOST;ctrlSetText[_primaryIDC,_get select QUERYGEARPICTURE];_found = true};
+ if !(_found) then {
+ _index = {_x == _cwep} count _secondary;
+ if (_index > 0) then {_currentSecondary = _cwep;_currentSecondaryCost = _get select QUERYGEARCOST;ctrlSetText[_secondaryIDC,_get select QUERYGEARPICTURE];_found = true};
+ if !(_found) then {
+ _index = {_x == _cwep} count _sidearm;
+ if (_index > 0) then {_currentSidearm = _cwep;_currentSidearmCost = _get select QUERYGEARCOST;ctrlSetText[_sidearmIDC,_get select QUERYGEARPICTURE];_found = true};
+ if !(_found) then {
+ _index = {_x == _cwep} count _misc;
+ if (_index > 0) then {
+ switch (_get select QUERYGEARTYPE) do {
+ case 'Special': {
+ _currentSpecials = _currentSpecials + [_x];
+ _currentSpecialCost = _currentSpecialCost + (_get select QUERYGEARCOST);
+ _u = 0;
+ {
+ _zt = _x Call GetNamespace;
+ ctrlSetText[_specialIDC + _u,_zt select QUERYGEARPICTURE];
+ _u = _u + 1;
+ } forEach _currentSpecials;
+ };
+ case 'Item': {
+ _currentItems = _currentItems + [_x];
+ };
+ };
+ };
+ };
+ };
+ };
+ };
+ } forEach _currentWeapons;
+
+ _currentWeapons = _currentWeapons - _misc;
+ _data = [_currentMagazines,_currentItems] Call DisplayInventory;
+ _inventorySlots = _data select 0;
+ _sidearmInventorySlots = _data select 1;
+ _miscItemSlots = _data select 2;
+ _currentCost = (_data select 3) + _currentPrimaryCost + _currentSecondaryCost + _currentSidearmCost + _currentSpecialCost;
+ _cost = 0;
+ _updateUnit = false;
+ };
+
+ //--- Remove a magazine by clicking on it.
+ if (_inventoryClick != -1) then {
+ //--- Main Inventory.
+ if (_inventoryClick > 3502 && _inventoryClick < 3515) then {
+ _slot = _inventoryClick - 3503;
+ if (_slot < Count _inventorySlots) then {
+ _index = _currentMagazines find (_inventorySlots select _slot);
+ if (_index != -1) then {_currentMagazines = [_currentMagazines,_index] Call ReplaceArray};
+ };
+ };
+ //--- Handgun Inventory
+ if (_inventoryClick > 3514 && _inventoryClick < 3523) then {
+ _slot = _inventoryClick - 3515;
+ if (_slot < Count _sidearmInventorySlots) then {
+ _index = _currentMagazines find (_sidearmInventorySlots select _slot);
+ if (_index != -1) then {_currentMagazines = [_currentMagazines,_index] Call ReplaceArray};
+ };
+ };
+ //--- Misc Inventory
+ if (_inventoryClick > 3522 && _inventoryClick < 3535) then {
+ _slot = _inventoryClick - 3523;
+ if (_slot < Count _miscItemSlots) then {
+ _index = _currentItems find (_miscItemSlots select _slot);
+ if (_index != -1) then {_currentItems = [_currentItems,_index] Call ReplaceArray};
+ };
+ };
+ //--- Remove a special item.
+ if (_inventoryClick == 3535 || _inventoryClick == 3536) then {
+ _slot = _inventoryClick - 3535;
+ if (_slot < Count _currentSpecials) then {
+ _currentSpecialCost = 0;
+ _currentSpecials = _currentSpecials - [_currentSpecials select _slot];
+ for [{_x = 0},{_x < 2},{_x = _x + 1}] do {ctrlSetText[_specialIDC + _x,'\Ca\UI\Data\ui_gear_eq_gs.paa']};
+ _u = 0;
+ {
+ _get = _x Call GetNamespace;
+ _currentSpecialCost = _currentSpecialCost + (_get select QUERYGEARCOST);
+ ctrlSetText[_specialIDC + _u,_get select QUERYGEARPICTURE];
+ _u = _u + 1;
+ } forEach _currentSpecials;
+ };
+ };
+ WF_Logic setVariable ['InventoryClick',-1];
+ _displayInv = true;
+ };
+
+ //--- Custom UA.
+ if (_actionSE != '') then {
+ switch (_actionSE) do {
+ case 'reload': {
+ if !(isNil 'respawnWeapons') then {
+ _currentPrimary = '';
+ _currentSecondary = '';
+ _currentSidearm = '';
+ _currentPrimaryCost = 0;
+ _currentSecondaryCost = 0;
+ _currentSidearmCost = 0;
+ _currentWeapons = [];
+ _currentItems = [];
+ _currentSpecials = [];
+ {
+ _cwep = _x;
+ _get = (_cwep+"_W") Call GetNamespace;
+ if (isNil '_get') then {
+ _get = _cwep Call GetNamespace;
+ };
+
+ if !(isNil '_get') then {
+ _index = {_x == _cwep} count _primary;
+ if (_index > 0) then {_currentWeapons = _currentWeapons + [_x];_currentPrimary = _x;_currentPrimaryCost = _get select QUERYGEARCOST;ctrlSetText[_primaryIDC,_get select QUERYGEARPICTURE]} else {
+ _index = {_x == _cwep} count _secondary;
+ if (_index > 0) then {_currentWeapons = _currentWeapons + [_x];_currentSecondary = _x;_currentSecondaryCost = _get select QUERYGEARCOST;ctrlSetText[_secondaryIDC,_get select QUERYGEARPICTURE]} else {
+ _index = {_x == _cwep} count _sidearm;
+ if (_index > 0) then {_currentWeapons = _currentWeapons + [_x];_currentSidearm = _x;_currentSidearmCost = _get select QUERYGEARCOST;ctrlSetText[_sidearmIDC,_get select QUERYGEARPICTURE]} else {
+ _index = {_x == _cwep} count _misc;
+ if (_index > 0) then {
+ switch (_get select QUERYGEARTYPE) do {
+ case 'Special': {
+ _currentSpecials = _currentSpecials + [_x];
+ };
+ case 'Item': {
+ _currentItems = _currentItems + [_x];
+ };
+ };
+ };
+ };
+ };
+ };
+ };
+ } forEach respawnWeapons;
+
+ if (_currentPrimary == '') then {ctrlSetText [_primaryIDC,'\ca\ui\data\ui_gear_gun_gs.paa']};
+ if (_currentSecondary == '') then {ctrlSetText [_secondaryIDC,'\ca\ui\data\ui_gear_sec_gs.paa']};
+ if (_currentSidearm == '') then {ctrlSetText [_sidearmIDC,'\ca\ui\data\ui_gear_hgun_gs.paa']};
+
+ _currentMagazines = respawnAmmo;
+ _currentSpecialCost = 0;
+
+ for [{_x = 0},{_x < 2},{_x = _x + 1}] do {ctrlSetText[_specialIDC + _x,'\Ca\UI\Data\ui_gear_eq_gs.paa']};
+
+ _u = 0;
+ {
+ _get = _x Call GetNamespace;
+ _currentSpecialCost = _currentSpecialCost + (_get select QUERYGEARCOST);
+ ctrlSetText[_specialIDC + _u,_get select QUERYGEARPICTURE];
+ _u = _u + 1;
+ } forEach _currentSpecials;
+
+ _displayInv = true;
+ };
+ };
+
+ case 'clear': {
+ _currentPrimary = '';
+ _currentSecondary = '';
+ _currentSidearm = '';
+ _currentPrimaryCost = 0;
+ _currentSecondaryCost = 0;
+ _currentSidearmCost = 0;
+ _currentSpecialCost = 0;
+ _currentWeapons = [];
+ _currentItems = [];
+ _currentSpecials = [];
+ _currentMagazines = [];
+ ctrlSetText [_primaryIDC,'\ca\ui\data\ui_gear_gun_gs.paa'];
+ ctrlSetText [_secondaryIDC,'\ca\ui\data\ui_gear_sec_gs.paa'];
+ ctrlSetText [_sidearmIDC,'\ca\ui\data\ui_gear_hgun_gs.paa'];
+ for [{_x = 0},{_x < 2},{_x = _x + 1}] do {ctrlSetText[_specialIDC + _x,'\Ca\UI\Data\ui_gear_eq_gs.paa']};
+ _displayInv = true;
+ };
+ };
+ WF_Logic setVariable ['WF_Gear_Action',''];
+ };
+
+ //--- Show inventory (Icons).
+ if (_displayInv) then {
+ _displayInv = false;
+ _upgradeCost = _currentSpecialCost;
+ _data = [_currentMagazines,_currentItems] Call DisplayInventory;
+ _inventorySlots = _data select 0;
+ _sidearmInventorySlots = _data select 1;
+ _miscItemSlots = _data select 2;
+ _upgradeCost = _upgradeCost + (_data select 3);
+ if (_currentPrimary != '') then {_upgradeCost = _upgradeCost + _currentPrimaryCost};
+ if (_currentSecondary != '') then {_upgradeCost = _upgradeCost + _currentSecondaryCost};
+ if (_currentSidearm != '') then {_upgradeCost = _upgradeCost + _currentSidearmCost};
+ _cost = _upgradeCost - _currentCost;
+ };
+
+ //--- Buy a loadout.
+ if (buyLoadout) then {
+ buyLoadout = false;
+ _funds = Call GetPlayerFunds;
+ if (_funds >= _cost) then {
+ (-_cost) Call ChangePlayerFunds;
+ //--- Player's respawn loadout.
+ if (_currentUnit == player && (vehicleVarName player == clientIdentification)) then {
+ respawnWeapons = _currentWeapons + _currentSpecials + _currentItems;
+ respawnAmmo = _currentMagazines;
+ };
+ [_currentUnit,(_currentWeapons + _currentSpecials + _currentItems),_currentMagazines] Call EquipLoadout;
+ _data = [_currentMagazines,_currentItems] Call DisplayInventory;
+ _inventorySlots = _data select 0;
+ _sidearmInventorySlots = _data select 1;
+ _miscItemSlots = _data select 2;
+ _currentCost = (_data select 3) + _currentPrimaryCost + _currentSecondaryCost + _currentSidearmCost + _currentSpecialCost;
+ respawnGearCost = _currentCost;
+ _cost = 0;
+ } else {
+ hint parseText(Format [localize "STR_WF_INFO_Funds_Missing_Gear",_cost - _funds]);
+ };
+ };
+
+ //--- Remove an existing template.
+ if (deleteLoadout) then {
+ deleteLoadout = false;
+ //--- Behave only on template filler.
+ if (_filler == 'template') then {
+ _currentRow = lnbCurSelRow _lb;
+ _currentValue = lnbValue[_lb,[_currentRow,0]];
+ //--- Update the templates.
+ _template set [_currentValue, "DELETE"];
+ _template = _template - ["DELETE"];
+ WF_Logic setVariable["templateClasses",_template];
+ _templateCosts set [_currentValue, "DELETE"];
+ _templateCosts = _templateCosts - ["DELETE"];
+ WF_Logic setVariable["templateCosts",_templateCosts];
+ _templatePictures set [_currentValue, "DELETE"];
+ _templatePictures = _templatePictures - ["DELETE"];
+ WF_Logic setVariable["templatePictures",_templatePictures];
+ _templateNames set [_currentValue, "DELETE"];
+ _templateNames = _templateNames - ["DELETE"];
+ WF_Logic setVariable["templateNames",_templateNames];
+ _templateMags set [_currentValue, "DELETE"];
+ _templateMags = _templateMags - ["DELETE"];
+ WF_Logic setVariable["templateMags",_templateMags];
+ _templateItems set [_currentValue, "DELETE"];
+ _templateItems = _templateItems - ["DELETE"];
+ WF_Logic setVariable["templateItems",_templateItems];
+ _templateSpecs set [_currentValue, "DELETE"];
+ _templateSpecs = _templateSpecs - ["DELETE"];
+ WF_Logic setVariable["templateSpecs",_templateSpecs];
+ _templateUpgrades set [_currentValue, "DELETE"];
+ _templateUpgrades = _templateUpgrades - ["DELETE"];
+ WF_Logic setVariable["templateUpgrades",_templateUpgrades];
+ _templateAllowed set [_currentValue, "DELETE"];
+ _templateAllowed = _templateAllowed - ["DELETE"];
+ WF_Logic setVariable["templateAllowed",_templateAllowed];
+ _updateFiller = true;
+ };
+ };
+
+ //--- TODO
+ if (saveLoadout) then {
+ saveLoadout = false;
+ //--- Behave only on template filler.
+ if (_filler == 'template') then {
+ //--- Update the templates.
+ _desc = '';
+ _pict = '';
+ _temp = [];
+ _cAllow = true;
+ _upgr = 0;
+ _pallow = true;
+ _sallow = true;
+
+ if (_currentPrimary != '') then {
+ _get = _currentPrimary Call GetNamespace;
+ _temp = _temp + [_currentPrimary];
+ _desc = _desc + (_get select QUERYGEARLABEL);
+ _pict = (_get select QUERYGEARPICTURE);
+ if !(_get select QUERYGEARALLOWED) then {_cAllow = false};
+ _upgr = _get select QUERYGEARUPGRADE;
+ _pallow = _get select QUERYGEARALLOWTWO;
+ };
+ if (_currentSecondary != '') then {
+ _get = (_currentSecondary+"_W") Call GetNamespace;
+ if (isNil '_get') then {
+ _get = _currentSecondary Call GetNamespace;
+ };
+ _temp = _temp + [_currentSecondary];
+ if (_desc != '') then { _desc = _desc + "/"};
+ //--- Needless to check if the primary is prohibed.
+ _desc = _desc + (_get select QUERYGEARLABEL);
+ if (_pict == '') then {_pict = _get select QUERYGEARPICTURE};
+ if (_cAllow) then {if !(_get select QUERYGEARALLOWED) then {_cAllow = false}};
+ if ((_get select QUERYGEARUPGRADE) > _upgr) then {_upgr = (_get select QUERYGEARUPGRADE)};
+ _sallow = _get select QUERYGEARALLOWTWO;
+ };
+ if (_currentSidearm != '') then {
+ _get = _currentSidearm Call GetNamespace;
+ _temp = _temp + [_currentSidearm];
+ if (_desc != '') then { _desc = _desc + "/"};
+ //--- Needless to check if the secondary is prohibed.
+ _desc = _desc + (_get select QUERYGEARLABEL);
+ if (_pict == '') then {_pict = _get select QUERYGEARPICTURE};
+ if (_cAllow) then {if !(_get select QUERYGEARALLOWED) then {_cAllow = false}};
+ if ((_get select QUERYGEARUPGRADE) > _upgr) then {_upgr = (_get select QUERYGEARUPGRADE)};
+ };
+ if (_pallow || _sallow || !paramExtendedInventory) then {
+ _template = _template + [_temp];
+ WF_Logic setVariable["templateClasses",_template];
+ _templateCosts = _templateCosts + [(_cost + _currentCost)];
+ WF_Logic setVariable["templateCosts",_templateCosts];
+ _templatePictures = _templatePictures + [_pict];
+ WF_Logic setVariable["templatePictures",_templatePictures];
+ _templateNames = _templateNames + [_desc];
+ WF_Logic setVariable["templateNames",_templateNames];
+ _templateMags = _templateMags + [_currentMagazines];
+ WF_Logic setVariable["templateMags",_templateMags];
+ _templateItems = _templateItems + [_currentItems];
+ WF_Logic setVariable["templateItems",_templateItems];
+ _templateSpecs = _templateSpecs + [_currentSpecials];
+ WF_Logic setVariable["templateSpecs",_templateSpecs];
+ _templateUpgrades = _templateUpgrades + [_upgr];
+ WF_Logic setVariable["templateUpgrades",_templateUpgrades];
+ _templateAllowed = _templateAllowed + [_cAllow];
+ WF_Logic setVariable["templateAllowed",_templateAllowed];
+ _updateFiller = true;
+ } else {
+ hint parseText (localize 'STR_WF_INFO_Gear_AllowTwo');
+ };
+ };
+ };
+
+ //--- Loadout Cost.
+ ctrlSetText[3850,Format[localize 'STR_WF_GEAR_Cost',_cost]];
+ //--- Player's Cash.
+ //ctrlSetText[3851,Format["%1 $ %2.",localize 'STR_WF_GEAR_CashLabel',Call GetPlayerFunds]];
+ ctrlSetText[3851,Format["$%1",Call GetPlayerFunds]]; //---changed-MrNiceGuy
+
+ _lastFiller = _filler;
+ sleep 0.05;
+
+ //--- Back Button.
+ if (MenuAction == 1) exitWith { //---added-MrNiceGuy
+ MenuAction = -1;
+ closeDialog 0;
+ createDialog "WF_Menu";
+ };
+};
+
+//--- Variables destruction.
+WF_Logic setVariable ['lbChange',nil];
+WF_Logic setVariable ['lbMainAction',nil];
+WF_Logic setVariable ['InventoryClick',nil];
+WF_Gear_Hotkeys = nil;
+primClicked = nil;
+secoClicked = nil;
+sideClicked = nil;
+buyLoadout = nil;
+saveLoadout = nil;
+deleteLoadout = nil;
+
+(findDisplay 16000) displayRemoveEventHandler ['KeyDown',_disp]; \ No newline at end of file
diff --git a/Client/GUI/GUI_Menu.sqf b/Client/GUI/GUI_Menu.sqf
new file mode 100644
index 0000000..c21ad4a
--- /dev/null
+++ b/Client/GUI/GUI_Menu.sqf
@@ -0,0 +1,161 @@
+
+private ["_enable","_exited","_skip","_voteTime","_timer"];
+MenuAction = -1;
+_exited = false;
+_timer = 3;
+
+WFBE_ForceUpdate = true;
+
+while {alive player && dialog} do {
+ //--- Build Units.
+ _enable = false;
+ if (barracksInRange || lightInRange || heavyInRange || aircraftInRange || hangarInRange || depotInRange) then {_enable = true};
+ ctrlEnable [11001,_enable];
+ ctrlEnable [11002,gearInRange];
+
+ _timer = _timer + 0.1;
+
+ sleep 0.1;
+
+ if (Side player != sideJoined) exitWith {closeDialog 0};
+ if (!dialog || _exited) exitWith {};
+
+ //--- Buy Units.
+ if (MenuAction == 1) then {
+ MenuAction = -1;
+ closeDialog 0;
+ createDialog "RscMenu_BuyUnits";
+ _exited = true;
+ };
+
+ //--- Buy Gear.
+ if (MenuAction == 2) then {
+ MenuAction = -1;
+ CloseDialog 0;
+ CreateDialog "RscAceGear";
+ _exited = true;
+ };
+
+ //--- Team Menu.
+ if (MenuAction == 3) then {
+ MenuAction = -1;
+ closeDialog 0;
+ createDialog "RscMenu_Team";
+ _exited = true;
+ };
+
+ //--- Voting Menu.
+ if (MenuAction == 4) then {
+ MenuAction = -1;
+ _skip = false;
+ _voteTime = WF_Logic getVariable Format["%1CommanderVoteTime",sideJoinedText];
+ if (_voteTime <= 0) then {_skip = true};
+ if (!_skip) then {
+ CloseDialog 0;
+ CreateDialog "RscMenu_Voting";
+ if !(_skip) exitWith {};
+ };
+ WFBE_RequestCommanderVote = ['SRVFNCREQUESTCOMMANDERVOTE',sideJoined];
+ publicVariable 'WFBE_RequestCommanderVote';
+ if (isHostedServer) then {['SRVFNCREQUESTCOMMANDERVOTE',sideJoined] Spawn HandleSPVF};
+ voted = true;
+ waitUntil {((WF_Logic getVariable Format ["%1CommanderVoteTime",sideJoinedText])>0) || !dialog || !alive player};
+ if (!alive player || !dialog) exitWith {_exited = true};
+ closeDialog 0;
+ createDialog "RscMenu_Voting";
+ _exited = true;
+ };
+
+ //--- Unflip Vehicle.
+ if (MenuAction == 10) then { //added-MrNiceGuy
+ MenuAction = -1;
+ _vehicle = vehicle player;
+ if (player != _vehicle) then {
+ if (getPos _vehicle select 2 > 3 && !surfaceIsWater (getPos _x)) then {
+ [_vehicle, getPos _vehicle, 15] Call PlaceSafe;
+ } else {
+ _vehicle setPos [getPos _vehicle select 0, getPos _vehicle select 1, 0.5];
+ _vehicle setVelocity [0,0,-0.5];
+ };
+ };
+ if (player == _vehicle) then {
+ _objects = player nearEntities[["Car","Motorcycle","Tank"],10];
+ if (count _objects > 0) then {
+ {
+ if (getPos _x select 2 > 3 && !surfaceIsWater (getPos _x)) then {
+ [_x, getPos _x, 15] Call PlaceSafe;
+ } else {
+ _x setPos [getPos _x select 0, getPos _x select 1, 0.5];
+ _x setVelocity [0,0,-0.5];
+ };
+ } forEach _objects;
+ };
+ };
+ };
+
+ //--- Headbug Fix.
+ if (MenuAction == 11) then { //added-MrNiceGuy
+ MenuAction = -1;
+ closeDialog 0;
+ titleCut["","BLACK FADED",0];
+ _pos = position player;
+ _vehi = "Lada1" createVehicle [0,0,0];
+ player moveInCargo _vehi;
+ deleteVehicle _vehi;
+ player setPos _pos;
+ titleCut["","BLACK IN",5];
+ };
+
+ //--- Display Parameters.
+ if (MenuAction == 12) exitWith { //added-MrNiceGuy
+ MenuAction = -1;
+ closeDialog 0;
+ createDialog "RscDisplay_Parameters";
+ };
+
+ //--- Uptime.
+ _uptime = Call GetTime; //added-MrNiceGuy
+ ctrlSetText [11015,Format[localize 'STR_WF_MAIN_Uptime',_uptime select 0,_uptime select 1,_uptime select 2, _uptime select 3]];
+
+ _enable = false; //added-MrNiceGuy
+ if (!isNull(commanderTeam)) then {if (commanderTeam == group player) then {_enable = true}};
+ ctrlEnable [11005,_enable]; //--- Team Orders
+ ctrlEnable [11008,_enable]; //--- Commander Menu
+ ctrlEnable [11006,commandInRange]; //--- Special Menu
+ ctrlEnable [11007,commandInRange]; //--- Upgrade Menu
+
+ //--- Command Menu.
+ if (MenuAction == 5) exitWith { //added-MrNiceGuy
+ MenuAction = -1;
+ closeDialog 0;
+ createDialog "RscMenu_Command";
+ };
+
+ //--- Tactical Menu.
+ if (MenuAction == 6) exitWith { //added-MrNiceGuy
+ MenuAction = -1;
+ closeDialog 0;
+ createDialog "RscMenu_Tactical";
+ };
+
+ //--- Upgrade Menu.
+ if (MenuAction == 7) exitWith { //added-MrNiceGuy
+ MenuAction = -1;
+ closeDialog 0;
+ createDialog "RscMenu_Upgrade";
+ };
+
+ //--- Economy Menu.
+ if (MenuAction == 8) exitWith { //added-MrNiceGuy
+ MenuAction = -1;
+ closeDialog 0;
+ createDialog "RscMenu_Economy";
+ };
+
+ //--- Service Menu.
+ if (MenuAction == 9) exitWith { //added-MrNiceGuy
+ MenuAction = -1;
+ closeDialog 0;
+ createDialog "RscMenu_Service";
+ };
+}; \ No newline at end of file
diff --git a/Client/GUI/GUI_Menu_BuyUnits.sqf b/Client/GUI/GUI_Menu_BuyUnits.sqf
new file mode 100644
index 0000000..75e367f
--- /dev/null
+++ b/Client/GUI/GUI_Menu_BuyUnits.sqf
@@ -0,0 +1,466 @@
+disableSerialization;
+
+//--- Init.
+MenuAction = -1;
+
+_listUnits = [];
+
+_closest = objNull;
+_commander = false;
+_extracrew = false;
+_countAlive = 0;
+_currentCost = 0;
+_currentIDC = 0;
+_disabledColor = [0.7961, 0.8000, 0.7961, 1];
+_display = _this select 0;
+_driver = false;
+_enabledColor = [0, 1, 0, 1];
+_enabledColor2 = [1, 0, 0, 1]; //---NEW (LOCK)
+_gunner = false;
+_IDCLock = 12023;
+_IDCS = [12005,12006,12007,12008,12020,12021];
+_IDCSVehi = [12012,12013,12014,12041];
+_isInfantry = false;
+_isLocked = true;
+_lastCheck = 0;
+_lastSel = -1;
+_lastType = 'nil';
+_listBox = 12001;
+_comboFaction = 12026;
+_map = _display displayCtrl 12015;
+_sorted = [];
+_type = 'nil';
+_update = true;
+_updateDetails = true;
+_updateList = true;
+_updateMap = true;
+_val = 0;
+_mbu = 'WFBE_MAXGROUPSIZE' Call GetNamespace;
+
+ctrlSetText[12025,localize 'STR_WF_UNITS_FactionChoiceLabel' + ":"]; // changed-MrNiceGuy
+
+//--- Get the closest Factory Type in range.
+_break = false;
+_status = [barracksInRange,lightInRange,heavyInRange,aircraftInRange,depotInRange,hangarInRange];
+_statusLabel = ['Barracks','Light','Heavy','Aircraft','Depot','Airport'];
+_statusVals = [0,1,2,3,4,3];
+for [{_i = 0},{(_i < 6) && !_break},{_i = _i + 1}] do {
+ if (_status select _i) then {
+ _break = true;
+ _currentIDC = _IDCS select _i;
+ _type = _statusLabel select _i;
+ _val = _statusVals select _i;
+ };
+};
+
+if (_type == 'nil') exitWith {closeDialog 0};
+
+//--- Destroy local variables.
+_break = nil;
+_status = nil;
+_statusLabel = nil;
+_statusVals = nil;
+
+//--- Enable the current IDC.
+_IDCS = _IDCS - [_currentIDC];
+{
+ _con = _display DisplayCtrl _x;
+ _con ctrlSetTextColor [0.4, 0.4, 0.4, 1];
+} forEach _IDCS;
+
+//--- Loop.
+while {alive player && dialog} do {
+ //--- Nothing in range? exit!.
+ if (!barracksInRange && !lightInRange && !heavyInRange && !aircraftInRange && !hangarInRange && !depotInRange) exitWith {closeDialog 0};
+ if (side player != sideJoined || !dialog) exitWith {closeDialog 0};
+
+ //--- Purchase.
+ if (MenuAction == 1) then {
+ MenuAction = -1;
+ _currentRow = lnbCurSelRow _listBox;
+ _currentValue = lnbValue[_listBox,[_currentRow,0]];
+ _unit = _listUnits select _currentValue;
+ _currentUnit = _unit Call GetNamespace;
+ _currentCost = _currentUnit select QUERYUNITPRICE;
+ _cpt = 1;
+ _isInfantry = if (_unit isKindOf 'Man') then {true} else {false};
+ if !(_isInfantry) then {
+ _extra = 0;
+ if (_driver) then {_extra = _extra + 1};
+ if (_gunner) then {_extra = _extra + 1};
+ if (_commander) then {_extra = _extra + 1};
+ if (_extracrew) then {_extra = _extra + ((_currentUnit select QUERYUNITCREW) select 3)};
+ _currentCost = _currentCost + (('WFBE_CREWCOST' Call GetNamespace) * _extra);
+ };
+ if ((_currentRow) != -1) then {
+ _funds = Call GetPlayerFunds;
+ _skip = false;
+ if (_funds < _currentCost) then {_skip = true;hint parseText(Format[localize 'STR_WF_INFO_Funds_Missing',_currentCost - _funds,_currentUnit select QUERYUNITLABEL])};
+ //--- Make sure that we own all camps before being able to purchase infantry.
+ if (_type == "Depot" && _isInfantry) then {
+ _totalCamps = _closest Call GetTotalCamps;
+ _campsSide = [_closest,sideJoined] Call GetTotalCampsOnSide;
+ if (_totalCamps != _campsSide) then {_skip = true; hint parseText(localize 'STR_WF_INFO_Camps_Purchase')};
+ };
+ if !(_skip) then {
+ _size = Count ((Units (group player)) Call GetLiveUnits);
+ //--- Get the infantry limit based off the infantry upgrade.
+ _realSize = ((sideJoined) Call GetSideUpgrades) select 0;
+ switch (_realSize) do {
+ case 0: {_realSize = round(_mbu / 4)};
+ case 1: {_realSize = round(_mbu / 4)*2};
+ case 2: {_realSize = round(_mbu / 4)*3};
+ case 3: {_realSize = _mbu};
+ default {_realSize = _mbu};
+ };
+ if (_isInfantry) then {if ((unitQueu + _size + 1) > _realSize) then {_skip = true;hint parseText(Format [localize 'STR_WF_INFO_MaxGroup',_realSize])}};
+
+ if (!_isInfantry && !_skip) then {
+ _cpt = 0;
+ if (_driver) then {_cpt = _cpt + 1};
+ if (_gunner) then {_cpt = _cpt + 1};
+ if (_commander) then {_cpt = _cpt + 1};
+ if (_extracrew) then {_cpt = _cpt + ((_currentUnit select QUERYUNITCREW) select 3)};
+ if ((unitQueu + _size + _cpt) > _realSize && _cpt != 0) then {_skip = true;hint parseText(Format [localize 'STR_WF_INFO_MaxGroup',_realSize])};
+ };
+ };
+ if !(_skip) then {
+ //--- Check the max queu.
+ if ((Format["WFBE_C_QUEUE_%1",_type] Call GetNamespace) < (Format["WFBE_C_QUEUE_%1_MAX",_type] Call GetNamespace)) then {
+ [Format["WFBE_C_QUEUE_%1",_type],(Format["WFBE_C_QUEUE_%1",_type] Call GetNamespace)+1,true] Call SetNamespace;
+
+ _queu = _closest getVariable 'queu';
+ _txt = parseText(Format [localize 'STR_WF_INFO_BuyEffective',_currentUnit select QUERYUNITLABEL]);
+ if (!isNil '_queu') then {if (count _queu > 0) then {_txt = parseText(Format [localize 'STR_WF_INFO_Queu',_currentUnit select QUERYUNITLABEL])}};
+ hint _txt;
+ _params = if (_isInfantry) then {[_closest,_unit,[],_type,_cpt]} else {[_closest,_unit,[_driver,_gunner,_commander,_extracrew,_isLocked],_type,_cpt]};
+ _params Spawn BuildUnit;
+ -(_currentCost) Call ChangePlayerFunds;
+ } else {
+ hint parseText(Format [localize 'STR_WF_INFO_Queu_Max',Format["WFBE_C_QUEUE_%1_MAX",_type] Call GetNamespace]);
+ };
+ };
+ };
+ };
+
+ //--- Tabs selection.
+ if (MenuAction == 101) then {MenuAction = -1;if (barracksInRange) then {_currentIDC = 12005;_type = 'Barracks';_val = 0;_update = true}};
+ if (MenuAction == 102) then {MenuAction = -1;if (lightInRange) then {_currentIDC = 12006;_type = 'Light';_val = 1;_update = true}};
+ if (MenuAction == 103) then {MenuAction = -1;if (heavyInRange) then {_currentIDC = 12007;_type = 'Heavy';_val = 2;_update = true}};
+ if (MenuAction == 104) then {MenuAction = -1;if (aircraftInRange) then {_currentIDC = 12008;_type = 'Aircraft';_val = 3;_update = true}};
+ if (MenuAction == 105) then {MenuAction = -1;if (depotInRange) then {_currentIDC = 12020;_type = 'Depot';_val = 4;_update = true}};
+ if (MenuAction == 106) then {MenuAction = -1;if (hangarInRange) then {_currentIDC = 12021;_type = 'Airport';_val = 3;_update = true}};
+
+ //--- driver-gunner-commander icons.
+ if (MenuAction == 201) then {MenuAction = -1;_driver = if (_driver) then {false} else {true};_updateDetails = true};
+ if (MenuAction == 202) then {MenuAction = -1;_gunner = if (_gunner) then {false} else {true};_updateDetails = true};
+ if (MenuAction == 203) then {MenuAction = -1;_commander = if (_commander) then {false} else {true};_updateDetails = true};
+ if (MenuAction == 204) then {MenuAction = -1;_extracrew = if (_extracrew) then {false} else {true};_updateDetails = true};
+
+ //--- Factory DropDown list value has changed.
+ if (MenuAction == 301) then {MenuAction = -1;_factSel = lbCurSel 12018;_closest = _sorted select _factSel;_updateMap = true};
+
+ //--- Selection change, we update the details.
+ if (MenuAction == 302) then {MenuAction = -1;_updateDetails = true};
+
+ //--- Faction Filter changed.
+ if (MenuAction == 303) then {MenuAction = -1;_update = true;[Format["WFBE_%1%2CURRENTFACTIONSELECTED",sideJoinedText,_type],(lbCurSel _comboFaction),true] Call SetNamespace};
+
+ //--- Lock icon.
+ if (MenuAction == 401) then {MenuAction = -1;_isLocked = if (_isLocked) then {false} else {true};_updateDetails = true};
+
+ //--- Player funds.
+ ctrlSetText [12019,Format [localize 'STR_WF_UNITS_Cash',Call GetPlayerFunds]];
+
+ //--- Update tabs.
+ if (_update) then {
+ _listUnits = Format ['WFBE_%1%2UNITS',sideJoinedText,_type] Call GetNamespace;
+
+ [_comboFaction,_type] Call UIChangeComboBuyUnits;
+ [_listUnits,_type,_listBox,_val] Call UIFillListBuyUnits;
+
+ //--- Update tabs icons.
+ _IDCS = [12005,12006,12007,12008,12020,12021];
+ _IDCS = _IDCS - [_currentIDC];
+ _con = _display DisplayCtrl _currentIDC;
+ _con ctrlSetTextColor [1, 1, 1, 1];
+ {_con = _display DisplayCtrl _x;_con ctrlSetTextColor [0.4, 0.4, 0.4, 1]} forEach _IDCS;
+
+ _update = false;
+ _updateList = true;
+ _updateDetails = true;
+ };
+
+ //--- Update factories.
+ if (_updateList) then {
+ switch (_type) do {
+ //--- Specials.
+ case 'Depot': {
+ _nObjects = nearestObjects [(vehicle player), WFDEPOT,('WFBE_TOWNPURCHASERANGE' Call GetNamespace)];
+ _closest = if (count _nObjects > 0) then {_nObjects select 0} else {objNull};
+ _sorted = [_closest];
+ };
+ case 'Airport': {
+ _sorted = [(vehicle player),Airfields] Call SortByDistance;
+ _closest = _sorted select 0;
+ _sorted = [_closest];
+ };
+ //--- Factories
+ default {
+ _buildings = (sideJoinedText) Call GetSideStructures;
+ _factories = [sideJoined,Format ['WFBE_%1%2TYPE',sideJoinedText,_type] Call GetNamespace,_buildings] Call GetFactories;
+ _sorted = [(vehicle player),_factories] Call SortByDistance;
+ _closest = _sorted select 0;
+ _countAlive = count _factories;
+ };
+ };
+
+ //--- Refresh the Factory DropDown list.
+ lbClear 12018;
+ {
+ _nearest = [_x,towns] Call SortByDistance;
+ _nearTown = (_nearest select 0) getVariable 'name';
+ _txt = _type + ' ' + _nearTown + ' ' + str (round((vehicle player) distance _x)) + 'M';
+ lbAdd[12018,_txt];
+ } forEach _sorted;
+ lbSetCurSel [12018,0];
+
+ _updateList = false;
+ _updateMap = true;
+ };
+
+ //--- Display Factory Queu.
+ _queu = _closest getVariable "queu";
+ _value = if (isNil '_queu') then {0} else {count (_closest getVariable "queu")};
+ ctrlSetText[12024,Format[localize 'STR_WF_UNITS_QueuedLabel',str _value]];
+
+ //--- List selection changed.
+ if (_updateDetails) then {
+ _currentRow = lnbCurSelRow _listBox;
+ //--- Our list is not empty.
+ if (_currentRow != -1) then {
+ _currentValue = lnbValue[_listBox,[_currentRow,0]];
+ _unit = _listUnits select _currentValue;
+ _currentUnit = _unit Call GetNamespace;
+ ctrlSetText [12009,_currentUnit select QUERYUNITPICTURE];
+ ctrlSetText [12033,_currentUnit select QUERYUNITFACTION];
+ ctrlSetText [12035,str (_currentUnit select QUERYUNITTIME)];
+ _currentCost = _currentUnit select QUERYUNITPRICE;
+
+ _isInfantry = if (_unit isKindOf 'Man') then {true} else {false};
+
+ //--- Update driver-gunner-commander icons.
+ if !(_isInfantry) then {
+ ctrlSetText [12036,"N/A"];
+ ctrlSetText [12037,str (getNumber (configFile >> 'CfgVehicles' >> _unit >> 'transportSoldier'))];
+ ctrlSetText [12038,str (getNumber (configFile >> 'CfgVehicles' >> _unit >> 'maxSpeed'))];
+ ctrlSetText [12039,str (getNumber (configFile >> 'CfgVehicles' >> _unit >> 'armor'))];
+ if (_type != 'Depot') then {
+ _slots = _currentUnit select QUERYUNITCREW;
+
+ if (typeName _slots == "ARRAY") then {
+ _hasCommander = _slots select 0;
+ _hasGunner = _slots select 1;
+ _turretsCount = _slots select 3;
+ _extra = 0;
+
+ _maxOut = false;
+ if (_lastType != _type || _lastSel != _currentRow) then {_maxOut = true};
+
+ if (_maxOut) then {
+ _driver = true;
+ _gunner = true;
+ _commander = true;
+ _extracrew = false;
+ };
+
+ if !(_hasGunner) then {_gunner = false};
+
+ if !(_hasCommander) then {_commander = false};
+
+ if (_turretsCount == 0) then {_extracrew = false};
+
+ ctrlShow[_IDCSVehi select 0, true];
+ ctrlShow[_IDCSVehi select 1, _hasGunner];
+ ctrlShow[_IDCSVehi select 2, _hasCommander];
+ ctrlShow[_IDCSVehi select 3, if (_turretsCount == 0) then {false} else {true}];
+
+ _c = 0;
+ {
+ _color = if (_x) then {_enabledColor} else {_disabledColor};
+ _con = _display displayCtrl (_IDCSVehi select _c);
+ _con ctrlSetTextColor _color;
+
+ _c = _c + 1;
+ } forEach [_driver,_gunner,_commander,_extracrew];
+
+ if (_driver) then {_extra = _extra + 1};
+ if (_gunner) then {_extra = _extra + 1};
+ if (_commander) then {_extra = _extra + 1};
+ if (_extracrew) then {_extra = _extra + _turretsCount};
+
+ //--- Set the 'extra' price.
+ _currentCost = _currentCost + (('WFBE_CREWCOST' Call GetNamespace) * _extra);
+ } else {//--- Backward compability.
+ _c = 0;
+ _extra = 0;
+
+ //--- Enabled AI by default.
+ _extracrew = false;
+ _maxOut = false;
+ if (_lastType != _type || _lastSel != _currentRow) then {_maxOut = true};
+
+ switch (_slots) do {
+ case 1: {
+ if (_maxOut) then {_driver = true};
+ if (_driver) then {_extra = _extra + 1};
+ _gunner = false;
+ _commander = false;
+ };
+ case 2: {
+ if (_maxOut) then {_driver = true;_gunner = true};
+ if (_driver) then {_extra = _extra + 1};
+ if (_gunner) then {_extra = _extra + 1};
+ _commander = false;
+ };
+ case 3: {
+ if (_maxOut) then {_driver = true;_gunner = true;_commander = true};
+ if (_driver) then {_extra = _extra + 1};
+ if (_gunner) then {_extra = _extra + 1};
+ if (_commander) then {_extra = _extra + 1};
+ };
+ };
+
+ //--- Show the icons.
+ {
+ _show = false;
+ if (_c < _slots) then {_show = true};
+ ctrlShow [_x,_show];
+ _c = _c + 1;
+ } forEach _IDCSVehi;
+
+ //--- Mask extra crew.
+ ctrlShow[_IDCSVehi select 3, false];
+
+ _i = 0;
+
+ //--- Set the icons.
+ {
+ _color = if (_x) then {_enabledColor} else {_disabledColor};
+ _con = _display displayCtrl (_IDCSVehi select _i);
+ _con ctrlSetTextColor _color;
+ _i = _i + 1;
+ } forEach [_driver,_gunner,_commander,_extracrew];
+
+ //--- Set the 'extra' price.
+ _currentCost = _currentCost + (('WFBE_CREWCOST' Call GetNamespace) * _extra);
+ };
+ } else {
+ {ctrlShow [_x,false]} forEach (_IDCSVehi);
+ _driver = false;
+ _gunner = false;
+ _commander = false;
+ _extracrew = false;
+ };
+ } else {
+ ctrlSetText [12036,Format ["%1/100",(_currentUnit select QUERYUNITSKILL) * 100]];
+ ctrlSetText [12037,"N/A"];
+ ctrlSetText [12038,"N/A"];
+ ctrlSetText [12039,"N/A"];
+
+ {ctrlShow [_x,false]} forEach (_IDCSVehi);
+ _driver = false;
+ _gunner = false;
+ _commander = false;
+ _extracrew = false;
+
+ //--- Display a unit's loadout.
+ _weapons = (getArray (configFile >> 'CfgVehicles' >> _unit >> 'weapons')) - ['Put','Throw'];
+ _magazines = getArray (configFile >> 'CfgVehicles' >> _unit >> 'magazines');
+
+ _classMags = [];
+ _classMagsAmount = [];
+ _MagsLabel = [];
+
+ {
+ _findAt = _classMags find _x;
+ if (_findAt == -1) then {
+ _classMags = _classMags + [_x];
+ _classMagsAmount = _classMagsAmount + [1];
+ _MagsLabel = _MagsLabel + [[_x,'displayName','CfgMagazines'] Call GetConfigInfo];
+ } else {
+ _classMagsAmount set [_findAt, (_classMagsAmount select _findAt) + 1];
+ };
+ } forEach _magazines;
+ _txt = "<t color='#42b6ff' shadow='1'>" + (localize 'STR_WF_UNITS_Weapons') + ":</t><br />";
+ for [{_i = 0},{_i < count _weapons},{_i = _i + 1}] do {
+ _txt = _txt + "<t color='#eee58b' shadow='2'>" + ([(_weapons select _i),'displayName','CfgWeapons'] Call GetConfigInfo) + "</t>";
+ if ((_i+1) < count _weapons) then {_txt = _txt + "<t color='#D3A119' shadow='2'>,</t> "};
+ };
+ _txt = _txt + "<t color='#D3A119' shadow='2'></t><br /><br />";
+ _txt = _txt + "<t color='#42b6ff' shadow='1'>" + (localize 'STR_WF_UNITS_Magazines') + ":</t><br />";
+ for [{_i = 0},{_i < count _MagsLabel},{_i = _i + 1}] do {
+ _txt = _txt + "<t color='#eee58b' shadow='2'>" + ((_MagsLabel select _i) + "</t> <t color='#42b6ff' shadow='1'>x</t><t color='#42b6ff' shadow='1'>" + str (_classMagsAmount select _i)) + "</t>";
+ if ((_i+1) < count _MagsLabel) then {_txt = _txt + "<t color='#D3A119' shadow='2'>,</t> "};
+ };
+ _txt = _txt + "<t color='#D3A119' shadow='2'></t>";
+
+ (_display displayCtrl 12022) ctrlSetStructuredText (parseText _txt);
+ };
+
+ //--- Lock Icon.
+ if !(_isInfantry) then {
+ ctrlShow[_IDCLock,true];
+ _color = if (_isLocked) then {_enabledColor2} else {_disabledColor};
+ _con = _display displayCtrl _IDCLock;
+ _con ctrlSetTextColor _color;
+ } else {
+ ctrlShow[_IDCLock,false];
+ };
+
+ //--- Long description.
+ if !(_isInfantry) then {
+ if (isClass (configFile >> 'CfgVehicles' >> _unit >> 'Library')) then {
+ _txt = getText (configFile >> 'CfgVehicles' >> _unit >> 'Library' >> 'libTextDesc');
+ (_display displayCtrl 12022) ctrlSetStructuredText (parseText _txt);
+ } else {
+ (_display displayCtrl 12022) ctrlSetStructuredText (parseText '');
+ };
+ };
+
+ ctrlSetText [12034,Format ["$ %1",_currentCost]];
+ _updateDetails = false;
+ } else {
+ {ctrlSetText [_x , ""]} forEach [12009,12010,12027,12028,12029,12030,12031,12032,12033,12034,12035,12036,12037,12038,12039];
+ (_display displayCtrl 12022) ctrlSetStructuredText (parseText '');
+ };
+ };
+
+ //--- Update the Factory Minimap position.
+ if (_updateMap) then {
+ ctrlMapAnimClear _map;
+ _map ctrlMapAnimAdd [2,.075,getPos _closest];
+ ctrlMapAnimCommit _map;
+ _updateMap = false;
+ };
+
+ //--- Check that the factories of the current type are still alive.
+ _lastCheck = _lastCheck + 0.1;
+ if (_lastCheck > 2 && _type != 'Depot' && _type != 'Airport') then {
+ _lastCheck = 0;
+ _buildings = (sideJoinedText) Call GetSideStructures;
+ _factories = [sideJoined,Format ['WFBE_%1%2TYPE',sideJoinedText,_type] Call GetNamespace,_buildings] Call GetFactories;
+ if (count _factories != _countAlive) then {_updateList = true};
+ };
+
+ _lastSel = lnbCurSelRow _listBox;
+ _lastType = _type;
+ sleep 0.1;
+
+ //--- Back Button.
+ if (MenuAction == 2) exitWith { //---added-MrNiceGuy
+ MenuAction = -1;
+ closeDialog 0;
+ createDialog "WF_Menu";
+ };
+}; \ No newline at end of file
diff --git a/Client/GUI/GUI_Menu_Command.sqf b/Client/GUI/GUI_Menu_Command.sqf
new file mode 100644
index 0000000..a85003b
--- /dev/null
+++ b/Client/GUI/GUI_Menu_Command.sqf
@@ -0,0 +1,532 @@
+disableSerialization;
+
+MenuAction = -1;
+mouseButtonUp = -1;
+_display = _this select 0;
+
+//--- Alt.
+_mode = 0; //--- Team properties.
+
+_updateProperties = true;
+_updateRespawn = true;
+_updateTab = true;
+
+_IDCTeam = [14009,14010,14016,14017,14018,14019,14020,14021,14022,14023,14024,14025,14026,14027,14030,14031,14901,14902];
+_IDCTasks = [14017,14018,14021,14022,14030,14032];
+_IDCDetails = [14030,14041,14042,14043];
+{ctrlShow[_x,false]} forEach (_IDCTasks + _IDCDetails);
+{ctrlShow[_x,true]} forEach _IDCTeam;
+_TaskTypes = ["Assist","Attack","Defend","Destroy","Guard","Hold","Patrol","Move","Search and Destroy","Seize","Support"];
+_TaskDuration = [1,2,3,4,5,6,7,8,9,10,15,20,25,30,35,40,45,50,55,60];
+_TaskDurationLabel = ["1 Min","2 Min","3 Min","4 Min","5 Min","6 Min","7 Min","8 Min","9 Min","10 Min","15 Min","20 Min","25 Min","30 Min","35 Min","40 Min","45 Min","50 Min","55 Min","60 Min"];
+_detailGroup = [];
+
+ctrlSetText [14026,localize "STR_WF_COMMAND_Respawn" + ":"];
+
+_listbox_teams = _display displayCtrl 14012;
+_u = 1;
+lbAdd[14012,localize "STR_WF_COMMAND_All"];
+{lbAdd [14012,Format["[%1] %2",_u,name (leader _x)]];_u = _u + 1} forEach clientTeams;
+lbSetCurSel [14012,1];
+
+_radioLabel = ["All","Alpha","Bravo","Charlie","Delta","Echo","Foxtrot","Golf","Hotel","India","Juliet","Kilo","Lima","Mike","November","Oscar","Papa","Quebec","Romeo","Sierra","Tango","Uniform","Victor","Whiskey","X-Ray","Yankee","Zulu","Razor","Fatman","StarForce","Frostbite","Battlemage","Manhattan","Firefly","Swordsman","Sabre","Hammer","Reaper","Anvil","Fortune"];
+
+_templates = Format["WFBE_%1AITEAMTEMPLATEDESCRIPTIONS",sideJoinedText] Call GetNamespace;
+_templates_upgrades = Format["WFBE_%1AITEAMUPGRADES",sideJoinedText] Call GetNamespace;
+_upgrades = (sideJoined) Call GetSideUpgrades;
+_u = 0;
+_i = 0;
+{
+ _temp_upgr = _templates_upgrades select _i;
+
+ _canAdd = true;
+ for '_k' from 0 to 3 do {
+ if ((_temp_upgr select _k) > (_upgrades select _k)) exitWith {_canAdd = false};
+ };
+
+ if (_canAdd) then {
+ lbAdd [14010,_x];
+ lbSetValue [14010, _u, _i];
+ _u = _u + 1;
+ };
+ _i = _i + 1;
+} forEach _templates;
+lbSort (_display displayCtrl 14010);
+
+_curSel = lbCurSel 14012;
+_teams = [];
+_team = if (_curSel != 0) then {clientTeams select (_curSel - 1)} else {clientTeams select (_curSel + 1)};
+
+_index = (_team) Call GetTeamType;
+if (_index == -1) then {_index = 1};
+lbSetCurSel [14010,[14010,_index] Call UIFindLBValue];
+
+_txt = (_team) Call GetTeamMoveMode;
+if (_txt == "" || _txt == "towns") then {_txt = localize "STR_WF_COMMAND_Mission" + ": " + localize "STR_WF_COMMAND_TakeTowns"};
+if (_txt == "move") then {_txt = localize "STR_WF_COMMAND_Mission" + ": " + localize "STR_WF_COMMAND_Move"};
+if (_txt == "patrol") then {_txt = localize "STR_WF_COMMAND_Mission" + ": " + localize "STR_WF_COMMAND_Patrol"};
+if (_txt == "defense") then {_txt = localize "STR_WF_COMMAND_Mission" + ": " + localize "STR_WF_COMMAND_Defense"};
+ctrlSetText [14013,_txt];
+
+_map = _display displayCtrl 14002;
+//_map ctrlMapAnimAdd [1,.075,getPos (leader(clientTeams select 0))];
+//ctrlMapAnimCommit _map;
+
+ctrlEnable [14015,false];
+ctrlEnable [14014,false];
+
+//--- Set the combo properties.
+_behaviors = ["AWARE","CARELESS","COMBAT","SAFE","STEALTH"];
+_combatModes = ["BLUE","GREEN","RED","WHITE","YELLOW"];
+_formations = ["COLUMN","DIAMOND","ECH LEFT","ECH RIGHT","FILE","LINE","STAG COLUMN","VEE","WEDGE"];
+_speeds = ["LIMITED","FULL","NORMAL"];
+
+{lbAdd [14017, _x]} forEach _behaviors;
+{lbAdd [14018, _x]} forEach _combatModes;
+{lbAdd [14019, _x]} forEach _formations;
+{lbAdd [14020, _x]} forEach _speeds;
+
+_structures = [""];
+_hq = (sideJoinedText) Call GetSideHQ;
+if (alive _hq) then {_structures = _structures + [_hq]};
+_structures = _structures + ((sideJoinedText) Call GetSideStructures);
+_structuresLbl = ["Default"];
+lbAdd[14025,"Default"];
+
+{
+ if (typeName _x == "OBJECT") then {
+ _nearest = [_x,towns] Call SortByDistance;
+ _nearTown = (_nearest select 0) getVariable 'name';
+ _type = [typeOf _x, 'displayName'] Call GetConfigInfo;
+ _lbl = _type + ' ' + _nearTown + ' ' + str (round(player distance _x)) + 'M';
+ _structuresLbl = _structuresLbl + [_lbl];
+ lbAdd[14025,_lbl];
+ };
+} forEach _structures;
+
+while {alive player && dialog} do {
+ sleep 0.1;
+ if (side player != sideJoined) exitWith {activeAnimMarker = false;closeDialog 0};
+ if (!dialog) exitWith {activeAnimMarker = false};
+
+ if (MenuAction == 601) then {if (_mode != 0) then {_updateTab = true};_mode = 0};//--- Team properties.
+ if (MenuAction == 602) then {if (_mode != 1) then {_updateTab = true};_mode = 1};//--- Task.
+ if (MenuAction == 603) then {if (_mode != 2) then {_updateTab = true};_mode = 2};//--- Task.
+
+ _curSel = lbCurSel 14012;
+ _isAll = if (_curSel == 0 || (0 in _teams)) then {true} else {false};
+ _team = if !(_isAll) then {clientTeams select (_curSel - 1)} else {clientTeams select (_curSel + 1)};
+ _teams = lbSelection _listbox_teams;
+
+ if (_updateTab) then {
+ _currentIDC = 0;
+ switch (_mode) do {
+ case 0: {
+ {ctrlShow[_x,false]} forEach (_IDCDetails + _IDCTasks);
+ {ctrlShow[_x,true]} forEach _IDCTeam;
+ ctrlSetText[14021,localize "STR_WF_COMMAND_Behavior"];
+ ctrlSetText[14022,localize "STR_WF_COMMAND_CombatMode"];
+ ctrlSetText[14030,localize "STR_WF_COMMAND_SquadSettingsLabel"];
+ lbClear 14017;
+ lbClear 14018;
+ {lbAdd [14017, _x]} forEach _behaviors;
+ {lbAdd [14018, _x]} forEach _combatModes;
+ _updateProperties = true;
+ _currentIDC = 14500;
+ };
+ case 1: {
+ {ctrlShow[_x,false]} forEach (_IDCDetails + _IDCTeam);
+ {ctrlShow[_x,true]} forEach _IDCTasks;
+ lbClear 14017;
+ lbClear 14018;
+ {lbAdd [14017, _x]} forEach _TaskTypes;
+ {lbAdd [14018, _x]} forEach _TaskDurationLabel;
+ ctrlSetText[14021,localize "STR_WF_COMMAND_TaskTO_Do" + ":"];
+ ctrlSetText[14022,localize "STR_WF_COMMAND_TaskTO_Time" + ":"];
+ ctrlSetText[14030,localize "STR_WF_COMMAND_Tasks"];
+ lbSetCurSel[14017,0];
+ lbSetCurSel[14018,0];
+ _currentIDC = 14501;
+ };
+ case 2: {
+ {ctrlShow[_x,false]} forEach (_IDCTasks + _IDCTeam);
+ {ctrlShow[_x,true]} forEach _IDCDetails;
+ ctrlSetText[14030,localize "STR_WF_COMMAND_SquadManagmentLabel"];
+ _detailGroup = if (!_isAll) then {(units(clientTeams select (_curSel - 1))) Call GetLiveUnits} else {[]};
+ [_detailGroup,14041] Call UIFillListTeamOrders;
+ _enable = if !(isPlayer leader _team) then {true} else {false};
+ ctrlEnable [14043,_enable];
+ _enable = if !(isPlayer (vehicle leader _team) && vehicle leader _team != leader _team) then {true} else {false};
+ ctrlEnable [14042,_enable];
+ _currentIDC = 14502;
+ };
+ };
+ _hidc = [14500,14502,14501];
+ _hidc = _hidc - [_currentIDC];
+ _con = _display DisplayCtrl _currentIDC;
+ _con ctrlSetTextColor [1, 1, 1, 1];
+ {_con = _display DisplayCtrl _x;_con ctrlSetTextColor [0.4, 0.4, 0.4, 1]} forEach _hidc;
+ _updateTab = false;
+ };
+
+ _txt = (_team) Call GetTeamMoveMode;
+ if (_txt == "" || _txt == "towns") then {_txt = localize "STR_WF_COMMAND_Mission" + ": " + localize "STR_WF_COMMAND_TakeTowns"};
+ if (_txt == "move") then {_txt = localize "STR_WF_COMMAND_Mission" + ": " + localize "STR_WF_COMMAND_Move"};
+ if (_txt == "patrol") then {_txt = localize "STR_WF_COMMAND_Mission" + ": " + localize "STR_WF_COMMAND_Patrol"};
+ if (_txt == "defense") then {_txt = localize "STR_WF_COMMAND_Mission" + ": " + localize "STR_WF_COMMAND_Defense"};
+ ctrlSetText [14013,_txt];
+
+ //--- Team Funds.
+ ctrlSetText [14028,Format [localize 'STR_WF_COMMAND_Cash',str ((_team) Call GetTeamFunds)]];
+
+ if (MenuAction == 1) then {
+ MenuAction = -1;
+ activeAnimMarker = false;
+
+ _index = (_team) Call GetTeamType;
+ _currentCoord = (_team) Call GetTeamMovePos;
+ _currentMission = (_team) Call GetTeamMoveMode;
+ if (typeName _currentCoord == "ARRAY") then {
+ if (count _currentCoord > 0) then {
+ _position = _currentCoord;
+ if (_currentMission == "move") then {["TempAnim",_position,"selector_selectedMission",1,"ColorOrange",1,1.2] Spawn MarkerAnim};
+ if (_currentMission == "patrol") then {["TempAnim",_position,"selector_selectedMission",1,"ColorYellow",1,1.2,"areaPatrol"] Spawn MarkerAnim};
+ if (_currentMission == "defense") then {["TempAnim",_position,"selector_selectedMission",1,"ColorRed",1,1.2] Spawn MarkerAnim};
+ };
+ };
+ if (typeName _currentCoord == "OBJECT") then {
+ if (_currentMission == "towns") then {["TempAnim",getPos _currentCoord,"selector_selectedMission",1,"ColorBlue",1,1.2] Spawn MarkerAnim};
+ };
+
+ _enable = if (isPlayer(leader _team)) then {false} else {true};
+ _special = if (_isAll) then {false} else {if !(isPlayer(leader _team)) then {true} else {false}};
+ ctrlEnable [14011,_special];
+ ctrlEnable [14014,_enable];
+ ctrlEnable [14015,_enable];
+
+ if (_enable) then {
+ _isDisabled = (_team) Call GetTeamAutonomous;
+ if (_isDisabled) then {
+ ctrlEnable [14014,true];
+ ctrlEnable [14015,false];
+ } else {
+ ctrlEnable [14015,true];
+ ctrlEnable [14014,false];
+ };
+ };
+ if (_index == -1) then {_index = 1};
+ lbSetCurSel [14010,[14010,_index] Call UIFindLBValue];
+ if (_mode == 0) then {
+ _updateProperties = true;
+ _updateRespawn = true;
+ };
+ if (_mode == 2) then {
+ _detailGroup = if !(_isAll) then {(units(clientTeams select (_curSel - 1))) Call GetLiveUnits} else {[]};
+ [_detailGroup,14041] Call UIFillListTeamOrders;
+ _enable = if !(isPlayer leader _team) then {true} else {false};
+ ctrlEnable [14043,_enable];
+ };
+ };
+
+ //--- Focus.
+ if (MenuAction == 2) then {
+ MenuAction = -1;
+
+ ctrlMapAnimClear _map;
+ _map ctrlMapAnimAdd [2,.075,getPos(leader _team)];
+ ctrlMapAnimCommit _map;
+ };
+
+ //--- Focus (AI Sub).
+ if (MenuAction == 3) then {
+ MenuAction = -1;
+ _iddx = lnbCurSelRow 14041;
+ if (_iddx != -1) then {
+ _map ctrlMapAnimAdd [1,.095,getPos (_detailGroup select _iddx)];
+ ctrlMapAnimCommit _map;
+ };
+ };
+
+ //--- Take Towns.
+ if (MenuAction == 101) then {
+ MenuAction = -1;
+ if (!_isAll) then {
+ [_team,'towns'] Call SetTeamMoveMode;
+ } else {
+ {[_x,'towns'] Call SetTeamMoveMode} forEach clientTeams;
+ };
+ activeAnimMarker = false;
+ };
+
+ if (mouseButtonUp == 0) then {
+ mouseButtonUp = -1;
+ //--- Move | Patrol | Defend.
+ if (MenuAction == 102 || MenuAction == 103 || MenuAction == 104) then {
+ _color = "";
+ _order = "";
+ _isAdded = "";
+ switch (MenuAction) do {
+ case 102: {_color = "ColorOrange";_order = "MOVE"};
+ case 103: {_color = "ColorYellow";_order = "PATROL";_isAdded = "areaPatrol"};
+ case 104: {_color = "ColorRed";_order = "DEFENSE"};
+ };
+ MenuAction = -1;
+ _position = _map posScreenToWorld[mouseX,mouseY];
+
+ [_curSel,_position,_order,_isAll,_teams] Spawn {
+ Private ["_curSel","_isAll","_order","_position","_radio","_radioLabel","_sideTeam","_teams"];
+ _curSel = _this select 0;
+ _position = _this select 1;
+ _order = _this select 2;
+ _isAll = _this select 3;
+ _teams = _this select 4;
+ //_radio = ["all","alpha","bravo","charlie","delta","echo","foxtrot","golf","hotel","india","juliet","kilo","lima","mike","november","oscar","papa","quebec","romeo","sierra","tango","uniform","victor","whiskey","xray","yankee","zulu"];
+ _radioLabel = ["All","Alpha","Bravo","Charlie","Delta","Echo","Foxtrot","Golf","Hotel","India","Juliet","Kilo","Lima","Mike","November","Oscar","Papa","Quebec","Romeo","Sierra","Tango","Uniform","Victor","Whiskey","X-Ray","Yankee","Zulu","Razor","Fatman","StarForce","Frostbite","Battlemage","Manhattan","Firefly","Swordsman","Sabre","Hammer","Reaper","Anvil","Fortune"];
+
+ if (!_isAll) then {
+ _sideTeam = "Team ";
+ for '_i' from 0 to count _teams-1 do {
+ _selected = clientTeams select ((_teams select _i) - 1);
+ _sideTeam = _sideTeam + (_radioLabel select (_teams select _i));
+ if (_i != count _teams -1) then {_sideTeam = _sideTeam + ", "} else {_sideTeam = _sideTeam + " "};
+ };
+
+ player kbTell [sideHQ, WFBE_V_HQTopicSide, "OrderSent",["1","",_sideTeam,[if (sideJoined == west) then {"blueTeam"} else {"redTeam"}]],["2","","moving to position",["HC_MovingToPosition"]],["3","","over.",["Over1"]],true];
+ {
+ _selected = clientTeams select (_x - 1);
+ [_selected,_position] Call SetTeamMovePos;
+ [_selected,_order] Call SetTeamMoveMode;
+ } forEach _teams;
+ } else {
+ player kbTell [sideHQ, WFBE_V_HQTopicSide, "OrderSentAll",["1","","All",["all"]],["2","","moving to position",["HC_MovingToPosition"]],["3","","over.",["Over1"]],true];
+ {
+ [_x,_position] Call SetTeamMovePos;
+ [_x,_order] Call SetTeamMoveMode;
+ } forEach clientTeams;
+ };
+ };
+
+ activeAnimMarker = false;
+ _array = if (_isAdded == "") then {["TempAnim",_position,"selector_selectedMission",1,_color,1,1.2]} else {["TempAnim",_position,"selector_selectedMission",1,_color,1,1.2,_isAdded]};
+ _array Spawn MarkerAnim;
+ };
+
+ //--- Set a Task.
+ if (MenuAction == 306) then {
+ MenuAction = -1;
+ _taskType = _TaskTypes select (lbCurSel 14017);
+ _taskTime = _TaskDuration select (lbCurSel 14018);
+ _taskTimeLabel = _TaskDurationLabel select (lbCurSel 14018);
+ _position = _map posScreenToWorld[mouseX,mouseY];
+ if (!_isAll) then {
+ _sideTeam = "Team ";
+ for '_i' from 0 to count _teams-1 do {
+ _selected = clientTeams select ((_teams select _i) - 1);
+ _sideTeam = _sideTeam + (_radioLabel select (_teams select _i));
+ if (_i != count _teams -1) then {_sideTeam = _sideTeam + ", "} else {_sideTeam = _sideTeam + " "};
+ };
+ player kbTell [sideHQ, WFBE_V_HQTopicSide, "OrderSent",["1","",_sideTeam,[if (sideJoined == west) then {"blueTeam"} else {"redTeam"}]],["2","","moving to position",["HC_MovingToPosition"]],["3","","over.",["Over1"]],true];
+
+ {
+ _selected = clientTeams select (_x - 1);
+ if (alive (leader _selected)) then {
+ WFBE_SetTask = [vehicleVarName (leader _selected),'CLTFNCSETTASK',[_taskType,_taskTime,_taskTimeLabel,_position]];
+ publicVariable 'WFBE_SetTask';
+ if (isHostedServer) then {[vehicleVarName (leader _selected),'CLTFNCSETTASK',[_taskType,_taskTime,_taskTimeLabel,_position]] Spawn HandlePVF};
+ };
+ } forEach _teams;
+ } else {
+ player kbTell [sideHQ, WFBE_V_HQTopicSide, "OrderSentAll",["1","","All",["all"]],["2","","moving to position",["HC_MovingToPosition"]],["3","","over.",["Over1"]],true];
+ WFBE_SetTask = [sideJoined,'CLTFNCSETTASK',[_taskType,_taskTime,_taskTimeLabel,_position]];
+ publicVariable 'WFBE_SetTask';
+ if (isHostedServer) then {[sideJoined,'CLTFNCSETTASK',[_taskType,_taskTime,_taskTimeLabel,_position]] Spawn HandlePVF};
+ };
+ };
+ };
+
+ //--- Respawn.
+ if (MenuAction == 201) then {
+ MenuAction = -1;
+ [_team] Spawn {
+ Private ["_team"];
+ _team = _this select 0;
+ _units = Units _team;
+ if (paramMobileRespawn || (('WFBE_RESPAWNCAMPSMODE' Call GetNamespace) > 0)) then {//--- Make sure that the unit won't spawn back at a camp/ambu.
+ [_team,"forceRespawn"] Call SetTeamRespawn;
+ sleep 2;
+ };
+ _units = _units + ([_team,false] Call GetTeamVehicles);
+ {_x setDammage 1} forEach _units;
+ };
+ };
+
+ //--- Auto AI.
+ if (MenuAction == 301) then {
+ MenuAction = -1;
+ _isDisabled = (_team) Call GetTeamAutonomous;
+ if (_isDisabled) then {
+ ctrlEnable [14015,true];
+ ctrlEnable [14014,false];
+ if (!_isAll) then {
+ {
+ _selected = clientTeams select (_x - 1);
+ [_selected,false] Call SetTeamAutonomous;
+ } forEach _teams;
+ } else {
+ {[_x,false] Call SetTeamAutonomous} forEach clientTeams;
+ };
+ } else {
+ ctrlEnable [14014,true];
+ ctrlEnable [14015,false];
+ if (!_isAll) then {
+ {
+ _selected = clientTeams select (_x - 1);
+ [_selected,true] Call SetTeamAutonomous;
+ } forEach _teams;
+ } else {
+ {[_x,true] Call SetTeamAutonomous} forEach clientTeams;
+ };
+ };
+ };
+
+ //--- Set buy Type
+ if (MenuAction == 302) then {
+ MenuAction = -1;
+ _curType = lbValue [14010, lbCurSel(14010)];
+ if (!_isAll) then {
+ {
+ _selected = clientTeams select (_x - 1);
+ [_selected,_curType] Call SetTeamType;
+ } forEach _teams;
+ } else {
+ {[_x,_curType] Call SetTeamType} forEach clientTeams;
+ };
+ };
+
+ //--- Set property to team.
+ if (MenuAction == 303) then {
+ MenuAction = -1;
+ _behavior = _behaviors select (lbCurSel(14017));
+ _combat = _combatModes select (lbCurSel(14018));
+ _formation = _formations select (lbCurSel(14019));
+ _speed = _speeds select (lbCurSel(14020));
+
+ //--- Locality, process on server.
+ _to = sideJoined;
+ if (!_isAll) then {
+ _to = [];
+ {
+ _selected = clientTeams select (_x - 1);
+ _to = _to + [_selected];
+ } foreach _teams;
+ };
+
+ WFBE_RequestTeamUpdate = ['SRVFNCREQUESTTEAMUPDATE',[_to,_behavior,_combat,_formation,_speed]];
+ publicVariable 'WFBE_RequestTeamUpdate';
+ if (isHostedServer) then {['SRVFNCREQUESTTEAMUPDATE',[_to,_behavior,_combat,_formation,_speed]] Spawn HandleSPVF};
+ };
+
+ //--- Set respawn.
+ if (MenuAction == 304) then {
+ MenuAction = -1;
+ _curSel = lbCurSel 14025;
+ if (_curSel == -1) then {_curSel = 0};
+ if (!_isAll) then {
+ {
+ _selected = clientTeams select (_x - 1);
+ [_selected,(_structures select _curSel)] Call SetTeamRespawn;
+ } forEach _teams;
+ } else {
+ {[_x,(_structures select _curSel)] Call SetTeamRespawn} forEach clientTeams;
+ };
+ };
+
+ //--- Update the respawn info.
+ if (_updateRespawn) then {
+ _updateRespawn = false;
+ _respawn = (_team) Call GetTeamRespawn;
+ _id = _structures find _respawn;
+ if (_id != -1) then {lbSetCurSel [14025,_id]} else {lbSetCurSel[14025,0]};
+ };
+
+ //--- Minimap update (Only refresh when the combo is selected).
+ if (MenuAction == 305 && _updateProperties) then {MenuAction = -1};
+ if (MenuAction == 305) then {
+ MenuAction = -1;
+ _curSel = lbCurSel 14025;
+ if (_curSel == -1) then {_curSel = 0};
+ if (typeName (_structures select _curSel) == "OBJECT") then {
+ _map ctrlMapAnimAdd [1,.095,getPos (_structures select _curSel)];
+ ctrlMapAnimCommit _map;
+ };
+ };
+
+ //--- Units Details.
+ if (MenuAction == 401) then {
+ MenuAction = -1;
+ _iddx = lnbCurSelRow 14041;
+ if (_iddx != -1) then {
+ _unit = _detailGroup select _iddx;
+ _enable = if (!(isPlayer (vehicle _unit)) && vehicle _unit != _unit) then {true} else {false};
+ ctrlEnable [14042,_enable];
+ };
+ };
+
+ //--- Units Details (Unflip)
+ if (MenuAction == 402) then {
+ MenuAction = -1;
+ _iddx = lnbCurSelRow 14041;
+ if (_iddx != -1) then {
+ _unit = _detailGroup select _iddx;
+ if ((getPos _unit select 2) < 5) then {
+ _unit setPos [getPos _unit select 0,getpos _unit select 1,0.5];
+ _unit setVelocity [0,0,-1];
+ _detailGroup = if (!_isAll) then {(units(clientTeams select (_curSel - 1))) Call GetLiveUnits} else {[]};
+ [_detailGroup,14041] Call UIFillListTeamOrders;
+ };
+ };
+ };
+
+ //--- Units Details (Disband)
+ if (MenuAction == 403) then {
+ MenuAction = -1;
+ _iddx = lnbCurSelRow 14041;
+ if (_iddx != -1) then {
+ _unit = _detailGroup select _iddx;
+ _unit setDamage 1;
+ _detailGroup = if (!_isAll) then {(units(clientTeams select (_curSel - 1))) Call GetLiveUnits} else {[]};
+ [_detailGroup,14041] Call UIFillListTeamOrders;
+ };
+ };
+
+ //--- Update team properties.
+ if (_updateProperties) then {
+ _updateProperties = false;
+ _behavior = behaviour (leader _team);
+ _combat = combatMode (leader _team);
+ _formation = formation (leader _team);
+ _speed = speedMode (leader _team);
+
+ //--- Behavior.
+ _id =_behaviors find _behavior;
+ if (_id != -1) then {lbSetCurSel [14017,_id]};
+ //--- Combat Mode.
+ _id =_combatModes find _combat;
+ if (_id != -1) then {lbSetCurSel [14018,_id]};
+ //--- Formation.
+ _id =_formations find _formation;
+ if (_id != -1) then {lbSetCurSel [14019,_id]};
+ //--- Speed.
+ _id =_speeds find _speed;
+ if (_id != -1) then {lbSetCurSel [14020,_id]};
+ };
+
+ //--- Back Button.
+ if (MenuAction == 4) exitWith { //---added-MrNiceGuy
+ MenuAction = -1;
+ closeDialog 0;
+ createDialog "WF_Menu";
+ };
+};
+
+activeAnimMarker = false;
diff --git a/Client/GUI/GUI_Menu_EASA.sqf b/Client/GUI/GUI_Menu_EASA.sqf
new file mode 100644
index 0000000..66f929e
--- /dev/null
+++ b/Client/GUI/GUI_Menu_EASA.sqf
@@ -0,0 +1,48 @@
+MenuAction = -1;
+
+_type = ('WFBE_EASA_Vehicles' Call GetNamespace) find (typeOf (vehicle player));
+if (_type == -1) exitWith {diag_log Format['[WFBE (ERROR)][frameno:%2 | ticktime:%3] GUI_EASA: The player vehicle was not found within the list (%1)',_type,diag_frameno,diag_tickTime]};
+_data = (('WFBE_EASA_Loadouts' Call GetNamespace) select _type);
+
+
+_listPrice = [];
+_listDesc = [];
+_listBox = 23003;
+for [{_i = 0},{_i < count(_data)},{_i = _i + 1}] do {
+ _cdata = _data select _i;
+ for [{_j = 0},{_j < count(_cdata)},{_j = _j + 1}] do {
+ if (_j == 0) then {_listPrice = _listPrice + [(_cdata select 0) select 0]};
+ if (_j == 1) then {
+ _listDesc = _listDesc + [(_cdata select 1) select 0];
+ lnbAddRow [_listBox,["$"+str((_cdata select 0) select 0)+".",(_cdata select 1) select 0]]};
+ if (_j > 1) then {
+ };
+ };
+};
+
+if (count _listPrice > 0) then {lnbSetCurSelRow [_listBox,0]} else {lnbSetCurSelRow [_listBox,-1]};
+
+while {alive player && dialog} do {
+ sleep 0.1;
+
+ if (side player != sideJoined) exitWith {closeDialog 0};
+ if !(dialog) exitWith {};
+
+ //--- Command AI.
+ if (MenuAction == 101) then {
+ MenuAction = -1;
+ _funds = Call GetPlayerFunds;
+
+ _iddx = lnbCurSelRow _listBox;
+ if (_iddx != -1) then {
+ if (_funds > (_listPrice select _iddx)) then {
+ [vehicle player, _iddx, true] Call EASA_Equip;
+ -(_listPrice select _iddx) Call ChangePlayerFunds;
+ hint parseText(Format[localize 'STR_WF_INFO_EASA_Purchase',(_listDesc select _iddx)]);
+ closeDialog 0;
+ } else {
+ hint parseText(Format[localize 'STR_WF_INFO_Funds_Missing',(_listPrice select _iddx) - _funds,_listDesc select _iddx]);
+ };
+ };
+ };
+}; \ No newline at end of file
diff --git a/Client/GUI/GUI_Menu_Economy.sqf b/Client/GUI/GUI_Menu_Economy.sqf
new file mode 100644
index 0000000..aa0fac0
--- /dev/null
+++ b/Client/GUI/GUI_Menu_Economy.sqf
@@ -0,0 +1,239 @@
+disableSerialization;
+
+_display = _this select 0;
+_map = _display DisplayCtrl 23002;
+
+_hqDeployed = (sideJoined) Call GetSideHQDeployed;
+if (!_hqDeployed || !paramUseWorkers) then {ctrlEnable [23004, false];ctrlEnable [23006, false]};
+if !(paramUseWorkers) then {ctrlSetText[23005, localize 'STR_WF_Disabled']};
+
+MenuAction = -1;
+
+_maxWorkers = 'WFBE_WORKERS_MAX' Call GetNamespace;
+_workerPrice = 'WFBE_WORKERS_PRICE' Call GetNamespace;
+_incomeSystem = 'WFBE_INCOMESYSTEM' Call GetNamespace;
+_incomeDividision = 'WFBE_INC_DIVIDE_COM' Call GetNamespace;
+_supplySystem = 'WFBE_SUPPLYSYSTEM' Call GetNamespace;
+_aliveWorkers = [];
+_workers = [];
+_lastWorkersUpdate = -10;
+_lastComboUpdate = -30;
+_lastPurchase = -5;
+_income = 0;
+_updateComboWorker = true;
+_hasStarted = true;
+
+_lastUse = 0;
+ctrlEnable [23016,false];
+if (_supplySystem != 0) then {ctrlShow [23016, false]};
+
+if (_incomeSystem in [3,4]) then {
+ sliderSetRange[23010,0,100];
+ _income = Call Compile Format["%1CommanderPercent",sideJoined];
+ sliderSetPosition[23010, _income];
+} else {
+ ctrlEnable [23012, false];
+};
+
+while {alive player && dialog} do {
+ if (side player != sideJoined) exitWith {closeDialog 0};
+ if !(dialog) exitWith {};
+
+ _funds = Call GetPlayerFunds;
+
+ //--- Income System.
+ if (_incomeSystem in [3,4]) then {
+ ctrlSetText[23011, Format["%1%2",_income,"%"]];
+ _currentPercent = Call Compile Format["%1CommanderPercent",sideJoined];
+
+ _income = floor(sliderPosition 23010);
+
+ sliderSetPosition[23010, _income];
+
+ _calInc = (sideJoined) Call GetTownsIncome;
+
+ if (_currentPercent != _income || _hasStarted) then {
+ if (_hasStarted) then {_hasStarted = false};
+
+ _income_players = 0;
+ _income_commander = 0;
+ switch (_incomeSystem) do {
+ case 3: {
+ _income_players = round(_calInc * (((100 - _income)/100)/maxPlayers));
+ _income_commander = round((_calInc * (_income/100)) / _incomeDividision) + _income_players;
+ };
+ case 4: {
+ _income_players = round(_calInc * (100 - _income) / 100);
+ _income_commander = round((_calInc - _income_players)*maxPlayers) + _income_players;
+ };
+ };
+
+ ctrlSetText [23013, localize 'STR_WF_ECONOMY_Income_Sys_Com' + ": $" + str(_income_commander)];
+ ctrlSetText [23014, localize 'STR_WF_ECONOMY_Income_Sys_Ply' + ": $" + str(_income_players)];
+ };
+
+ if (MenuAction == 3) then {
+ MenuAction = -1;
+
+ if (_currentPercent != _income) then {
+ Call Compile Format["%1CommanderPercent = _income; publicVariable '%1CommanderPercent';",sideJoined];
+ };
+ };
+ };
+
+ //--- Workers System.
+ if (paramUseWorkers) then {
+ if (time - _lastComboUpdate > 5) then {
+ _updateComboWorker = true;
+ _lastComboUpdate = time;
+ };
+
+ _workers = Call Compile Format ["WF_%1Workers",sideJoinedText];
+ if (time - _lastWorkersUpdate > 5) then {_aliveWorkers = (_workers) Call GetLiveUnits;_lastWorkersUpdate = time};
+ _hqDeployed = (sideJoined) Call GetSideHQDeployed;
+
+ if (!_hqDeployed || time - _lastPurchase < 3 || count _aliveWorkers >= _maxWorkers || _funds < _workerPrice) then {ctrlEnable [23004, false]} else {ctrlEnable [23004, true]};
+
+ //--- Workers tracker.
+ if (_updateComboWorker) then {
+ _updateComboWorker = false;
+ lbClear 23007;
+
+ for '_i' from 0 to count(_aliveWorkers)-1 do {
+ lbAdd [23007, localize "STR_WF_ECONOMY_Workers" + " " + str(_i+1)];
+ };
+ };
+
+ ctrlSetText [23005, Format ["$%1 (%2/%3)",_workerPrice,count _aliveWorkers,_maxWorkers]];
+ };
+
+ //--- Hire Workers.
+ if (MenuAction == 1) then {
+ MenuAction = -1;
+
+ //--- Which index.
+ _index = 0;
+ for '_i' from 0 to count(_workers)-1 do {
+ if (isNull (_workers select _i)) exitWith {_index = _i};
+ };
+
+ if (_index == 0 && count(_workers) > 0) then {_index = count _workers};
+
+ if (count _aliveWorkers <= _maxWorkers && _hqDeployed) then {
+ -(_workerPrice) Call ChangePlayerFunds;
+
+ WFBE_RequestWorker = ['SRVFNCREQUESTWORKER',[sideJoined,(sideJoined) Call GetSideHQ,_index]];
+ publicVariable 'WFBE_RequestWorker';
+ if (isHostedServer) then {['SRVFNCREQUESTWORKER',[sideJoined,(sideJoined) Call GetSideHQ,_index]] Spawn HandleSPVF};
+
+ _workers set [_index, WF_Logic];
+ Call Compile Format ["WF_%1Workers = _workers; publicVariable 'WF_%1Workers';",sideJoinedText];
+
+ _lastPurchase = time;
+ _lastWorkersUpdate = -10;
+ _updateComboWorker = true;
+ };
+ };
+
+ //--- Disband Worker.
+ if (MenuAction == 2) then {
+ MenuAction = -1;
+
+ _value = lbCurSel 23007;
+
+ if (_value != -1) then {
+ (_aliveWorkers select _value) setDammage 1;
+ _lastWorkersUpdate = -10;
+ _updateComboWorker = true;
+ };
+ };
+
+ //--- ST Handler.
+ if (_supplySystem == 0) then {
+ _isCommander = false;
+ if (!isNull(commanderTeam)) then {if (commanderTeam == group player) then {_isCommander = true}};
+ ctrlEnable [23016,if (time - _lastUse > 5 && _isCommander) then {true} else {false}];
+ };
+
+ //--- Respawn Supply Trucks.
+ if (MenuAction == 4) then {
+ MenuAction = -1;
+ WFBE_RequestSpecial = ['SRVFNCREQUESTSPECIAL',["RespawnST",sideJoined]];
+ publicVariable 'WFBE_RequestSpecial';
+ if (isHostedServer) then {['SRVFNCREQUESTSPECIAL',["RespawnST",sideJoined]] Spawn HandleSPVF};
+ _lastUse = time;
+ };
+
+ //--- Minimap update.
+ if (MenuAction == 100) then {
+ MenuAction = -1;
+ _value = lbCurSel 23007;
+
+ if (_value != -1) then {
+ ctrlMapAnimClear _map;
+ _map ctrlMapAnimAdd [1,.175,getPos(_aliveWorkers select _value)];
+ ctrlMapAnimCommit _map;
+ };
+ };
+
+ //added-MrNiceGuy
+ if (mouseButtonUp == 0) then {
+ mouseButtonUp = -1;
+ //--- Sell Building.
+ if (MenuAction == 105) then {
+ MenuAction = -1;
+ _position = _map posScreenToWorld[mouseX,mouseY];
+ _structures = (sideJoinedText) Call GetSideStructures;
+ _existingStruct = [_position,_structures] Call SortByDistance;
+ if (count _existingStruct > 0) then {
+ _closest = _existingStruct select 0;
+ //--- 100 meters close only.
+ if (_closest distance _position < 100 && isNil {_closest getVariable "WFBE_SOLD"}) then {
+ //--- Spawn a sell thread.
+ (_closest) Spawn {
+ Private ["_closest","_delay","_id","_supplyB","_type"];
+ _closest = _this;
+ _closest setVariable ["WFBE_SOLD", true];
+ _delay = 'WFBE_BUILDINGSELLDELAY' Call GetNamespace;
+ _type = typeOf _closest;
+
+ //--- Inform the side (before).
+ WFBE_LocalizeMessage = [sideJoined,'CLTFNCLOCALIZEMESSAGE',['StructureSell',_type,_delay]];
+ publicVariable 'WFBE_LocalizeMessage';
+ ['StructureSell',_type,_delay] Spawn CLTFNCLocalizeMessage;
+
+ sleep _delay;
+
+ if !(alive _closest) exitWith {};
+
+ _id = (Format ["WFBE_%1STRUCTURENAMES",sideJoinedText] Call GetNamespace) find _type;
+
+ //--- TODO: Change the find system with a getvar system.
+ if (_id > 0) then {
+ _supplyB = (Format ["WFBE_%1STRUCTURECOSTS",sideJoinedText] Call GetNamespace) select _id;
+ _supplyB = round((_supplyB * ('WFBE_STRUCTURESELLPERCENT' Call GetNamespace)) / 100);
+
+ if !(paramMoneyOnly) then {[sideJoined, _supplyB] Call ChangeSideSupply} else {(_supplyB) Call ChangePlayerFunds};
+ };
+
+ //--- Inform the side.
+ WFBE_LocalizeMessage = [sideJoined,'CLTFNCLOCALIZEMESSAGE',['StructureSold',_type]];
+ publicVariable 'WFBE_LocalizeMessage';
+ ['StructureSold',_type] Spawn CLTFNCLocalizeMessage;
+ if (paramUseWorkers) then {_closest setVariable ["sold",true,true]};
+ _closest setDammage 1;
+ };
+ };
+ };
+ };
+ };
+
+ sleep 0.1;
+
+ //--- Back Button.
+ if (MenuAction == 5) exitWith { //---added-MrNiceGuy
+ MenuAction = -1;
+ closeDialog 0;
+ createDialog "WF_Menu";
+ };
+}; \ No newline at end of file
diff --git a/Client/GUI/GUI_Menu_Respawn.sqf b/Client/GUI/GUI_Menu_Respawn.sqf
new file mode 100644
index 0000000..4425fab
--- /dev/null
+++ b/Client/GUI/GUI_Menu_Respawn.sqf
@@ -0,0 +1,161 @@
+disableSerialization;
+
+MenuAction = -1;
+mouseButtonUp = -1;
+_display = _this select 0;
+_map = _display displayCtrl 15001;
+
+_spawn = objNull;
+_availableSpawn = [];
+_markers = [];
+_markerIndex = 0;
+_ta = "";
+_lastSpawnUpdate = 0;
+
+//--- Prevent AI from moving to the temp spawn.
+{_x disableAI "MOVE"} forEach (units clientTeam);
+
+//--- Wait until the player respawned.
+waitUntil {alive player};
+
+//--- Position the player at the temp location during his respawn.
+player setPos ([getMarkerPos Format["%1TempRespawnMarker",sideJoinedText],1,10] Call GetRandomPosition);
+if (leader(group player) != player) then {(group player) selectLeader player};
+
+//--- Call the pre respawn routine.
+(player) Call PreRespawnHandler;
+
+//--- Spawn a countdown thread.
+respawnDone = false;
+_handleTimer = [] Spawn {
+ if (isNil 'respawnStatus') then {respawnStatus = 'WFBE_RESPAWNDELAY' Call GetNamespace};
+ while {respawnStatus >= 0} do {
+ sleep 1;
+ respawnStatus = respawnStatus - 1;
+ };
+ respawnDone = true;
+};
+
+//--- Run the main respawn thread.
+while {!respawnDone} do {
+ //--- Exit the thread if the client died.
+ if !(alive player) exitWith {};
+
+ //--- Loadout Selection.
+ ctrlSetText [15004, if (WFBE_RespawnDefaultGear) then {localize "STR_WF_RESPAWN_GearDefault"} else {localize "STR_WF_RESPAWN_GearCurrent"}]; //changed-MrNiceGuy
+
+ //--- Preloading Status.
+ ctrlSetText [15005, if (WFBE_EnablePreload) then {localize "STR_WF_RESPAWN_PreloadYes"} else {localize "STR_WF_RESPAWN_PreloadNo"}]; //changed-MrNiceGuy
+
+ //--- Update the respawn info.
+ if (time - _lastSpawnUpdate > 2) then {
+ _lastSpawnUpdate = time;
+ _lastAvailableSpawn = _availableSpawn;
+ _availableSpawn = [sideJoined,deathLocation] Call GetRespawnAvailable;
+
+ //--- First launch.
+ if (isNull _spawn) then {
+ _spawn = _availableSpawn select 0;
+ _ta = ["TempAnim",getPos _spawn,"Select",1.4,"ColorBlue",1.4,1.8] Spawn MarkerAnim;
+ respawnName = [typeOf _spawn, 'displayName'] Call GetConfigInfo;
+ };
+
+ //--- Properly update the client's map - Update removal.
+ _found = false;
+ {
+ if !(_x in _availableSpawn) then {
+ _mid = _x getVariable 'WFBE_IDRMarker';
+ _markers = _markers - [_mid];
+ deleteMarkerLocal _mid;
+ _x setVariable ['WFBE_IDRMarker',nil];
+ if (_x == _spawn && !_found) then {
+ _found = true;
+ _spawn = ([_x, _availableSpawn] Call SortByDistance) select 0;
+ terminate _ta;
+ deleteMarkerLocal "TempAnim";
+ _ta = ["TempAnim",getPos _spawn,"Select",1.4,"ColorBlue",1.4,1.8] Spawn MarkerAnim;
+ respawnName = [typeOf _spawn, 'displayName'] Call GetConfigInfo;
+ };
+ };
+ } forEach _lastAvailableSpawn;
+
+ //--- Properly update the client's map - Update add.
+ {
+ if !(_x in _lastAvailableSpawn) then {
+ _markerName = Format ["respawnMarker%1",_markerIndex];
+ _markers = _markers + [_markerName];
+ createMarkerLocal [_markerName,getPos _x];
+ _markerName setMarkerTypeLocal "Select";
+ _markerName setMarkerColorLocal "ColorYellow";
+ _markerName setMarkerSizeLocal [1,1];
+ _markerIndex = _markerIndex + 1;
+ _x setVariable ['WFBE_IDRMarker',_markerName];
+ };
+ } forEach _availableSpawn;
+ };
+
+ //--- Update the respawn timer.
+ ctrlSetText [15003,Format [localize "STR_WF_RESPAWN_Status",respawnStatus,respawnName]];
+
+ //--- The client has clicked on the map.
+ if (mouseButtonUp == 0) then {
+ mouseButtonUp = -1;
+ if (count _availableSpawn > 1) then {
+ _position = _map PosScreenToWorld[mouseX,mouseY];
+ _sorted = [_position,_availableSpawn] Call SortByDistance;
+ if ((_sorted select 0) distance _position < 500) then {
+ _spawn = _sorted select 0;
+ activeAnimMarker = false;
+ terminate _ta;
+ deleteMarkerLocal "TempAnim";
+ _ta = ["TempAnim",getPos _spawn,"Select",1.4,"ColorBlue",1.4,1.8] Spawn MarkerAnim;
+ respawnName = [typeOf _spawn, 'displayName'] Call GetConfigInfo;
+ };
+ };
+ };
+
+ sleep 0.1;
+};
+
+//--- If the spawn is null, we use the HQ.
+if (isNull _spawn) then {
+ _hq = (sideJoinedText) Call GetSideHQ;
+ _spawn = _hq;
+};
+
+//--- Pre-render.
+if (WFBE_EnablePreload) then {
+ ctrlSetText [15003,localize 'STR_WF_RESPAWN_Preload'];
+ waitUntil{preloadCamera (getPos _spawn) || !(alive player)};
+};
+
+//--- Execute on respawn code only if the player's alive.
+if (alive player) then {
+ [player,_spawn] Call OnRespawnHandler;
+};
+
+//--- Terminate the threads & cleaning.
+{deleteMarkerLocal _x} forEach _markers;
+{_x setVariable ['WFBE_IDRMarker',nil]} forEach _availableSpawn;
+if !(isNil "DeathCamera") then {
+ DeathCamera cameraEffect["TERMINATE","BACK"];
+ camDestroy DeathCamera;
+};
+
+"dynamicBlur" ppEffectEnable false;
+"colorCorrections" ppEffectEnable false;
+[currentFX] Spawn FX;
+terminate _ta;
+if !(scriptDone _handleTimer) then {terminate _handleTimer};
+deleteMarkerLocal "TempAnim";
+activeAnimMarker = false;
+playerDead = false;
+respawnDone = nil;
+respawnName = nil;
+respawnStatus = nil;
+closeDialog 0;
+
+//--- Enable AI movement again.
+{_x enableAI "MOVE"} forEach (units clientTeam);
+
+hint (localize "STR_WF_INFO_RespawnInfo"); \ No newline at end of file
diff --git a/Client/GUI/GUI_Menu_Service.sqf b/Client/GUI/GUI_Menu_Service.sqf
new file mode 100644
index 0000000..5917c35
--- /dev/null
+++ b/Client/GUI/GUI_Menu_Service.sqf
@@ -0,0 +1,254 @@
+MenuAction = -1;
+
+_vehi = [group player,false] Call GetTeamVehicles;
+_alives = (units group player) Call GetLiveUnits;
+{if (vehicle _x == _x) then {_vehi = _vehi + [_x]}} forEach _alives;
+_lastUse = 0;
+_typeRepair = Format['WFBE_%1REPAIRTRUCKS',sideJoinedText] Call GetNamespace;
+_sheal = 'WFBE_SUPPORTHEALTIME' Call GetNamespace;
+_srearm = 'WFBE_SUPPORTREARMTIME' Call GetNamespace;
+_srefuel = 'WFBE_SUPPORTREFUELTIME' Call GetNamespace;
+_srepair = 'WFBE_SUPPORTREPAIRTIME' Call GetNamespace;
+
+_healPrice = 0;
+_repairPrice = 0;
+_refuelPrice = 0;
+_rearmPrice = 0;
+_lastVeh = objNull;
+_lastDmg = 0;
+_lastFue = 0;
+
+_buildings = (sideJoinedText) Call GetSideStructures;
+
+//--- Service Point.
+_csp = objNull;
+_sp = [sideJoined, Format ["WFBE_%1SERVICEPOINTTYPE",sideJoinedText] Call GetNamespace,_buildings] Call GetFactories;
+if (count _sp > 0) then {
+ _sorted = [player,_sp] Call SortByDistance;
+ _csp = _sorted select 0;
+};
+
+if (paramEASA) then {
+ _enable = false;
+ _currentUpgrades = (sideJoinedText) Call GetSideUpgrades;
+ _easaLevel = _currentUpgrades select 15;
+ if (!(isNull _csp) && _easaLevel > 0) then {
+ if (player distance _csp < ('WFBE_SUPPORTRANGE' Call GetNamespace)) then {
+ if (typeOf(vehicle player) in ('WFBE_EASA_Vehicles' Call GetNamespace)) then {
+ if (driver (vehicle player) == player) then {_enable = true};
+ };
+ };
+ };
+ ctrlEnable [20010,_enable];
+} else {
+ ctrlEnable [20010,false];
+};
+
+_effective = [];
+_nearSupport = [];
+_spType = Call Compile Format ["%1SP",sideJoinedText];
+_i = 0;
+{
+ _closestSP = objNull;
+ _add = false;
+
+ _nearSupport set [_i, []];
+
+ //--- Service Point.
+ if (count _sp > 0) then {
+ _sorted = [_x,_sp] Call SortByDistance;
+ _closestSP = _sorted select 0;
+ if !(isNull _closestSP) then {
+ if (_x distance _closestSP < ('WFBE_SUPPORTRANGE' Call GetNamespace)) then {
+ _add = true;
+ _nearSupport set [_i,(_nearSupport select _i) + [_closestSP]];
+ };
+ };
+ };
+
+ //--- Depots.
+ _nObjects = nearestObjects [_x, WFDEPOT,('WFBE_SUPPORTRANGE' Call GetNamespace)];
+ _nObject = if (count _nObjects > 0) then {_nObjects select 0} else {objNull};
+ if !(isNull _nObject) then {
+ _sideID = _nObject getVariable "sideID";
+ if !(isNil "_sideID") then {
+ if (_sideID == sideID) then {
+ _add = true;
+ _nearSupport set [_i,(_nearSupport select _i) + [_nObject]];
+ };
+ };
+ };
+
+ //--- Repairs Trucks.
+ _checks = (getPos _x) nearEntities[_typeRepair,'WFBE_REPAIRTRUCKRANGE' Call GetNamespace];
+ if (count _checks > 0) then {
+ _add = true;
+ _nearSupport set [_i,(_nearSupport select _i) + _checks];
+ };
+
+ //--- Add the vehicle ?
+ if (_add) then {
+ _effective = _effective + [_x];
+ _desc = [typeOf _x, 'displayName'] Call GetConfigInfo;
+ _finalNumber = (_x) Call GetAIDigit;
+ _isInVehicle = "";
+ if (_x != vehicle _x) then {
+ _descVehi = [typeOf (vehicle _x), 'displayName'] Call GetConfigInfo;
+ _isInVehicle = " [" + _descVehi + "] ";
+ };
+ _txt = "["+_finalNumber+"] "+ _desc + _isInVehicle;
+ lbAdd[20002,_txt];
+
+ _i = _i + 1;
+ };
+} forEach _vehi;
+
+_checks = (getPos player) nearEntities[_typeRepair,'WFBE_REPAIRTRUCKRANGE' Call GetNamespace];
+if (count _checks > 0) then {
+ _repair = _checks select 0;
+ _vehi = ((getPos _repair) nearEntities[["Car","Motorcycle","Tank","Air","Ship","StaticWeapon"],100]) - [_repair];
+ {
+ if !(_x in _effective) then {
+ _effective = _effective + [_x];
+ _nearSupport set [_i,[_repair]];
+ _descVehi = [typeOf (vehicle _x), 'displayName'] Call GetConfigInfo;
+ lbAdd[20002,_descVehi];
+
+ _i = _i + 1;
+ };
+ } forEach _vehi;
+};
+
+if (count _effective > 0) then {lbSetCurSel[20002,0]};
+
+while {true} do {
+ sleep 0.1;
+
+ if (Side player != sideJoined) exitWith {closeDialog 0};
+ if (!dialog) exitWith {};
+ _curSel = lbCurSel(20002);
+
+ if (_curSel != -1) then {
+ _veh = (vehicle (_effective select _curSel));
+ _funds = Call GetPlayerFunds;
+
+ if (_veh isKindOf "Man") then {
+ {ctrlEnable [_x,false]} forEach [20003,20004,20005];
+ _enabled = if (_funds >= _healPrice) then {true} else {false};
+ ctrlEnable [20008,_enabled];
+ //--- Healing.
+ _healPrice = round((getDammage _veh)*('WFBE_SUPPORTHEALPRICE' Call GetNamespace));
+ ctrlSetText [20011,"$0"];
+ ctrlSetText [20012,"$0"];
+ ctrlSetText [20013,"$0"];
+ ctrlSetText [20014,"$"+str(_healPrice)];
+ } else {
+ //--- Prevent on the air re-supply.
+ _canBeUsed = if ((getPos _veh) select 2 <= 2 && speed _veh <= 20) then {true} else {false};
+ _enabled = if (_canBeUsed && _funds >= _rearmPrice) then {true} else {false};
+ ctrlEnable [20003,_enabled];
+ _enabled = if (_canBeUsed && _funds >= _repairPrice) then {true} else {false};
+ ctrlEnable [20004,_enabled];
+ _enabled = if (_canBeUsed && _funds >= _refuelPrice) then {true} else {false};
+ ctrlEnable [20005,_enabled];
+ _enabled = if (_canBeUsed && _funds >= _healPrice) then {true} else {false};
+ ctrlEnable [20008,_enabled];
+ //--- Healing.
+ _healPrice = 0;
+ {
+ if (alive _x) then {_healPrice = _healPrice + round((getDammage _x)*('WFBE_SUPPORTHEALPRICE' Call GetNamespace))};
+ } forEach (crew _veh);
+ ctrlSetText [20014,"$"+str(_healPrice)];
+ //--- Repair.
+ if (_veh != _lastVeh || getDammage _veh != _lastDmg) then {
+ _type = typeOf _veh;
+ _lastDmg = getDammage _veh;
+ _get = _type Call GetNamespace;
+ if !(isNil '_get') then {
+ _repairPrice = round((getDammage _veh)*((_get select QUERYUNITPRICE)/('WFBE_SUPPORTREPAIRPRICE' Call GetNamespace)));
+ } else {
+ _repairPrice = 500;
+ };
+ };
+ ctrlSetText [20012,"$"+str(_repairPrice)];
+ //--- Rearm.
+ if (_veh != _lastVeh) then {
+ _type = typeOf _veh;
+ _get = _type Call GetNamespace;
+ if !(isNil '_get') then {
+ _rearmPrice = round((_get select QUERYUNITPRICE)/('WFBE_SUPPORTREARMPRICE' Call GetNamespace));
+ } else {
+ _rearmPrice = 500;
+ };
+ };
+ ctrlSetText [20011,"$"+str(_rearmPrice)];
+ //--- Refuel.
+ if (_veh != _lastVeh || fuel _veh != _lastFue) then {
+ _type = typeOf _veh;
+ _lastFue = fuel _veh;
+ _get = _type Call GetNamespace;
+ if !(isNil '_get') then {
+ _fuel = ((fuel _veh) -1) * -1;
+ _refuelPrice = round(_fuel*((_get select QUERYUNITPRICE)/('WFBE_SUPPORTREFUELPRICE' Call GetNamespace)));
+ } else {
+ _refuelPrice = 200;
+ };
+ };
+ ctrlSetText [20013,"$"+str(_refuelPrice)];
+ };
+
+ _lastVeh = _veh;
+
+ //--- Rearm.
+ if (MenuAction == 1) then {
+ MenuAction = -1;
+ -_rearmPrice Call ChangePlayerFunds;
+
+ //--- Spawn a Rearm thread.
+ [_veh,_nearSupport select _curSel,_typeRepair,_spType] Spawn SupportRearm;
+ };
+
+ //--- Repair.
+ if (MenuAction == 2) then {
+ MenuAction = -1;
+ -_repairPrice Call ChangePlayerFunds;
+
+ //--- Spawn a Repair thread.
+ [_veh,_nearSupport select _curSel,_typeRepair,_spType] Spawn SupportRepair;
+ };
+
+ //--- Refuel.
+ if (MenuAction == 3) then {
+ MenuAction = -1;
+ -_refuelPrice Call ChangePlayerFunds;
+
+ //--- Spawn a Refuel thread.
+ [_veh,_nearSupport select _curSel,_typeRepair,_spType] Spawn SupportRefuel;
+ };
+
+ //--- Heal.
+ if (MenuAction == 5) then {
+ MenuAction = -1;
+ -_healPrice Call ChangePlayerFunds;
+
+ //--- Spawn a Healing thread.
+ [_veh,_nearSupport select _curSel,_typeRepair,_spType] Spawn SupportHeal;
+ };
+ } else {
+ {ctrlEnable[_x,false]} forEach [20003,20004,20005,20008];
+ };
+
+ //--- EASA. TBD: Add dialog;
+ if (MenuAction == 7) then {
+ MenuAction = -1;
+ closeDialog 0;
+ createDialog "RscMenu_EASA";
+ };
+
+ //--- Back Button.
+ if (MenuAction == 8) exitWith { //---added-MrNiceGuy
+ MenuAction = -1;
+ closeDialog 0;
+ createDialog "WF_Menu";
+ };
+};
diff --git a/Client/GUI/GUI_Menu_Tactical.sqf b/Client/GUI/GUI_Menu_Tactical.sqf
new file mode 100644
index 0000000..3aea39f
--- /dev/null
+++ b/Client/GUI/GUI_Menu_Tactical.sqf
@@ -0,0 +1,659 @@
+disableSerialization;
+
+_display = _this select 0;
+_lastRange = artyRange;
+_lastUpdate = 0;
+_listBox = 17019;
+
+sliderSetRange[17005,10,'WFBE_MAXARTILLERYAREA' Call GetNamespace];
+sliderSetPosition[17005,artyRange];
+
+ctrlSetText [17025,localize "STR_WF_TACTICAL_ArtilleryOverview" + ":"];
+
+_markers = [];
+_FTLocations = [];
+_checks = [];
+_fireTime = 0;
+_status = 0;
+_canFT = false;
+_forceReload = true;
+_ft = 'WFBE_FASTTRAVEL' Call GetNamespace;
+_ftr = 'WFBE_FASTTRAVELRANGE' Call GetNamespace;
+_startPoint = objNull;
+
+_marker = "artilleryMarker";
+createMarkerLocal [_marker,artyPos];
+_marker setMarkerTypeLocal "mil_destroy";
+_marker setMarkerColorLocal "ColorRed";
+_marker setMarkerSizeLocal [1,1];
+
+_area = "artilleryAreaMarker";
+createMarkerLocal [_area,artyPos];
+_area setMarkerShapeLocal "Ellipse";
+_area setMarkerColorLocal "ColorRed";
+_area setMarkerSizeLocal [artyRange,artyRange];
+
+_map = _display DisplayCtrl 17002;
+_listboxControl = _display DisplayCtrl _listBox;
+
+_pard = 'WFBE_PARADELAY' Call GetNamespace;
+{lbAdd[17008,_x]} forEach (Format ["WFBE_%1_ARTILLERY_DESC",sideJoinedText] Call GetNamespace);
+lbSetCurSel[17008,0];
+
+_IDCS = [17005,17006,17007,17008];
+if !(paramArty) then {{ctrlEnable [_x,false]} forEach _IDCS};
+
+{ctrlEnable [_x, false]} forEach [17010,17011,17012,17013,17014,17015,17017,17018,17020];
+
+MenuAction = -1;
+mouseButtonUp = -1;
+_currentValue = -1;
+_currentFee = -1;
+_currentSpecial = "";
+_currentFee = -1;
+
+//--- Support List.
+_lastSel = -1;
+_addToList = [localize 'STR_WF_TACTICAL_FastTravel',localize 'STR_WF_ICBM',localize 'STR_WF_TACTICAL_ParadropAmmo',localize 'STR_WF_TACTICAL_ParadropVehicle',localize 'STR_WF_TACTICAL_Paratroop',localize 'STR_WF_TACTICAL_UnitCam',localize 'STR_WF_TACTICAL_UAV',localize 'STR_WF_TACTICAL_UAVDestroy',localize 'STR_WF_TACTICAL_UAVRemoteControl'];
+_addToListID = ["Fast_Travel","ICBM","Paradrop_Ammo","Paradrop_Vehicle","Paratroopers","Units_Camera","UAV","UAV_Destroy","UAV_Remote_Control"];
+_addToListFee = [0,150000,9500,3500,8500,0,12500,0,0];
+_addToListInterval = [0,1000,800,600,900,0,0,0,0];
+
+for '_i' from 0 to count(_addToList)-1 do {
+ lbAdd [_listBox,_addToList select _i];
+ lbSetValue [_listBox, _i, _i];
+};
+
+lbSort _listboxControl;
+
+//--- Artillery Mode.
+_mode = 'WFBE_V_ARTILLERYMINMAP' Call GetNamespace;
+if (isNil '_mode') then {_mode = 2;['WFBE_V_ARTILLERYMINMAP',_mode,true] Call SetNamespace};
+_trackingArray = [];
+_trackingArrayID = [];
+_lastArtyUpdate = -60;
+_minRange = 100;
+_maxRange = 200;
+_requestMarkerTransition = false;
+_requestRangedList = true;
+_startLoad = true;
+
+//--- Startup coloration.
+with uinamespace do {
+ currentBEDialog = _display;
+ switch (_mode) do {
+ case 0: {(currentBEDialog displayCtrl 17023) ctrlSetTextColor [1,1,1,1]};
+ case 1: {(currentBEDialog displayCtrl 17023) ctrlSetTextColor [0,0.635294,0.909803,1]};
+ case 2: {(currentBEDialog displayCtrl 17023) ctrlSetTextColor [0.6,0.850980,0.917647,1]};
+ };
+};
+
+lbSetCurSel[_listbox, 0];
+
+if (!paramArty) then {
+ (_display displayCtrl 17016) ctrlSetStructuredText (parseText Format['<t align="right" color="#FF4747">%1</t>',localize 'STR_WF_Disabled']);
+};
+
+_textAnimHandler = [] spawn {};
+
+while {alive player && dialog} do {
+ if (side player != sideJoined) exitWith {deleteMarkerLocal _marker;deleteMarkerLocal _area;{deleteMarkerLocal _x} forEach _markers;closeDialog 0};
+ if (!dialog) exitWith {deleteMarkerLocal _marker;deleteMarkerLocal _area;{deleteMarkerLocal _x} forEach _markers};
+
+ _currentUpgrades = (sideJoinedText) Call GetSideUpgrades;
+
+ if (_ft > 0) then {
+ //--- TODO: Travel fee, mod parameter > FT free or pay, do a clt fct.
+ _currentLevel = _currentUpgrades select 12;
+ if (time - _lastUpdate > 15 && _currentLevel > 0) then {
+ {deleteMarkerLocal _x} forEach _markers;
+ _markers = [];
+ _FTLocations = [];
+ _canFT = false;
+ _startPoint = objNull;
+ _lastUpdate = time;
+ _base = (sideJoinedText) Call GetSideHQ;
+ _isDeployed = (sideJoinedText) Call GetSideHQDeployed;
+ if (player distance _base < _ftr && alive _base && vehicle player != _base && _isDeployed) then {
+ _canFT = true;
+ _startPoint = _base;
+ } else {
+ _sorted = [player,towns] Call SortByDistance;
+ _closest = _sorted select 0;
+ _sideID = _closest getVariable "sideID";
+ _camps = [_closest,sideJoined] Call GetFriendlyCamps;
+ _allCamps = _closest getVariable "camps";
+ if (_sideID == sideID && player distance _closest < _ftr && (count _camps == count _allCamps)) then {_canFT = true;_startPoint = _closest} else {
+ _buildings = (sideJoinedText) Call GetSideStructures;
+ _checks = [sideJoined,Format ["WFBE_%1COMMANDCENTERTYPE",sideJoinedText] Call GetNamespace,_buildings] Call GetFactories;
+ if (count _checks > 0) then {
+ _sorted = [player,_checks] Call SortByDistance;
+ _closest = _sorted select 0;
+ if (player distance _closest < _ftr) then {
+ _canFT = true;
+ _closest = _sorted select 0;
+ _startPoint = _closest;
+ };
+ };
+ };
+ };
+ if (!canMove (vehicle player)) then {_canFT = false};
+ if (_canFT) then {
+ _buildings = (sideJoinedText) Call GetSideStructures;
+ _checks = [sideJoined,Format ["WFBE_%1COMMANDCENTERTYPE",sideJoinedText] Call GetNamespace,_buildings] Call GetFactories;
+ _locations = towns + _checks;
+ if (alive _base && _isDeployed) then {_locations = _locations + [_base]};
+ _i = 0;
+ _fee = 0;
+ _funds = if (_ft == 2) then {Call GetPlayerFunds} else {0};
+ {
+ if (_x distance player <= ('WFBE_FASTTRAVELMAXRANGE' Call GetNamespace) && _x distance player > _ftr) then {
+ _skip = false;
+ if (_x in towns) then {
+ _sideID = _x getVariable "sideID";
+ _camps = [_x,sideJoined] Call GetFriendlyCamps;
+ _allCamps = _x getVariable "camps";
+ if (_sideID != sideID || (count _camps != count _allCamps)) then {_skip = true};
+ if (_ft == 2) then {
+ _fee = round(((_x distance player)/1000) * ('WFBE_FASTTRAVELPRICEKM' Call GetNamespace));
+ if (_funds < _fee) then {_skip = true};
+ };
+ };
+ if !(_skip) then {
+ _FTLocations = _FTLocations + [_x];
+ _markerName = Format ["FTMarker%1",_i];
+ _markers = _markers + [_markerName];
+ createMarkerLocal [_markerName,getPos _x];
+ _markerName setMarkerTypeLocal "mil_circle";
+ _markerName setMarkerColorLocal "ColorYellow";
+ _markerName setMarkerSizeLocal [1,1];
+ //--- Fee, Cheap marker stuff, TBD: Add prompt or something.
+ if (_ft == 2) then {
+ _markerName = Format ["FTMarker%1%1",_i];
+ _markers = _markers + [_markerName];
+ createMarkerLocal [_markerName,[(getPos _x select 0)-5,(getPos _x select 1)+75]];
+ _markerName setMarkerTypeLocal "mil_circle";
+ _markerName setMarkerColorLocal "ColorYellow";
+ _markerName setMarkerSizeLocal [0,0];
+ _markerName setMarkerTextLocal Format ["$%1",_fee];
+ };
+ _i = _i + 1;
+ };
+ };
+ } forEach _locations;
+ };
+ };
+ };
+
+ _currentSel = lbCurSel(_listBox);
+
+ //--- Special changed or a reload is requested.
+ if (_currentSel != _lastSel || _forceReload) then {
+ _currentValue = lbValue[_listBox, _currentSel];
+
+ _currentSpecial = _addToListID select _currentValue;
+ _currentFee = _addToListFee select _currentValue;
+ _currentInterval = _addToListInterval select _currentValue;
+
+ _forceReload = false;
+ _controlEnable = false;
+
+ _funds = Call GetPlayerFunds;
+
+ //ctrlSetText[17021,Format ["%1: $%2",localize 'STR_WF_Price',_currentFee]]; //---old
+ ctrlSetText[17021,Format ["$%1",_currentFee]]; //---added-MrNiceGuy
+
+ //--- Enabled or disabled?
+ switch (_currentSpecial) do {
+ case "Fast_Travel": {
+ if (_ft > 0) then {
+ _currentLevel = _currentUpgrades select 12;
+ _controlEnable = if (count _FTLocations > 0 && _currentLevel > 0) then {true} else {false};
+ };
+ };
+ case "ICBM": {
+ if (paramICBM) then {
+ _commander = false;
+ if (!isNull(commanderTeam)) then {
+ if (commanderTeam == group player) then {_commander = true};
+ };
+ _currentLevel = _currentUpgrades select 11;
+ _controlEnable = if (_currentLevel > 0 && _commander && _funds >= _currentFee) then {true} else {false};
+ };
+ };
+ case "Paratroopers": {
+ _currentLevel = _currentUpgrades select 4;
+ _controlEnable = if (_funds >= _currentFee && _currentLevel > 0 && time - lastParaCall > _currentInterval) then {true} else {false};
+ };
+ case "Paradrop_Ammo": {
+ _currentLevel = _currentUpgrades select 16;
+ _controlEnable = if (_funds >= _currentFee && _currentLevel > 0 && time - lastSupplyCall > _currentInterval) then {true} else {false};
+ };
+ case "Paradrop_Vehicle": {
+ _currentLevel = _currentUpgrades select 16;
+ _controlEnable = if (_funds >= _currentFee && _currentLevel > 0 && time - lastSupplyCall > _currentInterval) then {true} else {false};
+ };
+ case "UAV": {
+ _currentLevel = _currentUpgrades select 5;
+ _controlEnable = if (_funds >= _currentFee && _currentLevel > 0 && !(alive playerUAV)) then {true} else {false};
+ };
+ case "UAV_Destroy": {
+ _controlEnable = if (alive playerUAV) then {true} else {false};
+ };
+ case "UAV_Remote_Control": {
+ _controlEnable = if (alive playerUAV) then {true} else {false};
+ };
+ case "Units_Camera": {
+ _controlEnable = commandInRange;
+ };
+ };
+
+ ctrlEnable[17020, _controlEnable];
+ };
+
+ //--- Action triggered.
+ if (MenuAction == 20) then {
+ MenuAction = -1;
+
+ //--- Output.
+ switch (_currentSpecial) do {
+ case "Fast_Travel": {
+ MenuAction = 7;
+ if !(scriptDone _textAnimHandler) then {terminate _textAnimHandler};
+ _textAnimHandler = [17022,localize 'STR_WF_TACTICAL_ClickOnMap',10,"ff9900"] spawn SetControlFadeAnim;
+ };
+ case "ICBM": {
+ MenuAction = 8;
+ if !(scriptDone _textAnimHandler) then {terminate _textAnimHandler};
+ _textAnimHandler = [17022,localize 'STR_WF_TACTICAL_ClickOnMap',10,"ff9900"] spawn SetControlFadeAnim;
+ };
+ case "Paratroopers": {
+ MenuAction = 3;
+ if !(scriptDone _textAnimHandler) then {terminate _textAnimHandler};
+ _textAnimHandler = [17022,localize 'STR_WF_TACTICAL_ClickOnMap',10,"ff9900"] spawn SetControlFadeAnim;
+ };
+ case "Paradrop_Ammo": {
+ MenuAction = 10;
+ if !(scriptDone _textAnimHandler) then {terminate _textAnimHandler};
+ _textAnimHandler = [17022,localize 'STR_WF_TACTICAL_ClickOnMap',10,"ff9900"] spawn SetControlFadeAnim;
+ };
+ case "Paradrop_Vehicle": {
+ MenuAction = 9;
+
+ if !(scriptDone _textAnimHandler) then {terminate _textAnimHandler};
+ _textAnimHandler = [17022,localize 'STR_WF_TACTICAL_ClickOnMap',10,"ff9900"] spawn SetControlFadeAnim;
+ };
+ case "UAV": {
+ closeDialog 0;
+ ExecVM "Client\Module\UAV\uav.sqf";
+ };
+ case "UAV_Destroy": {
+ if !(isNull playerUAV) then {
+ {_x setDammage 1} forEach (crew playerUAV);
+ playerUAV setDammage 1;
+ playerUAV = objNull;
+ };
+ };
+ case "UAV_Remote_Control": {
+ closeDialog 0;
+ ExecVM "Client\Module\UAV\uav.sqf";
+ };
+ case "Units_Camera": {
+ closeDialog 0;
+ createDialog "RscMenu_UnitCamera";
+ };
+ };
+
+ _forceReload = true;
+ };
+
+ artyRange = floor (sliderPosition 17005);
+ if (_lastRange != artyRange) then {_area setMarkerSizeLocal [artyRange,artyRange];};
+
+ if (mouseButtonUp == 0) then {
+ mouseButtonUp = -1;
+ //--- Set Artillery Marker on map.
+ if (MenuAction == 1) then {
+ MenuAction = -1;
+ artyPos = _map posScreenToWorld[mouseX,mouseY];
+ _marker setMarkerPosLocal artyPos;
+ _area setMarkerPosLocal artyPos;
+ _requestRangedList = true;
+ };
+ //--- Paratroops.
+ if (MenuAction == 3) then {
+ MenuAction = -1;
+ _forceReload = true;
+ if !(scriptDone _textAnimHandler) then {terminate _textAnimHandler};
+ [17022] Call SetControlFadeAnimStop;
+ _callPos = _map posScreenToWorld[mouseX,mouseY];
+ if (!surfaceIsWater _callPos) then {
+ lastParaCall = time;
+ -(_currentFee) Call ChangePlayerFunds;
+ WFBE_RequestSpecial = ['SRVFNCREQUESTSPECIAL',["Paratroops",sideJoined,_callPos,clientTeam]];
+ publicVariable 'WFBE_RequestSpecial';
+ if (isHostedServer) then {['SRVFNCREQUESTSPECIAL',["Paratroops",sideJoined,_callPos,clientTeam]] Spawn HandleSPVF};
+ hint (localize "STR_WF_INFO_Paratroop_Info");
+ };
+ };
+ //--- Fast Travel.
+ if (MenuAction == 7) then {
+ MenuAction = -1;
+ _forceReload = true;
+ if !(scriptDone _textAnimHandler) then {terminate _textAnimHandler};
+ [17022] Call SetControlFadeAnimStop;
+ _callPos = _map PosScreenToWorld[mouseX,mouseY];
+ _sorted = [_callPos,_FTLocations] Call SortByDistance;
+ if (_callPos distance (_sorted select 0) < 500) then {
+ closeDialog 0;
+ deleteMarkerLocal _marker;
+ deleteMarkerLocal _area;
+
+ _destination = _sorted select 0;
+
+ if (_ft == 2) then {
+ _fee = round(((player distance _destination)/1000) * ('WFBE_FASTTRAVELPRICEKM' Call GetNamespace));
+ -(_fee) Call ChangePlayerFunds;
+ };
+
+ _travelingWith = [];
+ {if (_x distance _startPoint < _ftr && !(_x in _travelingWith) && canMove _x && !(vehicle _x isKindOf "StaticWeapon") && !stopped _x && !((currentCommand _x) in ["WAIT","STOP"])) then {_travelingWith = _travelingWith + [vehicle _x]}} forEach units (group player);
+
+ ForceMap true;
+ _compass = shownCompass;
+ _GPS = shownGPS;
+ _pad = shownPad;
+ _radio = shownRadio;
+ _watch = shownWatch;
+
+ showCompass false;
+ showGPS false;
+ showPad false;
+ showRadio false;
+ showWatch false;
+
+ mapAnimClear;
+ mapAnimCommit;
+
+ _locationPosition = getPos _destination;
+ _camera = "camera" camCreate _locationPosition;
+ _camera camSetDir 0;
+ _camera camSetFov 1;
+ _camera cameraEffect["Internal","TOP"];
+
+ _camera camSetTarget _locationPosition;
+ _camera camSetPos [_locationPosition select 0,(_locationPosition select 1) + 2,100];
+ _camera camCommit 0;
+
+ mapAnimAdd [0,0.05,GetPos _startPoint];
+ mapAnimCommit;
+
+ _delay = ((_startPoint distance _destination) / 50) * ('WFBE_FASTTRAVELTIMECOEF' Call GetNamespace);
+ mapAnimAdd [_delay,.18,getPos _destination];
+ mapAnimCommit;
+
+ waitUntil {mapAnimDone || !alive player};
+ _skip = false;
+ if (!alive player) then {_skip = true};
+ if (!_skip) then {
+ {[_x,_locationPosition,120] Call PlaceSafe} forEach _travelingWith;
+ };
+ sleep 1;
+
+ ForceMap false;
+ showCompass _compass;
+ showGPS _GPS;
+ showPad _pad;
+ showRadio _radio;
+ showWatch _watch;
+
+ _camera cameraEffect["TERMINATE","BACK"];
+ camDestroy _camera;
+ };
+ };
+ //--- ICBM Strike.
+ if (MenuAction == 8) then {
+ _forceReload = true;
+ if !(scriptDone _textAnimHandler) then {terminate _textAnimHandler};
+ [17022] Call SetControlFadeAnimStop;
+ MenuAction = -1;
+ -_currentFee Call ChangePlayerFunds;
+ _callPos = _map PosScreenToWorld[mouseX,mouseY];
+ _obj = "HeliHEmpty" createVehicle _callPos;
+ _nukeMarker = createMarkerLocal ["icbmstrike", position _obj];
+ _nukeMarker setMarkerTypeLocal "mil_warning";
+ _nukeMarker setMarkerTextLocal "ICBM";
+ _nukeMarker setMarkerColorLocal "ColorRed";
+ [_obj,_nukeMarker] Spawn NukeIncomming;
+ };
+ //--- Vehicle Paradrop.
+ if (MenuAction == 9) then {
+ _forceReload = true;
+ if !(scriptDone _textAnimHandler) then {terminate _textAnimHandler};
+ [17022] Call SetControlFadeAnimStop;
+ MenuAction = -1;
+ lastSupplyCall = time;
+ -_currentFee Call ChangePlayerFunds;
+ _callPos = _map PosScreenToWorld[mouseX,mouseY];
+ WFBE_RequestSpecial = ['SRVFNCREQUESTSPECIAL',["ParaVehi",sideJoined,_callPos,clientTeam]];
+ publicVariable 'WFBE_RequestSpecial';
+ if (isHostedServer) then {['SRVFNCREQUESTSPECIAL',["ParaVehi",sideJoined,_callPos,clientTeam]] Spawn HandleSPVF};
+ };
+ //--- Ammo Paradrop.
+ if (MenuAction == 10) then {
+ _forceReload = true;
+ if !(scriptDone _textAnimHandler) then {terminate _textAnimHandler};
+ [17022] Call SetControlFadeAnimStop;
+ MenuAction = -1;
+ lastSupplyCall = time;
+ -_currentFee Call ChangePlayerFunds;
+ _callPos = _map PosScreenToWorld[mouseX,mouseY];
+ WFBE_RequestSpecial = ['SRVFNCREQUESTSPECIAL',["ParaAmmo",sideJoined,_callPos,clientTeam]];
+ publicVariable 'WFBE_RequestSpecial';
+ if (isHostedServer) then {['SRVFNCREQUESTSPECIAL',["ParaAmmo",sideJoined,_callPos,clientTeam]] Spawn HandleSPVF};
+ };
+ };
+
+ //--- Update the Artillery Status.
+ if (paramArty) then {
+ _fireTime = (Format["WFBE_FIREMISSIONTIMEOUT%1",(_currentUpgrades select 10)] Call GetNamespace);
+ _status = round(_fireTime - (time - fireMissionTime));
+ _txt = if (time - fireMissionTime > _fireTime) then {Format['<t align="left" color="#73FF47">%1</t>',localize 'STR_WF_TACTICAL_Available']} else {Format ['<t align="left" color="#4782FF">%1 %2</t>',_status,localize 'STR_WF_Seconds']};
+ (_display displayCtrl 17016) ctrlSetStructuredText (parseText _txt);
+ _enable = if (_status > 0) then {false} else {true};
+ ctrlEnable [17007,_enable];
+ };
+
+ //--- Request Fire Mission.
+ if (MenuAction == 2) then {
+ MenuAction = -1;
+ _units = [Group player,false,lbCurSel(17008),sideJoinedText] Call GetTeamArtillery;
+ if (Count _units > 0) then {
+ fireMissionTime = time;
+ [GetMarkerPos "artilleryMarker",lbCurSel(17008)] Spawn RequestFireMission;
+ } else {
+ hint (localize "STR_WF_INFO_NoArty");
+ };
+ };
+
+ //--- Arty Combo Change or Script init.
+ if (MenuAction == 200 || _startLoad) then {
+ MenuAction = -1;
+
+ _index = lbCurSel(17008);
+ _minRange = (Format ["WFBE_%1_ARTILLERY_MINRANGES",sideJoined] Call GetNamespace) select _index;
+ _maxRange = (Format ["WFBE_%1_ARTILLERY_MAXRANGES",sideJoined] Call GetNamespace) select _index;
+
+ _trackingArray = [group player,true,lbCurSel(17008),sideJoined] Call GetTeamArtillery;
+
+ _requestMarkerTransition = true;
+ _requestRangedList = true;
+ _startLoad = false;
+ };
+
+ //--- Focus on an artillery cannon.
+ if (MenuAction == 60) then {
+ MenuAction = -1;
+
+ ctrlMapAnimClear _map;
+ _map ctrlMapAnimAdd [1,.475,getPos(_trackingArray select (lnbCurSelRow 17024))];
+ ctrlMapAnimCommit _map;
+ };
+
+ //--- Flush on change.
+ if (_requestMarkerTransition) then {
+ _requestMarkerTransition = false;
+
+ {
+ _track = (_x select 0);
+ _vehicle = (_x select 1);
+
+ _vehicle setVariable ['WFBE_A_Tracked', nil];
+ deleteMarkerLocal Format ["WFBE_A_Large%1",_track];
+ deleteMarkerLocal Format ["WFBE_A_Small%1",_track];
+ } forEach _trackingArrayID;
+ _trackingArrayID = [];
+ };
+
+ //--- Artillery List.
+ if (paramArty && (_requestRangedList || time - _lastArtyUpdate > 3)) then {
+ _requestRangedList = false;
+
+ //--- No need to update the list all the time.
+ if (time - _lastArtyUpdate > 5) then {
+ _lastArtyUpdate = time;
+ _trackingArray = [group player,true,lbCurSel(17008),sideJoined] Call GetTeamArtillery;
+ };
+
+ //--- Clear & Fill;
+ lnbClear 17024;
+ _i = 0;
+ {
+ _distance = _x distance (getMarkerPos _marker);
+ _color = [0, 0.875, 0, 0.8];
+ _text = localize 'STR_WF_TACTICAL_ArtilleryInRange'; //---changed-MrNiceGuy //"In Range";
+ if (_distance > _maxRange) then {_color = [0.875, 0, 0, 0.8];_text = localize 'STR_WF_TACTICAL_ArtilleryOutOfRange'}; //---changed-MrNiceGuy //"Out of Range"};
+ if (_distance <= _minRange) then {_color = [0.875, 0.5, 0, 0.8];_text = localize 'STR_WF_TACTICAL_ArtilleryRangeTooClose'}; //---changed-MrNiceGuy //"Too close"};
+ lnbAddRow [17024,[[typeOf _x, 'displayName'] Call GetConfigInfo,_text]];
+ lnbSetPicture [17024,[_i,0],[typeOf _x, 'picture'] Call GetConfigInfo];
+
+ lnbSetColor [17024,[_i,0],_color];
+ lnbSetColor [17024,[_i,1],_color];
+
+ _i = _i + 1;
+ } forEach _trackingArray;
+ };
+
+ //--- Artillery map toggle.
+ if (MenuAction == 40) then {
+ MenuAction = -1;
+ if (_mode == -1) then {_mode = 0};
+ _mode = if (_mode == 2) then {0} else {_mode + 1};
+ with uinamespace do {
+ switch (_mode) do {
+ case 0: {(currentBEDialog displayCtrl 17023) ctrlSetTextColor [1,1,1,1]};
+ case 1: {(currentBEDialog displayCtrl 17023) ctrlSetTextColor [0,0.635294,0.909803,1]};
+ case 2: {(currentBEDialog displayCtrl 17023) ctrlSetTextColor [0.6,0.850980,0.917647,1]};
+ };
+ };
+
+ if !(scriptDone _textAnimHandler) then {terminate _textAnimHandler};
+ _textAnimHandler = [17022,localize 'STR_WF_TACTICAL_ArtilleryMinimapInfo',7,"ff9900"] spawn SetControlFadeAnim;
+
+ ['WFBE_V_ARTILLERYMINMAP',_mode,true] Call SetNamespace;
+
+ _requestMarkerTransition = true;
+ };
+
+ //--- Update artillery display.
+ if (_mode != -1) then {
+
+ //--- Nothing.
+ if (_mode == 0) then {
+ _requestMarkerTransition = true;
+ _mode = -1;
+ };
+
+ //--- Filled Content.
+ if (_mode == 1 || _mode == 2) then {
+ //--- Remove if dead or null or sel changed.
+ {
+ _track = (_x select 0);
+ _vehicle = (_x select 1);
+
+ if !(alive _vehicle) then {
+ deleteMarkerLocal Format ["WFBE_A_Large%1",_track];
+ deleteMarkerLocal Format ["WFBE_A_Small%1",_track];
+ };
+ } forEach _trackingArrayID;
+
+ //--- No need to update the marker all the time.
+ if (time - _lastArtyUpdate > 5) then {
+ _lastArtyUpdate = time;
+ _trackingArray = [group player,true,lbCurSel(17008),sideJoined] Call GetTeamArtillery;
+ };
+
+ //--- Live Feed.
+ _trackingArrayID = [];
+ {
+ _track = _x getVariable 'WFBE_A_Tracked';
+ if (isNil '_track') then {
+ _track = buildingMarker;
+ buildingMarker = buildingMarker + 1;
+ _x setVariable ['WFBE_A_Tracked', _track];
+ _dmarker = Format ["WFBE_A_Large%1",_track];
+ createMarkerLocal [_dmarker, getPos _x];
+ _dmarker setMarkerColorLocal "ColorBlue";
+ _dmarker setMarkerShapeLocal "ELLIPSE";
+ _brush = "SOLID";
+ if (_mode == 1) then {_brush = "SOLID"};
+ if (_mode == 2) then {_brush = "BORDER"};
+ _dmarker setMarkerBrushLocal _brush;
+ _dmarker setMarkerAlphaLocal 0.4;
+ _dmarker setMarkerSizeLocal [_maxRange,_maxRange];
+ _dmarker = Format ["WFBE_A_Small%1",_track];
+ createMarkerLocal [_dmarker, getPos _x];
+ _dmarker setMarkerColorLocal "ColorBlack";
+ _dmarker setMarkerShapeLocal "ELLIPSE";
+ _dmarker setMarkerBrushLocal "SOLID";
+ _dmarker setMarkerAlphaLocal 0.4;
+ _dmarker setMarkerSizeLocal [_minRange,_minRange];
+ } else {
+ _dmarker = Format ["WFBE_A_Large%1",_track];
+ _dmarker setMarkerPosLocal (getPos _x);
+ _dmarker = Format ["WFBE_A_Small%1",_track];
+ _dmarker setMarkerPosLocal (getPos _x);
+ };
+ _trackingArrayID = _trackingArrayID + [[_track,_x]];
+ } forEach _trackingArray;
+ };
+ };
+
+ _lastRange = artyRange;
+ _lastSel = lbCurSel(_listbox);
+ sleep 0.1;
+
+ //--- Back Button.
+ if (MenuAction == 30) exitWith { //---added-MrNiceGuy
+ MenuAction = -1;
+ closeDialog 0;
+ createDialog "WF_Menu";
+ };
+};
+
+deleteMarkerLocal _marker;
+deleteMarkerLocal _area;
+{deleteMarkerLocal _x} forEach _markers;
+
+if !(scriptDone _textAnimHandler) then {terminate _textAnimHandler};
+
+//--- Remove Markers.
+{
+ _track = (_x select 0);
+ _vehicle = (_x select 1);
+
+ _vehicle setVariable ['WFBE_A_Tracked', nil];
+
+ deleteMarkerLocal Format ["WFBE_A_Large%1",_track];
+ deleteMarkerLocal Format ["WFBE_A_Small%1",_track];
+} forEach _trackingArrayID; \ No newline at end of file
diff --git a/Client/GUI/GUI_Menu_Team.sqf b/Client/GUI/GUI_Menu_Team.sqf
new file mode 100644
index 0000000..e243b4b
--- /dev/null
+++ b/Client/GUI/GUI_Menu_Team.sqf
@@ -0,0 +1,145 @@
+disableSerialization;
+
+_display = _this select 0;
+MenuAction = -1;
+
+_currentVD = viewDistance;
+_funds = Call GetPlayerFunds;
+
+if (votePopUp) then {
+ ctrlSetText[13019, localize "STR_WF_VOTING_PopUpOffButton"];
+} else {
+ ctrlSetText[13019, localize "STR_WF_VOTING_PopUpOnButton"];
+};
+
+ctrlSetText [13002, Format [localize "STR_WF_TEAM_ViewDistanceLabel",_currentVD]];
+ctrlSetText [13004, Format [localize "STR_WF_TEAM_TerrainGridLabel",currentTG]];
+ctrlSetText [13006, Format [localize "STR_WF_TEAM_MoneyTransfer",0]];
+ctrlSetText [13010, Format [localize "STR_WF_Income",Call GetPlayerFunds,(sideJoined) Call GetIncome]];
+
+SliderSetRange[13003,1,('WFBE_MAXVIEWDISTANCE' Call GetNamespace)];
+SliderSetRange[13005,1,('WFBE_MAXCLUTTERDISTANCE' Call GetNamespace)];
+SliderSetRange[13007,0,_funds];
+SliderSetPosition[13003,_currentVD];
+SliderSetPosition[13005,currentTG];
+_lastvd = _currentVD;
+_lasttg = currentTG;
+_timer = 0;
+
+_i = 1;
+{
+ _xtra = if (isPlayer (leader _x)) then {name (leader _x)} else {"AI"};
+ lbAdd[13008,Format ["[%1] %2",_i,_xtra]];
+ _i = _i + 1;
+} forEach clientTeams;
+lbSetCurSel[13008,0];
+
+_units = ((Units Group player) Call GetLiveUnits);
+_units = _units - [player];
+{
+ _desc = [typeOf _x, 'displayName'] Call GetConfigInfo;
+ _finalNumber = (_x) Call GetAIDigit;
+ _isInVehicle = "";
+ if (_x != vehicle _x) then {
+ _descVehi = [typeOf (vehicle _x), 'displayName'] Call GetConfigInfo;
+ _isInVehicle = " [" + _descVehi + "] ";
+ };
+ _txt = "["+_finalNumber+"] "+ _desc + _isInVehicle;
+ lbAdd[13013,_txt];
+} forEach _units;
+lbSetCurSel[13013,0];
+
+{lbAdd[13018,_x]} forEach ["None","FX 1","FX 2","FX 3","FX 4","FX 5"];
+lbSetCurSel[13018,currentFX];
+
+while {alive player && dialog} do {
+ sleep 0.05;
+
+ if (Side player != sideJoined) exitWith {closeDialog 0};
+ if (!dialog) exitWith {};
+
+ _curSel = lbCurSel 13008;
+ _currentVD = Floor (SliderPosition 13003);
+ currentTG = Floor (SliderPosition 13005);
+ _transferAmount = Floor (SliderPosition 13007);
+
+ ctrlSetText [13002, Format [localize "STR_WF_TEAM_ViewDistanceLabel",_currentVD]];
+ ctrlSetText [13004, Format [localize "STR_WF_TEAM_TerrainGridLabel",currentTG]];
+ ctrlSetText [13006, Format [localize "STR_WF_TEAM_MoneyTransfer",_transferAmount]];
+
+ if (MenuAction == 1) then {
+ MenuAction = -1;
+ if ((_transferAmount != 0)&&((clientTeams select _curSel) != group player)) then {
+ [(clientTeams select _curSel),_transferAmount] Call ChangeTeamFunds;
+ -_transferAmount Call ChangePlayerFunds;
+ _funds = Call GetPlayerFunds;
+ WFBE_LocalizeMessage = [vehicleVarName leader (clientTeams select _curSel),'CLTFNCLOCALIZEMESSAGE',['FundsTransfer',_transferAmount,name player]];
+ publicVariable 'WFBE_LocalizeMessage';
+ if (isHostedServer) then {[vehicleVarName leader (clientTeams select _curSel),'CLTFNCLOCALIZEMESSAGE',['FundsTransfer',_transferAmount,name player]] Spawn HandlePVF};
+ sliderSetRange[13007,0,_funds];
+ };
+ };
+
+ if (MenuAction == 3) then {
+ MenuAction = -1;
+ _curUnitSel = lbCurSel 13013;
+ if (_curUnitSel != -1) then {
+ _vehicle = vehicle (_units select _curUnitSel);
+ _destroy = [(_units select _curUnitSel)];
+ if (_vehicle != (_units select _curUnitSel)) then {_destroy = _destroy + [_vehicle]};
+ {
+ if (_x isKindOf 'Man') then {removeAllWeapons _x};
+ _x setDammage 1;
+ } forEach _destroy;
+
+ _units = ((Units Group player) Call GetLiveUnits);
+ _units = _units - [leader group player];
+ lbClear 13013;
+ {
+ _desc = [typeOf _x, 'displayName'] Call GetConfigInfo;
+ _finalNumber = (_x) Call GetAIDigit;
+ _isInVehicle = "";
+ if (_x != vehicle _x) then {
+ _descVehi = [typeOf (vehicle _x), 'displayName'] Call GetConfigInfo;
+ _isInVehicle = " [" + _descVehi + "] ";
+ };
+ _txt = "["+_finalNumber+"] "+ _desc + _isInVehicle;
+ lbAdd[13013,_txt];
+ } forEach _units;
+ lbSetCurSel[13013,0];
+ };
+ };
+
+ if (MenuAction == 6) then {
+ MenuAction = -1;
+ currentFX = lbCurSel 13018;
+ [currentFX] Spawn FX;
+ };
+
+ //--- Vote Pop-Up //added-MrNiceGuy
+ if (MenuAction == 13) then {
+ MenuAction = -1;
+ if (votePopUp) then {
+ votePopUp = false;
+ ctrlSetText[13019, localize "STR_WF_VOTING_PopUpOnButton"];
+ } else {
+ votePopUp = true;
+ ctrlSetText[13019, localize "STR_WF_VOTING_PopUpOffButton"];
+ };
+ };
+
+ if (_currentVD != _lastvd) then {setViewDistance _currentVD};
+ if (currentTG != _lasttg) then {setTerrainGrid currentTG};
+ _lastvd = _currentVD;
+ _lasttg = currentTG;
+
+ if (_timer > 2) then {ctrlSetText [13010, Format [localize "STR_WF_Income",Call GetPlayerFunds,(sideJoined) Call GetIncome]];_timer = 0};
+ _timer = _timer + 0.05;
+
+ //--- Back Button.
+ if (MenuAction == 8) exitWith { //---added-MrNiceGuy
+ MenuAction = -1;
+ closeDialog 0;
+ createDialog "WF_Menu";
+ };
+};
diff --git a/Client/GUI/GUI_Menu_UnitCamera.sqf b/Client/GUI/GUI_Menu_UnitCamera.sqf
new file mode 100644
index 0000000..a019ad7
--- /dev/null
+++ b/Client/GUI/GUI_Menu_UnitCamera.sqf
@@ -0,0 +1,89 @@
+disableSerialization;
+_display = _this select 0;
+MenuAction = -1;
+mouseButtonUp = -1;
+
+_cameraModes = ["Internal","External","Gunner","Group"];
+
+_n = 1;
+{lbAdd[21002,Format["[%1] %2",_n,name (leader _x)]];_n = _n + 1} forEach clientTeams;
+_id = clientTeams find playerTeam;
+lbSetCurSel[21002,_id];
+_currentUnit = (player) Call GetUnitVehicle;
+_currentMode = "Internal";
+_currentUnit switchCamera _currentMode;
+_units = (Units (group player) - [player]) Call GetLiveUnits;
+{lbAdd[21004,Format["(%1) %2",getText (configFile >> "CfgVehicles" >> (typeOf (vehicle _x)) >> "displayName"),name _x]];_n = _n + 1} forEach _units;
+
+_type = if (!(difficultyEnabled "3rdPersonView")) then {["Internal"]} else {["Internal","External","Ironsight","Group"]};
+{lbAdd[21006,_x]} forEach _type;
+lbSetCurSel[21006,0];
+
+_map = _display displayCtrl 21007;
+_map ctrlMapAnimAdd [0,.25,getPos _currentUnit];
+ctrlMapAnimCommit _map;
+
+while {true} do {
+ sleep 0.1;
+
+ _cameraSwap = false;
+ if (Side player != sideJoined || !dialog) exitWith {};
+
+ //--- Map click.
+ if (mouseButtonUp == 0) then {
+ mouseButtonUp = -1;
+ _near = _map PosScreenToWorld[mouseX,mouseY];
+ _list = _near nearEntities [["Man","Car","Motorcycle","Ship","Tank","Air"],200];
+ if (count _list > 0) then {
+ _objects = [];
+ {if (!(_x isKindOf "Man") && side _x != sideJoined) then {if (count (crew _x) == 0) then {_objects = _objects - [_x]}};if (side _x == sideJoined) then {_objects = _objects + [_x]}} forEach _list;
+ if (count _objects > 0) then {
+ _units = [_near,_objects] Call SortByDistance;
+ _currentUnit = (_units select 0) Call GetUnitVehicle;
+ _cameraSwap = true;
+ };
+ };
+ };
+
+ //--- Leader Selection.
+ if (MenuAction == 101) then {
+ MenuAction = -1;
+ _selected = leader (clientTeams select (lbCurSel 21002));
+ _currentUnit = (_selected) Call GetUnitVehicle;
+ _n = 0;
+ _units = (Units (group _selected) - [_selected]) Call GetLiveUnits;
+ lbClear 21004;
+ {lbAdd[21004,Format["(%1) %2",GetText (configFile >> "CfgVehicles" >> (typeOf (vehicle _x)) >> "displayName"),name _x]];_n = _n + 1} forEach _units;
+ _cameraSwap = true;
+ };
+
+ //--- Leader commands AIs.
+ if (MenuAction == 102) then {
+ MenuAction = -1;
+ _currentUnit = (_units select (lbCurSel 21004)) Call GetUnitVehicle;
+ _cameraSwap = true;
+ };
+
+ //--- Camera Modes
+ if (MenuAction == 103) then {
+ MenuAction = -1;
+ _currentMode = (_cameraModes select (lbCurSel 21006));
+ _cameraSwap = true;
+ };
+
+ if !(alive _currentUnit) then {
+ _currentUnit = (player) Call GetUnitVehicle;
+ _cameraSwap = true;
+ };
+
+ //--- Update the Camera.
+ if (_cameraSwap) then {
+ ctrlMapAnimClear _map;
+ _map ctrlMapAnimAdd [1,.25,getPos _currentUnit];
+ ctrlMapAnimCommit _map;
+ _currentUnit switchCamera _currentMode;
+ };
+};
+
+closeDialog 0;
+((player) Call GetUnitVehicle) switchCamera _currentMode; \ No newline at end of file
diff --git a/Client/GUI/GUI_Menu_Upgrade.sqf b/Client/GUI/GUI_Menu_Upgrade.sqf
new file mode 100644
index 0000000..1ceb51e
--- /dev/null
+++ b/Client/GUI/GUI_Menu_Upgrade.sqf
@@ -0,0 +1,223 @@
+disableSerialization;
+
+_display = _this select 0;
+displayUpgrade = "";
+
+MenuAction = -1;
+mouseX = -1;
+mouseY = -1;
+
+_requiredFunds = 0;
+_requiredSupply = 0;
+
+_tooltip = _display DisplayCtrl 18998;
+_tooltip_text = _display DisplayCtrl 18999;
+
+_controls = [];
+_u = 18001;
+_curIDC = _display DisplayCtrl _u;
+while {!isNull _curIDC} do {_controls = _controls + [_curIDC];_u = _u + 1;_curIDC = _display DisplayCtrl _u};
+
+_level = 0;
+_val = 0;
+_time = 0;
+_name = '';
+_tooltip_text_content = '';
+_canUpgrade = false;
+_dependent = false;
+_isUpgrading = false;
+_lastTimerUpdate = -5;
+_upgr = 'WFBE_UPGRADELABELS' Call GetNamespace;
+_upgrlev = 'WFBE_UPGRADELEVELS' Call GetNamespace;
+_upgrdep = 'WFBE_UPGRADEDEPENDENCIES' Call GetNamespace;
+_upgrcond = 'WFBE_UPGRADECONDITION' Call GetNamespace;
+_upgrdesc = 'WFBE_UPGRADEDESCRIPTION' Call GetNamespace; //---added MrNiceGuy
+
+
+while {alive player && dialog} do {
+ if (Side player != sideJoined) exitWith {closeDialog 0};
+ if !(dialog) exitWith {};
+
+ _upgrades = (sideJoinedText) Call GetSideUpgrades;
+
+ if (time - _lastTimerUpdate > 1) then {_lastTimerUpdate = time;_isUpgrading = Call Compile Format ["WFBE_%1_Upgrading",sideJoinedText]};
+
+ _u = 0;
+ {
+ _level = _upgrades select _u;
+ _maxLevel = _upgrlev select _u;
+ _dependencie = _upgrdep select _u;
+ _condition = _upgrcond select _u;
+ if (_level == _maxLevel) then {_x ctrlSetTextColor [0, 1, 0, 1]};
+ if (!_condition) then {_x ctrlSetTextColor [1, 0, 0, 1]};
+ if (count _dependencie > 0 && _level != _maxLevel && _condition) then {
+ if (_upgrades select (_dependencie select 0) < (_dependencie select 1)) then {
+ _x ctrlSetTextColor [1, 0, 0, 1];
+ } else {
+ if (_level != _maxLevel) then {
+ _x ctrlSetTextColor [0.75,0.75,0.75,1];
+ };
+ };
+ };
+ _u = _u + 1;
+ } forEach _controls;
+
+ //--- Tooltips.
+ if (displayUpgrade != "") then {
+
+ switch (displayUpgrade) do {
+ case "infantry": {_val = 0};
+ case "light": {_val = 1};
+ case "heavy": {_val = 2};
+ case "air": {_val = 3};
+ case "parachutist": {_val = 4};
+ case "uav": {_val = 5};
+ case "supply": {_val = 6};
+ case "ambuSpawn": {_val = 7};
+ case "airlift": {_val = 8};
+ case "flares": {_val = 9};
+ case "artillery": {_val = 10};
+ case "icbm": {_val = 11};
+ case "fasttravel": {_val = 12};
+ case "gear": {_val = 13};
+ case "ammo": {_val = 14};
+ case "easa": {_val = 15};
+ case "paradrop": {_val = 16};
+ case "shells": {_val = 17};
+ };
+
+ ctrlSetFocus (_controls select _val);
+
+ _dependencie = _upgrdep select _val;
+ _condition = _upgrcond select _val;
+ _maxLevel = _upgrlev select _val;
+ _name = _upgr select _val;
+ _level = _upgrades select _val;
+ _desc = _upgrdesc select _val; //---added MrNiceGuy
+
+
+ _enabled = true;
+ if (!_condition) then {_enabled = false};
+ if (count _dependencie > 0 && _enabled) then {
+ if (_upgrades select (_dependencie select 0) < (_dependencie select 1)) then {
+ _dependent = true;
+ } else {_dependent = false};
+ } else {_dependent = false};
+
+ _bpath = if (_level == _maxLevel) then {_level} else {_level + 1};
+ _time = (Format["WFBE_UPGRADETIMESLEVEL%1",_bpath] Call GetNamespace) select _val;
+ _needed = (Format["WFBE_UPGRADEPRICESLEVEL%1",_bpath] Call GetNamespace) select _val;
+ _requiredSupply = _needed select 0;
+ _requiredFunds = _needed select 1;
+
+ _currentSupply = (sideJoined) Call GetSideSupply;
+ _currentFunds = Call GetPlayerfunds;
+
+ _colorSupply = "'#ff9900'";
+ _colorFunds = "'#ff9900'";
+ _hasFunds = true;
+ if !(paramMoneyOnly) then {if (_currentSupply < _requiredSupply) then {_colorSupply = "'#ff0033'";_hasFunds = false}};
+ if (_currentFunds < _requiredFunds) then {_colorFunds = "'#ff0033'";_hasFunds = false};
+
+ if (!_isUpgrading && _level < _maxLevel && !_dependent && _enabled && _hasFunds) then {_canUpgrade = true} else {_canUpgrade = false};
+
+ _tooltip_w = 0.30;
+ _tooltip_h = 0.50;
+ _tooltip_x = if ((1 - mouseX) < _tooltip_w) then {mouseX - _tooltip_w - 0.02} else {mouseX + 0.02};
+ _tooltip_y = if (mouseY > 0.5) then {mouseY - _tooltip_h - 0.02} else {mouseY + 0.02};
+
+ if (_level != _maxLevel) then {
+ _supplyCd = if !(paramMoneyOnly) then {Format ["<t size='0.8' color='#bfbfbf' font='Zeppelin33'>%1</t><br />",Format [localize 'STR_WF_UPGRADE_Cost',"<t color=" + _colorSupply + ">" + str(_requiredSupply) + '</t>' + '/' + "<t color='#ff9900'>" + str(_currentSupply) + '</t> S']]} else {""};
+ _tooltip_text_content = parsetext (
+ Format ["<t size='1.2' color='#338dcc' shadow='0'>%1:</t><br />",_name] +
+ Format ["<t size='0.8' color='#bfbfbf' font='Zeppelin33'>%1</t><br /><br />",Format [localize 'STR_WF_UPGRADE_Level',"<t color='#ff9900'>" + str(_level) + '</t>' + "/<t color='#ff9900'>" + str(_maxLevel) + '</t>']] +
+ _supplyCd +
+ Format ["<t size='0.8' color='#bfbfbf' font='Zeppelin33'>%1</t><br />",Format [localize 'STR_WF_UPGRADE_Cost',"<t color=" + _colorFunds + ">" + str(_requiredFunds) + '</t>' + '/' + "<t color='#ff9900'>" + str(_currentFunds) + '</t> $']] +
+ Format ["<t size='0.8' color='#bfbfbf' font='Zeppelin33'>%1</t><br /><br />",Format [localize 'STR_WF_UPGRADE_Duration',"<t color='#ff9900'>" + str(_time) + ' </t>' + localize 'STR_WF_Seconds']] +
+ Format ["<t size='0.8' color='#ff9900' shadow='0'>%1</t><br />",localize 'STR_WF_UPGRADE_Description'] + /* added MrNiceGuy */
+ Format ["<t size='0.8' color='#338dcc' shadow='2'>%1</t><br />",_desc] /* added MrNiceGuy */
+ );
+
+ if (_isUpgrading) then {
+ //_tooltip_h = 0.12;
+ _tooltip_text_content = parsetext (
+ Format ["<t size='1.2' color='#338dcc' shadow='0'>%1:</t><br />",_name] +
+ Format ["<t size='0.8' color='#bfbfbf' font='Zeppelin33'>%1</t><br /><br />",Format [localize 'STR_WF_UPGRADE_Level',"<t color='#ff9900'>" + str(_level) + '</t>' + "/<t color='#ff9900'>" + str(_maxLevel) + '</t>']] + /* added MrNiceGuy */
+ Format ["<t size='0.8' color='#ff9900' font='Zeppelin33'>%1</t><br /><br />",localize 'STR_WF_UPGRADE_AlreadyRunning']+
+ Format ["<t size='0.8' color='#ff9900' shadow='0'>%1</t><br />",localize 'STR_WF_UPGRADE_Description'] + /* added MrNiceGuy */
+ Format ["<t size='0.8' color='#338dcc' shadow='0'>%1</t><br />",_desc] /* added MrNiceGuy */
+ );
+ };
+ if (!_enabled) then {
+ //_tooltip_h = 0.12; /* added MrNiceGuy */
+ _tooltip_text_content = parsetext (
+ Format ["<t size='1.2' color='#338dcc' shadow='0'>%1:</t><br />",_name] +
+ Format ["<t size='0.8' color='#ff0033' font='Zeppelin33'>%1</t><br /><br />",localize 'STR_WF_UPGRADE_Condition'] +
+ Format ["<t size='0.8' color='#ff9900' shadow='0'>%1</t><br />",localize 'STR_WF_UPGRADE_Description'] + /* added MrNiceGuy */
+ Format ["<t size='0.8' color='#338dcc' shadow='0'>%1</t><br />",_desc] /* added MrNiceGuy */
+ );
+ };
+ if (_dependent && !_isUpgrading && _enabled) then {
+ _tooltip_text_content = parsetext (
+ Format ["<t size='1.2' color='#338dcc' shadow='0'>%1:</t><br />",_name] +
+ Format ["<t size='0.8' color='#bfbfbf' font='Zeppelin33'>%1</t><br /><br />",Format [localize 'STR_WF_UPGRADE_Level',"<t color='#ff9900'>" + str(_level) + '</t>' + "/<t color='#ff9900'>" + str(_maxLevel) + '</t>']] + /* added MrNiceGuy */
+ Format ["<t size='0.8' color='#ff9900' font='Zeppelin33'>%1</t><br /><br />",Format[localize 'STR_WF_UPGRADE_Dependent',_upgr select (_dependencie select 0),_dependencie select 1]] +
+ Format ["<t size='0.8' color='#ff9900' shadow='0'>%1</t><br />",localize 'STR_WF_UPGRADE_Description'] + /* added MrNiceGuy */
+ Format ["<t size='0.8' color='#338dcc' shadow='0'>%1</t><br />",_desc] /* added MrNiceGuy */
+ );
+ };
+ } else {
+ //_tooltip_h = 0.12;
+ _tooltip_text_content = parsetext (
+ Format ["<t size='1.2' color='#338dcc' shadow='0'>%1:</t><br />",_name] +
+ Format ["<t size='0.8' color='#bfbfbf' font='Zeppelin33'>%1</t><br /><br />",Format [localize 'STR_WF_UPGRADE_Level',"<t color='#ff9900'>" + str(_level) + '</t>' + "/<t color='#ff9900'>" + str(_maxLevel) + '</t>']] + /* added MrNiceGuy */
+ Format ["<t size='0.8' color='#00ff33' font='Zeppelin33'>%1</t><br /><br />",localize 'STR_WF_UPGRADE_Maximum'] +
+ Format ["<t size='0.8' color='#ff9900' shadow='0'>%1</t><br />",localize 'STR_WF_UPGRADE_Description'] + /* added MrNiceGuy */
+ Format ["<t size='0.8' color='#338dcc' shadow='0'>%1</t><br />",_desc] /* added MrNiceGuy */
+
+ );
+ };
+
+ if ((ctrlPosition _tooltip select 0) == 0 || true) then {_tooltip ctrlSetPosition [_tooltip_x,_tooltip_y,_tooltip_w,_tooltip_h]};
+ _tooltip ctrlCommit 0;
+
+ _tooltip_text ctrlSetStructuredText _tooltip_text_content;
+ if ((ctrlPosition _tooltip_text select 0) == 0 || true) then {_tooltip_text ctrlSetPosition [_tooltip_x,_tooltip_y,_tooltip_w,_tooltip_h]};
+ _tooltip_text ctrlCommit 0;
+
+ } else {
+ if ((ctrlPosition _tooltip select 0) != 0) then {_tooltip ctrlSetPosition [0,0,0,0];_tooltip ctrlCommit 0};
+ if ((ctrlPosition _tooltip_text select 0) != 0) then {_tooltip_text ctrlSetPosition [0,0,0,0];_tooltip_text ctrlCommit 0};
+ };
+
+ _commander = false;
+ if (!isNull(commanderTeam)) then {
+ if (commanderTeam == group player) then {_commander = true};
+ };
+
+ if (MenuAction == 1 && _canUpgrade && _commander) then {
+ MenuAction = -1;
+ -(_requiredFunds) Call ChangePlayerFunds;
+ if !(paramMoneyOnly) then {[sideJoined, -_requiredSupply] Call ChangeSideSupply};
+
+ WFBE_RequestUpgrade = ['SRVFNCREQUESTUPGRADE',[_time,_level,_val,_name,sideJoined]];
+ publicVariable 'WFBE_RequestUpgrade';
+ if (isHostedServer) then {['SRVFNCREQUESTUPGRADE',[_time,_level,_val,_name,sideJoined]] Spawn HandleSPVF};
+
+ Call Compile Format ["WFBE_%1_Upgrading = true;",sideJoinedText];
+ _isUpgrading = true;
+ hint Format [localize "STR_WF_INFO_Upgrade_Start",_name];
+ } else {MenuAction = -1};
+
+ _txt = if (_isUpgrading) then {localize "STR_WF_UPGRADE_RunningInfo" + "..."} else {""};
+ ctrlSetText[18802,_txt];
+
+ sleep 0.05;
+
+ //--- Back Button.
+ if (MenuAction == 2) exitWith { //---added-MrNiceGuy
+ MenuAction = -1;
+ closeDialog 0;
+ createDialog "WF_Menu";
+ };
+}; \ No newline at end of file
diff --git a/Client/GUI/GUI_Menu_Voting.sqf b/Client/GUI/GUI_Menu_Voting.sqf
new file mode 100644
index 0000000..987f40e
--- /dev/null
+++ b/Client/GUI/GUI_Menu_Voting.sqf
@@ -0,0 +1,75 @@
+MenuAction = -1; //added-MrNiceGuy - Benny`s solution
+
+_voteTime = WF_Logic getVariable Format ["%1CommanderVoteTime",sideJoinedText];
+if (_voteTime <= 0) exitWith {};
+
+_name = "";
+_lastTeams = [];
+_lastTeam = -2;
+
+_lastVotes = [sideJoined] Call GetCommanderVotes;
+
+while {true} do {
+ sleep 0.1;
+
+ if (!(alive player) || Side player != sideJoined) exitWith {CloseDialog 0;_exit = true};
+ if !(dialog) exitWith {};
+
+ _commanderTeam = [sideJoined] Call GetCommanderFromVotes;
+ if (IsNull _commanderTeam) then {_name = Localize "STR_WF_AI"} else {_name = name leader _commanderTeam};
+
+ _voteTime = WF_Logic getVariable Format ["%1CommanderVoteTime",sideJoinedText];
+ ctrlSetText [10007,Format ["%1",_name]]; //changed-MrNiceGuy
+ ctrlSetText [10008,Format ["%2: %3",_name,Localize "STR_WF_VOTING_TimeLeft",_voteTime]]; //added-MrNiceGuy
+
+ if (_voteTime <= 0) exitWith {CloseDialog 0};
+
+ _refresh = false;
+ _playerSlots = [];
+ {
+ if !(isNil '_x') then {if (isPlayer (leader _x)) then {_playerSlots = _playerSlots + [_x]}};
+ } forEach clientTeams;
+
+ _count = 0;
+ _votes = [sideJoined] Call GetCommanderVotes;
+
+ {if (_x != (_votes Select _count)) then {_refresh = true};_count = _count + 1} ForEach _lastVotes;
+ {if !(_x In _lastTeams) then {_refresh = true}} ForEach _playerSlots;
+ {if !(_x In _playerSlots) then {_refresh = true}} ForEach _lastTeams;
+
+ if (_refresh) then {
+
+ _reselect = false;
+ _selected = lbCurSel 10006;
+ _selectedTeam = lbValue[10006,_selected];
+ _selectedText = lbText[10006,_selected];
+ _lastVotes = _votes;
+
+ if (_selected != -1) then {_reselect = true};
+
+ lbClear 10006;
+ _AI = lbAdd[10006,Format["%1 %2",_votes select 0,Localize "STR_WF_AI"]];
+ lbSetValue [10006,_AI,-1];
+
+ _count = 0;
+ _total = 1;
+
+ {
+ if !(isNil '_x') then {if (_x In _playerSlots) then {_total = _total + 1;_selection = lbAdd[10006,Format ["%1 %2",_votes select _count+1,name (leader _x)]];lbSetValue [10006,_selection,_count]}};_count = _count + 1;
+ } forEach clientTeams;
+ _lastTeams = +_playerSlots;
+
+ if (_reselect) then {
+ _selected = 0;
+ for [{_count = 0},{_count < _total},{_count = _count + 1}] do {if (lbValue[10006,_count] == _selectedTeam) then {_selected = _count}};
+ lbSetCurSel[10006,_selected];
+ };
+ };
+
+ _selected = lbCurSel 10006;
+ if (_selected != -1) then {
+ _selectedTeam = lbValue[10006,_selected];
+ if (_selectedTeam != _lastTeam) then {Call Compile Format["%1Team%2Vote = _selectedTeam;publicVariable '%1Team%2Vote';",sideJoinedText,clientID]};
+ _lastTeam = _selectedTeam;
+ };
+}; \ No newline at end of file
diff --git a/Client/GUI/GUI_MissionTasks.sqf b/Client/GUI/GUI_MissionTasks.sqf
new file mode 100644
index 0000000..e5700b6
--- /dev/null
+++ b/Client/GUI/GUI_MissionTasks.sqf
@@ -0,0 +1,65 @@
+
+private ["_locations","_sideID","_names","_skip","_curSel","_display","_map","_sorted"];
+disableSerialization;
+
+MenuAction = -1;
+mouseButtonUp = -1;
+
+_display = _this select 0;
+_map = _display DisplayCtrl 19002;
+
+if (isNull currentMission) then {ctrlSetText [19007,Format [localize "STR_WF_CurrentMission","N/A"]]} else {ctrlSetText [19007,Format [localize "STR_WF_CurrentMission",currentMission getVariable "name"]];};
+
+_names = [];
+_locations = [];
+{_sideID = _x getVariable "sideID"; if (_sideID != sideID) then {_locations = _locations + [_x]}} forEach towns;
+_sorted = [player,_locations] Call SortByDistance;
+{_names = _names + [_x getVariable "name"]} forEach _sorted;
+
+{lbAdd[19005,_x]} forEach _names;
+if (count _sorted > 0) then {
+ lbSetCurSel[19005,0];
+ _map CtrlMapAnimAdd [2,.140,GetPos (_sorted select 0)];
+ CtrlMapAnimCommit _map;
+};
+
+while {alive player && dialog} do {
+ sleep 0.1;
+ if (Side player != sideJoined) exitWith {closeDialog 0};
+ if (!dialog) exitWith {};
+
+ //--- Accept Mision.
+ if (MenuAction == 1) then {
+ MenuAction = -1;
+ _skip = false;
+ if (!isNil "townTask") then {if (taskState townTask == "Succeeded") then {["TownRemove",currentMission] Call TaskSystem;currentMission = objNull}} ;
+ if (!isNull currentMission) then {hint (localize "STR_WF_Mission_Running");_skip = true};
+ if (!_skip) then {
+ _curSel = lbCurSel (19005);
+ currentMission = _sorted select _curSel;
+ ctrlSetText [19007,Format [localize "STR_WF_CurrentMission",currentMission getVariable "name"]];
+ //--- Task System.
+ ["TownAdd",currentMission] Spawn TaskSystem;
+ };
+ };
+
+ //--- Abort Mision.
+ if (MenuAction == 2) then {
+ MenuAction = -1;
+ if (!isNull currentMission) then {
+ ["TownRemove",currentMission] Call TaskSystem;
+ ctrlSetText [19007,Format [localize "STR_WF_CurrentMission","N/A"]];
+ currentMission = objNull;
+ hint (localize "STR_WF_Mission_Abort");
+ };
+ };
+
+ //--- Other Town selected.
+ if (MenuAction == 101) then {
+ MenuAction = -1;
+ _curSel = lbCurSel (19005);
+ CtrlMapAnimClear _map;
+ _map CtrlMapAnimAdd [2,.140,GetPos (_sorted select _curSel)];
+ CtrlMapAnimCommit _map;
+ };
+}; \ No newline at end of file
diff --git a/Client/GUI/GUI_Parameters.sqf b/Client/GUI/GUI_Parameters.sqf
new file mode 100644
index 0000000..4f93ce9
--- /dev/null
+++ b/Client/GUI/GUI_Parameters.sqf
@@ -0,0 +1,23 @@
+/* Ingame parameters dump. */
+private ["_i","_paramName","_text","_values","_texts","_value","_status","_uptime","_getTime"];
+
+for [{_i = 0},{_i < (count (missionConfigFile/"Params"))},{_i = _i + 1}] do {
+ _paramName = (configName ((missionConfigFile >> "Params") select _i));
+ _text = getText (missionConfigFile >> "Params" >> _paramName >> "title");
+ _values = getArray (missionConfigFile >> "Params" >> _paramName >> "values");
+ _texts = getArray (missionConfigFile >> "Params" >> _paramName >> "texts");
+
+ _value = if (isMultiplayer) then {paramsArray select _i} else {getNumber (missionConfigFile >> "Params" >> _paramName >> "default")};
+ _status = _texts select (_values find _value);
+
+ lnbAddRow [22003,[_text,_status]];
+};
+
+while {alive player && dialog} do {
+ _uptime = Call GetTime;
+ ctrlSetText [22005,Format[localize 'STR_WF_Uptime',_uptime select 0,_uptime select 1,_uptime select 2, _uptime select 3]];
+
+ sleep 0.1;
+ if (side player != sideJoined) exitWith {closeDialog 0};
+ if (!dialog) exitWith {};
+}; \ No newline at end of file
diff --git a/Client/GUI/GUI_Respawn.sqf b/Client/GUI/GUI_Respawn.sqf
new file mode 100644
index 0000000..897080a
--- /dev/null
+++ b/Client/GUI/GUI_Respawn.sqf
@@ -0,0 +1,156 @@
+private ["_display", "_map", "_hq", "_respawnCampsRuleMode", "_availableSpawn", "_buildings", "_checks", "_mobileRespawns", "_upgrades", "_range", "_farps", "_markers", "_markerIndex", "_markerName", "_spawn", "_ta", "_position", "_sorted", "_loadDefault", "_mode", "_skip", "_price", "_funds", "_safeArray", "_temp", "_listbp", "_weaps"];
+disableSerialization;
+
+MenuAction = -1;
+mouseButtonUp = -1;
+_display = _this select 0;
+_map = _display displayCtrl 15001;
+
+_spawn = objNull;
+_availableSpawn = [];
+_markers = [];
+_markerIndex = 0;
+_ta = "";
+_lastSpawnUpdate = 0;
+
+//--- Wait until the player respawned.
+waitUntil {alive player};
+
+//--- Position the player at the temp location during his respawn.
+player setPos ([getMarkerPos Format["%1TempRespawnMarker",sideJoinedText],1,10] Call GetRandomPosition);
+if (leader(group player) != player) then {(group player) selectLeader player};
+
+//--- Call the pre respawn routine.
+(player) Call PreRespawnHandler;
+
+//--- Spawn a countdown thread.
+respawnDone = false;
+_handleTimer = [] Spawn {
+ if (isNil 'respawnStatus') then {respawnStatus = 'WFBE_RESPAWNDELAY' Call GetNamespace};
+ while {respawnStatus >= 0} do {
+ sleep 1;
+ respawnStatus = respawnStatus - 1;
+ };
+ respawnDone = true;
+};
+
+//--- Run the main respawn thread.
+while {!respawnDone} do {
+ //--- Exit the thread if the client died.
+ if !(alive player) exitWith {};
+
+ //--- Loadout Selection.
+ ctrlSetText [15004, if (WFBE_RespawnDefaultGear) then {"D"} else {"C"}];
+
+ //--- Preloading Status.
+ ctrlSetText [15005, if (WFBE_EnablePreload) then {"P"} else {"N"}];
+
+ //--- Update the respawn info.
+ if (time - _lastSpawnUpdate > 2) then {
+ _lastSpawnUpdate = time;
+ _lastAvailableSpawn = _availableSpawn;
+ _availableSpawn = [sideJoined,deathLocation] Call GetRespawnAvailable;
+
+ //--- First launch.
+ if (isNull _spawn) then {
+ _spawn = _availableSpawn select 0;
+ _ta = ["TempAnim",getPos _spawn,"Select",1.4,"ColorBlue",1.4,1.8] Spawn MarkerAnim;
+ respawnName = [typeOf _spawn, 'displayName'] Call GetConfigInfo;
+ };
+
+ //--- Properly update the client's map - Update removal.
+ _found = false;
+ {
+ if !(_x in _availableSpawn) then {
+ _mid = _x getVariable 'WFBE_IDRMarker';
+ _markers = _markers - [_mid];
+ deleteMarkerLocal _mid;
+ _x setVariable ['WFBE_IDRMarker',nil];
+ if (_x == _spawn && !_found) then {
+ _found = true;
+ _spawn = ([_x, _availableSpawn] Call SortByDistance) select 0;
+ terminate _ta;
+ deleteMarkerLocal "TempAnim";
+ _ta = ["TempAnim",getPos _spawn,"Select",1.4,"ColorBlue",1.4,1.8] Spawn MarkerAnim;
+ respawnName = [typeOf _spawn, 'displayName'] Call GetConfigInfo;
+ };
+ };
+ } forEach _lastAvailableSpawn;
+
+ //--- Properly update the client's map - Update add.
+ {
+ if !(_x in _lastAvailableSpawn) then {
+ _markerName = Format ["respawnMarker%1",_markerIndex];
+ _markers = _markers + [_markerName];
+ createMarkerLocal [_markerName,getPos _x];
+ _markerName setMarkerTypeLocal "Select";
+ _markerName setMarkerColorLocal "ColorYellow";
+ _markerName setMarkerSizeLocal [1,1];
+ _markerIndex = _markerIndex + 1;
+ _x setVariable ['WFBE_IDRMarker',_markerName];
+ };
+ } forEach _availableSpawn;
+ };
+
+ //--- Update the respawn timer.
+ ctrlSetText [15003,Format [localize "STR_WF_RespawnStatus",respawnStatus,respawnName]];
+
+ //--- The client has clicked on the map.
+ if (mouseButtonUp == 0) then {
+ mouseButtonUp = -1;
+ if (count _availableSpawn > 1) then {
+ _position = _map PosScreenToWorld[mouseX,mouseY];
+ _sorted = [_position,_availableSpawn] Call SortByDistance;
+ if ((_sorted select 0) distance _position < 500) then {
+ _spawn = _sorted select 0;
+ activeAnimMarker = false;
+ terminate _ta;
+ deleteMarkerLocal "TempAnim";
+ _ta = ["TempAnim",getPos _spawn,"Select",1.4,"ColorBlue",1.4,1.8] Spawn MarkerAnim;
+ respawnName = [typeOf _spawn, 'displayName'] Call GetConfigInfo;
+ };
+ };
+ };
+
+ sleep 0.1;
+};
+
+//--- If the spawn is null, we use the HQ.
+if (isNull _spawn) then {
+ _hq = (sideJoinedText) Call GetSideHQ;
+ _spawn = _hq;
+};
+
+//--- Pre-render.
+if (WFBE_EnablePreload) then {
+ ctrlSetText [15003,localize 'STR_WF_Preload'];
+ waitUntil{preloadCamera (getPos _spawn) || !(alive player)};
+};
+
+//--- Execute on respawn code only if the player's alive.
+if (alive player) then {
+ [player,_spawn] Call OnRespawnHandler;
+};
+
+//--- Terminate the threads & cleaning.
+{deleteMarkerLocal _x} forEach _markers;
+{_x setVariable ['WFBE_IDRMarker',nil]} forEach _availableSpawn;
+if !(isNil "DeathCamera") then {
+ DeathCamera cameraEffect["TERMINATE","BACK"];
+ camDestroy DeathCamera;
+};
+
+"dynamicBlur" ppEffectEnable false;
+"colorCorrections" ppEffectEnable false;
+[currentFX] Spawn FX;
+terminate _ta;
+if !(scriptDone _handleTimer) then {terminate _handleTimer};
+deleteMarkerLocal "TempAnim";
+activeAnimMarker = false;
+playerDead = false;
+respawnDone = nil;
+respawnName = nil;
+respawnStatus = nil;
+closeDialog 0;
+
+hint (localize "STR_WF_RespawnInfo"); \ No newline at end of file
diff --git a/Client/GUI/GUI_SetCurrentCutDisplay.sqf b/Client/GUI/GUI_SetCurrentCutDisplay.sqf
new file mode 100644
index 0000000..546a648
--- /dev/null
+++ b/Client/GUI/GUI_SetCurrentCutDisplay.sqf
@@ -0,0 +1 @@
+["currentCutDisplay", _this Select 0] call BIS_FNC_GUIset; \ No newline at end of file
diff --git a/Client/GUI/GUI_SupportMenu.sqf b/Client/GUI/GUI_SupportMenu.sqf
new file mode 100644
index 0000000..282ee37
--- /dev/null
+++ b/Client/GUI/GUI_SupportMenu.sqf
@@ -0,0 +1,271 @@
+MenuAction = -1;
+
+_vehi = [group player,false] Call GetTeamVehicles;
+_alives = (units group player) Call GetLiveUnits;
+{if (vehicle _x == _x) then {_vehi = _vehi + [_x]}} forEach _alives;
+_lastUse = 0;
+ctrlEnable [20007,false];
+_typeRepair = Format['WFBE_%1REPAIRTRUCKS',sideJoinedText] Call GetNamespace;
+_ss = 'WFBE_SUPPLYSYSTEM' Call GetNamespace;
+_sheal = 'WFBE_SUPPORTHEALTIME' Call GetNamespace;
+_srearm = 'WFBE_SUPPORTREARMTIME' Call GetNamespace;
+_srefuel = 'WFBE_SUPPORTREFUELTIME' Call GetNamespace;
+_srepair = 'WFBE_SUPPORTREPAIRTIME' Call GetNamespace;
+
+_healPrice = 0;
+_repairPrice = 0;
+_refuelPrice = 0;
+_rearmPrice = 0;
+_lastVeh = objNull;
+_lastDmg = 0;
+_lastFue = 0;
+
+_buildings = (sideJoinedText) Call GetSideStructures;
+
+//--- Service Point.
+_csp = objNull;
+_sp = [sideJoined, Format ["WFBE_%1SERVICEPOINTTYPE",sideJoinedText] Call GetNamespace,_buildings] Call GetFactories;
+if (count _sp > 0) then {
+ _sorted = [player,_sp] Call SortByDistance;
+ _csp = _sorted select 0;
+};
+
+if (paramEASA) then {
+ _enable = false;
+ _currentUpgrades = (sideJoinedText) Call GetSideUpgrades;
+ _easaLevel = _currentUpgrades select 15;
+ if (!(isNull _csp) && _easaLevel > 0) then {
+ if (player distance _csp < ('WFBE_SUPPORTRANGE' Call GetNamespace)) then {
+ if (typeOf(vehicle player) in ('WFBE_EASA_Vehicles' Call GetNamespace)) then {
+ if (driver (vehicle player) == player) then {_enable = true};
+ };
+ };
+ };
+ ctrlEnable [20010,_enable];
+} else {
+ ctrlEnable [20010,false];
+};
+
+_effective = [];
+_nearSupport = [];
+_spType = Call Compile Format ["%1SP",sideJoinedText];
+_i = 0;
+{
+ _closestSP = objNull;
+ _add = false;
+
+ _nearSupport set [_i, []];
+
+ //--- Service Point.
+ if (count _sp > 0) then {
+ _sorted = [_x,_sp] Call SortByDistance;
+ _closestSP = _sorted select 0;
+ if !(isNull _closestSP) then {
+ if (_x distance _closestSP < ('WFBE_SUPPORTRANGE' Call GetNamespace)) then {
+ _add = true;
+ _nearSupport set [_i,(_nearSupport select _i) + [_closestSP]];
+ };
+ };
+ };
+
+ //--- Depots.
+ _nObjects = nearestObjects [_x, WFDEPOT,('WFBE_SUPPORTRANGE' Call GetNamespace)];
+ _nObject = if (count _nObjects > 0) then {_nObjects select 0} else {objNull};
+ if !(isNull _nObject) then {
+ _sideID = _nObject getVariable "sideID";
+ if !(isNil "_sideID") then {
+ if (_sideID == sideID) then {
+ _add = true;
+ _nearSupport set [_i,(_nearSupport select _i) + [_nObject]];
+ };
+ };
+ };
+
+ //--- Repairs Trucks.
+ _checks = (getPos _x) nearEntities[_typeRepair,'WFBE_REPAIRTRUCKRANGE' Call GetNamespace];
+ if (count _checks > 0) then {
+ _add = true;
+ _nearSupport set [_i,(_nearSupport select _i) + _checks];
+ };
+
+ //--- Add the vehicle ?
+ if (_add) then {
+ _effective = _effective + [_x];
+ _desc = [typeOf _x, 'displayName'] Call GetConfigInfo;
+ _finalNumber = (_x) Call GetAIDigit;
+ _isInVehicle = "";
+ if (_x != vehicle _x) then {
+ _descVehi = [typeOf (vehicle _x), 'displayName'] Call GetConfigInfo;
+ _isInVehicle = " [" + _descVehi + "] ";
+ };
+ _txt = "["+_finalNumber+"] "+ _desc + _isInVehicle;
+ lbAdd[20002,_txt];
+
+ _i = _i + 1;
+ };
+} forEach _vehi;
+
+_checks = (getPos player) nearEntities[_typeRepair,'WFBE_REPAIRTRUCKRANGE' Call GetNamespace];
+if (count _checks > 0) then {
+ _repair = _checks select 0;
+ _vehi = ((getPos _repair) nearEntities[["Car","Motorcycle","Tank","Air","Ship","StaticWeapon"],100]) - [_repair];
+ {
+ if !(_x in _effective) then {
+ _effective = _effective + [_x];
+ _nearSupport set [_i,[_repair]];
+ _descVehi = [typeOf (vehicle _x), 'displayName'] Call GetConfigInfo;
+ lbAdd[20002,_descVehi];
+
+ _i = _i + 1;
+ };
+ } forEach _vehi;
+};
+
+if (count _effective > 0) then {lbSetCurSel[20002,0]};
+
+while {true} do {
+ sleep 0.1;
+
+ if (Side player != sideJoined) exitWith {closeDialog 0};
+ if (!dialog) exitWith {};
+ _curSel = lbCurSel(20002);
+
+ _isCommander = false;
+
+ if (!isNull(commanderTeam)) then {if (commanderTeam == Group player) then {_isCommander = true}};
+ _enabled = if (time - _lastUse > 5 && _isCommander && _ss == 0) then {true} else {false};
+ ctrlEnable [20007,_enabled];
+
+ if (_curSel != -1) then {
+ _veh = (vehicle (_effective select _curSel));
+ _funds = Call GetPlayerFunds;
+
+ if (_veh isKindOf "Man") then {
+ {ctrlEnable [_x,false]} forEach [20003,20004,20005];
+ _enabled = if (_funds >= _healPrice) then {true} else {false};
+ ctrlEnable [20008,_enabled];
+ //--- Healing.
+ _healPrice = round((getDammage _veh)*('WFBE_SUPPORTHEALPRICE' Call GetNamespace));
+ ctrlSetText [20011,"$0."];
+ ctrlSetText [20012,"$0."];
+ ctrlSetText [20013,"$0."];
+ ctrlSetText [20014,"$"+str(_healPrice)+"."];
+ } else {
+ //--- Prevent on the air re-supply.
+ _canBeUsed = if ((getPos _veh) select 2 <= 2 && speed _veh <= 20) then {true} else {false};
+ _enabled = if (_canBeUsed && _funds >= _rearmPrice) then {true} else {false};
+ ctrlEnable [20003,_enabled];
+ _enabled = if (_canBeUsed && _funds >= _repairPrice) then {true} else {false};
+ ctrlEnable [20004,_enabled];
+ _enabled = if (_canBeUsed && _funds >= _refuelPrice) then {true} else {false};
+ ctrlEnable [20005,_enabled];
+ _enabled = if (_canBeUsed && _funds >= _healPrice) then {true} else {false};
+ ctrlEnable [20008,_enabled];
+ //--- Healing.
+ _healPrice = 0;
+ {
+ if (alive _x) then {_healPrice = _healPrice + round((getDammage _x)*('WFBE_SUPPORTHEALPRICE' Call GetNamespace))};
+ } forEach (crew _veh);
+ ctrlSetText [20014,"$"+str(_healPrice)+"."];
+ //--- Repair.
+ if (_veh != _lastVeh || getDammage _veh != _lastDmg) then {
+ _type = typeOf _veh;
+ _lastDmg = getDammage _veh;
+ _get = _type Call GetNamespace;
+ if !(isNil '_get') then {
+ _repairPrice = round((getDammage _veh)*((_get select QUERYUNITPRICE)/('WFBE_SUPPORTREPAIRPRICE' Call GetNamespace)));
+ } else {
+ _repairPrice = 500;
+ };
+ };
+ ctrlSetText [20012,"$"+str(_repairPrice)+"."];
+ //--- Rearm.
+ if (_veh != _lastVeh) then {
+ _type = typeOf _veh;
+ _get = _type Call GetNamespace;
+ if !(isNil '_get') then {
+ _rearmPrice = round((_get select QUERYUNITPRICE)/('WFBE_SUPPORTREARMPRICE' Call GetNamespace));
+ } else {
+ _rearmPrice = 500;
+ };
+ };
+ ctrlSetText [20011,"$"+str(_rearmPrice)+"."];
+ //--- Refuel.
+ if (_veh != _lastVeh || fuel _veh != _lastFue) then {
+ _type = typeOf _veh;
+ _lastFue = fuel _veh;
+ _get = _type Call GetNamespace;
+ if !(isNil '_get') then {
+ _fuel = ((fuel _veh) -1) * -1;
+ _refuelPrice = round(_fuel*((_get select QUERYUNITPRICE)/('WFBE_SUPPORTREFUELPRICE' Call GetNamespace)));
+ } else {
+ _refuelPrice = 200;
+ };
+ };
+ ctrlSetText [20013,"$"+str(_refuelPrice)+"."];
+ };
+
+ _lastVeh = _veh;
+
+ //--- Rearm.
+ if (MenuAction == 1) then {
+ MenuAction = -1;
+ -_rearmPrice Call ChangePlayerFunds;
+
+ //--- Spawn a Rearm thread.
+ [_veh,_nearSupport select _curSel,_typeRepair,_spType] Spawn SupportRearm;
+ };
+
+ //--- Repair.
+ if (MenuAction == 2) then {
+ MenuAction = -1;
+ -_repairPrice Call ChangePlayerFunds;
+
+ //--- Spawn a Repair thread.
+ [_veh,_nearSupport select _curSel,_typeRepair,_spType] Spawn SupportRepair;
+ };
+
+ //--- Refuel.
+ if (MenuAction == 3) then {
+ MenuAction = -1;
+ -_refuelPrice Call ChangePlayerFunds;
+
+ //--- Spawn a Refuel thread.
+ [_veh,_nearSupport select _curSel,_typeRepair,_spType] Spawn SupportRefuel;
+ };
+
+ //--- Heal.
+ if (MenuAction == 5) then {
+ MenuAction = -1;
+ -_healPrice Call ChangePlayerFunds;
+
+ //--- Spawn a Healing thread.
+ [_veh,_nearSupport select _curSel,_typeRepair,_spType] Spawn SupportHeal;
+ };
+ } else {
+ {ctrlEnable[_x,false]} forEach [20003,20004,20005,20008];
+ };
+
+ //--- Respawn Supply Trucks.
+ if (MenuAction == 4) then {
+ MenuAction = -1;
+ WFBE_RequestSpecial = ['SRVFNCREQUESTSPECIAL',["RespawnST",sideJoined]];
+ publicVariable 'WFBE_RequestSpecial';
+ if (isHostedServer) then {['SRVFNCREQUESTSPECIAL',["RespawnST",sideJoined]] Spawn HandleSPVF};
+ _lastUse = time;
+ };
+
+ //--- EASA. TBD: Add dialog;
+ if (MenuAction == 7) then {
+ MenuAction = -1;
+ closeDialog 0;
+ createDialog "RscDisplayEASA";
+ };
+
+ //--- Parameters.
+ if (MenuAction == 6) exitWith {
+ MenuAction = -1;
+ closeDialog 0;
+ createDialog "RscDisplayIngameParameters";
+ };
+};
diff --git a/Client/GUI/GUI_TeamMenu.sqf b/Client/GUI/GUI_TeamMenu.sqf
new file mode 100644
index 0000000..2206ad3
--- /dev/null
+++ b/Client/GUI/GUI_TeamMenu.sqf
@@ -0,0 +1,174 @@
+
+private ["_xtra","_i","_descVehi","_isInVehicle","_desc","_text","_amount","_val","_val2",
+"_ainumber","_finalNumber","_txt","_funds","_objects","_vehicle","_destroy","_units","_curUnitSel",
+"_pos","_vehi","_timer","_curSel","_currentVD","_transferAmount","_lastvd","_lasttg","_is","_x"];
+disableSerialization;
+
+MenuAction = -1;
+
+switch (votePopUp) do {
+ case true: {CtrlShow [13017,false]};
+ case false: {CtrlShow [13016,false]};
+};
+
+_currentVD = viewDistance;
+_funds = Call GetPlayerFunds;
+ctrlSetText [13002, Format [localize "STR_WF_ViewDistance",_currentVD]];
+ctrlSetText [13004, Format [localize "STR_WF_TerrainGrid",currentTG]];
+ctrlSetText [13006, Format [localize "STR_WF_MoneyTransfer",0]];
+ctrlSetText [13010, Format [localize "STR_WF_Income",Call GetPlayerFunds,(sideJoined) Call GetIncome]];
+
+SliderSetRange[13003,1,('WFBE_MAXVIEWDISTANCE' Call GetNamespace)];
+SliderSetRange[13005,1,('WFBE_MAXCLUTTERDISTANCE' Call GetNamespace)];
+SliderSetRange[13007,0,_funds];
+SliderSetPosition[13003,_currentVD];
+SliderSetPosition[13005,currentTG];
+_lastvd = _currentVD;
+_lasttg = currentTG;
+_timer = 0;
+
+_i = 1;
+{
+ _xtra = if (isPlayer (leader _x)) then {name (leader _x)} else {"AI"};
+ lbAdd[13008,Format ["[%1] %2",_i,_xtra]];
+ _i = _i + 1;
+} forEach clientTeams;
+lbSetCurSel[13008,0];
+
+_units = ((Units Group player) Call GetLiveUnits);
+_units = _units - [player];
+{
+ _desc = [typeOf _x, 'displayName'] Call GetConfigInfo;
+ _finalNumber = (_x) Call GetAIDigit;
+ _isInVehicle = "";
+ if (_x != vehicle _x) then {
+ _descVehi = [typeOf (vehicle _x), 'displayName'] Call GetConfigInfo;
+ _isInVehicle = " [" + _descVehi + "] ";
+ };
+ _txt = "["+_finalNumber+"] "+ _desc + _isInVehicle;
+ lbAdd[13013,_txt];
+} forEach _units;
+lbSetCurSel[13013,0];
+
+{lbAdd[13018,_x]} forEach ["None","FX 1","FX 2","FX 3","FX 4","FX 5"];
+lbSetCurSel[13018,currentFX];
+
+while {alive player && dialog} do {
+ sleep 0.05;
+
+ if (Side player != sideJoined) exitWith {closeDialog 0};
+ if (!dialog) exitWith {};
+
+ _curSel = lbCurSel 13008;
+ _currentVD = Floor (SliderPosition 13003);
+ currentTG = Floor (SliderPosition 13005);
+ _transferAmount = Floor (SliderPosition 13007);
+
+ ctrlSetText [13002, Format [localize "STR_WF_ViewDistance",_currentVD]];
+ ctrlSetText [13004, Format [localize "STR_WF_TerrainGrid",currentTG]];
+ ctrlSetText [13006, Format [localize "STR_WF_MoneyTransfer",_transferAmount]];
+
+ if (MenuAction == 1) then {
+ MenuAction = -1;
+ if ((_transferAmount != 0)&&((clientTeams select _curSel) != group player)) then {
+ [(clientTeams select _curSel),_transferAmount] Call ChangeTeamFunds;
+ -_transferAmount Call ChangePlayerFunds;
+ _funds = Call GetPlayerFunds;
+ WFBE_LocalizeMessage = [vehicleVarName leader (clientTeams select _curSel),'CLTFNCLOCALIZEMESSAGE',['FundsTransfer',_transferAmount,name player]];
+ publicVariable 'WFBE_LocalizeMessage';
+ if (isHostedServer) then {[vehicleVarName leader (clientTeams select _curSel),'CLTFNCLOCALIZEMESSAGE',['FundsTransfer',_transferAmount,name player]] Spawn HandlePVF};
+ sliderSetRange[13007,0,_funds];
+ };
+ };
+
+ if (MenuAction == 2) then {
+ MenuAction = -1;
+ _vehicle = vehicle player;
+ if (player != _vehicle) then {
+ if (getPos _vehicle select 2 > 3 && !surfaceIsWater (getPos _x)) then {
+ [_vehicle, getPos _vehicle, 15] Call PlaceSafe;
+ } else {
+ _vehicle setPos [getPos _vehicle select 0, getPos _vehicle select 1, 0.5];
+ _vehicle setVelocity [0,0,-0.5];
+ };
+ };
+ if (player == _vehicle) then {
+ _objects = player nearEntities[["Car","Motorcycle","Tank"],10];
+ if (count _objects > 0) then {
+ {
+ if (getPos _x select 2 > 3 && !surfaceIsWater (getPos _x)) then {
+ [_x, getPos _x, 15] Call PlaceSafe;
+ } else {
+ _x setPos [getPos _x select 0, getPos _x select 1, 0.5];
+ _x setVelocity [0,0,-0.5];
+ };
+ } forEach _objects;
+ };
+ };
+ };
+
+ if (MenuAction == 3) then {
+ MenuAction = -1;
+ _curUnitSel = lbCurSel 13013;
+ if (_curUnitSel != -1) then {
+ _vehicle = vehicle (_units select _curUnitSel);
+ _destroy = [(_units select _curUnitSel)];
+ if (_vehicle != (_units select _curUnitSel)) then {_destroy = _destroy + [_vehicle]};
+ {
+ if (_x isKindOf 'Man') then {removeAllWeapons _x};
+ _x setDammage 1;
+ } forEach _destroy;
+
+ _units = ((Units Group player) Call GetLiveUnits);
+ _units = _units - [leader group player];
+ lbClear 13013;
+ {
+ _desc = [typeOf _x, 'displayName'] Call GetConfigInfo;
+ _finalNumber = (_x) Call GetAIDigit;
+ _isInVehicle = "";
+ if (_x != vehicle _x) then {
+ _descVehi = [typeOf (vehicle _x), 'displayName'] Call GetConfigInfo;
+ _isInVehicle = " [" + _descVehi + "] ";
+ };
+ _txt = "["+_finalNumber+"] "+ _desc + _isInVehicle;
+ lbAdd[13013,_txt];
+ } forEach _units;
+ lbSetCurSel[13013,0];
+ };
+ };
+
+ if (MenuAction == 4) then {
+ MenuAction = -1;
+ closeDialog 0;
+ titleCut["","BLACK FADED",0];
+ _pos = position player;
+ _vehi = "Lada1" createVehicle [0,0,0];
+ player moveInCargo _vehi;
+ deleteVehicle _vehi;
+ player setPos _pos;
+ titleCut["","BLACK IN",5];
+ };
+
+ if (MenuAction == 5) then {
+ MenuAction = -1;
+ if (votePopUp) then {votePopUp = false} else {votePopUp = true};
+ switch (votePopUp) do {
+ case true: {CtrlShow [13017,false];CtrlShow [13016,true]};
+ case false: {CtrlShow [13016,false];CtrlShow [13017,true]};
+ };
+ };
+
+ if (MenuAction == 6) then {
+ MenuAction = -1;
+ currentFX = lbCurSel 13018;
+ [currentFX] Spawn FX;
+ };
+
+ if (_currentVD != _lastvd) then {setViewDistance _currentVD};
+ if (currentTG != _lasttg) then {setTerrainGrid currentTG};
+ _lastvd = _currentVD;
+ _lasttg = currentTG;
+
+ if (_timer > 2) then {ctrlSetText [13010, Format [localize "STR_WF_Income",Call GetPlayerFunds,(sideJoined) Call GetIncome]];_timer = 0};
+ _timer = _timer + 0.05;
+};
diff --git a/Client/GUI/GUI_TeamOrders.sqf b/Client/GUI/GUI_TeamOrders.sqf
new file mode 100644
index 0000000..3b67594
--- /dev/null
+++ b/Client/GUI/GUI_TeamOrders.sqf
@@ -0,0 +1,571 @@
+private ["_display","_mode","_updateProperties","_updateRespawn","_updateTab","_IDCTeam",
+"_IDCTasks","_IDCDetails","_TaskTypes","_TaskDuration","_TaskDurationLabel","_radio","_radioLabel",
+"_detailGroup","_u","_templates","_curSel","_team","_index","_txt","_map","_behaviors","_combatModes",
+"_formations","_speeds","_structures","_hq","_structuresLbl","_nearest","_nearTown","_type","_lbl",
+"_fillList","_isAll","_enable","_currentCoord","_currentMission","_position","_special","_isDisabled","_color",
+"_order","_isAdded","_array","_existingStruct","_closest","_id","_supplyB","_supply","_taskType",
+"_taskTime","_taskTimeLabel","_curType","_behavior","_combat","_formation","_speed","_to","_respawn","_iddx","_unit"];
+
+disableSerialization;
+
+MenuAction = -1;
+mouseButtonUp = -1;
+_display = _this select 0;
+
+//--- Alt.
+_mode = 0; //--- Team properties.
+
+_updateProperties = true;
+_updateRespawn = true;
+_updateTab = false;
+
+_IDCTeam = [14009,14010,14016,14017,14018,14019,14020,14021,14022,14023,14024,14025,14026,14027,14030,14031,14901,14902];
+_IDCTasks = [14017,14018,14021,14022,14030,14032];
+_IDCDetails = [14030,14041,14042,14043];
+{ctrlShow[_x,false]} forEach (_IDCTasks + _IDCDetails);
+{ctrlShow[_x,true]} forEach _IDCTeam;
+_TaskTypes = ["Assist","Attack","Defend","Destroy","Guard","Hold","Patrol","Move","Search and Destroy","Seize","Support"];
+_TaskDuration = [1,2,3,4,5,6,7,8,9,10,15,20,25,30,35,40,45,50,55,60];
+_TaskDurationLabel = ["1 Min","2 Min","3 Min","4 Min","5 Min","6 Min","7 Min","8 Min","9 Min","10 Min","15 Min","20 Min","25 Min","30 Min","35 Min","40 Min","45 Min","50 Min","55 Min","60 Min"];
+_radio = ["all","alpha","bravo","charlie","delta","echo","foxtrot","golf","hotel","india","juliet","kilo","lima","mike","november","oscar","papa"];
+_radioLabel = ["All","Alpha","Bravo","Charlie","Delta","Echo","Foxtrot","Golf","Hotel","India","Juliet","Kilo","Lima","Mike","November","Oscar","Papa"];
+_detailGroup = [];
+
+ctrlSetText [14026,localize "STR_WF_Respawn" + " :"];
+
+_listbox_teams = _display displayCtrl 14012;
+_u = 1;
+lbAdd[14012,localize "STR_WF_All"];
+{lbAdd [14012,Format["[%1] %2",_u,name (leader _x)]];_u = _u + 1} forEach clientTeams;
+lbSetCurSel [14012,1];
+
+_templates = Format["WFBE_%1AITEAMTEMPLATEDESCRIPTIONS",sideJoinedText] Call GetNamespace;
+_templates_upgrades = Format["WFBE_%1AITEAMUPGRADES",sideJoinedText] Call GetNamespace;
+_upgrades = (sideJoined) Call GetSideUpgrades;
+_u = 0;
+_i = 0;
+{
+ _temp_upgr = _templates_upgrades select _i;
+
+ _canAdd = true;
+ for '_k' from 0 to 3 do {
+ if ((_temp_upgr select _k) > (_upgrades select _k)) exitWith {_canAdd = false};
+ };
+
+ if (_canAdd) then {
+ lbAdd [14010,_x];
+ lbSetValue [14010, _u, _i];
+ _u = _u + 1;
+ };
+ _i = _i + 1;
+} forEach _templates;
+lbSort (_display displayCtrl 14010);
+
+_curSel = lbCurSel 14012;
+_teams = [];
+_team = if (_curSel != 0) then {clientTeams select (_curSel - 1)} else {clientTeams select (_curSel + 1)};
+
+_index = (_team) Call GetTeamType;
+if (_index == -1) then {_index = 1};
+lbSetCurSel [14010,[14010,_index] Call UIFindLBValue];
+
+_txt = (_team) Call GetTeamMoveMode;
+if (_txt == "" || _txt == "towns") then {_txt = localize "STR_WF_Mission" + ": " + localize "STR_WF_TakeTowns"};
+if (_txt == "move") then {_txt = localize "STR_WF_Mission" + ": " + localize "STR_WF_Move"};
+if (_txt == "patrol") then {_txt = localize "STR_WF_Mission" + ": " + localize "STR_WF_Patrol"};
+if (_txt == "defense") then {_txt = localize "STR_WF_Mission" + ": " + localize "STR_WF_Defense"};
+ctrlSetText [14013,_txt];
+
+_map = _display displayCtrl 14002;
+//_map ctrlMapAnimAdd [1,.075,getPos (leader(clientTeams select 0))];
+//ctrlMapAnimCommit _map;
+
+ctrlEnable [14015,false];
+ctrlEnable [14014,false];
+
+//--- Set the combo properties.
+_behaviors = ["AWARE","CARELESS","COMBAT","SAFE","STEALTH"];
+_combatModes = ["BLUE","GREEN","RED","WHITE","YELLOW"];
+_formations = ["COLUMN","DIAMOND","ECH LEFT","ECH RIGHT","FILE","LINE","STAG COLUMN","VEE","WEDGE"];
+_speeds = ["LIMITED","FULL","NORMAL"];
+
+{lbAdd [14017, _x]} forEach _behaviors;
+{lbAdd [14018, _x]} forEach _combatModes;
+{lbAdd [14019, _x]} forEach _formations;
+{lbAdd [14020, _x]} forEach _speeds;
+
+_structures = [""];
+_hq = (sideJoinedText) Call GetSideHQ;
+if (alive _hq) then {_structures = _structures + [_hq]};
+_structures = _structures + ((sideJoinedText) Call GetSideStructures);
+_structuresLbl = ["Default"];
+lbAdd[14025,"Default"];
+
+{
+ if (typeName _x == "OBJECT") then {
+ _nearest = [_x,towns] Call SortByDistance;
+ _nearTown = (_nearest select 0) getVariable 'name';
+ _type = [typeOf _x, 'displayName'] Call GetConfigInfo;
+ _lbl = _type + ' ' + _nearTown + ' ' + str (round(player distance _x)) + 'M';
+ _structuresLbl = _structuresLbl + [_lbl];
+ lbAdd[14025,_lbl];
+ };
+} forEach _structures;
+
+while {alive player && dialog} do {
+ sleep 0.1;
+ if (side player != sideJoined) exitWith {activeAnimMarker = false;closeDialog 0};
+ if (!dialog) exitWith {activeAnimMarker = false};
+
+ if (MenuAction == 601) then {if (_mode != 0) then {_updateTab = true};_mode = 0};//--- Team properties.
+ if (MenuAction == 602) then {if (_mode != 1) then {_updateTab = true};_mode = 1};//--- Task.
+ if (MenuAction == 603) then {if (_mode != 2) then {_updateTab = true};_mode = 2};//--- Task.
+
+ _curSel = lbCurSel 14012;
+ _isAll = if (_curSel == 0 || (0 in _teams)) then {true} else {false};
+ _team = if !(_isAll) then {clientTeams select (_curSel - 1)} else {clientTeams select (_curSel + 1)};
+ _teams = lbSelection _listbox_teams;
+
+ if (_updateTab) then {
+ switch (_mode) do {
+ case 0: {
+ {ctrlShow[_x,false]} forEach (_IDCDetails + _IDCTasks);
+ {ctrlShow[_x,true]} forEach _IDCTeam;
+ ctrlSetText[14021,localize "STR_WF_Behavior"];
+ ctrlSetText[14022,localize "STR_WF_CombatMode"];
+ ctrlSetText[14030,localize "STR_WF_TeamsSetting"];
+ lbClear 14017;
+ lbClear 14018;
+ {lbAdd [14017, _x]} forEach _behaviors;
+ {lbAdd [14018, _x]} forEach _combatModes;
+ _updateProperties = true;
+ };
+ case 1: {
+ {ctrlShow[_x,false]} forEach (_IDCDetails + _IDCTeam);
+ {ctrlShow[_x,true]} forEach _IDCTasks;
+ lbClear 14017;
+ lbClear 14018;
+ {lbAdd [14017, _x]} forEach _TaskTypes;
+ {lbAdd [14018, _x]} forEach _TaskDurationLabel;
+ ctrlSetText[14021,localize "STR_WF_TaskTO" + " :"];
+ ctrlSetText[14022,localize "STR_WF_TaskTO_Time" + " :"];
+ ctrlSetText[14030,localize "STR_WF_Tasks"];
+ lbSetCurSel[14017,0];
+ lbSetCurSel[14018,0];
+ };
+ case 2: {
+ {ctrlShow[_x,false]} forEach (_IDCTasks + _IDCTeam);
+ {ctrlShow[_x,true]} forEach _IDCDetails;
+ ctrlSetText[14030,localize "STR_WF_TeamsDetails"];
+ _detailGroup = if (!_isAll) then {(units(clientTeams select (_curSel - 1))) Call GetLiveUnits} else {[]};
+ [_detailGroup,14041] Call UIFillListTeamOrders;
+ _enable = if !(isPlayer leader _team) then {true} else {false};
+ ctrlEnable [14043,_enable];
+ _enable = if !(isPlayer (vehicle leader _team) && vehicle leader _team != leader _team) then {true} else {false};
+ ctrlEnable [14042,_enable];
+ };
+ };
+ _updateTab = false;
+ };
+
+ _txt = (_team) Call GetTeamMoveMode;
+ if (_txt == "" || _txt == "towns") then {_txt = localize "STR_WF_Mission" + ": " + localize "STR_WF_TakeTowns"};
+ if (_txt == "move") then {_txt = localize "STR_WF_Mission" + ": " + localize "STR_WF_Move"};
+ if (_txt == "patrol") then {_txt = localize "STR_WF_Mission" + ": " + localize "STR_WF_Patrol"};
+ if (_txt == "defense") then {_txt = localize "STR_WF_Mission" + ": " + localize "STR_WF_Defense"};
+ ctrlSetText [14013,_txt];
+
+ //--- Team Funds.
+ ctrlSetText [14028,Format [localize 'STR_WF_Cash',str ((_team) Call GetTeamFunds)]];
+
+ if (MenuAction == 1) then {
+ MenuAction = -1;
+ activeAnimMarker = false;
+
+ _index = (_team) Call GetTeamType;
+ _currentCoord = (_team) Call GetTeamMovePos;
+ _currentMission = (_team) Call GetTeamMoveMode;
+ if (typeName _currentCoord == "ARRAY") then {
+ if (count _currentCoord > 0) then {
+ _position = _currentCoord;
+ if (_currentMission == "move") then {["TempAnim",_position,"selector_selectedMission",1,"ColorOrange",1,1.2] Spawn MarkerAnim};
+ if (_currentMission == "patrol") then {["TempAnim",_position,"selector_selectedMission",1,"ColorYellow",1,1.2,"areaPatrol"] Spawn MarkerAnim};
+ if (_currentMission == "defense") then {["TempAnim",_position,"selector_selectedMission",1,"ColorRed",1,1.2] Spawn MarkerAnim};
+ };
+ };
+ if (typeName _currentCoord == "OBJECT") then {
+ if (_currentMission == "towns") then {["TempAnim",getPos _currentCoord,"selector_selectedMission",1,"ColorBlue",1,1.2] Spawn MarkerAnim};
+ };
+
+ _enable = if (isPlayer(leader _team)) then {false} else {true};
+ _special = if (_isAll) then {false} else {if !(isPlayer(leader _team)) then {true} else {false}};
+ ctrlEnable [14011,_special];
+ ctrlEnable [14014,_enable];
+ ctrlEnable [14015,_enable];
+
+ if (_enable) then {
+ _isDisabled = (_team) Call GetTeamAutonomous;
+ if (_isDisabled) then {
+ ctrlEnable [14014,true];
+ ctrlEnable [14015,false];
+ } else {
+ ctrlEnable [14015,true];
+ ctrlEnable [14014,false];
+ };
+ };
+ if (_index == -1) then {_index = 1};
+ lbSetCurSel [14010,[14010,_index] Call UIFindLBValue];
+ if (_mode == 0) then {
+ _updateProperties = true;
+ _updateRespawn = true;
+ };
+ if (_mode == 2) then {
+ _detailGroup = if !(_isAll) then {(units(clientTeams select (_curSel - 1))) Call GetLiveUnits} else {[]};
+ [_detailGroup,14041] Call UIFillListTeamOrders;
+ _enable = if !(isPlayer leader _team) then {true} else {false};
+ ctrlEnable [14043,_enable];
+ };
+ };
+
+ //--- Focus.
+ if (MenuAction == 2) then {
+ MenuAction = -1;
+
+ ctrlMapAnimClear _map;
+ _map ctrlMapAnimAdd [2,.075,getPos(leader _team)];
+ ctrlMapAnimCommit _map;
+ };
+
+ //--- Focus (AI Sub).
+ if (MenuAction == 3) then {
+ MenuAction = -1;
+ _iddx = lnbCurSelRow 14041;
+ if (_iddx != -1) then {
+ _map ctrlMapAnimAdd [1,.095,getPos (_detailGroup select _iddx)];
+ ctrlMapAnimCommit _map;
+ };
+ };
+
+ //--- Take Towns.
+ if (MenuAction == 101) then {
+ MenuAction = -1;
+ if (!_isAll) then {
+ [_team,'towns'] Call SetTeamMoveMode;
+ } else {
+ {[_x,'towns'] Call SetTeamMoveMode} forEach clientTeams;
+ };
+ activeAnimMarker = false;
+ };
+
+ if (mouseButtonUp == 0) then {
+ mouseButtonUp = -1;
+ //--- Move | Patrol | Defend.
+ if (MenuAction == 102 || MenuAction == 103 || MenuAction == 104) then {
+ _color = "";
+ _order = "";
+ _isAdded = "";
+ switch (MenuAction) do {
+ case 102: {_color = "ColorOrange";_order = "MOVE"};
+ case 103: {_color = "ColorYellow";_order = "PATROL";_isAdded = "areaPatrol"};
+ case 104: {_color = "ColorRed";_order = "DEFENSE"};
+ };
+ MenuAction = -1;
+ _position = _map posScreenToWorld[mouseX,mouseY];
+
+ [_curSel,_position,_order,_isAll,_teams] Spawn {
+ Private ["_curSel","_isAll","_order","_position","_radio","_radioLabel","_sideTeam","_teams"];
+ _curSel = _this select 0;
+ _position = _this select 1;
+ _order = _this select 2;
+ _isAll = _this select 3;
+ _teams = _this select 4;
+ //_radio = ["all","alpha","bravo","charlie","delta","echo","foxtrot","golf","hotel","india","juliet","kilo","lima","mike","november","oscar","papa","quebec","romeo","sierra","tango","uniform","victor","whiskey","xray","yankee","zulu"];
+ _radioLabel = ["All","Alpha","Bravo","Charlie","Delta","Echo","Foxtrot","Golf","Hotel","India","Juliet","Kilo","Lima","Mike","November","Oscar","Papa","Quebec","Romeo","Sierra","Tango","Uniform","Victor","Whiskey","X-Ray","Yankee","Zulu"];
+ if (!_isAll) then {
+ _sideTeam = "Team ";
+ for '_i' from 0 to count _teams-1 do {
+ _selected = clientTeams select ((_teams select _i) - 1);
+ _sideTeam = _sideTeam + (_radioLabel select (_teams select _i));
+ if (_i != count _teams -1) then {_sideTeam = _sideTeam + ", "} else {_sideTeam = _sideTeam + " "};
+ };
+
+ player kbTell [sideHQ, WFBE_V_HQTopicSide, "OrderSent",["1","",_sideTeam,[if (sideJoined == west) then {"blueTeam"} else {"redTeam"}]],["2","","moving to position",["HC_MovingToPosition"]],["3","","over.",["Over1"]],true];
+ {
+ _selected = clientTeams select (_x - 1);
+ [_selected,_position] Call SetTeamMovePos;
+ [_selected,_order] Call SetTeamMoveMode;
+ } forEach _teams;
+ } else {
+ player kbTell [sideHQ, WFBE_V_HQTopicSide, "OrderSentAll",["1","","All",["all"]],["2","","moving to position",["HC_MovingToPosition"]],["3","","over.",["Over1"]],true];
+ {
+ [_x,_position] Call SetTeamMovePos;
+ [_x,_order] Call SetTeamMoveMode;
+ } forEach clientTeams;
+ };
+ };
+
+ activeAnimMarker = false;
+ _array = if (_isAdded == "") then {["TempAnim",_position,"selector_selectedMission",1,_color,1,1.2]} else {["TempAnim",_position,"selector_selectedMission",1,_color,1,1.2,_isAdded]};
+ _array Spawn MarkerAnim;
+ };
+
+ //--- Sell Building.
+ if (MenuAction == 105) then {
+ MenuAction = -1;
+ _position = _map posScreenToWorld[mouseX,mouseY];
+ _structures = (sideJoinedText) Call GetSideStructures;
+ _existingStruct = [_position,_structures] Call SortByDistance;
+ if (count _existingStruct > 0) then {
+ _closest = _existingStruct select 0;
+ //--- 100 meters close only.
+ if (_closest distance _position < 100 && isNil {_closest getVariable "WFBE_SOLD"}) then {
+ //--- Spawn a sell thread.
+ (_closest) Spawn {
+ Private ["_closest","_delay","_id","_supplyB","_type"];
+ _closest = _this;
+ _closest setVariable ["WFBE_SOLD", true];
+ _delay = 'WFBE_BUILDINGSELLDELAY' Call GetNamespace;
+ _type = typeOf _closest;
+
+ //--- Inform the side (before).
+ WFBE_LocalizeMessage = [sideJoined,'CLTFNCLOCALIZEMESSAGE',['StructureSell',_type,_delay]];
+ publicVariable 'WFBE_LocalizeMessage';
+ ['StructureSell',_type,_delay] Spawn CLTFNCLocalizeMessage;
+
+ sleep _delay;
+
+ if !(alive _closest) exitWith {};
+
+ _id = (Format ["WFBE_%1STRUCTURENAMES",sideJoinedText] Call GetNamespace) find _type;
+
+ //--- TODO: Change the find system with a getvar system.
+ if (_id > 0) then {
+ _supplyB = (Format ["WFBE_%1STRUCTURECOSTS",sideJoinedText] Call GetNamespace) select _id;
+ _supplyB = round((_supplyB * ('WFBE_STRUCTURESELLPERCENT' Call GetNamespace)) / 100);
+
+ if !(paramMoneyOnly) then {[sideJoined, _supplyB] Call ChangeSideSupply} else {(_supplyB) Call ChangePlayerFunds};
+ };
+
+ //--- Inform the side.
+ WFBE_LocalizeMessage = [sideJoined,'CLTFNCLOCALIZEMESSAGE',['StructureSold',_type]];
+ publicVariable 'WFBE_LocalizeMessage';
+ ['StructureSold',_type] Spawn CLTFNCLocalizeMessage;
+ if (paramUseWorkers) then {_closest setVariable ["sold",true,true]};
+ _closest setDammage 1;
+ };
+ };
+ };
+ };
+
+ //--- Set a Task.
+ if (MenuAction == 306) then {
+ MenuAction = -1;
+ _taskType = _TaskTypes select (lbCurSel 14017);
+ _taskTime = _TaskDuration select (lbCurSel 14018);
+ _taskTimeLabel = _TaskDurationLabel select (lbCurSel 14018);
+ _position = _map posScreenToWorld[mouseX,mouseY];
+ if (!_isAll) then {
+ _sideTeam = "Team ";
+ for '_i' from 0 to count _teams-1 do {
+ _selected = clientTeams select ((_teams select _i) - 1);
+ _sideTeam = _sideTeam + (_radioLabel select (_teams select _i));
+ if (_i != count _teams -1) then {_sideTeam = _sideTeam + ", "} else {_sideTeam = _sideTeam + " "};
+ };
+ player kbTell [sideHQ, WFBE_V_HQTopicSide, "OrderSent",["1","",_sideTeam,[if (sideJoined == west) then {"blueTeam"} else {"redTeam"}]],["2","","moving to position",["HC_MovingToPosition"]],["3","","over.",["Over1"]],true];
+
+ {
+ _selected = clientTeams select (_x - 1);
+ if (alive (leader _selected)) then {
+ WFBE_SetTask = [vehicleVarName (leader _selected),'CLTFNCSETTASK',[_taskType,_taskTime,_taskTimeLabel,_position]];
+ publicVariable 'WFBE_SetTask';
+ if (isHostedServer) then {[vehicleVarName (leader _selected),'CLTFNCSETTASK',[_taskType,_taskTime,_taskTimeLabel,_position]] Spawn HandlePVF};
+ };
+ } forEach _teams;
+ } else {
+ player kbTell [sideHQ, WFBE_V_HQTopicSide, "OrderSentAll",["1","","All",["all"]],["2","","moving to position",["HC_MovingToPosition"]],["3","","over.",["Over1"]],true];
+ WFBE_SetTask = [sideJoined,'CLTFNCSETTASK',[_taskType,_taskTime,_taskTimeLabel,_position]];
+ publicVariable 'WFBE_SetTask';
+ if (isHostedServer) then {[sideJoined,'CLTFNCSETTASK',[_taskType,_taskTime,_taskTimeLabel,_position]] Spawn HandlePVF};
+ };
+ };
+ };
+
+ //--- Respawn.
+ if (MenuAction == 201) then {
+ MenuAction = -1;
+ [_team] Spawn {
+ Private ["_team","_units"];
+ _team = _this select 0;
+ _units = Units _team;
+ if (paramMobileRespawn || (('WFBE_RESPAWNCAMPSMODE' Call GetNamespace) > 0)) then {//--- Make sure that the unit won't spawn back at a camp/ambu.
+ [_team,"forceRespawn"] Call SetTeamRespawn;
+ sleep 2;
+ };
+ _units = _units + ([_team,false] Call GetTeamVehicles);
+ {_x setDammage 1} forEach _units;
+ };
+ };
+
+ //--- Auto AI.
+ if (MenuAction == 301) then {
+ MenuAction = -1;
+ _isDisabled = (_team) Call GetTeamAutonomous;
+ if (_isDisabled) then {
+ ctrlEnable [14015,true];
+ ctrlEnable [14014,false];
+ if (!_isAll) then {
+ {
+ _selected = clientTeams select (_x - 1);
+ [_selected,false] Call SetTeamAutonomous;
+ } forEach _teams;
+ } else {
+ {[_x,false] Call SetTeamAutonomous} forEach clientTeams;
+ };
+ } else {
+ ctrlEnable [14014,true];
+ ctrlEnable [14015,false];
+ if (!_isAll) then {
+ {
+ _selected = clientTeams select (_x - 1);
+ [_selected,true] Call SetTeamAutonomous;
+ } forEach _teams;
+ } else {
+ {[_x,true] Call SetTeamAutonomous} forEach clientTeams;
+ };
+ };
+ };
+
+ //--- Set buy Type
+ if (MenuAction == 302) then {
+ MenuAction = -1;
+ _curType = lbValue [14010, lbCurSel(14010)];
+ if (!_isAll) then {
+ {
+ _selected = clientTeams select (_x - 1);
+ [_selected,_curType] Call SetTeamType;
+ } forEach _teams;
+ } else {
+ {[_x,_curType] Call SetTeamType} forEach clientTeams;
+ };
+ };
+
+ //--- Set property to team.
+ if (MenuAction == 303) then {
+ MenuAction = -1;
+ _behavior = _behaviors select (lbCurSel(14017));
+ _combat = _combatModes select (lbCurSel(14018));
+ _formation = _formations select (lbCurSel(14019));
+ _speed = _speeds select (lbCurSel(14020));
+
+ //--- Locality, process on server.
+ _to = sideJoined;
+ if (!_isAll) then {
+ _to = [];
+ {
+ _selected = clientTeams select (_x - 1);
+ _to = _to + [_selected];
+ } foreach _teams;
+ };
+
+ WFBE_RequestTeamUpdate = ['SRVFNCREQUESTTEAMUPDATE',[_to,_behavior,_combat,_formation,_speed]];
+ publicVariable 'WFBE_RequestTeamUpdate';
+ if (isHostedServer) then {['SRVFNCREQUESTTEAMUPDATE',[_to,_behavior,_combat,_formation,_speed]] Spawn HandleSPVF};
+ };
+
+ //--- Set respawn.
+ if (MenuAction == 304) then {
+ MenuAction = -1;
+ _curSel = lbCurSel 14025;
+ if (_curSel == -1) then {_curSel = 0};
+ if (!_isAll) then {
+ {
+ _selected = clientTeams select (_x - 1);
+ [_selected,(_structures select _curSel)] Call SetTeamRespawn;
+ } forEach _teams;
+ } else {
+ {[_x,(_structures select _curSel)] Call SetTeamRespawn} forEach clientTeams;
+ };
+ };
+
+ //--- Update the respawn info.
+ if (_updateRespawn) then {
+ _updateRespawn = false;
+ _respawn = (_team) Call GetTeamRespawn;
+ _id = _structures find _respawn;
+ if (_id != -1) then {lbSetCurSel [14025,_id]} else {lbSetCurSel[14025,0]};
+ };
+
+ //--- Minimap update (Only refresh when the combo is selected).
+ if (MenuAction == 305 && _updateProperties) then {MenuAction = -1};
+ if (MenuAction == 305) then {
+ MenuAction = -1;
+ _curSel = lbCurSel 14025;
+ if (_curSel == -1) then {_curSel = 0};
+ if (typeName (_structures select _curSel) == "OBJECT") then {
+ _map ctrlMapAnimAdd [1,.095,getPos (_structures select _curSel)];
+ ctrlMapAnimCommit _map;
+ };
+ };
+
+ //--- Units Details.
+ if (MenuAction == 401) then {
+ MenuAction = -1;
+ _iddx = lnbCurSelRow 14041;
+ if (_iddx != -1) then {
+ _unit = _detailGroup select _iddx;
+ _enable = if (!(isPlayer (vehicle _unit)) && vehicle _unit != _unit) then {true} else {false};
+ ctrlEnable [14042,_enable];
+ };
+ };
+
+ //--- Units Details (Unflip)
+ if (MenuAction == 402) then {
+ MenuAction = -1;
+ _iddx = lnbCurSelRow 14041;
+ if (_iddx != -1) then {
+ _unit = _detailGroup select _iddx;
+ if ((getPos _unit select 2) < 5) then {
+ _unit setPos [getPos _unit select 0,getpos _unit select 1,0.5];
+ _unit setVelocity [0,0,-1];
+ _detailGroup = if (!_isAll) then {(units(clientTeams select (_curSel - 1))) Call GetLiveUnits} else {[]};
+ [_detailGroup,14041] Call UIFillListTeamOrders;
+ };
+ };
+ };
+
+ //--- Units Details (Disband)
+ if (MenuAction == 403) then {
+ MenuAction = -1;
+ _iddx = lnbCurSelRow 14041;
+ if (_iddx != -1) then {
+ _unit = _detailGroup select _iddx;
+ _unit setDamage 1;
+ _detailGroup = if (!_isAll) then {(units(clientTeams select (_curSel - 1))) Call GetLiveUnits} else {[]};
+ [_detailGroup,14041] Call UIFillListTeamOrders;
+ };
+ };
+
+ //--- Update team properties.
+ if (_updateProperties) then {
+ _updateProperties = false;
+ _behavior = behaviour (leader _team);
+ _combat = combatMode (leader _team);
+ _formation = formation (leader _team);
+ _speed = speedMode (leader _team);
+
+ //--- Behavior.
+ _id =_behaviors find _behavior;
+ if (_id != -1) then {lbSetCurSel [14017,_id]};
+ //--- Combat Mode.
+ _id =_combatModes find _combat;
+ if (_id != -1) then {lbSetCurSel [14018,_id]};
+ //--- Formation.
+ _id =_formations find _formation;
+ if (_id != -1) then {lbSetCurSel [14019,_id]};
+ //--- Speed.
+ _id =_speeds find _speed;
+ if (_id != -1) then {lbSetCurSel [14020,_id]};
+ };
+};
+
+activeAnimMarker = false;
diff --git a/Client/GUI/GUI_UnitsCamera.sqf b/Client/GUI/GUI_UnitsCamera.sqf
new file mode 100644
index 0000000..2a71926
--- /dev/null
+++ b/Client/GUI/GUI_UnitsCamera.sqf
@@ -0,0 +1,91 @@
+
+private ["_n","_objects","_units","_currentUnit","_cameraSwap","_near","_list","_selected","_currentMode","_display","_cameraModes","_id","_type","_map"];
+disableSerialization;
+_display = _this select 0;
+MenuAction = -1;
+mouseButtonUp = -1;
+
+_cameraModes = ["Internal","External","Gunner","Group"];
+
+_n = 1;
+{lbAdd[21002,Format["[%1] %2",_n,name (leader _x)]];_n = _n + 1} forEach clientTeams;
+_id = clientTeams find playerTeam;
+lbSetCurSel[21002,_id];
+_currentUnit = (player) Call GetUnitVehicle;
+_currentMode = "Internal";
+_currentUnit switchCamera _currentMode;
+_units = (Units (group player) - [player]) Call GetLiveUnits;
+{lbAdd[21004,Format["(%1) %2",getText (configFile >> "CfgVehicles" >> (typeOf (vehicle _x)) >> "displayName"),name _x]];_n = _n + 1} forEach _units;
+
+_type = if (!(difficultyEnabled "3rdPersonView")) then {["Internal"]} else {["Internal","External","Ironsight","Group"]};
+{lbAdd[21006,_x]} forEach _type;
+lbSetCurSel[21006,0];
+
+_map = _display displayCtrl 21007;
+_map ctrlMapAnimAdd [0,.25,getPos _currentUnit];
+ctrlMapAnimCommit _map;
+
+while {true} do {
+ sleep 0.1;
+
+ _cameraSwap = false;
+ if (Side player != sideJoined || !dialog) exitWith {};
+
+ //--- Map click.
+ if (mouseButtonUp == 0) then {
+ mouseButtonUp = -1;
+ _near = _map PosScreenToWorld[mouseX,mouseY];
+ _list = _near nearEntities [["Man","Car","Motorcycle","Ship","Tank","Air"],200];
+ if (count _list > 0) then {
+ _objects = [];
+ {if (!(_x isKindOf "Man") && side _x != sideJoined) then {if (count (crew _x) == 0) then {_objects = _objects - [_x]}};if (side _x == sideJoined) then {_objects = _objects + [_x]}} forEach _list;
+ if (count _objects > 0) then {
+ _units = [_near,_objects] Call SortByDistance;
+ _currentUnit = (_units select 0) Call GetUnitVehicle;
+ _cameraSwap = true;
+ };
+ };
+ };
+
+ //--- Leader Selection.
+ if (MenuAction == 101) then {
+ MenuAction = -1;
+ _selected = leader (clientTeams select (lbCurSel 21002));
+ _currentUnit = (_selected) Call GetUnitVehicle;
+ _n = 0;
+ _units = (Units (group _selected) - [_selected]) Call GetLiveUnits;
+ lbClear 21004;
+ {lbAdd[21004,Format["(%1) %2",GetText (configFile >> "CfgVehicles" >> (typeOf (vehicle _x)) >> "displayName"),name _x]];_n = _n + 1} forEach _units;
+ _cameraSwap = true;
+ };
+
+ //--- Leader commands AIs.
+ if (MenuAction == 102) then {
+ MenuAction = -1;
+ _currentUnit = (_units select (lbCurSel 21004)) Call GetUnitVehicle;
+ _cameraSwap = true;
+ };
+
+ //--- Camera Modes
+ if (MenuAction == 103) then {
+ MenuAction = -1;
+ _currentMode = (_cameraModes select (lbCurSel 21006));
+ _cameraSwap = true;
+ };
+
+ if !(alive _currentUnit) then {
+ _currentUnit = (player) Call GetUnitVehicle;
+ _cameraSwap = true;
+ };
+
+ //--- Update the Camera.
+ if (_cameraSwap) then {
+ ctrlMapAnimClear _map;
+ _map ctrlMapAnimAdd [1,.25,getPos _currentUnit];
+ ctrlMapAnimCommit _map;
+ _currentUnit switchCamera _currentMode;
+ };
+};
+
+closeDialog 0;
+((player) Call GetUnitVehicle) switchCamera _currentMode; \ No newline at end of file
diff --git a/Client/GUI/GUI_UpdateCommanderVoteMenu.sqf b/Client/GUI/GUI_UpdateCommanderVoteMenu.sqf
new file mode 100644
index 0000000..b710999
--- /dev/null
+++ b/Client/GUI/GUI_UpdateCommanderVoteMenu.sqf
@@ -0,0 +1,74 @@
+
+private ["_exit","_name","_playerSlots","_refresh","_count","_reselect","_total","_selection","_selected","_selectedTeam",
+"_lastVotes","_AI","_lastTeams","_lastTeam","_commanderTeam","_voteTime","_votes"];
+_voteTime = WF_Logic getVariable Format ["%1CommanderVoteTime",sideJoinedText];
+if (_voteTime <= 0) exitWith {};
+
+_name = "";
+_lastTeams = [];
+_lastTeam = -2;
+
+_lastVotes = [sideJoined] Call GetCommanderVotes;
+
+while {true} do {
+ sleep 0.1;
+
+ if (!(alive player) || Side player != sideJoined) exitWith {CloseDialog 0;_exit = true};
+ if !(dialog) exitWith {};
+
+ _commanderTeam = [sideJoined] Call GetCommanderFromVotes;
+ if (IsNull _commanderTeam) then {_name = Localize "STR_WF_AI"} else {_name = name leader _commanderTeam};
+
+ _voteTime = WF_Logic getVariable Format ["%1CommanderVoteTime",sideJoinedText];
+ ctrlSetText [10007,Format ["(%1) %2: %3",_name,Localize "STR_WF_TimeLeft",_voteTime]];
+
+ if (_voteTime <= 0) exitWith {CloseDialog 0};
+
+ _refresh = false;
+ _playerSlots = [];
+ {
+ if !(isNil '_x') then {if (isPlayer (leader _x)) then {_playerSlots = _playerSlots + [_x]}};
+ } forEach clientTeams;
+
+ _count = 0;
+ _votes = [sideJoined] Call GetCommanderVotes;
+
+ {if (_x != (_votes Select _count)) then {_refresh = true};_count = _count + 1} ForEach _lastVotes;
+ {if !(_x In _lastTeams) then {_refresh = true}} ForEach _playerSlots;
+ {if !(_x In _playerSlots) then {_refresh = true}} ForEach _lastTeams;
+
+ if (_refresh) then {
+
+ _reselect = false;
+ _selected = lbCurSel 10006;
+ _selectedTeam = lbValue[10006,_selected];
+ _lastVotes = _votes;
+
+ if (_selected != -1) then {_reselect = true};
+
+ lbClear 10006;
+ _AI = lbAdd[10006,Format["%1 [%2]",_votes select 0,Localize "STR_WF_AI"]];
+ lbSetValue [10006,_AI,-1];
+
+ _count = 0;
+ _total = 1;
+
+ {
+ if !(isNil '_x') then {if (_x In _playerSlots) then {_total = _total + 1;_selection = lbAdd[10006,Format ["%1 %2",_votes select _count+1,name (leader _x)]];lbSetValue [10006,_selection,_count]}};_count = _count + 1;
+ } forEach clientTeams;
+ _lastTeams = +_playerSlots;
+
+ if (_reselect) then {
+ _selected = 0;
+ for [{_count = 0},{_count < _total},{_count = _count + 1}] do {if (lbValue[10006,_count] == _selectedTeam) then {_selected = _count}};
+ lbSetCurSel[10006,_selected];
+ };
+ };
+
+ _selected = lbCurSel 10006;
+ if (_selected != -1) then {
+ _selectedTeam = lbValue[10006,_selected];
+ if (_selectedTeam != _lastTeam) then {Call Compile Format["%1Team%2Vote = %3;publicVariable '%1Team%2Vote';",sideJoinedText,clientID,_selectedTeam]};
+ _lastTeam = _selectedTeam;
+ };
+}; \ No newline at end of file
diff --git a/Client/GUI/GUI_Upgrade.sqf b/Client/GUI/GUI_Upgrade.sqf
new file mode 100644
index 0000000..8f5b4ba
--- /dev/null
+++ b/Client/GUI/GUI_Upgrade.sqf
@@ -0,0 +1,198 @@
+
+private ["_controls","_u","_curIDC","_level","_maxLevel","_dependencie","_condition","_val","_enabled","_dependent","_colorSupply","_hasFunds","_colorFunds","_canUpgrade","_tooltip_h","_tooltip_text_content","_name","_bpath","_time","_needed","_requiredSupply","_requiredFunds","_currentSupply","_currentFunds","_tooltip_w","_tooltip_x","_tooltip_y","_commander","_supply","_upgrades","_txt","_display","_tooltip","_tooltip_text","_upgr","_upgrlev","_upgrdep","_upgrcond"];
+disableSerialization;
+
+_display = _this select 0;
+displayUpgrade = "";
+
+MenuAction = -1;
+mouseX = -1;
+mouseY = -1;
+
+_requiredFunds = 0;
+_requiredSupply = 0;
+
+_tooltip = _display DisplayCtrl 18998;
+_tooltip_text = _display DisplayCtrl 18999;
+
+_controls = [];
+_u = 18001;
+_curIDC = _display DisplayCtrl _u;
+while {!isNull _curIDC} do {_controls = _controls + [_curIDC];_u = _u + 1;_curIDC = _display DisplayCtrl _u};
+
+_level = 0;
+_val = 0;
+_time = 0;
+_name = '';
+_tooltip_text_content = '';
+_canUpgrade = false;
+_dependent = false;
+_isUpgrading = false;
+_lastTimerUpdate = -5;
+_upgr = 'WFBE_UPGRADELABELS' Call GetNamespace;
+_upgrlev = 'WFBE_UPGRADELEVELS' Call GetNamespace;
+_upgrdep = 'WFBE_UPGRADEDEPENDENCIES' Call GetNamespace;
+_upgrcond = 'WFBE_UPGRADECONDITION' Call GetNamespace;
+
+while {alive player && dialog} do {
+ if (Side player != sideJoined) exitWith {closeDialog 0};
+ if !(dialog) exitWith {};
+
+ _upgrades = (sideJoinedText) Call GetSideUpgrades;
+
+ if (time - _lastTimerUpdate > 1) then {_lastTimerUpdate = time;_isUpgrading = Call Compile Format ["WFBE_%1_Upgrading",sideJoinedText]};
+
+ _u = 0;
+ {
+ _level = _upgrades select _u;
+ _maxLevel = _upgrlev select _u;
+ _dependencie = _upgrdep select _u;
+ _condition = _upgrcond select _u;
+ if (_level == _maxLevel) then {_x ctrlSetTextColor [0, 1, 0, 1]};
+ if (!_condition) then {_x ctrlSetTextColor [1, 0, 0, 1]};
+ if (count _dependencie > 0 && _level != _maxLevel && _condition) then {
+ if (_upgrades select (_dependencie select 0) < (_dependencie select 1)) then {
+ _x ctrlSetTextColor [1, 0, 0, 1];
+ } else {
+ if (_level != _maxLevel) then {
+ _x ctrlSetTextColor [0.75,0.75,0.75,1];
+ };
+ };
+ };
+ _u = _u + 1;
+ } forEach _controls;
+
+ //--- Tooltips.
+ if (displayUpgrade != "") then {
+
+ switch (displayUpgrade) do {
+ case "infantry": {_val = 0};
+ case "light": {_val = 1};
+ case "heavy": {_val = 2};
+ case "air": {_val = 3};
+ case "parachutist": {_val = 4};
+ case "uav": {_val = 5};
+ case "supply": {_val = 6};
+ case "ambuSpawn": {_val = 7};
+ case "airlift": {_val = 8};
+ case "flares": {_val = 9};
+ case "artillery": {_val = 10};
+ case "icbm": {_val = 11};
+ case "fasttravel": {_val = 12};
+ case "gear": {_val = 13};
+ case "ammo": {_val = 14};
+ case "easa": {_val = 15};
+ case "paradrop": {_val = 16};
+ case "shells": {_val = 17};
+ };
+
+ ctrlSetFocus (_controls select _val);
+
+ _dependencie = _upgrdep select _val;
+ _condition = _upgrcond select _val;
+ _maxLevel = _upgrlev select _val;
+ _name = _upgr select _val;
+ _level = _upgrades select _val;
+
+ _enabled = true;
+ if (!_condition) then {_enabled = false};
+ if (count _dependencie > 0 && _enabled) then {
+ if (_upgrades select (_dependencie select 0) < (_dependencie select 1)) then {
+ _dependent = true;
+ } else {_dependent = false};
+ } else {_dependent = false};
+
+ _bpath = if (_level == _maxLevel) then {_level} else {_level + 1};
+ _time = (Format["WFBE_UPGRADETIMESLEVEL%1",_bpath] Call GetNamespace) select _val;
+ _needed = (Format["WFBE_UPGRADEPRICESLEVEL%1",_bpath] Call GetNamespace) select _val;
+ _requiredSupply = _needed select 0;
+ _requiredFunds = _needed select 1;
+
+ _currentSupply = (sideJoined) Call GetSideSupply;
+ _currentFunds = Call GetPlayerfunds;
+
+ _colorSupply = "'#3366cc'";
+ _colorFunds = "'#3366cc'";
+ _hasFunds = true;
+ if !(paramMoneyOnly) then {if (_currentSupply < _requiredSupply) then {_colorSupply = "'#ff0033'";_hasFunds = false}};
+ if (_currentFunds < _requiredFunds) then {_colorFunds = "'#ff0033'";_hasFunds = false};
+
+ if (!_isUpgrading && _level < _maxLevel && !_dependent && _enabled && _hasFunds) then {_canUpgrade = true} else {_canUpgrade = false};
+
+ _tooltip_w = 0.28;
+ _tooltip_h = 0.18;
+ _tooltip_x = if ((1 - mouseX) < _tooltip_w) then {mouseX - _tooltip_w - 0.02} else {mouseX + 0.02};
+ _tooltip_y = if (mouseY > 0.5) then {mouseY - _tooltip_h - 0.02} else {mouseY + 0.02};
+
+ if (_level != _maxLevel) then {
+ _supplyCd = if !(paramMoneyOnly) then {Format ["<t size='0.8' color='#ffffff' font='Zeppelin33'> %1</t><br />",Format [localize 'STR_WF_Require',"<t color=" + _colorSupply + ">" + str(_requiredSupply) + '</t>' + '/' + "<t color='#3366cc'>" + str(_currentSupply) + '</t> S']]} else {""};
+ _tooltip_text_content = parsetext (
+ Format ["<t size='1.2' color='#ff9900' shadow='0'>%1:</t><br />",_name] +
+ Format ["<t size='0.8' color='#ffffff' font='Zeppelin33'> %1</t><br />",Format [localize 'STR_WF_Level',"<t color='#3366cc'>" + str(_level) + '</t>' + "/<t color='#3366cc'>" + str(_maxLevel) + '</t>']] +
+ _supplyCd +
+ Format ["<t size='0.8' color='#ffffff' font='Zeppelin33'> %1</t><br />",Format [localize 'STR_WF_Require',"<t color=" + _colorFunds + ">" + str(_requiredFunds) + '</t>' + '/' + "<t color='#3366cc'>" + str(_currentFunds) + '</t> $']] +
+ Format ["<t size='0.8' color='#ffffff' font='Zeppelin33'> %1</t><br />",Format [localize 'STR_WF_Require',"<t color='#3366cc'>" + str(_time) + ' </t>' + localize 'STR_WF_Seconds']]
+ );
+
+ if (_isUpgrading) then {
+ _tooltip_h = 0.12;
+ _tooltip_text_content = parsetext (
+ Format ["<t size='1.2' color='#ff9900' shadow='0'>%1:</t><br />",_name] +
+ Format ["<t size='0.8' color='#ff0033' font='Zeppelin33'> %1</t><br />",localize 'STR_WF_Upgrade_Running']
+ );
+ };
+ if (!_enabled) then {
+ _tooltip_text_content = parsetext (
+ Format ["<t size='1.2' color='#ff9900' shadow='0'>%1:</t><br />",_name] +
+ Format ["<t size='0.8' color='#ff0033' font='Zeppelin33'> %1</t><br />",localize 'STR_WF_Upgrade_Condition']
+ );
+ };
+ if (_dependent && !_isUpgrading && _enabled) then {
+ _tooltip_text_content = parsetext (
+ Format ["<t size='1.2' color='#ff9900' shadow='0'>%1:</t><br />",_name] +
+ Format ["<t size='0.8' color='#ff0033' font='Zeppelin33'> %1</t><br />",Format[localize 'STR_WF_Upgrade_Dependent',_upgr select (_dependencie select 0),_dependencie select 1]]
+ );
+ };
+ } else {
+ _tooltip_h = 0.12;
+ _tooltip_text_content = parsetext (
+ Format ["<t size='1.2' color='#ff9900' shadow='0'>%1:</t><br />",_name] +
+ Format ["<t size='0.8' color='#ff0033' font='Zeppelin33'> %1</t><br />",localize 'STR_WF_Upgrade_Maximum']
+ );
+ };
+
+ if ((ctrlPosition _tooltip select 0) == 0 || true) then {_tooltip ctrlSetPosition [_tooltip_x,_tooltip_y,_tooltip_w,_tooltip_h]};
+ _tooltip ctrlCommit 0;
+
+ _tooltip_text ctrlSetStructuredText _tooltip_text_content;
+ if ((ctrlPosition _tooltip_text select 0) == 0 || true) then {_tooltip_text ctrlSetPosition [_tooltip_x,_tooltip_y,_tooltip_w,_tooltip_h]};
+ _tooltip_text ctrlCommit 0;
+
+ } else {
+ if ((ctrlPosition _tooltip select 0) != 0) then {_tooltip ctrlSetPosition [0,0,0,0];_tooltip ctrlCommit 0};
+ if ((ctrlPosition _tooltip_text select 0) != 0) then {_tooltip_text ctrlSetPosition [0,0,0,0];_tooltip_text ctrlCommit 0};
+ };
+
+ _commander = false;
+ if (!isNull(commanderTeam)) then {
+ if (commanderTeam == group player) then {_commander = true};
+ };
+
+ if (MenuAction == 1 && _canUpgrade && _commander) then {
+ MenuAction = -1;
+ -(_requiredFunds) Call ChangePlayerFunds;
+ if !(paramMoneyOnly) then {[sideJoined, -_requiredSupply] Call ChangeSideSupply};
+
+ WFBE_RequestUpgrade = ['SRVFNCREQUESTUPGRADE',[_time,_level,_val,_name,sideJoined]];
+ publicVariable 'WFBE_RequestUpgrade';
+ if (isHostedServer) then {['SRVFNCREQUESTUPGRADE',[_time,_level,_val,_name,sideJoined]] Spawn HandleSPVF};
+
+ Call Compile Format ["WFBE_%1_Upgrading = false;",sideJoinedText];
+ hint Format [localize "STR_WF_Upgrade_Start",_name];
+ } else {MenuAction = -1};
+
+ _txt = if (_isUpgrading) then {localize "STR_WF_Upgrade_Running_Info" + "..."} else {""};
+ ctrlSetText[18802,_txt];
+
+ sleep 0.05;
+}; \ No newline at end of file
diff --git a/Client/Images/con_depot.paa b/Client/Images/con_depot.paa
new file mode 100644
index 0000000..9051218
--- /dev/null
+++ b/Client/Images/con_depot.paa
Binary files differ
diff --git a/Client/Images/con_task.paa b/Client/Images/con_task.paa
new file mode 100644
index 0000000..7e03288
--- /dev/null
+++ b/Client/Images/con_task.paa
Binary files differ
diff --git a/Client/Images/geariconall.paa b/Client/Images/geariconall.paa
new file mode 100644
index 0000000..aab8913
--- /dev/null
+++ b/Client/Images/geariconall.paa
Binary files differ
diff --git a/Client/Images/geariconmisc.paa b/Client/Images/geariconmisc.paa
new file mode 100644
index 0000000..2620455
--- /dev/null
+++ b/Client/Images/geariconmisc.paa
Binary files differ
diff --git a/Client/Images/geariconprimary.paa b/Client/Images/geariconprimary.paa
new file mode 100644
index 0000000..df8d091
--- /dev/null
+++ b/Client/Images/geariconprimary.paa
Binary files differ
diff --git a/Client/Images/geariconsecondary.paa b/Client/Images/geariconsecondary.paa
new file mode 100644
index 0000000..729012d
--- /dev/null
+++ b/Client/Images/geariconsecondary.paa
Binary files differ
diff --git a/Client/Images/geariconsidearm.paa b/Client/Images/geariconsidearm.paa
new file mode 100644
index 0000000..787ef18
--- /dev/null
+++ b/Client/Images/geariconsidearm.paa
Binary files differ
diff --git a/Client/Images/gearicontemplate.paa b/Client/Images/gearicontemplate.paa
new file mode 100644
index 0000000..b9411dc
--- /dev/null
+++ b/Client/Images/gearicontemplate.paa
Binary files differ
diff --git a/Client/Images/i_backpack.paa b/Client/Images/i_backpack.paa
new file mode 100644
index 0000000..5acc105
--- /dev/null
+++ b/Client/Images/i_backpack.paa
Binary files differ
diff --git a/Client/Images/i_clear.paa b/Client/Images/i_clear.paa
new file mode 100644
index 0000000..59f2659
--- /dev/null
+++ b/Client/Images/i_clear.paa
Binary files differ
diff --git a/Client/Images/i_commander.paa b/Client/Images/i_commander.paa
new file mode 100644
index 0000000..3a28a79
--- /dev/null
+++ b/Client/Images/i_commander.paa
Binary files differ
diff --git a/Client/Images/i_driver.paa b/Client/Images/i_driver.paa
new file mode 100644
index 0000000..2481453
--- /dev/null
+++ b/Client/Images/i_driver.paa
Binary files differ
diff --git a/Client/Images/i_extra.paa b/Client/Images/i_extra.paa
new file mode 100644
index 0000000..de90746
--- /dev/null
+++ b/Client/Images/i_extra.paa
Binary files differ
diff --git a/Client/Images/i_gunner.paa b/Client/Images/i_gunner.paa
new file mode 100644
index 0000000..89e1d99
--- /dev/null
+++ b/Client/Images/i_gunner.paa
Binary files differ
diff --git a/Client/Images/i_lock.paa b/Client/Images/i_lock.paa
new file mode 100644
index 0000000..5ec5b9f
--- /dev/null
+++ b/Client/Images/i_lock.paa
Binary files differ
diff --git a/Client/Images/i_reload.paa b/Client/Images/i_reload.paa
new file mode 100644
index 0000000..74aa384
--- /dev/null
+++ b/Client/Images/i_reload.paa
Binary files differ
diff --git a/Client/Images/icon_wf_building_aa_radar.paa b/Client/Images/icon_wf_building_aa_radar.paa
new file mode 100644
index 0000000..123d0ca
--- /dev/null
+++ b/Client/Images/icon_wf_building_aa_radar.paa
Binary files differ
diff --git a/Client/Images/icon_wf_building_air.paa b/Client/Images/icon_wf_building_air.paa
new file mode 100644
index 0000000..cdf6012
--- /dev/null
+++ b/Client/Images/icon_wf_building_air.paa
Binary files differ
diff --git a/Client/Images/icon_wf_building_am_radar.paa b/Client/Images/icon_wf_building_am_radar.paa
new file mode 100644
index 0000000..58ee40e
--- /dev/null
+++ b/Client/Images/icon_wf_building_am_radar.paa
Binary files differ
diff --git a/Client/Images/icon_wf_building_barracks.paa b/Client/Images/icon_wf_building_barracks.paa
new file mode 100644
index 0000000..b388115
--- /dev/null
+++ b/Client/Images/icon_wf_building_barracks.paa
Binary files differ
diff --git a/Client/Images/icon_wf_building_cc.paa b/Client/Images/icon_wf_building_cc.paa
new file mode 100644
index 0000000..47c60a0
--- /dev/null
+++ b/Client/Images/icon_wf_building_cc.paa
Binary files differ
diff --git a/Client/Images/icon_wf_building_cc_ca.paa b/Client/Images/icon_wf_building_cc_ca.paa
new file mode 100644
index 0000000..d65bb12
--- /dev/null
+++ b/Client/Images/icon_wf_building_cc_ca.paa
Binary files differ
diff --git a/Client/Images/icon_wf_building_firstaid.paa b/Client/Images/icon_wf_building_firstaid.paa
new file mode 100644
index 0000000..f007514
--- /dev/null
+++ b/Client/Images/icon_wf_building_firstaid.paa
Binary files differ
diff --git a/Client/Images/icon_wf_building_gear.paa b/Client/Images/icon_wf_building_gear.paa
new file mode 100644
index 0000000..37150a0
--- /dev/null
+++ b/Client/Images/icon_wf_building_gear.paa
Binary files differ
diff --git a/Client/Images/icon_wf_building_hangar.paa b/Client/Images/icon_wf_building_hangar.paa
new file mode 100644
index 0000000..73fbb3d
--- /dev/null
+++ b/Client/Images/icon_wf_building_hangar.paa
Binary files differ
diff --git a/Client/Images/icon_wf_building_hvs.paa b/Client/Images/icon_wf_building_hvs.paa
new file mode 100644
index 0000000..b839e84
--- /dev/null
+++ b/Client/Images/icon_wf_building_hvs.paa
Binary files differ
diff --git a/Client/Images/icon_wf_building_lvs.paa b/Client/Images/icon_wf_building_lvs.paa
new file mode 100644
index 0000000..9fd7fc2
--- /dev/null
+++ b/Client/Images/icon_wf_building_lvs.paa
Binary files differ
diff --git a/Client/Images/icon_wf_building_mhq.paa b/Client/Images/icon_wf_building_mhq.paa
new file mode 100644
index 0000000..7e9250c
--- /dev/null
+++ b/Client/Images/icon_wf_building_mhq.paa
Binary files differ
diff --git a/Client/Images/icon_wf_building_repair.paa b/Client/Images/icon_wf_building_repair.paa
new file mode 100644
index 0000000..03fc565
--- /dev/null
+++ b/Client/Images/icon_wf_building_repair.paa
Binary files differ
diff --git a/Client/Images/icon_wf_support_artilery.paa b/Client/Images/icon_wf_support_artilery.paa
new file mode 100644
index 0000000..56db6bc
--- /dev/null
+++ b/Client/Images/icon_wf_support_artilery.paa
Binary files differ
diff --git a/Client/Images/icon_wf_support_cas.paa b/Client/Images/icon_wf_support_cas.paa
new file mode 100644
index 0000000..e507542
--- /dev/null
+++ b/Client/Images/icon_wf_support_cas.paa
Binary files differ
diff --git a/Client/Images/icon_wf_support_fasttravel.paa b/Client/Images/icon_wf_support_fasttravel.paa
new file mode 100644
index 0000000..22f2a69
--- /dev/null
+++ b/Client/Images/icon_wf_support_fasttravel.paa
Binary files differ
diff --git a/Client/Images/icon_wf_support_mortar.paa b/Client/Images/icon_wf_support_mortar.paa
new file mode 100644
index 0000000..ba9b7be
--- /dev/null
+++ b/Client/Images/icon_wf_support_mortar.paa
Binary files differ
diff --git a/Client/Images/icon_wf_support_supplydrop.paa b/Client/Images/icon_wf_support_supplydrop.paa
new file mode 100644
index 0000000..4647da5
--- /dev/null
+++ b/Client/Images/icon_wf_support_supplydrop.paa
Binary files differ
diff --git a/Client/Images/icon_wf_support_transport.paa b/Client/Images/icon_wf_support_transport.paa
new file mode 100644
index 0000000..afe6160
--- /dev/null
+++ b/Client/Images/icon_wf_support_transport.paa
Binary files differ
diff --git a/Client/Images/icon_wf_support_uav.paa b/Client/Images/icon_wf_support_uav.paa
new file mode 100644
index 0000000..1fc27de
--- /dev/null
+++ b/Client/Images/icon_wf_support_uav.paa
Binary files differ
diff --git a/Client/Images/picturepapercar_ca.paa b/Client/Images/picturepapercar_ca.paa
new file mode 100644
index 0000000..189bbcb
--- /dev/null
+++ b/Client/Images/picturepapercar_ca.paa
Binary files differ
diff --git a/Client/Images/tog_arty.paa b/Client/Images/tog_arty.paa
new file mode 100644
index 0000000..f8aea49
--- /dev/null
+++ b/Client/Images/tog_arty.paa
Binary files differ
diff --git a/Client/Images/ui_button_main_down.paa b/Client/Images/ui_button_main_down.paa
new file mode 100644
index 0000000..d02a185
--- /dev/null
+++ b/Client/Images/ui_button_main_down.paa
Binary files differ
diff --git a/Client/Images/ui_button_main_focus.paa b/Client/Images/ui_button_main_focus.paa
new file mode 100644
index 0000000..afab785
--- /dev/null
+++ b/Client/Images/ui_button_main_focus.paa
Binary files differ
diff --git a/Client/Images/ui_button_main_normal.paa b/Client/Images/ui_button_main_normal.paa
new file mode 100644
index 0000000..c4969d3
--- /dev/null
+++ b/Client/Images/ui_button_main_normal.paa
Binary files differ
diff --git a/Client/Images/ui_button_main_over.paa b/Client/Images/ui_button_main_over.paa
new file mode 100644
index 0000000..db4f0e3
--- /dev/null
+++ b/Client/Images/ui_button_main_over.paa
Binary files differ
diff --git a/Client/Images/wf_air.paa b/Client/Images/wf_air.paa
new file mode 100644
index 0000000..ffbef9e
--- /dev/null
+++ b/Client/Images/wf_air.paa
Binary files differ
diff --git a/Client/Images/wf_amm.paa b/Client/Images/wf_amm.paa
new file mode 100644
index 0000000..a143305
--- /dev/null
+++ b/Client/Images/wf_amm.paa
Binary files differ
diff --git a/Client/Images/wf_art.paa b/Client/Images/wf_art.paa
new file mode 100644
index 0000000..c07324a
--- /dev/null
+++ b/Client/Images/wf_art.paa
Binary files differ
diff --git a/Client/Images/wf_b.paa b/Client/Images/wf_b.paa
new file mode 100644
index 0000000..d54fb85
--- /dev/null
+++ b/Client/Images/wf_b.paa
Binary files differ
diff --git a/Client/Images/wf_eas.paa b/Client/Images/wf_eas.paa
new file mode 100644
index 0000000..b31076c
--- /dev/null
+++ b/Client/Images/wf_eas.paa
Binary files differ
diff --git a/Client/Images/wf_fas.paa b/Client/Images/wf_fas.paa
new file mode 100644
index 0000000..3438035
--- /dev/null
+++ b/Client/Images/wf_fas.paa
Binary files differ
diff --git a/Client/Images/wf_fia.paa b/Client/Images/wf_fia.paa
new file mode 100644
index 0000000..b3ebbcf
--- /dev/null
+++ b/Client/Images/wf_fia.paa
Binary files differ
diff --git a/Client/Images/wf_fla.paa b/Client/Images/wf_fla.paa
new file mode 100644
index 0000000..79c548f
--- /dev/null
+++ b/Client/Images/wf_fla.paa
Binary files differ
diff --git a/Client/Images/wf_gea.PAA b/Client/Images/wf_gea.PAA
new file mode 100644
index 0000000..3dd20eb
--- /dev/null
+++ b/Client/Images/wf_gea.PAA
Binary files differ
diff --git a/Client/Images/wf_hvf.paa b/Client/Images/wf_hvf.paa
new file mode 100644
index 0000000..d67f728
--- /dev/null
+++ b/Client/Images/wf_hvf.paa
Binary files differ
diff --git a/Client/Images/wf_lif.paa b/Client/Images/wf_lif.paa
new file mode 100644
index 0000000..a149f7a
--- /dev/null
+++ b/Client/Images/wf_lif.paa
Binary files differ
diff --git a/Client/Images/wf_lvf.paa b/Client/Images/wf_lvf.paa
new file mode 100644
index 0000000..799760d
--- /dev/null
+++ b/Client/Images/wf_lvf.paa
Binary files differ
diff --git a/Client/Images/wf_mib.paa b/Client/Images/wf_mib.paa
new file mode 100644
index 0000000..03bc4b6
--- /dev/null
+++ b/Client/Images/wf_mib.paa
Binary files differ
diff --git a/Client/Images/wf_par.paa b/Client/Images/wf_par.paa
new file mode 100644
index 0000000..9b7941c
--- /dev/null
+++ b/Client/Images/wf_par.paa
Binary files differ
diff --git a/Client/Images/wf_pas.paa b/Client/Images/wf_pas.paa
new file mode 100644
index 0000000..c650a57
--- /dev/null
+++ b/Client/Images/wf_pas.paa
Binary files differ
diff --git a/Client/Images/wf_shl.paa b/Client/Images/wf_shl.paa
new file mode 100644
index 0000000..57d33b6
--- /dev/null
+++ b/Client/Images/wf_shl.paa
Binary files differ
diff --git a/Client/Images/wf_sup.paa b/Client/Images/wf_sup.paa
new file mode 100644
index 0000000..3f09c7e
--- /dev/null
+++ b/Client/Images/wf_sup.paa
Binary files differ
diff --git a/Client/Images/wf_uav.paa b/Client/Images/wf_uav.paa
new file mode 100644
index 0000000..c611dec
--- /dev/null
+++ b/Client/Images/wf_uav.paa
Binary files differ
diff --git a/Client/Init/Init_BaseStructure.sqf b/Client/Init/Init_BaseStructure.sqf
new file mode 100644
index 0000000..a60bf50
--- /dev/null
+++ b/Client/Init/Init_BaseStructure.sqf
@@ -0,0 +1,34 @@
+waitUntil {commonInitComplete};
+
+if (local player) then {
+ Private["_allies","_color","_hq","_marker","_structure","_text","_type","_side","_voteTime"];
+
+ _structure = _this Select 0;
+ _hq = _this select 1;
+ _side = _this select 2;
+ _allies = if (count _this > 3) then {_this select 3} else {""};
+
+ if (_side != side player) exitWith {};
+
+ sleep random(3);
+
+ while {_voteTime = WF_Logic getVariable "eastCommanderVoteTime";IsNil "_voteTime"} do {sleep 1};
+
+ _marker = Format["BaseMarker%1",buildingMarker];
+ buildingMarker = buildingMarker + 1;
+ createMarkerLocal [_marker,getPos _structure];
+ _type = "mil_box";
+ _color = "ColorBlue";
+ if (_hq) then {_type = "Headquarters";_color = "ColorGreen"};
+ if (_allies != "") then {_type = "mil_box";_color = "ColorGreen"};
+ _marker setMarkerTypeLocal _type;
+ _text = "";
+ if (!_hq && _allies == "") then {_text = [_structure] Call GetStructureMarkerLabel;_marker setMarkerSizeLocal [0.5,0.5]};
+ if (_allies != "") then {_marker setMarkerSizeLocal [0.5,0.5];_text = _allies};
+ if (_text != "") then {_marker setMarkerTextLocal _text};
+ _marker setMarkerColorLocal _color;
+
+ while {!isNull _structure && alive _structure} do {sleep 2};
+
+ deleteMarkerLocal _marker;
+}; \ No newline at end of file
diff --git a/Client/Init/Init_Blacklist.sqf b/Client/Init/Init_Blacklist.sqf
new file mode 100644
index 0000000..8903c5a
--- /dev/null
+++ b/Client/Init/Init_Blacklist.sqf
@@ -0,0 +1,15 @@
+Private ["_blackListID","_id"];
+_id = getPlayerUID (_this select 0);
+
+//--- Griefers ID.
+_blackListID = [
+"4837314",
+"12051782",
+"7148678",
+"4139392",
+"4094594",
+"2992070",
+"823297"
+];
+
+if (_id in _blackListID) then {true} else {false}; \ No newline at end of file
diff --git a/Client/Init/Init_Client.sqf b/Client/Init/Init_Client.sqf
new file mode 100644
index 0000000..dfdce06
--- /dev/null
+++ b/Client/Init/Init_Client.sqf
@@ -0,0 +1,376 @@
+Private ['_HQRadio','_base','_buildings','_condition','_get','_idbl','_isDeployed','_oc','_voteTime','_weat'];
+
+diag_log Format["[WFBE (INIT)][frameno:%1 | ticktime:%2] Init_Client: Init start at %3",diag_frameno,diag_tickTime,time];
+
+sideJoined = side player;
+sideJoinedText = str sideJoined;
+
+//--- Position the client on the temp spawn (Common is not yet init'd so we call is straigh away).
+player setPos ([getMarkerPos Format["%1TempRespawnMarker",sideJoinedText],1,10] Call Compile preprocessFile "Common\Functions\Common_GetRandomPosition.sqf");
+
+ARTY_HandleILLUM = Compile preprocessFile "Client\Module\Arty\ARTY_HandleILLUM.sqf";
+ARTY_HandleSADARM = Compile preprocessFile "Client\Module\Arty\ARTY_HandleSADARM.sqf";
+if (paramArty) then {
+ ARTY_Prep = Compile preprocessFile "Client\Module\Arty\ARTY_mobileMissionPrep.sqf";
+ ARTY_Finish = Compile preprocessFile "Client\Module\Arty\ARTY_mobileMissionFinish.sqf";
+ RequestFireMission = Compile preprocessFile "Client\Functions\Client_RequestFireMission.sqf"
+};
+if (paramBoundaries) then {
+ BoundariesIsOnMap = Compile preprocessFile "Client\Functions\Client_IsOnMap.sqf";
+ BoundariesHandleOnMap = Compile preprocessFile "Client\Functions\Client_HandleOnMap.sqf";
+};
+BuildUnit = Compile preprocessFile "Client\Functions\Client_BuildUnit.sqf";
+ChangePlayerFunds = Compile preprocessFile "Client\Functions\Client_ChangePlayerFunds.sqf";
+CommandChatMessage = Compile preprocessFile "Client\Functions\Client_CommandChatMessage.sqf";
+if (paramCounterMeasures) then {
+ CM_Countermeasures = Compile preprocessFile "Client\Module\CM\CM_Countermeasures.sqf";
+ CM_Flares = Compile preprocessFile "Client\Module\CM\CM_Flares.sqf";
+ CM_Spoofing = Compile preprocessFile "Client\Module\CM\CM_Spoofing.sqf";
+};
+DebugHint = Compile preprocessFile "Client\Functions\Client_DebugHint.sqf";
+DisplayInventory = Compile preprocessFile "Client\Functions\Client_DisplayInventory.sqf";
+EquipDefaultLoadout = Compile preprocessFile "Client\Functions\Client_EquipDefaultLoadout.sqf";
+FX = Compile preprocessFile "Client\Functions\Client_FX.sqf";
+GetIncome = Compile preprocessFile "Client\Functions\Client_GetIncome.sqf";
+GetMarkerColoration = Compile preprocessFile "Client\Functions\Client_GetMarkerColoration.sqf";
+GetPlayerFunds = Compile preprocessFile "Client\Functions\Client_GetPlayerFunds.sqf";
+GetRespawnAvailable = Compile preprocessFile "Client\Functions\Client_GetRespawnAvailable.sqf";
+GetStructureMarkerLabel = Compile preprocessFile "Client\Functions\Client_GetStructureMarkerLabel.sqf";
+GetTime = Compile preprocessFile "Client\Functions\Client_GetTime.sqf";
+GroupChatMessage = Compile preprocessFile "Client\Functions\Client_GroupChatMessage.sqf";
+HandleHQAction = Compile preprocessFile "Client\Functions\Client_HandleHQAction.sqf";
+HandlePVF = Compile preprocessFile "Client\Functions\Client_HandlePVF.sqf";
+MarkerAnim = Compile preprocessFile "Client\Functions\Client_MarkerAnim.sqf";
+OnRespawnHandler = Compile preprocessFile "Client\Functions\Client_OnRespawnHandler.sqf";
+PlayerKilled = Compile preprocessFile "Client\Client_Killed.sqf";
+PreRespawnHandler = Compile preprocessFile "Client\Functions\Client_PreRespawnHandler.sqf";
+ReplaceArray = Compile preprocessFile "Client\Functions\Client_ReplaceArray.sqf";
+ReplaceInventoryAmmo = Compile preprocessFile "Client\Functions\Client_ReplaceInventoryAmmo.sqf";
+if !(WF_A2_Vanilla) then {
+ RespawningBag = Compile preprocessFile "Client\Functions\Client_RespawnBag.sqf";
+} else {
+ RespawningBag = {};
+};
+SetControlFadeAnim = Compile preprocessFile "Client\Functions\Client_SetControlFadeAnim.sqf";
+SetControlFadeAnimStop = Compile preprocessFile "Client\Functions\Client_SetControlFadeAnimStop.sqf";
+SupportHeal = Compile preprocessFile "Client\Functions\Client_SupportHeal.sqf";
+SupportRearm = Compile preprocessFile "Client\Functions\Client_SupportRearm.sqf";
+SupportRefuel = Compile preprocessFile "Client\Functions\Client_SupportRefuel.sqf";
+SupportRepair = Compile preprocessFile "Client\Functions\Client_SupportRepair.sqf";
+TaskSystem = Compile preprocessFile "Client\Functions\Client_TaskSystem.sqf";
+TitleTextMessage = Compile preprocessFile "Client\Functions\Client_TitleTextMessage.sqf";
+UIAddItem = Compile preprocessFile "Client\Functions\Client_UIAddItem.sqf";
+UIAddMagazine = Compile preprocessFile "Client\Functions\Client_UIAddMagazine.sqf";
+UIChangeComboBuyUnits = Compile preprocessFile "Client\Functions\Client_UIChangeComboBuyUnits.sqf";
+UIFillListBuyUnits = Compile preprocessFile "Client\Functions\Client_UIFillListBuyUnits.sqf";
+UIFillListTeamOrders = Compile preprocessFile "Client\Functions\Client_UIFillListTeamOrders.sqf";
+UIFindLBValue = Compile preprocessFile "Client\Functions\Client_UIFindLBValue.sqf";
+UIGearFillList = Compile preprocessFile "Client\Functions\Client_UIGearFillList.sqf";
+UIGearFillTemplateList = Compile preprocessFile "Client\Functions\Client_UIGearFillTemplateList.sqf";
+if (paramICBM) then {
+ Nuke = Compile preprocessFile "Client\Module\Nuke\nuke.sqf";
+ NukeIncomming = Compile preprocessFile "Client\Module\Nuke\nukeincoming.sqf";
+};
+//--- Namespace related (GUI).
+BIS_FNC_GUIset = {UInamespace setVariable [_this select 0, _this select 1]};
+BIS_FNC_GUIget = {UInamespace getVariable (_this select 0)};
+
+clientInitComplete = true;
+
+//--- Waiting for the common part to be executed.
+waitUntil {commonInitComplete};
+
+diag_log Format["[WFBE (INIT)][frameno:%1 | ticktime:%2] Init_Client: Common is ready at %3. Executing Client Initialization...",diag_frameno,diag_tickTime,time];
+
+if (('WFBE_ISIS' Call GetNamespace) != 0) then {ISIS_Effects = Compile preProcessFile "Client\Module\ISIS\ISIS_Clientfx.sqf"};
+
+//--- Queue Protection.
+['WFBE_C_QUEUE_BARRACKS',0,true] Call SetNamespace;
+['WFBE_C_QUEUE_BARRACKS_MAX',10,true] Call SetNamespace;
+['WFBE_C_QUEUE_LIGHT',0,true] Call SetNamespace;
+['WFBE_C_QUEUE_LIGHT_MAX',3,true] Call SetNamespace;
+['WFBE_C_QUEUE_HEAVY',0,true] Call SetNamespace;
+['WFBE_C_QUEUE_HEAVY_MAX',3,true] Call SetNamespace;
+['WFBE_C_QUEUE_AIRCRAFT',0,true] Call SetNamespace;
+['WFBE_C_QUEUE_AIRCRAFT_MAX',2,true] Call SetNamespace;
+['WFBE_C_QUEUE_AIRPORT',0,true] Call SetNamespace;
+['WFBE_C_QUEUE_AIRPORT_MAX',2,true] Call SetNamespace;
+['WFBE_C_QUEUE_DEPOT',0,true] Call SetNamespace;
+['WFBE_C_QUEUE_DEPOT_MAX',3,true] Call SetNamespace;
+
+//--- Handle the Fast Time.
+if (('WFBE_FASTTIMERATE' Call GetNamespace) > 0) then {[] ExecFSM "Client\FSM\fasttimecli.fsm"};
+
+//--- Handle the weather.
+_weat = 'WFBE_WEATHER' Call GetNamespace;
+if (_weat == 3) then {
+ [] ExecFSM "Client\FSM\overcast.fsm";
+} else {
+ _oc = 0.05;
+ switch (_weat) do {
+ case 0: {_oc = 0};
+ case 1: {_oc = 0.5};
+ case 2: {_oc = 1};
+ };
+ 60 setOvercast _oc;
+};
+if (paramVolumClouds) then {[] Exec "CA\Modules\clouds\data\scripts\bis_cloudsystem.sqs"};
+
+_idbl = [player] Call Compile preprocessFile "Client\Init\Init_Blacklist.sqf";
+if (_idbl) exitWith {[] Spawn {Private["_txt"];_txt = "INFORMATION:\n\n You are currently blacklisted.";_txt Call DebugHint;sleep 5; disableUserInput true; sleep 60; disableUserInput false; failMission "END1"}};
+
+//--- Global Client Variables.
+sideID = sideJoined Call GetSideID;
+clientID = player Call GetClientID;
+clientIdentification = Format ["%1Slot%2",sideJoinedText,clientID];
+clientTeam = group player;
+clientTeams = (Format['WFBE_%1TEAMS',sideJoinedText] Call GetNamespace);
+playerType = typeOf player;
+playerDead = false;
+paramBoundariesRunning = false;
+
+commanderTeam = objNull;
+buildingMarker = 0;
+gearCost = 0;
+currentTG = 25;
+lastBuilt = [];
+unitQueu = 0;
+fireMissionTime = -1000;
+artyRange = 15;
+artyPos = [0,0,0];
+playerUAV = objNull;
+comTask = objNull;
+voted = false;
+votePopUp = true;
+manningDefense = true;
+currentFX = 0;
+lastParaCall = -1200;
+lastSupplyCall = -1200;
+canBuildWHQ = true;
+WFBE_RespawnDefaultGear = false;
+WFBE_EnablePreload = false;
+WFBE_ForceUpdate = false;
+
+hqInRange = false;
+barracksInRange = false;
+gearInRange = false;
+lightInRange = false;
+heavyInRange = false;
+aircraftInRange = false;
+serviceInRange = false;
+commandInRange = false;
+depotInRange = false;
+antiAirRadarInRange = false;
+hangarInRange = false;
+
+enableTeamSwitch false;
+
+/* Airfields Init */
+if (isNil "Airfields") then {Airfields = []};
+
+/* CIPHER Module - Sorting */
+ExecVM "Common\Module\CIPHER\CIPHER_Sort.sqf";
+
+//--- Disable Artillery Computer.
+if ((('WFBE_ARTILLERYCOMPUTER' Call GetNamespace) != 2) && !WF_A2_Vanilla) then {Call Compile "enableEngineArtillery false;"};
+
+/* Exec SQF|FSM Misc stuff. */
+if (paramTrackPlayer) then {[] ExecFSM "Client\FSM\updateteamsmarkers.fsm"};
+[] ExecFSM "Client\FSM\updateactions.fsm";
+/* Don't pause the client initialization process. */
+[] Spawn {
+ waitUntil {townInit};
+ /* Handle the capture GUI */
+ diag_log Format["[WFBE (INIT)][frameno:%1 | ticktime:%2] Init_Client: Towns Capture FSM - [Done]",diag_frameno,diag_tickTime];
+ [] ExecFSM "Client\FSM\updatecapture.fsm";
+ /* Handle the map town markers */
+ diag_log Format["[WFBE (INIT)][frameno:%1 | ticktime:%2] Init_Client: Towns Marker FSM - [Done]",diag_frameno,diag_tickTime];
+ [] ExecFSM "Client\FSM\updatetownmarkers.fsm";
+ waitUntil {!isNil Format["%1BaseStructures",sideJoinedText]};
+ /* Handle the client actions */
+ diag_log Format["[WFBE (INIT)][frameno:%1 | ticktime:%2] Init_Client: Available Action FSM - [Done]",diag_frameno,diag_tickTime];
+ [] ExecFSM "Client\FSM\updateavailableactions.fsm";
+ /* Resources Handler */
+ if !(('WFBE_INCOMESYSTEM' Call GetNamespace) in [3,4]) then {
+ diag_log Format["[WFBE (INIT)][frameno:%1 | ticktime:%2] Init_Client: Ressources FSM - [Done]",diag_frameno,diag_tickTime];
+ (sideJoined) ExecFSM "Client\FSM\resources_cli.fsm";
+ };
+};
+[] Spawn {
+ Private ["_commanderTeam"];
+ waitUntil{sleep 0.1;!isNil {(sideJoined) Call GetCommanderTeam}};
+ /* Commander Handling */
+ diag_log Format["[WFBE (INIT)][frameno:%1 | ticktime:%2] Init_Client: Commander Update FSM - [Done]",diag_frameno,diag_tickTime];
+ [] ExecFSM "Client\FSM\updateclient.fsm";
+};
+
+//--- Add the briefing (notes).
+[] Call Compile preprocessFile "briefing.sqf";
+
+//--- HQ Radio system.
+waitUntil {!isNil Format ["BIS_WF_HQ%1",sideJoinedText]};
+_HQRadio = Call Compile Format ["BIS_WF_HQ%1",sideJoinedText];
+diag_log Format["[WFBE (INIT)][frameno:%1 | ticktime:%2] Init_Client: Radio Announcer - [Done]",diag_frameno,diag_tickTime];
+waitUntil {!isNil Format ["BIS_WF_HQ%1_TI",sideJoinedText]};
+WFBE_V_HQTopicSide = Call Compile Format ["BIS_WF_HQ%1_TI",sideJoinedText];
+diag_log Format["[WFBE (INIT)][frameno:%1 | ticktime:%2] Init_Client: Radio Announcer (Identity Synchronization) - [Done]",diag_frameno,diag_tickTime];
+_HQRadio setIdentity WFBE_V_HQTopicSide;
+_HQRadio setRank "COLONEL";
+_HQRadio setGroupId ["HQ"];
+_HQRadio kbAddTopic [WFBE_V_HQTopicSide,"Client\kb\hq.bikb","Client\kb\hq.fsm",{call compile preprocessFileLineNumbers "Client\kb\hq.sqf"}];
+player kbAddTopic [WFBE_V_HQTopicSide,"Client\kb\hq.bikb","Client\kb\hq.fsm",{call compile preprocessFileLineNumbers "Client\kb\hq.sqf"}];
+sideHQ = _HQRadio;
+
+diag_log Format["[WFBE (INIT)][frameno:%1 | ticktime:%2] Init_Client: Radio Announcers - [Done]",diag_frameno,diag_tickTime];
+
+/* Wait for a valid signal (Teamswaping) with failover */
+if (isMultiplayer && paramKickTeamswappers && time > 7) then {
+ Private ["_get","_timelaps"];
+ _get = true;
+
+ sleep (random 0.1);
+
+ WFBE_RequestJoin = ['SRVFNCREQUESTJOIN',[getPlayerUID(player),sideJoined,name player,vehicleVarName player]];
+ publicVariable 'WFBE_RequestJoin';
+
+ _timelaps = 0;
+ while {true} do {
+ sleep 0.1;
+ _get = 'WFBE_P_CANJOIN' Call GetNamespace;
+ if !(isNil '_get') exitWith {diag_log Format["[WFBE (INIT)][frameno:%1 | ticktime:%2] Init_Client: Client %3 (side: %4) can join game -> %5",diag_frameno,diag_tickTime,name player,sideJoined,_get]};
+
+ _timelaps = _timelaps + 0.1;
+ if (_timelaps > 5) then {
+ _timelaps = 0;
+ diag_log Format["[WFBE (WARNING)][frameno:%1 | ticktime:%2] Init_Client: Client %3 (side: %4) Pending... no ACK answer from server were received, sending a new request...",diag_frameno,diag_tickTime,name player,sideJoined];
+ WFBE_RequestJoin = ['SRVFNCREQUESTJOIN',[getPlayerUID(player),sideJoined,name player,vehicleVarName player]];
+ publicVariable 'WFBE_RequestJoin';
+ };
+ };
+
+ if !(_get) exitWith {
+ diag_log Format["[WFBE (WARNING)][frameno:%1 | ticktime:%2] Init_Client: Client %3 (side: %4) has teamswapped and was sent back to the lobby...",diag_frameno,diag_tickTime,name player,sideJoined];
+ (localize 'STR_WF_CHAT_Teamswap_Warnning') Call CommandChatMessage;
+ sleep 3;
+ failMission "END1";
+ };
+};
+
+/* Get the client starting location */
+diag_log Format["[WFBE (INIT)][frameno:%1 | ticktime:%2] Init_Client: Getting the client spawn location - [In Progress]",diag_frameno,diag_tickTime];
+_base = objNull;
+if (time < 30) then {
+ waitUntil {!isNil Format ["%1StartingLocation",sideJoinedText]};
+ _base = Call Compile Format ["%1StartingLocation",sideJoinedText];
+} else {
+ waitUntil {!isNil Format ["%1MHQ",sideJoinedText]};
+ _base = (sideJoinedText) Call GetSideHQ;
+ _buildings = (sideJoinedText) Call GetSideStructures;
+
+ if (count _buildings > 0) then {_base = _buildings select 0};
+};
+
+diag_log Format["[WFBE (INIT)][frameno:%1 | ticktime:%2] Init_Client: Getting the client spawn location (%3) - [Done]",diag_frameno,diag_tickTime,typeOf _base];
+
+/* Position the client at the previously defined location */
+player setPos ([getPos _base,20,30] Call GetRandomPosition);
+
+/* HQ Building Init. */
+waitUntil {!isNil Format ["%1MHQDeployed",sideJoinedText]};
+diag_log Format["[WFBE (INIT)][frameno:%1 | ticktime:%2] Init_Client: CoIn module for HQ - [Done]",diag_frameno,diag_tickTime];
+_isDeployed = (sideJoinedText) Call GetSideHQDeployed;
+if (_isDeployed) then {
+ ['WFBE_AREAHQDEPLOYED' Call GetNamespace,true,MCoin] Call Compile preprocessFile "Client\Init\Init_Coin.sqf";
+} else {
+ ['WFBE_AREAHQUNDEPLOYED' Call GetNamespace,false,MCoin] Call Compile preprocessFile "Client\Init\Init_Coin.sqf";
+};
+
+/* Options menu. */
+Options = player addAction ["<t color='#42b6ff'>" + (localize "STR_WF_Options") + "</t>","Client\Action\Action_Menu.sqf", "", 1, false, true, "", "_target == player"];
+
+/* Zeta Cargo Lifter. */
+[] Call Compile preprocessFile "Client\Module\ZetaCargo\Zeta_Init.sqf";
+/* Set Groups ID. */
+[] Call Compile preprocessFile "Client\Functions\Client_SetGroupsID.sqf";
+
+sleep 1;
+
+//--- Play a tune.
+_music = switch (true) do {
+ case WF_A2_Vanilla: {["Track11_Large_Scale_Assault","Track02_Insertion","Ambient07_Manhattan","Track10_Logistics","Track09_Movement_To_Contact","Track16_Valentine"]};
+ case WF_A2_Arrowhead: {["EP1_Track10","EP1_Track12","EP1_Track14","EP1_Track15"]};
+ case WF_A2_CombinedOps: {["EP1_Track10","EP1_Track15","Track11_Large_Scale_Assault","Track02_Insertion","Ambient07_Manhattan","Track10_Logistics","Track09_Movement_To_Contact","Track16_Valentine"]};
+ default {[]};
+};
+
+if (count _music > 0) then {playMusic (_music select floor(random(count _music)))};
+
+/* Override player's Gear.*/
+player call EquipDefaultLoadout;
+/* Default gear menu filler. */
+WF_Logic setVariable ['filler','primary'];
+
+/* Skill Module. */
+[] Call Compile preprocessFile "Client\Module\Skill\Skill_Init.sqf";
+(player) Call WFBE_SK_FNC_Apply;
+
+/* Vote System, define whether a vote is already running or not */
+_voteTime = 0;
+waitUntil {sleep 0.1;_voteTime = WF_Logic getVariable Format ["%1CommanderVoteTime",sideJoinedText];!(isNil '_voteTime')};
+diag_log Format["[WFBE (INIT)][frameno:%1 | ticktime:%2] Init_Client: Vote System Initialization - [Done]",diag_frameno,diag_tickTime];
+if (_voteTime > 0) then {createDialog "RscMenu_Voting"};
+
+/* Debug System - Client */
+if (WF_Debug) then {
+ onMapSingleClick {vehicle player setpos _pos;(vehicle player) setVelocity [0,0,-0.1];}; //--- Teleport
+ //player addEventHandler ["HandleDamage", {false}];
+ // player setCaptive true;
+ player addEventHandler ["HandleDamage", {false;if (player != (_this select 3)) then {(_this select 3) setDammage 1}}]; //--- God-Slayer mode.
+};
+
+/* ISIS Module */
+if (('WFBE_ISIS' Call GetNamespace) != 0) then {player addEventHandler['handleDamage',{_this Call ISIS_Wound}]};
+
+/* Artillery UI */
+if (paramArtyUI) then {[] ExecVM "ca\modules\ARTY\data\scripts\init.sqf"};
+
+/* EASA */
+if (paramEASA) then {[] Call Compile preProcessFile "Client\Module\EASA\EASA_Init.sqf"};
+
+/* Key Binding */
+[] Call Compile preprocessFile "Client\Init\Init_Keybind.sqf";
+
+/* JIP Handler */
+waitUntil {townInit};
+diag_log Format["[WFBE (INIT)][frameno:%1 | ticktime:%2] Init_Client: Towns Initialization - [Done]",diag_frameno,diag_tickTime];
+
+/* Conquest helper */
+if (('WFBE_TOWNCONQUESTMODE' Call GetNamespace) > 0) then {[] ExecFSM "Client\FSM\conquest_helper.fsm"};
+
+sleep 3;
+/* JIP System, initialize the camps and towns properly. */
+[] Spawn {
+ sleep 2;
+ diag_log Format["[WFBE (INIT)][frameno:%1 | ticktime:%2] Init_Client: JIP Detected, Updating the markers - [Done]",diag_frameno,diag_tickTime];
+ [] ExecVM "Client\Functions\Client_InitTownsAndCamps.sqf";
+};
+
+/* Repair Truck CoIn Handling. */
+['WFBE_AREAREPAIRTRUCK' Call GetNamespace,false,RCoin,"REPAIR"] Call Compile preprocessFile "Client\Init\Init_Coin.sqf";
+
+/* A new player come to reinforce the battlefield */
+[sideJoinedText,'UnitsCreated',1] Call UpdateStatistics;
+
+/* Towns Task System */
+["TownAddComplete"] Spawn TaskSystem;
+
+/* End Init */
+finishMissionInit;
+
+/* Client death handler. */
+Call Compile Format ["player addEventHandler ['Killed',{[_this select 0,_this select 1] Spawn PlayerKilled;[_this select 0,_this select 1,%1,false] Spawn UnitKilled}]",sideJoined];
+
+/* Client Init Done - Remove the blackout */
+12452 cutText [(localize 'STR_WF_Loading')+"...","BLACK IN",5];
+
+diag_log Format["[WFBE (INIT)][frameno:%1 | ticktime:%2] Init_Client: Init End at %3",diag_frameno,diag_tickTime,time]; \ No newline at end of file
diff --git a/Client/Init/Init_Coin.sqf b/Client/Init/Init_Coin.sqf
new file mode 100644
index 0000000..7bb4caf
--- /dev/null
+++ b/Client/Init/Init_Coin.sqf
@@ -0,0 +1,91 @@
+Private ['_area','_coin','_coinCategories','_coinItemArray','_curId','_d','_defenseCategories','_defenseCosts','_defenseDescriptions','_defenses','_emptyStructures','_extra','_fix','_i','_indexCategory','_isHQdeployed','_structureCosts','_structureDescriptions','_structures','_updateDefenses','_updateStructures'];
+_area = _this select 0;
+_isHQdeployed = _this select 1;
+_coin = _this select 2;
+_extra = "";
+if (count _this > 3) then {_extra = _this select 3};
+
+_coin setVariable ["BIS_COIN_areasize", _area];
+_coin setVariable ["BIS_COIN_fundsDescription",["$"]];
+if (_extra == "") then {
+ _coin setVariable ["BIS_COIN_funds",if !(paramMoneyOnly) then {[(sideJoined) Call GetSideSupply, Call GetPlayerFunds]} else {Call GetPlayerFunds}];
+ _coin setVariable ["BIS_COIN_fundsDescription",if !(paramMoneyOnly) then {["S ","$ "]} else {["$ "]}];
+};
+
+_defenses = [];
+_defenseCosts = [];
+_defenseDescriptions = [];
+_defenseCategories = [];
+
+_structures = [(Format["WFBE_%1STRUCTURENAMES",sideJoinedText] Call GetNamespace) select 0];
+_structureCosts = [(Format["WFBE_%1STRUCTURECOSTS",sideJoinedText] Call GetNamespace) select 0];
+_structureDescriptions = [(Format["WFBE_%1STRUCTUREDESCRIPTIONS",sideJoinedText] Call GetNamespace) select 0];
+
+_i = 0;
+
+_updateStructures = false;
+_updateDefenses = false;
+_emptyStructures = false;
+
+if (_isHQdeployed && _extra == "") then {_i = 1;_updateStructures = true; _updateDefenses = true};
+if (_extra == "REPAIR") then {_updateDefenses = true; _emptyStructures = true;_coin setVariable ["BIS_COIN_funds",Call GetPlayerFunds]};
+
+if (_updateStructures) then {
+ _structures = Format["WFBE_%1STRUCTURENAMES",sideJoinedText] Call GetNamespace;
+ _structureCosts = Format["WFBE_%1STRUCTURECOSTS",sideJoinedText] Call GetNamespace;
+ _structureDescriptions = Format["WFBE_%1STRUCTUREDESCRIPTIONS",sideJoinedText] Call GetNamespace;
+};
+
+if (_updateDefenses) then {
+ _defenses = Format["WFBE_%1DEFENSENAMES",sideJoinedText] Call GetNamespace;
+ {
+ _d = _x Call GetNamespace;
+ if !(isNil '_d') then {
+ _defenseCosts = _defenseCosts + [(_d select QUERYUNITPRICE)];
+ _defenseDescriptions = _defenseDescriptions + [(_d select QUERYUNITLABEL)];
+ _defenseCategories = _defenseCategories + [(_d select QUERYUNITFACTORY)];
+ };
+ } forEach _defenses;
+};
+
+if (_emptyStructures) then {
+ _structures = [];
+ _structureCosts = [];
+ _structureDescriptions = [];
+};
+
+_indexCategory=0;
+_coinCategories = [];
+_coinItemArray = [];
+if (count _structures > 0) then {_coinCategories = _coinCategories + [localize "strwfbase"];_indexCategory =_indexCategory +1;};
+if (count _defenses > 0) then {if (_extra == "REPAIR") then {_coinCategories = []};_coinCategories = _coinCategories + [localize "str_m04t37_0"] + [localize "STR_WF_Fortification"] + [localize "STR_WF_Strategic"] + [localize "STR_WF_Ammo"]};
+
+if (_isHQdeployed && _i == 1 && _extra == "") then {_coinItemArray = _coinItemArray + [[_structures select 0,0,[0, _structureCosts select 0], (_structureDescriptions select 0) + " " + localize "strwfhqmobilizeme"]]};
+for [{_i=_i}, {_i<count _structures}, {_i = _i+1}] do {
+ _coinItemArray = _coinItemArray + [[_structures select _i,0,[0, _structureCosts select _i], (_structureDescriptions select _i)]];
+};
+
+_fix = if !(paramMoneyOnly) then {1} else {0};
+if (_extra == "REPAIR") then {_coinItemArray = [];_indexCategory=0;_fix = 0};
+for '_i' from 0 to count(_defenses)-1 do {
+ _curId = _indexCategory;
+ switch (_defenseCategories select _i) do {
+ case "Fortification": {_curId = _indexCategory + 1};
+ case "Strategic": {_curId = _indexCategory + 2};
+ case "Ammo": {_curId = _indexCategory + 3};
+ };
+ _coinItemArray = _coinItemArray + [[_defenses select _i,_curId,[_fix, _defenseCosts select _i], _defenseDescriptions select _i]];
+} forEach _defenses;
+
+_coin setVariable ["BIS_COIN_categories",_coinCategories];
+_coin setVariable ["BIS_COIN_items",_coinItemArray];
+
+//--- Logic ID
+if (isnil "BIS_coin_lastID") then {BIS_coin_lastID = -1};
+BIS_coin_lastID = BIS_coin_lastID + 1;
+call compile format ["BIS_coin_%1 = _coin; _coin setvehiclevarname 'BIS_coin_%1';",BIS_coin_lastID];
+
+_coin setVariable ["BIS_COIN_ID",BIS_coin_lastID];
+
+//--- Temporary variables
+_coin setVariable ["BIS_COIN_params",[]]; \ No newline at end of file
diff --git a/Client/Init/Init_Faction.sqf b/Client/Init/Init_Faction.sqf
new file mode 100644
index 0000000..543d68d
--- /dev/null
+++ b/Client/Init/Init_Faction.sqf
@@ -0,0 +1,19 @@
+Private ['_c','_list','_r','_side','_type','_u'];
+_type = _this select 0;
+_side = _this select 1;
+_list = _this select 2;
+
+_r = [localize 'STR_WF_COMMAND_All'];
+_u = [];
+
+{
+ _c = _x Call GetNamespace;
+ if !(isNil '_c') then {
+ if !((_c select QUERYUNITFACTION) in _u) then {
+ _r = _r + [(_c select QUERYUNITFACTION)];
+ _u = _u + [(_c select QUERYUNITFACTION)];
+ };
+ };
+} forEach _list;
+
+[Format["WFBE_%1%2FACTIONS",_side,_type],_r,true] Call SetNamespace; \ No newline at end of file
diff --git a/Client/Init/Init_Keybind.sqf b/Client/Init/Init_Keybind.sqf
new file mode 100644
index 0000000..c9e6c08
--- /dev/null
+++ b/Client/Init/Init_Keybind.sqf
@@ -0,0 +1,26 @@
+/* Gear keybinding */
+WF_Gear_Hotkeys = {
+ Private ['_ctrl','_key'];
+ _key = _this select 1;
+ _ctrl = _this select 3;
+
+ if (_key in (actionKeys "User15")) then {
+ WF_Logic setVariable ['filler','all'];
+ };
+ if (_key in (actionKeys "User16")) then {
+ WF_Logic setVariable ['filler','template'];
+ };
+ if (_key in (actionKeys "User17")) then {
+ WF_Logic setVariable ['filler','primary'];
+ };
+ if (_key in (actionKeys "User18")) then {
+ WF_Logic setVariable ['filler','secondary'];
+ };
+ if (_key in (actionKeys "User19")) then {
+ WF_Logic setVariable ['filler','sidearm'];
+ };
+ if (_key in (actionKeys "User20")) then {
+ WF_Logic setVariable ['filler','misc'];
+ };
+};
+
diff --git a/Client/Module/Arty/ARTY_HandleILLUM.sqf b/Client/Module/Arty/ARTY_HandleILLUM.sqf
new file mode 100644
index 0000000..e6a4d43
--- /dev/null
+++ b/Client/Module/Arty/ARTY_HandleILLUM.sqf
@@ -0,0 +1,26 @@
+/* ILLUM Handler, Battlefield light bringer */
+Private ['_deployPos','_destination','_flare','_force','_shell','_targetToHit','_velocity'];
+_shell = _this select 0;
+_destination = _this select 1;
+_velocity = _this select 2;
+
+//--- 1KM Above.
+_destination set [2, 1000];
+
+//--- Positionate the shell in the air.
+_shell setPos _destination;
+_targetToHit = objNull;
+
+//--- Fall straigh.
+_shell setVelocity [0,0,-_velocity];
+
+//--- Wait before deploying.
+waitUntil {(getPos _shell select 2) < 310};
+
+//--- Retrieve the shell position.
+_deployPos = getPos _shell;
+deleteVehicle _shell;
+
+//--- Deploy a Flare.
+_flare = "ARTY_Flare_Medium" createVehicle _deployPos;
+_flare setPos _deployPos; \ No newline at end of file
diff --git a/Client/Module/Arty/ARTY_HandleSADARM.sqf b/Client/Module/Arty/ARTY_HandleSADARM.sqf
new file mode 100644
index 0000000..f6be193
--- /dev/null
+++ b/Client/Module/Arty/ARTY_HandleSADARM.sqf
@@ -0,0 +1,108 @@
+/* SADARM Handler, Armor Killer */
+Private ['_altitude','_barrel','_burst','_chuteModel','_deployPos','_destination','_dir','_dx','_dy','_dz','_force','_hmag','_mag','_parachute','_projectile','_px','_py','_pz','_shell','_targetFound','_targets','_targetToHit','_ux','_uy','_uz','_v1','_velocity','_xoff','_yoff','_zcomp','_zoff'];
+_shell = _this select 0;
+_destination = _this select 1;
+_velocity = _this select 2;
+
+//--- 1KM Above.
+_destination set [2, 1000];
+
+//--- Positionate the shell in the air.
+_shell setPos _destination;
+_targetToHit = objNull;
+
+//--- Fall straigh.
+_shell setVelocity [0,0,-_velocity];
+
+//--- Wait before deploying.
+waitUntil {(getPos _shell select 2) < 600};
+
+//--- Retrieve the shell position.
+_deployPos = getPos _shell;
+deleteVehicle _shell;
+
+//--- Deploy the model.
+_chuteModel = if (sideJoined == west) then {'WFBE_WESTPARACHUTE' Call GetNamespace} else {'WFBE_EASTPARACHUTE' Call GetNamespace};
+_parachute = _chuteModel createVehicle _deployPos;
+_parachute setPos _deployPos;
+_barrel = "Barrel4" createVehicle _deployPos;
+_barrel attachTo [_parachute,[0,0,0]];
+
+//--- Free Fall Simulation with stabilization.
+waitUntil
+{
+ _altitude = getPos _parachute select 2;
+ _v1 = velocity _parachute;
+ _parachute setVelocity [_v1 select 0, _v1 select 1, -_velocity];
+ (_altitude < 400);
+};
+
+//--- Using BIS SADARM Script, improved.
+_targetFound = 0;
+
+//--- Wait until either way the device find no target and fall bellow 10 meters or it find one or more targets.
+waitUntil
+{
+ _deployPos = getPos _barrel;
+ _px = _deployPos select 0;
+ _py = _deployPos select 1;
+ _pz = _deployPos select 2;
+
+ //--- Awaits for the altitude.
+ if (_pz < 275 and _pz > 75) then {
+ //--- Retrieve an potential target list.
+ _targets = _barrel nearEntities [["Car","Motorcycle","Tank","Ship","StaticCannon"], 'WFBE_ARTILLERYAMMOSADARMRANGE' Call GetNamespace];
+ if (count _targets > 0) then {
+ _targetToHit = _targets select floor(random(count _targets));
+ sleep random(3);
+ _targetFound=1;
+ };
+ };
+
+ sleep 0.2;
+
+ (_pz < 10 or _targetFound==1);
+};
+
+// Deploy attack munition if a target was found.
+if (_targetFound==1 && alive _barrel) then {
+ _deployPos = getPos _barrel;
+ _px = _deployPos select 0;
+ _py = _deployPos select 1;
+ _pz = _deployPos select 2;
+
+ deleteVehicle _barrel;
+ deleteVehicle _parachute;
+
+ // Create burst.
+ _burst = "ARTY_SADARM_BURST" createVehicleLocal [_px, _py, _pz + 5];
+ _burst setPos [_px, _py, _pz + 5];
+
+ // Create projectile
+ _projectile = "ARTY_SADARM_PROJO" createVehicleLocal [_px, _py, _pz + 5];
+ _projectile setPos [_px, _py, _pz + 5];
+
+ // Calculate direction
+ _xoff = (getPos _targetToHit select 0) - _px;
+ _yoff = (getPos _targetToHit select 1) - _py;
+ _zoff = - _pz;
+ _mag = sqrt(_xoff*_xoff + _yoff*_yoff + _zoff*_zoff);
+ _dir = [_xoff/_mag, _yoff/_mag, _zoff/_mag];
+ _dx = _dir select 0;
+ _dy = _dir select 1;
+ _dz = _dir select 2;
+ _hmag = sqrt(_dx*_dx + _dy*_dy);
+ _zcomp = -_dz/_hmag;
+ _ux = _zcomp*_dx;
+ _uy = _zcomp*_dy;
+ _uz = _hmag;
+
+ //--- Positionate the projectile.
+ _projectile setVectorDir _dir;
+ _projectile setVectorUp [_ux,_uy,_uz];
+ _projectile setVelocity [(_dir select 0) * 300, (_dir select 1) * 300, (_dir select 2) * 300];
+};
+
+//--- Delete the model.
+deleteVehicle _barrel;
+if !(isNull _parachute) then {deleteVehicle _parachute}; \ No newline at end of file
diff --git a/Client/Module/Arty/ARTY_mobileMissionFinish.sqf b/Client/Module/Arty/ARTY_mobileMissionFinish.sqf
new file mode 100644
index 0000000..9b560c4
--- /dev/null
+++ b/Client/Module/Arty/ARTY_mobileMissionFinish.sqf
@@ -0,0 +1,12 @@
+Private ["_lookPos","_vehicle"];
+
+_vehicle = _this select 0;
+
+// Lower gun/missile racks.
+_lookPos = [(getPos _vehicle select 0) + (sin (getDir _vehicle))*20,
+(getPos _vehicle select 1) + (cos (getDir _vehicle))*20,
+ (getPos _vehicle select 2) - 5];
+
+(driver _vehicle) enableAI "MOVE";
+(driver _vehicle) enableAI "TARGET";
+(gunner _vehicle) lookAt _lookPos; \ No newline at end of file
diff --git a/Client/Module/Arty/ARTY_mobileMissionPrep.sqf b/Client/Module/Arty/ARTY_mobileMissionPrep.sqf
new file mode 100644
index 0000000..9922b0d
--- /dev/null
+++ b/Client/Module/Arty/ARTY_mobileMissionPrep.sqf
@@ -0,0 +1,10 @@
+Private ['_vehicle'];
+
+_vehicle = _this select 0;
+
+(driver _vehicle) action ["engineOff", _vehicle];
+(driver _vehicle) disableAI "MOVE";
+(driver _vehicle) disableAI "TARGET";
+waitUntil {speed _vehicle < 1};
+
+sleep 3;
diff --git a/Client/Module/CM/CM_Countermeasures.sqf b/Client/Module/CM/CM_Countermeasures.sqf
new file mode 100644
index 0000000..795108b
--- /dev/null
+++ b/Client/Module/CM/CM_Countermeasures.sqf
@@ -0,0 +1,22 @@
+Private ["_flarecount","_i","_isActive","_missile","_type","_vehicle"];
+_vehicle = _this select 0;
+_missile = _this select 1;
+
+if (alive _vehicle && (getPos _vehicle) select 2 > 5) then {
+ _isActive = _vehicle getvariable "FlareActive";
+ _type = getNumber (configFile >> "CfgAmmo" >> _missile >> "AirLock");
+ if ((_type == 1) && (! _isActive)) then {
+ private ["_flarecount"];
+ _vehicle setVariable ["FlareActive", true];
+ if ((driver _vehicle) == player) then {_vehicle vehicleChat "WARNING: incomming missile!"};
+ _flarecount = _vehicle getVariable "FlareCount";
+ if (_flarecount > 0) then {
+ _this Spawn CM_Spoofing;
+ for [{_i=0}, {_i<8}, {_i=_i+1}] do {
+ [_vehicle] Call CM_Flares;
+ sleep 0.3;
+ };
+ };
+ _vehicle setVariable ["FlareActive", false];
+ };
+}; \ No newline at end of file
diff --git a/Client/Module/CM/CM_Flares.sqf b/Client/Module/CM/CM_Flares.sqf
new file mode 100644
index 0000000..5d616d8
--- /dev/null
+++ b/Client/Module/CM/CM_Flares.sqf
@@ -0,0 +1,46 @@
+//--- ArmA 2 countermeasures, by Maddmatt.
+Private ["_dirpos","_div","_emmiters","_flare","_flarecount","_flares","_flarevel","_i","_launchercount","_li","_muzzzlevel","_relpos","_sm","_sp","_vehicle","_vvel"];
+_vehicle = _this select 0;
+_flares = [];
+_emmiters = [];
+_muzzzlevel = 25;
+if (_vehicle isKindOf "Plane") then {_muzzzlevel = 150};
+_launchercount = 0;
+while {([0,0,0] distance (_vehicle selectionPosition (format ["flare_launcher%1",_launchercount+1]))) != 0} do {_launchercount = _launchercount+1};
+
+for "_i" from 1 to (_launchercount) do {
+ _flarecount = (_vehicle getVariable "FlareCount") - 1;
+ _vehicle setVariable ["FlareCount", _flarecount];
+ _relpos = _vehicle modelToWorld (_vehicle selectionPosition format["flare_launcher%1",_i]);
+ _dirpos = _vehicle modelToWorld (_vehicle selectionPosition format["flare_launcher%1_dir",_i]);
+ _flare = "FlareCountermeasure" createVehicleLocal _relpos;
+ _dirpos = [(_dirpos select 0) - (_relpos select 0),(_dirpos select 1) - (_relpos select 1),(_dirpos select 2) - (_relpos select 2)];
+ _div = (abs (_dirpos select 0)) + (abs (_dirpos select 1)) + (abs (_dirpos select 2));
+ _flarevel = [(_dirpos select 0)/_div*_muzzzlevel,(_dirpos select 1)/_div*_muzzzlevel,(_dirpos select 2)/_div*_muzzzlevel];
+ _vvel = velocity _vehicle;
+
+ _flare setVelocity [(_flarevel select 0) + (_vvel select 0),(_flarevel select 1) + (_vvel select 1),(_flarevel select 2) + (_vvel select 2)];
+ _flares = _flares + [_flare];
+
+ _sm = "#particlesource" createVehicleLocal getpos _flare;
+ _sm setParticleRandom [0.5, [0.3, 0.3, 0.3], [0.5, 0.5, 0.5], 0, 0.3, [0, 0, 0, 0], 0, 0,360];
+ _sm setParticleParams [["\ca\Data\ParticleEffects\Universal\Universal", 16, 12, 8,0],"", "Billboard", 1, 3, [0, 0, 0],[0,0,0], 1, 1, 0.80, 0.5, [1.3,4],[[0.9,0.9,0.9,0.6], [1,1,1,0.3], [1,1,1,0]],[1],0.1,0.1,"","",_flare];
+ _sm setDropInterval 0.02;
+
+ _sp = "#particlesource" createVehicleLocal getpos _flare;
+ _sp setParticleRandom [0.03, [0.3, 0.3, 0.3], [1, 1, 1], 0, 0.2, [0, 0, 0, 0], 0, 0,360];
+ _sp setParticleParams [["\ca\Data\ParticleEffects\Universal\Universal", 16, 13, 2,0],"", "Billboard", 1, 0.1, [0, 0, 0],[0,0,0], 1, 1, 0.80, 0.5, [1.5,0],[[1,1,1,-4], [1,1,1,-4], [1,1,1,-2],[1,1,1,0]],[1000],0.1,0.1,"","",_flare,360];
+ _sp setDropInterval 0.001;
+
+ _li = "#lightpoint" createVehicleLocal getpos _flare;
+ _li setLightBrightness 0.1;
+ _li setLightAmbient [0.8, 0.6, 0.2];
+ _li setLightColor [1, 0.5, 0.2];
+ _li lightAttachObject [_flare, [0,0,0]];
+ _emmiters = _emmiters + [_sm,_sp,_li];
+};
+
+(_emmiters + _flares) spawn {
+ sleep 4.5 + random 1;
+ {deletevehicle _x} forEach _this;
+}; \ No newline at end of file
diff --git a/Client/Module/CM/CM_Init.sqf b/Client/Module/CM/CM_Init.sqf
new file mode 100644
index 0000000..d1a119b
--- /dev/null
+++ b/Client/Module/CM/CM_Init.sqf
@@ -0,0 +1,9 @@
+Private ["_amount","_vehicle"];
+_vehicle = _this select 0;
+
+if (isNull _vehicle) exitWith {};
+waitUntil {commonInitComplete};
+sleep 2;
+_amount = if (_vehicle isKindOf "Plane") then {'WFBE_COUNTERMEASUREPLANES' Call GetNamespace} else {'WFBE_COUNTERMEASURECHOPPERS' Call GetNamespace};
+_vehicle setVariable ["FlareCount", _amount];
+_vehicle setVariable ["FlareActive", false];
diff --git a/Client/Module/CM/CM_Spoofing.sqf b/Client/Module/CM/CM_Spoofing.sqf
new file mode 100644
index 0000000..25bb764
--- /dev/null
+++ b/Client/Module/CM/CM_Spoofing.sqf
@@ -0,0 +1,18 @@
+Private ["_ammo","_chance","_enemy","_prob","_missile","_vehicle"];
+_vehicle = _this select 0;
+_ammo = _this select 1;
+_enemy = _this select 2;
+_missile = objnull;
+
+if ((alive _vehicle) && (isEngineOn _vehicle)) then {
+ _missile = nearestObject [_enemy,_ammo];
+ waitUntil {(_missile distance _vehicle) < ((speed _vehicle) * 1.5)};
+ _prob = 25 + (random 75);
+ _chance = random 100;
+ if (_prob > _chance) then {
+ while {alive _missile} do {
+ _missile setDir ((getDir _missile) + ((random 20) - 10));
+ sleep 0.1;
+ };
+ };
+}; \ No newline at end of file
diff --git a/Client/Module/CoIn/coin_interface.sqf b/Client/Module/CoIn/coin_interface.sqf
new file mode 100644
index 0000000..d8fa437
--- /dev/null
+++ b/Client/Module/CoIn/coin_interface.sqf
@@ -0,0 +1,950 @@
+
+private ["_tooFar","_nearLog","_startpos","_camera","_logicGrp","_logicASL","_nvgstate","_loaded","_localtime",
+"_player","_preview","_get","_border","_itemcash","_itemcost","_a","_b","_funds","_itemclass_preview","_mhq",
+"_structuresCosts","_supply","_distance","_direction","_npos","_helper","_array","_hqDeployed","_index","_gdir",
+"_new","_color","_fundsRemaining","_isFlat","_colorGUI","_tooltip","_tooltipType","_pos","_dir","_colorGreen","_colorRed",
+"_colorGray","_itemclass","_itemcategory","_itemFunds","_itemname","_fileIcon","_filePicture","_textHeader",
+"_textPicture","_type","_text1","_status","_text2","_text3","_textHint","_textControls","_cashValues","_cashValuesOld",
+"_cashValue","_cashDescription","_cashText","_cashLines","_categories","_categoriesMenu","_limit","_buildLimit","_buildings",
+"_checks","_canAfford","_canAffordCount","_text","_arrayNames","_arrayNamesLong","_arrayEnable","_arrayParams",
+"_find","_category","_cashValuesCount","_cashSize","_cashPos","_upgrades","_items","_canAffordCountOld",
+"_params","_selected","_oldTooltip","_fundsDescription","_restart","_logic",
+"_mode","_areasize","_limitH","_limitV","_limitHOld","_limitVOld","_oldMenu","_source",
+"_bns","_greenList","_buildingsNames","_buildingsType","_createBorder","_createBorderScope","_maxGrad","_minDist"];
+
+_logic = _this select 3;
+_startPos = _this select 4;
+_source = _this select 5;
+
+if !(alive _source) exitWith {};
+
+//--- Area limits.
+_root = "REPAIR";
+_hq = (sideJoined) Call GetSideHQ;
+if (_source == _hq) then {_root = "HQ"};
+
+_tooFar = false;
+if (paramBaseArea) then {
+ if (_source == _hq) then {
+ if (count(WF_Logic getVariable Format ['%1Area',SideJoinedText]) >= ('WFBE_BASEAREAMAX' Call GetNamespace)) then {
+ _nearLog = [_startPos,WF_Logic getVariable Format ['%1Area',SideJoinedText]] Call SortByDistance;
+ _startpos = position (_nearLog select 0);
+ if (_source distance _startpos > ('WFBE_MHQBUILDINGRANGE' Call GetNamespace)) exitWith {
+ _tooFar = true;
+ };
+ };
+ };
+};
+
+if (isNil 'WFBE_COIN_Root') then {WFBE_COIN_Root = ""};
+if (WFBE_COIN_Root != _root) then {lastBuilt = []};
+WFBE_COIN_Root = _root;
+
+if (_tooFar) exitWith {hint (localize 'STR_WF_INFO_BaseArea_Reached')};//--- Base area reached.
+
+//--- Call in the construction interface.
+112200 cutrsc ["WFBE_ConstructionInterface","plain"]; //---added-MrNiceGuy
+uiNamespace setVariable ["COIN_displayMain",finddisplay 46];
+
+//--- Terminate of system is already running
+if !(isNil {player getVariable "bis_coin_logic"}) exitWith {};
+player setVariable ["bis_coin_logic",_logic];
+bis_coin_player = player;
+
+_camera = BIS_CONTROL_CAM;
+if (isNil "BIS_CONTROL_CAM") then {
+ _camera = "camconstruct" camCreate [position player select 0,position player select 1,15];
+ _camera cameraEffect ["internal","back"];
+ _camera camPrepareFov 0.900;
+ _camera camPrepareFocus [-1,-1];
+ _camera camCommitPrepared 0;
+ cameraEffectEnableHUD true;
+ _camera setdir direction player;
+ [_camera,-30,0] call BIS_fnc_setPitchBank;
+ _camera camConstuctionSetParams ([_startPos] + (_logic getVariable "BIS_COIN_areasize"));
+};
+BIS_CONTROL_CAM = _camera;
+BIS_CONTROL_CAM_LMB = false;
+BIS_CONTROL_CAM_RMB = false;
+showCinemaBorder false;
+
+1122 cutrsc ["constructioninterface","plain"];
+
+//--- Prevent uikey override for other mods.
+WF_COIN_DEH1 = (uiNamespace getVariable "COIN_displayMain") displayAddEventHandler ["KeyDown", "if !(isNil 'BIS_CONTROL_CAM_Handler') then {BIS_temp = ['keydown',_this,commandingMenu] spawn BIS_CONTROL_CAM_Handler; BIS_temp = nil;}"];
+WF_COIN_DEH2 = (uiNamespace getVariable "COIN_displayMain") displayAddEventHandler ["KeyUp", "if !(isNil 'BIS_CONTROL_CAM_Handler') then {BIS_temp = ['keyup',_this] spawn BIS_CONTROL_CAM_Handler; BIS_temp = nil;}"];
+WF_COIN_DEH3 = (uiNamespace getVariable "COIN_displayMain") displayAddEventHandler ["MouseButtonDown", "if !(isNil 'BIS_CONTROL_CAM_Handler') then {BIS_temp = ['mousedown',_this,commandingMenu] spawn BIS_CONTROL_CAM_Handler; BIS_temp = nil; BIS_CONTROL_CAM_onMouseButtonDown = _this; if (_this select 1 == 1) then {BIS_CONTROL_CAM_RMB = true}; if (_this select 1 == 0) then {BIS_CONTROL_CAM_LMB = true};}"];
+WF_COIN_DEH4 = (uiNamespace getVariable "COIN_displayMain") displayAddEventHandler ["MouseButtonUp", "if !(isNil 'BIS_CONTROL_CAM_Handler') then {BIS_CONTROL_CAM_RMB = false; BIS_CONTROL_CAM_LMB = false;}"];
+
+BIS_CONTROL_CAM_keys = [];
+
+if (isNil "BIS_CONTROL_CAM_ASL") then {
+ createCenter sideLogic;
+ _logicGrp = createGroup sidelogic;
+ _logicASL = _logicGrp createUnit ["Logic",position player,[],0,"none"];
+ BIS_CONTROL_CAM_ASL = _logicASL;
+};
+
+_logic setVariable ["BIS_COIN_selected",objNull];
+_logic setVariable ["BIS_COIN_params",[]];
+_logic setVariable ["BIS_COIN_tooltip",""];
+_logic setVariable ["BIS_COIN_menu","#USER:BIS_Coin_categories_0"];
+_logic setVariable ["BIS_COIN_restart",true];
+_logic setVariable ["WF_RequestUpdate",false];
+_get = _logic getVariable 'WF_NVGPersistent';
+_nvgstate = true;
+if (isNil '_get') then {
+ _nvgstate = if (daytime > 18.5 || daytime < 5.5) then {true} else {false};
+ _logic setVariable ['WF_NVGPersistent',_nvgstate];
+} else {
+ _nvgstate = _logic getVariable 'WF_NVGPersistent';
+};
+camUseNVG _nvgstate;
+_logic setVariable ["BIS_COIN_nvg",_nvgstate];
+
+_bns = Format["WFBE_%1STRUCTURENAMES",sideJoinedText] Call GetNamespace;
+_greenList = [WESTBAR,WESTLVF,WESTHEAVY,WESTAIR,EASTBAR,EASTLVF,EASTHEAVY,EASTAIR];
+//--- Building Limit Init.
+_buildingsNames = _bns;
+_buildingsNames = _buildingsNames - [_buildingsNames select 0];
+_buildingsType = Format["WFBE_%1STRUCTURES",sideJoinedText] Call GetNamespace;
+_buildingsType = _buildingsType - [_buildingsType select 0];
+
+//--- Open menu
+_logic spawn {
+
+private ["_params","_logic"];
+_logic = _this;
+ waitUntil {!isNil {_this getVariable "BIS_COIN_fundsOld"}};
+ while {!isNil "BIS_CONTROL_CAM"} do {
+ waitUntil {
+ _params = _logic getVariable "BIS_COIN_params";
+ if (isNil "_params") then {_params = []};
+ (commandingMenu == "" && count _params == 0 && !BIS_CONTROL_CAM_RMB) || isNil "BIS_CONTROL_CAM"
+ };
+ if (isNil "BIS_CONTROL_CAM") exitWith {};
+ showCommandingMenu "#USER:BIS_Coin_categories_0";
+ sleep 0.01;
+ };
+};
+
+//--- Border - temporary solution //TODO: move border if position of logic changes (eg. by placing hq)
+_createBorder = {
+
+ private ["_dir","_xpos","_ypos","_zpos","_a","_border","_logic","_startpos","_oldBorder","_center","_size","_width","_pi","_perimeter","_wallcount","_total"];
+ _logic = _this select 0;
+ _startpos = _this select 1;
+ _oldBorder = missionNamespace getVariable "BIS_COIN_border";
+ if (!isNil "_oldBorder") then {
+ {deleteVehicle _x} forEach _oldBorder;
+ };
+ missionNamespace setVariable ["BIS_COIN_border",nil];
+
+ _border = [];
+ _center = _startpos;
+ _size = (_logic getVariable "BIS_COIN_areasize") select 0;
+ _width = 9.998; //200/126
+ _width = 9.996; //150/96
+ _width = 9.992; //100/64
+ _width = 9.967; //50/32
+ _width = 9.917; //30/20
+ _width = 9.83; //20/14
+ _width = 9.48; //10/8
+ _width = 10 - (0.1/(_size * 0.2));
+ _width = 10;
+
+ _pi = 3.14159265358979323846;
+ _perimeter = (_size * _pi);
+ _perimeter = _perimeter + _width - (_perimeter % _width);
+ _size = (_perimeter / _pi);
+ _wallcount = _perimeter / _width * 2;
+ _total = _wallcount;
+
+ for "_i" from 1 to _total do {
+ _dir = (360 / _total) * _i;
+ _xpos = (_center select 0) + (sin _dir) * _size;
+ _ypos = (_center select 1) + (cos _dir) * _size;
+ _zpos = (_center select 2);
+
+ _a = "transparentwall" createVehicleLocal [_xpos,_ypos,_zpos];
+ _a setposasl [_xpos,_ypos,0];
+ _a setdir (_dir + 90);
+ _border = _border + [_a];
+ };
+ missionNamespace setVariable ["BIS_COIN_border",_border];
+};
+_createBorderScope = [_logic,_startpos] spawn _createBorder;
+
+//--- This block is pretty important
+if !(isNil "BIS_CONTROL_CAM_Handler") exitWith {endLoadingScreen};
+
+BIS_CONTROL_CAM_Handler = {
+ private ["_terminate","_key","_NVGstate","_currentCash","_price","_closest","_closestType","_get","_targeting","_near","_preview",
+ "_ctrl","_menu","_player","_border","_mode","_input",
+ "_logic","_keysCancel","_keysBanned","_keyNightVision"];
+ _mode = _this select 0;
+ _input = _this select 1;
+ _logic = bis_coin_player getVariable "bis_coin_logic";
+ _terminate = false;
+
+ if (isNil "_logic") exitWith {};
+
+ _keysCancel = actionKeys "MenuBack";
+
+ _keysBanned = [1];
+ _keyNightVision = actionKeys "NightVision";
+
+ //--- Mouse DOWN
+ if (_mode == "mousedown") then {
+ _key = _input select 1;
+ if (_key == 1 && 65665 in (actionkeys "MenuBack")) then {_terminate = true};
+ };
+
+ //--- Key DOWN
+ if (_mode == "keydown") then {
+
+ _key = _input select 1;
+ _ctrl = _input select 3;
+ if !(_key in (BIS_CONTROL_CAM_keys + _keysBanned)) then {BIS_CONTROL_CAM_keys = BIS_CONTROL_CAM_keys + [_key]};
+
+ //--- Terminate CoIn
+ if (_key in _keysCancel && isNil "BIS_Coin_noExit") then {_terminate = true};
+
+ //--- Start NVG
+ if (_key in _keyNightVision) then {
+ _NVGstate = !(_logic getVariable "BIS_COIN_nvg");
+ _logic setVariable ["BIS_COIN_nvg",_NVGstate];
+ _logic setVariable ['WF_NVGPersistent',_NVGstate];
+ camUseNVG _NVGstate;
+ };
+
+ //--- Last Built Defense (Custom Action #1).
+ if ((_key in (actionKeys "User15")) && count lastBuilt > 0) then {
+ _deployed = true;
+ if (WFBE_COIN_Root == "HQ") then {_deployed = (sideJoinedText) Call GetSideHQDeployed};
+ _currentCash = Call GetPlayerFunds;
+ if (_currentCash > (lastBuilt select 2) select 1 && _deployed) then {
+ showCommandingMenu '';
+ _logic setVariable ["BIS_COIN_params",lastBuilt];
+ };
+ };
+
+ //--- Manning Defense (Custom Action #2).
+ if ((_key in (actionKeys "User16")) && (('WFBE_AIDEFENSE' Call GetNamespace) > 0)) then {
+ if (manningDefense) then {manningDefense = false} else {manningDefense = true};
+ _status = if (manningDefense) then {localize "STR_WF_On"} else {localize "STR_WF_Off"};
+ _logic setVariable ["WF_RequestUpdate",true];
+ };
+
+ //--- Sell Defense. (Commander only) (Custom Action #3).
+ if ((_key in (actionKeys "User17")) && !isNull(commanderTeam)) then {
+ if(commanderTeam == clientTeam) then {
+ _preview = _logic getVariable "BIS_COIN_preview";
+ if (isNil "_preview") then {//--- Proceed when there is no preview.
+ _targeting = screenToWorld [0.5,0.5];
+ _near = nearestObjects [_targeting,Format["WFBE_%1DEFENSENAMES",sideJoinedText] Call GetNamespace,25];
+ if (count _near > 0) then {
+ _closest = _near select 0;
+ _sold = _closest getVariable 'sold';
+ _closestType = typeOf (_closest);
+ _get = _closestType Call GetNamespace;
+ if (!isNil '_get' && isNil '_sold') then {
+ _closest setVariable ['sold',true];
+ _price = _get select QUERYUNITPRICE;
+ round(_price/2) Call ChangePlayerFunds;
+ deleteVehicle _closest;
+ };
+ };
+ };
+ };
+ };
+ };
+ //--- Key UP
+ if (_mode == "keyup") then {
+ _key = _input select 1;
+ if (_key in BIS_CONTROL_CAM_keys) then {BIS_CONTROL_CAM_keys = BIS_CONTROL_CAM_keys - [_key]};
+ };
+
+ //--- Deselect or Close
+ if (_terminate) then {
+ _menu = _this select 2;
+
+ //--- Close
+ if (isNil "BIS_Coin_noExit") then {
+ if (_menu == "#USER:BIS_Coin_categories_0") then {
+ BIS_CONTROL_CAM cameraEffect ["terminate","back"];
+ camDestroy BIS_CONTROL_CAM;
+ BIS_CONTROL_CAM = nil;
+ } else {
+ _preview = _logic getVariable "BIS_COIN_preview";
+ if !(isNil "_preview") then {deleteVehicle _preview};
+ _logic setVariable ["BIS_COIN_preview",nil];
+ _logic setVariable ["BIS_COIN_params",[]];
+ _get = _logic getVariable 'WFBE_Helper';
+ if !(isNil '_get') then {
+ deleteVehicle _get;
+ _logic setVariable ['WFBE_Helper',nil];
+ };
+ };
+ };
+ };
+
+ //--- Camera no longer exists - terminate and start cleanup
+ if (isNil "BIS_CONTROL_CAM" || player != bis_coin_player || !isNil "BIS_COIN_QUIT") exitWith {
+ if !(isNil "BIS_CONTROL_CAM") then {BIS_CONTROL_CAM cameraEffect ["terminate","back"];camDestroy BIS_CONTROL_CAM;};
+ BIS_CONTROL_CAM = nil;
+ BIS_CONTROL_CAM_Handler = nil;
+ 1122 cuttext ["","plain"];
+ _player = bis_coin_player;
+ _player setVariable ["bis_coin_logic",nil];
+ bis_coin_player = objNull;
+ _preview = _logic getVariable "BIS_COIN_preview";
+ if !(isNil "_preview") then {deleteVehicle _preview};
+ _logic setVariable ["BIS_COIN_preview",nil];
+ _get = _logic getVariable 'WFBE_Helper';
+ if !(isNil '_get') then {
+ deleteVehicle _get;
+ _logic setVariable ['WFBE_Helper',nil];
+ };
+ _logic setVariable ["BIS_COIN_selected",nil];
+ _logic setVariable ["BIS_COIN_params",nil];
+ _logic setVariable ["BIS_COIN_lastdir",nil];
+ _logic setVariable ["BIS_COIN_tooltip",nil];
+ _logic setVariable ["BIS_COIN_fundsOld",nil];
+ _logic setVariable ["BIS_COIN_restart",nil];
+ _logic setVariable ["BIS_COIN_nvg",nil];
+ _logic setVariable ["WF_RequestUpdate",nil];
+ showCommandingMenu "";
+
+ //_display = finddisplay 46;
+ (uiNamespace getVariable "COIN_displayMain") displayRemoveEventHandler ["KeyDown",WF_COIN_DEH1];
+ (uiNamespace getVariable "COIN_displayMain") displayRemoveEventHandler ["KeyUp",WF_COIN_DEH2];
+ (uiNamespace getVariable "COIN_displayMain") displayRemoveEventHandler ["MouseButtonDown",WF_COIN_DEH3];
+ (uiNamespace getVariable "COIN_displayMain") displayRemoveEventHandler ["MouseButtonUp",WF_COIN_DEH4];
+
+ //--- Behold the placeholders
+ BIS_COIN_QUIT = nil;
+ _border = missionNamespace getVariable "BIS_COIN_border";
+ {deleteVehicle _x} forEach _border;
+ missionNamespace setVariable ["BIS_COIN_border",nil];
+ };
+};
+
+waitUntil {scriptDone _createBorderScope};
+endLoadingScreen;
+
+
+///*** LOOOP ****
+_canAffordCount = 0;
+_canAffordCountOld = 0;
+_oldMenu = commandingMenu;
+_limitHOld = -1;
+_limitVOld = -1;
+_loaded = false;
+_localtime = time;
+
+_maxGrad = 'WFBE_COINMAXGRADIENT' Call GetNamespace;
+_minDist = 'WFBE_COINMINDISTANCE' Call GetNamespace;
+
+while {!isNil "BIS_CONTROL_CAM"} do {
+ //if (isnull (uiNamespace getVariable 'BIS_CONTROL_CAM_DISPLAY') && !_loaded) then {
+ if (isnull (uiNamespace getVariable 'wfbe_title_coin') && !_loaded) then { //---TEST MrNiceGuy
+ cameraEffectEnableHUD true;
+ 1122 cutrsc ["constructioninterface","plain"];
+ _loaded = true;
+ _logic setVariable ["BIS_COIN_restart",true];
+ _localtime = time;
+ };
+ if ((time - _localtime) >= 1 && _loaded) then {_loaded = false};
+ _logic = bis_coin_player getVariable "bis_coin_logic";
+
+ _mode = "mousemoving";
+ _camera = BIS_CONTROL_CAM;
+
+ if (isNil "_logic") exitWith {};
+
+ //--- Player dies on construction mode or the source die.
+ if (!alive player || !alive _source) exitWith {
+ startLoadingScreen [localize "str_coin_exit" + " " + localize "str_coin_name","RscDisplayLoadMission"];
+
+ if !(isNil "BIS_CONTROL_CAM") then {BIS_CONTROL_CAM cameraEffect ["terminate","back"];camDestroy BIS_CONTROL_CAM;};
+ BIS_CONTROL_CAM = nil;
+ BIS_CONTROL_CAM_Handler = nil;
+ 1122 cuttext ["","plain"];
+ _player = bis_coin_player;
+ _player setVariable ["bis_coin_logic",nil];
+ bis_coin_player = objNull;
+ _preview = _logic getVariable "BIS_COIN_preview";
+ if !(isNil "_preview") then {deleteVehicle _preview};
+ _logic setVariable ["BIS_COIN_preview",nil];
+ _get = _logic getVariable 'WFBE_Helper';
+ if !(isNil '_get') then {
+ deleteVehicle _get;
+ _logic setVariable ['WFBE_Helper',nil];
+ };
+ _logic setVariable ["BIS_COIN_selected",nil];
+ _logic setVariable ["BIS_COIN_params",nil];
+ _logic setVariable ["BIS_COIN_lastdir",nil];
+ _logic setVariable ["BIS_COIN_tooltip",nil];
+ _logic setVariable ["BIS_COIN_fundsOld",nil];
+ _logic setVariable ["BIS_COIN_restart",nil];
+ _logic setVariable ["BIS_COIN_nvg",nil];
+ _logic setVariable ["WF_RequestUpdate",nil];
+ showCommandingMenu "";
+
+ (uiNamespace getVariable "COIN_displayMain") displayRemoveEventHandler ["KeyDown",WF_COIN_DEH1];
+ (uiNamespace getVariable "COIN_displayMain") displayRemoveEventHandler ["KeyUp",WF_COIN_DEH2];
+ (uiNamespace getVariable "COIN_displayMain") displayRemoveEventHandler ["MouseButtonDown",WF_COIN_DEH3];
+ (uiNamespace getVariable "COIN_displayMain") displayRemoveEventHandler ["MouseButtonUp",WF_COIN_DEH4];
+
+ //--- Behold the placeholders
+ BIS_COIN_QUIT = nil;
+ WF_COIN_DEH1 = nil;
+ WF_COIN_DEH2 = nil;
+ WF_COIN_DEH3 = nil;
+ WF_COIN_DEH4 = nil;
+ _border = missionNamespace getVariable "BIS_COIN_border";
+ {deleteVehicle _x} forEach _border;
+ missionNamespace setVariable ["BIS_COIN_border",nil];
+
+ endLoadingScreen;
+ };
+
+ _areasize = (_logic getVariable "BIS_COIN_areasize");
+ _limitH = _areasize select 0;
+ _limitV = _areasize select 1;
+
+ if (_limitH != _limitHOld || _limitV != _limitVOld) then {
+ [_logic,_startpos] spawn _createBorder;
+ BIS_CONTROL_CAM camConstuctionSetParams ([_startPos] + (_logic getVariable "BIS_COIN_areasize"));
+ };
+ _limitHOld = _limitH;
+ _limitVOld = _limitV;
+
+ //--- Mouse moving or holding
+ if (_mode in ["mousemoving","mouseholding"]) then {
+ //--- Check pressed keys
+ _keys = BIS_CONTROL_CAM_keys;
+ _ctrl = (29 in _keys) || (157 in _keys);
+ _shift = (42 in _keys) || (54 in _keys);
+ _alt = (56 in _keys);
+
+ //--- Construction or Selection
+ _params = _logic getVariable "BIS_COIN_params";
+ _tooltip = "empty";
+ _tooltipType = "empty";
+ _selected = objNull;
+ if (count _params > 0) then {
+ //--- Basic colors
+ _colorGreen = "#(argb,8,8,3)color(0,1,0,0.3,ca)";
+ _colorRed = "#(argb,8,8,3)color(1,0,0,0.3,ca)";
+ _colorGray = "#(argb,8,8,3)color(1,1,1,0.1,ca)";
+ _colorGray = "#(argb,8,8,3)color(0,0,0,0.25,ca)";
+ _color = _colorGreen;
+
+ //--- Class, Category, Cost, (preview class), (display name)
+ _itemclass = _params select 0;
+ _itemcategory = _params select 1;
+ _itemcost = _params select 2;
+ _itemcash = 0;
+ if (typename _itemcost == "ARRAY") then {_itemcash = _itemcost select 0; _itemcost = _itemcost select 1};
+ _funds = _logic getVariable "BIS_COIN_funds";
+ if (typename _funds == "ARRAY") then {
+ _a = (sideJoined) Call GetSideSupply;
+ _b = Call GetPlayerFunds;
+ _funds = [_a]+[_b];
+ } else {
+ _funds = [Call GetPlayerFunds];
+ };
+ _itemFunds = _funds select _itemcash;
+ _itemname = if (count _params > 3) then {_params select 3} else {getText (configFile >> "CfgVehicles" >> _itemclass >> "displayName")};
+ _itemclass_preview = getText (configFile >> "CfgVehicles" >> _itemclass >> "ghostpreview");
+ if (_itemclass_preview == "") then {_itemclass_preview = _itemclass};
+
+ //--- Preview building
+ _preview = camtarget BIS_CONTROL_CAM;
+ _new = false;
+ if (typeof _preview != _itemclass_preview) then {
+ //--- No preview
+ deleteVehicle _preview;
+ if !(isNil {_logic getVariable "BIS_COIN_preview"}) then {deleteVehicle (_logic getVariable "BIS_COIN_preview")}; //--- Serialization hack
+ _get = _logic getVariable 'WFBE_Helper';
+ if !(isNil '_get') then {
+ deleteVehicle _get;
+ _logic setVariable ['WFBE_Helper',nil];
+ };
+ _hqDeployed = (sideJoinedText) Call GetSideHQDeployed;
+ _index = _bns find _itemclass;
+ if (_index == 0 && _hqDeployed) exitWith {
+ _mhq = (sideJoinedText) Call GetSideHQ;
+ (_mhq) Spawn HandleHQAction;
+
+ WFBE_RequestStructure = ['SRVFNCREQUESTSTRUCTURE',[sideJoined,_itemclass,[0,0,0],0]];
+ publicVariable 'WFBE_RequestStructure';
+ if (isHostedServer) then {['SRVFNCREQUESTSTRUCTURE',[sideJoined,_itemclass,[0,0,0],0]] Spawn HandleSPVF};
+
+ ['WFBE_AREAHQUNDEPLOYED' Call GetNamespace,false,MCoin] Call Compile preprocessFile "Client\Init\Init_Coin.sqf";
+
+ _structuresCosts = Format["WFBE_%1STRUCTURECOSTS",sideJoinedText] Call GetNamespace;
+ if !(paramMoneyOnly) then {
+ [sideJoined,-(_structuresCosts select _index)] Call ChangeSideSupply;
+ } else {
+ -(_structuresCosts select _index) Call ChangePlayerFunds;
+ };
+
+ //////////////////////////////////////////////////
+ startLoadingScreen [localize "str_coin_exit" + " " + localize "str_coin_name","RscDisplayLoadMission"];
+ //////////////////////////////////////////////////
+
+ if !(isNil "BIS_CONTROL_CAM") then {BIS_CONTROL_CAM cameraEffect ["terminate","back"];camDestroy BIS_CONTROL_CAM;};
+ BIS_CONTROL_CAM = nil;
+ BIS_CONTROL_CAM_Handler = nil;
+ 1122 cuttext ["","plain"];
+ _player = bis_coin_player;
+ _player setVariable ["bis_coin_logic",nil];
+ bis_coin_player = objNull;
+ _preview = _logic getVariable "BIS_COIN_preview";
+ if !(isNil "_preview") then {deleteVehicle _preview};
+ _logic setVariable ["BIS_COIN_preview",nil];
+ _logic setVariable ["BIS_COIN_selected",nil];
+ _logic setVariable ["BIS_COIN_params",nil];
+ _logic setVariable ["BIS_COIN_lastdir",nil];
+ _logic setVariable ["BIS_COIN_tooltip",nil];
+ _logic setVariable ["BIS_COIN_fundsOld",nil];
+ _logic setVariable ["BIS_COIN_restart",nil];
+ _logic setVariable ["BIS_COIN_nvg",nil];
+ _logic setVariable ["WF_RequestUpdate",nil];
+ showCommandingMenu "";
+
+ (uiNamespace getVariable "COIN_displayMain") displayRemoveEventHandler ["KeyDown",WF_COIN_DEH1];
+ (uiNamespace getVariable "COIN_displayMain") displayRemoveEventHandler ["KeyUp",WF_COIN_DEH2];
+ (uiNamespace getVariable "COIN_displayMain") displayRemoveEventHandler ["MouseButtonDown",WF_COIN_DEH2];
+ (uiNamespace getVariable "COIN_displayMain") displayRemoveEventHandler ["MouseButtonUp",WF_COIN_DEH3];
+
+ //--- Behold the placeholders
+ BIS_COIN_QUIT = nil;
+ WF_COIN_DEH1 = nil;
+ WF_COIN_DEH2 = nil;
+ WF_COIN_DEH3 = nil;
+ WF_COIN_DEH4 = nil;
+ _border = missionNamespace getVariable "BIS_COIN_border";
+ {deleteVehicle _x} forEach _border;
+ missionNamespace setVariable ["BIS_COIN_border",nil];
+
+ [] Spawn {
+
+ private ["_mhq","_start"];
+ _start = time;
+ waitUntil {!((sideJoinedText) Call GetSideHQDeployed) || time - _start > 15};
+ if (time - _start < 15) then {
+ sleep 2;
+ _mhq = (sideJoinedText) Call GetSideHQ;
+ if (alive _mhq) then {
+ _mhq addAction [localize "STR_WF_Unlock_MHQ","Client\Action\Action_ToggleLock.sqf", [], 95, false, true, '', 'alive _target && locked _target'];
+ _mhq addAction [localize "STR_WF_Lock_MHQ","Client\Action\Action_ToggleLock.sqf", [], 94, false, true, '', 'alive _target && !(locked _target)'];
+ };
+ };
+ };
+
+ endLoadingScreen;
+ };
+
+ _preview = _itemclass_preview createVehicleLocal (screenToWorld [0.5,0.5]);
+ _gdir = _logic getVariable 'BIS_COIN_lastdir';
+ if !(isNil '_gdir') then {_preview setDir _gdir};
+ BIS_CONTROL_CAM camSetTarget _preview;
+ BIS_CONTROL_CAM camCommit 0;
+ _logic setVariable ["BIS_COIN_preview",_preview];
+ _new = true;
+
+ //--- Preview Helper.
+ if (_itemclass in _greenList && _index != -1) then {
+ _distance = (Format ["WFBE_%1STRUCTUREDISTANCES",sideJoinedText] Call GetNamespace) select _index;
+ _direction = (Format ["WFBE_%1STRUCTUREDIRECTIONS",sideJoinedText] Call GetNamespace) select _index;
+ _npos = [getPos _preview,_distance,getDir _preview + _direction] Call GetPositionFrom;
+ _helper = "Sign_Danger" createVehicleLocal _npos;
+ _helper setPos _npos;
+ _helper setDir (_direction+65);
+
+ _array = _preview worldToModel (getPos _helper);
+ _array set [2,0];
+ _helper attachTo [_preview,_array];
+
+ _logic setVariable ['WFBE_Helper',_helper];
+ };
+
+ _preview setObjectTexture [0,_colorGray];
+ _preview setVariable ["BIS_COIN_color",_colorGray];
+
+ //--- Exception - preview not created
+ if (isnull _preview) then {
+ deleteVehicle _preview;
+ _logic setVariable ["BIS_COIN_preview",nil];
+ _logic setVariable ["BIS_COIN_params",[]];
+ _get = _logic getVariable 'WFBE_Helper';
+ if !(isNil '_get') then {
+ deleteVehicle _get;
+ _logic setVariable ['WFBE_Helper',nil];
+ };
+ };
+
+ } else {
+ //--- Check zone
+ if (
+ ([position _preview,_startPos] call BIS_fnc_distance2D) > _limitH
+ ) then {
+ _color = _colorGray
+ } else {
+
+ //--- No money
+ _funds = 0;
+ call compile format ["_funds = %1;",_itemFunds];
+ _fundsRemaining = _funds - _itemcost;
+ if (_fundsRemaining < 0) then {_color = _colorRed};
+
+ _skipFlat = false;
+ if !(paramDefenseCollide) then {
+ if !(_itemcategory == 0) then {_skipFlat = true};
+ if (surfaceIsWater(position _preview)) then {_color = _colorRed};
+ if (_color != _colorRed) then {
+ //--- Prevent Wall'in.
+ if (count((position _preview) nearEntities [['Man','Car','Motorcycle','Tank','Air','Ship'],10]) > 0) then {_color = _colorRed};
+ };
+ };
+
+ if (typeOf _preview == "Concrete_Wall_EP1") then {_skipFlat = true};
+
+ //--- Do not control the flatness with strategic & fortifications.
+ if (!_skipFlat) then {
+ _isFlat = (position _preview) isFlatEmpty [
+ (sizeof typeof _preview) / _minDist, //--- Minimal distance from another object
+ 0, //--- If 0, just check position. If >0, select new one
+ _maxGrad, //--- Max gradient
+ (sizeof typeof _preview), //--- Gradient area
+ 0, //--- 0 for restricted water, 2 for required water,
+ false, //--- True if some water can be in 25m radius
+ _preview //--- Ignored object
+ ];
+
+ //--- Unable to Place due to the land.
+ if (count _isFlat == 0 || count (((position _preview) nearEntities 10) - [_preview]) > 0) then {_color = _colorRed};
+ };
+ };
+ _preview setObjectTexture [0,_color];
+ _preview setVariable ["BIS_COIN_color",_color];
+
+ _tooltip = _itemclass;
+ _tooltipType = "preview";
+
+ //--- Temporary solution
+ _colorGUI = [1,1,1,0.1];
+ if (_color == _colorGreen) then {_colorGUI = [0.3,1,0.3,0.3]};
+ if (_color == _colorRed) then {_colorGUI = [1,0.2,0.2,0.4]};
+
+ ((uiNamespace getVariable "wfbe_title_coin") displayCtrl 112201) ctrlSetTextColor _colorGUI;
+ ((uiNamespace getVariable "wfbe_title_coin") displayCtrl 112201) ctrlCommit 0;
+ };
+
+ //--- Place
+ if (!_new && !isnull _preview && ((BIS_CONTROL_CAM_LMB && 65536 in (actionKeys "DefaultAction")) || {_x in (actionKeys "DefaultAction")} count BIS_CONTROL_CAM_keys > 0) && _color == _colorGreen) then {
+ _pos = position _preview;
+ _dir = direction _preview;
+ deleteVehicle _preview;
+ _logic setVariable ["BIS_COIN_preview",nil];
+ _logic setVariable ["BIS_COIN_params",[]];
+ _get = _logic getVariable 'WFBE_Helper';
+ if !(isNil '_get') then {
+ deleteVehicle _get;
+ _logic setVariable ['WFBE_Helper',nil];
+ };
+
+ //--- Remove funds
+ //call compile format ["%1 = %1 - _itemcost;",_itemFunds];
+
+ //--- Execute designer defined code
+ [_logic,_itemclass,_pos,_dir,_params] spawn {
+
+ private ["_hqDeployed","_structures","_get","_logic","_itemclass","_pos","_dir","_par"];
+ _logic = _this select 0;
+ _itemclass = _this select 1;
+ _pos = _this select 2;
+ _dir = _this select 3;
+ _par = _this select 4;
+
+ //--- Define the last direction used.
+ _logic setVariable ["BIS_COIN_lastdir",_dir];
+
+ //--- On Purchase.
+ [_logic,_itemclass] call {
+ Private["_cash","_class","_costs","_index","_logic","_price"];
+ _logic = _this select 0;
+ _class = _this select 1;
+ _structures = Format["WFBE_%1STRUCTURENAMES",sideJoinedText] Call GetNamespace;
+ _costs = Format["WFBE_%1STRUCTURECOSTS",sideJoinedText] Call GetNamespace;
+
+ //--- Structures.
+ _index = _structures find _class;
+ if (_index != -1) then {
+ _price = _costs select _index;
+ if !(paramMoneyOnly) then {
+ [sideJoined, -_price] Call ChangeSideSupply;
+ } else {
+ -(_price) Call ChangePlayerFunds;
+ };
+ if (_index == 0) then {
+ _hqDeployed = (sideJoinedText) Call GetSideHQDeployed;
+ if (_hqDeployed) then {
+ ['WFBE_AREAHQUNDEPLOYED' Call GetNamespace,false,MCoin] Call Compile preprocessFile "Client\Init\Init_Coin.sqf";
+ } else {
+ ['WFBE_AREAHQDEPLOYED' Call GetNamespace,true,MCoin] Call Compile preprocessFile "Client\Init\Init_Coin.sqf";
+ };
+ _logic setVariable ["BIS_COIN_restart",true];
+ } else {
+ WFBE_RequestChangeScore = ['SRVFNCREQUESTCHANGESCORE',[player,score player + ('WFBE_COMMANDERBUILDSCORE' Call GetNamespace)]];
+ publicVariable 'WFBE_RequestChangeScore';
+ if (isHostedServer) then {['SRVFNCREQUESTCHANGESCORE',[player,score player + ('WFBE_COMMANDERBUILDSCORE' Call GetNamespace)]] Spawn HandleSPVF};
+ };
+ };
+
+ //--- Defense.
+ _get = _class Call GetNamespace;
+ if !(isNil '_get') then {
+ _price = _get select QUERYUNITPRICE;
+ -(_price) Call ChangePlayerFunds;
+ };
+ };
+
+ //--- Execute designer defined code On Construct
+ [_logic,_itemclass,_pos,_dir,_par] call {
+ private ["_class","_defenses","_deployed","_dir",'_find',"_logic","_par","_pos","_structures"];
+ _logic = _this select 0;
+ _class = _this select 1;
+ _pos = _this select 2;
+ _dir = _this select 3;
+ _par = _this select 4;
+ _structures = Format["WFBE_%1STRUCTURENAMES",sideJoinedText] Call GetNamespace;
+ _defenses = Format["WFBE_%1DEFENSENAMES",sideJoinedText] Call GetNamespace;
+
+ _find = _structures find _class;
+ if (_find != -1) then {
+ //--- Increment the buildings.
+ if ((_find - 1) > -1) then {
+ _current = Call Compile Format ['%1BuildingsCurrent',sideJoinedText];
+ _current set [_find - 1, (_current select (_find-1)) + 1];
+ Call Compile Format ['%1BuildingsCurrent = _current',sideJoinedText];
+ publicVariable Format ['%1BuildingsCurrent',sideJoinedText];
+ };
+
+ WFBE_RequestStructure = ['SRVFNCREQUESTSTRUCTURE',[sideJoined,_class,_pos,_dir]];
+ publicVariable 'WFBE_RequestStructure';
+ if (isHostedServer) then {['SRVFNCREQUESTSTRUCTURE',[sideJoined,_class,_pos,_dir]] Spawn HandleSPVF};
+ };
+
+ if (_class in _defenses) then {
+ WFBE_RequestDefense = ['SRVFNCREQUESTDEFENSE',[sideJoined,_class,_pos,_dir,manningDefense]];
+ publicVariable 'WFBE_RequestDefense';
+ if (isHostedServer) then {['SRVFNCREQUESTDEFENSE',[sideJoined,_class,_pos,_dir,manningDefense]] Spawn HandleSPVF};
+ lastBuilt = _par;
+ };
+ };
+ };
+
+ //--- Temporary solution
+ _colorGUI = [1,1,1,0.1];
+ ((uiNamespace getVariable "wfbe_title_coin") displayCtrl 112201) ctrlSetTextColor _colorGUI;
+ ((uiNamespace getVariable "wfbe_title_coin") displayCtrl 112201) ctrlCommit 0;
+ };
+ } else {
+ _colorGUI = [1,1,1,0.1];
+ ((uiNamespace getVariable "wfbe_title_coin") displayCtrl 112201) ctrlSetTextColor _colorGUI;
+ ((uiNamespace getVariable "wfbe_title_coin") displayCtrl 112201) ctrlCommit 0;
+ };
+
+ _oldTooltip = _logic getVariable "BIS_COIN_tooltip";
+ if ((_tooltipType + _tooltip) != _oldTooltip || commandingMenu != _oldMenu || _logic getVariable "WF_RequestUpdate") then {
+ _logic setVariable ["WF_RequestUpdate",false];
+
+ //--- Description
+ _type = _tooltip;
+
+ //--- Header & preview picture
+ _textHeader = "<t size='1.2'><br /></t>";
+ _textPicture = "<t size='2.8'><br /></t><br /><br />";
+ _fileIcon = getText (configFile >> "cfgvehicles" >> _type >> "icon");
+ if (str(configFile >> "CfgVehicleIcons" >> _fileIcon) != "") then {_fileIcon = getText (configFile >> "CfgVehicleIcons" >> _fileIcon)};
+ _filePicture = getText (configFile >> "cfgvehicles" >> _type >> "picture");
+ if (str(configFile >> "CfgVehicleIcons" >> _filePicture) != "") then {_filePicture = getText (configFile >> "CfgVehicleIcons" >> _filePicture)};
+
+ if (_tooltipType != "empty") then {
+ _textHeader = format ["<t color='#42b6ff' shadow='1' align='center' size='1.8'> %1 </t><br />",
+ getText (configFile >> "cfgvehicles" >> _type >> "displayname"),
+ if (isnull _selected) then {""} else {str round ((1 - damage _selected) * 100) + "%"}
+ ];
+ _textPicture = format ["<t color='#42b6ff' shadow='2' align='left' size='2.8'><img image='%1'/></t> ",_filePicture];
+ };
+
+ _text1 = if (count _params > 0) then {"<t color='#42b6ff' shadow='2'>" + localize "str_coin_rotate" + "<t align='right'>" + call compile (keyname 29) + "</t></t><br />"} else {"<br />"};
+
+ _status = if (manningDefense) then {localize "STR_WF_On"} else {localize "STR_WF_Off"};
+ _text2 = if (count _params > 0) then {"<t color='#42b6ff' shadow='2'>" + localize "str_coin_build" + "<t align='right'>" + call compile (actionKeysNames ["DefaultAction",1]) + "</t></t><br />"} else {"<t color='#42b6ff' shadow='2'>" + localize "STR_WF_AutoDefense" + ":<t align='right'>" + _status + "</t></t><br />"};
+
+ _text3 = if (commandingMenu != "#USER:BIS_Coin_categories_0") then {
+ //--- Back hint
+ if (isNil "BIS_Coin_noExit") then {
+ "<t color='#eee544' shadow='2'>" + localize "str_coin_back" + "<t align='right'>" + call compile (actionKeysNames ["MenuBack",1]) + "</t></t>";
+ } else {""};
+ } else {
+ //--- Exit hint
+ if (isNil "BIS_Coin_noExit") then {
+ "<t color='#eee544' shadow='2'>" + localize "str_coin_exit" + "<t align='right'>" + call compile (actionKeysNames ["MenuBack",1]) + "</t></t>";
+ } else {""};
+ };
+
+ //--- Compose text
+ _textHint = (
+ _textPicture +
+ _textHeader +
+ ""
+ );
+
+ _textControls = (
+ _text1 +
+ _text2 +
+ _text3 +
+ ""
+ );
+
+ //--- Set box
+ ((uiNamespace getVariable "wfbe_title_coin") displayCtrl 112211) ctrlShow true;
+ ((uiNamespace getVariable "wfbe_title_coin") displayCtrl 112211) ctrlCommit 0;
+ ((uiNamespace getVariable "wfbe_title_coin") displayCtrl 112214) ctrlSetStructuredText (parseText _textHint);
+ ((uiNamespace getVariable "wfbe_title_coin") displayCtrl 112214) ctrlShow true;
+ ((uiNamespace getVariable "wfbe_title_coin") displayCtrl 112214) ctrlCommit 0;
+ ((uiNamespace getVariable "wfbe_title_coin") displayCtrl 112215) ctrlSetStructuredText (parseText _textControls);
+ ((uiNamespace getVariable "wfbe_title_coin") displayCtrl 112215) ctrlShow true;
+ ((uiNamespace getVariable "wfbe_title_coin") displayCtrl 112215) ctrlCommit 0;
+ };
+
+ //--- Amount of funds changed
+ _funds = _logic getVariable "BIS_COIN_funds";
+ if (typename _funds == "ARRAY") then {
+ _a = (sideJoined) Call GetSideSupply;
+ _b = Call GetPlayerFunds;
+ _funds = [_a]+[_b];
+ } else {
+ _funds = [Call GetPlayerFunds];
+ };
+ _fundsDescription = _logic getVariable "BIS_COIN_fundsDescription";
+ _cashValues = [];
+ {_cashValues = _cashValues + [_x]} forEach _funds;
+ _cashValuesOld = _logic getVariable "BIS_COIN_fundsOld";
+ if (isNil "_cashValuesOld") then {_cashValuesOld = []; _cashValuesOld set [count _cashValues - 1,-1]};
+ _restart = _logic getVariable "BIS_COIN_restart";
+ if (!([_cashValues,_cashValuesOld] call bis_fnc_arraycompare) || _restart) then {
+ _cashValuesCount = count _cashValues;
+ _cashSize = if (_cashValuesCount <= 1) then {2} else {2.8 / _cashValuesCount};
+ _cashText = format ["<t color='#56db33' shadow='2' size='%1' align='left' valign='middle'>",_cashSize];
+ _cashLines = 0;
+ for "_i" from 0 to (count _funds - 1) do {
+ _cashValue = _cashValues select _i;
+ _cashDescription = if (count _fundsDescription > _i) then {_fundsDescription select _i} else {"?"};
+ _cashText = _cashText + format ["%1 %2<br />",_cashDescription,round _cashValue];
+ _cashLines = _cashLines + 0.05;
+ };
+ _cashText = _cashText + "</t>";
+ _cashPos = ctrlPosition ((uiNamespace getVariable "wfbe_title_coin") displayCtrl 112224);
+ ((uiNamespace getVariable "wfbe_title_coin") displayCtrl 112224) ctrlSetStructuredText (parseText _cashText);
+ ((uiNamespace getVariable "wfbe_title_coin") displayCtrl 112224) ctrlSetPosition [_cashPos select 0,_cashPos select 1,_cashPos select 2,(_cashPos select 3)/*0.1*/ + _cashLines];
+ ((uiNamespace getVariable "wfbe_title_coin") displayCtrl 112224) ctrlShow true;
+ ((uiNamespace getVariable "wfbe_title_coin") displayCtrl 112224) ctrlCommit 0;
+
+ //--- Categories menu
+ _categories = +(_logic getVariable "BIS_COIN_categories");
+ _categoriesMenu = [];
+ //--- Ammo Upgrade.
+ _upgrades = (sideJoinedText) Call GetSideUpgrades;
+ if (_upgrades select 14 < 1) then {_categories = _categories - [localize 'STR_WF_Ammo']};
+
+ for "_i" from 0 to (count _categories - 1) do {
+ _categoriesMenu = _categoriesMenu + [_i];
+ };
+
+ [["Categories",true],"BIS_Coin_categories",[_categoriesMenu,_categories],"#USER:BIS_Coin_%1_items_0","",""] call BIS_fnc_createmenu;
+
+ //--- Items menu
+ _items = _logic getVariable "BIS_COIN_items";
+ _canAffordCountOld = _canAffordCount;
+ _canAffordCount = 0;
+ for "_i" from 0 to (count _categories - 1) do {
+ _category = _categories select _i;
+ _arrayNames = [];
+ _arrayNamesLong = [];
+ _arrayEnable = [];
+ _arrayParams = [];
+ {
+ _itemclass = _x select 0;
+ _itemcategory = _x select 1;
+ if (typename _itemcategory == typename "") then {//--- Backward compatibility
+ _itemcategory = _categories find _itemcategory;
+ } else {100};
+
+ if (_itemcategory < count _categories) then {
+ _itemcost = _x select 2;
+ _itemcash = 0;
+ if (typename _itemcost == "ARRAY") then {_itemcash = _itemcost select 0; _itemcost = _itemcost select 1};
+ _cashValue = _cashValues select _itemcash;
+ _cashDescription = if (count _fundsDescription > _itemcash) then {_fundsDescription select _itemcash} else {"?"};
+ _itemname = if (count _x > 3) then {_x select 3} else {getText (configFile >> "CfgVehicles" >> _itemclass >> "displayName")};
+ //--- Build Limit reached?
+ _buildLimit = false;
+ _find = _buildingsNames find _itemclass;
+ if (_find != -1) then {
+ _current = Call Compile Format ['%1BuildingsCurrent',sideJoinedText];
+ _limit = (Format['WFBE_BUILDINGMAX%1',(_buildingsType select _find)]) Call GetNamespace;
+ if (isNil '_limit') then {_limit = 4}; //--- Default.
+ if ((_current select _find) >= _limit) then {_buildLimit = true};
+ };
+ if (_itemcategory == _i/*_category*/) then {
+ _canAfford = if (_cashValue - _itemcost >= 0 && !_buildLimit) then {1} else {0};
+ _canAffordCount = _canAffordCount + _canAfford;
+ // _text = _itemname + " - " + _cashDescription + str _itemcost;
+ // _arrayNamesLong = _arrayNamesLong + [_text + " "];
+ _text = parseText(Format ['%1 <t align="right"><t color="#ffc342">%2</t> <t color="#efff42">%3</t></t>',_itemname,_cashDescription,_itemcost] + " ");
+ _arrayNames = _arrayNames + [_text];
+ _arrayNamesLong = _arrayNamesLong + [_text];
+ _arrayEnable = _arrayEnable + [_canAfford];
+ _arrayParams = _arrayParams + [[_logic getVariable "BIS_COIN_ID"] + [_x,_i]];
+ };
+ };
+ } forEach _items;
+
+ [[_category,true],format ["BIS_Coin_%1_items",_i],[_arrayNames,_arrayNamesLong,_arrayEnable],"","
+ BIS_CONTROL_CAM_LMB = false;
+ scopename 'main';
+ _item = '%1';
+ _id = %2;
+ _array = (call compile '%3') select _id;
+ _logic = call compile ('BIS_COIN_'+ str (_array select 0));
+
+ _params = _array select 1;
+ _logic setVariable ['BIS_COIN_params',_params];
+ _logic setVariable ['BIS_COIN_menu',commandingMenu];
+ showCommandingMenu '';
+
+ ",_arrayParams] call BIS_fnc_createmenu;
+ };
+
+ if (_canAffordCount != _canAffordCountOld) then {showCommandingMenu (commandingMenu)}; //<-- Open menu again to show disabled items
+ };
+ _logic setVariable ["BIS_COIN_fundsOld",_cashValues];
+ _logic setVariable ["BIS_COIN_tooltip",_tooltipType + _tooltip];
+
+ if (_restart) then {
+ _logic setVariable ["BIS_COIN_restart",false];
+ };
+ };
+ _oldMenu = commandingMenu;
+ sleep 0.01;
+};
+112200 cuttext ["","plain"]; //---added-MrNiceGuy
+showCommandingMenu '';
diff --git a/Client/Module/EASA/EASA_Equip.sqf b/Client/Module/EASA/EASA_Equip.sqf
new file mode 100644
index 0000000..8bed693
--- /dev/null
+++ b/Client/Module/EASA/EASA_Equip.sqf
@@ -0,0 +1,45 @@
+Private ['_data','_get','_i','_index','_j','_old','_override','_tar','_tindex','_type','_vehicle','_z'];
+_vehicle = _this select 0;
+_index = _this select 1;
+_tindex = _index;
+_override = if (count _this > 2) then {_this select 2} else {false};
+
+if (typeName _vehicle != 'OBJECT') exitWith {diag_log Format['[WFBE (ERROR)][frameno:%2 | ticktime:%3] EASA_Equip: Invalid Parameter (_vehicle), expected object instead of %1',_vehicle,diag_frameno,diag_tickTime]};
+
+_type = ('WFBE_EASA_Vehicles' Call GetNamespace) find (typeOf _vehicle);
+if (_type != -1) then {
+ _get = _vehicle getVariable 'WFBE_EASA_Setup';
+ //--- Vehicle Loadout check.
+ if (isNil '_get') then {
+ [_vehicle,('WFBE_EASA_Default' Call GetNamespace) select _type] Call EASA_RemoveLoadout;
+ } else {
+ //--- Override the index?.
+ _tindex = if (_override) then {_index} else {(_get select 1)};
+
+ //--- Grab the old loadout.
+ _old = (('WFBE_EASA_Loadouts' Call GetNamespace) select (_get select 0)) select (_get select 1);
+ _tar = [];
+ for [{_i = 2},{_i < count(_old)},{_i = _i + 1}] do {
+ _tar = _tar + [_old select _i];
+ };
+ _old = _tar;
+
+ [_vehicle,('WFBE_EASA_Default' Call GetNamespace) select _type] Call EASA_RemoveLoadout;
+ [_vehicle,_old] Call EASA_RemoveLoadout;
+ };
+
+ _data = (('WFBE_EASA_Loadouts' Call GetNamespace) select _type) select _tindex;
+
+ for [{_j = 2},{_j < count(_data)},{_j = _j + 1}] do {
+ _z = _data select _j;
+ for [{_i = count(_z)-1},{_i >= 0},{_i = _i - 1}] do {
+ if (_i > 0) then {
+ _vehicle addMagazine (_z select _i);
+ } else {
+ _vehicle addWeapon (_z select _i);
+ };
+ };
+ };
+
+ _vehicle setVariable ['WFBE_EASA_Setup',[_type,_tindex],true];
+}; \ No newline at end of file
diff --git a/Client/Module/EASA/EASA_Init.sqf b/Client/Module/EASA/EASA_Init.sqf
new file mode 100644
index 0000000..8e35a00
--- /dev/null
+++ b/Client/Module/EASA/EASA_Init.sqf
@@ -0,0 +1,378 @@
+Private ['_easaDefault','_easaLoadout','_easaVehi','_vehicle'];
+
+EASA_Equip = Compile preProcessFile 'Client\Module\EASA\EASA_Equip.sqf';
+EASA_RemoveLoadout = Compile preProcessFile 'Client\Module\EASA\EASA_RemoveLoadout.sqf';
+
+_easaDefault = [];
+_easaLoadout = [];
+_easaVehi = [];
+
+/* [[Price], [Description], [Weapon, Ammos], [Weapon, Ammos]...] */
+_easaVehi = _easaVehi + ['Su25_TK_EP1'];
+_easaDefault = _easaDefault + [[['AirBombLauncher','4Rnd_FAB_250'],['R73Launcher_2','2Rnd_R73']]];
+_easaLoadout = _easaLoadout + [
+if (WF_A2_Arrowhead) then {
+ [
+ [[1200],['R-73 (6)'],['R73Launcher_2','2Rnd_R73','2Rnd_R73','2Rnd_R73']],
+ [[1400],['R-73 (4) | FAB-250 (2)'],['R73Launcher_2','2Rnd_R73','2Rnd_R73'],['AirBombLauncher','2Rnd_FAB_250']],
+ [[1600],['R-73 (2) | FAB-250 (4)'],['R73Launcher_2','2Rnd_R73'],['AirBombLauncher','4Rnd_FAB_250']],
+ [[1900],['FAB-250 (6)'],['AirBombLauncher','4Rnd_FAB_250','2Rnd_FAB_250']]
+ ]
+} else {
+ [
+ [[0],['KAB-500 KR (6)'],['ACE_KAB500KRLauncher','ACE_6Rnd_KAB500KR']],
+ [[0],['Kh-29 (6)'],['ACE_Kh29Launcher','ACE_6Rnd_Kh29']],
+ [[0],['Kh-29 (4) | KAB-500 L (2)'],['Ch29Launcher_Su34','4Rnd_Ch29'],['ACE_KAB500LLauncher','ACE_6Rnd_KAB500L']],
+ [[0],['Kh-29 (4) | R-73 (2)'],['ACE_Kh29Launcher','ACE_4Rnd_Kh29'],['ACE_R73Launcher','ACE_2Rnd_R73']],
+ [[0],['R-73 (6)'],['ACE_R73Launcher','ACE_6Rnd_R73']],
+ [[0],['R-73 (4) | KAB-500 KR (2)'],['ACE_R73Launcher','ACE_4Rnd_R73'],['ACE_KAB500KRLauncher','ACE_2Rnd_KAB500KR']],
+ [[0],['KAB-500 KR (4) | Kh-29 (2)'],['ACE_KAB500KRLauncher','ACE_4Rnd_KAB500KR'],['ACE_Kh29Launcher','ACE_2Rnd_Kh29']],
+ [[0],['FAB-500 (4) | Kh-29 (2)'],['ACE_FAB500M62Launcher','ACE_4Rnd_FAB500M62'],['ACE_Kh29Launcher','ACE_2Rnd_Kh29']],
+ [[0],['FAB-500 (4) | R-73 (2)'],['ACE_FAB500M62Launcher','ACE_4Rnd_FAB500M62'],['ACE_R73Launcher','ACE_2Rnd_R73']],
+ [[0],['FAB-500 (6)'],['ACE_FAB500M62Launcher','ACE_6Rnd_FAB500M62']],
+ [[0],['R-73 (2) | FAB-250 (4)'],['ACE_R73Launcher','ACE_2Rnd_R73'],['AirBombLauncher','4Rnd_FAB_250']],
+ [[0],['R-73 (2) | KAB-500 KR (4)'],['ACE_R73Launcher','ACE_2Rnd_R73'],['ACE_KAB500KRLauncher','ACE_4Rnd_KAB500KR']]
+ ]
+}
+];
+
+_easaVehi = _easaVehi + ['Su25_Ins'];
+_easaDefault = _easaDefault + [[['AirBombLauncher','4Rnd_FAB_250'],['R73Launcher_2','2Rnd_R73']]];
+_easaLoadout = _easaLoadout + [
+ [
+ [[0],['KAB-500 KR (6)'],['ACE_KAB500KRLauncher','ACE_6Rnd_KAB500KR']],
+ [[0],['Kh-29 (6)'],['ACE_Kh29Launcher','ACE_6Rnd_Kh29']],
+ [[0],['Kh-29 (4) | KAB-500 L (2)'],['Ch29Launcher_Su34','4Rnd_Ch29'],['ACE_KAB500LLauncher','ACE_6Rnd_KAB500L']],
+ [[0],['Kh-29 (4) | R-73 (2)'],['ACE_Kh29Launcher','ACE_4Rnd_Kh29'],['ACE_R73Launcher','ACE_2Rnd_R73']],
+ [[0],['R-73 (6)'],['ACE_R73Launcher','ACE_6Rnd_R73']],
+ [[0],['R-73 (4) | KAB-500 KR (2)'],['ACE_R73Launcher','ACE_4Rnd_R73'],['ACE_KAB500KRLauncher','ACE_2Rnd_KAB500KR']],
+ [[0],['KAB-500 KR (4) | Kh-29 (2)'],['ACE_KAB500KRLauncher','ACE_4Rnd_KAB500KR'],['ACE_Kh29Launcher','ACE_2Rnd_Kh29']],
+ [[0],['FAB-500 (4) | Kh-29 (2)'],['ACE_FAB500M62Launcher','ACE_4Rnd_FAB500M62'],['ACE_Kh29Launcher','ACE_2Rnd_Kh29']],
+ [[0],['FAB-500 (4) | R-73 (2)'],['ACE_FAB500M62Launcher','ACE_4Rnd_FAB500M62'],['ACE_R73Launcher','ACE_2Rnd_R73']],
+ [[0],['FAB-500 (6)'],['ACE_FAB500M62Launcher','ACE_6Rnd_FAB500M62']],
+ [[0],['R-73 (2) | FAB-250 (4)'],['ACE_R73Launcher','ACE_2Rnd_R73'],['AirBombLauncher','4Rnd_FAB_250']],
+ [[0],['R-73 (2) | KAB-500 KR (4)'],['ACE_R73Launcher','ACE_2Rnd_R73'],['ACE_KAB500KRLauncher','ACE_4Rnd_KAB500KR']]
+ ]
+];
+
+_easaVehi = _easaVehi + ['Su39'];
+_easaDefault = _easaDefault + [[['Ch29Launcher','4Rnd_Ch29'],['R73Launcher_2','2Rnd_R73']]];
+_easaLoadout = _easaLoadout + [
+ [
+ [[0],['KAB-500 KR (6)'],['ACE_KAB500KRLauncher','ACE_6Rnd_KAB500KR']],
+ [[0],['Kh-29 (6)'],['ACE_Kh29Launcher','ACE_6Rnd_Kh29']],
+ [[0],['Kh-29 (4) | KAB-500 L (2)'],['Ch29Launcher_Su34','4Rnd_Ch29'],['ACE_KAB500LLauncher','ACE_6Rnd_KAB500L']],
+ [[0],['Kh-29 (4) | R-73 (2)'],['ACE_Kh29Launcher','ACE_4Rnd_Kh29'],['ACE_R73Launcher','ACE_2Rnd_R73']],
+ [[0],['R-73 (6)'],['ACE_R73Launcher','ACE_6Rnd_R73']],
+ [[0],['R-73 (4) | KAB-500 KR (2)'],['ACE_R73Launcher','ACE_4Rnd_R73'],['ACE_KAB500KRLauncher','ACE_2Rnd_KAB500KR']],
+ [[0],['KAB-500 KR (4) | Kh-29 (2)'],['ACE_KAB500KRLauncher','ACE_4Rnd_KAB500KR'],['ACE_Kh29Launcher','ACE_2Rnd_Kh29']],
+ [[0],['FAB-500 (4) | Kh-29 (2)'],['ACE_FAB500M62Launcher','ACE_4Rnd_FAB500M62'],['ACE_Kh29Launcher','ACE_2Rnd_Kh29']],
+ [[0],['FAB-500 (4) | R-73 (2)'],['ACE_FAB500M62Launcher','ACE_4Rnd_FAB500M62'],['ACE_R73Launcher','ACE_2Rnd_R73']],
+ [[0],['FAB-500 (6)'],['ACE_FAB500M62Launcher','ACE_6Rnd_FAB500M62']],
+ [[0],['R-73 (2) | FAB-250 (4)'],['ACE_R73Launcher','ACE_2Rnd_R73'],['AirBombLauncher','4Rnd_FAB_250']],
+ [[0],['R-73 (2) | KAB-500 KR (4)'],['ACE_R73Launcher','ACE_2Rnd_R73'],['ACE_KAB500KRLauncher','ACE_4Rnd_KAB500KR']]
+ ]
+];
+
+
+_easaVehi = _easaVehi + ['Su34'];
+_easaDefault = _easaDefault + [[['ACE_R73Launcher','ACE_4Rnd_R73'],['ACE_R27Launcher','ACE_2Rnd_R27'],['ACE_Kh29Launcher','ACE_6Rnd_Kh29']]];
+_easaLoadout = _easaLoadout + [
+ [
+ [[0],['KAB-500 KR (6) | KAB-500 L (6)'],['ACE_KAB500KRLauncher','ACE_6Rnd_KAB500KR'],['ACE_KAB500LLauncher','ACE_6Rnd_KAB500L']],
+ [[0],['KAB-500 L (6) | R-73 (4) | R-27 (2)'],['ACE_KAB500LLauncher','ACE_6Rnd_KAB500L'],['ACE_R73Launcher','ACE_2Rnd_R73'],['ACE_R27Launcher','ACE_2Rnd_R27']],
+ [[0],['KAB-500 L (6) | KAB-500 KR (4) | R-73 (2)'],['ACE_KAB500KRLauncher','ACE_4Rnd_KAB500KR'],['ACE_R73Launcher','ACE_2Rnd_R73'],['ACE_KAB500LLauncher','ACE_6Rnd_KAB500L']],
+ [[0],['KAB-500 L (6) | Kh-29 (4) | R-73 (2)'],['ACE_KAB500KRLauncher','ACE_6Rnd_KAB500KR'],['ACE_Kh29Launcher','ACE_4Rnd_Kh29'],['ACE_R73Launcher','ACE_2Rnd_R73']],
+ [[0],['KAB-500 KR (4) | Kh-29 (4) | R-73 (4)'],['ACE_KAB500KRLauncher','ACE_4Rnd_KAB500KR'],['ACE_Kh29Launcher','ACE_4Rnd_Kh29'],['ACE_R73Launcher','ACE_4Rnd_R73']],
+ [[0],['KAB-500 KR (4) | R-73 (6)'],['ACE_KAB500KRLauncher','ACE_4Rnd_KAB500KR'],['R73Launcher_2','2Rnd_R73'],['R73Launcher','4Rnd_R73']],
+ [[0],['KAB-500 KR (4) | Kh-29 (6)'],['ACE_KAB500KRLauncher','ACE_4Rnd_KAB500KR'],['ACE_Kh29Launcher','ACE_6Rnd_Kh29']],
+ [[0],['KAB-500 KR (2) | R-73 (8)'],['ACE_KAB500KRLauncher','ACE_2Rnd_KAB500KR'],['R73Launcher','4Rnd_R73','4Rnd_R73']],
+ [[0],['KAB-500 KR (2) | R-73 (4) | Ch-29 (6)'],['ACE_KAB500KRLauncher','ACE_2Rnd_KAB500KR'],['ACE_R73Launcher','ACE_4Rnd_R73'],['ACE_Kh29Launcher','ACE_6Rnd_Kh29']],
+ [[0],['KAB-500 KR (4) | R-73 (2) | Ch-29 (6)'],['ACE_KAB500KRLauncher','ACE_4Rnd_KAB500KR'],['ACE_R73Launcher','ACE_2Rnd_R73'],['ACE_Kh29Launcher','ACE_6Rnd_Kh29']],
+ [[0],['R-73 (8) | R-27 (4)'],['ACE_R73Launcher','ACE_6Rnd_R73','ACE_2Rnd_R73'],['ACE_R27Launcher','ACE_4Rnd_R27']],
+ [[0],['R-73 (6) | R-27 (6)'],['ACE_R73Launcher','ACE_6Rnd_R73'],['ACE_R27Launcher','ACE_6Rnd_R27']],
+ [[0],['Kh-29 (6) | R-73 (4) |KAB-500 KR (2)'],['ACE_Kh29Launcher','ACE_6Rnd_Kh29'],['ACE_R73Launcher','ACE_4Rnd_R73'],['ACE_KAB500KRLauncher','ACE_2Rnd_KAB500KR']],
+ [[0],['Kh-29 (6) | R-73 (4) | R-27(2)'],['ACE_R73Launcher','ACE_4Rnd_R73'],['ACE_R27Launcher','ACE_2Rnd_R27'],['ACE_Kh29Launcher','ACE_6Rnd_Kh29']],
+ [[0],['Kh-29 (12)'],['ACE_Kh29Launcher','ACE_6Rnd_Kh29','ACE_6Rnd_Kh29']],
+ [[0],['R-27 (2) | R-73 (4) | KAB-500 KR (2) | KAB-500 L (2) | FAB-500 (2)'],['ACE_R27Launcher','ACE_2Rnd_R27'],['ACE_R73Launcher','ACE_4Rnd_R73'],['ACE_FAB500M62Launcher','ACE_2Rnd_FAB500M62'],['ACE_KAB500KRLauncher','ACE_2Rnd_KAB500KR'],['ACE_KAB500LLauncher','ACE_2Rnd_KAB500L']],
+ [[0],['FAB-500 (6) | KAB-500 L (6)'],['ACE_FAB500M62Launcher','ACE_6Rnd_FAB500M62'],['ACE_KAB500LLauncher','ACE_6Rnd_KAB500L']],
+ [[0],['FAB-500 (6) | R-73 (4) | R-27 (2)'],['ACE_FAB500M62Launcher','ACE_6Rnd_FAB500M62'],['ACE_R73Launcher','ACE_2Rnd_R73'],['ACE_R27Launcher','ACE_2Rnd_R27']],
+ [[0],['FAB-500 (6) | KAB-500 KR (4) | R-73 (2)'],['ACE_FAB500M62Launcher','ACE_6Rnd_FAB500M62'],['ACE_R73Launcher','ACE_2Rnd_R73'],['ACE_KAB500KRLauncher','ACE_4Rnd_KAB500KR']],
+ [[0],['FAB-500 (6) | Kh-29 (4) | R-73 (2)'],['ACE_FAB500M62Launcher','ACE_6Rnd_FAB500M62'],['ACE_Kh29Launcher','ACE_4Rnd_Kh29'],['ACE_R73Launcher','ACE_2Rnd_R73']],
+ [[0],['FAB-500 (4) | Kh-29 (4) | R-73 (4)'],['ACE_FAB500M62Launcher','ACE_4Rnd_FAB500M62'],['ACE_Kh29Launcher','ACE_4Rnd_Kh29'],['ACE_R73Launcher','ACE_4Rnd_R73']],
+ [[0],['FAB-500 (4) | R-73 (6)'],['ACE_FAB500M62Launcher','ACE_4Rnd_FAB500M62'],['R73Launcher_2','2Rnd_R73'],['R73Launcher','4Rnd_R73']],
+ [[0],['FAB-500 (4) | Kh-29 (6)'],['ACE_FAB500M62Launcher','ACE_4Rnd_FAB500M62'],['ACE_Kh29Launcher','ACE_6Rnd_Kh29']]
+ ]
+];
+
+_easaVehi = _easaVehi + ['ACE_Su30'];
+_easaDefault = _easaDefault + [[['ACE_R73Launcher','ACE_4Rnd_R73'],['ACE_R27Launcher','ACE_2Rnd_R27'],['ACE_Kh29Launcher','ACE_6Rnd_Kh29']]];
+_easaLoadout = _easaLoadout + [
+ [
+ [[0],['KAB-500 KR (6) | KAB-500 L (6)'],['ACE_KAB500KRLauncher','ACE_6Rnd_KAB500KR'],['ACE_KAB500LLauncher','ACE_6Rnd_KAB500L']],
+ [[0],['KAB-500 L (6) | R-73 (4) | R-27 (2)'],['ACE_KAB500LLauncher','ACE_6Rnd_KAB500L'],['ACE_R73Launcher','ACE_2Rnd_R73'],['ACE_R27Launcher','ACE_2Rnd_R27']],
+ [[0],['KAB-500 L (6) | KAB-500 KR (4) | R-73 (2)'],['ACE_KAB500KRLauncher','ACE_4Rnd_KAB500KR'],['ACE_R73Launcher','ACE_2Rnd_R73'],['ACE_KAB500LLauncher','ACE_6Rnd_KAB500L']],
+ [[0],['KAB-500 L (6) | Kh-29 (4) | R-73 (2)'],['ACE_KAB500KRLauncher','ACE_6Rnd_KAB500KR'],['ACE_Kh29Launcher','ACE_4Rnd_Kh29'],['ACE_R73Launcher','ACE_2Rnd_R73']],
+ [[0],['KAB-500 KR (4) | Kh-29 (4) | R-73 (4)'],['ACE_KAB500KRLauncher','ACE_4Rnd_KAB500KR'],['ACE_Kh29Launcher','ACE_4Rnd_Kh29'],['ACE_R73Launcher','ACE_4Rnd_R73']],
+ [[0],['KAB-500 KR (4) | R-73 (6)'],['ACE_KAB500KRLauncher','ACE_4Rnd_KAB500KR'],['R73Launcher_2','2Rnd_R73'],['R73Launcher','4Rnd_R73']],
+ [[0],['KAB-500 KR (4) | Kh-29 (6)'],['ACE_KAB500KRLauncher','ACE_4Rnd_KAB500KR'],['ACE_Kh29Launcher','ACE_6Rnd_Kh29']],
+ [[0],['KAB-500 KR (2) | R-73 (8)'],['ACE_KAB500KRLauncher','ACE_2Rnd_KAB500KR'],['R73Launcher','4Rnd_R73','4Rnd_R73']],
+ [[0],['KAB-500 KR (2) | R-73 (4) | Ch-29 (6)'],['ACE_KAB500KRLauncher','ACE_2Rnd_KAB500KR'],['ACE_R73Launcher','ACE_4Rnd_R73'],['ACE_Kh29Launcher','ACE_6Rnd_Kh29']],
+ [[0],['KAB-500 KR (4) | R-73 (2) | Ch-29 (6)'],['ACE_KAB500KRLauncher','ACE_4Rnd_KAB500KR'],['ACE_R73Launcher','ACE_2Rnd_R73'],['ACE_Kh29Launcher','ACE_6Rnd_Kh29']],
+ [[0],['R-73 (8) | R-27 (4)'],['ACE_R73Launcher','ACE_6Rnd_R73','ACE_2Rnd_R73'],['ACE_R27Launcher','ACE_4Rnd_R27']],
+ [[0],['R-73 (6) | R-27 (6)'],['ACE_R73Launcher','ACE_6Rnd_R73'],['ACE_R27Launcher','ACE_6Rnd_R27']],
+ [[0],['Kh-29 (6) | R-73 (4) |KAB-500 KR (2)'],['ACE_Kh29Launcher','ACE_6Rnd_Kh29'],['ACE_R73Launcher','ACE_4Rnd_R73'],['ACE_KAB500KRLauncher','ACE_2Rnd_KAB500KR']],
+ [[0],['Kh-29 (6) | R-73 (4) | R-27(2)'],['ACE_R73Launcher','ACE_4Rnd_R73'],['ACE_R27Launcher','ACE_2Rnd_R27'],['ACE_Kh29Launcher','ACE_6Rnd_Kh29']],
+ [[0],['Kh-29 (12)'],['ACE_Kh29Launcher','ACE_6Rnd_Kh29','ACE_6Rnd_Kh29']],
+ [[0],['R-27 (2) | R-73 (4) | KAB-500 KR (2) | KAB-500 L (2) | FAB-500 (2)'],['ACE_R27Launcher','ACE_2Rnd_R27'],['ACE_R73Launcher','ACE_4Rnd_R73'],['ACE_FAB500M62Launcher','ACE_2Rnd_FAB500M62'],['ACE_KAB500KRLauncher','ACE_2Rnd_KAB500KR'],['ACE_KAB500LLauncher','ACE_2Rnd_KAB500L']],
+ [[0],['FAB-500 (6) | KAB-500 L (6)'],['ACE_FAB500M62Launcher','ACE_6Rnd_FAB500M62'],['ACE_KAB500LLauncher','ACE_6Rnd_KAB500L']],
+ [[0],['FAB-500 (6) | R-73 (4) | R-27 (2)'],['ACE_FAB500M62Launcher','ACE_6Rnd_FAB500M62'],['ACE_R73Launcher','ACE_2Rnd_R73'],['ACE_R27Launcher','ACE_2Rnd_R27']],
+ [[0],['FAB-500 (6) | KAB-500 KR (4) | R-73 (2)'],['ACE_FAB500M62Launcher','ACE_6Rnd_FAB500M62'],['ACE_R73Launcher','ACE_2Rnd_R73'],['ACE_KAB500KRLauncher','ACE_4Rnd_KAB500KR']],
+ [[0],['FAB-500 (6) | Kh-29 (4) | R-73 (2)'],['ACE_FAB500M62Launcher','ACE_6Rnd_FAB500M62'],['ACE_Kh29Launcher','ACE_4Rnd_Kh29'],['ACE_R73Launcher','ACE_2Rnd_R73']],
+ [[0],['FAB-500 (4) | Kh-29 (4) | R-73 (4)'],['ACE_FAB500M62Launcher','ACE_4Rnd_FAB500M62'],['ACE_Kh29Launcher','ACE_4Rnd_Kh29'],['ACE_R73Launcher','ACE_4Rnd_R73']],
+ [[0],['FAB-500 (4) | R-73 (6)'],['ACE_FAB500M62Launcher','ACE_4Rnd_FAB500M62'],['R73Launcher_2','2Rnd_R73'],['R73Launcher','4Rnd_R73']],
+ [[0],['FAB-500 (4) | Kh-29 (6)'],['ACE_FAB500M62Launcher','ACE_4Rnd_FAB500M62'],['ACE_Kh29Launcher','ACE_6Rnd_Kh29']]
+ ]
+];
+
+_easaVehi = _easaVehi + ['ACE_Su30_des'];
+_easaDefault = _easaDefault + [[['ACE_R27Launcher','ACE_2Rnd_R27'],['ACE_R73Launcher','ACE_4Rnd_R73'],['ACE_FAB500M62Launcher','ACE_2Rnd_FAB500M62'],['ACE_KAB500KRLauncher','ACE_2Rnd_KAB500KR'],['ACE_KAB500LLauncher','ACE_2Rnd_KAB500L']]];
+_easaLoadout = _easaLoadout + [
+ [
+ [[0],['KAB-500 KR (6) | KAB-500 L (6)'],['ACE_KAB500KRLauncher','ACE_6Rnd_KAB500KR'],['ACE_KAB500LLauncher','ACE_6Rnd_KAB500L']],
+ [[0],['KAB-500 L (6) | R-73 (4) | R-27 (2)'],['ACE_KAB500LLauncher','ACE_6Rnd_KAB500L'],['ACE_R73Launcher','ACE_2Rnd_R73'],['ACE_R27Launcher','ACE_2Rnd_R27']],
+ [[0],['KAB-500 L (6) | KAB-500 KR (4) | R-73 (2)'],['ACE_KAB500KRLauncher','ACE_4Rnd_KAB500KR'],['ACE_R73Launcher','ACE_2Rnd_R73'],['ACE_KAB500LLauncher','ACE_6Rnd_KAB500L']],
+ [[0],['KAB-500 L (6) | Kh-29 (4) | R-73 (2)'],['ACE_KAB500KRLauncher','ACE_6Rnd_KAB500KR'],['ACE_Kh29Launcher','ACE_4Rnd_Kh29'],['ACE_R73Launcher','ACE_2Rnd_R73']],
+ [[0],['KAB-500 KR (4) | Kh-29 (4) | R-73 (4)'],['ACE_KAB500KRLauncher','ACE_4Rnd_KAB500KR'],['ACE_Kh29Launcher','ACE_4Rnd_Kh29'],['ACE_R73Launcher','ACE_4Rnd_R73']],
+ [[0],['KAB-500 KR (4) | R-73 (6)'],['ACE_KAB500KRLauncher','ACE_4Rnd_KAB500KR'],['R73Launcher_2','2Rnd_R73'],['R73Launcher','4Rnd_R73']],
+ [[0],['KAB-500 KR (4) | Kh-29 (6)'],['ACE_KAB500KRLauncher','ACE_4Rnd_KAB500KR'],['ACE_Kh29Launcher','ACE_6Rnd_Kh29']],
+ [[0],['KAB-500 KR (2) | R-73 (8)'],['ACE_KAB500KRLauncher','ACE_2Rnd_KAB500KR'],['R73Launcher','4Rnd_R73','4Rnd_R73']],
+ [[0],['KAB-500 KR (2) | R-73 (4) | Ch-29 (6)'],['ACE_KAB500KRLauncher','ACE_2Rnd_KAB500KR'],['ACE_R73Launcher','ACE_4Rnd_R73'],['ACE_Kh29Launcher','ACE_6Rnd_Kh29']],
+ [[0],['KAB-500 KR (4) | R-73 (2) | Ch-29 (6)'],['ACE_KAB500KRLauncher','ACE_4Rnd_KAB500KR'],['ACE_R73Launcher','ACE_2Rnd_R73'],['ACE_Kh29Launcher','ACE_6Rnd_Kh29']],
+ [[0],['R-73 (8) | R-27 (4)'],['ACE_R73Launcher','ACE_6Rnd_R73','ACE_2Rnd_R73'],['ACE_R27Launcher','ACE_4Rnd_R27']],
+ [[0],['R-73 (6) | R-27 (6)'],['ACE_R73Launcher','ACE_6Rnd_R73'],['ACE_R27Launcher','ACE_6Rnd_R27']],
+ [[0],['Kh-29 (6) | R-73 (4) |KAB-500 KR (2)'],['ACE_Kh29Launcher','ACE_6Rnd_Kh29'],['ACE_R73Launcher','ACE_4Rnd_R73'],['ACE_KAB500KRLauncher','ACE_2Rnd_KAB500KR']],
+ [[0],['Kh-29 (6) | R-73 (4) | R-27(2)'],['ACE_R73Launcher','ACE_4Rnd_R73'],['ACE_R27Launcher','ACE_2Rnd_R27'],['ACE_Kh29Launcher','ACE_6Rnd_Kh29']],
+ [[0],['Kh-29 (12)'],['ACE_Kh29Launcher','ACE_6Rnd_Kh29','ACE_6Rnd_Kh29']],
+ [[0],['R-27 (2) | R-73 (4) | KAB-500 KR (2) | KAB-500 L (2) | FAB-500 (2)'],['ACE_R27Launcher','ACE_2Rnd_R27'],['ACE_R73Launcher','ACE_4Rnd_R73'],['ACE_FAB500M62Launcher','ACE_2Rnd_FAB500M62'],['ACE_KAB500KRLauncher','ACE_2Rnd_KAB500KR'],['ACE_KAB500LLauncher','ACE_2Rnd_KAB500L']],
+ [[0],['FAB-500 (6) | KAB-500 L (6)'],['ACE_FAB500M62Launcher','ACE_6Rnd_FAB500M62'],['ACE_KAB500LLauncher','ACE_6Rnd_KAB500L']],
+ [[0],['FAB-500 (6) | R-73 (4) | R-27 (2)'],['ACE_FAB500M62Launcher','ACE_6Rnd_FAB500M62'],['ACE_R73Launcher','ACE_2Rnd_R73'],['ACE_R27Launcher','ACE_2Rnd_R27']],
+ [[0],['FAB-500 (6) | KAB-500 KR (4) | R-73 (2)'],['ACE_FAB500M62Launcher','ACE_6Rnd_FAB500M62'],['ACE_R73Launcher','ACE_2Rnd_R73'],['ACE_KAB500KRLauncher','ACE_4Rnd_KAB500KR']],
+ [[0],['FAB-500 (6) | Kh-29 (4) | R-73 (2)'],['ACE_FAB500M62Launcher','ACE_6Rnd_FAB500M62'],['ACE_Kh29Launcher','ACE_4Rnd_Kh29'],['ACE_R73Launcher','ACE_2Rnd_R73']],
+ [[0],['FAB-500 (4) | Kh-29 (4) | R-73 (4)'],['ACE_FAB500M62Launcher','ACE_4Rnd_FAB500M62'],['ACE_Kh29Launcher','ACE_4Rnd_Kh29'],['ACE_R73Launcher','ACE_4Rnd_R73']],
+ [[0],['FAB-500 (4) | R-73 (6)'],['ACE_FAB500M62Launcher','ACE_4Rnd_FAB500M62'],['R73Launcher_2','2Rnd_R73'],['R73Launcher','4Rnd_R73']],
+ [[0],['FAB-500 (4) | Kh-29 (6)'],['ACE_FAB500M62Launcher','ACE_4Rnd_FAB500M62'],['ACE_Kh29Launcher','ACE_6Rnd_Kh29']]
+ ]
+];
+
+
+
+_easaVehi = _easaVehi + ['ACE_Su27_CAS'];
+_easaDefault = _easaDefault + [[['ACE_R73Launcher','ACE_4Rnd_R73'],['ACE_R27Launcher','ACE_2Rnd_R27']]];
+_easaLoadout = _easaLoadout + [
+ [
+ [[0],['KAB-500 L (6)'],['ACE_KAB500LLauncher','ACE_6Rnd_KAB500L']],
+ [[0],['KAB-500 L (2) | R-73 (4)'],['ACE_KAB500LLauncher','ACE_2Rnd_KAB500L'],['ACE_R73Launcher','ACE_4Rnd_R73']],
+ [[0],['KAB-500 L (4) | Kh-29 (2)'],['ACE_KAB500LLauncher','ACE_4Rnd_KAB500L'],['ACE_Kh29Launcher','ACE_2Rnd_Kh29']],
+ [[0],['R-73 (6)'],['ACE_R73Launcher','ACE_6Rnd_R73']],
+ [[0],['R-73 (4) | R-27 (2)'],['ACE_R73Launcher','ACE_4Rnd_R73'],['ACE_R27Launcher','ACE_2Rnd_R27']],
+ [[0],['Kh-29 (6)'],['ACE_Kh29Launcher','ACE_6Rnd_Kh29']],
+ [[0],['Kh-29 (4) | R-27(2)'],['ACE_R27Launcher','ACE_2Rnd_R27'],['ACE_Kh29Launcher','ACE_4Rnd_Kh29']],
+ [[0],['Kh-29 (2)| R-73 (4)'],['ACE_Kh29Launcher','ACE_2Rnd_Kh29'],['ACE_R73Launcher','ACE_4Rnd_R73']],
+ [[0],['FAB-500 (6)'],['ACE_FAB500M62Launcher','ACE_6Rnd_FAB500M62']],
+ [[0],['FAB-500 (4) | Kh-29 (2)'],['ACE_FAB500M62Launcher','ACE_4Rnd_FAB500M62'],['ACE_Kh29Launcher','ACE_2Rnd_Kh29']],
+ [[0],['FAB-500 (4) | R-73 (2)'],['ACE_FAB500M62Launcher','ACE_4Rnd_FAB500M62'],['R73Launcher_2','2Rnd_R73']],
+ [[0],['FAB-500 (4) | R-27 (2)'],['ACE_FAB500M62Launcher','ACE_4Rnd_FAB500M62'],['ACE_R27Launcher','ACE_2Rnd_R27']]
+ ]
+];
+
+
+_easaVehi = _easaVehi + ['Mi24_P'];
+_easaDefault = _easaDefault + [[['HeliBombLauncher','2Rnd_FAB_250']]];
+_easaLoadout = _easaLoadout + [
+ [
+ [[0],['FAB-250 (2)'],['HeliBombLauncher','2Rnd_FAB_250']],
+ [[0],['R-73 (2)'],['R73Launcher_2','2Rnd_R73']]
+ ]
+];
+
+_easaVehi = _easaVehi + ['Ka52'];
+_easaDefault = _easaDefault + [[['VikhrLauncher','12Rnd_Vikhr_KA50']]];
+_easaLoadout = _easaLoadout + [
+ [
+ [[0],['Vikhr (12)'],['VikhrLauncher','12Rnd_Vikhr_KA50']],
+ [[0],['R-73 (12)'],['ACE_R73Launcher','ACE_6Rnd_R73','ACE_6Rnd_R73']]
+ ]
+];
+
+_easaVehi = _easaVehi + ['Ka52Black'];
+_easaDefault = _easaDefault + [[['VikhrLauncher','12Rnd_Vikhr_KA50']]];
+_easaLoadout = _easaLoadout + [
+ [
+ [[0],['Vikhr (12)'],['VikhrLauncher','12Rnd_Vikhr_KA50']],
+ [[0],['R-73 (12)'],['ACE_R73Launcher','ACE_6Rnd_R73','ACE_6Rnd_R73']]
+ ]
+];
+
+_easaVehi = _easaVehi + ['F35B'];
+_easaDefault = _easaDefault + [[['BombLauncherF35','2Rnd_GBU12'],['SidewinderLaucher_F35','2Rnd_Sidewinder_F35']]];
+_easaLoadout = _easaLoadout + [
+ [
+ [[0],['GBU-12 (4)'],['BombLauncherA10','4Rnd_GBU12']],
+ [[0],['GBU-12 (2) | AIM-9L (2)'],['BombLauncherF35','2Rnd_GBU12'],['SidewinderLaucher_F35','2Rnd_Sidewinder_F35']],
+ [[0],['GBU-12 (2) | AGM-65 (2)'],['BombLauncherF35','2Rnd_GBU12'],['MaverickLauncher','2Rnd_Maverick_A10']],
+ [[0],['AGM-65 (4)'],['MaverickLauncher','2Rnd_Maverick_A10','2Rnd_Maverick_A10']],
+ [[0],['AIM-9L (4)'],['SidewinderLaucher','4Rnd_Sidewinder_AV8B']]
+ ]
+];
+
+_easaVehi = _easaVehi + ['AV8B'];
+_easaDefault = _easaDefault + [[['BombLauncher','6Rnd_GBU12_AV8B']]];
+_easaLoadout = _easaLoadout + [
+ [
+ [[0],['Mk82 (6)'],['Mk82BombLauncher_6','6Rnd_Mk82']],
+ [[0],['GBU-12 (6)'],['BombLauncher','6Rnd_GBU12_AV8B']],
+ [[0],['GBU-12 (4) | AIM-9L (2)'],['BombLauncherA10','4Rnd_GBU12'],['SidewinderLaucher_AH1Z','2Rnd_Sidewinder_AH1Z']],
+ [[0],['GBU-12 (4) | AGM-65 (2)'],['BombLauncherA10','4Rnd_GBU12'],['MaverickLauncher','2Rnd_Maverick_A10']],
+ [[0],['GBU-12 (2) | AIM-9L (4)'],['ACE_BombLauncher','ACE_1Rnd_GBU12','ACE_1Rnd_GBU12'],['SidewinderLaucher','4Rnd_Sidewinder_AV8B']],
+ [[0],['GBU-12 (2) | AIM-9L (2) | AGM-65 (2)'],['ACE_BombLauncher','ACE_1Rnd_GBU12','ACE_1Rnd_GBU12'],['SidewinderLaucher_AH1Z','2Rnd_Sidewinder_AH1Z'],['MaverickLauncher','2Rnd_Maverick_A10']],
+ [[0],['CBU-87 (6)'],['ACE_CBU87_Bomblauncher','ACE_6Rnd_CBU87']],
+ [[0],['CBU-87 (4) | AIM-9L (2)'],['ACE_CBU87_Bomblauncher','ACE_4Rnd_CBU87'],['SidewinderLaucher_AH1Z','2Rnd_Sidewinder_AH1Z']],
+ [[0],['CBU-87 (4) | AGM-65 (2)'],['ACE_CBU87_Bomblauncher','ACE_4Rnd_CBU87'],['MaverickLauncher','2Rnd_Maverick_A10']],
+ [[0],['CBU-87 (2) | AIM-9L (4)'],['ACE_CBU87_Bomblauncher','ACE_2Rnd_CBU87'],['SidewinderLaucher','4Rnd_Sidewinder_AV8B']],
+ [[0],['CBU-87 (2) | AIM-9L (2) | AGM-65 (2)'],['ACE_CBU87_Bomblauncher','ACE_2Rnd_CBU87'],['SidewinderLaucher_AH1Z','2Rnd_Sidewinder_AH1Z'],['MaverickLauncher','2Rnd_Maverick_A10']],
+ [[0],['AIM-9L (6)'],['SidewinderLaucher','4Rnd_Sidewinder_AV8B'],['SidewinderLaucher_AH1Z','2Rnd_Sidewinder_AH1Z']],
+ [[0],['AGM-65 (6)'],['MaverickLauncher','2Rnd_Maverick_A10','2Rnd_Maverick_A10','2Rnd_Maverick_A10']]
+ ]
+];
+
+_easaVehi = _easaVehi + ['AV8B2'];
+_easaDefault = _easaDefault + [[['Mk82BombLauncher_6','6Rnd_Mk82'],['SidewinderLaucher_AH1Z','2Rnd_Sidewinder_AH1Z']]];
+_easaLoadout = _easaLoadout + [
+ [
+ [[0],['GBU-12 (8)'],['BombLauncherA10','4Rnd_GBU12','4Rnd_GBU12']],
+ [[0],['GBU-12 (6) | AGM-65 (2)'],['BombLauncher','6Rnd_GBU12_AV8B'],['MaverickLauncher','2Rnd_Maverick_A10']],
+ [[0],['GBU-12 (6) | AIM-9L (2)'],['BombLauncher','6Rnd_GBU12_AV8B'],['SidewinderLaucher_AH1Z','2Rnd_Sidewinder_AH1Z']],
+ [[0],['GBU-12 (4) | AGM-65 (4)'],['BombLauncherA10','4Rnd_GBU12'],['MaverickLauncher','2Rnd_Maverick_A10','2Rnd_Maverick_A10']],
+ [[0],['GBU-12 (4) | AIM-9L (4)'],['BombLauncherA10','4Rnd_GBU12'],['SidewinderLaucher','4Rnd_Sidewinder_AV8B']],
+ [[0],['GBU-12 (4) | AIM-9L (2) | AGM-65 (2)'],['BombLauncherA10','4Rnd_GBU12'],['SidewinderLaucher_AH1Z','2Rnd_Sidewinder_AH1Z'],['MaverickLauncher','2Rnd_Maverick_A10']],
+ [[0],['GBU-12 (2) | AIM-9L (4) | AGM-65 (2)'],['ACE_BombLauncher','ACE_1Rnd_GBU12','ACE_1Rnd_GBU12'],['SidewinderLaucher','4Rnd_Sidewinder_AV8B'],['MaverickLauncher','2Rnd_Maverick_A10']],
+ [[0],['GBU-12 (2) | AIM-9L (2) | AGM-65 (4)'],['ACE_BombLauncher','ACE_1Rnd_GBU12','ACE_1Rnd_GBU12'],['SidewinderLaucher_AH1Z','2Rnd_Sidewinder_AH1Z'],['MaverickLauncher','2Rnd_Maverick_A10','2Rnd_Maverick_A10']],
+ [[0],['GBU-12 (2) | AIM-9L (6)'],['ACE_BombLauncher','ACE_1Rnd_GBU12','ACE_1Rnd_GBU12'],['SidewinderLaucher','4Rnd_Sidewinder_AV8B'],['SidewinderLaucher_AH1Z','2Rnd_Sidewinder_AH1Z']],
+ [[0],['GBU-12 (2) | AGM-65 (6)'],['ACE_BombLauncher','ACE_1Rnd_GBU12','ACE_1Rnd_GBU12'],['MaverickLauncher','2Rnd_Maverick_A10','2Rnd_Maverick_A10','2Rnd_Maverick_A10']],
+ [[0],['Mk82 (6) | AIM-9L (2)'],['Mk82BombLauncher_6','6Rnd_Mk82'],['SidewinderLaucher_AH1Z','2Rnd_Sidewinder_AH1Z']],
+ [[0],['Mk82 (6) | AGM-65 (2)'],['Mk82BombLauncher_6','6Rnd_Mk82'],['MaverickLauncher','2Rnd_Maverick_A10']],
+ [[0],['Mk82 (6) | GBU-12 (2)'],['Mk82BombLauncher_6','6Rnd_Mk82'],['ACE_BombLauncher','ACE_1Rnd_GBU12','ACE_1Rnd_GBU12']],
+ [[0],['AGM-65 (8)'],['MaverickLauncher','2Rnd_Maverick_A10','2Rnd_Maverick_A10','2Rnd_Maverick_A10','2Rnd_Maverick_A10']],
+ [[0],['AGM-65 (4) | AIM-9L (4)'],['MaverickLauncher','2Rnd_Maverick_A10','2Rnd_Maverick_A10'],['SidewinderLaucher','4Rnd_Sidewinder_AV8B']],
+ [[0],['AGM-65 (6) | AIM-9L (2)'],['MaverickLauncher','2Rnd_Maverick_A10','2Rnd_Maverick_A10','2Rnd_Maverick_A10'],['SidewinderLaucher_AH1Z','2Rnd_Sidewinder_AH1Z']],
+ [[0],['CBU-87 (8)'],['ACE_CBU87_Bomblauncher','ACE_8Rnd_CBU87']],
+ [[0],['CBU-87 (6) | AGM-65 (2)'],['ACE_CBU87_Bomblauncher','ACE_6Rnd_CBU87'],['MaverickLauncher','2Rnd_Maverick_A10']],
+ [[0],['CBU-87 (6) | AIM-9L (2)'],['ACE_CBU87_Bomblauncher','ACE_6Rnd_CBU87'],['SidewinderLaucher_AH1Z','2Rnd_Sidewinder_AH1Z']],
+ [[0],['CBU-87 (4) | AGM-65 (4)'],['ACE_CBU87_Bomblauncher','ACE_4Rnd_CBU87'],['MaverickLauncher','2Rnd_Maverick_A10','2Rnd_Maverick_A10']],
+ [[0],['CBU-87 (4) | AIM-9L (4)'],['ACE_CBU87_Bomblauncher','ACE_4Rnd_CBU87'],['SidewinderLaucher','4Rnd_Sidewinder_AV8B']],
+ [[0],['CBU-87 (4) | AIM-9L (2) | AGM-65 (2)'],['ACE_CBU87_Bomblauncher','ACE_4Rnd_CBU87'],['SidewinderLaucher_AH1Z','2Rnd_Sidewinder_AH1Z'],['MaverickLauncher','2Rnd_Maverick_A10']],
+ [[0],['CBU-87 (2) | AIM-9L (4) | AGM-65 (2)'],['ACE_CBU87_Bomblauncher','ACE_2Rnd_CBU87'],['SidewinderLaucher','4Rnd_Sidewinder_AV8B'],['MaverickLauncher','2Rnd_Maverick_A10']],
+ [[0],['CBU-87 (2) | AIM-9L (2) | AGM-65 (4)'],['ACE_CBU87_Bomblauncher','ACE_2Rnd_CBU87'],['SidewinderLaucher_AH1Z','2Rnd_Sidewinder_AH1Z'],['MaverickLauncher','2Rnd_Maverick_A10','2Rnd_Maverick_A10']],
+ [[0],['CBU-87 (2) | AIM-9L (6)'],['ACE_CBU87_Bomblauncher','ACE_2Rnd_CBU87'],['SidewinderLaucher','4Rnd_Sidewinder_AV8B'],['SidewinderLaucher_AH1Z','2Rnd_Sidewinder_AH1Z']],
+ [[0],['CBU-87 (2) | AGM-65 (6)'],['ACE_CBU87_Bomblauncher','ACE_2Rnd_CBU87'],['MaverickLauncher','2Rnd_Maverick_A10','2Rnd_Maverick_A10','2Rnd_Maverick_A10']],
+ [[0],['AIM-9L (8)'],['SidewinderLaucher_AH64','8Rnd_Sidewinder_AH64']],
+ [[0],['AIM-9L (6) | AGM-65 (2)'],['SidewinderLaucher','4Rnd_Sidewinder_AV8B'],['SidewinderLaucher_AH1Z','2Rnd_Sidewinder_AH1Z'],['MaverickLauncher','2Rnd_Maverick_A10']]
+ ]
+];
+
+_easaVehi = _easaVehi + ['ACE_A10_CBU87'];
+_easaDefault = _easaDefault + [[['ACE_CBU87_Bomblauncher','ACE_4Rnd_CBU87'],['MaverickLauncher','2Rnd_Maverick_A10'],['SidewinderLaucher_AH1Z','2Rnd_Sidewinder_AH1Z']]];
+_easaLoadout = _easaLoadout + [
+if (WF_A2_Arrowhead) then {
+ [
+ [[0],['GBU-12 (8)'],['BombLauncherA10','4Rnd_GBU12','4Rnd_GBU12']],
+ [[0],['GBU-12 (4) | AGM-65 (4)'],['BombLauncherA10','4Rnd_GBU12'],['MaverickLauncher','2Rnd_Maverick_A10','2Rnd_Maverick_A10']],
+ [[0],['GBU-12 (4) | AIM-9L (4)'],['BombLauncherA10','4Rnd_GBU12'],['SidewinderLaucher_AH1Z','2Rnd_Sidewinder_AH1Z','2Rnd_Sidewinder_AH1Z']],
+ [[0],['GBU-12 (4) | AIM-9L (2) | AGM-65 (2)'],['BombLauncherA10','4Rnd_GBU12'],['SidewinderLaucher_AH1Z','2Rnd_Sidewinder_AH1Z'],['MaverickLauncher','2Rnd_Maverick_A10']],
+ [[0],['AGM-65 (8)'],['MaverickLauncher','2Rnd_Maverick_A10','2Rnd_Maverick_A10','2Rnd_Maverick_A10','2Rnd_Maverick_A10']],
+ [[0],['AGM-65 (4) | AIM-9L (4)'],['MaverickLauncher','2Rnd_Maverick_A10','2Rnd_Maverick_A10'],['SidewinderLaucher_AH1Z','2Rnd_Sidewinder_AH1Z','2Rnd_Sidewinder_AH1Z']],
+ [[0],['AGM-65 (6) | AIM-9L (2)'],['MaverickLauncher','2Rnd_Maverick_A10','2Rnd_Maverick_A10','2Rnd_Maverick_A10'],['SidewinderLaucher_AH1Z','2Rnd_Sidewinder_AH1Z']],
+ [[0],['AGM-114 (8)'],['HellfireLauncher','8Rnd_Hellfire']],
+ [[0],['AIM-9L (8)'],['SidewinderLaucher_AH1Z','2Rnd_Sidewinder_AH1Z','2Rnd_Sidewinder_AH1Z','2Rnd_Sidewinder_AH1Z','2Rnd_Sidewinder_AH1Z']],
+ [[0],['AIM-9L (6) | AGM-65 (2)'],['SidewinderLaucher_AH1Z','2Rnd_Sidewinder_AH1Z','2Rnd_Sidewinder_AH1Z','2Rnd_Sidewinder_AH1Z'],['MaverickLauncher','2Rnd_Maverick_A10']]
+ ]
+} else {
+ [
+ [[0],['GBU-12 (8)'],['BombLauncherA10','4Rnd_GBU12','4Rnd_GBU12']],
+ [[0],['GBU-12 (6) | AGM-65 (2)'],['BombLauncher','6Rnd_GBU12_AV8B'],['MaverickLauncher','2Rnd_Maverick_A10']],
+ [[0],['GBU-12 (6) | AIM-9L (2)'],['BombLauncher','6Rnd_GBU12_AV8B'],['SidewinderLaucher_AH1Z','2Rnd_Sidewinder_AH1Z']],
+ [[0],['GBU-12 (4) | AGM-65 (4)'],['BombLauncherA10','4Rnd_GBU12'],['MaverickLauncher','2Rnd_Maverick_A10','2Rnd_Maverick_A10']],
+ [[0],['GBU-12 (4) | AIM-9L (4)'],['BombLauncherA10','4Rnd_GBU12'],['SidewinderLaucher','4Rnd_Sidewinder_AV8B']],
+ [[0],['GBU-12 (4) | AIM-9L (2) | AGM-65 (2)'],['BombLauncherA10','4Rnd_GBU12'],['SidewinderLaucher_AH1Z','2Rnd_Sidewinder_AH1Z'],['MaverickLauncher','2Rnd_Maverick_A10']],
+ [[0],['GBU-12 (2) | AIM-9L (4) | AGM-65 (2)'],['ACE_BombLauncher','ACE_1Rnd_GBU12','ACE_1Rnd_GBU12'],['SidewinderLaucher','4Rnd_Sidewinder_AV8B'],['MaverickLauncher','2Rnd_Maverick_A10']],
+ [[0],['GBU-12 (2) | AIM-9L (2) | AGM-65 (4)'],['ACE_BombLauncher','ACE_1Rnd_GBU12','ACE_1Rnd_GBU12'],['SidewinderLaucher_AH1Z','2Rnd_Sidewinder_AH1Z'],['MaverickLauncher','2Rnd_Maverick_A10','2Rnd_Maverick_A10']],
+ [[0],['GBU-12 (2) | AIM-9L (6)'],['ACE_BombLauncher','ACE_1Rnd_GBU12','ACE_1Rnd_GBU12'],['SidewinderLaucher','4Rnd_Sidewinder_AV8B'],['SidewinderLaucher_AH1Z','2Rnd_Sidewinder_AH1Z']],
+ [[0],['GBU-12 (2) | AGM-65 (6)'],['ACE_BombLauncher','ACE_1Rnd_GBU12','ACE_1Rnd_GBU12'],['MaverickLauncher','2Rnd_Maverick_A10','2Rnd_Maverick_A10','2Rnd_Maverick_A10']],
+ [[0],['Mk82 (6) | AIM-9L (2)'],['Mk82BombLauncher_6','6Rnd_Mk82'],['SidewinderLaucher_AH1Z','2Rnd_Sidewinder_AH1Z']],
+ [[0],['Mk82 (6) | AGM-65 (2)'],['Mk82BombLauncher_6','6Rnd_Mk82'],['MaverickLauncher','2Rnd_Maverick_A10']],
+ [[0],['Mk82 (6) | GBU-12 (2)'],['Mk82BombLauncher_6','6Rnd_Mk82'],['ACE_BombLauncher','ACE_1Rnd_GBU12','ACE_1Rnd_GBU12']],
+ [[0],['AGM-65 (8)'],['MaverickLauncher','2Rnd_Maverick_A10','2Rnd_Maverick_A10','2Rnd_Maverick_A10','2Rnd_Maverick_A10']],
+ [[0],['AGM-65 (4) | AIM-9L (4)'],['MaverickLauncher','2Rnd_Maverick_A10','2Rnd_Maverick_A10'],['SidewinderLaucher','4Rnd_Sidewinder_AV8B']],
+ [[0],['AGM-65 (6) | AIM-9L (2)'],['MaverickLauncher','2Rnd_Maverick_A10','2Rnd_Maverick_A10','2Rnd_Maverick_A10'],['SidewinderLaucher_AH1Z','2Rnd_Sidewinder_AH1Z']],
+ [[0],['CBU-87 (4) | AIM-9L (2) | AGM-65 (2)'],['ACE_CBU87_Bomblauncher','ACE_4Rnd_CBU87'],['SidewinderLaucher_AH1Z','2Rnd_Sidewinder_AH1Z'],['MaverickLauncher','2Rnd_Maverick_A10']],
+ [[0],['CBU-87 (8)'],['ACE_CBU87_Bomblauncher','ACE_8Rnd_CBU87']],
+ [[0],['CBU-87 (6) | AGM-65 (2)'],['ACE_CBU87_Bomblauncher','ACE_6Rnd_CBU87'],['MaverickLauncher','2Rnd_Maverick_A10']],
+ [[0],['CBU-87 (6) | AIM-9L (2)'],['ACE_CBU87_Bomblauncher','ACE_6Rnd_CBU87'],['SidewinderLaucher_AH1Z','2Rnd_Sidewinder_AH1Z']],
+ [[0],['CBU-87 (4) | AGM-65 (4)'],['ACE_CBU87_Bomblauncher','ACE_4Rnd_CBU87'],['MaverickLauncher','2Rnd_Maverick_A10','2Rnd_Maverick_A10']],
+ [[0],['CBU-87 (4) | AIM-9L (4)'],['ACE_CBU87_Bomblauncher','ACE_4Rnd_CBU87'],['SidewinderLaucher','4Rnd_Sidewinder_AV8B']],
+ [[0],['CBU-87 (2) | AIM-9L (4) | AGM-65 (2)'],['ACE_CBU87_Bomblauncher','ACE_2Rnd_CBU87'],['SidewinderLaucher','4Rnd_Sidewinder_AV8B'],['MaverickLauncher','2Rnd_Maverick_A10']],
+ [[0],['CBU-87 (2) | AIM-9L (2) | AGM-65 (4)'],['ACE_CBU87_Bomblauncher','ACE_2Rnd_CBU87'],['SidewinderLaucher_AH1Z','2Rnd_Sidewinder_AH1Z'],['MaverickLauncher','2Rnd_Maverick_A10','2Rnd_Maverick_A10']],
+ [[0],['CBU-87 (2) | AIM-9L (6)'],['ACE_CBU87_Bomblauncher','ACE_2Rnd_CBU87'],['SidewinderLaucher','4Rnd_Sidewinder_AV8B'],['SidewinderLaucher_AH1Z','2Rnd_Sidewinder_AH1Z']],
+ [[0],['CBU-87 (2) | AGM-65 (6)'],['ACE_CBU87_Bomblauncher','ACE_2Rnd_CBU87'],['MaverickLauncher','2Rnd_Maverick_A10','2Rnd_Maverick_A10','2Rnd_Maverick_A10']],
+ [[0],['AIM-9L (8)'],['SidewinderLaucher_AH64','8Rnd_Sidewinder_AH64']],
+ [[0],['AIM-9L (6) | AGM-65 (2)'],['SidewinderLaucher','4Rnd_Sidewinder_AV8B'],['SidewinderLaucher_AH1Z','2Rnd_Sidewinder_AH1Z'],['MaverickLauncher','2Rnd_Maverick_A10']]
+ ]
+}
+];
+
+_easaVehi = _easaVehi + ['AH64D_EP1'];
+_easaDefault = _easaDefault + [[['HellfireLauncher','ACE_4Rnd_Hellfire'],['ACE_HellfireLauncher_Apache','ACE_4Rnd_Hellfire_L']]];
+_easaLoadout = _easaLoadout + [
+if (WF_A2_Arrowhead) then {
+ [
+ [[0],['AGM-114 (8)'],['HellfireLauncher','8Rnd_Hellfire']],
+ [[0],['AIM-9L (8)'],['SidewinderLaucher_AH1Z','2Rnd_Sidewinder_AH1Z','2Rnd_Sidewinder_AH1Z','2Rnd_Sidewinder_AH1Z','2Rnd_Sidewinder_AH1Z']]
+ ]
+} else {
+ [
+ [[0],['AGM-114K (8)'],['ACE_HellfireLauncher','8Rnd_Hellfire']],
+ [[0],['AGM-114L (8)'],['ACE_HellfireLauncher_Apache','ACE_8Rnd_Hellfire_L']],
+ [[0],['AGM-114K (4) | AGM-114L (4)'],['HellfireLauncher','ACE_4Rnd_Hellfire'],['ACE_HellfireLauncher_Apache','ACE_4Rnd_Hellfire_L']],
+ [[0],['AIM-9L (8)'],['SidewinderLaucher_AH64','8Rnd_Sidewinder_AH64']]
+ ]
+}
+];
+
+_easaVehi = _easaVehi + ['AH1Z'];
+_easaDefault = _easaDefault + [[['ACE_HellfireLauncher','8Rnd_Hellfire']]];
+_easaLoadout = _easaLoadout + [
+ [
+ [[0],['AGM-114K (8)'],['ACE_HellfireLauncher','8Rnd_Hellfire']],
+ [[0],['AGM-114L (8)'],['ACE_HellfireLauncher_Apache','ACE_8Rnd_Hellfire_L']],
+ [[0],['AGM-114K (4) | AGM-114L (4)'],['HellfireLauncher','ACE_4Rnd_Hellfire'],['ACE_HellfireLauncher_Apache','ACE_4Rnd_Hellfire_L']],
+ [[0],['AIM-9L (8)'],['SidewinderLaucher_AH64','8Rnd_Sidewinder_AH64']]
+ ]
+];
+
+_easaVehi = _easaVehi + ['ACE_AH1Z_AGM_AGM_W'];
+_easaDefault = _easaDefault + [[['ACE_HellfireLauncher','ACE_16Rnd_Hellfire']]];
+_easaLoadout = _easaLoadout + [
+ [
+ [[0],['AGM-114K (16)'],['ACE_HellfireLauncher','ACE_16Rnd_Hellfire']],
+ [[0],['AGM-114L (16)'],['ACE_HellfireLauncher_Apache','ACE_16Rnd_Hellfire_L']],
+ [[0],['AGM-114K (8) | AGM-114L (8)'],['HellfireLauncher','ACE_8Rnd_Hellfire'],['ACE_HellfireLauncher_Apache','ACE_8Rnd_Hellfire_L']],
+ [[0],['AIM-9L (8) | AGM-114K (8)'],['SidewinderLaucher_AH64','8Rnd_Sidewinder_AH64'],['ACE_HellfireLauncher','ACE_8Rnd_Hellfire']],
+ [[0],['AIM-9L (8) | AGM-114L (8)'],['SidewinderLaucher_AH64','8Rnd_Sidewinder_AH64'],['ACE_HellfireLauncher_Apache','ACE_8Rnd_Hellfire_L']],
+ [[0],['AIM-9L (16)'],['SidewinderLaucher_AH64','8Rnd_Sidewinder_AH64','8Rnd_Sidewinder_AH64']]
+ ]
+];
+
+['WFBE_EASA_Vehicles',_easaVehi,true] Call SetNamespace;
+['WFBE_EASA_Loadouts',_easaLoadout,true] Call SetNamespace;
+['WFBE_EASA_Default',_easaDefault,true] Call SetNamespace; \ No newline at end of file
diff --git a/Client/Module/EASA/EASA_RemoveLoadout.sqf b/Client/Module/EASA/EASA_RemoveLoadout.sqf
new file mode 100644
index 0000000..53b37da
--- /dev/null
+++ b/Client/Module/EASA/EASA_RemoveLoadout.sqf
@@ -0,0 +1,13 @@
+Private ['_i','_loadout','_vehicle'];
+_vehicle = _this select 0;
+_loadout = _this select 1;
+
+{
+ for [{_i = count(_x)-1},{_i >= 0},{_i = _i - 1}] do {
+ if (_i > 0) then {
+ _vehicle removeMagazine (_x select _i);
+ } else {
+ _vehicle removeWeapon (_x select _i);
+ };
+ };
+} forEach _loadout; \ No newline at end of file
diff --git a/Client/Module/ISIS/ISIS_Action.sqf b/Client/Module/ISIS/ISIS_Action.sqf
new file mode 100644
index 0000000..6d40ba5
--- /dev/null
+++ b/Client/Module/ISIS/ISIS_Action.sqf
@@ -0,0 +1 @@
+_this Spawn ISIS_Heal; \ No newline at end of file
diff --git a/Client/Module/ISIS/ISIS_Clientfx.sqf b/Client/Module/ISIS/ISIS_Clientfx.sqf
new file mode 100644
index 0000000..496747d
--- /dev/null
+++ b/Client/Module/ISIS/ISIS_Clientfx.sqf
@@ -0,0 +1,63 @@
+Private ["_camera","_nu","_ran","_stunned","_unit"];
+
+_unit = _this select 0;
+
+titleCut["","BLACK FADED",0];
+titleCut["","BLACK IN",2];
+
+"dynamicBlur" ppEffectEnable true;
+"dynamicBlur" ppEffectAdjust [1];
+"dynamicBlur" ppEffectCommit 0.1;
+
+"colorCorrections" ppEffectCommit 0.1;
+"colorCorrections" ppEffectEnable true;
+"colorCorrections" ppEffectAdjust [1, 1, 0, [0.1, 0.0, 0.0, 0.5], [0, 0.5, 0.5, 0.5], [0.199, 0.187, 0.114, 0.0]];
+"colorCorrections" ppEffectCommit 0.3;
+
+_camera = "camera" camCreate (getPos player);
+
+showCinemaBorder true;
+
+_camera camSetDir 0;
+_camera camSetFov 0.200;
+_camera cameraEffect["Internal","back"];
+_camera camSetTarget player;
+_camera camSetRelPos [2,2,3];
+_camera camCommit 0;
+
+_nu = [_camera] Spawn {
+ private ["_camera","_rx","_ry","_rz","_shout","_shoutTrsl","_ran"];
+ _camera = _this select 0;
+ _shout = ["ImHitE","ImBleedingE","SomebodyHelpMeE","GetMeACorpsmanNowE","CorpsmanE","TheyGotMeE","NeedHelpE","WoundedE"];
+ _shoutTrsl = ["I'm hit!","I'm bleeding!","Somebody help me!","Get me a corpsman now!","Corpsman!","They got me!","Need help!","Wounded!"];
+ while {true} do {
+ _rx = 1 + random 7;
+ _ry = 1 + random 7;
+ _rz = 1 + random 7;
+
+ _camera camSetRelPos [_rx,_ry,_rz];
+ _camera camCommit 10;
+ waitUntil{camCommitted _camera};
+ if (random 100 < 20) then {
+ _ran = round(random((count _shout)-1));
+ player kbTell [sideHQ, WFBE_V_HQTopicSide, "simple",["1","",(_shoutTrsl select _ran),[(_shout select _ran)]],true];
+ };
+ };
+};
+
+while {true} do {
+ sleep 1;
+ _stunned = _unit getVariable "stunned";
+ if (isNil '_stunned') exitWith {};
+ if (!alive _unit || !(_unit getVariable "stunned")) exitWith {};
+};
+
+terminate _nu;
+showCinemaBorder false;
+
+if (!playerDead) then {
+ "dynamicBlur" ppEffectEnable false;
+ "colorCorrections" ppEffectEnable false;
+ _camera cameraEffect["TERMINATE","BACK"];
+ camDestroy _camera;
+}; \ No newline at end of file
diff --git a/Client/Module/ISIS/ISIS_Heal.sqf b/Client/Module/ISIS/ISIS_Heal.sqf
new file mode 100644
index 0000000..79d447c
--- /dev/null
+++ b/Client/Module/ISIS/ISIS_Heal.sqf
@@ -0,0 +1,76 @@
+Private ['_anim','_anims','_canBePlaceAt','_dy','_dx','_fPos','_healer','_healTime','_injured','_near','_nearA','_nearB','_placeAtA','_posA','_posB','_posh','_posi','_relPosA','_relPosB','_success'];
+
+_injured = _this select 0;
+_healer = _this select 1;
+
+_posA = [0.75,0.15,0];
+_posB = [-0.75,0.1,0];
+
+_relPosA = _injured modelToWorld [((_injured worldToModel (getPos _injured)) select 0) +(0.75),((_injured worldToModel (getPos _injured)) select 1) + (0.15),0];
+_relPosB = _injured modelToWorld [((_injured worldToModel (getPos _injured)) select 0) -(0.75),((_injured worldToModel (getPos _injured)) select 1) + (0.1),0];
+
+_placeAtA = objNull;
+_near = ((getPos _injured) nearEntities ["Man",10]) - [_healer,_injured];
+_nearA = 0;
+_nearB = 0;
+if (count _near > 0) then {
+ {
+ _nearA = if (_x distance _relPosA < 1) then {1 + _nearA} else {0 + _nearA};
+ _nearB = if (_x distance _relPosB < 1) then {1 + _nearB} else {0 + _nearB};
+ } forEach _near;
+};
+
+if (_nearA > 0 && _nearB > 0) exitWith {};
+
+_placeAtA = objNull;
+if (_nearA == 0 && _nearB == 0) then {
+ _placeAtA = if (_healer distance _relPosA < _healer distance _relPosB) then {true} else {false};
+} else {
+ if (_nearA > 0 && _nearB == 0) then {_placeAtA = false} else {true};
+ if (_nearB > 0 && _nearA == 0) then {_placeAtA = true} else {false};
+};
+
+_fPos = if (_placeAtA) then {_posA} else {_posB};
+
+_healer playAction "medicStartRightSide";
+_healer attachTo [_injured, _fPos];
+sleep 0.01;
+
+_posh = _healer modelToWorld [0,0,0];
+_posi = _injured modelToWorld [0,+0.08,0];
+_dy = (_posh select 1) - (_posi select 1); _dx = (_posh select 0) - (_posi select 0);
+_healer setDir (270- (_dy atan2 _dx) - direction _injured);
+
+_healTime = time;
+_anims = [
+"ainvpknlmstpsnonwrfldnon_medic",
+"ainvpknlmstpsnonwrfldnon_medic0s",
+"ainvpknlmstpsnonwrfldnon_medic0",
+"ainvpknlmstpsnonwrfldnon_medic1",
+"ainvpknlmstpsnonwrfldnon_medic2",
+"ainvpknlmstpsnonwrfldnon_medic3",
+"ainvpknlmstpsnonwrfldnon_medic4",
+"ainvpknlmstpsnonwrfldnon_medic5",
+"ainvpknlmstpsnonwrfldr_medic0s",
+"ainvpknlmstpsnonwrfldr_medic0",
+"ainvpknlmstpsnonwrfldr_medic1",
+"ainvpknlmstpsnonwrfldr_medic2",
+"ainvpknlmstpsnonwrfldr_medic3",
+"ainvpknlmstpsnonwrfldr_medic4",
+"ainvpknlmstpsnonwrfldr_medic5",
+"amovppnemstpsraswrfldnon_amovpknlmstpsraswrfldnon",
+"ainvpknlmstpsnonwrfldnon_ainvpknlmstpsnonwrfldnon_medic"
+];
+
+sleep 2;
+
+while {true} do {
+ sleep 0.5;
+ _anim = animationState _healer;
+ if !(_anim in _anims) exitWith {diag_log Format["%1",animationState _healer]};
+ if (!alive _injured || !(_injured getVariable "stunned")) exitWith {_healer playActionNow "medicStop"};
+ if (time - _healTime > 40) exitWith {_healer playActionNow "medicStop";_injured setVariable ["stunned",false,true]};
+ if !(alive _healer) exitWith {};
+};
+
+detach _healer; \ No newline at end of file
diff --git a/Client/Module/ISIS/ISIS_Wound.sqf b/Client/Module/ISIS/ISIS_Wound.sqf
new file mode 100644
index 0000000..3638718
--- /dev/null
+++ b/Client/Module/ISIS/ISIS_Wound.sqf
@@ -0,0 +1,62 @@
+Private ["_damage","_damages","_isStuned","_lastWound","_type","_unit"];
+
+_unit = _this select 0;
+_type = _this select 1;
+_damages = _this select 2;
+
+if (vehicle _unit == _unit) then {
+ _isStuned = _unit getVariable "stunned";
+ _lastWound = _unit getVariable "lastWound";
+ if (isNil "_isStuned") then {_isStuned = false};
+ if (isNil "_lastWound") then {_lastWound = round(time)};
+ if (_isStuned) exitWith {
+ if (time - _lastWound > 3) then {_damages} else {false}
+ };
+
+ _unit setVariable ["lastWound",round time];
+ _damage = true;
+
+ switch (_type) do {
+ case "head_hit": {
+ if (_damages > 0.4 && _damages < 1) then {
+ if (random 100 > 40) then {_unit setVariable ['stunned',true,true];_isStuned = true};
+ };
+ if (_damages >= 1 && _damages < 5) then {
+ if (random 100 > 40) then {_unit setVariable ['stunned',true,true];_isStuned = true;_damage = false};
+ };
+ };
+ case "body": {
+ if (_damages > 0.65 && _damages < 1) then {
+ if (random 100 > 50) then {_unit setVariable ['stunned',true,true];_isStuned = true};
+ };
+ if (_damages >= 1 && _damages < 20) then {
+ if (random 100 > 40) then {_unit setVariable ['stunned',true,true];_isStuned = true;_damage = false};
+ };
+ };
+ case "hands": {
+ if (_damages > 0.76 && _damages < 1) then {
+ if (random 100 > 50) then {_unit setVariable ['stunned',true,true];_isStuned = true};
+ };
+ if (_damages >= 1 && _damages < 20) then {
+ if (random 100 > 50) then {_unit setVariable ['stunned',true,true];_isStuned = true;_damage = false};
+ };
+ };
+ case "legs": {
+ if (_damages > 0.68 && _damages < 1) then {
+ if (random 100 > 50) then {_unit setVariable ['stunned',true,true];_isStuned = true};
+ };
+ if (_damages >= 1 && _damages < 20) then {
+ if (random 100 > 50) then {_unit setVariable ['stunned',true,true];_isStuned = true;_damage = false};
+ };
+ };
+ case "": {
+ _damage = false;
+ };
+ };
+
+ if (_isStuned) then {[_unit] Spawn ISIS_Wounded};
+
+ if (_damage) then {_damages} else {false};
+} else {
+ _damages
+}; \ No newline at end of file
diff --git a/Client/Module/ISIS/ISIS_Wounded.sqf b/Client/Module/ISIS/ISIS_Wounded.sqf
new file mode 100644
index 0000000..f474f68
--- /dev/null
+++ b/Client/Module/ISIS/ISIS_Wounded.sqf
@@ -0,0 +1,51 @@
+Private ["_han","_hasAction","_start","_state","_status","_unit"];
+_unit = _this select 0;
+_start = time;
+_state = "";
+
+if (isPlayer _unit) then {
+ [_unit] Spawn ISIS_Effects;
+};
+
+_han = [nil, _unit, rPLAYACTION, "agonyStart"] call RE;
+sleep 3;
+_han = [nil, _unit, rPLAYACTION, "GestureNod"] call RE;
+
+//--- Add action to west or east units.
+if (side _unit == west || side _unit == east) then {
+ _hasAction = _unit getVariable 'hasAction';
+ if (isNil '_hasAction') then {_hasAction = false};
+ if !(_hasAction) then {
+ WFBE_ISIS_AddAction = [(side _unit),'CLTFNCISIS_ADDACTION',_unit];
+ publicVariable 'WFBE_ISIS_AddAction';
+ if (isHostedServer || local player) then {[(side _unit),'CLTFNCISIS_ADDACTION',_unit] Spawn HandlePVF};
+ };
+};
+
+while {true} do {
+ sleep 0.7;
+
+ _status = _unit getVariable "stunned";
+ if (isNil '_status' || !(alive _unit)) exitWith {_unit removeAllEventHandlers "handleDamage"};
+ if !(_status) exitWith {
+ _han = [nil, _unit, rPLAYACTION, "GestureNod"] call RE;
+ };
+
+ if ((time - _start > 15 || _state != animationState _unit)) then {
+ _start = time;
+ if (((animationState _unit) == "AinjPpneMstpSnonWnonDnon") || ((animationState _unit) == "AinjPpneMstpSnonWrflDnon")) then {
+ _han = [nil, _unit, rPLAYACTION, "GestureNod"] call RE;
+ _state = animationState _unit;
+ _han = [nil, _unit, rPLAYACTION, ("GestureSpasm"+ (str floor random 7))] call RE;
+ };
+ if (((animationState _unit) == "AinjPpneMstpSnonWrflDnon_injuredHealed") || ((animationState _unit) == "AinjPpneMstpSnonWnonDnon_injuredHealed")) then {
+ _han = [nil, _unit, rPLAYACTION, "GestureNod"] call RE;
+ _state = animationState _unit;
+ _han = [nil, _unit, rPLAYACTION, ("GestureSpasm"+ (str floor random 7))] call RE;
+ };
+ };
+
+ _unit setDamage (getDammage _unit + 0.002);
+};
+
+_han = [nil, _unit, rPLAYACTION, "agonyStop"] call RE;
diff --git a/Client/Module/Nuke/damage.sqf b/Client/Module/Nuke/damage.sqf
new file mode 100644
index 0000000..0b72bce
--- /dev/null
+++ b/Client/Module/Nuke/damage.sqf
@@ -0,0 +1,30 @@
+//--- Nuke destruction.
+Private ["_array","_blackListed","_bo","_destroy","_target","_z"];
+
+private ["_destroy","_bo","_target","_array","_blackListed"];
+_target = _this select 0;
+_array = _target nearObjects ["All", 700];
+_blackListed = WFDEPOT + WFCAMP + ["land_nav_pier_c","land_nav_pier_c2","land_nav_pier_c2_end","land_nav_pier_c_270","land_nav_pier_c_90","land_nav_pier_c_big","land_nav_pier_C_L","land_nav_pier_C_L10","land_nav_pier_C_L30","land_nav_pier_C_R","land_nav_pier_C_R10","land_nav_pier_C_R30","land_nav_pier_c_t15","land_nav_pier_c_t20","land_nav_pier_F_17","land_nav_pier_F_23","land_nav_pier_m","land_nav_pier_m_1","land_nav_pier_m_end","land_nav_pier_M_fuel","land_nav_pier_pneu","land_nav_pier_uvaz"];
+_destroy = _array;
+{if ((typeOf _x) in _blackListed) then {_destroy = _destroy - [_x]}} forEach _array;
+{_bo = "BO_GBU12_LGB" createVehicle [random 1000,random 1000,500];_bo setPos [getPos _x select 0, getPos _x select 1, getPos _x select 2]} forEach _destroy;
+
+[_target] Spawn {
+ Private ["_array","_dammageable","_dammages","_range","_target"];
+ _target = _this select 0;
+ _dammageable = ["Man","Car","Motorcycle","Tank","Ship","Air","StaticWeapon"];
+ _range = 800;
+ _dammages = 1;
+ for [{_z = 0},{_z < 4},{_z = _z + 1}] do {
+ _array = _target nearEntities [_dammageable, _range];
+ {
+ _x setDammage (getDammage _x + _dammages);
+ {_x setDammage (getDammage _x + _dammages)} forEach crew _x;
+ } forEach _array;
+ _range = _range + 300;
+ _dammages = _dammages - 0.2;
+ sleep 3;
+ };
+ //--- Radiations.
+ [_target] Spawn NukeRadiation;
+}; \ No newline at end of file
diff --git a/Client/Module/Nuke/nuke.sqf b/Client/Module/Nuke/nuke.sqf
new file mode 100644
index 0000000..425272c
--- /dev/null
+++ b/Client/Module/Nuke/nuke.sqf
@@ -0,0 +1,146 @@
+//--- Nuke blast.
+Private ['_Cone','_light','_smoke','_smoke2','_target','_top','_top2','_top3','_top4','_top5','_Wave','_xHandle'];
+
+_target = _this select 0;
+if (player distance _target < 4000) then {
+ "dynamicBlur" ppEffectEnable true;
+ "dynamicBlur" ppEffectAdjust [1];
+ "dynamicBlur" ppEffectCommit 1;
+};
+
+_Cone = "#particlesource" createVehicleLocal getPos _target;
+_Cone setParticleParams [["\Ca\Data\ParticleEffects\Universal\Universal", 16, 7, 48], "", "Billboard", 1, 10, [0, 0, 0],
+ [0, 0, 0], 0, 1.275, 1, 0, [40,80], [[0.25, 0.25, 0.25, 0], [0.25, 0.25, 0.25, 0.5],
+ [0.25, 0.25, 0.25, 0.5], [0.25, 0.25, 0.25, 0.05], [0.25, 0.25, 0.25, 0]], [0.25], 0.1, 1, "", "", _target];
+_Cone setParticleRandom [2, [1, 1, 30], [1, 1, 30], 0, 0, [0, 0, 0, 0.1], 0, 0];
+_Cone setParticleCircle [10, [-10, -10, 20]];
+_Cone setDropInterval 0.005;
+
+_top = "#particlesource" createVehicleLocal getPos _target;
+_top setParticleParams [["\Ca\Data\ParticleEffects\Universal\Universal", 16, 3, 48, 0], "", "Billboard", 1, 20, [0, 0, 0],
+ [0, 0, 80], 0, 1.7, 1, 0, [180,150,180], [[1, 1, 1, -10],[1, 1, 1, -7],[1, 1, 1, -4],[1, 1, 1, -0.5],[1, 1, 1, 0]], [0.05], 1, 1, "", "", _target];
+_top setParticleRandom [0, [75, 75, 15], [17, 17, 10], 0, 0, [0, 0, 0, 0], 0, 0, 360];
+_top setDropInterval 0.001;
+
+_top2 = "#particlesource" createVehicleLocal getPos _target;
+_top2 setParticleParams [["\Ca\Data\ParticleEffects\Universal\Universal", 16, 3, 112, 0], "", "Billboard", 1, 20, [0, 0, 0],
+ [0, 0, 20], 0, 1.7, 1, 0, [80,80,100], [[1, 1, 1, 0.5],[1, 1, 1, 0]], [0.07], 1, 1, "", "", _target];
+_top2 setParticleRandom [0, [75, 75, 15], [17, 17, 10], 0, 0, [0, 0, 0, 0], 0, 0, 360];
+_top2 setDropInterval 0.002;
+
+_smoke = "#particlesource" createVehicleLocal getPos _target;
+_smoke setParticleParams [["\Ca\Data\ParticleEffects\Universal\Universal", 16, 7, 48, 1], "", "Billboard", 1, 25, [0, 0, 0],
+ [0, 0, 80], 0, 1.7, 1, 0, [40,50,60],
+ [[1, 1, 1, 0.2],[1, 1, 1, 0.3],[1, 1, 1, 0.3],[1, 1, 1, 0.3],[1, 1, 1, 0.3],[1, 1, 1, 0.3],[1, 1, 1, 0.3],[1, 1, 1, 0]]
+ , [0.5, 0.1], 1, 1, "", "", _target];
+_smoke setParticleRandom [0, [10, 10, 15], [15, 15, 7], 0, 0, [0, 0, 0, 0], 0, 0, 360];
+_smoke setDropInterval 0.002;
+
+_Wave = "#particlesource" createVehicleLocal getPos _target;
+_Wave setParticleParams [["\Ca\Data\ParticleEffects\Universal\Universal", 16, 7, 48], "", "Billboard", 1, 20, [0, 0, 0],
+ [0, 0, 0], 0, 1.5, 1, 0, [50, 100], [[0.1, 0.1, 0.1, 0.5],
+ [0.5, 0.5, 0.5, 0.5], [1, 1, 1, 0.3], [1, 1, 1, 0]], [1,0.5], 0.1, 1, "", "", _target];
+_Wave setParticleRandom [2, [20, 20, 20], [5, 5, 0], 0, 0, [0, 0, 0, 0.1], 0, 0];
+_Wave setParticleCircle [50, [-80, -80, 2.5]];
+_Wave setDropInterval 0.0002;
+
+_light = "#lightpoint" createVehicleLocal [((getPos _target select 0)),(getPos _target select 1),((getPos _target select 2)+500)];
+_light setLightAmbient[1500, 1200, 1000];
+_light setLightColor[1500, 1200, 1000];
+_light setLightBrightness 100000.0;
+
+if (player distance _target < 4000) then {
+ "colorCorrections" ppEffectEnable true;
+ "colorCorrections" ppEffectAdjust [0.8, 15, 0, [0.5, 0.5, 0.5, 0], [0.0, 0.0, 0.6, 2],[0.3, 0.3, 0.3, 0.1]];"colorCorrections" ppEffectCommit 0.4;
+
+ "dynamicBlur" ppEffectAdjust [0.5];
+ "dynamicBlur" ppEffectCommit 3;
+
+ sleep 0.1;
+
+ _null = [] Spawn
+ {
+ Sleep 4;
+ "colorCorrections" ppEffectAdjust [1.0, 0.5, 0, [0.5, 0.5, 0.5, 0], [1.0, 1.0, 0.8, 0.4],[0.3, 0.3, 0.3, 0.1]];
+ "colorCorrections" ppEffectCommit 7;
+ };
+
+ "dynamicBlur" ppEffectAdjust [2];
+ "dynamicBlur" ppEffectCommit 1;
+
+ "dynamicBlur" ppEffectAdjust [0.5];
+ "dynamicBlur" ppEffectCommit 4;
+};
+_light setLightBrightness 100000.0;
+
+sleep 3.5;
+
+_Wave setDropInterval 0.001;
+deleteVehicle _top;
+deleteVehicle _top2;
+sleep 7;
+_top3 = "#particlesource" createVehicleLocal getPos _target;
+_top3 setParticleParams [["\Ca\Data\ParticleEffects\Universal\Universal", 16, 3, 48, 0], "", "Billboard", 1, 20, [0, 0, 500],
+ [0, 0, 65], 0, 1.7, 1, 0, [200,200,200], [[1, 1, 1, -10],[1, 1, 1, -7],[1, 1, 1, -4],[1, 1, 1, -0.5],[1, 1, 1, 0]], [0.05], 1, 1, "", "", _target];
+_top3 setParticleRandom [0, [75, 75, 15], [17, 17, 10], 0, 0, [0, 0, 0, 0], 0, 0, 360];
+_top3 setDropInterval 0.001;
+
+sleep 0.6;
+deleteVehicle _top3;
+
+sleep 3;
+
+if (player distance _target < 4000) then {
+ "colorCorrections" ppEffectAdjust [1, 1, 0, [0.5, 0.5, 0.5, 0], [1.0, 1.0, 0.8, 0.4],[0.3, 0.3, 0.3, 0.1]];"colorCorrections" ppEffectCommit 1; "colorCorrections" ppEffectEnable TRUE;
+ "dynamicBlur" ppEffectAdjust [0];
+ "dynamicBlur" ppEffectCommit 1;
+};
+
+_top4 = "#particlesource" createVehicleLocal getPos _target;
+_top4 setParticleParams [["\Ca\Data\ParticleEffects\Universal\Universal", 16, 3, 48, 0], "", "Billboard", 1, 20, [0, 0, 800],
+ [0, 0, 55], 0, 1.7, 1, 0, [200,200,200], [[1, 1, 1, -10],[1, 1, 1, -7],[1, 1, 1, -4],[1, 1, 1, -0.5],[1, 1, 1, 0]], [0.05], 1, 1, "", "", _target];
+_top4 setParticleRandom [0, [75, 75, 15], [17, 17, 10], 0, 0, [0, 0, 0, 0], 0, 0, 360];
+_top4 setDropInterval 0.001;
+
+sleep 0.6;
+deleteVehicle _light;
+deleteVehicle _top4;
+sleep 4;
+
+_top5 = "#particlesource" createVehicleLocal getPos _target;
+_top5 setParticleParams [["\Ca\Data\ParticleEffects\Universal\Universal", 16, 3, 48, 0], "", "Billboard", 1, 20, [0, 0, 1000],
+ [0, 0, 20], 0, 1.7, 1, 0, [250,280,250], [[1, 1, 1, -10],[1, 1, 1, -7],[1, 1, 1, -4],[1, 1, 1, -0.5],[1, 1, 1, 0]], [0.05], 1, 1, "", "", _target];
+_top5 setParticleRandom [0, [75, 75, 15], [17, 17, 10], 0, 0, [0, 0, 0, 0], 0, 0, 360];
+_top5 setDropInterval 0.001;
+
+_Cone setDropInterval 0.01;
+_Wave setDropInterval 0.001;
+
+_smoke setParticleParams [["\Ca\Data\ParticleEffects\Universal\Universal", 16, 7, 48, 1], "", "Billboard", 1, 25, [0, 0, 0],
+ [0, 0, 80], 0, 1.7, 1, 0, [150,150,150],
+ [[1, 1, 1, 0.2],[1, 1, 1, 0.3],[1, 1, 1, 0.3],[1, 1, 1, 0.3],[1, 1, 1, 0.3],[1, 1, 1, 0.3],[1, 1, 1, 0.3],[1, 1, 1, 0]]
+ , [0.5, 0.1], 1, 1, "", "", _target];
+_smoke setDropInterval 0.01;
+
+_smoke2 = "#particlesource" createVehicleLocal getPos _target;
+_smoke2 setParticleParams [["\Ca\Data\ParticleEffects\Universal\Universal", 16, 7, 48, 1], "", "Billboard", 1, 25, [0, 0, 900],
+ [0, 0, 25], 0, 1.7, 1, 0, [160,180,170],
+ [[1, 1, 1, 0.2],[1, 1, 1, 0.3],[1, 1, 1, 0.3],[1, 1, 1, 0.3],[1, 1, 1, 0.3],[1, 1, 1, 0.3],[1, 1, 1, 0.3],[1, 1, 1, 0]]
+ , [0.5, 0.1], 1, 1, "", "", _target];
+_smoke2 setParticleRandom [0, [10, 10, 15], [15, 15, 7], 0, 0, [0, 0, 0, 0], 0, 0, 360];
+_smoke2 setDropInterval 0.01;
+
+sleep 5;
+deleteVehicle _top5;
+_Cone setDropInterval 0.02;
+_Wave setDropInterval 0.01;
+
+sleep 5;
+deleteVehicle _smoke2;
+sleep 10;
+deleteVehicle _Wave;
+deleteVehicle _cone;
+deleteVehicle _smoke;
+sleep 20;
+if (player distance _target < 4000) then {"colorCorrections" ppEffectEnable false};
+[currentFX] Spawn FX; \ No newline at end of file
diff --git a/Client/Module/Nuke/nukeincoming.sqf b/Client/Module/Nuke/nukeincoming.sqf
new file mode 100644
index 0000000..e2a92f9
--- /dev/null
+++ b/Client/Module/Nuke/nukeincoming.sqf
@@ -0,0 +1,59 @@
+//--- Nuke launching.
+Private ['_cruise','_dropPosition','_dropPosX','_dropPosY','_dropPosZ','_misFlare','_nukeMarker','_path','_pathS','_planespawnpos','_target','_type'];
+_target = _this select 0;
+_nukeMarker = _this select 1;
+
+WFBE_LocalizeMessage = [nil,'CLTFNCLOCALIZEMESSAGE',['TacticalLaunch']];
+publicVariable 'WFBE_LocalizeMessage';
+if (isHostedServer || local player) then {[nil,'CLTFNCLOCALIZEMESSAGE',['TacticalLaunch']] Spawn HandlePVF};
+
+sleep 300;
+
+_path = "\ca\air2\cruisemissile\"; //";
+_pathS = _path + "data\scripts\"; //";
+
+_dropPosition = getpos _target;
+_type = if (WF_A2_Vanilla || WF_A2_CombinedOps) then {'Chukar'} else {'Chukar_EP1'};
+_cruise = createVehicle [_type,_dropPosition,[], 0, "FLY"];
+_cruise setVectorDir [ 0.1,- 1,+ 0.5];
+_cruise setPos [(getPos _cruise select 0),(getPos _cruise select 1),570];
+_cruise setVelocity [0,2,0];
+_cruise flyInHeight 570;
+_cruise setSpeedMode "FULL";
+
+WFBE_RequestSpecial = ['SRVFNCREQUESTSPECIAL',["ICBM",sideJoined,_target,_cruise,clientTeam]];
+publicVariable 'WFBE_RequestSpecial';
+if (isHostedServer) then {['SRVFNCREQUESTSPECIAL',["ICBM",sideJoined,_target,_cruise,clientTeam]] Spawn HandleSPVF};
+
+sleep 1.5;
+
+WFBE_DisplayICBM = [sideJoined,'CLTFNCDISPLAYICBM',[_target,_cruise]];
+publicVariable 'WFBE_DisplayICBM';
+if (isHostedServer || local player) then {[sideJoined,'CLTFNCDISPLAYICBM',[_target,_cruise]] Spawn HandlePVF};
+
+_misFlare = objNull;
+if (WF_A2_Vanilla || WF_A2_CombinedOps) then {
+ _dropPosX = _dropPosition select 0;
+ _dropPosY = _dropPosition select 1;
+ _dropPosZ = _dropPosition select 2;
+
+ _planespawnpos = [_dropPosX , _dropPosY , _dropPosZ + 600];
+
+ _misFlare = createVehicle ["cruiseMissileFlare1",_planespawnpos,[], 0, "NONE"];
+ _misFlare inflame true;
+ _cruise setVariable ["cruisemissile_level", false];
+ [_cruise, _misFlare] execVM (_pathS + "cruisemissileflare.sqf");
+ _cruise setObjectTexture [0, _path + "data\exhaust_flame_ca"];
+ [_cruise] execVM (_pathS + "exhaust1.sqf");
+};
+
+sleep 7;
+
+waitUntil {!alive _cruise};
+
+sleep 5;
+if (WF_A2_Vanilla || WF_A2_CombinedOps) then {deleteVehicle _misFlare};
+deleteVehicle _cruise;
+
+sleep 50;
+deleteMarkerLocal _nukeMarker;
diff --git a/Client/Module/Nuke/radzone.sqf b/Client/Module/Nuke/radzone.sqf
new file mode 100644
index 0000000..084b66f
--- /dev/null
+++ b/Client/Module/Nuke/radzone.sqf
@@ -0,0 +1,20 @@
+//--- Radiation
+Private ['_target','_z'];
+
+
+private ["_target"];
+_target = _this select 0;
+[_target] Spawn {
+ Private ["_array","_dammageable","_target"];
+ _target = _this select 0;
+ _dammageable = ["Man","Car","Motorcycle","Tank","Ship","Air","StaticWeapon"];
+ for [{_z = 0},{_z < 300},{_z = _z + 1}] do {
+ _array = _target nearEntities [_dammageable, 1000];
+ {
+ _x setDammage (getDammage _x + 0.03);
+ {_x setDammage (getDammage _x + 0.05)} forEach crew _x;
+ } forEach _array;
+ sleep (3 + random 3);
+ };
+ deleteVehicle _target;
+}; \ No newline at end of file
diff --git a/Client/Module/Skill/Actions/Officer_Undeploy_MASH.sqf b/Client/Module/Skill/Actions/Officer_Undeploy_MASH.sqf
new file mode 100644
index 0000000..99b92e8
--- /dev/null
+++ b/Client/Module/Skill/Actions/Officer_Undeploy_MASH.sqf
@@ -0,0 +1,22 @@
+/*
+ Script: Officer Skill MASH Undeploy
+ Description: Undeploy the MASH
+*/
+
+Private ["_MASH"];
+
+_MASH = _this select 0;
+
+_skip = false;
+for '_z' from 0 to 3 do {
+ sleep 0.5;
+ player playMove "AinvPknlMstpSlayWrflDnon_medic";
+ sleep 0.5;
+ waitUntil {animationState player == "ainvpknlmstpslaywrfldnon_amovpknlmstpsraswrfldnon" || !alive player || vehicle player != player};
+ if (!alive player || vehicle player != player) exitWith {_skip = true};
+};
+
+if (!_skip) then {
+ deleteVehicle _MASH;
+ WFBE_SK_V_LastUse_MASH = -2000;
+}; \ No newline at end of file
diff --git a/Client/Module/Skill/Skill_Apply.sqf b/Client/Module/Skill/Skill_Apply.sqf
new file mode 100644
index 0000000..ddd8f20
--- /dev/null
+++ b/Client/Module/Skill/Skill_Apply.sqf
@@ -0,0 +1,66 @@
+/*
+ Script: Skill Application System by Benny.
+ Description: Skill Application.
+*/
+
+Private ["_unit"];
+
+_unit = _this;
+
+switch (WFBE_SK_V_Type) do {
+ case 'Engineer': {
+ /* Repair Ability */
+ _unit addAction [
+ ("<t color='#f8d664'>" + localize 'STR_WF_ACTION_Repair'+ "</t>"),
+ (WFBE_SK_V_Root + 'Engineer' + '.sqf'),
+ [],
+ 80,
+ false,
+ true,
+ "",
+ "time - WFBE_SK_V_LastUse_Repair > WFBE_SK_V_Reload_Repair"
+ ];
+ };
+ case 'Officer': {
+ /* MASH Ability require that the MASH parameter is enabled */
+ if (paramRespawnMASH) then {
+ /* MASH Ability */
+ _unit addAction [
+ ("<t color='#f8d664'>" + localize 'STR_WF_ACTION_DeployMASH'+ "</t>"),
+ (WFBE_SK_V_Root + 'Officer' + '.sqf'),
+ [],
+ 80,
+ false,
+ true,
+ "",
+ "time - WFBE_SK_V_LastUse_MASH > WFBE_SK_V_Reload_MASH"
+ ];
+ };
+ };
+ case 'SpecOps': {
+ /* Lockpicking Ability */
+ _unit addAction [
+ ("<t color='#f8d664'>" + localize 'STR_WF_ACTION_Lockpick'+ "</t>"),
+ (WFBE_SK_V_Root + 'SpecOps' + '.sqf'),
+ [],
+ 80,
+ false,
+ true,
+ "",
+ "time - WFBE_SK_V_LastUse_Lockpick > WFBE_SK_V_Reload_Lockpick"
+ ];
+ };
+ case 'Spotter': {
+ /* Spotting Ability */
+ _unit addAction [
+ ("<t color='#f8d664'>" + localize 'STR_WF_ACTION_Spot'+ "</t>"),
+ (WFBE_SK_V_Root + 'Sniper' + '.sqf'),
+ [],
+ 80,
+ false,
+ true,
+ "",
+ "time - WFBE_SK_V_LastUse_Spot > WFBE_SK_V_Reload_Spot"
+ ];
+ };
+}; \ No newline at end of file
diff --git a/Client/Module/Skill/Skill_Engineer.sqf b/Client/Module/Skill/Skill_Engineer.sqf
new file mode 100644
index 0000000..ec65cde
--- /dev/null
+++ b/Client/Module/Skill/Skill_Engineer.sqf
@@ -0,0 +1,32 @@
+/*
+ Script: Engineer Skill System by Benny.
+ Description: Add special skills to the defined engineer.
+*/
+Private ['_dammages','_skip','_sorted','_vehicle','_vehicles','_z'];
+
+
+private ["_x","_skip","_dammages","_vehicles","_sorted","_vehicle"];
+_vehicles = player nearEntities [["Car","Motorcycle","Tank","Ship","Air","StaticWeapon"],5];
+if (count _vehicles < 1) exitWith {};
+
+_sorted = [player,_vehicles] Call SortByDistance;
+_vehicle = _sorted select 0;
+
+_dammages = getDammage _vehicle;
+if (_dammages <= 0) exitWith {};
+WFBE_SK_V_LastUse_Repair = time;
+
+_skip = false;
+for [{_z = 0},{_z < 5},{_z = _z + 1}] do {
+ sleep 0.5;
+ player playMove "AinvPknlMstpSlayWrflDnon_medic";
+ sleep 0.5;
+ waitUntil {animationState player == "ainvpknlmstpslaywrfldnon_amovpknlmstpsraswrfldnon" || !alive player || vehicle player != player || !alive _vehicle || _vehicle distance player > 5};
+ if (!alive player || vehicle player != player || !alive _vehicle || _vehicle distance player > 5) exitWith {_skip = true};
+};
+
+if (!_skip) then {
+ _dammages = _dammages - 0.15;
+ if (_dammages < 0) then {_dammages = 0};
+ _vehicle setDammage _dammages;
+}; \ No newline at end of file
diff --git a/Client/Module/Skill/Skill_Init.sqf b/Client/Module/Skill/Skill_Init.sqf
new file mode 100644
index 0000000..6318bfe
--- /dev/null
+++ b/Client/Module/Skill/Skill_Init.sqf
@@ -0,0 +1,41 @@
+/*
+ Script: Skill System by Benny.
+ Description: Skill Initialization.
+*/
+
+/* Skills Root */
+WFBE_SK_V_Root = 'Client\Module\Skill\Skill_';
+
+/* Functions */
+WFBE_SK_FNC_Apply = Compile preprocessFile "Client\Module\Skill\Skill_Apply.sqf";
+
+/* Define which classname belong to which skill group */
+WFBE_SK_V_Engineers = ['USMC_SoldierS_Engineer','MVD_Soldier_TL','US_Soldier_Engineer_EP1','TK_Soldier_Engineer_EP1','CDF_Soldier_Engineer','Ins_Soldier_Sapper'];
+WFBE_SK_V_Officers = ['FR_Commander','RUS_Commander','US_Soldier_SL_EP1','TK_Soldier_SL_EP1','CDF_Soldier_Officer','Ins_Commander'];
+WFBE_SK_V_Soldiers = ['FR_R','RUS_Soldier1','US_Delta_Force_EP1','TK_Special_Forces_EP1','CDF_Soldier','Ins_Soldier_1'];
+WFBE_SK_V_SpecsOps = ['FR_TL','RUS_Soldier_TL','US_Delta_Force_TL_EP1','TK_Special_Forces_TL_EP1','CDF_Soldier_TL','Ins_Soldier_2'];
+WFBE_SK_V_Spotters = ['USMC_SoldierS_Sniper','RU_Soldier_Sniper','US_Soldier_Sniper_EP1','TK_Soldier_Sniper_EP1','CDF_Soldier_Sniper','Ins_Soldier_Sniper'];
+
+/* Skills Variables */
+WFBE_SK_V_LastUse_Repair = -1200;
+WFBE_SK_V_LastUse_MASH = -1200;
+WFBE_SK_V_LastUse_Lockpick = -1200;
+WFBE_SK_V_LastUse_Spot = -1200;
+
+/* Skills Timeout */
+WFBE_SK_V_Reload_Repair = 65;
+WFBE_SK_V_Reload_MASH = 600;
+WFBE_SK_V_Reload_Lockpick = 25;
+WFBE_SK_V_Reload_Spot = 8;
+
+/* Find the player type */
+WFBE_SK_V_Type = "";
+if (playerType in WFBE_SK_V_Engineers) then {WFBE_SK_V_Type = "Engineer"};
+if (playerType in WFBE_SK_V_Officers) then {WFBE_SK_V_Type = "Officer"};
+if (playerType in WFBE_SK_V_Soldiers) then {WFBE_SK_V_Type = "Soldier"};
+if (playerType in WFBE_SK_V_SpecsOps) then {WFBE_SK_V_Type = "SpecOps"};
+if (playerType in WFBE_SK_V_Spotters) then {WFBE_SK_V_Type = "Spotter"};
+
+/* Special one time init */
+/* The soldier can hire more units than the others leader */
+if (WFBE_SK_V_Type == 'Soldier') then {['WFBE_MAXGROUPSIZE',('WFBE_MAXGROUPSIZE' Call GetNameSpace) + ('WFBE_MAXGZBONUSSKILL' Call GetNamespace),true] Call SetNamespace}; \ No newline at end of file
diff --git a/Client/Module/Skill/Skill_Officer.sqf b/Client/Module/Skill/Skill_Officer.sqf
new file mode 100644
index 0000000..3048459
--- /dev/null
+++ b/Client/Module/Skill/Skill_Officer.sqf
@@ -0,0 +1,32 @@
+/*
+ Script: Officer Skill System by Benny.
+ Description: Add special skills to the defined officer.
+*/
+Private ['_array','_exist','_skip','_tent','_toWorld','_type','_z'];
+
+
+private ["_x","_skip","_array","_toWorld","_tent","_type","_exist"];
+_type = Format ["WFBE_%1FARP",sideJoinedText] Call GetNamespace;
+_exist = WF_Logic getVariable Format ["%1MASH",sideJoinedText];
+if !(isNull _exist) then {deleteVehicle _exist};
+
+WFBE_SK_V_LastUse_MASH = time;
+
+_skip = false;
+for [{_z = 0},{_z < 7},{_z = _z + 1}] do {
+ sleep 0.5;
+ player playMove "AinvPknlMstpSlayWrflDnon_medic";
+ sleep 0.5;
+ waitUntil {animationState player == "ainvpknlmstpslaywrfldnon_amovpknlmstpsraswrfldnon" || !alive player || vehicle player != player};
+ if (!alive player || vehicle player != player) exitWith {_skip = true};
+};
+
+if (!_skip) then {
+ _array = [((player worldToModel (getPos player)) select 0),((player worldToModel (getPos player)) select 1) + 10];
+ _toWorld = player modelToWorld _array;
+ _tent = _type createVehicle _toWorld;
+ WF_Logic setVariable [Format["%1MASH",sideJoinedText],_tent,true];
+ _tent addAction ["<t color='#f8d664'>" + localize 'STR_WF_ACTION_UndeployMASH'+ "</t>", "Client\Module\Skill\Actions\Officer_Undeploy_MASH.sqf", [], 75, false, true, "", "alive _target && time - WFBE_SK_V_LastUse_MASH > 240"];
+} else {
+ WF_Logic setVariable [Format["%1MASH",sideJoinedText],objNull,true];
+}; \ No newline at end of file
diff --git a/Client/Module/Skill/Skill_Sniper.sqf b/Client/Module/Skill/Skill_Sniper.sqf
new file mode 100644
index 0000000..19bbfb1
--- /dev/null
+++ b/Client/Module/Skill/Skill_Sniper.sqf
@@ -0,0 +1,31 @@
+/*
+ Script: Sniper Skill System by Benny.
+ Description: Add special skills to the defined sniper.
+*/
+Private ['_binoculars','_markerName','_markertime','_screenPos'];
+
+
+private ["_binoculars","_screenPos","_markerName","_markertime"];
+_binoculars = 'WFBE_BINOCULARS' Call GetNamespace;
+if !((currentWeapon player) in _binoculars) exitWith {hint (localize "STR_WF_INFO_Spot_Info")};
+
+if (isNil "markerID") then {markerID = 1};
+_screenPos = screenToWorld [0.5,0.5];
+
+_markerName = Format ["Spot%1",markerID];
+createMarkerLocal [_markerName,_screenPos];
+_markertime = [daytime] call bis_fnc_timetostring;
+_markerName setMarkerText Format ['SPOTTED: %1',_markertime];
+_markerName setMarkerTypeLocal "mil_destroy";
+_markerName setMarkerColorLocal "ColorRed";
+_markerName setMarkerSizeLocal [0.5,0.5];
+markerID = markerID + 1;
+
+WFBE_SK_V_LastUse_Spot = time;
+
+[_markerName] Spawn {
+ Private ["_marker"];
+ _marker = _this select 0;
+ sleep 180;
+ deleteMarkerLocal _marker;
+}; \ No newline at end of file
diff --git a/Client/Module/Skill/Skill_SpecOps.sqf b/Client/Module/Skill/Skill_SpecOps.sqf
new file mode 100644
index 0000000..4456815
--- /dev/null
+++ b/Client/Module/Skill/Skill_SpecOps.sqf
@@ -0,0 +1,52 @@
+/*
+ Script: Spec Ops Skill System by Benny.
+ Description: Add special skills to the defined spec ops unit.
+*/
+Private ['_min','_ran','_skip','_sorted','_vehicle','_vehicles','_z'];
+
+
+private ["_x","_skip","_min","_ran","_vehicles","_sorted","_vehicle"];
+_vehicles = player nearEntities [["Car","Motorcycle","Tank","Ship","Air"],5];
+if (count _vehicles < 1) exitWith {};
+
+if (isNil "WFBE_SK_V_LockpickChance") then {WFBE_SK_V_LockpickChance = 0};
+
+_sorted = [player,_vehicles] Call SortByDistance;
+_vehicle = _sorted select 0;
+
+if (!locked _vehicle) exitWith {};
+
+WFBE_SK_V_LastUse_Lockpick = time;
+
+_skip = false;
+for [{_z = 0},{_z < 2},{_z = _z + 1}] do {
+ sleep 0.5;
+ player playMove "AinvPknlMstpSlayWrflDnon_medic";
+ sleep 0.5;
+ waitUntil {animationState player == "ainvpknlmstpslaywrfldnon_amovpknlmstpsraswrfldnon" || !alive player || vehicle player != player || !alive _vehicle || _vehicle distance player > 5};
+ if (!alive player || vehicle player != player || !alive _vehicle || _vehicle distance player > 5) exitWith {_skip = true};
+};
+
+if (!locked _vehicle) exitWith {};
+
+if (!_skip) then {
+ _min = 30;
+ switch (typeOf _vehicle) do {
+ case "Motorcycle": {_min = 40};
+ case "Car": {_min = 30};
+ case "Tank": {_min = 20};
+ case "Ship": {_min = 25};
+ case "Air": {_min = 15};
+ };
+ _ran = ((random 100)-WFBE_SK_V_LockpickChance);
+ if (_ran <= _min) then {
+ //--- Unlocked, gain experience.
+ if (WFBE_SK_V_LockpickChance > -51) then {WFBE_SK_V_LockpickChance = WFBE_SK_V_LockpickChance - 1};
+ WFBE_RequestVehicleLock = ['SRVFNCREQUESTVEHICLELOCK',[_vehicle,false]];
+ publicVariable 'WFBE_RequestVehicleLock';
+ if (isHostedServer) then {['SRVFNCREQUESTVEHICLELOCK',[_vehicle,false]] Spawn HandleSPVF};
+ hint (localize "STR_WF_INFO_Lockpick_Succeed");
+ } else {
+ hint (localize "STR_WF_INFO_Lockpick_Failed");
+ };
+};
diff --git a/Client/Module/UAV/uav.sqf b/Client/Module/UAV/uav.sqf
new file mode 100644
index 0000000..840ffbe
--- /dev/null
+++ b/Client/Module/UAV/uav.sqf
@@ -0,0 +1,136 @@
+Private ['_add','_buildings','_built','_checks','_closest','_cw','_d','_dir','_driver','_group','_gunner','_id','_lastWP','_lastWPpos','_logic','_logicMARTA','_pos','_radius','_sorted','_spawn','_step','_uav','_varname','_waypoints','_wp','_wpcount'];
+_logic = UAVL;
+
+if (!isNull playerUAV) then {if (!alive playerUAV) then {playerUAV = objNull}};
+if (!isNull playerUAV) exitWith {
+ if (WF_A2_Vanilla) then {
+ ExecVM "Client\Module\UAV\uav_interface.sqf";
+ } else {
+ ExecVM "Client\Module\UAV\uav_interface_oa.sqf";
+ };
+};
+
+//--- Logic ID
+if (isnil "BIS_uavlastID") then {BIS_uav_lastID = -1};
+BIS_uav_lastID = BIS_uav_lastID + 1;
+_id = BIS_uav_lastID;
+_varname = "";
+call compile format ["BIS_uav_%1 = _logic; _logic setvehiclevarname 'BIS_uav_%1'; _varname = 'BIS_uav_%1'; publicvariable 'BIS_uav_%1'",BIS_uav_lastID];
+_logic setVariable ["ID",BIS_uav_lastID];
+
+//--- First call
+if (BIS_uav_lastID == 0) then {
+ //--- Execute MARTA
+ if (isnil "bis_marta_mainscope") then {
+ (group _logic) createunit ["MartaManager",position player,[],0,"none"];
+ };
+};
+
+_buildings = (sideJoinedText) Call GetSideStructures;
+_checks = [sideJoined,Format ["WFBE_%1COMMANDCENTERTYPE",sideJoinedText] Call GetNamespace,_buildings] Call GetFactories;
+_closest = objNull;
+if (count _checks > 0) then {
+ _sorted = [player,_checks] Call SortByDistance;
+ _closest = _sorted select 0;
+};
+
+if (isNull _closest) exitWith {};
+
+_uav = createVehicle [Format ["WFBE_%1UAV",sideJoinedText] Call GetNamespace,getPos _closest, [], 0, "FLY"];
+playerUAV = _uav;
+Call Compile Format ["_uav addEventHandler ['Killed',{[_this select 0,_this select 1,%1] Spawn UnitKilled}]",sideJoined];
+_uav SetVehicleInit Format["[this,%1] ExecVM 'Common\Common_InitUnit.sqf';",sideJoined];
+processInitCommands;
+
+//--- Remove weapons if air restriction is enabled.
+if (('WFBE_RESTRICTIONADVAIR' Call GetNamespace) == 2) then {removeAllWeapons _uav};
+
+_group = createGroup sideJoined;
+_driver = [Format ["WFBE_%1SOLDIER",sideJoinedText] Call GetNamespace,_group,getPos _uav,sideJoined] Call CreateMan;
+_driver MoveInDriver _uav;
+
+_built = 1;
+//--- OPFOR Uav has no gunner slot.
+if (sideJoined == west) then {
+ _gunner = [Format ["WFBE_%1SOLDIER",sideJoinedText] Call GetNamespace,_group,getPos _uav,sideJoined] Call CreateMan;
+ _gunner MoveInGunner _uav;
+ _built = _built + 1;
+};
+[sideJoinedText,'UnitsCreated',_built] Call UpdateStatistics;
+[sideJoinedText,'VehiclesCreated',1] Call UpdateStatistics;
+
+-12500 Call ChangePlayerFunds;
+
+WFBE_RequestSpecial = ['SRVFNCREQUESTSPECIAL',["uav",sideJoined,_uav,clientTeam]];
+publicVariable 'WFBE_RequestSpecial';
+if (isHostedServer) then {['SRVFNCREQUESTSPECIAL',["uav",sideJoined,_uav,clientTeam]] Spawn HandleSPVF};
+
+sleep 0.02;
+
+if ((count units _uav) > 1) then {[driver _uav] join grpnull};
+
+_radius = 1000;
+_wpcount = 4;
+_step = 360 / _wpcount;
+_add = 0;
+_cw = true;
+_dir = 0;
+if !(isNil "_lastWP") then {deletewaypoint _lastWP};
+
+//--- No need to preprocess those.
+if (WF_A2_Vanilla) then {
+ ExecVM "Client\Module\UAV\uav_interface.sqf";
+} else {
+ ExecVM "Client\Module\UAV\uav_interface_oa.sqf";
+};
+[_uav] ExecVM 'Client\Module\UAV\uav_spotter.sqf';
+
+_spawn = [] spawn {}; //--- Empty spawn
+while {alive _uav} do {
+ waituntil {waypointdescription [group _uav,currentwaypoint group _uav] != ' ' || !alive _uav};
+ terminate _spawn; //--- Terminate spawn from previous loop
+ if (!(alive _uav)||isNull _uav) exitwith {};
+
+ _waypoints = waypoints _uav;
+ _lastWP = _waypoints select (count _waypoints - 1);
+ _lastWPpos = waypointposition _lastWP;
+ deletewaypoint _lastWP;
+ for "_d" from 0 to (360-_step) step _step do
+ {
+ _add = _d;
+ if !(_cw) then {_add = -_d};
+ _pos = [_lastWPpos, _radius, _dir+_add] call bis_fnc_relPos;
+ _wp = (group _uav) addwaypoint [_pos,0];
+ _wp setWaypointType "MOVE";
+ _wp setwaypointdescription ' ';
+ _wp setwaypointcompletionradius (1000/_wpcount);
+ };
+
+ _spawn = [_uav,_add,_step,_lastWPpos,_radius,_dir] spawn {
+ Private ['_add','_currentWP','_dir','_lastWPpos','_pos','_radius','_step','_uav','_wp'];
+ scriptname "UAV Route planning";
+ _uav = _this select 0;
+ _add = _this select 1;
+ _step = _this select 2;
+ _lastWPpos = _this select 3;
+ _radius = _this select 4;
+ _dir = _this select 5;
+ _currentWP = currentwaypoint group _uav;
+ while {alive _uav} do {
+ waituntil {_currentWP != currentwaypoint group _uav};
+ sleep .01;
+ _add = _add + _step;
+ if !(_cw) then {_add = -_add};
+ _pos = [_lastWPpos, _radius, _dir+_add] call bis_fnc_relPos;
+ _wp = (group _uav) addwaypoint [_pos,0];
+ _wp setWaypointType "MOVE";
+ _wp setwaypointdescription ' ';
+ _wp setwaypointcompletionradius (1000/_wpcount);
+ _currentWP = currentwaypoint group _uav;
+ };
+ };
+
+ _wpcount = count waypoints _uav;
+ waituntil {waypointdescription [group _uav,currentwaypoint group _uav] == ' ' || _wpcount != count waypoints _uav || !alive _uav};
+ if (!(alive _uav)||isNull _uav) exitwith {};
+};
diff --git a/Client/Module/UAV/uav_interface.sqf b/Client/Module/UAV/uav_interface.sqf
new file mode 100644
index 0000000..873b026
--- /dev/null
+++ b/Client/Module/UAV/uav_interface.sqf
@@ -0,0 +1,304 @@
+Private ['_IGUI_update','_alt','_defaultTeamswitch','_defaultvalue','_displayEH_keydown','_displayEH_mousebuttondown','_displayEH_mousezchanged','_locked','_logic','_mapEH_mousebttondown','_newalt','_newspeed','_ppBlur','_ppColor','_ppGrain','_ppInversion','_speed','_uav'];
+_defaultTeamswitch = teamswitchenabled;
+
+startLoadingScreen ["UAV","RscDisplayLoadMission"];
+
+_uav = playerUAV;
+
+//--- UAV destroyed
+if (isnull _uav) exitwith {endLoadingScreen;hintc format [localize "strwfbasestructuredestroyed",localize "str_uav_action"]};
+
+//--- Switch view
+gunner _uav removeweapon "nvgoggles";
+_uav switchcamera "internal";
+player remoteControl gunner _uav;
+_locked = locked _uav;
+_uav lock true;
+_uav selectweapon (weapons _uav select 0);
+enableteamswitch false;
+titletext ["","black in"];
+BIS_UAV_TIME = 0;
+BIS_UAV_PLANE = _uav;
+_ppInversion = 0;
+
+//--- Disable HC
+hcshowbar false;
+
+//--- Show MARTA icons
+if (isnil "BIS_UAV_visible") then {BIS_UAV_visible = groupiconsvisible};
+setGroupIconsVisible [true,true];
+(group _uav) setvariable ["MARTA_waypoint",[true,[-1,-1,-1,-1]]];
+
+//--- Postprocess effects
+_ppColor = ppEffectCreate ["ColorCorrections", 1999];
+_ppColor ppEffectEnable true;
+_ppColor ppEffectAdjust [1, 1, 0, [1, 1, 1, 0], [1, 1, 1, 0.0], [1, 1, 1, 1.0]];
+_ppColor ppEffectCommit 0;
+_ppBlur = ppEffectCreate ["dynamicBlur", 505];
+_ppBlur ppEffectEnable true;
+_ppBlur ppEffectAdjust [.5];
+_ppBlur ppEffectCommit 0;
+_ppGrain = ppEffectCreate ["filmGrain", 2005];
+_ppGrain ppEffectEnable true;
+_ppGrain ppEffectAdjust [0.02, 1, 1, 0, 1];
+_ppGrain ppEffectCommit 0;
+
+//--- RSC
+1124 cutrsc ["RscUnitInfoUAV","plain"];
+waituntil {!isnil {uinamespace getvariable "BIS_UAV_DISPLAY"}};
+progressLoadingScreen 0.5;
+
+//--- Minimap update
+((uinamespace getvariable "BIS_UAV_DISPLAY") displayctrl 112410) mapcenteroncamera true;
+
+//--- Default aperture
+if (isnil {BIS_UAV_PLANE getvariable 'BIS_UAV_aperture'}) then {
+ _defaultvalue = if (daytime > 5 && daytime < 19) then {24} else {0.07};
+ BIS_UAV_PLANE setvariable ['BIS_UAV_aperture',_defaultValue];
+ setaperture _defaultvalue;
+} else {
+ setaperture (BIS_UAV_PLANE getvariable 'BIS_UAV_aperture');
+};
+
+//--- Default height
+_newalt = BIS_UAV_PLANE getvariable 'BIS_UAV_height';
+if (isnil "_newalt") then {
+ _alt = position _uav select 2;
+ _newalt = (round (_alt / 50)) * 50;
+ if (_newalt < 100) then {_newalt = 100};
+ _uav flyinheight _newalt;
+ _uav setvariable ['BIS_UAV_height',_newalt];
+};
+((uinamespace getvariable 'BIS_UAV_DISPLAY') displayctrl 112413) ctrlsettext str (_newalt);
+((uinamespace getvariable 'BIS_UAV_DISPLAY') displayctrl 112413) ctrlcommit 0;
+
+//--- Default speed
+_newspeed = BIS_UAV_PLANE getvariable 'BIS_UAV_speed';
+if (isnil "_newspeed") then {
+ _speed = speed _uav;
+ _newspeed = (round (_speed / 50)) * 50;
+ if (_newalt < 200) then {_newalt = 200};
+ driver _uav forcespeed _newspeed;;
+ _uav setvariable ['BIS_UAV_speed',_newspeed];
+};
+((uinamespace getvariable 'BIS_UAV_DISPLAY') displayctrl 112412) ctrlsettext str (_newspeed);
+((uinamespace getvariable 'BIS_UAV_DISPLAY') displayctrl 112412) ctrlcommit 0;
+
+BIS_UAV_GUIinit = {
+private ["_control","_display","_controls","_controlHint"];
+scriptName "UAV\data\scripts\uav_interface.sqf: GUI Init";
+ disableserialization;
+ Private ['_control','_controlHint','_controls','_display'];
+ _display = uinamespace getvariable "BIS_UAV_DISPLAY";
+ _controls = [112401,112402,112403,112404];
+ {
+ _control = _display displayctrl _x;
+ _control ctrlshow false;
+ _control ctrlcommit 0;
+ } foreach _controls;
+ _controlHint = _display displayctrl 112414;
+ _controlHint ctrlsettext (
+ localize "str_coin_exit" + " " + localize "str_input_device_mouse_1" + "\n\n" +
+ localize "str_disp_opt_bright" + " " + localize "str_input_device_mouse_axis_z" + "\n" +
+ localize "str_arcmark_title1" + ": " + call compile actionkeysnames ["Binocular",2]
+ );
+ _controlHint ctrlcommit 0;
+};
+[] spawn BIS_UAV_GUIinit;
+
+_IGUI_update = [] spawn {scriptName "UAV\data\scripts\uav_interface.sqf: IGUI Update";
+ Private ['_uav'];
+ _uav = BIS_UAV_PLANE;
+ while {cameraon == BIS_UAV_PLANE} do {
+ if (isnull (uinamespace getvariable "BIS_UAV_DISPLAY")) then {bis_uav_terminate = true;
+ ExecVM "ca\modules\uav\data\scripts\uav_interface.sqf";
+ };
+ if (visiblemap) then {
+ if (ctrlshown ((uinamespace getvariable "BIS_UAV_DISPLAY") displayctrl 112411)) then {
+ {
+ ((uinamespace getvariable "BIS_UAV_DISPLAY") displayctrl _x) ctrlshow false;
+ ((uinamespace getvariable "BIS_UAV_DISPLAY") displayctrl _x) ctrlcommit 0;
+ } foreach [112410,112411,112412,112413,112414];
+ };
+ } else {
+ if !(ctrlshown ((uinamespace getvariable "BIS_UAV_DISPLAY") displayctrl 112411)) then {
+ {
+ ((uinamespace getvariable "BIS_UAV_DISPLAY") displayctrl _x) ctrlshow true;
+ ((uinamespace getvariable "BIS_UAV_DISPLAY") displayctrl _x) ctrlcommit 0;
+ } foreach [112410,112411,112412,112413,112414];
+ };
+ };
+ ((uinamespace getvariable "BIS_UAV_DISPLAY") displayctrl 112411) ctrlsettext str (round speed _uav);
+ ((uinamespace getvariable "BIS_UAV_DISPLAY") displayctrl 112411) ctrlcommit 0;
+ sleep 0.01;
+ };
+};
+
+//--- Detect pressed keys (temporary solution)
+_displayEH_keydown = (finddisplay 46) displayaddeventhandler ["keydown","
+ Private ['_id','_key','_level','_marker','_markertime','_ppInversion','_uav','_worldpos'];
+ _key = _this select 1;
+
+ comment '--- END';
+ if (_key in (actionkeys 'menuback')) then {bis_uav_terminate = true};
+
+ comment '--- NVG';
+ if (_key in (actionkeys 'NightVision')) then {
+ _uav = BIS_UAV_PLANE;
+ if (isnil {_uav getvariable 'BIS_UAV_pp_NVG'}) then {
+ _ppInversion = ppEffectCreate ['colorInversion', 2555];
+ _ppInversion ppEffectEnable true;
+ _ppInversion ppEffectAdjust [1,1,1];
+ _ppInversion ppEffectCommit 0;
+ _uav setvariable ['BIS_UAV_pp_NVG',_ppInversion];
+ } else {
+ ppEffectDestroy (_uav getvariable 'BIS_UAV_pp_NVG');
+ _uav setvariable ['BIS_UAV_pp_NVG',nil];
+ };
+ };
+
+ comment '--- MARKER';
+ if (_key in (actionkeys 'binocular') && !visiblemap) then {
+ _id = 1;
+ while {markertype format ['_user_defined_UAV_MARKER_%1',_id] != ''} do {
+ _id = _id + 1;
+ };
+ _worldpos = screentoworld [0.5,0.5];
+ _marker = createmarker [format ['_user_defined_UAV_MARKER_%1',_id],_worldpos];
+ _marker setmarkertype 'mil_destroy';
+ _marker setmarkercolor 'colorred';
+ _marker setmarkersize [0.5,0.5];
+ _markertime = [daytime] call bis_fnc_timetostring;
+ _marker setmarkertext format ['UAV %1: %2',_id,_markertime];
+ };
+
+ comment '--- UP';
+ if (_key in (actionkeys 'HeliUp')) then {
+ _uav = BIS_UAV_PLANE;
+ _level = _uav getvariable 'BIS_UAV_height';
+ _level = _level + 50;
+ if (_level > 1000) then {_level = 1000};
+ _uav flyinheight _level;
+ _uav setvariable ['BIS_UAV_height',_level];
+ ((uinamespace getvariable 'BIS_UAV_DISPLAY') displayctrl 112413) ctrlsettext str (_level);
+ ((uinamespace getvariable 'BIS_UAV_DISPLAY') displayctrl 112413) ctrlcommit 0;
+ };
+
+ comment '--- DOWN';
+ if (_key in (actionkeys 'HeliDown')) then {
+ _uav = BIS_UAV_PLANE;
+ _level = _uav getvariable 'BIS_UAV_height';
+ _level = _level - 50;
+ if (_level < 100) then {_level = 100};
+ _uav flyinheight _level;
+ _uav setvariable ['BIS_UAV_height',_level];
+ ((uinamespace getvariable 'BIS_UAV_DISPLAY') displayctrl 112413) ctrlsettext str (_level);
+ ((uinamespace getvariable 'BIS_UAV_DISPLAY') displayctrl 112413) ctrlcommit 0;
+ };
+
+ comment '--- FORWARD';
+ if (_key in (actionkeys 'HeliForward')) then {
+ _uav = BIS_UAV_PLANE;
+ _level = _uav getvariable 'BIS_UAV_speed';
+ _level = _level + 50;
+ if (_level > 500) then {_level = 500};
+ if (_level < 200) then {_level = 200};
+ driver _uav forcespeed (_level / 3.6);
+ _uav setvariable ['BIS_UAV_speed',_level];
+ ((uinamespace getvariable 'BIS_UAV_DISPLAY') displayctrl 112412) ctrlsettext str (_level);
+ ((uinamespace getvariable 'BIS_UAV_DISPLAY') displayctrl 112412) ctrlcommit 0;
+ };
+
+ comment '--- BACK';
+ if (_key in (actionkeys 'HeliBack')) then {
+ _uav = BIS_UAV_PLANE;
+ _level = _uav getvariable 'BIS_UAV_speed';
+ _level = _level - 50;
+ if (_level > 500) then {_level = 500};
+ if (_level < 200) then {_level = 200};
+ driver _uav forcespeed (_level / 3.6);
+ _uav setvariable ['BIS_UAV_speed',_level];
+ ((uinamespace getvariable 'BIS_UAV_DISPLAY') displayctrl 112412) ctrlsettext str (_level);
+ ((uinamespace getvariable 'BIS_UAV_DISPLAY') displayctrl 112412) ctrlcommit 0;
+ };
+"];
+
+//--- Detect pressed mouse buttons
+_displayEH_mousebuttondown = (finddisplay 46) displayaddeventhandler ["mousebuttondown","
+ disableserialization;
+ Private ['_button','_control','_controls','_display'];
+ _button = _this select 1;
+ if (_button == 007 && !visiblemap) then {comment 'DISABLED';
+ _display = uinamespace getvariable 'BIS_UAV_DISPLAY';
+ _controls = [112401,112402,112403,112404];
+ {
+ _control = _display displayctrl _x;
+ _control ctrlshow !(ctrlshown _control);
+ _control ctrlcommit 0;
+ } foreach _controls;
+ };
+ if (_button == 1 && !visiblemap && 65665 in (actionkeys 'menuback')) then {bis_uav_terminate = true};
+"];
+
+//--- Detect mouse wheel rotation
+_displayEH_mousezchanged = (finddisplay 46) displayaddeventhandler ["mousezchanged","
+ Private ['_aperture','_oldAperture','_zChangeFinal','_zchange'];
+ _zchange = _this select 1;
+ _oldAperture = BIS_UAV_PLANE getvariable 'BIS_UAV_aperture';
+ _zChangeFinal = _zChange / 2;
+ if (_oldAperture <= 1.0) then {_zChangeFinal = _zChange / 10};
+ if (_oldAperture <= 0.1) then {_zChangeFinal = _zChange / 1000};
+ _aperture = _oldAperture + _zchangeFinal;
+ if (_oldaperture > 1.0 && _aperture < 1.0) then {_aperture = 1.0};
+ if (_oldaperture > 0.1 && _aperture < 0.1) then {_aperture = 0.1};
+ if (_aperture < 0.001) then {_aperture = 0.001};
+ BIS_UAV_PLANE setvariable ['BIS_UAV_aperture',_aperture];
+ setaperture _aperture;
+"];
+
+_mapEH_mousebttondown = ((findDisplay 12) displayCtrl 51) ctrladdeventhandler ["mousebuttondown", "
+ Private ['_button','_uav','_worldpos','_wp'];
+ _button = _this select 1;
+ if (_button == 0) then {
+ _uav = BIS_UAV_PLANE;
+
+ while {count (waypoints _uav) > 0} do {deletewaypoint ((waypoints _uav) select 0)};
+
+ _worldpos = (_this select 0) posscreentoworld [_this select 2,_this select 3];
+ _wp = (group _uav) addwaypoint [_worldpos,0];
+ _wp setWaypointType 'MOVE';
+ (group _uav) setcurrentwaypoint _wp;
+ };
+"];
+
+endLoadingScreen;
+
+//--- TERMINATE
+waituntil {!isnil "bis_uav_terminate" || !alive _uav || !alive player};
+if (!alive _uav) then {
+ hintc format [localize "strwfbasestructuredestroyed",localize "str_uav_action"];
+};
+_uav lock _locked;
+titletext ["","black in"];
+bis_uav_terminate = nil;
+BIS_UAV_TIME = nil;
+BIS_UAV_PLANE = nil;
+objnull remoteControl gunner _uav;
+player switchcamera "internal";
+enableteamswitch _defaultTeamswitch;
+
+setGroupIconsVisible BIS_UAV_visible;
+BIS_UAV_visible = nil;
+(group _uav) setvariable ["MARTA_waypoint",[false,[-1,-1,-1,-1]]];
+
+setaperture -1;
+ppEffectDestroy _ppColor;
+ppEffectDestroy _ppBlur;
+ppEffectDestroy (_uav getvariable 'BIS_UAV_pp_NVG'); //--- Color Invert Fix.
+ppEffectDestroy _ppGrain;
+
+1124 cuttext ["","plain"];
+(finddisplay 46) displayremoveeventhandler ["keydown",_displayEH_keydown];
+(finddisplay 46) displayremoveeventhandler ["mousebuttondown",_displayEH_mousebuttondown];
+(finddisplay 46) displayremoveeventhandler ["mousezchanged",_displayEH_mousezchanged];
+((findDisplay 12) displayCtrl 51) ctrlremoveeventhandler ["mousebuttondown",_mapEH_mousebttondown]; \ No newline at end of file
diff --git a/Client/Module/UAV/uav_interface_oa.sqf b/Client/Module/UAV/uav_interface_oa.sqf
new file mode 100644
index 0000000..5c4e229
--- /dev/null
+++ b/Client/Module/UAV/uav_interface_oa.sqf
@@ -0,0 +1,162 @@
+Private ['_action_leave','_defaultTeamswitch','_displayEH_keydown','_displayEH_mousebuttondown','_locked','_logic','_mapEH_mousebttondown','_ppColor','_uav'];
+_defaultTeamswitch = teamswitchenabled;
+
+startLoadingScreen ["UAV","RscDisplayLoadMission"];
+
+_uav = playerUAV;
+
+//--- UAV destroyed
+if (isnull _uav) exitwith {endLoadingScreen;hint format [localize "strwfbasestructuredestroyed",localize "str_uav_action"]};
+
+//--- Switch view
+gunner _uav removeweapon "nvgoggles";
+_uav switchcamera "internal";
+player remoteControl gunner _uav;
+_locked = locked _uav;
+_uav lock true;
+_uav selectweapon (weapons _uav select 0);
+enableteamswitch false;
+titletext ["","black in"];
+BIS_UAV_TIME = 0;
+BIS_UAV_PLANE = _uav;
+
+//--- Action!
+_action_leave = _uav addaction [
+ localize "STR_EP1_UAV_action_exit",
+ "ca\modules_e\uav\data\scripts\uav_actionCommit.sqf",
+ [0],
+ 1,
+ false,
+ true,
+ "PersonView",
+ "isnil 'BIS_UAV_noExit'"
+];
+
+//--- Disable HC
+if (hcShownBar) then {hcshowbar false};
+
+//--- Show MARTA icons
+if (isnil "BIS_UAV_visible") then {BIS_UAV_visible = groupiconsvisible};
+setGroupIconsVisible [true,true];
+(group _uav) setvariable ["MARTA_waypoint",[true,[-1,-1,-1,-1]]];
+
+//--- Prostprocess effects
+//setaperture 24;
+_ppColor = ppEffectCreate ["ColorCorrections", 1999];
+_ppColor ppEffectEnable true;
+_ppColor ppEffectAdjust [1, 1, 0, [1, 1, 1, 0], [1, 1, 1, 0.0], [0.2, 0.2, 0.2, 0]];
+_ppColor ppEffectCommit 0;
+
+
+//--- RSC
+progressLoadingScreen 0.5;
+
+//--- Detect pressed keys (temporary solution)
+BIS_UAV_HELI_keydown = {
+ Private ['_id','_key','_marker','_markertime','_newHeight','_uav','_worldpos'];
+ _key = _this select 1;
+ _uav = BIS_UAV_PLANE;
+
+ //--- END
+ //if (_key in (actionkeys 'menuback') && isnil 'BIS_UAV_noExit') then {bis_uav_terminate = true};
+
+ //--- MARKER
+ if (_key in (actionkeys 'binocular') && !visiblemap) then {
+ _id = 1;
+ while {markertype format ['_user_defined_UAV_MARKER_%1',_id] != ''} do {
+ _id = _id + 1;
+ };
+ _worldpos = screentoworld [0.5,0.5];
+ _marker = createmarker [format ['_user_defined_UAV_MARKER_%1',_id],_worldpos];
+ _marker setmarkertype 'mil_destroy';
+ _marker setmarkercolor 'colorred';
+ _marker setmarkersize [0.5,0.5];
+ _markertime = [daytime] call bis_fnc_timetostring;
+ _marker setmarkertext format ['UAV %1: %2',_id,_markertime];
+ };
+
+ //--- UP
+ if (_key in (actionkeys 'HeliUp')) then {
+ _newHeight = (position _uav select 2) + 50;
+ if (_newHeight > 1000) then {_newHeight = 1000};
+ if (speed _uav < 1) then {_uav domove position _uav;};
+ _uav land 'none';
+ _uav flyinheight _newHeight;
+ };
+
+ //--- DOWN
+ if (_key in (actionkeys 'HeliDown')) then {
+ _newHeight = (position _uav select 2) - 50;
+ if (_newHeight < 100) then {_newHeight = 100};
+ _uav land 'none';
+ _uav flyinheight _newHeight;
+ };
+};
+_displayEH_keydown = (finddisplay 46) displayaddeventhandler ["keydown","Private['_sqf']; _sqf = _this spawn BIS_UAV_HELI_keydown"];
+
+//--- Detect pressed mouse buttons
+_displayEH_mousebuttondown = (finddisplay 46) displayaddeventhandler ["mousebuttondown","
+ disableserialization;
+ Private ['_button','_control','_controls','_display'];
+ _button = _this select 1;
+ if (_button == 007 && !visiblemap) then {comment 'DISABLED';
+ _display = uinamespace getvariable 'BIS_UAV_DISPLAY';
+ _controls = [112401,112402,112403,112404];
+ {
+ _control = _display displayctrl _x;
+ _control ctrlshow !(ctrlshown _control);
+ _control ctrlcommit 0;
+ } foreach _controls;
+ };
+"];
+
+
+//_display = findDisplay 12;
+//_map = _display displayCtrl 51;
+_mapEH_mousebttondown = ((findDisplay 12) displayCtrl 51) ctrladdeventhandler ["mousebuttondown", "
+ Private ['_button','_uav','_worldpos','_wp'];
+ _button = _this select 1;
+ if (_button == 0) then {
+ _uav = BIS_UAV_PLANE;
+
+ while {count (waypoints _uav) > 0} do {deletewaypoint ((waypoints _uav) select 0)};
+
+ _worldpos = (_this select 0) posscreentoworld [_this select 2,_this select 3];
+ _wp = (group _uav) addwaypoint [_worldpos,0];
+ _wp setWaypointType 'MOVE';
+ (group _uav) setcurrentwaypoint _wp;
+ };
+"];
+
+//////////////////////////////////////////////////
+endLoadingScreen;
+//////////////////////////////////////////////////
+
+
+//--- TERMINATE
+waituntil {!isnil "bis_uav_terminate" || !alive _uav || !alive player};
+if (!alive _uav) then {
+ hint format [localize "strwfbasestructuredestroyed",localize "str_uav_action"];
+};
+_uav lock _locked;
+titletext ["","black in"];
+bis_uav_terminate = nil;
+BIS_UAV_TIME = nil;
+BIS_UAV_PLANE = nil;
+objnull remoteControl gunner _uav;
+player switchcamera "internal";
+enableteamswitch _defaultTeamswitch;
+
+_uav removeaction _action_leave;
+
+setGroupIconsVisible BIS_UAV_visible;
+BIS_UAV_visible = nil;
+(group _uav) setvariable ["MARTA_waypoint",[false,[-1,-1,-1,-1]]];
+
+ppEffectDestroy _ppColor;
+
+//1124 cuttext ["","plain"];
+(finddisplay 46) displayremoveeventhandler ["keydown",_displayEH_keydown];
+(finddisplay 46) displayremoveeventhandler ["mousebuttondown",_displayEH_mousebuttondown];
+//(finddisplay 46) displayremoveeventhandler ["mousezchanged",_displayEH_mousezchanged];
+((findDisplay 12) displayCtrl 51) ctrlremoveeventhandler ["mousebuttondown",_mapEH_mousebttondown]; \ No newline at end of file
diff --git a/Client/Module/UAV/uav_spotter.sqf b/Client/Module/UAV/uav_spotter.sqf
new file mode 100644
index 0000000..b1b0b17
--- /dev/null
+++ b/Client/Module/UAV/uav_spotter.sqf
@@ -0,0 +1,28 @@
+/*
+ Author: Benny
+ Name: uav_spotter.sqf
+ Parameters:
+ 0 - UAV
+ Description:
+ This file handle the UAV 'spotting' ability. If the UAV knows about an hostile unit, it'll reveal it's average location on the map.
+*/
+
+Private ['_delay','_range','_sensitivity','_uav'];
+_uav = _this select 0;
+_delay = 'WFBE_UAVSPOTTINGDELAY' Call GetNamespace;
+_range = 'WFBE_UAVSPOTTINGRANGE' Call GetNamespace;
+_sensitivity = 'WFBE_UAVSPOTTINGDETECTION' Call GetNamespace;
+
+while {true} do {
+ sleep _delay;
+ if (!alive _uav || isNull _uav) exitWith {};
+
+ {
+ if (_uav knowsAbout _x > _sensitivity && side _x != sideJoined && side _x != civilian) then {
+ sleep (0.05 + random 0.05);
+ WFBE_UAV_Reveal = [sideJoined,'CLTFNCUAV_REVEAL',[_uav,_x]];
+ publicVariable 'WFBE_UAV_Reveal';
+ if (isHostedServer) then {[sideJoined,'CLTFNCUAV_REVEAL',[_uav,_x]] Spawn HandlePVF};
+ };
+ } forEach (_uav nearEntities _range);
+};
diff --git a/Client/Module/ZetaCargo/Zeta_Hook.sqf b/Client/Module/ZetaCargo/Zeta_Hook.sqf
new file mode 100644
index 0000000..653ecaa
--- /dev/null
+++ b/Client/Module/ZetaCargo/Zeta_Hook.sqf
@@ -0,0 +1,40 @@
+Private ["_action","_actionID","_caller","_index","_isAttached","_lifter","_position","_sorted","_type","_vehicle","_vehicles"];
+
+_lifter = _this select 0;
+_caller = _this select 1;
+_actionID = _this select 2;
+
+if (_caller != driver _lifter) exitWith {};
+if ((typeOf _lifter) in Zeta_Special) then {
+ if (speed _lifter > 20) exitWith {};
+} else {
+ if ((speed _lifter > 20)||((getpos _lifter select 2)<2)) exitWith {};
+};
+//--- nearEntities handle living units.
+_vehicles = _lifter nearEntities [Zeta_Types, 10];
+if (count _vehicles < 1) exitWith {};
+
+_sorted = [_lifter,_vehicles] Call SortByDistance;
+_vehicle = _sorted select 0;
+_type = typeOf _lifter;
+_position = Zeta_DefaultPos;
+_index = Zeta_Special find _type;
+if (_index != -1) then {_position = Zeta_SpecialPosition select _index};
+
+if (count crew(_vehicle) > 0) exitWith {hint (localize 'STR_WF_INFO_Hook_Manned')};
+
+_vehicle attachTo [_lifter,_position];
+_lifter setVariable ["Attached",true,false];
+_lifter removeAction _actionID;
+
+_action = _lifter addAction [localize "STR_WF_Lift_Detach","Client\Module\ZetaCargo\Zeta_Unhook.sqf"];
+
+while {!gameOver} do {
+ sleep 2;
+ _isAttached = _lifter getVariable "Attached";
+ if ((getDammage _lifter > 0.3)||!_isAttached||isNull (driver _lifter)) exitWith {
+ detach _vehicle;
+ _lifter removeAction _action;
+ if (alive _lifter) then {_lifter addAction [localize "STR_WF_Lift","Client\Module\ZetaCargo\Zeta_Hook.sqf"]};
+ };
+}; \ No newline at end of file
diff --git a/Client/Module/ZetaCargo/Zeta_Init.sqf b/Client/Module/ZetaCargo/Zeta_Init.sqf
new file mode 100644
index 0000000..29dcac0
--- /dev/null
+++ b/Client/Module/ZetaCargo/Zeta_Init.sqf
@@ -0,0 +1,12 @@
+//--- Zeta Cargo by Benny.
+
+//--- Unit allowed to hook.
+Zeta_Lifter = ["MH60S","MV22","C130J","Mi17_Ins","Mi17_medevac_RU","UH60M_EP1","UH60M_MEV_EP1","CH_47F_EP1","C130J_US_EP1","Mi17_TK_EP1","BAF_Merlin_HC3_D","CH_47F_BAF"];
+//--- Zeta Cargo can lift these types.
+Zeta_Types = ["Car","Motorcycle","Tank","Ship"];
+//--- Zeta Cargo default Position.
+Zeta_DefaultPos = [0,0,-4];
+
+//--- Special vehicle with special position.
+Zeta_Special = ["C130J","C130J_US_EP1"];
+Zeta_SpecialPosition = [[0,0,-2]]; \ No newline at end of file
diff --git a/Client/Module/ZetaCargo/Zeta_Unhook.sqf b/Client/Module/ZetaCargo/Zeta_Unhook.sqf
new file mode 100644
index 0000000..3e06b0f
--- /dev/null
+++ b/Client/Module/ZetaCargo/Zeta_Unhook.sqf
@@ -0,0 +1,21 @@
+private ["_actionID","_caller","_lifter","_param","_vehicle"];
+
+_lifter = _this select 0;
+_caller = _this select 1;
+_actionID = _this select 2;
+_param = _this select 3;
+_vehicle = _param select 0;
+
+_lifter setVariable ["Attached",false];
+detach _vehicle;
+if ((typeOf _lifter) in Zeta_Special) then {
+ _vehicle setPos [(getPos _lifter select 0) - (15 * sin (getDir _vehicle)), (getPos _lifter select 1) - (15 * cos (getDir _vehicle)), getPos _lifter select 2];
+};
+
+_vehicle setVelocity (velocity _lifter);
+
+_lifter removeAction _actionID;
+
+sleep 1;
+
+if ((getPos _vehicle) select 2 < 0) then {_vehicle setPos [(getPos _vehicle) select 0,(getPos _vehicle) select 1,0];_vehicle setVelocity [0,0,-0.1]}; \ No newline at end of file
diff --git a/Client/PVFunctions/AllCampsCaptured.sqf b/Client/PVFunctions/AllCampsCaptured.sqf
new file mode 100644
index 0000000..f11973e
--- /dev/null
+++ b/Client/PVFunctions/AllCampsCaptured.sqf
@@ -0,0 +1,20 @@
+Private ["_alertOtherSide","_camp","_camps","_count","_marker","_sideID","_town"];
+
+_town = _this Select 0;
+_sideID = _this Select 1;
+_alertOtherSide = _this Select 2;
+
+_camps = _town getVariable "camps";
+
+for [{_count = count _camps - 1},{_count >= 0},{_count = _count - 1}] do {
+ _camp = _camps select _count;
+ _marker = Format["%1Camp%2",str _town,_camps find _camp];
+
+ if (sideID == _sideID) then {
+ _marker setMarkerColorLocal ("Friendly" Call GetMarkerColoration);
+ } else {
+ if (_alertOtherSide || getMarkerColor _marker == ("Friendly" Call GetMarkerColoration)) then {
+ _marker setMarkerColorLocal ("Enemy" Call GetMarkerColoration);
+ };
+ };
+}; \ No newline at end of file
diff --git a/Client/PVFunctions/AwardBounty.sqf b/Client/PVFunctions/AwardBounty.sqf
new file mode 100644
index 0000000..6e80016
--- /dev/null
+++ b/Client/PVFunctions/AwardBounty.sqf
@@ -0,0 +1,19 @@
+Private["_assist","_bounty","_get","_name","_type"];
+
+_type = _this select 0;
+_assist = _this select 1;
+
+_get = _type Call GetNamespace;
+
+_name = _get select QUERYUNITLABEL;
+_bounty = round((_get select QUERYUNITPRICE) * ('WFBE_BOUNTYMODIFIER' Call GetNamespace));
+
+//--- Are we dealing with a kill assist or a full kill.
+if (_assist) then {
+ _bounty = _bounty * ('WFBE_BOUNTYMODIFIERASSIST' Call GetNamespace);
+ Format[Localize "STR_WF_CHAT_Award_Bounty_Assist",_bounty,_name] Call GroupChatMessage;
+} else {
+ Format[Localize "STR_WF_CHAT_Award_Bounty",_bounty,_name] Call GroupChatMessage;
+};
+
+_bounty Call ChangePlayerFunds; \ No newline at end of file
diff --git a/Client/PVFunctions/CampCaptured.sqf b/Client/PVFunctions/CampCaptured.sqf
new file mode 100644
index 0000000..0894a5e
--- /dev/null
+++ b/Client/PVFunctions/CampCaptured.sqf
@@ -0,0 +1,42 @@
+Private ["_award","_camp","_camps","_index","_marker","_name","_captureSideID","_town","_townSideID","_units"];
+
+_town = _this Select 0;
+_captureSideID = _this Select 1;
+_camp = _this Select 2;
+
+if !(clientInitComplete) exitWith {};
+
+_camps = _town getVariable "camps";
+_name = _town getVariable "name";
+_townSideID = _town getVariable "sideID";
+_index = _camps find _camp;
+
+if (_index != -1) then {
+ _marker = Format["%1Camp%2",str _town,_index];
+ if (sideID == _captureSideID) then {
+ _award = false;
+ if (Leader Group player == player) then {
+ _units = units group player;
+ {if (_x distance _camp < 5) then {_award = true}} forEach _units;
+ };
+
+ if (player Distance _camp < 5 || _award) then {
+ ('WFBE_CAMPCAPTUREBOUNTY' Call GetNamespace) Call ChangePlayerFunds;
+ WFBE_RequestChangeScore = ['SRVFNCREQUESTCHANGESCORE',[player,score player + ('WFBE_SCORECAPTURECAMP' Call GetNamespace)]];
+ publicVariable 'WFBE_RequestChangeScore';
+ if (isHostedServer) then {['SRVFNCREQUESTCHANGESCORE',[player,score player + ('WFBE_SCORECAPTURECAMP' Call GetNamespace)]] Spawn HandleSPVF};
+ Format[localize "STR_WF_CHAT_Camp_Captured_Bounty",_name,'WFBE_CAMPCAPTUREBOUNTY' Call GetNamespace] Call CommandChatMessage;
+ if (mysql) then {
+ WF_Logic setVariable ["WF_MYSQL_CLIENT",(WF_Logic getVariable "WF_MYSQL_CLIENT") + [Format ["MYSQLDATAWFBE_Update%1%2campcaptured%3",getPlayerUID(player),name player,worldName]],true];
+ };
+ } else {
+ Format[localize "STR_WF_CHAT_Camp_Captured",_name] Call CommandChatMessage;
+ };
+ _marker setMarkerColorLocal ("Friendly" Call GetMarkerColoration);
+ } else {
+ if (_townSideID == sideID || getMarkerColor _marker == ("Friendly" Call GetMarkerColoration)) then {
+ Format[localize "STRWFCAMPCAPTUREDBYENEMY",_name] Call CommandChatMessage;
+ _marker setMarkerColorLocal ("Enemy" Call GetMarkerColoration);
+ };
+ };
+};
diff --git a/Client/PVFunctions/CanJoin.sqf b/Client/PVFunctions/CanJoin.sqf
new file mode 100644
index 0000000..ad90ed8
--- /dev/null
+++ b/Client/PVFunctions/CanJoin.sqf
@@ -0,0 +1,7 @@
+Private ['_canjoin','_name'];
+_name = _this select 0;
+_canjoin = _this select 1;
+
+if (!_canjoin && vehicleVarName player != _name) then {_canjoin = true};
+
+['WFBE_P_CANJOIN',_canjoin,true] Call SetNamespace; \ No newline at end of file
diff --git a/Client/PVFunctions/ChangeScore.sqf b/Client/PVFunctions/ChangeScore.sqf
new file mode 100644
index 0000000..583b4c1
--- /dev/null
+++ b/Client/PVFunctions/ChangeScore.sqf
@@ -0,0 +1,8 @@
+Private ["_newScore","_playerChanged","_oldScore"];
+
+_playerChanged = _this select 0;
+_newScore = _this select 1;
+
+_oldScore = score _playerChanged;
+_playerChanged addScore -(_oldScore);
+_playerChanged addScore _newScore; \ No newline at end of file
diff --git a/Client/PVFunctions/CommanderVote.sqf b/Client/PVFunctions/CommanderVote.sqf
new file mode 100644
index 0000000..30702ff
--- /dev/null
+++ b/Client/PVFunctions/CommanderVote.sqf
@@ -0,0 +1,11 @@
+Private["_commanderTeam","_text"];
+
+_commanderTeam = _this;
+
+_text = Localize "STR_WF_CHAT_AI_Commander";
+if (!IsNull _commanderTeam) then {
+ _text = Format[localize "STR_WF_CHAT_VoteForNewCommander",name (leader _commanderTeam)];
+ if (group player == _commanderTeam) then {_text = localize "STR_WF_CHAT_PlayerCommander"};
+};
+
+[_text] Call TitleTextMessage; \ No newline at end of file
diff --git a/Client/PVFunctions/DisplayICBM.sqf b/Client/PVFunctions/DisplayICBM.sqf
new file mode 100644
index 0000000..170c5a9
--- /dev/null
+++ b/Client/PVFunctions/DisplayICBM.sqf
@@ -0,0 +1,6 @@
+Private ["_cruise","_obj"];
+
+_obj = _this select 0;
+_cruise = _this select 1;
+waitUntil {!alive _cruise || isNull _cruise};
+[_obj] Spawn Nuke; \ No newline at end of file
diff --git a/Client/PVFunctions/EndGame.sqf b/Client/PVFunctions/EndGame.sqf
new file mode 100644
index 0000000..890850e
--- /dev/null
+++ b/Client/PVFunctions/EndGame.sqf
@@ -0,0 +1,9 @@
+Private["_blist","_side","_sideValue"];
+
+_sideValue = _this select 0;
+_blist = _this select 1;
+gameOver = true;
+_side = east;
+if (_sideValue == WESTID) then {_side = west};
+
+[_side,_blist] ExecVM "Client\Client_EndGame.sqf"; \ No newline at end of file
diff --git a/Client/PVFunctions/ISIS_AddAction.sqf b/Client/PVFunctions/ISIS_AddAction.sqf
new file mode 100644
index 0000000..26bd186
--- /dev/null
+++ b/Client/PVFunctions/ISIS_AddAction.sqf
@@ -0,0 +1,5 @@
+Private ["_unit"];
+_unit = _this;
+
+_unit setVariable ['hasAction',true];
+_unit addAction ["<t color='#FE7F69'>First Aid</t>","Client\Module\ISIS\ISIS_Action.sqf", "", 2, false, true, "", "(_target getVariable 'stunned') && alive _target && _this != _target"]; \ No newline at end of file
diff --git a/Client/PVFunctions/LocalizeMessage.sqf b/Client/PVFunctions/LocalizeMessage.sqf
new file mode 100644
index 0000000..0dfbe80
--- /dev/null
+++ b/Client/PVFunctions/LocalizeMessage.sqf
@@ -0,0 +1,23 @@
+Private["_localize","_txt"];
+
+_localize = _this select 0;
+
+_txt = "";
+switch (_localize) do {
+ case "BuildingTeamkill": {_txt = Format [Localize "STR_WF_CHAT_Teamkill_Building",_this select 1, _this select 2, _this select 3]};
+ case "Teamswap": {_txt = Format [Localize "STR_WF_CHAT_Teamswap",_this select 1, _this select 2, _this select 3, _this select 4]};
+ case "UpgradeComplete": {_txt = Format [Localize "STR_WF_CHAT_Upgrade_Complete_Message",('WFBE_UPGRADELABELS' Call GetNamespace) select (_this select 1), _this select 2]};
+ case "CommanderDisconnected": {_txt = Localize "strwfcommanderdisconnected"};
+ case "TacticalLaunch": {_txt = Localize "STR_WF_CHAT_ICBM_Launch"};
+ case "Teamkill": {_txt = Format [Localize "STR_WF_CHAT_Teamkill",('WFBE_TEAMKILLPENALTY' Call GetNamespace)]; -('WFBE_TEAMKILLPENALTY' Call GetNamespace) Call ChangePlayerFunds};
+ case "FundsTransfer": {_txt = Format [Localize "STR_WF_CHAT_FundsTransfer",_this select 1,_this select 2]};
+ case "StructureSold": {_txt = Format [Localize "STR_WF_CHAT_Structure_Sold",([_this select 1,'displayName'] Call GetConfigInfo)]};
+ case "StructureSell": {_txt = Format [Localize "STR_WF_CHAT_Structure_Sell",([_this select 1,'displayName'] Call GetConfigInfo),_this select 2]};
+ case "SecondaryAward": {_txt = Format [Localize "STR_WF_CHAT_Secondary_Award",_this select 1, _this select 2];(_this select 2) Call ChangePlayerFunds};
+};
+
+if (_localize != 'FundsTransfer') then {
+ _txt Call CommandChatMessage;
+} else {
+ _txt Call GroupChatMessage;
+}; \ No newline at end of file
diff --git a/Client/PVFunctions/M_BASE_Attack.sqf b/Client/PVFunctions/M_BASE_Attack.sqf
new file mode 100644
index 0000000..280505b
--- /dev/null
+++ b/Client/PVFunctions/M_BASE_Attack.sqf
@@ -0,0 +1,85 @@
+Private ['_cpt','_exit','_groups','_id','_label','_marker','_markers','_properPos','_ranpos','_size','_target','_task','_tpos'];
+
+_size = _this select 0;
+_label = _this select 1;
+_id = _this select 2;
+_target = _this select 3;
+_groups = _this select 4;
+
+_marker = Format["%1%2",_label,_id];
+//--- Does the client already have the mission (jip handler, some client joining won't have it running)?
+if (((getMarkerPos _marker) select 0) != 0 && ((getMarkerPos _marker) select 1) != 0) exitWith {};
+
+_tpos = getPos _target;
+_ranpos = [(_tpos select 0)-(random 50)+(random 50),(_tpos select 1)-(random 50)+(random 50)];
+_properPos = [(_ranpos select 0)-(_size / 2),(_ranpos select 1)-(_size / 2)];
+
+//--- Inform the player about a new task.
+taskHint [format [localize "str_taskNew" + "\n%1",localize 'STR_WF_M_BASE_Attack'], [1,1,1,1], "taskNew"];
+
+//--- Task.
+_task = player createSimpleTask [Format["TSK_M_%1%2",_label,_id]];
+_task setSimpleTaskDescription [localize 'STR_WF_M_BASE_Attack_Description', localize 'STR_WF_M_BASE_Attack', localize 'STR_WF_M_BASE_Attack'];
+_task setSimpleTaskDestination _ranpos;
+
+//--- Marker part.
+_markers = [_marker];
+createMarkerLocal [_marker, _ranpos];
+_marker setMarkerColorLocal "ColorRed";
+_marker setMarkerShapeLocal "ELLIPSE";
+_marker setMarkerBrushLocal "BORDER";
+_marker setMarkerSizeLocal [_size,_size];
+_marker = Format["0%1%2",_label,_id];
+_markers = _markers + [_marker];
+createMarkerLocal [_marker, _ranpos];
+_marker setMarkerColorLocal "ColorRed";
+_marker setMarkerShapeLocal "ELLIPSE";
+_marker setMarkerBrushLocal "FDIAGONAL";
+_marker setMarkerSizeLocal [_size,_size];
+_marker = Format["00%1%2",_label,_id];
+_markers = _markers + [_marker];
+createMarkerLocal [_marker, _properPos];
+_marker setMarkerColorLocal "ColorRedAlpha";
+_marker setMarkerTypeLocal "mil_marker";
+_marker setMarkerSizeLocal [0.5,0.5];
+_marker setMarkerTextLocal "Targetted Area";
+
+//--- Wait for the unit to be spawned.
+waitUntil {
+ sleep 1;
+
+ _exit = false;
+ {
+ if (count (units _x) > 0) then {_exit = true};
+ } forEach _groups;
+
+ _exit
+};
+
+//--- Mission run while the enemies are here.
+waitUntil {
+ sleep 1;
+
+ _cpt = 0;
+ {
+ if !(isNil '_x') then {
+ _cpt = _cpt + (count ((units _x) Call GetLiveUnits));
+ };
+ } forEach _groups;
+
+ _cpt == 0
+};
+
+sleep 10;
+
+//--- Validate the mission for the player.
+_task setTaskState 'Succeeded';
+taskHint [format [localize "str_taskAccomplished" + "\n%1",localize 'STR_WF_M_BASE_Attack'], [1,1,1,1], "taskDone"];
+
+{_x setMarkerColorLocal "ColorGreenAlpha"} forEach _markers;
+
+sleep 30;
+
+//--- Remove the task & markers.
+player removeSimpleTask _task;
+{deleteMarkerLocal _x} forEach _markers; \ No newline at end of file
diff --git a/Client/PVFunctions/M_PLAYERS_Attack_Air.sqf b/Client/PVFunctions/M_PLAYERS_Attack_Air.sqf
new file mode 100644
index 0000000..6f14195
--- /dev/null
+++ b/Client/PVFunctions/M_PLAYERS_Attack_Air.sqf
@@ -0,0 +1,28 @@
+Private ['_get','_id','_label','_marker','_task'];
+
+_chopper = _this select 0;
+_label = _this select 1;
+_id = _this select 2;
+
+_get = Format["WFBE_TSK_M_%1%2",_label,_id] Call GetNamespace;
+if !(isNil '_get') exitWith {};
+
+taskHint [format [localize "str_taskNew" + "\n%1",localize 'STR_WF_M_PLAYERS_Attack_Air'], [1,1,1,1], "taskNew"];
+
+_task = player createSimpleTask [Format["TSK_M_%1%2",_label,_id]];
+[Format["WFBE_TSK_M_%1%2",_label,_id],true,true] Call SetNamespace;
+_task setSimpleTaskDescription [localize 'STR_WF_M_PLAYERS_Attack_Air_Description', localize 'STR_WF_M_PLAYERS_Attack_Air', localize 'STR_WF_M_PLAYERS_Attack_Air'];
+_task setSimpleTaskTarget [_chopper, false];
+
+//--- Wait for the result.
+waitUntil {sleep 5; !alive _chopper};
+
+_task setTaskState "Succeeded";
+taskHint [format [localize "str_taskAccomplished" + "\n%1",localize 'STR_WF_M_PLAYERS_Attack_Air'], [1,1,1,1], "taskDone"];
+
+sleep 30;
+
+[Format["WFBE_TSK_M_%1%2",_label,_id],nil,true] Call SetNamespace;
+
+//--- Remove the task & markers.
+player removeSimpleTask _task; \ No newline at end of file
diff --git a/Client/PVFunctions/M_TOWN_Attack.sqf b/Client/PVFunctions/M_TOWN_Attack.sqf
new file mode 100644
index 0000000..1f3dbd3
--- /dev/null
+++ b/Client/PVFunctions/M_TOWN_Attack.sqf
@@ -0,0 +1,84 @@
+Private ['_cpt','_exit','_groups','_id','_label','_marker','_markers','_properPos','_size','_task','_town','_townPos'];
+
+_size = _this select 0;
+_label = _this select 1;
+_id = _this select 2;
+_town = _this select 3;
+_groups = _this select 4;
+
+_marker = Format["%1%2",_label,_id];
+//--- Does the client already have the mission (jip handler, some client joining won't have it running)?
+if (((getMarkerPos _marker) select 0) != 0 && ((getMarkerPos _marker) select 1) != 0) exitWith {};
+
+_townPos = getPos _town;
+_properPos = [(_townPos select 0)-(_size / 2),(_townPos select 1)-(_size / 2)];
+
+//--- Inform the player about a new task.
+taskHint [format [localize "str_taskNew" + "\n%1",Format[localize 'STR_WF_M_TOWN_Attack',_town getVariable "name"]], [1,1,1,1], "taskNew"];
+
+//--- Task.
+_task = player createSimpleTask [Format["TSK_M_%1%2",_label,_id]];
+_task setSimpleTaskDescription [Format[localize 'STR_WF_M_TOWN_Attack_Description',_town getVariable "name"], Format[localize 'STR_WF_M_TOWN_Attack',_town getVariable "name"], Format[localize 'STR_WF_M_TOWN_Attack',_town getVariable "name"]];
+_task setSimpleTaskDestination _properPos;
+
+//--- Marker part.
+_markers = [_marker];
+createMarkerLocal [_marker, _townPos];
+_marker setMarkerColorLocal "ColorRed";
+_marker setMarkerShapeLocal "ELLIPSE";
+_marker setMarkerBrushLocal "BORDER";
+_marker setMarkerSizeLocal [_size,_size];
+_marker = Format["0%1%2",_label,_id];
+_markers = _markers + [_marker];
+createMarkerLocal [_marker, _townPos];
+_marker setMarkerColorLocal "ColorRed";
+_marker setMarkerShapeLocal "ELLIPSE";
+_marker setMarkerBrushLocal "FDIAGONAL";
+_marker setMarkerSizeLocal [_size,_size];
+_marker = Format["00%1%2",_label,_id];
+_markers = _markers + [_marker];
+createMarkerLocal [_marker, _properPos];
+_marker setMarkerColorLocal "ColorRedAlpha";
+_marker setMarkerTypeLocal "mil_marker";
+_marker setMarkerSizeLocal [0.5,0.5];
+_marker setMarkerTextLocal "Targetted Area";
+
+//--- Wait for the unit to be spawned.
+waitUntil {
+ sleep 1;
+
+ _exit = false;
+ {
+ if (count (units _x) > 0) then {_exit = true};
+ } forEach _groups;
+
+ _exit
+};
+
+//--- Mission run while the enemies are here.
+waitUntil {
+ sleep 1;
+
+ _cpt = 0;
+ {
+ if !(isNil '_x') then {
+ _cpt = _cpt + (count ((units _x) Call GetLiveUnits));
+ };
+ } forEach _groups;
+
+ _cpt == 0
+};
+
+sleep 10;
+
+//--- Validate the mission for the player.
+_task setTaskState 'Succeeded';
+taskHint [format [localize "str_taskAccomplished" + "\n%1", Format[localize 'STR_WF_M_TOWN_Attack',_town getVariable "name"]], [1,1,1,1], "taskDone"];
+
+{_x setMarkerColorLocal "ColorGreenAlpha"} forEach _markers;
+
+sleep 30;
+
+//--- Remove the task & markers.
+player removeSimpleTask _task;
+{deleteMarkerLocal _x} forEach _markers; \ No newline at end of file
diff --git a/Client/PVFunctions/M_UAV_RetrieveModule.sqf b/Client/PVFunctions/M_UAV_RetrieveModule.sqf
new file mode 100644
index 0000000..60f734f
--- /dev/null
+++ b/Client/PVFunctions/M_UAV_RetrieveModule.sqf
@@ -0,0 +1,65 @@
+Private ['_id','_label','_marker','_markerRanPos','_markers','_randomPos','_searchArea','_sideWin','_size','_task','_taskState','_uav'];
+
+_size = _this select 0;
+_label = _this select 1;
+_id = _this select 2;
+_uav = _this select 3;
+
+_marker = Format["%1%2",_label,_id];
+//--- Does the client already have the mission (jip handler, some client joining won't have it running)?
+if (((getMarkerPos _marker) select 0) != 0 && ((getMarkerPos _marker) select 1) != 0) exitWith {};
+
+taskHint [format [localize "str_taskNew" + "\n%1",localize 'STR_WF_M_UAV_RetrieveModule'], [1,1,1,1], "taskNew"];
+
+_randomPos = getPos _uav;
+
+//--- Determine the marker random area.
+_searchArea = (_size/1.5);
+_markerRanPos = [(_randomPos select 0)+random(_searchArea)-random(_searchArea),(_randomPos select 1)+random(_searchArea)-random(_searchArea)];
+
+_task = player createSimpleTask [Format["TSK_M_%1%2",_label,_id]];
+_task setSimpleTaskDescription [localize 'STR_WF_M_UAV_RetrieveModule_Description', localize 'STR_WF_M_UAV_RetrieveModule', localize 'STR_WF_M_UAV_RetrieveModule'];
+_task setSimpleTaskDestination _markerRanPos;
+
+//--- Marker part.
+_markers = [_marker];
+createMarkerLocal [_marker, _markerRanPos];
+_marker setMarkerColorLocal "ColorYellow";
+_marker setMarkerShapeLocal "ELLIPSE";
+_marker setMarkerBrushLocal "BORDER";
+_marker setMarkerSizeLocal [_size,_size];
+_marker = Format["0%1%2",_label,_id];
+_markers = _markers + [_marker];
+createMarkerLocal [_marker, _markerRanPos];
+_marker setMarkerColorLocal "ColorYellow";
+_marker setMarkerShapeLocal "ELLIPSE";
+_marker setMarkerBrushLocal "FDIAGONAL";
+_marker setMarkerSizeLocal [_size,_size];
+_marker = Format["00%1%2",_label,_id];
+_markers = _markers + [_marker];
+createMarkerLocal [_marker, _markerRanPos];
+_marker setMarkerColorLocal "ColorYellow";
+_marker setMarkerTypeLocal "pickup";
+_marker setMarkerSizeLocal [0.5,0.5];
+_marker setMarkerTextLocal "UAV Crash Site";
+
+//--- Wait for the result.
+waitUntil {sleep 5; _sideWin = _uav getVariable 'side'; !(isNil '_sideWin')};
+_taskState = if (side player == (_uav getVariable 'side')) then {"Succeeded"} else {"Failed"};
+
+//--- Wait for mission completion.
+waitUntil {sleep 5; (isNull _uav)};
+
+_task setTaskState _taskState;
+
+if (_taskState == 'Succeeded') then {
+ taskHint [format [localize "str_taskAccomplished" + "\n%1",localize 'STR_WF_M_UAV_RetrieveModule'], [1,1,1,1], "taskDone"];
+} else {
+ taskHint [format [localize "str_taskFailed" + "\n%1",localize 'STR_WF_M_UAV_RetrieveModule'], [1,1,1,1], "taskFailed"];
+};
+
+sleep 30;
+
+//--- Remove the task & markers.
+player removeSimpleTask _task;
+{deleteMarkerLocal _x} forEach _markers; \ No newline at end of file
diff --git a/Client/PVFunctions/Penalty.sqf b/Client/PVFunctions/Penalty.sqf
new file mode 100644
index 0000000..2ae2291
--- /dev/null
+++ b/Client/PVFunctions/Penalty.sqf
@@ -0,0 +1,9 @@
+Private['_fee','_pfunds','_result'];
+
+_fee = 'WFBE_CIVILIANPENALTY' Call GetNamespace;
+Format[Localize "STR_WF_CHAT_Penalty",_fee] Call GroupChatMessage;
+
+_pfunds = Call GetPlayerFunds;
+_result = _pfunds - _fee;
+if (_result < 0) then {_fee = _fee + _result};
+-(_fee) Call ChangePlayerFunds; \ No newline at end of file
diff --git a/Client/PVFunctions/PerformAction.sqf b/Client/PVFunctions/PerformAction.sqf
new file mode 100644
index 0000000..b57bfad
--- /dev/null
+++ b/Client/PVFunctions/PerformAction.sqf
@@ -0,0 +1,10 @@
+Private ['_action','_from','_unit'];
+_unit = _this select 0;
+_action = _this select 1;
+_from = _this select 2;
+
+_unit action [_action, _from];
+
+switch (_action) do {
+ case "EJECT": {unassignVehicle _unit};
+};
diff --git a/Client/PVFunctions/SetHQStatus.sqf b/Client/PVFunctions/SetHQStatus.sqf
new file mode 100644
index 0000000..8970dd8
--- /dev/null
+++ b/Client/PVFunctions/SetHQStatus.sqf
@@ -0,0 +1,5 @@
+if (_this) then {
+ ['WFBE_AREAHQDEPLOYED' Call GetNamespace,true,MCoin] Call Compile preprocessFile "Client\Init\Init_Coin.sqf";
+} else {
+ ['WFBE_AREAHQUNDEPLOYED' Call GetNamespace,false,MCoin] Call Compile preprocessFile "Client\Init\Init_Coin.sqf";
+}; \ No newline at end of file
diff --git a/Client/PVFunctions/SetTask.sqf b/Client/PVFunctions/SetTask.sqf
new file mode 100644
index 0000000..fa33e86
--- /dev/null
+++ b/Client/PVFunctions/SetTask.sqf
@@ -0,0 +1,36 @@
+Private ["_task","_taskPos","_taskTime","_taskTimeLabel"];
+
+_task = _this select 0;
+_taskTime = _this select 1;
+_taskTimeLabel = _this select 2;
+_taskPos = _this select 3;
+
+if (!isNull(comTask)) then {player removeSimpleTask comTask};
+comTask = player createSimpleTask ["CommanderOrder"];
+comTask setSimpleTaskDescription [Format[localize "STR_WF_CHAT_TaskTO_Display",_task,_taskTimeLabel], _task, _task];
+comTask setSimpleTaskDestination _taskPos;
+player setCurrentTask comTask;
+
+taskHint [format [localize "str_taskNew" + "\n%1",_task], [1,1,1,1], "taskNew"];
+
+[comTask,_taskTime,_taskPos,_task] Spawn {
+ Private ["_duration","_pos","_succeed","_task","_timer","_type"];
+ _task = _this select 0;
+ _duration = (_this select 1)*60; //--- Converts to seconds.
+ _pos = _this select 2;
+ _type = _this select 3;
+
+ _timer = 0;
+ _succeed = false;
+ while {(taskDestination _task) select 0 == (_pos select 0) && !_succeed} do {
+ sleep 5;
+ if (player distance _pos < 250) then {_timer = _timer + 5};
+ if (_timer > _duration) then {_succeed = true};
+ };
+
+ if (_succeed) then {
+ taskHint [format [localize "str_taskAccomplished" + "\n%1",_type], [1,1,1,1], "taskDone"];
+ _task setTaskState "Succeeded";
+ player kbTell [sideHQ, WFBE_V_HQTopicSide, "OrderDone",["1","","HQ",["HQ"]],["2","","We are",["WeAre"]],["3","","ready for orders",["ReadyForOrders"]],["4","","over.",["Over1"]],true];
+ };
+}; \ No newline at end of file
diff --git a/Client/PVFunctions/SetVehicleLock.sqf b/Client/PVFunctions/SetVehicleLock.sqf
new file mode 100644
index 0000000..880533d
--- /dev/null
+++ b/Client/PVFunctions/SetVehicleLock.sqf
@@ -0,0 +1 @@
+(_this select 0) lock (_this select 1); \ No newline at end of file
diff --git a/Client/PVFunctions/TownCaptured.sqf b/Client/PVFunctions/TownCaptured.sqf
new file mode 100644
index 0000000..4254ea2
--- /dev/null
+++ b/Client/PVFunctions/TownCaptured.sqf
@@ -0,0 +1,98 @@
+Private ["_award","_bounty","_location","_locationName","_marker1","_mysqlUpdate","_name","_newScore","_objective","_ptask","_range","_sideName","_sideToValue","_sideValue","_task","_units"];
+
+_location = _this Select 0;
+_sideValue = _this Select 1;
+_sideToValue = _this Select 2;
+_name = str _location;
+_mysqlUpdate = "";
+
+if (_sideToValue != sideID || !clientInitComplete) exitWith {};
+
+_task = _location getVariable 'taskLink';
+_ptask = currentTask player;
+if (isNil '_task') then {_task = objNull};
+_locationName = _location getVariable "name";
+
+_marker1 = Format["%1Depot",_name];
+_sideName = localize "STR_WF_Side_Resistance";
+
+if (_sideValue == WESTID) then {_sideName = localize "STR_WF_PARAMETER_Side_West"};
+if (_sideValue == EASTID) then {_sideName = localize "STR_WF_PARAMETER_Side_East"};
+if (_sideValue == sideID) then {_marker1 setMarkerColorLocal ("Friendly" Call GetMarkerColoration)} else {_marker1 setMarkerColorLocal ("Enemy" Call GetMarkerColoration)};
+if (_sideValue == RESISTANCEID) then {_marker1 setMarkerColorLocal ("Resistance" Call GetMarkerColoration)};
+
+if (time > 10) then {[Format[Localize "STR_WF_CHAT_Town_Captured",_locationName,_sideName]] Call TitleTextMessage};
+
+if (_sideValue == sideID) then {
+ _award = false;
+ if ((leader group player) == player) then {
+ _units = units group player;
+ {if (vehicle _x distance _location < ('WFBE_TOWNCAPTURERANGE' Call GetNamespace)) then {_award = true}} forEach _units;
+ };
+
+ if (player distance _location < ('WFBE_TOWNCAPTURERANGE' Call GetNamespace) || _award) then {
+ if (_task == _ptask) then {
+ ["TownHintDone",_location] Spawn TaskSystem;
+ ('WFBE_TOWNMISSIONCAPTUREBOUNTY' Call GetNamespace) Call ChangePlayerFunds;
+ WFBE_RequestChangeScore = ['SRVFNCREQUESTCHANGESCORE',[player,score player + ('WFBE_SCORECAPTURETOWN' Call GetNamespace)]];
+ publicVariable 'WFBE_RequestChangeScore';
+ if (isHostedServer) then {['SRVFNCREQUESTCHANGESCORE',[player,score player + ('WFBE_SCORECAPTURETOWN' Call GetNamespace)]] Spawn HandleSPVF};
+ Format[Localize "STR_WF_CHAT_Town_Bounty_Full",_locationName,('WFBE_TOWNMISSIONCAPTUREBOUNTY' Call GetNamespace)] Call CommandChatMessage;
+ _mysqlUpdate = "towncaptured";
+ } else {
+ ('WFBE_TOWNCAPTUREBOUNTY' Call GetNamespace) Call ChangePlayerFunds;
+ WFBE_RequestChangeScore = ['SRVFNCREQUESTCHANGESCORE',[player,score player + ('WFBE_SCORECAPTURETOWN' Call GetNamespace)]];
+ publicVariable 'WFBE_RequestChangeScore';
+ if (isHostedServer) then {['SRVFNCREQUESTCHANGESCORE',[player,score player + ('WFBE_SCORECAPTURETOWN' Call GetNamespace)]] Spawn HandleSPVF};
+ Format[Localize "STR_WF_CHAT_Town_Bounty_Full",_locationName,('WFBE_TOWNCAPTUREBOUNTY' Call GetNamespace)] Call CommandChatMessage;
+ _mysqlUpdate = "towncaptured";
+ };
+ } else {
+ _range = (_location getVariable "range") * ('WFBE_TOWNCAPTUREASSISTRANGEMODIFIER' Call GetNamespace);
+ if (player distance _location < _range) then {
+ if (_task == _ptask) then {
+ ["TownHintDone",_location] Spawn TaskSystem;
+ ('WFBE_TOWNMISSIONASSISTCAPTUREBOUNTY' Call GetNamespace) Call ChangePlayerFunds;
+ WFBE_RequestChangeScore = ['SRVFNCREQUESTCHANGESCORE',[player,score player + ('WFBE_SCOREASSISTCAPTURETOWN' Call GetNamespace)]];
+ publicVariable 'WFBE_RequestChangeScore';
+ if (isHostedServer) then {['SRVFNCREQUESTCHANGESCORE',[player,score player + ('WFBE_SCOREASSISTCAPTURETOWN' Call GetNamespace)]] Spawn HandleSPVF};
+ Format[Localize "STR_WF_CHAT_Town_Bounty_Full",_locationName,('WFBE_TOWNMISSIONASSISTCAPTUREBOUNTY' Call GetNamespace)] Call CommandChatMessage;
+ _mysqlUpdate = "townassist";
+ } else {
+ ('WFBE_TOWNASSISTCAPTUREBOUNTY' Call GetNamespace) Call ChangePlayerFunds;
+ WFBE_RequestChangeScore = ['SRVFNCREQUESTCHANGESCORE',[player,score player + ('WFBE_SCOREASSISTCAPTURETOWN' Call GetNamespace)]];
+ publicVariable 'WFBE_RequestChangeScore';
+ if (isHostedServer) then {['SRVFNCREQUESTCHANGESCORE',[player,score player + ('WFBE_SCOREASSISTCAPTURETOWN' Call GetNamespace)]] Spawn HandleSPVF};
+ Format[Localize "STR_WF_CHAT_Town_Bounty_Assist",_locationName,('WFBE_TOWNASSISTCAPTUREBOUNTY' Call GetNamespace)] Call CommandChatMessage;
+ _mysqlUpdate = "townassist";
+ };
+ };
+ };
+};
+
+if (mysql) then {
+ if (_mysqlUpdate != "") then {
+ WF_Logic setVariable ["WF_MYSQL_CLIENT",(WF_Logic getVariable "WF_MYSQL_CLIENT") + [Format ["MYSQLDATA?WFBE_Update?%1?%2?%3?%4",getPlayerUID(player),name player,_mysqlUpdate,worldName]],true];
+ };
+};
+
+if (!isNull commanderTeam && sideID == _sideValue) then {
+ if (commanderTeam == group player) then {
+ _bounty = (_location getVariable "startingSupplyValue") * ('WFBE_COMMANDERTOWNCAPTURECOEF' Call GetNamespace);
+ _bounty Call ChangePlayerFunds;
+ WFBE_RequestChangeScore = ['SRVFNCREQUESTCHANGESCORE',[player,score player + ('WFBE_COMMANDERTOWNCAPTURESCORE' Call GetNamespace)]];
+ publicVariable 'WFBE_RequestChangeScore';
+ if (isHostedServer) then {['SRVFNCREQUESTCHANGESCORE',[player,score player + ('WFBE_COMMANDERTOWNCAPTURESCORE' Call GetNamespace)]] Spawn HandleSPVF};
+ Format[Localize "STR_WF_CHAT_Commander_Bounty_Town",_bounty,_locationName] Call CommandChatMessage;
+ };
+};
+
+/* Task Handling */
+["TownUpdate",_location] Spawn TaskSystem;
+if (sideID == _sideValue) then {
+ if !(isNull _task) then {
+ if (_ptask == _task) then {
+ ["TownAssignClosest"] Spawn TaskSystem;
+ };
+ };
+}; \ No newline at end of file
diff --git a/Client/PVFunctions/TownCapturedPublic.sqf b/Client/PVFunctions/TownCapturedPublic.sqf
new file mode 100644
index 0000000..4d9df03
--- /dev/null
+++ b/Client/PVFunctions/TownCapturedPublic.sqf
@@ -0,0 +1,96 @@
+Private ["_award","_bounty","_location","_locationName","_marker1","_mysqlUpdate","_name","_locations","_objective","_ptask","_range","_side","_sideName","_sideValue","_task","_units"];
+
+_location = _this select 0;
+_sideValue = _this select 1;
+
+if !(clientInitComplete) exitWith {};
+
+_name = str _location;
+_mysqlUpdate = "";
+
+_task = _location getVariable 'taskLink';
+_ptask = currentTask player;
+if (isNil '_task') then {_task = objNull};
+_locationName = _location getVariable "name";
+
+_sideName = localize "STR_WF_PARAMETER_Side_East";
+if (_sideValue == WESTID) then {_sideName = localize "STR_WF_PARAMETER_Side_West"};
+
+[Format[Localize "STR_WF_CHAT_Town_Captured",_locationName,_sideName]] Call TitleTextMessage;
+_marker1 = Format["%1Depot",_name];
+
+if (_sideValue == sideID) then {_marker1 setMarkerColorLocal ("Friendly" Call GetMarkerColoration)} else {_marker1 setMarkerColorLocal ("Enemy" Call GetMarkerColoration)};
+
+if (_sideValue == sideID) then {
+ _award = false;
+ if ((Leader Group player) == player) then {
+ _units = Units Group player;
+ {if (vehicle _x distance _location < ('WFBE_TOWNCAPTURERANGE' Call GetNamespace)) then {_award = true};} ForEach _units;
+ };
+
+ if (player distance _location < ('WFBE_TOWNCAPTURERANGE' Call GetNamespace) || _award) then {
+ if (_task == _ptask) then {
+ ["TownHintDone",_location] Spawn TaskSystem;
+ ('WFBE_TOWNMISSIONCAPTUREBOUNTY' Call GetNamespace) Call ChangePlayerFunds;
+ WFBE_RequestChangeScore = ['SRVFNCREQUESTCHANGESCORE',[player,score player + ('WFBE_SCORECAPTURETOWN' Call GetNamespace)]];
+ publicVariable 'WFBE_RequestChangeScore';
+ if (isHostedServer) then {['SRVFNCREQUESTCHANGESCORE',[player,score player + ('WFBE_SCORECAPTURETOWN' Call GetNamespace)]] Spawn HandleSPVF};
+ Format[Localize "STR_WF_CHAT_Town_Bounty_Full",_locationName,('WFBE_TOWNMISSIONCAPTUREBOUNTY' Call GetNamespace)] Call CommandChatMessage;
+ _mysqlUpdate = "towncaptured";
+ } else {
+ ('WFBE_TOWNCAPTUREBOUNTY' Call GetNamespace) Call ChangePlayerFunds;
+ WFBE_RequestChangeScore = ['SRVFNCREQUESTCHANGESCORE',[player,score player + ('WFBE_SCORECAPTURETOWN' Call GetNamespace)]];
+ publicVariable 'WFBE_RequestChangeScore';
+ if (isHostedServer) then {['SRVFNCREQUESTCHANGESCORE',[player,score player + ('WFBE_SCORECAPTURETOWN' Call GetNamespace)]] Spawn HandleSPVF};
+ Format[Localize "STR_WF_CHAT_Town_Bounty_Full",_locationName,('WFBE_TOWNCAPTUREBOUNTY' Call GetNamespace)] Call CommandChatMessage;
+ _mysqlUpdate = "towncaptured";
+ };
+ } else {
+ _range = (_location getVariable "range") * ('WFBE_TOWNCAPTUREASSISTRANGEMODIFIER' Call GetNamespace);
+ if (player distance _location < _range) then {
+ if (_task == _ptask) then {
+ ["TownHintDone",_location] Spawn TaskSystem;
+ ('WFBE_TOWNMISSIONASSISTCAPTUREBOUNTY' Call GetNamespace) Call ChangePlayerFunds;
+ WFBE_RequestChangeScore = ['SRVFNCREQUESTCHANGESCORE',[player,score player + ('WFBE_SCOREASSISTCAPTURETOWN' Call GetNamespace)]];
+ publicVariable 'WFBE_RequestChangeScore';
+ if (isHostedServer) then {['SRVFNCREQUESTCHANGESCORE',[player,score player + ('WFBE_SCOREASSISTCAPTURETOWN' Call GetNamespace)]] Spawn HandleSPVF};
+ Format[Localize "STR_WF_CHAT_Town_Bounty_Full",_locationName,('WFBE_TOWNMISSIONASSISTCAPTUREBOUNTY' Call GetNamespace)] Call CommandChatMessage;
+ _mysqlUpdate = "townassist";
+ } else {
+ ('WFBE_TOWNASSISTCAPTUREBOUNTY' Call GetNamespace) Call ChangePlayerFunds;
+ WFBE_RequestChangeScore = ['SRVFNCREQUESTCHANGESCORE',[player,score player + ('WFBE_SCOREASSISTCAPTURETOWN' Call GetNamespace)]];
+ publicVariable 'WFBE_RequestChangeScore';
+ if (isHostedServer) then {['SRVFNCREQUESTCHANGESCORE',[player,score player + ('WFBE_SCOREASSISTCAPTURETOWN' Call GetNamespace)]] Spawn HandleSPVF};
+ Format[Localize "STR_WF_CHAT_Town_Bounty_Assist",_locationName,('WFBE_TOWNASSISTCAPTUREBOUNTY' Call GetNamespace)] Call CommandChatMessage;
+ _mysqlUpdate = "townassist";
+ };
+ };
+ };
+};
+
+if (mysql) then {
+ if (_mysqlUpdate != "") then {
+ WF_Logic setVariable ["WF_MYSQL_CLIENT",(WF_Logic getVariable "WF_MYSQL_CLIENT") + [Format ["MYSQLDATA?WFBE_Update?%1?%2?%3?%4",getPlayerUID(player),name player,_mysqlUpdate,worldName]],true];
+ };
+};
+
+if (!isNull commanderTeam && sideID == _sideValue) then {
+ if (commanderTeam == Group player) then {
+ _bounty = (_location getVariable "startingSupplyValue") * ('WFBE_COMMANDERTOWNCAPTURECOEF' Call GetNamespace);
+ _bounty Call ChangePlayerFunds;
+ WFBE_RequestChangeScore = ['SRVFNCREQUESTCHANGESCORE',[player,score player + ('WFBE_COMMANDERTOWNCAPTURESCORE' Call GetNamespace)]];
+ publicVariable 'WFBE_RequestChangeScore';
+ if (isHostedServer) then {['SRVFNCREQUESTCHANGESCORE',[player,score player + ('WFBE_COMMANDERTOWNCAPTURESCORE' Call GetNamespace)]] Spawn HandleSPVF};
+ Format[Localize "STR_WF_CHAT_Commander_Bounty_Town",_bounty,_locationName] Call CommandChatMessage;
+ };
+};
+
+/* Task Handling */
+["TownUpdate",_location] Spawn TaskSystem;
+if (sideID == _sideValue) then {
+ if !(isNull _task) then {
+ if (_ptask == _task) then {
+ ["TownAssignClosest"] Spawn TaskSystem;
+ };
+ };
+}; \ No newline at end of file
diff --git a/Client/PVFunctions/UAV_Reveal.sqf b/Client/PVFunctions/UAV_Reveal.sqf
new file mode 100644
index 0000000..c2b1857
--- /dev/null
+++ b/Client/PVFunctions/UAV_Reveal.sqf
@@ -0,0 +1,27 @@
+/*
+ Author: Benny
+ Name: UAV_Reveal.sqf
+ Parameters:
+ 0 - UAV
+ 1 - Target
+ Description:
+ This file handle the client's UAV broadcast, a client send info to the others.
+*/
+
+Private ['_marker','_size','_target','_uav'];
+_uav = _this select 0;
+_target = _this select 1;
+
+if (typeName _uav != 'OBJECT' || typeName _target != 'OBJECT') exitWith {diag_log Format ["[WFBE (INFORMATION)][frameno:%3 | ticktime:%4] UAV_Reveal: An object is expected for both parameters given (UAV: %1 Target: %2).",_uav,_target,diag_frameno,diag_tickTime]};
+
+_size = round((_uav distance _target) / 16);
+_marker = Format["WFBE_UAV_SPOTTED_%1",unitMarker];
+unitMarker = unitMarker + 1;
+createMarkerLocal [_marker,[(getPos _target select 0) - random(_size) + random(_size),(getPos _target select 1) - random(_size) + random(_size),0]];
+_marker setMarkerShapeLocal "Ellipse";
+_marker setMarkerColorLocal "ColorOrange";
+_marker setMarkerSizeLocal [_size,_size];
+
+sleep (('WFBE_UAVSPOTTINGDELAY' Call GetNamespace)*3);
+
+deleteMarkerLocal _marker; \ No newline at end of file
diff --git a/Client/PVFunctions/VoteForCommander.sqf b/Client/PVFunctions/VoteForCommander.sqf
new file mode 100644
index 0000000..7bbb18e
--- /dev/null
+++ b/Client/PVFunctions/VoteForCommander.sqf
@@ -0,0 +1,9 @@
+
+private ["_voteTime"];
+if (votePopUp) then {
+ Private ["_voteTime"];
+ _voteTime = 0;
+ waitUntil {_voteTime = WF_Logic getVariable Format ["%1CommanderVoteTime",sideJoinedText];!isNil "_voteTime"};
+ if (_voteTime > 0 && !voted) then {CreateDialog "RscMenu_Voting"};
+ if (voted) then {voted = false};
+}; \ No newline at end of file
diff --git a/Client/kb/hq.bikb b/Client/kb/hq.bikb
new file mode 100644
index 0000000..221bba8
--- /dev/null
+++ b/Client/kb/hq.bikb
@@ -0,0 +1,190 @@
+#define SENTENCE(NAME) \
+ class NAME \
+ { \
+ text = $STR##NAME##; \
+ speech[] = {%1,##NAME##,%2}; \
+ class Arguments {class 1 {type = "simple";};class 2 {type = "simple";};}; \
+ };
+
+#define SENTENCE1(NAME) \
+class NAME \
+{ \
+ text = $STR##NAME##; \
+ speech[] = {##NAME##,%1,%2}; \
+ class Arguments {class 1 {type = "simple";};class 2 {type = "simple";};}; \
+};
+
+
+#define SENTENCE_KEY(NAME,KEY) \
+ class NAME \
+ { \
+ text = $##KEY##; \
+ speech[] = {%1, ##NAME##, %2}; \
+ class Arguments {class 1 {type = "simple";};class 2 {type = "simple";};}; \
+ };
+
+
+class Sentences
+{
+
+ class Test {text = "Test"; speech[] = {lopotev_present_in_hideout_1_R_1}; class Arguments {};};
+
+
+
+ class HQ {text = $STR_DN_WARFARE_HQ_BASE_UNFOLDED; speech[] = {HQ}; class Arguments {};};
+ /*
+
+ class 20MinutesLeft {text = "$20MinutesLeft"; speech[] = {20MinutesLeft}; class Arguments {};};
+ class 5MinutesLeft {text = "$5MinutesLeft"; speech[] = {5MinutesLeft}; class Arguments {};};
+
+
+ class Captured
+ {
+ text = $STRwftowncaptured;
+ speech[] = {%1, Captured};
+ class Arguments {class 1 {type = "simple";};};
+ };
+
+ */
+ class CapturedNear
+ {
+ text = "%1 captured near %2";
+ speech[] = {%1, CapturedNear, %2};
+ class Arguments
+ {
+ class 1 {type = "simple";};
+ class 2 {type = "simple";};
+ };
+ };
+ class LostAt
+ {
+ text = "%1 lost at %2";
+ speech[] = {%1, LostAt, %2};
+ class Arguments {class 1 {type = "simple";};class 2 {type = "simple";};};
+ };
+ class OrderSent
+ {
+ text = "%1 %2, %3";
+ speech[] = {%1 ,%2 ,%3};
+ class Arguments {
+ class 1 {type = "simple";};
+ class 2 {type = "simple";};
+ class 3 {type = "simple";};
+ class 4 {type = "simple";};
+ };
+ };
+ class OrderSentAll
+ {
+ text = "%1, %2, %3";
+ speech[] = {%1 ,%2 ,%3};
+ class Arguments {
+ class 1 {type = "simple";};
+ class 2 {type = "simple";};
+ class 3 {type = "simple";};
+ };
+ };
+ class OrderDone
+ {
+ text = "%1, %2 %3 %4";
+ speech[] = {%1 ,%2 ,%3 ,%4};
+ class Arguments {
+ class 1 {type = "simple";};
+ class 2 {type = "simple";};
+ class 3 {type = "simple";};
+ };
+ };
+ class simple
+ {
+ text = "%1";
+ speech[] = {%1};
+ class Arguments {
+ class 1 {type = "simple";};
+ };
+ };
+ class ExtractionTeam
+ {
+ text = "This is HQ, %1 is on the way, out.";
+ speech[] = {ThisIs, HQ, %1, Is, OnTheWay, Out};
+ class Arguments {
+ class 1 {type = "simple";};
+ };
+ };
+ class ExtractionTeamCancel
+ {
+ text = "This is HQ, Abort the op, %1 is in danger, out.";
+ speech[] = {ThisIs, HQ, aborttheop, %1, Is, In, DangerE, Out};
+ class Arguments {
+ class 1 {type = "simple";};
+ };
+ };
+ class MMissionFailed
+ {
+ text = "This is HQ, Mission Failure, carry on with your prior tasks, over.";
+ speech[] = {ThisIs, HQ, MissionFailure, CarryOnWithYourPriorTasksOver};
+ class Arguments {};
+ };
+ class MMissionComplete
+ {
+ text = "This is HQ, %1";
+ speech[] = {ThisIs, HQ, %1};
+ class Arguments {
+ class 1 {type = "simple";};
+ };
+ };
+
+ SENTENCE(10MinutesLeft)
+ SENTENCE(20MinutesLeft)
+ SENTENCE(5MinutesLeft)
+ SENTENCE(Accomplished)
+
+ SENTENCE_KEY(BaseUnderAtack,STRwfbaseunderattack)
+ SENTENCE(Cancelled)
+ SENTENCE(CanDoWereOnIt)
+ SENTENCE(Captured)
+ SENTENCE_KEY(HC_OrderReceived,"Order Received")
+ SENTENCE1(CiviliansUnderEnemyFireIn)
+ SENTENCE_KEY(Constructed,STRwfstructureconstructed)
+ SENTENCE(Deployed)
+ SENTENCE_KEY(Destroyed,STRwfbasestructuredestroyed)
+ SENTENCE(EnemyBaseLocated)
+ SENTENCE(EnemyForcesDetected)
+ SENTENCE(Failed)
+ SENTENCE1(HostilesDetectedNear)
+ SENTENCE1(Insufficient)
+ SENTENCE_KEY(IsUnderAttack,STRwftownunderattack)
+
+ SENTENCE(Lost)
+
+ SENTENCE(Mobilized)
+ SENTENCE(NegativeWeCannotDivert)
+ SENTENCE(NewIntelAvailable)
+ SENTENCE(NewMissionAvailable)
+ SENTENCE(NewSupportAvailable)
+
+ SENTENCE_KEY(UnderAttack,STRisunderattack)
+ SENTENCE_KEY(VotingForNewCommander,STRwfvoteforcommanderinprogress)
+
+
+ //((( TESTING SENTENCES ONLY (normally used ONLY as parameters to other sentences)
+ SENTENCE(AntiAirRadar)
+ SENTENCE(ArtilleryBattery)
+ SENTENCE(ArtilleryRadar)
+ SENTENCE_KEY(Barracks,STRwfbarracks)
+ SENTENCE(Funds)
+ SENTENCE(Headquarters)
+ SENTENCE(HeavyVehicleSupply)
+ SENTENCE(Helipad)
+ SENTENCE(LightVehicleSupply)
+ SENTENCE(Mission)
+ SENTENCE(Resources)
+ SENTENCE(ServicePoint)
+ SENTENCE(Strongpoint)
+ //SENTENCE(Strongpoint_alt)
+ SENTENCE(Supplies)
+ SENTENCE(UAVTerminal)
+ //))) END of testing sentences
+};
+class Arguments{};
+class Special{};
+startWithVocal[] = {hour};
+startWithConsonant[] = {europe, university}; \ No newline at end of file
diff --git a/Client/kb/hq.fsm b/Client/kb/hq.fsm
new file mode 100644
index 0000000..6e3c116
--- /dev/null
+++ b/Client/kb/hq.fsm
@@ -0,0 +1,110 @@
+/*%FSM<COMPILE "C:\Bis\fsmeditor\scriptedFSM.cfg, WF_HQ">*/
+/*%FSM<HEAD>*/
+/*
+item0[] = {"React",0,250,-675.000000,-1800.000000,-575.000000,-1750.000000,0.000000,"React"};
+item1[] = {"",7,210,-625.645081,-1628.257446,-617.645203,-1620.257446,0.000000,""};
+item2[] = {"__",8,218,-775.000000,-1650.000000,-675.000000,-1600.000000,0.000000,"-"};
+item3[] = {"END",1,250,-775.000000,-1575.000000,-675.000000,-1525.000000,0.000000,"END"};
+item4[] = {"Come_on__come",4,218,-525.000000,-1525.000000,-225.000000,-1475.000000,1.000000,"Come on, come"};
+item5[] = {"___Nervous_anim",1,250,-175.000000,-1500.000000,125.000000,-1450.000000,0.000000,"< Nervous anim >" \n "No more!"};
+item6[] = {"___Interrupted_",4,218,-525.000000,-1650.000000,-225.000000,-1600.000000,1.000000,"< Interrupted >"};
+item7[] = {"Come_on__come",1,250,-175.000000,-1625.000000,125.000000,-1575.000000,0.000000,"Come on, come"};
+link0[] = {0,1};
+link1[] = {1,2};
+link2[] = {1,4};
+link3[] = {1,6};
+link4[] = {2,3};
+link5[] = {4,5};
+link6[] = {6,7};
+globals[] = {25.000000,1,0,1,16777215,640,480,2,361,6316128,1,-785.646118,299.399323,-517.653870,-1918.175049,681,879,1};
+window[] = {2,-1,-1,-1,-1,790,54,1076,54,3,701};
+*//*%FSM</HEAD>*/
+class FSM
+{
+ fsmName = "WF_HQ";
+ class States
+ {
+ /*%FSM<STATE "React">*/
+ class React
+ {
+ name = "React";
+ init = /*%FSM<STATEINIT""">*/"if (isNil ""BIS_DEBUG_DIALOG"") then {} else" \n "{" \n " debugLog format[""DIALOG- FSM of %1 initiated by %2 sentenceId %3 sentence %4"",_this,_from, _sentenceId, localize (""STR_""+""_sentenceId"")];" \n "};"/*%FSM</STATEINIT""">*/;
+ precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
+ class Links
+ {
+ /*%FSM<LINK "Come_on__come">*/
+ class Come_on__come
+ {
+ priority = 1.000000;
+ to="___Nervous_anim";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/"(_sentenceId in [""Cooper_ComeOnWithMe""]);"/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ /*%FSM<LINK "___Interrupted_">*/
+ class ___Interrupted_
+ {
+ priority = 1.000000;
+ to="Come_on__come";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/"(_sentenceId in [""Interrupted""]);"/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ /*%FSM<LINK "__">*/
+ class __
+ {
+ priority = 0.000000;
+ to="END";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/"true"/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ };
+ };
+ /*%FSM</STATE>*/
+ /*%FSM<STATE "END">*/
+ class END
+ {
+ name = "END";
+ init = /*%FSM<STATEINIT""">*/""/*%FSM</STATEINIT""">*/;
+ precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
+ class Links
+ {
+ };
+ };
+ /*%FSM</STATE>*/
+ /*%FSM<STATE "___Nervous_anim">*/
+ class ___Nervous_anim
+ {
+ name = "___Nervous_anim";
+ init = /*%FSM<STATEINIT""">*/"_this doWatch _from;" \n "DEBUGLOG ""CooperGalkinaScene.fsm: START-----------------------------------"";" \n "" \n "DEBUGLOG ""Galkina is NERVOUS and ESCAPING"";" \n "_t = time;" \n "[] spawn" \n "{" \n " _nic = [objNull, BIS_civWoman, rPLAYMOVENOW, ""Cwmn_GalkinaLiesNervousThenRun""] call RE;" \n " DEBUGLOG ""sceneGalkina.sqf: Animation: Cwmn_GalkinaLiesNervousThenRun"";" \n " _BIS_civWomanDone = BIS_civWoman addEventHandler [""AnimDone"", " \n " { " \n " //DEBUGLOG format[""%1 animdone: %2"", _this select 0, _this select 1];" \n " " \n " //BIS_civWoman enableAI ""ANIM"";" \n " //BIS_civWoman setSpeedMode ""FULL"";" \n " " \n " _nic = [objNull, BIS_civWoman, rPLAYMOVENOW, ""AmovPercMrunSnonWnonDf""] call RE;" \n " _womanDir = (getDir BIS_civWoman) - 180;" \n " BIS_civWoman setdir _womanDir;" \n " _GalkinaEscapePoints = [""BIS_civWomanPositionEnd2a"", ""BIS_civWomanPositionEnd2b"", ""BIS_civWomanPositionEnd2c""];" \n " _GalkinaSelectedPoint = _GalkinaEscapePoints select floor(random (count _GalkinaEscapePoints)); " \n " DEBUGLOG format[""grpCIVWoman.fsm: Galkina ESCAPING on random point: %1"",_GalkinaSelectedPoint];" \n " " \n " //CREATE END TRIGGER " \n " _trgGalkinaEnd2=createTrigger[""EmptyDetector"",getMarkerPos _GalkinaSelectedPoint];" \n " _trgGalkinaEnd2 setTriggerArea[5,5,0,false];" \n " _trgGalkinaEnd2 setTriggerActivation[""MEMBER"",""PRESENT"",true];" \n " _trgGalkinaEnd2 triggerAttachVehicle [BIS_civWoman];" \n " _trgGalkinaEnd2 setTriggerStatements" \n " [" \n " ""this"", " \n " ""DEBUGLOG """"grpCIVWoman.fsm: Galkina reached her end position"""";BIS_civWoman setUnitPos """"DOWN""""; ""," \n " """"" \n " ]; " \n " " \n " BIS_civWoman doMove getMarkerPos _GalkinaSelectedPoint;" \n " BIS_civWoman forceSpeed 15;" \n " BIS_civWoman removeEventHandler [""animDone"", 0];" \n " }" \n " ];" \n " sleep 7;" \n " _nic = [objNull, BIS_civWoman , rKBTELL, BIS_cooper, ""CooperGalkinaScene"", ""Galkina_NoNoMore""] call RE;" \n "};"/*%FSM</STATEINIT""">*/;
+ precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
+ class Links
+ {
+ };
+ };
+ /*%FSM</STATE>*/
+ /*%FSM<STATE "Come_on__come">*/
+ class Come_on__come
+ {
+ name = "Come_on__come";
+ init = /*%FSM<STATEINIT""">*/"_nic = [objNull, _from , rKBTELL, _this, _topic, ""Cooper_ComeOnWithMe""] call RE;" \n "" \n "_this doWatch _from;" \n "DEBUGLOG ""CooperGalkinaScene.fsm: START-----------------------------------"";"/*%FSM</STATEINIT""">*/;
+ precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
+ class Links
+ {
+ };
+ };
+ /*%FSM</STATE>*/
+ };
+ initState="React";
+ finalStates[] =
+ {
+ "END",
+ "___Nervous_anim",
+ "Come_on__come"
+ };
+};
+/*%FSM</COMPILE>*/ \ No newline at end of file
diff --git a/Client/kb/hq.sqf b/Client/kb/hq.sqf
new file mode 100644
index 0000000..d3f5a12
--- /dev/null
+++ b/Client/kb/hq.sqf
@@ -0,0 +1 @@
+
diff --git a/Common/Common_AARadarMarkerUpdate.sqf b/Common/Common_AARadarMarkerUpdate.sqf
new file mode 100644
index 0000000..598932b
--- /dev/null
+++ b/Common/Common_AARadarMarkerUpdate.sqf
@@ -0,0 +1,35 @@
+Private ["_height","_object","_markerName","_side","_zOffset"];
+
+waitUntil {commonInitComplete};
+sleep 2;
+
+_object = _this select 0;
+_side = _this select 1;
+
+if (_side == side player || isNull _object ||!(alive _object)) exitWith {};
+
+unitMarker = unitMarker + 1;
+_markerName = Format ["unitMarker%1",unitMarker];
+
+createMarkerLocal [_markerName,[0,0,0]];
+_markerName setMarkerTypeLocal "Vehicle";
+_markerName setMarkerColorLocal "ColorRed";
+_markerName setMarkerSizeLocal [5,5];
+_markerName setMarkerAlphaLocal 0;
+_height = 'WFBE_ANTIAIRRADARDETECTION' Call GetNamespace;
+
+while {alive _object && !(isNull _object)} do {
+ if (antiAirRadarInRange) then {
+ _zOffset = (getPos _object) select 2;
+ if (_zOffset > _height) then {
+ _markerName setMarkerAlphaLocal 1;
+ _markerName setMarkerPosLocal (getPos _object);
+ } else {
+ _markerName setMarkerAlphaLocal 0;
+ };
+ };
+
+ sleep 1;
+};
+
+deleteMarkerLocal _markerName; \ No newline at end of file
diff --git a/Common/Common_DisableAC.sqf b/Common/Common_DisableAC.sqf
new file mode 100644
index 0000000..e6974d8
--- /dev/null
+++ b/Common/Common_DisableAC.sqf
@@ -0,0 +1 @@
+enableEngineArtillery false; \ No newline at end of file
diff --git a/Common/Common_InitArtillery.sqf b/Common/Common_InitArtillery.sqf
new file mode 100644
index 0000000..2b1cdfb
--- /dev/null
+++ b/Common/Common_InitArtillery.sqf
@@ -0,0 +1,7 @@
+Private ["_arty"];
+_arty = _this select 0;
+
+waitUntil {BIS_ARTY_LOADED};
+sleep 5;
+
+[_arty] call BIS_ARTY_F_initVehicle; \ No newline at end of file
diff --git a/Common/Common_InitUnit.sqf b/Common/Common_InitUnit.sqf
new file mode 100644
index 0000000..9cb2953
--- /dev/null
+++ b/Common/Common_InitUnit.sqf
@@ -0,0 +1,50 @@
+Private ["_ainumber","_amount","_color","_finalNumber","_isMan","_markerName","_numbers","_params","_side","_size","_text","_txt","_type","_unit","_val","_val2"];
+_unit = _this select 0;
+_side = _this select 1;
+
+if (isNull _unit) exitWith {};
+
+waitUntil {commonInitComplete};
+
+if !(local player) exitWith {};
+
+sleep 2;
+
+_isMan = if (_unit isKindOf "Man") then {true} else {false};
+
+if !(_isMan) then {
+ if (('WFBE_INCOMINGMISSILEMAXRANGE' Call GetNamespace) != 0) then {_unit addEventHandler ['IncomingMissile', {_this Spawn HandleIncomingMissile}]};
+
+ if !(WF_A2_Vanilla) then {
+ if ('WFBE_THERMALIMAGING' Call GetNamespace < 2) then {Call Compile '_unit disableTIEquipment true;'};
+ };
+};
+
+if (sideJoined != _side) exitWith {};
+
+_type = "Vehicle";
+_color = "ColorGreen";
+_size = [5,5];
+_txt = "";
+if ((typeOf _unit) in (Format['WFBE_%1SUPPLYTRUCKS',str _side] Call GetNamespace)) then {_type = "SupplyVehicle";_size = [1,1]};
+if ((typeOf _unit) in (Format['WFBE_%1REPAIRTRUCKS',str _side] Call GetNamespace)) then {_type = "RepairVehicle"};
+
+unitMarker = unitMarker + 1;
+
+_markerName = Format ["unitMarker%1",unitMarker];
+_params = [];
+if (_isMan) then {
+ _color = "ColorYellow";
+ _type = "mil_dot";
+ _size = [0.5,0.5];
+ if (group _unit == group player) then {
+ _color = "ColorOrange";
+ _txt = (_unit) Call GetAIDigit;
+ };
+ _params = [_type,_color,_size,_txt,_markerName,_unit,1,true,"DestroyedVehicle",_color,false,_side,[1,1]];
+} else {
+ if (local _unit && isMultiplayer) then {_color = "ColorOrange"};
+ _params = [_type,_color,_size,_txt,_markerName,_unit,1,true,"DestroyedVehicle",_color,false,_side,[2,2]];
+};
+
+_params Spawn MarkerUpdate; \ No newline at end of file
diff --git a/Common/Common_MarkerUpdate.sqf b/Common/Common_MarkerUpdate.sqf
new file mode 100644
index 0000000..e9c372b
--- /dev/null
+++ b/Common/Common_MarkerUpdate.sqf
@@ -0,0 +1,41 @@
+private ["_deathMarkerColor","_deathMarkerSize","_deathMarkerType","_deletePrevious","_markerColor","_markerName","_markerSize","_markerType","_markerText","_refreshRate","_trackDeath","_tracked","_side"];
+
+waitUntil {commonInitComplete};
+
+_markerType = _this select 0;
+_markerColor = _this select 1;
+_markerSize = _this select 2;
+_markerText = _this select 3;
+_markerName = _this select 4;
+_tracked = _this select 5;
+_refreshRate = _this select 6;
+_trackDeath = _this select 7;
+_deathMarkerType = _this select 8;
+_deathMarkerColor = _this select 9;
+_deletePrevious = _this select 10;
+_side = _this select 11;
+_deathMarkerSize = [1,1];
+if (count _this > 12) then {_deathMarkerSize = _this select 12};
+
+if (_side != side player || isNull _tracked || !(alive _tracked)) exitWith {};
+if (_deletePrevious) then {deleteMarkerLocal _markerName};
+
+createMarkerLocal [_markerName,getPos _tracked];
+if (_markerText != "") then {_markerName setMarkerTextLocal _markerText};
+_markerName setMarkerTypeLocal _markerType;
+_markerName setMarkerColorLocal _markerColor;
+_markerName setMarkerSizeLocal _markerSize;
+
+while {alive _tracked && !(isNull _tracked)} do {
+ _markerName setMarkerPosLocal (getPos _tracked);
+ sleep _refreshRate;
+};
+
+if (_trackDeath) then {
+ _markerName setMarkerTypeLocal _deathMarkerType;
+ _markerName setMarkerColorLocal _deathMarkerColor;
+ _markerName setMarkerSizeLocal _deathMarkerSize;
+ sleep ('WFBE_MARKERDEADDELAY' Call GetNamespace);
+};
+
+deleteMarkerLocal _markerName; \ No newline at end of file
diff --git a/Common/Config/Config_AircraftFactory.sqf b/Common/Config/Config_AircraftFactory.sqf
new file mode 100644
index 0000000..e12d009
--- /dev/null
+++ b/Common/Config/Config_AircraftFactory.sqf
@@ -0,0 +1,32 @@
+Private['_balancePrice','_c','_longestAircraftBuildTime','_u'];
+
+_balancePrice = 'WFBE_BALANCEPRICE' Call GetNamespace;
+
+/* WEST - Aircraft */
+_u = Call Compile preprocessFile Format["Common\Config\Core_Units\%1\Units_Aircraft_%2.sqf",WFBE_V_West_UnitsRootVersion,WFBE_V_West_Faction];
+['WFBE_WESTAIRCRAFTUNITS',_u,true] Call SetNamespace;
+if (local player) then {['AIRCRAFT','WEST',_u] Call Compile preProcessFile 'Client\Init\Init_Faction.sqf'};
+
+/* EAST - Aircraft */
+_u = Call Compile preprocessFile Format["Common\Config\Core_Units\%1\Units_Aircraft_%2.sqf",WFBE_V_East_UnitsRootVersion,WFBE_V_East_Faction];
+['WFBE_EASTAIRCRAFTUNITS',_u,true] Call SetNamespace;
+if (local player) then {['AIRCRAFT','EAST',_u] Call Compile preProcessFile 'Client\Init\Init_Faction.sqf'};
+
+_longestAircraftBuildTime = 0;
+{
+ _c = _x Call GetNamespace;
+ if !(isNil '_c') then {
+ if ((_c select QUERYUNITTIME) > _longestAircraftBuildTime) then {
+ _longestAircraftBuildTime = (_c select QUERYUNITTIME);
+ };
+
+ if (_balancePrice in [1,2]) then {
+ _c set [QUERYUNITPRICE, (_c select QUERYUNITPRICE)*2];
+ };
+ } else {
+ diag_log Format ["[WFBE (ERROR)][frameno:%2 | ticktime:%3] Config_AircraftFactory: '%1' is not defined in the Core files.",_x,diag_frameno,diag_tickTime];
+ };
+} forEach (('WFBE_EASTAIRCRAFTUNITS' Call GetNamespace) + ('WFBE_WESTAIRCRAFTUNITS' Call GetNamespace));
+
+['WFBE_LONGESTAIRCRAFTBUILDTIME',_longestAircraftBuildTime,true] Call SetNamespace;
+diag_log Format ["[WFBE (INIT)][frameno:%1 | ticktime:%2] Config_AircraftFactory: Initialization (West: %3 | East: %4) - [Done]",diag_frameno,diag_tickTime,WFBE_V_West_Faction,WFBE_V_East_Faction]; \ No newline at end of file
diff --git a/Common/Config/Config_Airport.sqf b/Common/Config/Config_Airport.sqf
new file mode 100644
index 0000000..42b7499
--- /dev/null
+++ b/Common/Config/Config_Airport.sqf
@@ -0,0 +1,36 @@
+Private['_balancePrice','_c','_longestAirportBuildTime','_u'];
+
+_balancePrice = 'WFBE_BALANCEPRICE' Call GetNamespace;
+
+/* WEST - Airport */
+_u = Call Compile preprocessFile Format["Common\Config\Core_Units\%1\Units_Airport_%2.sqf",WFBE_V_West_UnitsRootVersion,WFBE_V_West_Faction];
+['WFBE_WESTAIRPORTUNITS',_u,true] Call SetNamespace;
+if (local player) then {['AIRPORT','WEST',_u] Call Compile preProcessFile 'Client\Init\Init_Faction.sqf'};
+
+/* EAST - Airport */
+_u = Call Compile preprocessFile Format["Common\Config\Core_Units\%1\Units_Airport_%2.sqf",WFBE_V_East_UnitsRootVersion,WFBE_V_East_Faction];
+['WFBE_EASTAIRPORTUNITS',_u,true] Call SetNamespace;
+if (local player) then {['AIRPORT','EAST',_u] Call Compile preProcessFile 'Client\Init\Init_Faction.sqf'};
+
+_longestAirportBuildTime = 0;
+{
+ _c = _x Call GetNamespace;
+ if !(isNil '_c') then {
+ if ((_c select QUERYUNITTIME) > _longestAirportBuildTime) then {
+ _longestAirportBuildTime = (_c select QUERYUNITTIME);
+ };
+
+ if (_balancePrice in [1,2]) then {
+ _c set [QUERYUNITPRICE, (_c select QUERYUNITPRICE)*2];
+ };
+ } else {
+ diag_log Format ["[WFBE (ERROR)][frameno:%2 | ticktime:%3] Config_Airport: '%1' is not defined in the Core files.",_x,diag_frameno,diag_tickTime];
+ };
+} forEach (('WFBE_EASTAIRPORTUNITS' Call GetNamespace) + ('WFBE_WESTAIRPORTUNITS' Call GetNamespace));
+
+['WFBE_LONGESTAIRPORTBUILDTIME',_longestAirportBuildTime,true] Call SetNamespace;
+
+airportDistance = 60;
+airportDirection = 180;
+
+diag_log Format ["[WFBE (INIT)][frameno:%1 | ticktime:%2] Config_Airport: Initialization (West: %3 | East: %4) - [Done]",diag_frameno,diag_tickTime,WFBE_V_West_Faction,WFBE_V_East_Faction]; \ No newline at end of file
diff --git a/Common/Config/Config_Allies.sqf b/Common/Config/Config_Allies.sqf
new file mode 100644
index 0000000..c6ae3b0
--- /dev/null
+++ b/Common/Config/Config_Allies.sqf
@@ -0,0 +1,37 @@
+Private ["_eallies","_efolder","_u","_wallies","_wfolder"];
+
+//--- Folders and Faction.
+_eallies = "INS";
+_efolder = "Vanilla";
+_wallies = "CDF";
+_wfolder = "Vanilla";
+
+//--- West Allies.
+['WFBE_WESTALLIESCREW','CDF_Soldier_Crew',true] Call SetNamespace;
+['WFBE_WESTALLIESSOLDIER','CDF_Soldier',true] Call SetNamespace;
+['WFBE_WESTALLIESPILOT','CDF_Soldier_Pilot',true] Call SetNamespace;
+
+_u = Call Compile preprocessFile Format ["Common\Config\Core_Units\%1\Units_Barracks_%2.sqf",_wfolder,_wallies];
+['WFBE_WESTALLIESBARRACKSUNITS',_u,true] Call SetNamespace;
+_u = Call Compile preprocessFile Format ["Common\Config\Core_Units\%1\Units_Light_%2.sqf",_wfolder,_wallies];
+['WFBE_WESTALLIESLIGHTUNITS',_u,true] Call SetNamespace;
+_u = Call Compile preprocessFile Format ["Common\Config\Core_Units\%1\Units_Heavy_%2.sqf",_wfolder,_wallies];
+['WFBE_WESTALLIESHEAVYUNITS',_u,true] Call SetNamespace;
+_u = Call Compile preprocessFile Format ["Common\Config\Core_Units\%1\Units_Aircraft_%2.sqf",_wfolder,_wallies];
+['WFBE_WESTALLIESAIRCRAFTUNITS',_u,true] Call SetNamespace;
+
+//--- East Allies.
+['WFBE_EASTALLIESCREW','Ins_Soldier_Crew',true] Call SetNamespace;
+['WFBE_EASTALLIESSOLDIER','Ins_Soldier_1',true] Call SetNamespace;
+['WFBE_EASTALLIESPILOT','Ins_Soldier_Pilot',true] Call SetNamespace;
+
+_u = Call Compile preprocessFile Format ["Common\Config\Core_Units\%1\Units_Barracks_%2.sqf",_efolder,_eallies];
+['WFBE_EASTALLIESBARRACKSUNITS',_u,true] Call SetNamespace;
+_u = Call Compile preprocessFile Format ["Common\Config\Core_Units\%1\Units_Light_%2.sqf",_efolder,_eallies];
+['WFBE_EASTALLIESLIGHTUNITS',_u,true] Call SetNamespace;
+_u = Call Compile preprocessFile Format ["Common\Config\Core_Units\%1\Units_Heavy_%2.sqf",_efolder,_eallies];
+['WFBE_EASTALLIESHEAVYUNITS',_u,true] Call SetNamespace;
+_u = Call Compile preprocessFile Format ["Common\Config\Core_Units\%1\Units_Aircraft_%2.sqf",_efolder,_eallies];
+['WFBE_EASTALLIESAIRCRAFTUNITS',_u,true] Call SetNamespace;
+
+diag_log Format ["[WFBE (INIT)][frameno:%1 | ticktime:%2] Config_Allies: Initialization (West: %3 | East: %4) - [Done]",diag_frameno,diag_tickTime,_wallies,_eallies]; \ No newline at end of file
diff --git a/Common/Config/Config_Artillery.sqf b/Common/Config/Config_Artillery.sqf
new file mode 100644
index 0000000..41640d2
--- /dev/null
+++ b/Common/Config/Config_Artillery.sqf
@@ -0,0 +1,7 @@
+/* Call in dynamically the west artillery. */
+Call Compile PreprocessFile Format["Common\Config\Core_Artillery\%1\Artillery_%2.sqf",WFBE_V_West_ArtilleryRootVersion,WFBE_V_West_ArtilleryFaction];
+
+/* Call in dynamically the east artillery. */
+Call Compile PreprocessFile Format["Common\Config\Core_Artillery\%1\Artillery_%2.sqf",WFBE_V_East_ArtilleryRootVersion,WFBE_V_East_ArtilleryFaction];
+
+diag_log Format ["[WFBE (INIT)][frameno:%1 | ticktime:%2] Config_Artillery: Initialization (West: %3 | East: %4) - [Done]",diag_frameno,diag_tickTime,WFBE_V_West_ArtilleryFaction,WFBE_V_East_ArtilleryFaction]; \ No newline at end of file
diff --git a/Common/Config/Config_Barracks.sqf b/Common/Config/Config_Barracks.sqf
new file mode 100644
index 0000000..8af2f23
--- /dev/null
+++ b/Common/Config/Config_Barracks.sqf
@@ -0,0 +1,47 @@
+Private['_c','_longestBarracksBuildTime','_u'];
+
+/* WEST - Barracks */
+_u = Call Compile preprocessFile Format["Common\Config\Core_Units\%1\Units_Barracks_%2.sqf",WFBE_V_West_UnitsRootVersion,WFBE_V_West_Faction];
+['WFBE_WESTBARRACKSUNITS',_u,true] Call SetNamespace;
+if (local player) then {['BARRACKS','WEST',_u] Call Compile preProcessFile 'Client\Init\Init_Faction.sqf'};
+
+/* EAST - Barracks */
+_u = Call Compile preprocessFile Format["Common\Config\Core_Units\%1\Units_Barracks_%2.sqf",WFBE_V_East_UnitsRootVersion,WFBE_V_East_Faction];
+['WFBE_EASTBARRACKSUNITS',_u,true] Call SetNamespace;
+if (local player) then {['BARRACKS','EAST',_u] Call Compile preProcessFile 'Client\Init\Init_Faction.sqf'};
+
+if (isServer) then {
+ /* Allies */
+ if (('WFBE_ALLIES' Call GetNamespace) > 0) then {
+ //--- CDF Allies.
+ _u = Call Compile preprocessFile "Common\Config\Core_Units\Vanilla\Units_Barracks_CDF.sqf";
+ ['WFBE_WESTALLIESBARRACKSUNITS',_u,true] Call SetNamespace;
+ ['WFBE_WESTALLIESSOLDIER','CDF_Soldier',true] Call SetNamespace;
+
+ //--- Insurgent Allies.
+ _u = Call Compile preprocessFile "Common\Config\Core_Units\Vanilla\Units_Barracks_INS.sqf";
+ ['WFBE_EASTALLIESBARRACKSUNITS',_u,true] Call SetNamespace;
+ ['WFBE_EASTALLIESSOLDIER','Ins_Soldier_1',true] Call SetNamespace;
+ };
+};
+
+/* Root classes */
+westSoldierBaseClass = 'SoldierWB';
+eastSoldierBaseClass = 'SoldierEB';
+resistanceSoldierBaseClass = 'SoldierGB';
+
+_longestBarracksBuildTime = 0;
+{
+ _c = _x Call GetNamespace;
+ if !(isNil '_c') then {
+ if ((_c select QUERYUNITTIME) > _longestBarracksBuildTime) then {
+ _longestBarracksBuildTime = (_c select QUERYUNITTIME);
+ };
+ } else {
+ diag_log Format ["[WFBE (ERROR)][frameno:%2 | ticktime:%3] Config_Barracks: '%1' is not defined in the Core files.",_x,diag_frameno,diag_tickTime];
+ };
+} forEach (('WFBE_EASTBARRACKSUNITS' Call GetNamespace) + ('WFBE_WESTBARRACKSUNITS' Call GetNamespace));
+
+['WFBE_LONGESTBARRACKSBUILDTIME',_longestBarracksBuildTime,true] Call SetNamespace;
+
+diag_log Format ["[WFBE (INIT)][frameno:%1 | ticktime:%2] Config_Barracks: Initialization (West: %3 | East: %4) - [Done]",diag_frameno,diag_tickTime,WFBE_V_West_Faction,WFBE_V_East_Faction]; \ No newline at end of file
diff --git a/Common/Config/Config_Depot.sqf b/Common/Config/Config_Depot.sqf
new file mode 100644
index 0000000..1f4da37
--- /dev/null
+++ b/Common/Config/Config_Depot.sqf
@@ -0,0 +1,30 @@
+Private['_c','_longestDepotBuildTime','_u'];
+
+/* WEST - Depot */
+_u = Call Compile preprocessFile Format["Common\Config\Core_Units\%1\Units_Depot_%2.sqf",WFBE_V_West_UnitsRootVersion,WFBE_V_West_Faction];
+['WFBE_WESTDEPOTUNITS',_u,true] Call SetNamespace;
+if (local player) then {['DEPOT','WEST',_u] Call Compile preProcessFile 'Client\Init\Init_Faction.sqf'};
+
+/* EAST - Depot */
+_u = Call Compile preprocessFile Format["Common\Config\Core_Units\%1\Units_Depot_%2.sqf",WFBE_V_East_UnitsRootVersion,WFBE_V_East_Faction];
+['WFBE_EASTDEPOTUNITS',_u,true] Call SetNamespace;
+if (local player) then {['DEPOT','EAST',_u] Call Compile preProcessFile 'Client\Init\Init_Faction.sqf'};
+
+_longestDepotBuildTime = 0;
+{
+ _c = _x Call GetNamespace;
+ if !(isNil '_c') then {
+ if ((_c select QUERYUNITTIME) > _longestDepotBuildTime) then {
+ _longestDepotBuildTime = (_c select QUERYUNITTIME);
+ };
+ } else {
+ diag_log Format ["[WFBE (ERROR)][frameno:%2 | ticktime:%3] Config_Depot: '%1' is not defined in the Core files.",_x,diag_frameno,diag_tickTime];
+ };
+} forEach (('WFBE_EASTDEPOTUNITS' Call GetNamespace) + ('WFBE_WESTDEPOTUNITS' Call GetNamespace));
+
+['WFBE_LONGESTDEPOTBUILDTIME',_longestDepotBuildTime,true] Call SetNamespace;
+
+depotDistance = 21;
+depotDirection = 90;
+
+diag_log Format ["[WFBE (INIT)][frameno:%1 | ticktime:%2] Config_Depot: Initialization (West: %3 | East: %4) - [Done]",diag_frameno,diag_tickTime,WFBE_V_West_Faction,WFBE_V_East_Faction]; \ No newline at end of file
diff --git a/Common/Config/Config_HeavyFactory.sqf b/Common/Config/Config_HeavyFactory.sqf
new file mode 100644
index 0000000..ad5c1f5
--- /dev/null
+++ b/Common/Config/Config_HeavyFactory.sqf
@@ -0,0 +1,32 @@
+Private['_balancePrice','_c','_longestHeavyBuildTime','_u'];
+
+_balancePrice = 'WFBE_BALANCEPRICE' Call GetNamespace;
+
+/* WEST - Heavy */
+_u = Call Compile preprocessFile Format["Common\Config\Core_Units\%1\Units_Heavy_%2.sqf",WFBE_V_West_UnitsRootVersion,WFBE_V_West_Faction];
+['WFBE_WESTHEAVYUNITS',_u,true] Call SetNamespace;
+if (local player) then {['HEAVY','WEST',_u] Call Compile preProcessFile 'Client\Init\Init_Faction.sqf'};
+
+/* EAST - Heavy */
+_u = Call Compile preprocessFile Format["Common\Config\Core_Units\%1\Units_Heavy_%2.sqf",WFBE_V_East_UnitsRootVersion,WFBE_V_East_Faction];
+['WFBE_EASTHEAVYUNITS',_u,true] Call SetNamespace;
+if (local player) then {['HEAVY','EAST',_u] Call Compile preProcessFile 'Client\Init\Init_Faction.sqf'};
+
+_longestHeavyBuildTime = 0;
+{
+ _c = _x Call GetNamespace;
+ if !(isNil '_c') then {
+ if ((_c select QUERYUNITTIME) > _longestHeavyBuildTime) then {
+ _longestHeavyBuildTime = (_c select QUERYUNITTIME);
+ };
+
+ if (_balancePrice in [1,3]) then {
+ _c set [QUERYUNITPRICE, (_c select QUERYUNITPRICE)*2];
+ };
+ } else {
+ diag_log Format ["[WFBE (ERROR)][frameno:%2 | ticktime:%3] Config_HeavyFactory: '%1' is not defined in the Core files.",_x,diag_frameno,diag_tickTime];
+ };
+} forEach (('WFBE_EASTHEAVYUNITS' Call GetNamespace) + ('WFBE_WESTHEAVYUNITS' Call GetNamespace));
+
+['WFBE_LONGESTHEAVYBUILDTIME',_longestHeavyBuildTime,true] Call SetNamespace;
+diag_log Format ["[WFBE (INIT)][frameno:%1 | ticktime:%2] Config_HeavyFactory: Initialization (West: %3 | East: %4) - [Done]",diag_frameno,diag_tickTime,WFBE_V_West_Faction,WFBE_V_East_Faction]; \ No newline at end of file
diff --git a/Common/Config/Config_LightFactory.sqf b/Common/Config/Config_LightFactory.sqf
new file mode 100644
index 0000000..fd1e1db
--- /dev/null
+++ b/Common/Config/Config_LightFactory.sqf
@@ -0,0 +1,32 @@
+Private['_balancePrice','_c','_longestLightBuildTime','_u'];
+
+_balancePrice = 'WFBE_BALANCEPRICE' Call GetNamespace;
+
+/* WEST - Light */
+_u = Call Compile preprocessFile Format["Common\Config\Core_Units\%1\Units_Light_%2.sqf",WFBE_V_West_UnitsRootVersion,WFBE_V_West_Faction];
+['WFBE_WESTLIGHTUNITS',_u,true] Call SetNamespace;
+if (local player) then {['LIGHT','WEST',_u] Call Compile preProcessFile 'Client\Init\Init_Faction.sqf'};
+
+/* EAST - Light */
+_u = Call Compile preprocessFile Format["Common\Config\Core_Units\%1\Units_Light_%2.sqf",WFBE_V_East_UnitsRootVersion,WFBE_V_East_Faction];
+['WFBE_EASTLIGHTUNITS',_u,true] Call SetNamespace;
+if (local player) then {['LIGHT','EAST',_u] Call Compile preProcessFile 'Client\Init\Init_Faction.sqf'};
+
+_longestLightBuildTime = 0;
+{
+ _c = _x Call GetNamespace;
+ if !(isNil '_c') then {
+ if ((_c select QUERYUNITTIME) > _longestLightBuildTime) then {
+ _longestLightBuildTime = (_c select QUERYUNITTIME);
+ };
+
+ if (_balancePrice in [1,3]) then {
+ _c set [QUERYUNITPRICE, (_c select QUERYUNITPRICE)*2];
+ };
+ } else {
+ diag_log Format ["[WFBE (ERROR)][frameno:%2 | ticktime:%3] Config_LightFactory: '%1' is not defined in the Core files.",_x,diag_frameno,diag_tickTime];
+ };
+} forEach (('WFBE_EASTLIGHTUNITS' Call GetNamespace) + ('WFBE_WESTLIGHTUNITS' Call GetNamespace));
+
+['WFBE_LONGESTLIGHTBUILDTIME',_longestLightBuildTime,true] Call SetNamespace;
+diag_log Format ["[WFBE (INIT)][frameno:%1 | ticktime:%2] Config_LightFactory: Initialization (West: %3 | East: %4) - [Done]",diag_frameno,diag_tickTime,WFBE_V_West_Faction,WFBE_V_East_Faction]; \ No newline at end of file
diff --git a/Common/Config/Config_Loadouts.sqf b/Common/Config/Config_Loadouts.sqf
new file mode 100644
index 0000000..7472a1f
--- /dev/null
+++ b/Common/Config/Config_Loadouts.sqf
@@ -0,0 +1,15 @@
+/*
+ New loadout system. | Hybrid
+ Only one side gear is defined at a time. west don't know east and vice versa.
+*/
+
+/* Backpacks */
+
+/* Binocular (Used for spotting) */
+['WFBE_BINOCULARS',['Binocular','Binocular_Vector','Laserdesignator'],true] Call SetNamespace;
+
+/* Set the loadout depending on it's type. */
+[] Call Compile PreprocessFile Format["Common\Config\Core_Loadout\%1\Loadout_%2.sqf",WFBE_V_West_LoadoutRootVersion,WFBE_V_West_Loadout];
+[] Call Compile PreprocessFile Format["Common\Config\Core_Loadout\%1\Loadout_%2.sqf",WFBE_V_East_LoadoutRootVersion,WFBE_V_East_Loadout];
+
+diag_log Format ["[WFBE (INIT)][frameno:%1 | ticktime:%2] Config_Loadouts: Initialization (West: %3 | East: %4) - [Done]",diag_frameno,diag_tickTime,WFBE_V_West_Loadout,WFBE_V_East_Loadout]; \ No newline at end of file
diff --git a/Common/Config/Config_Occupation.sqf b/Common/Config/Config_Occupation.sqf
new file mode 100644
index 0000000..d4e18d5
--- /dev/null
+++ b/Common/Config/Config_Occupation.sqf
@@ -0,0 +1,9 @@
+Private ['_occTypeEast','_occTypeWest'];
+
+_occTypeWest = ('WFBE_OCCUPATIONWESTFACTIONS' Call GetNamespace) select ('WFBE_OCCUPATIONWESTFACTION' Call GetNamespace);
+_occTypeEast = ('WFBE_OCCUPATIONEASTFACTIONS' Call GetNamespace) select ('WFBE_OCCUPATIONEASTFACTION' Call GetNamespace);
+
+[] Call Compile preprocessFile Format["Common\Config\Core_Occupation\Occupation_%1.sqf",_occTypeWest];
+[] Call Compile preprocessFile Format["Common\Config\Core_Occupation\Occupation_%1.sqf",_occTypeEast];
+
+diag_log Format["[WFBE (INIT)][frameno:%1 | ticktime:%2] Config_Occupation: Initialization (West: %3 | East: %4) - [Done]",diag_frameno,diag_tickTime,_occTypeWest,_occTypeEast]; \ No newline at end of file
diff --git a/Common/Config/Config_Resistance.sqf b/Common/Config/Config_Resistance.sqf
new file mode 100644
index 0000000..8b68835
--- /dev/null
+++ b/Common/Config/Config_Resistance.sqf
@@ -0,0 +1,7 @@
+Private ['_resType'];
+
+_resType = ('WFBE_RESISTANCEFACTIONS' Call GetNamespace) select ('WFBE_RESISTANCEFACTION' Call GetNamespace);
+
+[] Call Compile preprocessFile Format["Common\Config\Core_Resistance\Resistance_%1.sqf",_resType];
+
+diag_log Format["[WFBE (INIT)][frameno:%1 | ticktime:%2] Config_Resistance: Intialization (Resistance: %3) - [Done]",diag_frameno,diag_tickTime,_resType]; \ No newline at end of file
diff --git a/Common/Config/Config_Special.sqf b/Common/Config/Config_Special.sqf
new file mode 100644
index 0000000..6e892c8
--- /dev/null
+++ b/Common/Config/Config_Special.sqf
@@ -0,0 +1,7 @@
+/* Call in dynamically the west special variables. */
+Call Compile preprocessFile Format["Common\Config\Core_Units\%1\Units_Special_%2.sqf",WFBE_V_West_UnitsRootVersion,WFBE_V_West_Faction];
+
+/* Call in dynamically the east special variables. */
+Call Compile preprocessFile Format["Common\Config\Core_Units\%1\Units_Special_%2.sqf",WFBE_V_East_UnitsRootVersion,WFBE_V_East_Faction];
+
+diag_log Format ["[WFBE (INIT)][frameno:%1 | ticktime:%2] Config_Special: Initialization (West: %3 | East: %4) - [Done]",diag_frameno,diag_tickTime,WFBE_V_West_Faction,WFBE_V_East_Faction]; \ No newline at end of file
diff --git a/Common/Config/Config_Squads.sqf b/Common/Config/Config_Squads.sqf
new file mode 100644
index 0000000..6ccd08f
--- /dev/null
+++ b/Common/Config/Config_Squads.sqf
@@ -0,0 +1,19 @@
+Private ['_squads'];
+
+//--- West
+_squads = Call Compile PreprocessFile Format["Common\Config\Core_Squads\%1\Squad_%2.sqf",WFBE_V_West_SquadsRootVersion,WFBE_V_West_SquadsFaction];
+['WFBE_WESTAITEAMTEMPLATES',_squads select 0,true] Call SetNamespace;
+['WFBE_WESTAITEAMTEMPLATEREQUIRES',_squads select 1,true] Call SetNamespace;
+['WFBE_WESTAITEAMTYPES',_squads select 2,true] Call SetNamespace;
+['WFBE_WESTAITEAMUPGRADES',_squads select 3,true] Call SetNamespace;
+['WFBE_WESTAITEAMTEMPLATEDESCRIPTIONS',_squads select 4,true] Call SetNamespace;
+
+//--- East.
+_squads = Call Compile PreprocessFile Format["Common\Config\Core_Squads\%1\Squad_%2.sqf",WFBE_V_East_SquadsRootVersion,WFBE_V_East_SquadsFaction];
+['WFBE_EASTAITEAMTEMPLATES',_squads select 0,true] Call SetNamespace;
+['WFBE_EASTAITEAMTEMPLATEREQUIRES',_squads select 1,true] Call SetNamespace;
+['WFBE_EASTAITEAMTYPES',_squads select 2,true] Call SetNamespace;
+['WFBE_EASTAITEAMUPGRADES',_squads select 3,true] Call SetNamespace;
+['WFBE_EASTAITEAMTEMPLATEDESCRIPTIONS',_squads select 4,true] Call SetNamespace;
+
+diag_log Format ["[WFBE (INIT)][frameno:%1 | ticktime:%2] Config_Squads: Initialization (West: %3 | East: %4) - [Done]",diag_frameno,diag_tickTime,WFBE_V_West_SquadsFaction,WFBE_V_East_SquadsFaction]; \ No newline at end of file
diff --git a/Common/Config/Config_Structures.sqf b/Common/Config/Config_Structures.sqf
new file mode 100644
index 0000000..dc30d3f
--- /dev/null
+++ b/Common/Config/Config_Structures.sqf
@@ -0,0 +1,78 @@
+Private ["_n"];
+
+/* Call in dynamically the west structures. */
+Call Compile PreprocessFile Format["Common\Config\Core_Structures\%1\Structures_%2.sqf",WFBE_V_West_StructuresRootVersion,WFBE_V_West_StructuresFaction];
+
+/* Call in dynamically the east structures. */
+Call Compile PreprocessFile Format["Common\Config\Core_Structures\%1\Structures_%2.sqf",WFBE_V_East_StructuresRootVersion,WFBE_V_East_StructuresFaction];
+
+switch (true) do {
+ case WF_A2_Vanilla: {
+ WFDEPOT = ["WarfareBDepot"];
+ WFCAMP = ["WarfareBCamp"];
+ WFHANGAR = ["WarfareBAirport"];
+ WFFLAG = "FlagCarrierGUE";
+
+ /* RESISTANCE STATIONARY DEFENSES */
+ _n = ["GUE_WarfareBMGNest_PK"];
+ _n = _n + ["DSHKM_Gue"];
+ _n = _n + ["SPG9_Gue"];
+ _n = _n + ["ZU23_Gue"];
+
+ ['WFBE_RESISTANCEDEFENSENAMES',_n,true] Call SetNamespace;
+
+ }; case WF_A2_Arrowhead: {
+ WFDEPOT = ["Land_fortified_nest_big_EP1"];
+ WFCAMP = ["Land_Fort_Watchtower_EP1"];
+ WFHANGAR = ["Land_Mil_hangar_EP1"];
+ WFFLAG = "FlagCarrierTakistan_EP1";
+
+ /* RESISTANCE STATIONARY DEFENSES */
+ _n = ["WarfareBMGNest_PK_TK_GUE_EP1"];
+ _n = _n + ["DSHKM_TK_GUE_EP1"];
+ _n = _n + ["AGS_TK_GUE_EP1"];
+ _n = _n + ["SPG9_TK_GUE_EP1"];
+ _n = _n + ["ZU23_TK_GUE_EP1"];
+ _n = _n + ["D30_TK_GUE_EP1"];
+
+ ['WFBE_RESISTANCEDEFENSENAMES',_n,true] Call SetNamespace;
+
+ }; case WF_A2_CombinedOps: {
+ WFDEPOT = ["Land_fortified_nest_big_EP1","WarfareBDepot"];
+ WFCAMP = ["Land_Fort_Watchtower_EP1","WarfareBCamp"];
+ WFHANGAR = ["Land_Mil_hangar_EP1","WarfareBAirport"];
+ WFFLAG = "FlagCarrierTakistan_EP1";
+
+ /* RESISTANCE STATIONARY DEFENSES */
+ _n = ["WarfareBMGNest_PK_TK_GUE_EP1"];
+ _n = _n + ["GUE_WarfareBMGNest_PK"];
+ _n = _n + ["DSHKM_Gue"];
+ _n = _n + ["SPG9_Gue"];
+ _n = _n + ["ZU23_Gue"];
+ _n = _n + ["DSHKM_TK_GUE_EP1"];
+ _n = _n + ["AGS_TK_GUE_EP1"];
+ _n = _n + ["SPG9_TK_GUE_EP1"];
+ _n = _n + ["D30_TK_GUE_EP1"];
+ _n = _n + ["ZU23_TK_GUE_EP1"];
+
+ ['WFBE_RESISTANCEDEFENSENAMES',_n,true] Call SetNamespace;
+
+ };
+};
+
+//--- Multiply the building cost when money only is being used.
+if (paramMoneyOnly) then {
+ Private ["_i","_list"];
+
+ _list = 'WFBE_WESTSTRUCTURECOSTS' Call GetNamespace;
+ for '_i' from 0 to count(_list)-1 do {
+ _list set [_i, round((_list select _i) * 5)];
+ };
+
+ _list = 'WFBE_EASTSTRUCTURECOSTS' Call GetNamespace;
+ for '_i' from 0 to count(_list)-1 do {
+ _list set [_i, round((_list select _i) * 5)];
+ };
+};
+
+diag_log Format ["[WFBE (INIT)][frameno:%1 | ticktime:%2] Config_Structures: Initialization (West: %3 | East: %4) - [Done]",diag_frameno,diag_tickTime,WFBE_V_West_StructuresFaction,WFBE_V_East_StructuresFaction]; \ No newline at end of file
diff --git a/Common/Config/Core/Core_ACE_US_D.sqf b/Common/Config/Core/Core_ACE_US_D.sqf
new file mode 100644
index 0000000..0cae3f6
--- /dev/null
+++ b/Common/Config/Core/Core_ACE_US_D.sqf
@@ -0,0 +1,67 @@
+/* ACE US Desert Configuration */
+Private ['_c','_get','_i','_p','_z'];
+
+_c = [];
+_i = [];
+
+/* Infantry */
+_c = _c + ['ACE_US_Soldier_M224_G'];
+_i = _i + [['','',220,5,-1,0,0,0.85,'USMC',[]]];
+
+_c = _c + ['ACE_US_Soldier_M224_AG'];
+_i = _i + [['','',220,5,-1,0,0,0.85,'USMC',[]]];
+
+_c = _c + ['ACE_US_Soldier_M224_AB'];
+_i = _i + [['','',220,5,-1,0,0,0.85,'USMC',[]]];
+
+_c = _c + ['ACE_US_Soldier_M252_G'];
+_i = _i + [['','',160,5,-1,0,0,0.83,'USMC',[]]];
+
+_c = _c + ['ACE_US_Soldier_M252_AG'];
+_i = _i + [['','',160,5,-1,0,0,0.83,'USMC',[]]];
+
+_c = _c + ['ACE_US_Soldier_M252_AB'];
+_i = _i + [['','',160,5,-1,0,0,0.83,'USMC',[]]];
+
+/* Heavy Vehicles */
+_c = _c + ['ACE_Stryker_RV_SLAT_D'];
+_i = _i + [['','',1800,25,[false,true,2,0],0,2,0,'US',[]]];
+
+_c = _c + ['ACE_M1A1HA_TUSK_DESERT'];
+_i = _i + [['','',5850,40,-2,2,2,0,'US',[]]];
+
+_c = _c + ['ACE_M1A1HA_TUSK_CSAMM_DESERT'];
+_i = _i + [['','',6450,40,-2,3,2,0,'US',[]]];
+
+/* Air Vehicles */
+_c = _c + ['ACE_AH6_GAU19_FLIR'];
+_i = _i + [['','',29500,50,-2,2,3,0,'US',[]]];
+
+_c = _c + ['ACE_AH6J_DAGR_FLIR'];
+_i = _i + [['','',35500,50,-2,2,3,0,'US',[]]];
+
+for '_z' from 0 to (count _c)-1 do {
+ if (isClass (configFile >> 'CfgVehicles' >> (_c select _z))) then {
+ _get = (_c select _z) Call GetNamespace;
+ if (isNil '_get') then {
+ if ((_i select _z) select 0 == '') then {(_i select _z) set [0, [_c select _z,'displayName'] Call GetConfigInfo]};
+ if (typeName ((_i select _z) select 4) == 'SCALAR') then {
+ if (((_i select _z) select 4) == -2) then {
+ _ret = (_c select _z) Call Compile preprocessFile "Common\Functions\Common_GetConfigVehicleCrewSlot.sqf";
+ (_i select _z) set [4, _ret select 0];
+ (_i select _z) set [9, _ret select 1];
+ };
+ };
+ if (WF_Debug) then {(_i select _z) set [3,1]};
+ _p = if ((_c select _z) isKindOf 'Man') then {'portrait'} else {'picture'};
+ (_i select _z) set [1, [_c select _z,_p] Call GetConfigInfo];
+ [_c select _z,_i select _z] Call SetNamespace;
+ } else {
+ diag_log Format ["[WFBE (INIT)][frameno:%2 | ticktime:%3] Core_ACE_US_D: Duplicated Element found '%1'",(_c select _z),diag_frameno,diag_tickTime];
+ };
+ } else {
+ diag_log Format ["[WFBE (ERROR)][frameno:%2 | ticktime:%3] Core_ACE_US_D: Element '%1' is not a valid class.",(_c select _z),diag_frameno,diag_tickTime];
+ };
+};
+
+diag_log Format ["[WFBE (INIT)][frameno:%2 | ticktime:%3] Core_ACE_US_D: Initialization (%1 Elements) - [Done]",count _c,diag_frameno,diag_tickTime]; \ No newline at end of file
diff --git a/Common/Config/Core/Core_ACE_US_W.sqf b/Common/Config/Core/Core_ACE_US_W.sqf
new file mode 100644
index 0000000..fa50509
--- /dev/null
+++ b/Common/Config/Core/Core_ACE_US_W.sqf
@@ -0,0 +1,136 @@
+/* ACE US Woodland Configuration */
+Private ['_c','_get','_i','_p','_z'];
+
+_c = [];
+_i = [];
+
+/* Light Vehicles */
+_c = _c + ['ACE_ATV_Honda'];
+_i = _i + [['','',175,14,-2,0,1,0,'US - Woodland',[]]];
+
+_c = _c + ['ACE_HMMWV_USARMY'];
+_i = _i + [['','',300,15,-2,0,1,0,'US - Woodland',[]]];
+
+_c = _c + ['ACE_HMMWV_MK19_USARMY'];
+_i = _i + [['','',900,18,-2,1,1,0,'US - Woodland',[]]];
+
+_c = _c + ['ACE_HMMWV_GMV'];
+_i = _i + [['','',1050,20,-2,1,1,0,'US - Woodland',[]]];
+
+_c = _c + ['ACE_HMMWV_GMV_MK19'];
+_i = _i + [['','',1050,20,-2,1,1,0,'US - Woodland',[]]];
+
+_c = _c + ['ACE_HMMWV_M2_USARMY'];
+_i = _i + [['','',850,20,-2,0,1,0,'US - Woodland',[]]];
+
+_c = _c + ['ACE_HMMWV_TOW_USARMY'];
+_i = _i + [['','',1450,20,-2,2,1,0,'US - Woodland',[]]];
+
+_c = _c + ['ACE_HMMWV_Ambulance_USARMY'];
+_i = _i + [['','',725,22,-2,2,1,0,'US - Woodland',[]]];
+
+_c = _c + ['ACE_Truck5tOpen'];
+_i = _i + [['','',400,20,-2,0,1,0,'US - Woodland',[]]];
+
+_c = _c + ['ACE_Truck5t'];
+_i = _i + [['','',400,20,-2,0,1,0,'US - Woodland',[]]];
+
+_c = _c + ['ACE_Truck5tMGOpen'];
+_i = _i + [['','',400,20,-2,0,1,0,'US - Woodland',[]]];
+
+_c = _c + ['ACE_Truck5tMG'];
+_i = _i + [['','',400,20,-2,0,1,0,'US - Woodland',[]]];
+
+_c = _c + ['ACE_Truck5tRepair'];
+_i = _i + [['','',525,22,-2,2,1,0,'US - Woodland',[]]];
+
+_c = _c + ['ACE_Truck5tReammo'];
+_i = _i + [['','',550,22,-2,1,1,0,'US - Woodland',[]]];
+
+_c = _c + ['ACE_Truck5tRefuel'];
+_i = _i + [['','',500,22,-2,1,1,0,'US - Woodland',[]]];
+
+/* Heavy Vehicles */
+_c = _c + ['ACE_Stryker_ICV_M2_SLAT'];
+_i = _i + [['','',1650,25,[false,true,2,0],0,2,0,'US - Woodland',[]]];
+
+_c = _c + ['ACE_Stryker_RV'];
+_i = _i + [['','',1800,25,[false,true,2,0],0,2,0,'US - Woodland',[]]];
+
+_c = _c + ['ACE_Stryker_RV_SLAT'];
+_i = _i + [['','',1800,25,[false,true,2,0],0,2,0,'US - Woodland',[]]];
+
+_c = _c + ['ACE_Stryker_ICV_MK19_SLAT'];
+_i = _i + [['','',1950,25,[false,true,2,0],0,2,0,'US - Woodland',[]]];
+
+_c = _c + ['ACE_Stryker_TOW_MG_Slat'];
+_i = _i + [['','',1850,25,-2,2,2,0,'US - Woodland',[]]];
+
+_c = _c + ['ACE_Stryker_TOW_Slat'];
+_i = _i + [['','',1850,25,-2,2,2,0,'US - Woodland',[]]];
+
+_c = _c + ['ACE_Stryker_MGS'];
+_i = _i + [['','',2450,25,-2,2,2,0,'US - Woodland',[]]];
+
+_c = _c + ['ACE_Stryker_MGS_Slat'];
+_i = _i + [['','',2450,25,-2,2,2,0,'US - Woodland',[]]];
+
+_c = _c + ['ACE_M113A3_Ambul'];
+_i = _i + [['','',1950,25,-2,1,2,0,'US - Woodland',[]]];
+
+_c = _c + ['ACE_Vulcan'];
+_i = _i + [['','',1950,25,-2,1,2,0,'US - Woodland',[]]];
+
+_c = _c + ['ACE_M113A3'];
+_i = _i + [['','',1950,25,-2,1,2,0,'US - Woodland',[]]];
+
+_c = _c + ['ACE_M2A2_W'];
+_i = _i + [['','',4450,30,-2,1,2,0,'US - Woodland',[]]];
+
+_c = _c + ['ACE_M2A3_W'];
+_i = _i + [['','',4950,32,-2,2,2,0,'US - Woodland',[]]];
+
+_c = _c + ['ACE_M1A1_NATO'];
+_i = _i + [['','',5650,40,-2,2,2,0,'US - Woodland',[]]];
+
+_c = _c + ['ACE_M1A1HA_TUSK'];
+_i = _i + [['','',5650,40,-2,2,2,0,'US - Woodland',[]]];
+
+_c = _c + ['ACE_M1A1HA_TUSK_CSAMM'];
+_i = _i + [['','',5650,40,-2,2,2,0,'US - Woodland',[]]];
+
+_c = _c + ['ACE_M6A1_W'];
+_i = _i + [['','',8200,35,-2,3,2,0,'US - Woodland',[]]];
+
+/* Air Vehicles */
+_c = _c + ['ACE_AH6_GAU19_FLIR'];
+_i = _i + [['','',29500,50,-2,1,3,0,'US - Woodland',[]]];
+
+_c = _c + ['ACE_AH6J_DAGR_FLIR'];
+_i = _i + [['','',35500,50,-2,1,3,0,'US - Woodland',[]]];
+
+for '_z' from 0 to (count _c)-1 do {
+ if (isClass (configFile >> 'CfgVehicles' >> (_c select _z))) then {
+ _get = (_c select _z) Call GetNamespace;
+ if (isNil '_get') then {
+ if ((_i select _z) select 0 == '') then {(_i select _z) set [0, [_c select _z,'displayName'] Call GetConfigInfo]};
+ if (typeName ((_i select _z) select 4) == 'SCALAR') then {
+ if (((_i select _z) select 4) == -2) then {
+ _ret = (_c select _z) Call Compile preprocessFile "Common\Functions\Common_GetConfigVehicleCrewSlot.sqf";
+ (_i select _z) set [4, _ret select 0];
+ (_i select _z) set [9, _ret select 1];
+ };
+ };
+ if (WF_Debug) then {(_i select _z) set [3,1]};
+ _p = if ((_c select _z) isKindOf 'Man') then {'portrait'} else {'picture'};
+ (_i select _z) set [1, [_c select _z,_p] Call GetConfigInfo];
+ [_c select _z,_i select _z] Call SetNamespace;
+ } else {
+ diag_log Format ["[WFBE (INIT)][frameno:%2 | ticktime:%3] Core_ACE_US_W: Duplicated Element found '%1'",(_c select _z),diag_frameno,diag_tickTime];
+ };
+ } else {
+ diag_log Format ["[WFBE (ERROR)][frameno:%2 | ticktime:%3] Core_ACE_US_W: Element '%1' is not a valid class.",(_c select _z),diag_frameno,diag_tickTime];
+ };
+};
+
+diag_log Format ["[WFBE (INIT)][frameno:%2 | ticktime:%3] Core_ACE_US_W: Initialization (%1 Elements) - [Done]",count _c,diag_frameno,diag_tickTime]; \ No newline at end of file
diff --git a/Common/Config/Core/Core_ACR.sqf b/Common/Config/Core/Core_ACR.sqf
new file mode 100644
index 0000000..2da71ca
--- /dev/null
+++ b/Common/Config/Core/Core_ACR.sqf
@@ -0,0 +1,97 @@
+/* ACR Configuration */
+Private ['_c','_get','_i','_p','_z'];
+
+_c = [];
+_i = [];
+
+/* Infantry */
+_c = _c + ['CZ_Soldier_Light_DES_EP1'];
+_i = _i + [['','',125,4,-1,0,0,0.85,'Czech',[]]];
+
+_c = _c + ['CZ_Soldier_DES_EP1'];
+_i = _i + [['','',150,4,-1,0,0,0.85,'Czech',[]]];
+
+_c = _c + ['CZ_Soldier_B_DES_EP1'];
+_i = _i + [['','',150,4,-1,0,0,0.85,'Czech',[]]];
+
+_c = _c + ['CZ_Soldier_AT_DES_EP1'];
+_i = _i + [['','',310,5,-1,0,0,0.87,'Czech',[]]];
+
+_c = _c + ['CZ_Soldier_AMG_DES_EP1'];
+_i = _i + [['','',210,5,-1,1,0,0.85,'Czech',[]]];
+
+_c = _c + ['CZ_Soldier_MG_DES_EP1'];
+_i = _i + [['','',220,5,-1,0,0,0.86,'Czech',[]]];
+
+_c = _c + ['CZ_Soldier_Sniper_EP1'];
+_i = _i + [['','',280,5,-1,1,0,0.88,'Czech',[]]];
+
+_c = _c + ['CZ_Special_Forces_GL_DES_EP1'];
+_i = _i + [['','',290,5,-1,3,0,0.90,'Czech',[]]];
+
+_c = _c + ['CZ_Special_Forces_MG_DES_EP1'];
+_i = _i + [['','',310,5,-1,3,0,0.90,'Czech',[]]];
+
+_c = _c + ['CZ_Special_Forces_DES_EP1'];
+_i = _i + [['','',285,5,-1,3,0,0.89,'Czech',[]]];
+
+_c = _c + ['CZ_Special_Forces_Scout_DES_EP1'];
+_i = _i + [['','',305,5,-1,3,0,0.90,'Czech',[]]];
+
+_c = _c + ['CZ_Special_Forces_TL_DES_EP1'];
+_i = _i + [['','',310,5,-1,3,0,0.91,'Czech',[]]];
+
+_c = _c + ['CZ_Soldier_Pilot_EP1'];
+_i = _i + [['','',120,4,-1,0,0,0.86,'Czech',[]]];
+
+_c = _c + ['CZ_Soldier_Office_DES_EP1'];
+_i = _i + [['','',240,5,-1,1,0,0.88,'Czech',[]]];
+
+_c = _c + ['CZ_Soldier_SL_DES_EP1'];
+_i = _i + [['','',220,5,-1,2,0,0.87,'Czech',[]]];
+
+/* Light Vehicles */
+_c = _c + ['ATV_CZ_EP1'];
+_i = _i + [['','',175,15,-2,0,1,0,'Czech',[]]];
+
+_c = _c + ['HMMWV_M1151_M2_CZ_DES_EP1'];
+_i = _i + [['','',850,20,-2,0,1,0,'Czech',[]]];
+
+_c = _c + ['LandRover_CZ_EP1'];
+_i = _i + [['','',275,18,-2,0,1,0,'Czech',[]]];
+
+_c = _c + ['LandRover_Special_CZ_EP1'];
+_i = _i + [['','',700,20,-2,0,1,0,'Czech',[]]];
+
+/* Air Vehicles */
+_c = _c + ['Mi171Sh_CZ_EP1'];
+_i = _i + [['','',7600,35,-2,1,3,0,'Czech',[]]];
+
+_c = _c + ['Mi171Sh_rockets_CZ_EP1'];
+_i = _i + [['','',26500,40,-2,0,3,0,'Czech',[]]];
+
+for '_z' from 0 to (count _c)-1 do {
+ if (isClass (configFile >> 'CfgVehicles' >> (_c select _z))) then {
+ _get = (_c select _z) Call GetNamespace;
+ if (isNil '_get') then {
+ if ((_i select _z) select 0 == '') then {(_i select _z) set [0, [_c select _z,'displayName'] Call GetConfigInfo]};
+ if (typeName ((_i select _z) select 4) == 'SCALAR') then {
+ if (((_i select _z) select 4) == -2) then {
+ _ret = (_c select _z) Call Compile preprocessFile "Common\Functions\Common_GetConfigVehicleCrewSlot.sqf";
+ (_i select _z) set [4, _ret select 0];
+ (_i select _z) set [9, _ret select 1];
+ };
+ };
+ if (WF_Debug) then {(_i select _z) set [3,1]};
+ _p = if ((_c select _z) isKindOf 'Man') then {'portrait'} else {'picture'};
+ (_i select _z) set [1, [_c select _z,_p] Call GetConfigInfo];
+ [_c select _z,_i select _z] Call SetNamespace;
+ } else {
+ diag_log Format ["[WFBE (INIT)][frameno:%2 | ticktime:%3] Core_ACR: Duplicated Element found '%1'",(_c select _z),diag_frameno,diag_tickTime];
+ };
+ } else {
+ diag_log Format ["[WFBE (ERROR)][frameno:%2 | ticktime:%3] Core_ACR: Element '%1' is not a valid class.",(_c select _z),diag_frameno,diag_tickTime];
+ };
+};
+
+diag_log Format ["[WFBE (INIT)][frameno:%2 | ticktime:%3] Core_ACR: Initialization (%1 Elements) - [Done]",count _c,diag_frameno,diag_tickTime]; \ No newline at end of file
diff --git a/Common/Config/Core/Core_BAF.sqf b/Common/Config/Core/Core_BAF.sqf
new file mode 100644
index 0000000..af4bf34
--- /dev/null
+++ b/Common/Config/Core/Core_BAF.sqf
@@ -0,0 +1,135 @@
+/* BAF (MTP) Configuration */
+private ["_c","_get","_i","_p"];
+
+_c = [];
+_i = [];
+
+/* Infantry */
+_c = _c + ['BAF_Soldier_AA_MTP'];
+_i = _i + [['','',410,6,-1,2,0,0.88,'British',[]]];
+
+_c = _c + ['BAF_Soldier_AAA_MTP'];
+_i = _i + [['','',190,6,-1,2,0,0.89,'British',[]]];
+
+_c = _c + ['BAF_Soldier_AAT_MTP'];
+_i = _i + [['','',190,4,-1,2,0,0.84,'British',[]]];
+
+_c = _c + ['BAF_Soldier_AHAT_MTP'];
+_i = _i + [['','',190,6,-1,3,0,0.85,'British',[]]];
+
+_c = _c + ['BAF_Soldier_AAR_MTP'];
+_i = _i + [['','',190,5,-1,2,0,0.88,'British',[]]];
+
+_c = _c + ['BAF_Soldier_AMG_MTP'];
+_i = _i + [['','',190,6,-1,1,0,0.87,'British',[]]];
+
+_c = _c + ['BAF_Soldier_AT_MTP'];
+_i = _i + [['','',360,6,-1,2,0,0.88,'British',[]]];
+
+_c = _c + ['BAF_Soldier_HAT_MTP'];
+_i = _i + [['','',810,6,-1,3,0,0.89,'British',[]]];
+
+_c = _c + ['BAF_Soldier_AR_MTP'];
+_i = _i + [['','',210,5,-1,2,0,0.85,'British',[]]];
+
+_c = _c + ['BAF_crewman_MTP'];
+_i = _i + [['','',125,5,-1,0,0,0.83,'British',[]]];
+
+_c = _c + ['BAF_Soldier_EN_MTP'];
+_i = _i + [['','',230,5,-1,0,0,0.84,'British',[]]];
+
+_c = _c + ['BAF_Soldier_GL_MTP'];
+_i = _i + [['','',170,5,-1,0,0,0.84,'British',[]]];
+
+_c = _c + ['BAF_Soldier_FAC_MTP'];
+_i = _i + [['','',375,6,-1,3,0,0.98,'British',[]]];
+
+_c = _c + ['BAF_Soldier_MG_MTP'];
+_i = _i + [['','',210,5,-1,0,0,0.85,'British',[]]];
+
+_c = _c + ['BAF_Soldier_scout_MTP'];
+_i = _i + [['','',340,6,-1,2,0,0.9,'British',[]]];
+
+_c = _c + ['BAF_Soldier_Marksman_MTP'];
+_i = _i + [['','',370,6,-1,3,0,0.91,'British',[]]];
+
+_c = _c + ['BAF_Soldier_Medic_MTP'];
+_i = _i + [['','',200,6,-1,0,0,0.86,'British',[]]];
+
+_c = _c + ['BAF_Soldier_Officer_MTP'];
+_i = _i + [['','',265,6,-1,2,0,0.86,'British',[]]];
+
+_c = _c + ['BAF_Pilot_MTP'];
+_i = _i + [['','',125,6,-1,0,0,0.84,'British',[]]];
+
+_c = _c + ['BAF_Soldier_MTP'];
+_i = _i + [['','',155,6,-1,0,0,0.85,'British',[]]];
+
+_c = _c + ['BAF_ASoldier_MTP'];
+_i = _i + [['','',160,6,-1,0,0,0.85,'British',[]]];
+
+_c = _c + ['BAF_Soldier_L_MTP'];
+_i = _i + [['','',130,6,-1,0,0,0.85,'British',[]]];
+
+_c = _c + ['BAF_Soldier_N_MTP'];
+_i = _i + [['','',175,6,-1,1,0,0.86,'British',[]]];
+
+_c = _c + ['BAF_Soldier_SL_MTP'];
+_i = _i + [['','',235,6,-1,2,0,0.92,'British',[]]];
+
+_c = _c + ['BAF_Soldier_SniperN_MTP'];
+_i = _i + [['','',390,6,-1,3,0,0.9,'British',[]]];
+
+_c = _c + ['BAF_Soldier_SniperH_MTP'];
+_i = _i + [['','',420,6,-1,2,0,0.9,'British',[]]];
+
+_c = _c + ['BAF_Soldier_Sniper_MTP'];
+_i = _i + [['','',395,6,-1,2,0,0.9,'British',[]]];
+
+_c = _c + ['BAF_Soldier_spotter_MTP'];
+_i = _i + [['','',340,6,-1,2,0,0.88,'British',[]]];
+
+_c = _c + ['BAF_Soldier_spotterN_MTP'];
+_i = _i + [['','',350,6,-1,2,0,0.88,'British',[]]];
+
+_c = _c + ['BAF_Soldier_TL_MTP'];
+_i = _i + [['','',245,6,-1,1,0,0.91,'British',[]]];
+
+/* Air Vehicles */
+_c = _c + ['BAF_Merlin_HC3_D'];
+_i = _i + [['','',21000,45,-2,0,3,0,'British',[]]];
+
+_c = _c + ['CH_47F_BAF'];
+_i = _i + [['','',20000,40,-2,0,3,0,'British',[]]];
+
+_c = _c + ['BAF_Apache_AH1_D'];
+_i = _i + [['','',82500,60,-2,2,3,0,'British',[]]];
+
+_c = _c + ['AW159_Lynx_BAF'];
+_i = _i + [['','',75000,35,-2,1,3,0,'British',[]]];
+
+for '_z' from 0 to (count _c)-1 do {
+ if (isClass (configFile >> 'CfgVehicles' >> (_c select _z))) then {
+ _get = (_c select _z) Call GetNamespace;
+ if (isNil '_get') then {
+ if ((_i select _z) select 0 == '') then {(_i select _z) set [0, [_c select _z,'displayName'] Call GetConfigInfo]};
+ if (typeName ((_i select _z) select 4) == 'SCALAR') then {
+ if (((_i select _z) select 4) == -2) then {
+ _ret = (_c select _z) Call Compile preprocessFile "Common\Functions\Common_GetConfigVehicleCrewSlot.sqf";
+ (_i select _z) set [4, _ret select 0];
+ (_i select _z) set [9, _ret select 1];
+ };
+ };
+ if (WF_Debug) then {(_i select _z) set [3,1]};
+ _p = if ((_c select _z) isKindOf 'Man') then {'portrait'} else {'picture'};
+ (_i select _z) set [1, [_c select _z,_p] Call GetConfigInfo];
+ [_c select _z,_i select _z] Call SetNamespace;
+ } else {
+ diag_log Format ["[WFBE (INIT)][frameno:%2 | ticktime:%3] Core_BAF: Duplicated Element found '%1'",(_c select _z),diag_frameno,diag_tickTime];
+ };
+ } else {
+ diag_log Format ["[WFBE (ERROR)][frameno:%2 | ticktime:%3] Core_BAF: Element '%1' is not a valid class.",(_c select _z),diag_frameno,diag_tickTime];
+ };
+};
+
+diag_log Format ["[WFBE (INIT)][frameno:%2 | ticktime:%3] Core_BAF: Initialization (%1 Elements) - [Done]",count _c,diag_frameno,diag_tickTime]; \ No newline at end of file
diff --git a/Common/Config/Core/Core_BAFD.sqf b/Common/Config/Core/Core_BAFD.sqf
new file mode 100644
index 0000000..0d44fbf
--- /dev/null
+++ b/Common/Config/Core/Core_BAFD.sqf
@@ -0,0 +1,124 @@
+/* BAF (Desert) Configuration */
+private ["_c","_get","_i","_p"];
+
+_c = [];
+_i = [];
+
+/* Infantry */
+_c = _c + ['BAF_Soldier_AA_DDPM'];
+_i = _i + [['','',410,6,-1,2,0,0.88,'British (Desert)',[]]];
+
+_c = _c + ['BAF_Soldier_AAA_DDPM'];
+_i = _i + [['','',440,6,-1,2,0,0.87,'British (Desert)',[]]];
+
+_c = _c + ['BAF_Soldier_AAT_DDPM'];
+_i = _i + [['','',190,4,-1,2,0,0.84,'British (Desert)',[]]];
+
+_c = _c + ['BAF_Soldier_AHAT_DDPM'];
+_i = _i + [['','',190,6,-1,3,0,0.85,'British (Desert)',[]]];
+
+_c = _c + ['BAF_Soldier_AAR_DDPM'];
+_i = _i + [['','',190,5,-1,2,0,0.88,'British (Desert)',[]]];
+
+_c = _c + ['BAF_Soldier_AMG_DDPM'];
+_i = _i + [['','',190,6,-1,1,0,0.87,'British (Desert)',[]]];
+
+_c = _c + ['BAF_Soldier_AT_DDPM'];
+_i = _i + [['','',360,6,-1,2,0,0.87,'British (Desert)',[]]];
+
+_c = _c + ['BAF_Soldier_HAT_DDPM'];
+_i = _i + [['','',810,6,-1,3,0,0.89,'British (Desert)',[]]];
+
+_c = _c + ['BAF_Soldier_AR_DDPM'];
+_i = _i + [['','',210,5,-1,2,0,0.85,'British (Desert)',[]]];
+
+_c = _c + ['BAF_crewman_DDPM'];
+_i = _i + [['','',125,5,-1,0,0,0.83,'British (Desert)',[]]];
+
+_c = _c + ['BAF_Soldier_EN_DDPM'];
+_i = _i + [['','',230,5,-1,0,0,0.84,'British (Desert)',[]]];
+
+_c = _c + ['BAF_Soldier_GL_DDPM'];
+_i = _i + [['','',170,5,-1,0,0,0.84,'British (Desert)',[]]];
+
+_c = _c + ['BAF_Soldier_FAC_DDPM'];
+_i = _i + [['','',375,6,-1,3,0,0.98,'British (Desert)',[]]];
+
+_c = _c + ['BAF_Soldier_MG_DDPM'];
+_i = _i + [['','',210,5,-1,0,0,0.85,'British (Desert)',[]]];
+
+_c = _c + ['BAF_Soldier_scout_DDPM'];
+_i = _i + [['','',340,6,-1,2,0,0.9,'British (Desert)',[]]];
+
+_c = _c + ['BAF_Soldier_Marksman_DDPM'];
+_i = _i + [['','',370,6,-1,3,0,0.91,'British (Desert)',[]]];
+
+_c = _c + ['BAF_Soldier_Medic_DDPM'];
+_i = _i + [['','',200,6,-1,0,0,0.86,'British (Desert)',[]]];
+
+_c = _c + ['BAF_Soldier_Officer_DDPM'];
+_i = _i + [['','',265,6,-1,2,0,0.86,'British (Desert)',[]]];
+
+_c = _c + ['BAF_Pilot_DDPM'];
+_i = _i + [['','',125,6,-1,0,0,0.84,'British (Desert)',[]]];
+
+_c = _c + ['BAF_Soldier_DDPM'];
+_i = _i + [['','',155,6,-1,0,0,0.85,'British (Desert)',[]]];
+
+_c = _c + ['BAF_ASoldier_DDPM'];
+_i = _i + [['','',160,6,-1,0,0,0.85,'British (Desert)',[]]];
+
+_c = _c + ['BAF_Soldier_L_DDPM'];
+_i = _i + [['','',130,6,-1,0,0,0.85,'British (Desert)',[]]];
+
+_c = _c + ['BAF_Soldier_N_DDPM'];
+_i = _i + [['','',175,6,-1,1,0,0.86,'British (Desert)',[]]];
+
+_c = _c + ['BAF_Soldier_SL_DDPM'];
+_i = _i + [['','',235,6,-1,2,0,0.92,'British (Desert)',[]]];
+
+_c = _c + ['BAF_Soldier_TL_DDPM'];
+_i = _i + [['','',245,6,-1,1,0,0.91,'British (Desert)',[]]];
+
+/* Light Vehicles */
+_c = _c + ['BAF_ATV_D'];
+_i = _i + [['','',175,12,-2,0,1,0,'British (Desert)',[]]];
+
+_c = _c + ['BAF_Offroad_D'];
+_i = _i + [['','',375,13,-2,0,1,0,'British (Desert)',[]]];
+
+_c = _c + ['BAF_Jackal2_GMG_D'];
+_i = _i + [['','',965,20,-2,1,1,0,'British (Desert)',[]]];
+
+_c = _c + ['BAF_Jackal2_L2A1_D'];
+_i = _i + [['','',725,21,-2,0,1,0,'British (Desert)',[]]];
+
+/* Heavy Vehicles */
+_c = _c + ['BAF_FV510_D'];
+_i = _i + [['','',4950,30,-2,2,2,0,'British (Desert)',[]]];
+
+for '_z' from 0 to (count _c)-1 do {
+ if (isClass (configFile >> 'CfgVehicles' >> (_c select _z))) then {
+ _get = (_c select _z) Call GetNamespace;
+ if (isNil '_get') then {
+ if ((_i select _z) select 0 == '') then {(_i select _z) set [0, [_c select _z,'displayName'] Call GetConfigInfo]};
+ if (typeName ((_i select _z) select 4) == 'SCALAR') then {
+ if (((_i select _z) select 4) == -2) then {
+ _ret = (_c select _z) Call Compile preprocessFile "Common\Functions\Common_GetConfigVehicleCrewSlot.sqf";
+ (_i select _z) set [4, _ret select 0];
+ (_i select _z) set [9, _ret select 1];
+ };
+ };
+ if (WF_Debug) then {(_i select _z) set [3,1]};
+ _p = if ((_c select _z) isKindOf 'Man') then {'portrait'} else {'picture'};
+ (_i select _z) set [1, [_c select _z,_p] Call GetConfigInfo];
+ [_c select _z,_i select _z] Call SetNamespace;
+ } else {
+ diag_log Format ["[WFBE (INIT)][frameno:%2 | ticktime:%3] Core_BAFD: Duplicated Element found '%1'",(_c select _z),diag_frameno,diag_tickTime];
+ };
+ } else {
+ diag_log Format ["[WFBE (ERROR)][frameno:%2 | ticktime:%3] Core_BAFD: Element '%1' is not a valid class.",(_c select _z),diag_frameno,diag_tickTime];
+ };
+};
+
+diag_log Format ["[WFBE (INIT)][frameno:%2 | ticktime:%3] Core_BAFD: Initialization (%1 Elements) - [Done]",count _c,diag_frameno,diag_tickTime]; \ No newline at end of file
diff --git a/Common/Config/Core/Core_BAFW.sqf b/Common/Config/Core/Core_BAFW.sqf
new file mode 100644
index 0000000..138e73d
--- /dev/null
+++ b/Common/Config/Core/Core_BAFW.sqf
@@ -0,0 +1,152 @@
+/* BAF (Woodland) Configuration */
+private ["_c","_get","_i","_p"];
+
+_c = [];
+_i = [];
+
+/* Infantry */
+_c = _c + ['BAF_Soldier_AA_W'];
+_i = _i + [['','',410,6,-1,2,0,0.88,'British (Woodland)',[]]];
+
+_c = _c + ['BAF_Soldier_AAA_W'];
+_i = _i + [['','',190,6,-1,2,0,0.87,'British (Woodland)',[]]];
+
+_c = _c + ['BAF_Soldier_AAT_W'];
+_i = _i + [['','',190,4,-1,2,0,0.84,'British (Woodland)',[]]];
+
+_c = _c + ['BAF_Soldier_AHAT_W'];
+_i = _i + [['','',190,6,-1,3,0,0.85,'British (Woodland)',[]]];
+
+_c = _c + ['BAF_Soldier_AAR_W'];
+_i = _i + [['','',190,5,-1,2,0,0.86,'British (Woodland)',[]]];
+
+_c = _c + ['BAF_Soldier_AMG_W'];
+_i = _i + [['','',190,6,-1,1,0,0.87,'British (Woodland)',[]]];
+
+_c = _c + ['BAF_Soldier_AT_W'];
+_i = _i + [['','',360,6,-1,2,0,0.87,'British (Woodland)',[]]];
+
+_c = _c + ['BAF_Soldier_HAT_W'];
+_i = _i + [['','',810,6,-1,3,0,0.9,'British (Woodland)',[]]];
+
+_c = _c + ['BAF_Soldier_AR_W'];
+_i = _i + [['','',210,5,-1,2,0,0.85,'British (Woodland)',[]]];
+
+_c = _c + ['BAF_crewman_W'];
+_i = _i + [['','',125,5,-1,0,0,0.83,'British (Woodland)',[]]];
+
+_c = _c + ['BAF_Soldier_EN_W'];
+_i = _i + [['','',230,5,-1,0,0,0.84,'British (Woodland)',[]]];
+
+_c = _c + ['BAF_Soldier_GL_W'];
+_i = _i + [['','',170,5,-1,0,0,0.84,'British (Woodland)',[]]];
+
+_c = _c + ['BAF_Soldier_FAC_W'];
+_i = _i + [['','',375,6,-1,3,0,0.98,'British (Woodland)',[]]];
+
+_c = _c + ['BAF_Soldier_MG_W'];
+_i = _i + [['','',210,5,-1,0,0,0.85,'British (Woodland)',[]]];
+
+_c = _c + ['BAF_Soldier_scout_W'];
+_i = _i + [['','',340,6,-1,2,0,0.9,'British (Woodland)',[]]];
+
+_c = _c + ['BAF_Soldier_Marksman_W'];
+_i = _i + [['','',370,6,-1,3,0,0.91,'British (Woodland)',[]]];
+
+_c = _c + ['BAF_Soldier_Medic_W'];
+_i = _i + [['','',200,6,-1,0,0,0.86,'British (Woodland)',[]]];
+
+_c = _c + ['BAF_Soldier_Officer_W'];
+_i = _i + [['','',265,6,-1,2,0,0.86,'British (Woodland)',[]]];
+
+_c = _c + ['BAF_Pilot_W'];
+_i = _i + [['','',125,6,-1,0,0,0.84,'British (Woodland)',[]]];
+
+_c = _c + ['BAF_Soldier_W'];
+_i = _i + [['','',155,6,-1,0,0,0.85,'British (Woodland)',[]]];
+
+_c = _c + ['BAF_ASoldier_W'];
+_i = _i + [['','',160,6,-1,0,0,0.85,'British (Woodland)',[]]];
+
+_c = _c + ['BAF_Soldier_L_W'];
+_i = _i + [['','',130,6,-1,0,0,0.85,'British (Woodland)',[]]];
+
+_c = _c + ['BAF_Soldier_N_W'];
+_i = _i + [['','',175,6,-1,1,0,0.86,'British (Woodland)',[]]];
+
+_c = _c + ['BAF_Soldier_SL_W'];
+_i = _i + [['','',235,6,-1,2,0,0.92,'British (Woodland)',[]]];
+
+_c = _c + ['BAF_Soldier_SniperN_W'];
+_i = _i + [['','',390,6,-1,3,0,0.9,'British (Woodland)',[]]];
+
+_c = _c + ['BAF_Soldier_SniperH_W'];
+_i = _i + [['','',420,6,-1,2,0,0.9,'British (Woodland)',[]]];
+
+_c = _c + ['BAF_Soldier_Sniper_W'];
+_i = _i + [['','',395,6,-1,2,0,0.9,'British (Woodland)',[]]];
+
+_c = _c + ['BAF_Soldier_spotter_W'];
+_i = _i + [['','',340,6,-1,2,0,0.88,'British (Woodland)',[]]];
+
+_c = _c + ['BAF_Soldier_spotterN_W'];
+_i = _i + [['','',350,6,-1,2,0,0.88,'British (Woodland)',[]]];
+
+_c = _c + ['BAF_Soldier_TL_W'];
+_i = _i + [['','',245,6,-1,1,0,0.91,'British (Woodland)',[]]];
+
+/* Light Vehicles */
+_c = _c + ['BAF_ATV_W'];
+_i = _i + [['','',175,12,-2,0,1,0,'British (Woodland)',[]]];
+
+_c = _c + ['BAF_Offroad_W'];
+_i = _i + [['','',375,13,-2,0,1,0,'British (Woodland)',[]]];
+
+_c = _c + ['BAF_Jackal2_GMG_W'];
+_i = _i + [['','',965,20,-2,1,1,0,'British (Woodland)',[]]];
+
+_c = _c + ['BAF_Jackal2_L2A1_W'];
+_i = _i + [['','',725,21,-2,0,1,0,'British (Woodland)',[]]];
+
+/* Heavy Vehicles */
+_c = _c + ['BAF_FV510_W'];
+_i = _i + [['','',4950,30,-2,2,2,0,'British (Woodland)',[]]];
+
+/* Static Defenses */
+_c = _c + ['BAF_GPMG_Minitripod_W'];
+_i = _i + [['','',225,0,1,0,'Defense',0,'British (Woodland)',[]]];
+
+_c = _c + ['BAF_GMG_Tripod_W'];
+_i = _i + [['','',250,0,1,0,'Defense',0,'British (Woodland)',[]]];
+
+_c = _c + ['BAF_L2A1_Minitripod_W'];
+_i = _i + [['','',300,0,1,0,'Defense',0,'British (Woodland)',[]]];
+
+_c = _c + ['BAF_L2A1_Tripod_W'];
+_i = _i + [['','',325,0,1,0,'Defense',0,'British (Woodland)',[]]];
+
+for '_z' from 0 to (count _c)-1 do {
+ if (isClass (configFile >> 'CfgVehicles' >> (_c select _z))) then {
+ _get = (_c select _z) Call GetNamespace;
+ if (isNil '_get') then {
+ if ((_i select _z) select 0 == '') then {(_i select _z) set [0, [_c select _z,'displayName'] Call GetConfigInfo]};
+ if (typeName ((_i select _z) select 4) == 'SCALAR') then {
+ if (((_i select _z) select 4) == -2) then {
+ _ret = (_c select _z) Call Compile preprocessFile "Common\Functions\Common_GetConfigVehicleCrewSlot.sqf";
+ (_i select _z) set [4, _ret select 0];
+ (_i select _z) set [9, _ret select 1];
+ };
+ };
+ if (WF_Debug) then {(_i select _z) set [3,1]};
+ _p = if ((_c select _z) isKindOf 'Man') then {'portrait'} else {'picture'};
+ (_i select _z) set [1, [_c select _z,_p] Call GetConfigInfo];
+ [_c select _z,_i select _z] Call SetNamespace;
+ } else {
+ diag_log Format ["[WFBE (INIT)][frameno:%2 | ticktime:%3] Core_BAFW: Duplicated Element found '%1'",(_c select _z),diag_frameno,diag_tickTime];
+ };
+ } else {
+ diag_log Format ["[WFBE (ERROR)][frameno:%2 | ticktime:%3] Core_BAFW: Element '%1' is not a valid class.",(_c select _z),diag_frameno,diag_tickTime];
+ };
+};
+
+diag_log Format ["[WFBE (INIT)][frameno:%2 | ticktime:%3] Core_BAFW: Initialization (%1 Elements) - [Done]",count _c,diag_frameno,diag_tickTime]; \ No newline at end of file
diff --git a/Common/Config/Core/Core_CDF.sqf b/Common/Config/Core/Core_CDF.sqf
new file mode 100644
index 0000000..b0e8cae
--- /dev/null
+++ b/Common/Config/Core/Core_CDF.sqf
@@ -0,0 +1,180 @@
+/* CDF Configuration */
+private ["_c","_get","_i","_p"];
+
+_c = [];
+_i = [];
+
+/* Infantry */
+_c = _c + ['CDF_Soldier'];
+_i = _i + [['','',150,4,-1,0,0,0.65,'CDF',[]]];
+
+_c = _c + ['CDF_Soldier_Engineer'];
+_i = _i + [['','',225,5,-1,0,0,0.66,'CDF',[]]];
+
+_c = _c + ['CDF_Soldier_Light'];
+_i = _i + [['','',175,4,-1,0,0,0.65,'CDF',[]]];
+
+_c = _c + ['CDF_Soldier_GL'];
+_i = _i + [['','',180,4,-1,0,0,0.65,'CDF',[]]];
+
+_c = _c + ['CDF_Soldier_Militia'];
+_i = _i + [['','',160,3,-1,0,0,0.62,'CDF',[]]];
+
+_c = _c + ['CDF_Soldier_Medic'];
+_i = _i + [['','',210,4,-1,0,0,0.69,'CDF',[]]];
+
+_c = _c + ['CDF_Soldier_Sniper'];
+_i = _i + [['','',230,5,-1,1,0,0.72,'CDF',[]]];
+
+_c = _c + ['CDF_Soldier_Spotter'];
+_i = _i + [['','',240,6,-1,1,0,0.71,'CDF',[]]];
+
+_c = _c + ['CDF_Soldier_Marksman'];
+_i = _i + [['','',235,7,-1,3,0,0.69,'CDF',[]]];
+
+_c = _c + ['CDF_Soldier_RPG'];
+_i = _i + [['','',250,6,-1,1,0,0.64,'CDF',[]]];
+
+_c = _c + ['CDF_Soldier_Strela'];
+_i = _i + [['','',400,6,-1,2,0,0.68,'CDF',[]]];
+
+_c = _c + ['CDF_Soldier_AR'];
+_i = _i + [['','',165,6,-1,1,0,0.64,'CDF',[]]];
+
+_c = _c + ['CDF_Soldier_MG'];
+_i = _i + [['','',180,5,-1,0,0,0.65,'CDF',[]]];
+
+_c = _c + ['CDF_Soldier_TL'];
+_i = _i + [['','',210,6,-1,2,0,0.73,'CDF',[]]];
+
+_c = _c + ['CDF_Soldier_Officer'];
+_i = _i + [['','',230,7,-1,1,0,0.74,'CDF',[]]];
+
+_c = _c + ['CDF_Commander'];
+_i = _i + [['','',280,7,-1,3,0,0.75,'CDF',[]]];
+
+_c = _c + ['CDF_Soldier_Pilot'];
+_i = _i + [['','',130,5,-1,0,0,0.62,'CDF',[]]];
+
+_c = _c + ['CDF_Soldier_Crew'];
+_i = _i + [['','',130,5,-1,0,0,0.63,'CDF',[]]];
+
+/* Light Vehicles */
+_c = _c + ['UAZ_CDF'];
+_i = _i + [['','',150,15,-2,0,1,0,'CDF',[]]];
+
+_c = _c + ['UAZ_MG_CDF'];
+_i = _i + [['','',310,17,-2,0,1,0,'CDF',[]]];
+
+_c = _c + ['UAZ_AGS30_CDF'];
+_i = _i + [['','',475,25,-2,1,1,0,'CDF',[]]];
+
+_c = _c + ['Ural_CDF'];
+_i = _i + [['','',300,20,-2,0,1,0,'CDF',[]]];
+
+_c = _c + ['WarfareSalvageTruck_CDF'];
+_i = _i + [['','',450,18,-2,0,1,0,'CDF',[]]];
+
+_c = _c + ['UralRepair_CDF'];
+_i = _i + [['','',525,21,-2,2,1,0,'CDF',[]]];
+
+_c = _c + ['UralReammo_CDF'];
+_i = _i + [['','',550,21,-2,1,1,0,'CDF',[]]];
+
+_c = _c + ['UralRefuel_CDF'];
+_i = _i + [['','',500,21,-2,1,1,0,'CDF',[]]];
+
+_c = _c + ['WarfareSupplyTruck_CDF'];
+_i = _i + [['','',550,21,-2,0,1,0,'CDF',[]]];
+
+_c = _c + ['BRDM2_CDF'];
+_i = _i + [['','',1100,25,-2,1,1,0,'CDF',[]]];
+
+_c = _c + ['BRDM2_ATGM_CDF'];
+_i = _i + [['','',1650,25,-2,2,1,0,'CDF',[]]];
+
+_c = _c + ['Ural_ZU23_CDF'];
+_i = _i + [['','',1750,20,-2,2,1,0,'CDF',[]]];
+
+_c = _c + ['GRAD_CDF'];
+_i = _i + [['','',4200,35,-2,3,1,0,'CDF',[]]];
+
+/* Heavy Vehicles */
+_c = _c + ['BMP2_Ambul_CDF'];
+_i = _i + [['','',950,20,-2,0,2,0,'CDF',[]]];
+
+_c = _c + ['BMP2_CDF'];
+_i = _i + [['','',2600,30,-2,1,2,0,'CDF',[]]];
+
+_c = _c + ['ZSU_CDF'];
+_i = _i + [['','',3400,35,-2,2,2,0,'CDF',[]]];
+
+_c = _c + ['T72_CDF'];
+_i = _i + [['','',4900,35,-2,3,2,0,'CDF',[]]];
+
+/* Air Vehicles */
+_c = _c + ['Mi17_CDF'];
+_i = _i + [['','',15000,35,-2,0,3,0,'CDF',[]]];
+
+_c = _c + ['Mi17_medevac_CDF'];
+_i = _i + [['','',18000,35,-2,1,3,0,'CDF',[]]];
+
+_c = _c + ['Mi24_D'];
+_i = _i + [['','',65000,40,-2,2,3,0,'CDF',[]]];
+
+_c = _c + ['Su25_CDF'];
+_i = _i + [['','',92000,55,-2,3,3,0,'CDF',[]]];
+
+/* Static Defenses */
+_c = _c + ['CDF_WarfareBMGNest_PK'];
+_i = _i + [['','',300,0,1,0,'Defense',0,'CDF',[]]];
+
+_c = _c + ['DSHkM_Mini_TriPod_CDF'];
+_i = _i + [['','',200,0,1,0,'Defense',0,'CDF',[]]];
+
+_c = _c + ['DSHKM_CDF'];
+_i = _i + [['','',225,0,1,0,'Defense',0,'CDF',[]]];
+
+_c = _c + ['SearchLight_CDF'];
+_i = _i + [['','',125,0,1,0,'Defense',0,'CDF',[]]];
+
+_c = _c + ['AGS_CDF'];
+_i = _i + [['','',700,0,1,0,'Defense',0,'CDF',[]]];
+
+_c = _c + ['SPG9_CDF'];
+_i = _i + [['','',475,0,1,0,'Defense',0,'CDF',[]]];
+
+_c = _c + ['ZU23_CDF'];
+_i = _i + [['','',945,0,1,0,'Defense',0,'CDF',[]]];
+
+_c = _c + ['2b14_82mm_CDF'];
+_i = _i + [['Podnos 2B14','',1150,0,1,0,'Defense',0,'CDF',[]]];
+
+_c = _c + ['D30_CDF'];
+_i = _i + [['','',2250,0,1,0,'Defense',0,'CDF',[]]];
+
+for '_z' from 0 to (count _c)-1 do {
+ if (isClass (configFile >> 'CfgVehicles' >> (_c select _z))) then {
+ _get = (_c select _z) Call GetNamespace;
+ if (isNil '_get') then {
+ if ((_i select _z) select 0 == '') then {(_i select _z) set [0, [_c select _z,'displayName'] Call GetConfigInfo]};
+ if (typeName ((_i select _z) select 4) == 'SCALAR') then {
+ if (((_i select _z) select 4) == -2) then {
+ _ret = (_c select _z) Call Compile preprocessFile "Common\Functions\Common_GetConfigVehicleCrewSlot.sqf";
+ (_i select _z) set [4, _ret select 0];
+ (_i select _z) set [9, _ret select 1];
+ };
+ };
+ if (WF_Debug) then {(_i select _z) set [3,1]};
+ _p = if ((_c select _z) isKindOf 'Man') then {'portrait'} else {'picture'};
+ (_i select _z) set [1, [_c select _z,_p] Call GetConfigInfo];
+ [_c select _z,_i select _z] Call SetNamespace;
+ } else {
+ diag_log Format ["[WFBE (INIT)][frameno:%2 | ticktime:%3] Core_CDF: Duplicated Element found '%1'",(_c select _z),diag_frameno,diag_tickTime];
+ };
+ } else {
+ diag_log Format ["[WFBE (ERROR)][frameno:%2 | ticktime:%3] Core_CDF: Element '%1' is not a valid class.",(_c select _z),diag_frameno,diag_tickTime];
+ };
+};
+
+diag_log Format ["[WFBE (INIT)][frameno:%2 | ticktime:%3] Core_CDF: Initialization (%1 Elements) - [Done]",count _c,diag_frameno,diag_tickTime]; \ No newline at end of file
diff --git a/Common/Config/Core/Core_CIV.sqf b/Common/Config/Core/Core_CIV.sqf
new file mode 100644
index 0000000..3eaf2c6
--- /dev/null
+++ b/Common/Config/Core/Core_CIV.sqf
@@ -0,0 +1,175 @@
+/* CIV Configuration */
+private ["_c","_get","_i","_p"];
+
+_c = [];
+_i = [];
+
+/* Infantry */
+_c = _c + ['Worker1'];
+_i = _i + [['','',375,4,-1,0,0,0.4,'Civilians',[]]];
+
+_c = _c + ['Worker2'];
+_i = _i + [['','',375,4,-1,0,0,0.4,'Civilians',[]]];
+
+_c = _c + ['Worker3'];
+_i = _i + [['','',375,4,-1,0,0,0.4,'Civilians',[]]];
+
+_c = _c + ['Worker4'];
+_i = _i + [['','',375,4,-1,0,0,0.4,'Civilians',[]]];
+
+/* Light Vehicles */
+_c = _c + ['MMT_Civ'];
+_i = _i + [['','',50,8,-2,0,1,0,'Civilians',[]]];
+
+_c = _c + ['TT650_Civ'];
+_i = _i + [['','',100,12,-2,0,1,0,'Civilians',[]]];
+
+_c = _c + ['Tractor'];
+_i = _i + [['','',150,15,-2,0,1,0,'Civilians',[]]];
+
+_c = _c + ['Lada1'];
+_i = _i + [['','',175,18,-2,0,1,0,'Civilians',[]]];
+
+_c = _c + ['Lada2'];
+_i = _i + [['','',175,18,-2,0,1,0,'Civilians',[]]];
+
+_c = _c + ['LadaLM'];
+_i = _i + [['','',180,20,-2,0,1,0,'Civilians',[]]];
+
+_c = _c + ['SkodaBlue'];
+_i = _i + [['','',190,17,-2,0,1,0,'Civilians',[]]];
+
+_c = _c + ['SkodaRed'];
+_i = _i + [['','',190,17,-2,0,1,0,'Civilians',[]]];
+
+_c = _c + ['car_sedan'];
+_i = _i + [['','',200,20,-2,0,1,0,'Civilians',[]]];
+
+_c = _c + ['car_hatchback'];
+_i = _i + [['','',220,20,-2,0,1,0,'Civilians',[]]];
+
+_c = _c + ['datsun1_civil_1_open'];
+_i = _i + [['','',250,22,-2,0,1,0,'Civilians',[]]];
+
+_c = _c + ['datsun1_civil_2_covered'];
+_i = _i + [['','',250,22,-2,0,1,0,'Civilians',[]]];
+
+_c = _c + ['datsun1_civil_3_open'];
+_i = _i + [['','',250,22,-2,0,1,0,'Civilians',[]]];
+
+_c = _c + ['VWGolf'];
+_i = _i + [['','',270,23,-2,0,1,0,'Civilians',[]]];
+
+_c = _c + ['hilux1_civil_1_open'];
+_i = _i + [['','',340,25,-2,0,1,0,'Civilians',[]]];
+
+_c = _c + ['hilux1_civil_2_covered'];
+_i = _i + [['','',340,25,-2,0,1,0,'Civilians',[]]];
+
+_c = _c + ['V3S_Civ'];
+_i = _i + [['','',380,22,-2,0,1,0,'Civilians',[]]];
+
+_c = _c + ['UralCivil'];
+_i = _i + [['','',390,25,-2,0,1,0,'Civilians',[]]];
+
+_c = _c + ['Ikarus'];
+_i = _i + [['','',420,25,-2,0,1,0,'Civilians',[]]];
+
+if (paramDLCPMC) then
+{
+ _c = _c + ['ArmoredSUV_PMC'];
+ _i = _i + [['','',1150,20,2,1,1,0,'Civilians']];
+};
+
+/* Defense Structures */
+_c = _c + ['Land_HBarrier3'];
+_i = _i + [['','',20,0,0,0,'Fortification',0,'Civilians',[]]];
+
+_c = _c + ['Land_HBarrier5'];
+_i = _i + [['','',30,0,0,0,'Fortification',0,'Civilians',[]]];
+
+_c = _c + ['Land_HBarrier_large'];
+_i = _i + [['','',50,0,0,0,'Fortification',0,'Civilians',[]]];
+
+_c = _c + ['Land_fort_bagfence_long'];
+_i = _i + [['','',10,0,0,0,'Fortification',0,'Civilians',[]]];
+
+_c = _c + ['Land_fort_bagfence_corner'];
+_i = _i + [['','',8,0,0,0,'Fortification',0,'Civilians',[]]];
+
+_c = _c + ['Land_fort_bagfence_round'];
+_i = _i + [['','',12,0,0,0,'Fortification',0,'Civilians',[]]];
+
+_c = _c + ['Hhedgehog_concreteBig'];
+_i = _i + [['','',95,0,0,0,'Fortification',0,'Civilians',[]]];
+
+_c = _c + ['Hedgehog'];
+_i = _i + [['','',5,0,0,0,'Fortification',0,'Civilians',[]]];
+
+_c = _c + ['HeliH'];
+_i = _i + [['','',15,0,0,0,'Strategic',0,'Civilians',[]]];
+
+_c = _c + ['MASH'];
+_i = _i + [['','',30,0,0,0,'Strategic',0,'Civilians',[]]];
+
+_c = _c + ['Land_Campfire'];
+_i = _i + [['','',3,0,0,0,'Strategic',0,'Civilians',[]]];
+
+_c = _c + ['Base_WarfareBBarrier5x'];
+_i = _i + [['','',15,0,0,0,'Fortification',0,'Civilians',[]]];
+
+_c = _c + ['Base_WarfareBBarrier10x'];
+_i = _i + [['','',25,0,0,0,'Fortification',0,'Civilians',[]]];
+
+_c = _c + ['Base_WarfareBBarrier10xTall'];
+_i = _i + [['','',50,0,0,0,'Fortification',0,'Civilians',[]]];
+
+_c = _c + ['Land_fortified_nest_small'];
+_i = _i + [['','',40,0,0,0,'Fortification',0,'Civilians',[]]];
+
+_c = _c + ['Land_fortified_nest_big'];
+_i = _i + [['','',100,0,0,0,'Fortification',0,'Civilians',[]]];
+
+_c = _c + ['Land_Fort_Watchtower'];
+_i = _i + [['','',125,0,0,0,'Fortification',0,'Civilians',[]]];
+
+_c = _c + ['Land_fort_rampart'];
+_i = _i + [['','',30,0,0,0,'Fortification',0,'Civilians',[]]];
+
+_c = _c + ['Land_fort_artillery_nest'];
+_i = _i + [['','',65,0,0,0,'Fortification',0,'Civilians',[]]];
+
+_c = _c + ['Sign_Danger'];
+_i = _i + [[localize 'STR_WF_Minefield','',1200,0,0,0,'Strategic',0,'Civilians',[]]];
+
+_c = _c + ['Fort_RazorWire'];
+_i = _i + [['','',25,0,0,0,'Fortification',0,'Civilians',[]]];
+
+_c = _c + ['Land_Ind_IlluminantTower'];
+_i = _i + [['','',200,0,0,0,'Fortification',0,'Civilians',[]]];
+
+for '_z' from 0 to (count _c)-1 do {
+ if (isClass (configFile >> 'CfgVehicles' >> (_c select _z))) then {
+ _get = (_c select _z) Call GetNamespace;
+ if (isNil '_get') then {
+ if ((_i select _z) select 0 == '') then {(_i select _z) set [0, [_c select _z,'displayName'] Call GetConfigInfo]};
+ if (typeName ((_i select _z) select 4) == 'SCALAR') then {
+ if (((_i select _z) select 4) == -2) then {
+ _ret = (_c select _z) Call Compile preprocessFile "Common\Functions\Common_GetConfigVehicleCrewSlot.sqf";
+ (_i select _z) set [4, _ret select 0];
+ (_i select _z) set [9, _ret select 1];
+ };
+ };
+ if (WF_Debug) then {(_i select _z) set [3,1]};
+ _p = if ((_c select _z) isKindOf 'Man') then {'portrait'} else {'picture'};
+ (_i select _z) set [1, [_c select _z,_p] Call GetConfigInfo];
+ [_c select _z,_i select _z] Call SetNamespace;
+ } else {
+ diag_log Format ["[WFBE (INIT)][frameno:%2 | ticktime:%3] Core_CIV: Duplicated Element found '%1'",(_c select _z),diag_frameno,diag_tickTime];
+ };
+ } else {
+ diag_log Format ["[WFBE (ERROR)][frameno:%2 | ticktime:%3] Core_CIV: Element '%1' is not a valid class.",(_c select _z),diag_frameno,diag_tickTime];
+ };
+};
+
+diag_log Format ["[WFBE (INIT)][frameno:%2 | ticktime:%3] Core_CIV: Initialization (%1 Elements) - [Done]",count _c,diag_frameno,diag_tickTime]; \ No newline at end of file
diff --git a/Common/Config/Core/Core_DeltaForce.sqf b/Common/Config/Core/Core_DeltaForce.sqf
new file mode 100644
index 0000000..c7a440c
--- /dev/null
+++ b/Common/Config/Core/Core_DeltaForce.sqf
@@ -0,0 +1,65 @@
+/* Spetsnaz Configuration */
+private ["_c","_get","_i","_p"];
+
+_c = [];
+_i = [];
+
+/* Infantry */
+_c = _c + ['US_Delta_Force_EP1'];
+_i = _i + [['','',300,6,-1,3,0,0.99,'US Delta Force',[]]];
+
+_c = _c + ['US_Delta_Force_TL_EP1'];
+_i = _i + [['','',360,6,-1,3,0,1.00,'US Delta Force',[]]];
+
+_c = _c + ['US_Delta_Force_Medic_EP1'];
+_i = _i + [['','',320,6,-1,3,0,0.98,'US Delta Force',[]]];
+
+_c = _c + ['US_Delta_Force_Assault_EP1'];
+_i = _i + [['','',335,6,-1,3,0,0.99,'US Delta Force',[]]];
+
+_c = _c + ['US_Delta_Force_SD_EP1'];
+_i = _i + [['','',345,6,-1,3,0,0.99,'US Delta Force',[]]];
+
+_c = _c + ['US_Delta_Force_MG_EP1'];
+_i = _i + [['','',340,6,-1,3,0,0.99,'US Delta Force',[]]];
+
+_c = _c + ['US_Delta_Force_AR_EP1'];
+_i = _i + [['','',330,6,-1,3,0,0.99,'US Delta Force',[]]];
+
+_c = _c + ['US_Delta_Force_Night_EP1'];
+_i = _i + [['','',315,6,-1,3,0,0.99,'US Delta Force',[]]];
+
+_c = _c + ['US_Delta_Force_Marksman_EP1'];
+_i = _i + [['','',320,6,-1,3,0,0.99,'US Delta Force',[]]];
+
+_c = _c + ['US_Delta_Force_M14_EP1'];
+_i = _i + [['','',310,6,-1,3,0,0.99,'US Delta Force',[]]];
+
+_c = _c + ['US_Delta_Force_Air_Controller_EP1'];
+_i = _i + [['','',350,6,-1,3,0,1.0,'US Delta Force',[]]];
+
+for '_z' from 0 to (count _c)-1 do {
+ if (isClass (configFile >> 'CfgVehicles' >> (_c select _z))) then {
+ _get = (_c select _z) Call GetNamespace;
+ if (isNil '_get') then {
+ if ((_i select _z) select 0 == '') then {(_i select _z) set [0, [_c select _z,'displayName'] Call GetConfigInfo]};
+ if (typeName ((_i select _z) select 4) == 'SCALAR') then {
+ if (((_i select _z) select 4) == -2) then {
+ _ret = (_c select _z) Call Compile preprocessFile "Common\Functions\Common_GetConfigVehicleCrewSlot.sqf";
+ (_i select _z) set [4, _ret select 0];
+ (_i select _z) set [9, _ret select 1];
+ };
+ };
+ if (WF_Debug) then {(_i select _z) set [3,1]};
+ _p = if ((_c select _z) isKindOf 'Man') then {'portrait'} else {'picture'};
+ (_i select _z) set [1, [_c select _z,_p] Call GetConfigInfo];
+ [_c select _z,_i select _z] Call SetNamespace;
+ } else {
+ diag_log Format ["[WFBE (INIT)][frameno:%2 | ticktime:%3] Core_DeltaForce: Duplicated Element found '%1'",(_c select _z),diag_frameno,diag_tickTime];
+ };
+ } else {
+ diag_log Format ["[WFBE (ERROR)][frameno:%2 | ticktime:%3] Core_DeltaForce: Element '%1' is not a valid class.",(_c select _z),diag_frameno,diag_tickTime];
+ };
+};
+
+diag_log Format ["[WFBE (INIT)][frameno:%2 | ticktime:%3] Core_DeltaForce: Initialization (%1 Elements) - [Done]",count _c,diag_frameno,diag_tickTime]; \ No newline at end of file
diff --git a/Common/Config/Core/Core_FR.sqf b/Common/Config/Core/Core_FR.sqf
new file mode 100644
index 0000000..c5ca87e
--- /dev/null
+++ b/Common/Config/Core/Core_FR.sqf
@@ -0,0 +1,81 @@
+/* FR Configuration */
+private ["_c","_get","_i","_p"];
+
+_c = [];
+_i = [];
+
+/* Infantry */
+_c = _c + ['FR_GL'];
+_i = _i + [['','',260,6,-1,2,0,0.98,'USMC Force Recon',[]]];
+
+_c = _c + ['FR_Corpsman'];
+_i = _i + [['','',270,6,-1,2,0,0.98,'USMC Force Recon',[]]];
+
+_c = _c + ['FR_Commander'];
+_i = _i + [['','',295,6,-1,2,0,1.00,'USMC Force Recon',[]]];
+
+_c = _c + ['FR_TL'];
+_i = _i + [['','',285,6,-1,2,0,1.00,'USMC Force Recon',[]]];
+
+_c = _c + ['FR_Assault_R'];
+_i = _i + [['','',280,6,-1,2,0,0.99,'USMC Force Recon',[]]];
+
+_c = _c + ['FR_Assault_GL'];
+_i = _i + [['','',285,6,-1,2,0,0.99,'USMC Force Recon',[]]];
+
+_c = _c + ['FR_AR'];
+_i = _i + [['','',290,6,-1,2,0,0.98,'USMC Force Recon',[]]];
+
+_c = _c + ['FR_R'];
+_i = _i + [['','',300,6,-1,2,0,0.98,'USMC Force Recon',[]]];
+
+_c = _c + ['FR_Sapper'];
+_i = _i + [['','',310,6,-1,2,0,0.98,'USMC Force Recon',[]]];
+
+_c = _c + ['FR_AC'];
+_i = _i + [['','',320,6,-1,2,0,1.0,'USMC Force Recon',[]]];
+
+_c = _c + ['FR_Marksman'];
+_i = _i + [['','',340,6,-1,2,0,0.99,'USMC Force Recon',[]]];
+
+/* Infantry - Special Characters */
+_c = _c + ['FR_Cooper'];
+_i = _i + [['','',400,6,-1,3,0,1.0,'USMC Force Recon',[]]];
+
+_c = _c + ['FR_Miles'];
+_i = _i + [['','',400,6,-1,3,0,1.0,'USMC Force Recon',[]]];
+
+_c = _c + ['FR_OHara'];
+_i = _i + [['','',400,6,-1,3,0,1.0,'USMC Force Recon',[]]];
+
+_c = _c + ['FR_Rodriguez'];
+_i = _i + [['','',400,6,-1,3,0,1.0,'USMC Force Recon',[]]];
+
+_c = _c + ['FR_Sykes'];
+_i = _i + [['','',400,6,-1,3,0,1.0,'USMC Force Recon',[]]];
+
+for '_z' from 0 to (count _c)-1 do {
+ if (isClass (configFile >> 'CfgVehicles' >> (_c select _z))) then {
+ _get = (_c select _z) Call GetNamespace;
+ if (isNil '_get') then {
+ if ((_i select _z) select 0 == '') then {(_i select _z) set [0, [_c select _z,'displayName'] Call GetConfigInfo]};
+ if (typeName ((_i select _z) select 4) == 'SCALAR') then {
+ if (((_i select _z) select 4) == -2) then {
+ _ret = (_c select _z) Call Compile preprocessFile "Common\Functions\Common_GetConfigVehicleCrewSlot.sqf";
+ (_i select _z) set [4, _ret select 0];
+ (_i select _z) set [9, _ret select 1];
+ };
+ };
+ if (WF_Debug) then {(_i select _z) set [3,1]};
+ _p = if ((_c select _z) isKindOf 'Man') then {'portrait'} else {'picture'};
+ (_i select _z) set [1, [_c select _z,_p] Call GetConfigInfo];
+ [_c select _z,_i select _z] Call SetNamespace;
+ } else {
+ diag_log Format ["[WFBE (INIT)][frameno:%2 | ticktime:%3] Core_FR: Duplicated Element found '%1'",(_c select _z),diag_frameno,diag_tickTime];
+ };
+ } else {
+ diag_log Format ["[WFBE (ERROR)][frameno:%2 | ticktime:%3] Core_FR: Element '%1' is not a valid class.",(_c select _z),diag_frameno,diag_tickTime];
+ };
+};
+
+diag_log Format ["[WFBE (INIT)][frameno:%2 | ticktime:%3] Core_FR: Initialization (%1 Elements) - [Done]",count _c,diag_frameno,diag_tickTime]; \ No newline at end of file
diff --git a/Common/Config/Core/Core_GUE.sqf b/Common/Config/Core/Core_GUE.sqf
new file mode 100644
index 0000000..38bcba3
--- /dev/null
+++ b/Common/Config/Core/Core_GUE.sqf
@@ -0,0 +1,137 @@
+/* GUE Configuration */
+private ["_c","_get","_i","_p"];
+
+_c = [];
+_i = [];
+
+/* Infantry */
+_c = _c + ['GUE_Soldier_1'];
+_i = _i + [['','',150,4,-1,0,0,0.55,'Guerilla',[]]];
+
+_c = _c + ['GUE_Soldier_2'];
+_i = _i + [['','',120,4,-1,0,0,0.55,'Guerilla',[]]];
+
+_c = _c + ['GUE_Soldier_3'];
+_i = _i + [['','',140,4,-1,0,0,0.55,'Guerilla',[]]];
+
+_c = _c + ['GUE_Soldier_GL'];
+_i = _i + [['','',150,5,-1,1,0,0.55,'Guerilla',[]]];
+
+_c = _c + ['GUE_Soldier_AT'];
+_i = _i + [['','',220,5,-1,1,0,0.58,'Guerilla',[]]];
+
+_c = _c + ['GUE_Soldier_AA'];
+_i = _i + [['','',250,4,-1,0,0,0.59,'Guerilla',[]]];
+
+_c = _c + ['GUE_Soldier_AR'];
+_i = _i + [['','',150,4,-1,1,0,0.54,'Guerilla',[]]];
+
+_c = _c + ['GUE_Soldier_MG'];
+_i = _i + [['','',190,4,-1,0,0,0.53,'Guerilla',[]]];
+
+_c = _c + ['GUE_Soldier_Sniper'];
+_i = _i + [['','',175,6,-1,1,0,0.62,'Guerilla',[]]];
+
+_c = _c + ['GUE_Soldier_Medic'];
+_i = _i + [['','',160,6,-1,0,0,0.59,'Guerilla',[]]];
+
+_c = _c + ['GUE_Soldier_Crew'];
+_i = _i + [['','',120,5,-1,0,0,0.51,'Guerilla',[]]];
+
+_c = _c + ['GUE_Soldier_Pilot'];
+_i = _i + [['','',120,5,-1,0,0,0.52,'Guerilla',[]]];
+
+_c = _c + ['GUE_Soldier_Scout'];
+_i = _i + [['','',260,5,-1,3,0,0.63,'Guerilla',[]]];
+
+_c = _c + ['GUE_Soldier_Sab'];
+_i = _i + [['','',220,5,-1,2,0,0.64,'Guerilla',[]]];
+
+_c = _c + ['GUE_Commander'];
+_i = _i + [['','',240,5,-1,0,0,0.65,'Guerilla',[]]];
+
+_c = _c + ['GUE_Worker2'];
+_i = _i + [['','',100,5,-1,0,0,0.41,'Guerilla',[]]];
+
+_c = _c + ['GUE_Woodlander3'];
+_i = _i + [['','',100,5,-1,0,0,0.41,'Guerilla',[]]];
+
+_c = _c + ['GUE_Villager3'];
+_i = _i + [['','',100,5,-1,0,0,0.41,'Guerilla',[]]];
+
+_c = _c + ['GUE_Woodlander2'];
+_i = _i + [['','',100,5,-1,0,0,0.41,'Guerilla',[]]];
+
+_c = _c + ['GUE_Woodlander1'];
+_i = _i + [['','',100,5,-1,0,0,0.41,'Guerilla',[]]];
+
+_c = _c + ['GUE_Villager4'];
+_i = _i + [['','',100,5,-1,0,0,0.41,'Guerilla',[]]];
+
+/* Light Vehicles */
+_c = _c + ['TT650_Gue'];
+_i = _i + [['','',150,15,-2,0,1,0,'Guerilla',[]]];
+
+_c = _c + ['V3S_Gue'];
+_i = _i + [['','',175,15,-2,0,1,0,'Guerilla',[]]];
+
+_c = _c + ['Pickup_PK_GUE'];
+_i = _i + [['','',250,17,-2,0,1,0,'Guerilla',[]]];
+
+_c = _c + ['Offroad_DSHKM_Gue'];
+_i = _i + [['','',300,25,-2,1,1,0,'Guerilla',[]]];
+
+_c = _c + ['Offroad_SPG9_Gue'];
+_i = _i + [['','',380,20,-2,2,1,0,'Guerilla',[]]];
+
+_c = _c + ['BRDM2_Gue'];
+_i = _i + [['','',600,25,-2,2,1,0,'Guerilla',[]]];
+
+_c = _c + ['Ural_ZU23_Gue'];
+_i = _i + [['','',950,25,-2,3,1,0,'Guerilla',[]]];
+
+/* Heavy Vehicles */
+_c = _c + ['BMP2_Gue'];
+_i = _i + [['','',2200,30,-2,0,2,0,'Guerilla',[]]];
+
+_c = _c + ['T72_Gue'];
+_i = _i + [['','',3200,35,-2,2,2,0,'Guerilla',[]]];
+
+/* Static Defenses */
+_c = _c + ['GUE_WarfareBMGNest_PK'];
+_i = _i + [['','',300,0,1,0,'Defense',0,'Guerilla',[]]];
+
+_c = _c + ['DSHKM_Gue'];
+_i = _i + [['','',225,0,1,0,'Defense',0,'Guerilla',[]]];
+
+_c = _c + ['SPG9_Gue'];
+_i = _i + [['','',475,0,1,0,'Defense',0,'Guerilla',[]]];
+
+_c = _c + ['ZU23_Gue'];
+_i = _i + [['','',600,0,1,0,'Defense',0,'Guerilla',[]]];
+
+for '_z' from 0 to (count _c)-1 do {
+ if (isClass (configFile >> 'CfgVehicles' >> (_c select _z))) then {
+ _get = (_c select _z) Call GetNamespace;
+ if (isNil '_get') then {
+ if ((_i select _z) select 0 == '') then {(_i select _z) set [0, [_c select _z,'displayName'] Call GetConfigInfo]};
+ if (typeName ((_i select _z) select 4) == 'SCALAR') then {
+ if (((_i select _z) select 4) == -2) then {
+ _ret = (_c select _z) Call Compile preprocessFile "Common\Functions\Common_GetConfigVehicleCrewSlot.sqf";
+ (_i select _z) set [4, _ret select 0];
+ (_i select _z) set [9, _ret select 1];
+ };
+ };
+ if (WF_Debug) then {(_i select _z) set [3,1]};
+ _p = if ((_c select _z) isKindOf 'Man') then {'portrait'} else {'picture'};
+ (_i select _z) set [1, [_c select _z,_p] Call GetConfigInfo];
+ [_c select _z,_i select _z] Call SetNamespace;
+ } else {
+ diag_log Format ["[WFBE (INIT)][frameno:%2 | ticktime:%3] Core_GUE: Duplicated Element found '%1'",(_c select _z),diag_frameno,diag_tickTime];
+ };
+ } else {
+ diag_log Format ["[WFBE (ERROR)][frameno:%2 | ticktime:%3] Core_GUE: Element '%1' is not a valid class.",(_c select _z),diag_frameno,diag_tickTime];
+ };
+};
+
+diag_log Format ["[WFBE (INIT)][frameno:%2 | ticktime:%3] Core_GUE: Initialization (%1 Elements) - [Done]",count _c,diag_frameno,diag_tickTime]; \ No newline at end of file
diff --git a/Common/Config/Core/Core_INS.sqf b/Common/Config/Core/Core_INS.sqf
new file mode 100644
index 0000000..1f1d37d
--- /dev/null
+++ b/Common/Config/Core/Core_INS.sqf
@@ -0,0 +1,201 @@
+/* INS Configuration */
+private ["_c","_get","_i","_p"];
+
+_c = [];
+_i = [];
+
+/* Infantry */
+_c = _c + ['Ins_Soldier_1'];
+_i = _i + [['','',150,4,-1,0,0,0.61,'Insurgents',[]]];
+
+_c = _c + ['Ins_Soldier_2'];
+_i = _i + [['','',160,4,-1,0,0,0.61,'Insurgents',[]]];
+
+_c = _c + ['Ins_Soldier_GL'];
+_i = _i + [['','',175,4,-1,0,0,0.65,'Insurgents',[]]];
+
+_c = _c + ['Ins_Soldier_CO'];
+_i = _i + [['','',210,5,-1,1,0,0.7,'Insurgents',[]]];
+
+_c = _c + ['Ins_Commander'];
+_i = _i + [['','',250,5,-1,2,0,0.7,'Insurgents',[]]];
+
+_c = _c + ['Ins_Soldier_Medic'];
+_i = _i + [['','',175,4,-1,0,0,0.62,'Insurgents',[]]];
+
+_c = _c + ['Ins_Soldier_AR'];
+_i = _i + [['','',180,4,-1,1,0,0.61,'Insurgents',[]]];
+
+_c = _c + ['Ins_Soldier_MG'];
+_i = _i + [['','',190,4,-1,0,0,0.60,'Insurgents',[]]];
+
+_c = _c + ['Ins_Soldier_AT'];
+_i = _i + [['','',220,6,-1,1,0,0.60,'Insurgents',[]]];
+
+_c = _c + ['Ins_Soldier_AA'];
+_i = _i + [['','',300,6,-1,2,0,0.62,'Insurgents',[]]];
+
+_c = _c + ['Ins_Soldier_Sniper'];
+_i = _i + [['','',220,6,-1,1,0,0.66,'Insurgents',[]]];
+
+_c = _c + ['Ins_Soldier_Sapper'];
+_i = _i + [['','',190,5,-1,2,0,0.64,'Insurgents',[]]];
+
+_c = _c + ['Ins_Soldier_Sab'];
+_i = _i + [['','',180,5,-1,2,0,0.68,'Insurgents',[]]];
+
+_c = _c + ['Ins_Soldier_Pilot'];
+_i = _i + [['','',130,5,-1,0,0,0.59,'Insurgents',[]]];
+
+_c = _c + ['Ins_Soldier_Crew'];
+_i = _i + [['','',130,5,-1,0,0,0.58,'Insurgents',[]]];
+
+_c = _c + ['INS_Woodlander1'];
+_i = _i + [['','',100,5,-1,0,0,0.58,'Insurgents',[]]];
+
+_c = _c + ['INS_Woodlander2'];
+_i = _i + [['','',100,5,-1,0,0,0.58,'Insurgents',[]]];
+
+_c = _c + ['INS_Woodlander3'];
+_i = _i + [['','',100,5,-1,0,0,0.58,'Insurgents',[]]];
+
+_c = _c + ['INS_Villager3'];
+_i = _i + [['','',100,5,-1,0,0,0.58,'Insurgents',[]]];
+
+_c = _c + ['INS_Villager4'];
+_i = _i + [['','',100,5,-1,0,0,0.58,'Insurgents',[]]];
+
+_c = _c + ['INS_Worker2'];
+_i = _i + [['','',100,5,-1,0,0,0.58,'Insurgents',[]]];
+
+/* Light Vehicles */
+_c = _c + ['TT650_Ins'];
+_i = _i + [['','',150,15,-2,0,1,0,'Insurgents',[]]];
+
+_c = _c + ['UAZ_INS'];
+_i = _i + [['','',260,15,-2,0,1,0,'Insurgents',[]]];
+
+_c = _c + ['Pickup_PK_INS'];
+_i = _i + [['','',300,15,-2,0,1,0,'Insurgents',[]]];
+
+_c = _c + ['Offroad_DSHKM_INS'];
+_i = _i + [['','',350,15,-2,0,1,0,'Insurgents',[]]];
+
+_c = _c + ['UAZ_MG_INS'];
+_i = _i + [['','',460,17,-2,0,1,0,'Insurgents',[]]];
+
+_c = _c + ['UAZ_AGS30_INS'];
+_i = _i + [['','',585,25,-2,1,1,0,'Insurgents',[]]];
+
+_c = _c + ['UAZ_SPG9_INS'];
+_i = _i + [['','',650,20,-2,2,1,0,'Insurgents',[]]];
+
+_c = _c + ['UralOpen_INS'];
+_i = _i + [['','',290,20,-2,0,1,0,'Insurgents',[]]];
+
+_c = _c + ['Ural_INS'];
+_i = _i + [['','',300,20,-2,0,1,0,'Insurgents',[]]];
+
+_c = _c + ['WarfareSalvageTruck_INS'];
+_i = _i + [['','',450,18,-2,0,1,0,'Insurgents',[]]];
+
+_c = _c + ['UralRepair_INS'];
+_i = _i + [['','',525,21,-2,2,1,0,'Insurgents',[]]];
+
+_c = _c + ['UralReammo_INS'];
+_i = _i + [['','',550,21,-2,1,1,0,'Insurgents',[]]];
+
+_c = _c + ['UralRefuel_INS'];
+_i = _i + [['','',500,21,-2,1,1,0,'Insurgents',[]]];
+
+_c = _c + ['WarfareSupplyTruck_INS'];
+_i = _i + [['','',550,21,-2,0,1,0,'Insurgents',[]]];
+
+_c = _c + ['BRDM2_INS'];
+_i = _i + [['','',1000,25,-2,2,1,0,'Insurgents',[]]];
+
+_c = _c + ['BRDM2_ATGM_INS'];
+_i = _i + [['','',1550,25,-2,3,1,0,'Insurgents',[]]];
+
+_c = _c + ['Ural_ZU23_INS'];
+_i = _i + [['','',1650,20,-2,2,1,0,'Insurgents',[]]];
+
+_c = _c + ['GRAD_INS'];
+_i = _i + [['','',4000,35,-2,3,1,0,'Insurgents',[]]];
+
+/* Heavy Vehicles */
+_c = _c + ['BMP2_Ambul_INS'];
+_i = _i + [['','',950,20,-2,0,2,0,'Insurgents',[]]];
+
+_c = _c + ['BMP2_INS'];
+_i = _i + [['','',2500,30,-2,1,2,0,'Insurgents',[]]];
+
+_c = _c + ['ZSU_INS'];
+_i = _i + [['','',3200,35,-2,2,2,0,'Insurgents',[]]];
+
+_c = _c + ['T72_INS'];
+_i = _i + [['','',4500,35,-2,3,2,0,'Insurgents',[]]];
+
+/* Air Vehicles */
+_c = _c + ['Mi17_Ins'];
+_i = _i + [['','',15000,35,-2,0,3,0,'Insurgents',[]]];
+
+_c = _c + ['Mi17_medevac_Ins'];
+_i = _i + [['','',18000,35,-2,1,3,0,'Insurgents',[]]];
+
+_c = _c + ['Su25_Ins'];
+_i = _i + [['','',90000,55,-2,3,3,0,'Insurgents',[]]];
+
+/* Static Defenses */
+_c = _c + ['Ins_WarfareBMGNest_PK'];
+_i = _i + [['','',300,0,1,0,'Defense',0,'Insurgents',[]]];
+
+_c = _c + ['DSHkM_Mini_TriPod'];
+_i = _i + [['','',200,0,1,0,'Defense',0,'Insurgents',[]]];
+
+_c = _c + ['DSHKM_Ins'];
+_i = _i + [['','',225,0,1,0,'Defense',0,'Insurgents',[]]];
+
+_c = _c + ['SearchLight_INS'];
+_i = _i + [['','',125,0,1,0,'Defense',0,'Insurgents',[]]];
+
+_c = _c + ['AGS_Ins'];
+_i = _i + [['','',650,0,1,0,'Defense',0,'Insurgents',[]]];
+
+_c = _c + ['SPG9_Ins'];
+_i = _i + [['','',475,0,1,0,'Defense',0,'Insurgents',[]]];
+
+_c = _c + ['ZU23_Ins'];
+_i = _i + [['','',945,0,1,0,'Defense',0,'Insurgents',[]]];
+
+_c = _c + ['2b14_82mm_INS'];
+_i = _i + [['Podnos 2B14','',1025,0,1,0,'Defense',0,'Insurgents',[]]];
+
+_c = _c + ['D30_Ins'];
+_i = _i + [['','',2300,0,1,0,'Defense',0,'Insurgents',[]]];
+
+for '_z' from 0 to (count _c)-1 do {
+ if (isClass (configFile >> 'CfgVehicles' >> (_c select _z))) then {
+ _get = (_c select _z) Call GetNamespace;
+ if (isNil '_get') then {
+ if ((_i select _z) select 0 == '') then {(_i select _z) set [0, [_c select _z,'displayName'] Call GetConfigInfo]};
+ if (typeName ((_i select _z) select 4) == 'SCALAR') then {
+ if (((_i select _z) select 4) == -2) then {
+ _ret = (_c select _z) Call Compile preprocessFile "Common\Functions\Common_GetConfigVehicleCrewSlot.sqf";
+ (_i select _z) set [4, _ret select 0];
+ (_i select _z) set [9, _ret select 1];
+ };
+ };
+ if (WF_Debug) then {(_i select _z) set [3,1]};
+ _p = if ((_c select _z) isKindOf 'Man') then {'portrait'} else {'picture'};
+ (_i select _z) set [1, [_c select _z,_p] Call GetConfigInfo];
+ [_c select _z,_i select _z] Call SetNamespace;
+ } else {
+ diag_log Format ["[WFBE (INIT)][frameno:%2 | ticktime:%3] Core_INS: Duplicated Element found '%1'",(_c select _z),diag_frameno,diag_tickTime];
+ };
+ } else {
+ diag_log Format ["[WFBE (ERROR)][frameno:%2 | ticktime:%3] Core_INS: Element '%1' is not a valid class.",(_c select _z),diag_frameno,diag_tickTime];
+ };
+};
+
+diag_log Format ["[WFBE (INIT)][frameno:%2 | ticktime:%3] Core_INS: Initialization (%1 Elements) - [Done]",count _c,diag_frameno,diag_tickTime]; \ No newline at end of file
diff --git a/Common/Config/Core/Core_KSK.sqf b/Common/Config/Core/Core_KSK.sqf
new file mode 100644
index 0000000..03e130b
--- /dev/null
+++ b/Common/Config/Core/Core_KSK.sqf
@@ -0,0 +1,47 @@
+/* KSK Configuration */
+Private ['_c','_get','_i','_p','_z'];
+
+_c = [];
+_i = [];
+
+/* Infantry */
+_c = _c + ['GER_Soldier_MG_EP1'];
+_i = _i + [['','',340,6,-1,2,0,0.95,'KSK',[]]];
+
+_c = _c + ['GER_Soldier_Medic_EP1'];
+_i = _i + [['','',325,6,-1,2,0,0.94,'KSK',[]]];
+
+_c = _c + ['GER_Soldier_EP1'];
+_i = _i + [['','',310,6,-1,2,0,0.94,'KSK',[]]];
+
+_c = _c + ['GER_Soldier_Scout_EP1'];
+_i = _i + [['','',345,6,-1,2,0,0.96,'KSK',[]]];
+
+_c = _c + ['GER_Soldier_TL_EP1'];
+_i = _i + [['','',355,6,-1,2,0,0.98,'KSK',[]]];
+
+for '_z' from 0 to (count _c)-1 do {
+ if (isClass (configFile >> 'CfgVehicles' >> (_c select _z))) then {
+ _get = (_c select _z) Call GetNamespace;
+ if (isNil '_get') then {
+ if ((_i select _z) select 0 == '') then {(_i select _z) set [0, [_c select _z,'displayName'] Call GetConfigInfo]};
+ if (typeName ((_i select _z) select 4) == 'SCALAR') then {
+ if (((_i select _z) select 4) == -2) then {
+ _ret = (_c select _z) Call Compile preprocessFile "Common\Functions\Common_GetConfigVehicleCrewSlot.sqf";
+ (_i select _z) set [4, _ret select 0];
+ (_i select _z) set [9, _ret select 1];
+ };
+ };
+ if (WF_Debug) then {(_i select _z) set [3,1]};
+ _p = if ((_c select _z) isKindOf 'Man') then {'portrait'} else {'picture'};
+ (_i select _z) set [1, [_c select _z,_p] Call GetConfigInfo];
+ [_c select _z,_i select _z] Call SetNamespace;
+ } else {
+ diag_log Format ["[WFBE (INIT)][frameno:%2 | ticktime:%3] Core_KSK: Duplicated Element found '%1'",(_c select _z),diag_frameno,diag_tickTime];
+ };
+ } else {
+ diag_log Format ["[WFBE (ERROR)][frameno:%2 | ticktime:%3] Core_KSK: Element '%1' is not a valid class.",(_c select _z),diag_frameno,diag_tickTime];
+ };
+};
+
+diag_log Format ["[WFBE (INIT)][frameno:%2 | ticktime:%3] Core_KSK: Initialization (%1 Elements) - [Done]",count _c,diag_frameno,diag_tickTime]; \ No newline at end of file
diff --git a/Common/Config/Core/Core_MVD.sqf b/Common/Config/Core/Core_MVD.sqf
new file mode 100644
index 0000000..c6aebc0
--- /dev/null
+++ b/Common/Config/Core/Core_MVD.sqf
@@ -0,0 +1,50 @@
+/* MVD Configuration */
+private ["_c","_get","_i","_p"];
+
+_c = [];
+_i = [];
+
+/* Infantry */
+_c = _c + ['MVD_Soldier_GL'];
+_i = _i + [['','',310,7,-1,3,0,0.98,'MVD',[]]];
+
+_c = _c + ['MVD_Soldier_MG'];
+_i = _i + [['','',320,7,-1,3,0,0.98,'MVD',[]]];
+
+_c = _c + ['MVD_Soldier_Marksman'];
+_i = _i + [['','',330,7,-1,3,0,0.99,'MVD',[]]];
+
+_c = _c + ['MVD_Soldier_AT'];
+_i = _i + [['','',345,7,-1,3,0,0.99,'MVD',[]]];
+
+_c = _c + ['MVD_Soldier_Sniper'];
+_i = _i + [['','',350,7,-1,3,0,0.99,'MVD',[]]];
+
+_c = _c + ['MVD_Soldier_TL'];
+_i = _i + [['','',360,7,-1,3,0,1.0,'MVD',[]]];
+
+for '_z' from 0 to (count _c)-1 do {
+ if (isClass (configFile >> 'CfgVehicles' >> (_c select _z))) then {
+ _get = (_c select _z) Call GetNamespace;
+ if (isNil '_get') then {
+ if ((_i select _z) select 0 == '') then {(_i select _z) set [0, [_c select _z,'displayName'] Call GetConfigInfo]};
+ if (typeName ((_i select _z) select 4) == 'SCALAR') then {
+ if (((_i select _z) select 4) == -2) then {
+ _ret = (_c select _z) Call Compile preprocessFile "Common\Functions\Common_GetConfigVehicleCrewSlot.sqf";
+ (_i select _z) set [4, _ret select 0];
+ (_i select _z) set [9, _ret select 1];
+ };
+ };
+ if (WF_Debug) then {(_i select _z) set [3,1]};
+ _p = if ((_c select _z) isKindOf 'Man') then {'portrait'} else {'picture'};
+ (_i select _z) set [1, [_c select _z,_p] Call GetConfigInfo];
+ [_c select _z,_i select _z] Call SetNamespace;
+ } else {
+ diag_log Format ["[WFBE (INIT)][frameno:%2 | ticktime:%3] Core_MVD: Duplicated Element found '%1'",(_c select _z),diag_frameno,diag_tickTime];
+ };
+ } else {
+ diag_log Format ["[WFBE (ERROR)][frameno:%2 | ticktime:%3] Core_MVD: Element '%1' is not a valid class.",(_c select _z),diag_frameno,diag_tickTime];
+ };
+};
+
+diag_log Format ["[WFBE (INIT)][frameno:%2 | ticktime:%3] Core_RU: Initialization (%1 Elements) - [Done]",count _c,diag_frameno,diag_tickTime]; \ No newline at end of file
diff --git a/Common/Config/Core/Core_PMC.sqf b/Common/Config/Core/Core_PMC.sqf
new file mode 100644
index 0000000..3627bff
--- /dev/null
+++ b/Common/Config/Core/Core_PMC.sqf
@@ -0,0 +1,103 @@
+/* PMC Configuration */
+Private ['_c','_get','_i','_p','_z'];
+
+_c = [];
+_i = [];
+
+/* Infantry */
+_c = _c + ['Soldier_AA_PMC'];
+_i = _i + [['','',300,6,-1,2,0,0.92,'PMC',[]]];
+
+_c = _c + ['Soldier_AT_PMC'];
+_i = _i + [['','',260,6,-1,0,0,0.90,'PMC',[]]];
+
+_c = _c + ['Soldier_Bodyguard_AA12_PMC'];
+_i = _i + [['','',325,6,-1,3,0,0.94,'PMC',[]]];
+
+_c = _c + ['Soldier_Bodyguard_M4_PMC'];
+_i = _i + [['','',225,6,-1,0,0,0.94,'PMC',[]]];
+
+_c = _c + ['Soldier_Crew_PMC'];
+_i = _i + [['','',170,6,-1,0,0,0.89,'PMC',[]]];
+
+_c = _c + ['Soldier_Engineer_PMC'];
+_i = _i + [['','',270,6,-1,2,0,0.91,'PMC',[]]];
+
+_c = _c + ['Soldier_GL_M16A2_PMC'];
+_i = _i + [['','',185,6,-1,0,0,0.92,'PMC',[]]];
+
+_c = _c + ['Soldier_GL_PMC'];
+_i = _i + [['','',260,6,-1,2,0,0.92,'PMC',[]]];
+
+_c = _c + ['Soldier_M4A3_PMC'];
+_i = _i + [['','',210,6,-1,1,0,0.91,'PMC',[]]];
+
+_c = _c + ['Soldier_Medic_PMC'];
+_i = _i + [['','',255,6,-1,2,0,0.92,'PMC',[]]];
+
+_c = _c + ['Soldier_MG_PKM_PMC'];
+_i = _i + [['','',190,6,-1,0,0,0.90,'PMC',[]]];
+
+_c = _c + ['Soldier_MG_PMC'];
+_i = _i + [['','',260,6,-1,3,0,0.92,'PMC',[]]];
+
+_c = _c + ['Soldier_Pilot_PMC'];
+_i = _i + [['','',175,6,-1,0,0,0.90,'PMC',[]]];
+
+_c = _c + ['Soldier_PMC'];
+_i = _i + [['','',230,6,-1,0,0,0.91,'PMC',[]]];
+
+_c = _c + ['Soldier_Sniper_KSVK_PMC'];
+_i = _i + [['','',290,6,-1,0,0,0.94,'PMC',[]]];
+
+_c = _c + ['Soldier_Sniper_PMC'];
+_i = _i + [['','',275,6,-1,0,0,0.94,'PMC',[]]];
+
+_c = _c + ['Soldier_TL_PMC'];
+_i = _i + [['','',280,6,-1,0,0,0.95,'PMC',[]]];
+
+/* Light Vehicles */
+_c = _c + ['SUV_PMC'];
+_i = _i + [['','',300,20,-2,0,1,0,'PMC',[]]];
+
+_c = _c + ['ArmoredSUV_PMC'];
+_i = _i + [['','',1250,25,-2,0,1,0,'PMC',[]]];
+
+/* Air Vehicles */
+_c = _c + ['Ka137_PMC'];
+_i = _i + [['','',3000,35,-2,0,3,0,'PMC',[]]];
+
+_c = _c + ['Ka137_MG_PMC'];
+_i = _i + [['','',3500,35,-2,0,3,0,'PMC',[]]];
+
+_c = _c + ['Ka60_PMC'];
+_i = _i + [['','',6000,43,-2,0,3,0,'PMC',[]]];
+
+_c = _c + ['Ka60_GL_PMC'];
+_i = _i + [['','',6500,45,-2,0,3,0,'PMC',[]]];
+
+for '_z' from 0 to (count _c)-1 do {
+ if (isClass (configFile >> 'CfgVehicles' >> (_c select _z))) then {
+ _get = (_c select _z) Call GetNamespace;
+ if (isNil '_get') then {
+ if ((_i select _z) select 0 == '') then {(_i select _z) set [0, [_c select _z,'displayName'] Call GetConfigInfo]};
+ if (typeName ((_i select _z) select 4) == 'SCALAR') then {
+ if (((_i select _z) select 4) == -2) then {
+ _ret = (_c select _z) Call Compile preprocessFile "Common\Functions\Common_GetConfigVehicleCrewSlot.sqf";
+ (_i select _z) set [4, _ret select 0];
+ (_i select _z) set [9, _ret select 1];
+ };
+ };
+ if (WF_Debug) then {(_i select _z) set [3,1]};
+ _p = if ((_c select _z) isKindOf 'Man') then {'portrait'} else {'picture'};
+ (_i select _z) set [1, [_c select _z,_p] Call GetConfigInfo];
+ [_c select _z,_i select _z] Call SetNamespace;
+ } else {
+ diag_log Format ["[WFBE (INIT)][frameno:%2 | ticktime:%3] Core_PMC: Duplicated Element found '%1'",(_c select _z),diag_frameno,diag_tickTime];
+ };
+ } else {
+ diag_log Format ["[WFBE (ERROR)][frameno:%2 | ticktime:%3] Core_PMC: Element '%1' is not a valid class.",(_c select _z),diag_frameno,diag_tickTime];
+ };
+};
+
+diag_log Format ["[WFBE (INIT)][frameno:%2 | ticktime:%3] Core_PMC: Initialization (%1 Elements) - [Done]",count _c,diag_frameno,diag_tickTime]; \ No newline at end of file
diff --git a/Common/Config/Core/Core_RU.sqf b/Common/Config/Core/Core_RU.sqf
new file mode 100644
index 0000000..980b322
--- /dev/null
+++ b/Common/Config/Core/Core_RU.sqf
@@ -0,0 +1,278 @@
+/* RU Configuration */
+private ["_c","_get","_i","_p"];
+
+_c = [];
+_i = [];
+
+/* Infantry */
+_c = _c + ['RU_Soldier'];
+_i = _i + [['','',150,4,-1,0,0,0.76,'Russians',[]]];
+
+_c = _c + ['RU_Soldier2'];
+_i = _i + [['','',120,4,-1,0,0,0.74,'Russians',[]]];
+
+_c = _c + ['RU_Soldier_LAT'];
+_i = _i + [['','',220,5,-1,0,0,0.78,'Russians',[]]];
+
+_c = _c + ['RU_Soldier_AT'];
+_i = _i + [['','',310,5,-1,1,0,0.8,'Russians',[]]];
+
+_c = _c + ['RU_Soldier_HAT'];
+_i = _i + [['','',620,6,-1,3,0,0.84,'Russians',[]]];
+
+if (WF_ACE) then
+{
+ _c = _c + ['ACE_SoldierE_KonkursG'];
+ _i = _i + [['','',620,6,-1,3,0,0.84,'Russians',[]]];
+
+ _c = _c + ['ACE_SoldierE_KonkursAG'];
+ _i = _i + [['','',620,6,-1,3,0,0.84,'Russians',[]]];
+};
+
+_c = _c + ['RU_Soldier_AA'];
+_i = _i + [['','',425,6,-1,1,0,0.81,'Russians',[]]];
+
+_c = _c + ['RU_Soldier_AR'];
+_i = _i + [['','',210,5,-1,1,0,0.78,'Russians',[]]];
+
+_c = _c + ['RU_Soldier_MG'];
+_i = _i + [['','',220,5,-1,0,0,0.79,'Russians',[]]];
+
+if (WF_ACE) then
+{
+ _c = _c + ['ACE_SoldierE_HMG'];
+ _i = _i + [['','',220,5,-1,0,0,0.79,'Russians',[]]];
+
+ _c = _c + ['ACE_SoldierE_HMGAG'];
+ _i = _i + [['','',220,5,-1,0,0,0.79,'Russians',[]]];
+
+ _c = _c + ['ACE_SoldierE_HMGAB'];
+ _i = _i + [['','',220,5,-1,0,0,0.79,'Russians',[]]];
+};
+
+_c = _c + ['RU_Soldier_GL'];
+_i = _i + [['','',160,5,-1,0,0,0.8,'Russians',[]]];
+
+if (WF_ACE) then
+{
+ _c = _c + ['ACE_SoldierE_AGS'];
+ _i = _i + [['','',160,5,-1,0,0,0.8,'Russians',[]]];
+
+ _c = _c + ['ACE_SoldierE_AGSAG'];
+ _i = _i + [['','',160,5,-1,0,0,0.8,'Russians',[]]];
+
+ _c = _c + ['ACE_SoldierE_AGSAB'];
+ _i = _i + [['','',160,5,-1,0,0,0.8,'Russians',[]]];
+};
+
+_c = _c + ['RU_Soldier_Marksman'];
+_i = _i + [['','',290,5,-1,1,0,0.82,'Russians',[]]];
+
+_c = _c + ['RU_Soldier_Spotter'];
+_i = _i + [['','',295,5,-1,2,0,0.84,'Russians',[]]];
+
+_c = _c + ['RU_Soldier_Sniper'];
+_i = _i + [['','',300,5,-1,2,0,0.84,'Russians',[]]];
+
+_c = _c + ['RU_Soldier_SniperH'];
+_i = _i + [['','',330,5,-1,3,0,0.86,'Russians',[]]];
+
+_c = _c + ['RU_Soldier_Medic'];
+_i = _i + [['','',190,4,-1,0,0,0.79,'Russians',[]]];
+
+_c = _c + ['RU_Soldier_Crew'];
+_i = _i + [['','',120,4,-1,0,0,0.76,'Russians',[]]];
+
+_c = _c + ['RU_Soldier_Pilot'];
+_i = _i + [['','',120,4,-1,0,0,0.77,'Russians',[]]];
+
+_c = _c + ['RU_Soldier_TL'];
+_i = _i + [['','',240,5,-1,1,0,0.9,'Russians',[]]];
+
+_c = _c + ['RU_Soldier_SL'];
+_i = _i + [['','',220,5,-1,2,0,0.89,'Russians',[]]];
+
+/* Light Vehicles */
+_c = _c + ['UAZ_RU'];
+_i = _i + [['','',260,15,-2,0,1,0,'Russians',[]]];
+
+_c = _c + ['PBX'];
+_i = _i + [['','',225,15,-2,0,1,0,'Russians',[]]];
+
+_c = _c + ['UAZ_AGS30_RU'];
+_i = _i + [['','',585,18,-2,1,1,0,'Russians',[]]];
+
+_c = _c + ['Kamaz'];
+_i = _i + [['','',300,15,-2,0,1,0,'Russians',[]]];
+
+_c = _c + ['WarfareSalvageTruck_RU'];
+_i = _i + [['','',450,18,-2,0,1,0,'Russians',[]]];
+
+_c = _c + ['KamazRepair'];
+_i = _i + [['','',525,21,-2,2,1,0,'Russians',[]]];
+
+_c = _c + ['WarfareReammoTruck_RU'];
+_i = _i + [['','',550,21,-2,1,1,0,'Russians',[]]];
+
+_c = _c + ['KamazRefuel'];
+_i = _i + [['','',500,21,-2,1,1,0,'Russians',[]]];
+
+_c = _c + ['WarfareSupplyTruck_RU'];
+_i = _i + [['','',550,21,-2,0,1,0,'Russians',[]]];
+
+_c = _c + ['GAZ_Vodnik_MedEvac'];
+_i = _i + [['','',525,25,-2,2,1,0,'Russians',[]]];
+
+_c = _c + ['GAZ_Vodnik'];
+_i = _i + [['','',1200,22,-2,1,1,0,'Russians',[]]];
+
+_c = _c + ['GAZ_Vodnik_HMG'];
+_i = _i + [['','',1450,24,[false,true,2,0],2,1,0,'Russians',[[0]]]];
+
+_c = _c + ['BTR90'];
+_i = _i + [['','',3250,25,-2,3,1,0,'Russians',[]]];
+
+if (WF_ACE) then
+{
+ _c = _c + ['ACE_BTR70_RU'];
+ _i = _i + [['','',2750,25,-2,2,1,0,'Russians',[]]];
+};
+
+_c = _c + ['GRAD_RU'];
+_i = _i + [['','',4200,25,-2,3,1,0,'Russians',[]]];
+
+/* Heavy Vehicles */
+_c = _c + ['BMP3'];
+_i = _i + [['','',3400,35,-2,if (WF_A2_Vanilla) then {0} else {2},2,0,'Russians',[]]];
+
+_c = _c + ['T72_RU'];
+_i = _i + [['','',4900,40,-2,if (WF_A2_Vanilla) then {1} else {2},2,0,'Russians',[]]];
+
+if (WF_ACE) then
+{
+ _c = _c + ['ACE_T72B_Base'];
+ _i = _i + [['','',4900,40,-2,if (WF_A2_Vanilla) then {1} else {2},2,0,'Russians',[]]];
+
+ _c = _c + ['ACE_T72BA_Base'];
+ _i = _i + [['','',4900,40,-2,if (WF_A2_Vanilla) then {1} else {2},2,0,'Russians',[]]];
+
+ _c = _c + ['ACE_T90A'];
+ _i = _i + [['','',6250,40,-2,if (WF_A2_Vanilla) then {2} else {3},2,0,'Russians',[]]];
+};
+
+_c = _c + ['T90'];
+_i = _i + [['','',6250,40,-2,if (WF_A2_Vanilla) then {2} else {3},2,0,'Russians',[]]];
+
+_c = _c + ['2S6M_Tunguska'];
+_i = _i + [['','',9800,35,-2,3,2,0,'Russians',[]]];
+
+/* Air Vehicles */
+_c = _c + ['Mi17_medevac_RU'];
+_i = _i + [['','',18000,35,-2,0,3,0,'Russians',[]]];
+
+_c = _c + ['Mi17_rockets_RU'];
+_i = _i + [['','',70000,45,-2,1,3,0,'Russians',[]]];
+
+_c = _c + ['Mi24_V'];
+_i = _i + [['','',60000,50,-2,2,3,0,'Russians',[]]];
+
+_c = _c + ['Mi24_P'];
+_i = _i + [['','',64000,52,-2,2,3,0,'Russians',[]]];
+
+_c = _c + ['Su34'];
+_i = _i + [['','',110000,55,-2,3,3,0,'Russians',[]]];
+
+_c = _c + ['Su39'];
+_i = _i + [['','',90000,55,-2,3,3,0,'Russians',[]]];
+
+_c = _c + ['Ka52'];
+_i = _i + [['','',if (paramBalancing) then {85000} else {100000},55,-2,if (paramBalancing) then {2} else {3},3,0,'Russians',[]]];
+
+_c = _c + ['Ka52Black'];
+_i = _i + [['','',if (paramBalancing) then {85000} else {100000},55,-2,if (paramBalancing) then {2} else {3},3,0,'Russians',[]]];
+
+/* Special */
+_c = _c + ['Pchela1T'];
+_i = _i + [['','',9000,35,-2,1,3,0,'Russians',[]]];
+
+/* Static Defenses */
+_c = _c + ['RU_WarfareBMGNest_PK'];
+_i = _i + [['','',300,0,1,0,'Defense',0,'Russians',[]]];
+
+_c = _c + ['KORD'];
+_i = _i + [['KORD','',200,0,1,0,'Defense',0,'Russians',[]]];
+
+_c = _c + ['KORD_high'];
+_i = _i + [['KORD Minitripod','',225,0,1,0,'Defense',0,'Russians',[]]];
+
+_c = _c + ['SearchLight_RUS'];
+_i = _i + [['','',125,0,1,0,'Defense',0,'Russians',[]]];
+
+_c = _c + ['AGS_RU'];
+_i = _i + [['','',650,0,1,0,'Defense',0,'Russians',[]]];
+
+_c = _c + ['Metis'];
+_i = _i + [['Metis-M 9K115-2','',725,0,1,0,'Defense',0,'Russians',[]]];
+
+_c = _c + ['Igla_AA_pod_East'];
+_i = _i + [['Igla AA POD launcher','',815,0,1,0,'Defense',0,'Russians',[]]];
+
+_c = _c + ['2b14_82mm'];
+_i = _i + [['Podnos 2B14','',1025,0,1,0,'Defense',0,'Russians',[]]];
+
+_c = _c + ['D30_RU'];
+_i = _i + [['','',2300,0,1,0,'Defense',0,'Russians',[]]];
+
+/* Defense Structures */
+_c = _c + ['Land_CamoNet_EAST'];
+_i = _i + [['','',35,0,0,0,'Strategic',0,'Russians',[]]];
+
+_c = _c + ['Land_CamoNetVar_EAST'];
+_i = _i + [['','',45,0,0,0,'Strategic',0,'Russians',[]]];
+
+_c = _c + ['Land_CamoNetB_EAST'];
+_i = _i + [['','',55,0,0,0,'Strategic',0,'Russians',[]]];
+
+_c = _c + ['RUOrdnanceBox'];
+_i = _i + [['','',850,0,0,0,'Ammo',0,'Russians',[]]];
+
+_c = _c + ['RUVehicleBox'];
+_i = _i + [['','',1200,0,0,0,'Ammo',0,'Russians',[]]];
+
+_c = _c + ['RUBasicAmmunitionBox'];
+_i = _i + [['','',1950,0,0,0,'Ammo',0,'Russians',[]]];
+
+_c = _c + ['RUBasicWeaponsBox'];
+_i = _i + [['','',2975,0,0,0,'Ammo',0,'Russians',[]]];
+
+_c = _c + ['RULaunchersBox'];
+_i = _i + [['','',6250,0,0,0,'Ammo',0,'Russians',[]]];
+
+_c = _c + ['RUSpecialWeaponsBox'];
+_i = _i + [['','',7200,0,0,0,'Ammo',0,'Russians',[]]];
+
+for '_z' from 0 to (count _c)-1 do {
+ if (isClass (configFile >> 'CfgVehicles' >> (_c select _z))) then {
+ _get = (_c select _z) Call GetNamespace;
+ if (isNil '_get') then {
+ if ((_i select _z) select 0 == '') then {(_i select _z) set [0, [_c select _z,'displayName'] Call GetConfigInfo]};
+ if (typeName ((_i select _z) select 4) == 'SCALAR') then {
+ if (((_i select _z) select 4) == -2) then {
+ _ret = (_c select _z) Call Compile preprocessFile "Common\Functions\Common_GetConfigVehicleCrewSlot.sqf";
+ (_i select _z) set [4, _ret select 0];
+ (_i select _z) set [9, _ret select 1];
+ };
+ };
+ if (WF_Debug) then {(_i select _z) set [3,1]};
+ _p = if ((_c select _z) isKindOf 'Man') then {'portrait'} else {'picture'};
+ (_i select _z) set [1, [_c select _z,_p] Call GetConfigInfo];
+ [_c select _z,_i select _z] Call SetNamespace;
+ } else {
+ diag_log Format ["[WFBE (INIT)][frameno:%2 | ticktime:%3] Core_RU: Duplicated Element found '%1'",(_c select _z),diag_frameno,diag_tickTime];
+ };
+ } else {
+ diag_log Format ["[WFBE (ERROR)][frameno:%2 | ticktime:%3] Core_RU: Element '%1' is not a valid class.",(_c select _z),diag_frameno,diag_tickTime];
+ };
+};
+
+diag_log Format ["[WFBE (INIT)][frameno:%2 | ticktime:%3] Core_RU: Initialization (%1 Elements) - [Done]",count _c,diag_frameno,diag_tickTime]; \ No newline at end of file
diff --git a/Common/Config/Core/Core_Spetsnaz.sqf b/Common/Config/Core/Core_Spetsnaz.sqf
new file mode 100644
index 0000000..34b7a9f
--- /dev/null
+++ b/Common/Config/Core/Core_Spetsnaz.sqf
@@ -0,0 +1,50 @@
+/* Spetsnaz Configuration */
+private ["_c","_get","_i","_p"];
+
+_c = [];
+_i = [];
+
+/* Infantry */
+_c = _c + ['RUS_Soldier1'];
+_i = _i + [['','',250,6,-1,2,0,0.98,'Russians Spetsnaz',[]]];
+
+_c = _c + ['RUS_Soldier2'];
+_i = _i + [['','',260,6,-1,3,0,0.98,'Russians Spetsnaz',[]]];
+
+_c = _c + ['RUS_Soldier_GL'];
+_i = _i + [['','',270,6,-1,3,0,0.99,'Russians Spetsnaz',[]]];
+
+_c = _c + ['RUS_Soldier_Marksman'];
+_i = _i + [['','',290,6,-1,3,0,0.99,'Russians Spetsnaz',[]]];
+
+_c = _c + ['RUS_Soldier3'];
+_i = _i + [['','',295,6,-1,3,0,0.98,'Russians Spetsnaz',[]]];
+
+_c = _c + ['RUS_Soldier_TL'];
+_i = _i + [['','',300,6,-1,3,0,1.0,'Russians Spetsnaz',[]]];
+
+for '_z' from 0 to (count _c)-1 do {
+ if (isClass (configFile >> 'CfgVehicles' >> (_c select _z))) then {
+ _get = (_c select _z) Call GetNamespace;
+ if (isNil '_get') then {
+ if ((_i select _z) select 0 == '') then {(_i select _z) set [0, [_c select _z,'displayName'] Call GetConfigInfo]};
+ if (typeName ((_i select _z) select 4) == 'SCALAR') then {
+ if (((_i select _z) select 4) == -2) then {
+ _ret = (_c select _z) Call Compile preprocessFile "Common\Functions\Common_GetConfigVehicleCrewSlot.sqf";
+ (_i select _z) set [4, _ret select 0];
+ (_i select _z) set [9, _ret select 1];
+ };
+ };
+ if (WF_Debug) then {(_i select _z) set [3,1]};
+ _p = if ((_c select _z) isKindOf 'Man') then {'portrait'} else {'picture'};
+ (_i select _z) set [1, [_c select _z,_p] Call GetConfigInfo];
+ [_c select _z,_i select _z] Call SetNamespace;
+ } else {
+ diag_log Format ["[WFBE (INIT)][frameno:%2 | ticktime:%3] Core_Spetsnaz: Duplicated Element found '%1'",(_c select _z),diag_frameno,diag_tickTime];
+ };
+ } else {
+ diag_log Format ["[WFBE (ERROR)][frameno:%2 | ticktime:%3] Core_Spetsnaz: Element '%1' is not a valid class.",(_c select _z),diag_frameno,diag_tickTime];
+ };
+};
+
+diag_log Format ["[WFBE (INIT)][frameno:%2 | ticktime:%3] Core_Spetsnaz: Initialization (%1 Elements) - [Done]",count _c,diag_frameno,diag_tickTime]; \ No newline at end of file
diff --git a/Common/Config/Core/Core_TK.sqf b/Common/Config/Core/Core_TK.sqf
new file mode 100644
index 0000000..fbfd9e6
--- /dev/null
+++ b/Common/Config/Core/Core_TK.sqf
@@ -0,0 +1,249 @@
+/* TK Configuration */
+private ["_c","_get","_i","_p"];
+
+_c = [];
+_i = [];
+
+/* Infantry */
+_c = _c + ['TK_Soldier_EP1'];
+_i = _i + [['','',150,4,-1,0,0,0.77,'Takistani']];
+
+_c = _c + ['TK_Soldier_B_EP1'];
+_i = _i + [['','',125,4,-1,0,0,0.77,'Takistani']];
+
+_c = _c + ['TK_Soldier_TWS_EP1'];
+_i = _i + [['','',205,5,-1,0,0,0.82,'Takistani']];
+
+_c = _c + ['TK_Soldier_Engineer_EP1'];
+_i = _i + [['','',155,5,-1,0,0,0.78,'Takistani']];
+
+_c = _c + ['TK_Soldier_LAT_EP1'];
+_i = _i + [['','',225,5,-1,0,0,0.78,'Takistani']];
+
+_c = _c + ['TK_Soldier_AT_EP1'];
+_i = _i + [['','',310,5,-1,1,0,0.8,'Takistani']];
+
+_c = _c + ['TK_Soldier_HAT_EP1'];
+_i = _i + [['','',620,7,-1,3,0,0.83,'Takistani']];
+
+_c = _c + ['TK_Soldier_AA_EP1'];
+_i = _i + [['','',425,6,-1,1,0,0.82,'Takistani']];
+
+_c = _c + ['TK_Soldier_AR_EP1'];
+_i = _i + [['','',210,5,-1,1,0,0.79,'Takistani']];
+
+_c = _c + ['TK_Soldier_MG_EP1'];
+_i = _i + [['','',220,5,-1,0,0,0.8,'Takistani']];
+
+_c = _c + ['TK_Soldier_GL_EP1'];
+_i = _i + [['','',160,5,-1,0,0,0.78,'Takistani']];
+
+_c = _c + ['TK_Soldier_Sniper_EP1'];
+_i = _i + [['','',280,5,-1,1,0,0.88,'Takistani']];
+
+_c = _c + ['TK_Soldier_Spotter_EP1'];
+_i = _i + [['','',290,5,-1,1,0,0.82,'Takistani']];
+
+_c = _c + ['TK_Soldier_Medic_EP1'];
+_i = _i + [['','',190,4,-1,0,0,0.81,'Takistani']];
+
+_c = _c + ['TK_Soldier_Crew_EP1'];
+_i = _i + [['','',120,4,-1,0,0,0.76,'Takistani']];
+
+_c = _c + ['TK_Soldier_Pilot_EP1'];
+_i = _i + [['','',120,4,-1,0,0,0.77,'Takistani']];
+
+_c = _c + ['TK_Soldier_Officer_EP1'];
+_i = _i + [['','',240,5,-1,1,0,0.85,'Takistani']];
+
+_c = _c + ['TK_Soldier_SL_EP1'];
+_i = _i + [['','',220,5,-1,2,0,0.86,'Takistani']];
+
+/* Light Vehicles */
+_c = _c + ['TT650_TK_EP1'];
+_i = _i + [['','',150,15,1,0,1,0,'Takistani']];
+
+_c = _c + ['UAZ_Unarmed_TK_EP1'];
+_i = _i + [['','',260,15,1,0,1,0,'Takistani']];
+
+_c = _c + ['SUV_TK_EP1'];
+_i = _i + [['','',290,15,1,0,1,0,'Takistani']];
+
+_c = _c + ['UAZ_MG_TK_EP1'];
+_i = _i + [['','',460,15,2,0,1,0,'Takistani']];
+
+_c = _c + ['UAZ_AGS30_TK_EP1'];
+_i = _i + [['','',585,15,2,1,1,0,'Takistani']];
+
+_c = _c + ['LandRover_MG_TK_EP1'];
+_i = _i + [['','',550,17,2,0,1,0,'Takistani']];
+
+_c = _c + ['LandRover_SPG9_TK_EP1'];
+_i = _i + [['','',750,17,2,2,1,0,'Takistani']];
+
+_c = _c + ['V3S_TK_EP1'];
+_i = _i + [['','',275,20,1,0,1,0,'Takistani']];
+
+_c = _c + ['V3S_Open_TK_EP1'];
+_i = _i + [['','',250,20,1,0,1,0,'Takistani']];
+
+_c = _c + ['UralRepair_TK_EP1'];
+_i = _i + [['','',1250,21,1,2,1,0,'Takistani']];
+
+_c = _c + ['UralSalvage_TK_EP1'];
+_i = _i + [['','',450,17,1,1,1,0,'Takistani']];
+
+_c = _c + ['UralReammo_TK_EP1'];
+_i = _i + [['','',450,18,1,1,1,0,'Takistani']];
+
+_c = _c + ['UralRefuel_TK_EP1'];
+_i = _i + [['','',400,19,1,1,1,0,'Takistani']];
+
+_c = _c + ['UralSupply_TK_EP1'];
+_i = _i + [['','',450,21,1,0,1,0,'Takistani']];
+
+_c = _c + ['M113Ambul_TK_EP1'];
+_i = _i + [['','',750,25,1,1,1,0,'Takistani']];
+
+_c = _c + ['BRDM2_TK_EP1'];
+_i = _i + [['','',1100,22,2,1,1,0,'Takistani']];
+
+_c = _c + ['BRDM2_ATGM_TK_EP1'];
+_i = _i + [['','',1650,22,2,2,1,0,'Takistani']];
+
+_c = _c + ['BTR60_TK_EP1'];
+_i = _i + [['','',1425,25,3,2,1,0,'Takistani']];
+
+_c = _c + ['Ural_ZU23_TK_EP1'];
+_i = _i + [['','',1750,25,2,2,1,0,'Takistani']];
+
+_c = _c + ['GRAD_TK_EP1'];
+_i = _i + [['','',4200,25,2,3,1,0,'Takistani']];
+
+/* Heavy Vehicles */
+_c = _c + ['M113_TK_EP1'];
+_i = _i + [['','',1100,22,2,0,2,0,'Takistani']];
+
+_c = _c + ['BMP2_TK_EP1'];
+_i = _i + [['','',2600,25,3,if (WF_A2_Arrowhead) then {0} else {1},2,0,'Takistani']];
+
+_c = _c + ['ZSU_TK_EP1'];
+_i = _i + [['','',3400,25,3,1,2,0,'Takistani']];
+
+_c = _c + ['T34_TK_EP1'];
+_i = _i + [['','',3900,25,3,0,2,0,'Takistani']];
+
+_c = _c + ['T55_TK_EP1'];
+_i = _i + [['','',4500,27,3,1,2,0,'Takistani']];
+
+_c = _c + ['T72_TK_EP1'];
+_i = _i + [['','',4900,30,3,2,2,0,'Takistani']];
+
+/* Air Vehicles */
+_c = _c + ['An2_TK_EP1'];
+_i = _i + [['','',6200,35,1,1,3,0,'Takistani']];
+
+_c = _c + ['Mi17_TK_EP1'];
+_i = _i + [['','',7000,35,2,0,3,0,'Takistani']];
+
+_c = _c + ['UH1H_TK_EP1'];
+_i = _i + [['','',7500,35,2,0,3,0,'Takistani']];
+
+_c = _c + ['Mi24_D_TK_EP1'];
+_i = _i + [['','',32800,40,2,1,3,0,'Takistani']];
+
+_c = _c + ['L39_TK_EP1'];
+_i = _i + [['','',38700,50,1,2,3,0,'Takistani']];
+
+_c = _c + ['Su25_TK_EP1'];
+_i = _i + [['','',46400,55,1,3,3,0,'Takistani']];
+
+/* Static Defenses */
+_c = _c + ['WarfareBMGNest_PK_TK_EP1'];
+_i = _i + [['','',300,0,1,0,'Defense',0,'Takistani']];
+
+_c = _c + ['KORD_TK_EP1'];
+_i = _i + [['KORD Minitripod','',200,0,1,0,'Defense',0,'Takistani']];
+
+_c = _c + ['KORD_high_TK_EP1'];
+_i = _i + [['KORD','',225,0,1,0,'Defense',0,'Takistani']];
+
+_c = _c + ['SearchLight_TK_EP1'];
+_i = _i + [['','',125,0,1,0,'Defense',0,'Takistani']];
+
+_c = _c + ['AGS_TK_EP1'];
+_i = _i + [['','',650,0,1,0,'Defense',0,'Takistani']];
+
+_c = _c + ['SPG9_TK_INS_EP1'];
+_i = _i + [['','',475,0,1,0,'Defense',0,'Takistani']];
+
+_c = _c + ['Metis_TK_EP1'];
+_i = _i + [['Metis-M 9K115-2','',725,0,1,0,'Defense',0,'Takistani']];
+
+_c = _c + ['Igla_AA_pod_TK_EP1'];
+_i = _i + [['Igla AA POD launcher','',815,0,1,0,'Defense',0,'Takistani']];
+
+_c = _c + ['ZU23_TK_EP1'];
+_i = _i + [['','',945,0,1,0,'Defense',0,'Takistani']];
+
+_c = _c + ['2b14_82mm_TK_EP1'];
+_i = _i + [['Podnos 2B14','',1025,0,1,0,'Defense',0,'Takistani']];
+
+_c = _c + ['D30_TK_EP1'];
+_i = _i + [['','',2300,0,1,0,'Defense',0,'Takistani']];
+
+/* Defense Structures */
+_c = _c + ['TK_WarfareBBarrier5x_EP1'];
+_i = _i + [['','',15,0,0,0,'Fortification',0,'Takistani']];
+
+_c = _c + ['TK_WarfareBBarrier10x_EP1'];
+_i = _i + [['','',25,0,0,0,'Fortification',0,'Takistani']];
+
+_c = _c + ['TK_WarfareBBarrier10xTall_EP1'];
+_i = _i + [['','',50,0,0,0,'Fortification',0,'Takistani']];
+
+_c = _c + ['Land_CamoNet_EAST_EP1'];
+_i = _i + [['','',35,0,0,0,'Strategic',0,'Takistani']];
+
+_c = _c + ['Land_CamoNetVar_EAST_EP1'];
+_i = _i + [['','',45,0,0,0,'Strategic',0,'Takistani']];
+
+_c = _c + ['Land_CamoNetB_EAST_EP1'];
+_i = _i + [['','',55,0,0,0,'Strategic',0,'Takistani']];
+
+_c = _c + ['TKOrdnanceBox_EP1'];
+_i = _i + [['','',850,0,0,0,'Ammo',0,'Takistani']];
+
+_c = _c + ['TKVehicleBox_EP1'];
+_i = _i + [['','',1200,0,0,0,'Ammo',0,'Takistani']];
+
+_c = _c + ['TKBasicAmmunitionBox_EP1'];
+_i = _i + [['','',1950,0,0,0,'Ammo',0,'Takistani']];
+
+_c = _c + ['TKBasicWeapons_EP1'];
+_i = _i + [['','',2975,0,0,0,'Ammo',0,'Takistani']];
+
+_c = _c + ['TKLaunchers_EP1'];
+_i = _i + [['','',6250,0,0,0,'Ammo',0,'Takistani']];
+
+_c = _c + ['TKSpecialWeapons_EP1'];
+_i = _i + [['','',7200,0,0,0,'Ammo',0,'Takistani']];
+
+for '_z' from 0 to (count _c)-1 do {
+ if (isClass (configFile >> 'CfgVehicles' >> (_c select _z))) then {
+ _get = (_c select _z) Call GetNamespace;
+ if (isNil '_get') then {
+ if ((_i select _z) select 0 == '') then {(_i select _z) set [0, [_c select _z,'displayName'] Call GetConfigInfo]};
+ if (WF_Debug) then {(_i select _z) set [3,1]};
+ _p = if ((_c select _z) isKindOf 'Man') then {'portrait'} else {'picture'};
+ (_i select _z) set [1, [_c select _z,_p] Call GetConfigInfo];
+ [_c select _z,_i select _z] Call SetNamespace;
+ } else {
+ diag_log Format ["[WFBE (INIT)][frameno:%2 | ticktime:%3] Core_TK: Duplicated Element found '%1'",(_c select _z),diag_frameno,diag_tickTime];
+ };
+ } else {
+ diag_log Format ["[WFBE (ERROR)][frameno:%2 | ticktime:%3] Core_TK: Element '%1' is not a valid class.",(_c select _z),diag_frameno,diag_tickTime];
+ };
+};
+
+diag_log Format ["[WFBE (INIT)][frameno:%2 | ticktime:%3] Core_TK: Initialization (%1 Elements) - [Done]",count _c,diag_frameno,diag_tickTime]; \ No newline at end of file
diff --git a/Common/Config/Core/Core_TKA.sqf b/Common/Config/Core/Core_TKA.sqf
new file mode 100644
index 0000000..50db7ff
--- /dev/null
+++ b/Common/Config/Core/Core_TKA.sqf
@@ -0,0 +1,265 @@
+/* TKA Configuration */
+Private ['_c','_get','_i','_p','_z'];
+
+_c = [];
+_i = [];
+
+/* Infantry */
+_c = _c + ['TK_Soldier_EP1'];
+_i = _i + [['','',150,4,-1,0,0,0.77,'Takistani Army',[]]];
+
+_c = _c + ['TK_Soldier_B_EP1'];
+_i = _i + [['','',125,4,-1,0,0,0.77,'Takistani Army',[]]];
+
+_c = _c + ['TK_Soldier_TWS_EP1'];
+_i = _i + [['','',205,5,-1,0,0,0.82,'Takistani Army',[]]];
+
+_c = _c + ['TK_Soldier_Engineer_EP1'];
+_i = _i + [['','',155,5,-1,0,0,0.78,'Takistani Army',[]]];
+
+_c = _c + ['TK_Soldier_LAT_EP1'];
+_i = _i + [['','',225,5,-1,0,0,0.78,'Takistani Army',[]]];
+
+_c = _c + ['TK_Soldier_AT_EP1'];
+_i = _i + [['','',310,5,-1,1,0,0.8,'Takistani Army',[]]];
+
+_c = _c + ['TK_Soldier_AAT_EP1'];
+_i = _i + [['','',270,5,-1,1,0,0.8,'Takistani Army',[]]];
+
+_c = _c + ['TK_Soldier_HAT_EP1'];
+_i = _i + [['','',620,7,-1,3,0,0.83,'Takistani Army',[]]];
+
+_c = _c + ['TK_Soldier_AA_EP1'];
+_i = _i + [['','',425,6,-1,1,0,0.82,'Takistani Army',[]]];
+
+_c = _c + ['TK_Soldier_AR_EP1'];
+_i = _i + [['','',210,5,-1,1,0,0.79,'Takistani Army',[]]];
+
+_c = _c + ['TK_Soldier_AMG_EP1'];
+_i = _i + [['','',205,5,-1,0,0,0.8,'Takistani Army',[]]];
+
+_c = _c + ['TK_Soldier_MG_EP1'];
+_i = _i + [['','',220,5,-1,0,0,0.8,'Takistani Army',[]]];
+
+_c = _c + ['TK_Soldier_GL_EP1'];
+_i = _i + [['','',160,5,-1,0,0,0.78,'Takistani Army',[]]];
+
+_c = _c + ['TK_Soldier_Sniper_EP1'];
+_i = _i + [['','',280,5,-1,1,0,0.88,'Takistani Army',[]]];
+
+_c = _c + ['TK_Soldier_SniperH_EP1'];
+_i = _i + [['','',320,5,-1,3,0,0.88,'Takistani Army',[]]];
+
+_c = _c + ['TK_Soldier_Spotter_EP1'];
+_i = _i + [['','',290,5,-1,1,0,0.82,'Takistani Army',[]]];
+
+_c = _c + ['TK_Soldier_Medic_EP1'];
+_i = _i + [['','',190,4,-1,0,0,0.81,'Takistani Army',[]]];
+
+_c = _c + ['TK_Soldier_Crew_EP1'];
+_i = _i + [['','',120,4,-1,0,0,0.76,'Takistani Army',[]]];
+
+_c = _c + ['TK_Soldier_Pilot_EP1'];
+_i = _i + [['','',120,4,-1,0,0,0.77,'Takistani Army',[]]];
+
+_c = _c + ['TK_Soldier_Officer_EP1'];
+_i = _i + [['','',240,5,-1,1,0,0.85,'Takistani Army',[]]];
+
+_c = _c + ['TK_Soldier_SL_EP1'];
+_i = _i + [['','',220,5,-1,2,0,0.86,'Takistani Army',[]]];
+
+/* Light Vehicles */
+_c = _c + ['TT650_TK_EP1'];
+_i = _i + [['','',150,15,-2,0,1,0,'Takistani Army',[]]];
+
+_c = _c + ['UAZ_Unarmed_TK_EP1'];
+_i = _i + [['','',260,15,-2,0,1,0,'Takistani Army',[]]];
+
+_c = _c + ['SUV_TK_EP1'];
+_i = _i + [['','',290,15,-2,0,1,0,'Takistani Army',[]]];
+
+_c = _c + ['UAZ_MG_TK_EP1'];
+_i = _i + [['','',460,15,-2,0,1,0,'Takistani Army',[]]];
+
+_c = _c + ['UAZ_AGS30_TK_EP1'];
+_i = _i + [['','',585,15,-2,1,1,0,'Takistani Army',[]]];
+
+_c = _c + ['LandRover_MG_TK_EP1'];
+_i = _i + [['','',550,17,-2,0,1,0,'Takistani Army',[]]];
+
+_c = _c + ['LandRover_SPG9_TK_EP1'];
+_i = _i + [['','',750,17,-2,2,1,0,'Takistani Army',[]]];
+
+_c = _c + ['V3S_TK_EP1'];
+_i = _i + [['','',275,20,-2,0,1,0,'Takistani Army',[]]];
+
+_c = _c + ['V3S_Open_TK_EP1'];
+_i = _i + [['','',250,20,-2,0,1,0,'Takistani Army',[]]];
+
+_c = _c + ['UralRepair_TK_EP1'];
+_i = _i + [['','',425,17,-2,2,1,0,'Takistani Army',[]]];
+
+_c = _c + ['UralSalvage_TK_EP1'];
+_i = _i + [['','',450,17,-2,1,1,0,'Takistani Army',[]]];
+
+_c = _c + ['UralReammo_TK_EP1'];
+_i = _i + [['','',450,18,-2,1,1,0,'Takistani Army',[]]];
+
+_c = _c + ['UralRefuel_TK_EP1'];
+_i = _i + [['','',400,19,-2,1,1,0,'Takistani Army',[]]];
+
+_c = _c + ['UralSupply_TK_EP1'];
+_i = _i + [['','',450,21,-2,0,1,0,'Takistani Army',[]]];
+
+_c = _c + ['M113Ambul_TK_EP1'];
+_i = _i + [['','',750,25,-2,1,1,0,'Takistani Army',[]]];
+
+_c = _c + ['BRDM2_TK_EP1'];
+_i = _i + [['','',1100,22,-2,1,1,0,'Takistani Army',[]]];
+
+_c = _c + ['BRDM2_ATGM_TK_EP1'];
+_i = _i + [['','',1650,22,-2,2,1,0,'Takistani Army',[]]];
+
+_c = _c + ['BTR60_TK_EP1'];
+_i = _i + [['','',1425,25,-2,2,1,0,'Takistani Army',[]]];
+
+_c = _c + ['Ural_ZU23_TK_EP1'];
+_i = _i + [['','',1750,25,-2,2,1,0,'Takistani Army',[]]];
+
+_c = _c + ['GRAD_TK_EP1'];
+_i = _i + [['','',4200,25,-2,3,1,0,'Takistani Army',[]]];
+
+/* Heavy Vehicles */
+_c = _c + ['M113_TK_EP1'];
+_i = _i + [['','',1100,22,-2,0,2,0,'Takistani Army',[]]];
+
+_c = _c + ['BMP2_TK_EP1'];
+_i = _i + [['','',2600,25,-2,if (WF_A2_Arrowhead) then {0} else {1},2,0,'Takistani Army',[]]];
+
+_c = _c + ['ZSU_TK_EP1'];
+_i = _i + [['','',3400,25,-2,1,2,0,'Takistani Army',[]]];
+
+_c = _c + ['T34_TK_EP1'];
+_i = _i + [['','',3900,25,-2,0,2,0,'Takistani Army',[]]];
+
+_c = _c + ['T55_TK_EP1'];
+_i = _i + [['','',4500,27,-2,1,2,0,'Takistani Army',[]]];
+
+_c = _c + ['T72_TK_EP1'];
+_i = _i + [['','',4900,30,-2,2,2,0,'Takistani Army',[]]];
+
+/* Air Vehicles */
+_c = _c + ['An2_TK_EP1'];
+_i = _i + [['','',15000,35,-2,1,3,0,'Takistani Army',[]]];
+
+_c = _c + ['Mi17_TK_EP1'];
+_i = _i + [['','',15000,33,-2,0,3,0,'Takistani Army',[]]];
+
+_c = _c + ['UH1H_TK_EP1'];
+_i = _i + [['','',12500,30,-2,0,3,0,'Takistani Army',[]]];
+
+_c = _c + ['Mi24_D_TK_EP1'];
+_i = _i + [['','',65000,40,-2,1,3,0,'Takistani Army',[]]];
+
+_c = _c + ['L39_TK_EP1'];
+_i = _i + [['','',70000,50,-2,2,3,0,'Takistani Army',[]]];
+
+_c = _c + ['Su25_TK_EP1'];
+_i = _i + [['','',90000,55,-2,3,3,0,'Takistani Army',[]]];
+
+/* Static Defenses */
+_c = _c + ['WarfareBMGNest_PK_TK_EP1'];
+_i = _i + [['','',300,0,1,0,'Defense',0,'Takistani Army',[]]];
+
+_c = _c + ['KORD_TK_EP1'];
+_i = _i + [['KORD Minitripod','',200,0,1,0,'Defense',0,'Takistani Army',[]]];
+
+_c = _c + ['KORD_high_TK_EP1'];
+_i = _i + [['KORD','',225,0,1,0,'Defense',0,'Takistani Army',[]]];
+
+_c = _c + ['SearchLight_TK_EP1'];
+_i = _i + [['','',125,0,1,0,'Defense',0,'Takistani Army',[]]];
+
+_c = _c + ['AGS_TK_EP1'];
+_i = _i + [['','',650,0,1,0,'Defense',0,'Takistani Army',[]]];
+
+_c = _c + ['SPG9_TK_INS_EP1'];
+_i = _i + [['','',475,0,1,0,'Defense',0,'Takistani Army',[]]];
+
+_c = _c + ['Metis_TK_EP1'];
+_i = _i + [['Metis-M 9K115-2','',725,0,1,0,'Defense',0,'Takistani Army',[]]];
+
+_c = _c + ['Igla_AA_pod_TK_EP1'];
+_i = _i + [['Igla AA POD launcher','',815,0,1,0,'Defense',0,'Takistani Army',[]]];
+
+_c = _c + ['ZU23_TK_EP1'];
+_i = _i + [['','',945,0,1,0,'Defense',0,'Takistani Army',[]]];
+
+_c = _c + ['2b14_82mm_TK_EP1'];
+_i = _i + [['Podnos 2B14','',1025,0,1,0,'Defense',0,'Takistani Army',[]]];
+
+_c = _c + ['D30_TK_EP1'];
+_i = _i + [['','',2300,0,1,0,'Defense',0,'Takistani Army',[]]];
+
+/* Defense Structures */
+_c = _c + ['TK_WarfareBBarrier5x_EP1'];
+_i = _i + [['','',15,0,0,0,'Fortification',0,'Takistani Army',[]]];
+
+_c = _c + ['TK_WarfareBBarrier10x_EP1'];
+_i = _i + [['','',25,0,0,0,'Fortification',0,'Takistani Army',[]]];
+
+_c = _c + ['TK_WarfareBBarrier10xTall_EP1'];
+_i = _i + [['','',50,0,0,0,'Fortification',0,'Takistani Army',[]]];
+
+_c = _c + ['Land_CamoNet_EAST_EP1'];
+_i = _i + [['','',35,0,0,0,'Strategic',0,'Takistani Army',[]]];
+
+_c = _c + ['Land_CamoNetVar_EAST_EP1'];
+_i = _i + [['','',45,0,0,0,'Strategic',0,'Takistani Army',[]]];
+
+_c = _c + ['Land_CamoNetB_EAST_EP1'];
+_i = _i + [['','',55,0,0,0,'Strategic',0,'Takistani Army',[]]];
+
+_c = _c + ['TKOrdnanceBox_EP1'];
+_i = _i + [['','',850,0,0,0,'Ammo',0,'Takistani Army',[]]];
+
+_c = _c + ['TKVehicleBox_EP1'];
+_i = _i + [['','',1200,0,0,0,'Ammo',0,'Takistani Army',[]]];
+
+_c = _c + ['TKBasicAmmunitionBox_EP1'];
+_i = _i + [['','',1950,0,0,0,'Ammo',0,'Takistani Army',[]]];
+
+_c = _c + ['TKBasicWeapons_EP1'];
+_i = _i + [['','',2975,0,0,0,'Ammo',0,'Takistani Army',[]]];
+
+_c = _c + ['TKLaunchers_EP1'];
+_i = _i + [['','',6250,0,0,0,'Ammo',0,'Takistani Army',[]]];
+
+_c = _c + ['TKSpecialWeapons_EP1'];
+_i = _i + [['','',7200,0,0,0,'Ammo',0,'Takistani Army',[]]];
+
+for '_z' from 0 to (count _c)-1 do {
+ if (isClass (configFile >> 'CfgVehicles' >> (_c select _z))) then {
+ _get = (_c select _z) Call GetNamespace;
+ if (isNil '_get') then {
+ if ((_i select _z) select 0 == '') then {(_i select _z) set [0, [_c select _z,'displayName'] Call GetConfigInfo]};
+ if (typeName ((_i select _z) select 4) == 'SCALAR') then {
+ if (((_i select _z) select 4) == -2) then {
+ _ret = (_c select _z) Call Compile preprocessFile "Common\Functions\Common_GetConfigVehicleCrewSlot.sqf";
+ (_i select _z) set [4, _ret select 0];
+ (_i select _z) set [9, _ret select 1];
+ };
+ };
+ if (WF_Debug) then {(_i select _z) set [3,1]};
+ _p = if ((_c select _z) isKindOf 'Man') then {'portrait'} else {'picture'};
+ (_i select _z) set [1, [_c select _z,_p] Call GetConfigInfo];
+ [_c select _z,_i select _z] Call SetNamespace;
+ } else {
+ diag_log Format ["[WFBE (INIT)][frameno:%2 | ticktime:%3] Core_TKA: Duplicated Element found '%1'",(_c select _z),diag_frameno,diag_tickTime];
+ };
+ } else {
+ diag_log Format ["[WFBE (ERROR)][frameno:%2 | ticktime:%3] Core_TKA: Element '%1' is not a valid class.",(_c select _z),diag_frameno,diag_tickTime];
+ };
+};
+
+diag_log Format ["[WFBE (INIT)][frameno:%2 | ticktime:%3] Core_TKA: Initialization (%1 Elements) - [Done]",count _c,diag_frameno,diag_tickTime]; \ No newline at end of file
diff --git a/Common/Config/Core/Core_TKCIV.sqf b/Common/Config/Core/Core_TKCIV.sqf
new file mode 100644
index 0000000..e1949e1
--- /dev/null
+++ b/Common/Config/Core/Core_TKCIV.sqf
@@ -0,0 +1,133 @@
+/* CIV Configuration */
+private ["_c","_get","_i","_p"];
+
+_c = [];
+_i = [];
+
+/* Infantry */
+_c = _c + ['TK_CIV_Worker01_EP1'];
+_i = _i + [['','',375,4,-1,0,0,0.4,'Takistani Civilians',[]]];
+
+_c = _c + ['TK_CIV_Worker02_EP1'];
+_i = _i + [['','',375,4,-1,0,0,0.4,'Takistani Civilians',[]]];
+
+/* Light Vehicles */
+_c = _c + ['Old_bike_TK_CIV_EP1'];
+_i = _i + [['','',50,8,-2,0,1,0,'Takistani Civilians',[]]];
+
+_c = _c + ['Old_moto_TK_Civ_EP1'];
+_i = _i + [['','',100,12,-2,0,1,0,'Takistani Civilians',[]]];
+
+_c = _c + ['TT650_TK_CIV_EP1'];
+_i = _i + [['','',110,15,-2,0,1,0,'Takistani Civilians',[]]];
+
+_c = _c + ['Lada1_TK_CIV_EP1'];
+_i = _i + [['','',175,18,-2,0,1,0,'Takistani Civilians',[]]];
+
+_c = _c + ['Lada2_TK_CIV_EP1'];
+_i = _i + [['','',175,18,-2,0,1,0,'Takistani Civilians',[]]];
+
+_c = _c + ['Volha_1_TK_CIV_EP1'];
+_i = _i + [['','',200,21,-2,0,1,0,'Takistani Civilians',[]]];
+
+_c = _c + ['Volha_2_TK_CIV_EP1'];
+_i = _i + [['','',200,21,-2,0,1,0,'Takistani Civilians',[]]];
+
+_c = _c + ['VolhaLimo_TK_CIV_EP1'];
+_i = _i + [['','',200,22,-2,0,1,0,'Takistani Civilians',[]]];
+
+_c = _c + ['LandRover_TK_CIV_EP1'];
+_i = _i + [['','',250,24,-2,0,1,0,'Takistani Civilians',[]]];
+
+_c = _c + ['S1203_TK_CIV_EP1'];
+_i = _i + [['','',320,25,-2,0,1,0,'Takistani Civilians',[]]];
+
+_c = _c + ['V3S_Open_TK_CIV_EP1'];
+_i = _i + [['','',380,25,-2,0,1,0,'Takistani Civilians',[]]];
+
+_c = _c + ['Ural_TK_CIV_EP1'];
+_i = _i + [['','',390,25,-2,0,1,0,'Takistani Civilians',[]]];
+
+_c = _c + ['Ikarus_TK_CIV_EP1'];
+_i = _i + [['','',420,25,-2,0,1,0,'Takistani Civilians',[]]];
+
+/* Defense Structures */
+_c = _c + ['Land_HBarrier3'];
+_i = _i + [['','',20,0,0,0,'Fortification',0,'Takistani Civilians',[]]];
+
+_c = _c + ['Land_HBarrier5'];
+_i = _i + [['','',30,0,0,0,'Fortification',0,'Takistani Civilians',[]]];
+
+_c = _c + ['Land_HBarrier_large'];
+_i = _i + [['','',50,0,0,0,'Fortification',0,'Takistani Civilians',[]]];
+
+_c = _c + ['Land_fort_bagfence_long'];
+_i = _i + [['','',10,0,0,0,'Fortification',0,'Takistani Civilians',[]]];
+
+_c = _c + ['Land_fort_bagfence_corner'];
+_i = _i + [['','',8,0,0,0,'Fortification',0,'Takistani Civilians',[]]];
+
+_c = _c + ['Land_fort_bagfence_round'];
+_i = _i + [['','',12,0,0,0,'Fortification',0,'Takistani Civilians',[]]];
+
+_c = _c + ['Hhedgehog_concreteBig'];
+_i = _i + [['','',95,0,0,0,'Fortification',0,'Takistani Civilians',[]]];
+
+_c = _c + ['Hedgehog_EP1'];
+_i = _i + [['','',5,0,0,0,'Fortification',0,'Takistani Civilians',[]]];
+
+_c = _c + ['HeliH'];
+_i = _i + [['','',15,0,0,0,'Strategic',0,'Takistani Civilians',[]]];
+
+_c = _c + ['MASH_EP1'];
+_i = _i + [['','',30,0,0,0,'Strategic',0,'Takistani Civilians',[]]];
+
+_c = _c + ['Land_Campfire'];
+_i = _i + [['','',3,0,0,0,'Strategic',0,'Civilians',[]]];
+
+_c = _c + ['Land_fort_rampart_EP1'];
+_i = _i + [['','',30,0,0,0,'Fortification',0,'Takistani Civilians',[]]];
+
+_c = _c + ['Land_fort_artillery_nest_EP1'];
+_i = _i + [[localize 'STR_WF_ArtilleryNest','',65,0,0,0,'Fortification',0,'Takistani Civilians',[]]];
+
+_c = _c + ['Land_fortified_nest_small_EP1'];
+_i = _i + [['','',40,0,0,0,'Fortification',0,'Takistani Civilians',[]]];
+
+_c = _c + ['Sign_Danger'];
+_i = _i + [[localize 'STR_WF_Minefield','',1200,0,0,0,'Strategic',0,'Takistani Civilians',[]]];
+
+_c = _c + ['Fort_RazorWire'];
+_i = _i + [['','',25,0,0,0,'Fortification',0,'Takistani Civilians',[]]];
+
+_c = _c + ['Concrete_Wall_EP1'];
+_i = _i + [['','',20,0,0,0,'Fortification',0,'Takistani Civilians',[]]];
+
+_c = _c + ['Land_Ind_IlluminantTower'];
+_i = _i + [['','',200,0,0,0,'Fortification',0,'Takistani Civilians',[]]];
+
+for '_z' from 0 to (count _c)-1 do {
+ if (isClass (configFile >> 'CfgVehicles' >> (_c select _z))) then {
+ _get = (_c select _z) Call GetNamespace;
+ if (isNil '_get') then {
+ if ((_i select _z) select 0 == '') then {(_i select _z) set [0, [_c select _z,'displayName'] Call GetConfigInfo]};
+ if (typeName ((_i select _z) select 4) == 'SCALAR') then {
+ if (((_i select _z) select 4) == -2) then {
+ _ret = (_c select _z) Call Compile preprocessFile "Common\Functions\Common_GetConfigVehicleCrewSlot.sqf";
+ (_i select _z) set [4, _ret select 0];
+ (_i select _z) set [9, _ret select 1];
+ };
+ };
+ if (WF_Debug) then {(_i select _z) set [3,1]};
+ _p = if ((_c select _z) isKindOf 'Man') then {'portrait'} else {'picture'};
+ (_i select _z) set [1, [_c select _z,_p] Call GetConfigInfo];
+ [_c select _z,_i select _z] Call SetNamespace;
+ } else {
+ diag_log Format ["[WFBE (INIT)][frameno:%2 | ticktime:%3] Core_TKCIV: Duplicated Element found '%1'",(_c select _z),diag_frameno,diag_tickTime];
+ };
+ } else {
+ diag_log Format ["[WFBE (ERROR)][frameno:%2 | ticktime:%3] Core_TKCIV: Element '%1' is not a valid class.",(_c select _z),diag_frameno,diag_tickTime];
+ };
+};
+
+diag_log Format ["[WFBE (INIT)][frameno:%2 | ticktime:%3] Core_TKCIV: Initialization (%1 Elements) - [Done]",count _c,diag_frameno,diag_tickTime]; \ No newline at end of file
diff --git a/Common/Config/Core/Core_TKGUE.sqf b/Common/Config/Core/Core_TKGUE.sqf
new file mode 100644
index 0000000..d6dbea0
--- /dev/null
+++ b/Common/Config/Core/Core_TKGUE.sqf
@@ -0,0 +1,128 @@
+/* TK GUE Configuration */
+private ["_c","_get","_i","_p"];
+
+_c = [];
+_i = [];
+
+/* Infantry */
+_c = _c + ['TK_GUE_Soldier_EP1'];
+_i = _i + [['','',110,4,-1,0,0,0.48,'Takistani Guerilla',[]]];
+
+_c = _c + ['TK_GUE_Soldier_2_EP1'];
+_i = _i + [['','',120,4,-1,0,0,0.46,'Takistani Guerilla',[]]];
+
+_c = _c + ['TK_GUE_Soldier_3_EP1'];
+_i = _i + [['','',110,4,-1,0,0,0.5,'Takistani Guerilla',[]]];
+
+_c = _c + ['TK_GUE_Soldier_4_EP1'];
+_i = _i + [['','',100,5,-1,0,0,0.49,'Takistani Guerilla',[]]];
+
+_c = _c + ['TK_GUE_Soldier_5_EP1'];
+_i = _i + [['','',100,5,-1,0,0,0.47,'Takistani Guerilla',[]]];
+
+_c = _c + ['TK_GUE_Soldier_AT_EP1'];
+_i = _i + [['','',220,4,-1,1,0,0.52,'Takistani Guerilla',[]]];
+
+_c = _c + ['TK_GUE_Soldier_AAT_EP1'];
+_i = _i + [['','',210,4,-1,2,0,0.51,'Takistani Guerilla',[]]];
+
+_c = _c + ['TK_GUE_Soldier_AA_EP1'];
+_i = _i + [['','',270,4,-1,2,0,0.53,'Takistani Guerilla',[]]];
+
+_c = _c + ['TK_GUE_Soldier_AR_EP1'];
+_i = _i + [['','',190,5,-1,1,0,0.52,'Takistani Guerilla',[]]];
+
+_c = _c + ['TK_GUE_Soldier_MG_EP1'];
+_i = _i + [['','',200,6,-1,0,0,0.53,'Takistani Guerilla',[]]];
+
+_c = _c + ['TK_GUE_Soldier_Sniper_EP1'];
+_i = _i + [['','',180,5,-1,1,0,0.56,'Takistani Guerilla',[]]];
+
+_c = _c + ['TK_GUE_Bonesetter_EP1'];
+_i = _i + [['','',125,5,-1,0,0,0.49,'Takistani Guerilla',[]]];
+
+_c = _c + ['TK_GUE_Soldier_HAT_EP1'];
+_i = _i + [['','',350,5,-1,3,0,0.58,'Takistani Guerilla',[]]];
+
+_c = _c + ['TK_GUE_Soldier_TL_EP1'];
+_i = _i + [['','',200,5,-1,2,0,0.61,'Takistani Guerilla',[]]];
+
+_c = _c + ['TK_GUE_Warlord_EP1'];
+_i = _i + [['','',210,5,-1,1,0,0.59,'Takistani Guerilla',[]]];
+
+/* Light Vehicles */
+_c = _c + ['V3S_TK_GUE_EP1'];
+_i = _i + [['','',175,15,-2,0,1,0,'Takistani Guerilla',[]]];
+
+_c = _c + ['Pickup_PK_TK_GUE_EP1'];
+_i = _i + [['','',250,17,-2,0,1,0,'Takistani Guerilla',[]]];
+
+_c = _c + ['Offroad_DSHKM_TK_GUE_EP1'];
+_i = _i + [['','',300,25,-2,1,1,0,'Takistani Guerilla',[]]];
+
+_c = _c + ['Offroad_SPG9_TK_GUE_EP1'];
+_i = _i + [['','',380,20,-2,2,1,0,'Takistani Guerilla',[]]];
+
+_c = _c + ['BRDM2_TK_GUE_EP1'];
+_i = _i + [['','',600,25,-2,1,1,0,'Takistani Guerilla',[]]];
+
+_c = _c + ['BTR40_TK_GUE_EP1'];
+_i = _i + [['','',650,25,-2,0,1,0,'Takistani Guerilla',[]]];
+
+_c = _c + ['BTR40_MG_TK_GUE_EP1'];
+_i = _i + [['','',800,25,-2,1,1,0,'Takistani Guerilla',[]]];
+
+_c = _c + ['Ural_ZU23_TK_GUE_EP1'];
+_i = _i + [['','',950,25,-2,3,1,0,'Takistani Guerilla',[]]];
+
+/* Heavy Vehicles */
+_c = _c + ['T34_TK_GUE_EP1'];
+_i = _i + [['','',2400,30,-2,0,2,0,'Takistani Guerilla',[]]];
+
+_c = _c + ['T55_TK_GUE_EP1'];
+_i = _i + [['','',2800,35,-2,1,2,0,'Takistani Guerilla',[]]];
+
+/* Static Defenses */
+_c = _c + ['WarfareBMGNest_PK_TK_GUE_EP1'];
+_i = _i + [['','',300,0,1,0,'Defense',0,'Takistani Guerilla',[]]];
+
+_c = _c + ['DSHKM_TK_GUE_EP1'];
+_i = _i + [['','',225,0,1,0,'Defense',0,'Takistani Guerilla',[]]];
+
+_c = _c + ['AGS_TK_GUE_EP1'];
+_i = _i + [['','',650,0,1,0,'Defense',0,'Takistani Guerilla',[]]];
+
+_c = _c + ['SPG9_TK_GUE_EP1'];
+_i = _i + [['','',475,0,1,0,'Defense',0,'Takistani Guerilla',[]]];
+
+_c = _c + ['ZU23_TK_GUE_EP1'];
+_i = _i + [['','',600,0,1,0,'Defense',0,'Takistani Guerilla',[]]];
+
+_c = _c + ['D30_TK_GUE_EP1'];
+_i = _i + [['','',2300,0,1,0,'Defense',0,'Takistani Guerilla',[]]];
+
+for '_z' from 0 to (count _c)-1 do {
+ if (isClass (configFile >> 'CfgVehicles' >> (_c select _z))) then {
+ _get = (_c select _z) Call GetNamespace;
+ if (isNil '_get') then {
+ if ((_i select _z) select 0 == '') then {(_i select _z) set [0, [_c select _z,'displayName'] Call GetConfigInfo]};
+ if (typeName ((_i select _z) select 4) == 'SCALAR') then {
+ if (((_i select _z) select 4) == -2) then {
+ _ret = (_c select _z) Call Compile preprocessFile "Common\Functions\Common_GetConfigVehicleCrewSlot.sqf";
+ (_i select _z) set [4, _ret select 0];
+ (_i select _z) set [9, _ret select 1];
+ };
+ };
+ if (WF_Debug) then {(_i select _z) set [3,1]};
+ _p = if ((_c select _z) isKindOf 'Man') then {'portrait'} else {'picture'};
+ (_i select _z) set [1, [_c select _z,_p] Call GetConfigInfo];
+ [_c select _z,_i select _z] Call SetNamespace;
+ } else {
+ diag_log Format ["[WFBE (INIT)][frameno:%2 | ticktime:%3] Core_TKGUE: Duplicated Element found '%1'",(_c select _z),diag_frameno,diag_tickTime];
+ };
+ } else {
+ diag_log Format ["[WFBE (ERROR)][frameno:%2 | ticktime:%3] Core_TKGUE: Element '%1' is not a valid class.",(_c select _z),diag_frameno,diag_tickTime];
+ };
+};
+
+diag_log Format ["[WFBE (INIT)][frameno:%2 | ticktime:%3] Core_TKGUE: Initialization (%1 Elements) - [Done]",count _c,diag_frameno,diag_tickTime]; \ No newline at end of file
diff --git a/Common/Config/Core/Core_TKSF.sqf b/Common/Config/Core/Core_TKSF.sqf
new file mode 100644
index 0000000..f1fb772
--- /dev/null
+++ b/Common/Config/Core/Core_TKSF.sqf
@@ -0,0 +1,41 @@
+/* TK SF Configuration */
+private ["_c","_get","_i","_p"];
+
+_c = [];
+_i = [];
+
+/* Infantry */
+_c = _c + ['TK_Special_Forces_EP1'];
+_i = _i + [['','',280,6,-1,2,0,0.82,'Takistani Special Forces',[]]];
+
+_c = _c + ['TK_Special_Forces_TL_EP1'];
+_i = _i + [['','',300,6,-1,2,0,0.85,'Takistani Special Forces',[]]];
+
+_c = _c + ['TK_Special_Forces_MG_EP1'];
+_i = _i + [['','',305,6,-1,2,0,0.81,'Takistani Special Forces',[]]];
+
+for '_z' from 0 to (count _c)-1 do {
+ if (isClass (configFile >> 'CfgVehicles' >> (_c select _z))) then {
+ _get = (_c select _z) Call GetNamespace;
+ if (isNil '_get') then {
+ if ((_i select _z) select 0 == '') then {(_i select _z) set [0, [_c select _z,'displayName'] Call GetConfigInfo]};
+ if (typeName ((_i select _z) select 4) == 'SCALAR') then {
+ if (((_i select _z) select 4) == -2) then {
+ _ret = (_c select _z) Call Compile preprocessFile "Common\Functions\Common_GetConfigVehicleCrewSlot.sqf";
+ (_i select _z) set [4, _ret select 0];
+ (_i select _z) set [9, _ret select 1];
+ };
+ };
+ if (WF_Debug) then {(_i select _z) set [3,1]};
+ _p = if ((_c select _z) isKindOf 'Man') then {'portrait'} else {'picture'};
+ (_i select _z) set [1, [_c select _z,_p] Call GetConfigInfo];
+ [_c select _z,_i select _z] Call SetNamespace;
+ } else {
+ diag_log Format ["[WFBE (INIT)][frameno:%2 | ticktime:%3] Core_TKSF: Duplicated Element found '%1'",(_c select _z),diag_frameno,diag_tickTime];
+ };
+ } else {
+ diag_log Format ["[WFBE (ERROR)][frameno:%2 | ticktime:%3] Core_TKSF: Element '%1' is not a valid class.",(_c select _z),diag_frameno,diag_tickTime];
+ };
+};
+
+diag_log Format ["[WFBE (INIT)][frameno:%2 | ticktime:%3] Core_TKSF: Initialization (%1 Elements) - [Done]",count _c,diag_frameno,diag_tickTime]; \ No newline at end of file
diff --git a/Common/Config/Core/Core_US.sqf b/Common/Config/Core/Core_US.sqf
new file mode 100644
index 0000000..934814b
--- /dev/null
+++ b/Common/Config/Core/Core_US.sqf
@@ -0,0 +1,305 @@
+/* US Configuration */
+private ["_c","_get","_i","_p"];
+
+_c = [];
+_i = [];
+
+/* Infantry */
+_c = _c + ['US_Soldier_Light_EP1'];
+_i = _i + [['','',130,4,-1,0,0,0.86,'US',[]]];
+
+_c = _c + ['US_Soldier_EP1'];
+_i = _i + [['','',150,4,-1,0,0,0.86,'US',[]]];
+
+_c = _c + ['US_Soldier_B_EP1'];
+_i = _i + [['','',155,4,-1,0,0,0.86,'US',[]]];
+
+_c = _c + ['US_Soldier_LAT_EP1'];
+_i = _i + [['','',225,5,-1,0,0,0.88,'US',[]]];
+
+_c = _c + ['US_Soldier_AT_EP1'];
+_i = _i + [['','',350,5,-1,2,0,0.9,'US',[]]];
+
+_c = _c + ['US_Soldier_HAT_EP1'];
+_i = _i + [['','',800,6,-1,3,0,0.92,'US',[]]];
+
+_c = _c + ['US_Soldier_AA_EP1'];
+_i = _i + [['','',400,6,-1,2,0,0.91,'US',[]]];
+
+_c = _c + ['US_Soldier_AR_EP1'];
+_i = _i + [['','',210,5,-1,1,0,0.88,'US',[]]];
+
+_c = _c + ['US_Soldier_MG_EP1'];
+_i = _i + [['','',220,5,-1,0,0,0.89,'US',[]]];
+
+_c = _c + ['US_Soldier_GL_EP1'];
+_i = _i + [['','',160,5,-1,0,0,0.87,'US',[]]];
+
+_c = _c + ['US_Soldier_Sniper_EP1'];
+_i = _i + [['','',320,6,-1,2,0,0.92,'US',[]]];
+
+_c = _c + ['US_Soldier_SniperH_EP1'];
+_i = _i + [['','',350,6,-1,3,0,0.93,'US',[]]];
+
+_c = _c + ['US_Soldier_Sniper_NV_EP1'];
+_i = _i + [['','',370,6,-1,3,0,0.94,'US',[]]];
+
+_c = _c + ['US_Soldier_Marksman_EP1'];
+_i = _i + [['','',330,6,-1,2,0,0.91,'US',[]]];
+
+_c = _c + ['US_Soldier_Medic_EP1'];
+_i = _i + [['','',190,4,-1,0,0,0.89,'US',[]]];
+
+_c = _c + ['US_Soldier_Engineer_EP1'];
+_i = _i + [['','',225,5,-1,0,0,0.87,'US',[]]];
+
+_c = _c + ['US_Soldier_AMG_EP1'];
+_i = _i + [['','',185,6,-1,2,0,0.87,'US',[]]];
+
+_c = _c + ['US_Soldier_AAR_EP1'];
+_i = _i + [['','',185,6,-1,3,0,0.87,'US',[]]];
+
+_c = _c + ['US_Soldier_AHAT_EP1'];
+_i = _i + [['','',185,6,-1,3,0,0.89,'US',[]]];
+
+_c = _c + ['US_Soldier_AAT_EP1'];
+_i = _i + [['','',320,6,-1,3,0,0.88,'US',[]]];
+
+_c = _c + ['US_Soldier_Spotter_EP1'];
+_i = _i + [['','',320,6,-1,3,0,0.91,'US',[]]];
+
+_c = _c + ['US_Soldier_Crew_EP1'];
+_i = _i + [['','',120,4,-1,0,0,0.86,'US',[]]];
+
+_c = _c + ['US_Soldier_Pilot_EP1'];
+_i = _i + [['','',120,4,-1,0,0,0.87,'US',[]]];
+
+_c = _c + ['US_Soldier_TL_EP1'];
+_i = _i + [['','',240,5,-1,1,0,0.94,'US',[]]];
+
+_c = _c + ['US_Soldier_SL_EP1'];
+_i = _i + [['','',220,5,-1,2,0,0.93,'US',[]]];
+
+_c = _c + ['US_Soldier_Officer_EP1'];
+_i = _i + [['','',250,5,-1,1,0,0.92,'US',[]]];
+
+/* Light Vehicles */
+_c = _c + ['M1030_US_DES_EP1'];
+_i = _i + [['','',150,12,-2,0,1,0,'US',[]]];
+
+_c = _c + ['ATV_US_EP1'];
+_i = _i + [['','',175,14,-2,0,1,0,'US',[]]];
+
+_c = _c + ['HMMWV_DES_EP1'];
+_i = _i + [['','',300,15,-2,0,1,0,'US',[]]];
+
+_c = _c + ['HMMWV_M1035_DES_EP1'];
+_i = _i + [['','',350,15,-2,0,1,0,'US',[]]];
+
+_c = _c + ['HMMWV_Terminal_EP1'];
+_i = _i + [['','',400,15,-2,0,1,0,'US',[]]];
+
+_c = _c + ['HMMWV_MK19_DES_EP1'];
+_i = _i + [['','',900,18,-2,1,1,0,'US',[]]];
+
+_c = _c + ['HMMWV_M998A2_SOV_DES_EP1'];
+_i = _i + [['','',1050,20,-2,1,1,0,'US',[]]];
+
+_c = _c + ['HMMWV_M1151_M2_DES_EP1'];
+_i = _i + [['','',850,20,-2,0,1,0,'US',[]]];
+
+_c = _c + ['HMMWV_M998_crows_M2_DES_EP1'];
+_i = _i + [['','',1250,22,-2,1,1,0,'US',[]]];
+
+_c = _c + ['HMMWV_M998_crows_MK19_DES_EP1'];
+_i = _i + [['','',1375,22,-2,1,1,0,'US',[]]];
+
+_c = _c + ['HMMWV_TOW_DES_EP1'];
+_i = _i + [['','',1450,20,-2,2,1,0,'US',[]]];
+
+_c = _c + ['HMMWV_Avenger_DES_EP1'];
+_i = _i + [['','',1750,25,-2,3,1,0,'US',[]]];
+
+_c = _c + ['HMMWV_Ambulance_DES_EP1'];
+_i = _i + [['','',725,22,-2,2,1,0,'US',[]]];
+
+_c = _c + ['MTVR_DES_EP1'];
+_i = _i + [['','',400,20,-2,0,1,0,'US',[]]];
+
+_c = _c + ['MtvrSalvage_DES_EP1'];
+_i = _i + [['','',450,21,-2,0,1,0,'US',[]]];
+
+_c = _c + ['MtvrRepair_DES_EP1'];
+_i = _i + [['','',525,22,-2,2,1,0,'US',[]]];
+
+_c = _c + ['MtvrReammo_DES_EP1'];
+_i = _i + [['','',550,22,-2,1,1,0,'US',[]]];
+
+_c = _c + ['MtvrRefuel_DES_EP1'];
+_i = _i + [['','',500,22,-2,1,1,0,'US',[]]];
+
+_c = _c + ['MtvrSupply_DES_EP1'];
+_i = _i + [['','',550,25,-2,0,1,0,'US',[]]];
+
+/* Heavy Vehicles */
+_c = _c + ['M1126_ICV_M2_EP1'];
+_i = _i + [['','',1650,25,[false,true,2,0],0,2,0,'US',[]]];
+
+_c = _c + ['M1126_ICV_mk19_EP1'];
+_i = _i + [['','',1950,25,[false,true,2,0],0,2,0,'US',[]]];
+
+_c = _c + ['M1129_MC_EP1'];
+_i = _i + [['','',2300,25,-2,1,2,0,'US',[]]];
+
+_c = _c + ['M1135_ATGMV_EP1'];
+_i = _i + [['','',1850,25,-2,2,2,0,'US',[]]];
+
+_c = _c + ['M1128_MGS_EP1'];
+_i = _i + [['','',2450,25,-2,2,2,0,'US',[]]];
+
+_c = _c + ['M1133_MEV_EP1'];
+_i = _i + [['','',1950,25,-2,1,2,0,'US',[]]];
+
+_c = _c + ['M2A2_EP1'];
+_i = _i + [['','',4450,30,-2,1,2,0,'US',[]]];
+
+_c = _c + ['M2A3_EP1'];
+_i = _i + [['','',4950,32,-2,2,2,0,'US',[]]];
+
+_c = _c + ['M1A1_US_DES_EP1'];
+_i = _i + [['','',5650,40,-2,2,2,0,'US',[]]];
+
+_c = _c + ['MLRS_DES_EP1'];
+_i = _i + [['','',5800,40,-2,3,2,0,'US',[]]];
+
+_c = _c + ['M1A2_US_TUSK_MG_EP1'];
+_i = _i + [['','',6950,40,-2,3,2,0,'US',[]]];
+
+_c = _c + ['M6_EP1'];
+_i = _i + [['','',8200,35,-2,3,2,0,'US',[]]];
+
+_c = _c + ['M1128_MGS_EP1'];
+_i = _i + [['','',3650,25,2,2,2,0,'US']];
+
+/* Air Vehicles */
+_c = _c + ['MH6J_EP1'];
+_i = _i + [['','',12500,35,-2,0,3,0,'US',[]]];
+
+_c = _c + ['UH60M_EP1'];
+_i = _i + [['','',15000,35,-2,0,3,0,'US',[]]];
+
+_c = _c + ['UH60M_MEV_EP1'];
+_i = _i + [['','',18000,35,-2,0,3,0,'US',[]]];
+
+_c = _c + ['CH_47F_EP1'];
+_i = _i + [['','',20000,40,-2,0,3,0,'US',[]]];
+
+_c = _c + ['C130J_US_EP1'];
+_i = _i + [['','',26500,55,-2,1,3,0,'US',[]]];
+
+_c = _c + ['AH6X_EP1'];
+_i = _i + [['','',35000,50,-2,1,3,0,'US',[]]];
+
+_c = _c + ['AH6J_EP1'];
+_i = _i + [['','',30000,50,-2,1,3,0,'US',[]]];
+
+_c = _c + ['AH64D_EP1'];
+_i = _i + [['','',80000,60,-2,2,3,0,'US',[]]];
+
+_c = _c + ['A10_US_EP1'];
+_i = _i + [['','',100000,65,-2,3,3,0,'US',[]]];
+
+/* Special */
+_c = _c + ['MQ9PredatorB_US_EP1'];
+_i = _i + [['','',30000,35,-2,2,3,0,'US',[]]];
+
+/* Static Defenses */
+_c = _c + ['WarfareBMGNest_M240_US_EP1'];
+_i = _i + [['','',300,0,1,0,'Defense',0,'US',[]]];
+
+_c = _c + ['M2HD_mini_TriPod_US_EP1'];
+_i = _i + [['','',200,0,1,0,'Defense',0,'US',[]]];
+
+_c = _c + ['M2StaticMG_US_EP1'];
+_i = _i + [['','',225,0,1,0,'Defense',0,'US',[]]];
+
+_c = _c + ['SearchLight_US_EP1'];
+_i = _i + [['','',125,0,1,0,'Defense',0,'US',[]]];
+
+_c = _c + ['MK19_TriPod_US_EP1'];
+_i = _i + [['','',700,0,1,0,'Defense',0,'US',[]]];
+
+_c = _c + ['TOW_TriPod_US_EP1'];
+_i = _i + [['','',800,0,1,0,'Defense',0,'US',[]]];
+
+_c = _c + ['Stinger_Pod_US_EP1'];
+_i = _i + [['','',850,0,1,0,'Defense',0,'US',[]]];
+
+_c = _c + ['M252_US_EP1'];
+_i = _i + [['','',1150,0,1,0,'Defense',0,'US',[]]];
+
+_c = _c + ['M119_US_EP1'];
+_i = _i + [['','',2250,0,1,0,'Defense',0,'US',[]]];
+
+/* Defense Structures */
+_c = _c + ['US_WarfareBBarrier5x_EP1'];
+_i = _i + [['','',15,0,0,0,'Fortification',0,'US',[]]];
+
+_c = _c + ['US_WarfareBBarrier10x_EP1'];
+_i = _i + [['','',25,0,0,0,'Fortification',0,'US',[]]];
+
+_c = _c + ['US_WarfareBBarrier10xTall_EP1'];
+_i = _i + [['','',50,0,0,0,'Fortification',0,'US',[]]];
+
+_c = _c + ['Land_CamoNet_NATO_EP1'];
+_i = _i + [['','',35,0,0,0,'Strategic',0,'US',[]]];
+
+_c = _c + ['Land_CamoNetVar_NATO_EP1'];
+_i = _i + [['','',45,0,0,0,'Strategic',0,'US',[]]];
+
+_c = _c + ['Land_CamoNetB_NATO_EP1'];
+_i = _i + [['','',55,0,0,0,'Strategic',0,'US',[]]];
+
+_c = _c + ['USOrdnanceBox_EP1'];
+_i = _i + [['','',850,0,0,0,'Ammo',0,'US',[]]];
+
+_c = _c + ['USVehicleBox_EP1'];
+_i = _i + [['','',1200,0,0,0,'Ammo',0,'US',[]]];
+
+_c = _c + ['USBasicAmmunitionBox_EP1'];
+_i = _i + [['','',1950,0,0,0,'Ammo',0,'US',[]]];
+
+_c = _c + ['USBasicWeapons_EP1'];
+_i = _i + [['','',2975,0,0,0,'Ammo',0,'US',[]]];
+
+_c = _c + ['USLaunchers_EP1'];
+_i = _i + [['','',6250,0,0,0,'Ammo',0,'US',[]]];
+
+_c = _c + ['USSpecialWeapons_EP1'];
+_i = _i + [['','',7200,0,0,0,'Ammo',0,'US',[]]];
+
+for '_z' from 0 to (count _c)-1 do {
+ if (isClass (configFile >> 'CfgVehicles' >> (_c select _z))) then {
+ _get = (_c select _z) Call GetNamespace;
+ if (isNil '_get') then {
+ if ((_i select _z) select 0 == '') then {(_i select _z) set [0, [_c select _z,'displayName'] Call GetConfigInfo]};
+ if (typeName ((_i select _z) select 4) == 'SCALAR') then {
+ if (((_i select _z) select 4) == -2) then {
+ _ret = (_c select _z) Call Compile preprocessFile "Common\Functions\Common_GetConfigVehicleCrewSlot.sqf";
+ (_i select _z) set [4, _ret select 0];
+ (_i select _z) set [9, _ret select 1];
+ };
+ };
+ if (WF_Debug) then {(_i select _z) set [3,1]};
+ _p = if ((_c select _z) isKindOf 'Man') then {'portrait'} else {'picture'};
+ (_i select _z) set [1, [_c select _z,_p] Call GetConfigInfo];
+ [_c select _z,_i select _z] Call SetNamespace;
+ } else {
+ diag_log Format ["[WFBE (INIT)][frameno:%2 | ticktime:%3] Core_US: Duplicated Element found '%1'",(_c select _z),diag_frameno,diag_tickTime];
+ };
+ } else {
+ diag_log Format ["[WFBE (ERROR)][frameno:%2 | ticktime:%3] Core_US: Element '%1' is not a valid class.",(_c select _z),diag_frameno,diag_tickTime];
+ };
+};
+
+diag_log Format ["[WFBE (INIT)][frameno:%2 | ticktime:%3] Core_US: Initialization (%1 Elements) - [Done]",count _c,diag_frameno,diag_tickTime]; \ No newline at end of file
diff --git a/Common/Config/Core/Core_USMC.sqf b/Common/Config/Core/Core_USMC.sqf
new file mode 100644
index 0000000..8009423
--- /dev/null
+++ b/Common/Config/Core/Core_USMC.sqf
@@ -0,0 +1,254 @@
+/* USMC Configuration */
+private ["_c","_get","_i","_p"];
+
+_c = [];
+_i = [];
+
+/* Infantry */
+_c = _c + ['USMC_Soldier'];
+_i = _i + [['','',150,4,-1,0,0,0.83,'USMC',[]]];
+
+_c = _c + ['USMC_Soldier2'];
+_i = _i + [['','',125,4,-1,0,0,0.79,'USMC',[]]];
+
+_c = _c + ['USMC_Soldier_LAT'];
+_i = _i + [['','',225,5,-1,0,0,0.84,'USMC',[]]];
+
+_c = _c + ['USMC_Soldier_AT'];
+_i = _i + [['','',350,5,-1,2,0,0.86,'USMC',[]]];
+
+_c = _c + ['USMC_Soldier_HAT'];
+_i = _i + [['','',800,6,-1,3,0,0.88,'USMC',[]]];
+
+_c = _c + ['USMC_Soldier_AA'];
+_i = _i + [['','',400,6,-1,2,0,0.87,'USMC',[]]];
+
+_c = _c + ['USMC_Soldier_AR'];
+_i = _i + [['','',210,5,-1,1,0,0.84,'USMC',[]]];
+
+_c = _c + ['USMC_Soldier_MG'];
+_i = _i + [['','',220,5,-1,0,0,0.85,'USMC',[]]];
+
+_c = _c + ['USMC_Soldier_GL'];
+_i = _i + [['','',160,5,-1,0,0,0.83,'USMC',[]]];
+
+_c = _c + ['USMC_SoldierS_Sniper'];
+_i = _i + [['','',320,6,-1,2,0,0.88,'USMC',[]]];
+
+_c = _c + ['USMC_SoldierM_Marksman'];
+_i = _i + [['','',350,6,-1,2,0,0.9,'USMC',[]]];
+
+_c = _c + ['USMC_SoldierS_SniperH'];
+_i = _i + [['','',400,6,-1,3,0,0.92,'USMC',[]]];
+
+_c = _c + ['USMC_Soldier_Medic'];
+_i = _i + [['','',190,4,-1,0,0,0.85,'USMC',[]]];
+
+_c = _c + ['USMC_SoldierS_Engineer'];
+_i = _i + [['','',225,5,-1,0,0,0.83,'USMC',[]]];
+
+_c = _c + ['USMC_SoldierS'];
+_i = _i + [['','',300,7,-1,1,0,0.88,'USMC',[]]];
+
+_c = _c + ['USMC_SoldierS_Spotter'];
+_i = _i + [['','',320,6,-1,3,0,0.89,'USMC',[]]];
+
+_c = _c + ['USMC_Soldier_Crew'];
+_i = _i + [['','',120,4,-1,0,0,0.81,'USMC',[]]];
+
+_c = _c + ['USMC_Soldier_Pilot'];
+_i = _i + [['','',120,4,-1,0,0,0.8,'USMC',[]]];
+
+_c = _c + ['USMC_Soldier_TL'];
+_i = _i + [['','',240,5,-1,1,0,0.83,'USMC',[]]];
+
+_c = _c + ['USMC_Soldier_SL'];
+_i = _i + [['','',220,5,-1,2,0,0.92,'USMC',[]]];
+
+/* Light Vehicles */
+_c = _c + ['MMT_USMC'];
+_i = _i + [['','',50,10,-2,0,1,0,'USMC',[]]];
+
+_c = _c + ['M1030'];
+_i = _i + [['','',150,12,-2,0,1,0,'USMC',[]]];
+
+_c = _c + ['HMMWV'];
+_i = _i + [['','',300,15,-2,0,1,0,'USMC',[]]];
+
+_c = _c + ['Zodiac'];
+_i = _i + [['','',225,17,-2,0,1,0,'USMC',[]]];
+
+_c = _c + ['HMMWV_M2'];
+_i = _i + [['','',700,18,-2,0,1,0,'USMC',[]]];
+
+_c = _c + ['HMMWV_Armored'];
+_i = _i + [['','',750,20,-2,1,1,0,'USMC',[]]];
+
+_c = _c + ['HMMWV_MK19'];
+_i = _i + [['','',900,22,-2,1,1,0,'USMC',[]]];
+
+_c = _c + ['HMMWV_TOW'];
+_i = _i + [['','',1450,20,-2,2,1,0,'USMC',[]]];
+
+_c = _c + ['HMMWV_Avenger'];
+_i = _i + [['','',1750,25,-2,3,1,0,'USMC',[]]];
+
+_c = _c + ['HMMWV_Ambulance'];
+_i = _i + [['','',725,22,-2,2,1,0,'USMC',[]]];
+
+_c = _c + ['MTVR'];
+_i = _i + [['','',400,20,-2,0,1,0,'USMC',[]]];
+
+_c = _c + ['WarfareSalvageTruck_USMC'];
+_i = _i + [['','',450,21,-2,0,1,0,'USMC',[]]];
+
+_c = _c + ['MtvrRepair'];
+_i = _i + [['','',525,22,-2,0,1,0,'USMC',[]]];
+
+_c = _c + ['WarfareReammoTruck_USMC'];
+_i = _i + [['','',550,22,-2,1,1,0,'USMC',[]]];
+
+_c = _c + ['MtvrRefuel'];
+_i = _i + [['','',500,22,-2,1,1,0,'USMC',[]]];
+
+_c = _c + ['WarfareSupplyTruck_USMC'];
+_i = _i + [['','',550,25,-2,0,1,0,'USMC',[]]];
+
+_c = _c + ['RHIB'];
+_i = _i + [['','',850,25,-2,1,1,0,'USMC',[]]];
+
+_c = _c + ['RHIB2Turret'];
+_i = _i + [['','',1250,27,-2,2,1,0,'USMC',[]]];
+
+_c = _c + ['LAV25'];
+_i = _i + [['','',1650,27,-2,3,1,0,'USMC',[]]];
+
+/* Heavy Vehicles */
+_c = _c + ['AAV'];
+_i = _i + [['','',2550,25,-2,0,2,0,'USMC',[]]];
+
+_c = _c + ['M1A1'];
+_i = _i + [['','',5650,40,-2,if (WF_A2_Vanilla) then {1} else {2},2,0,'USMC',[]]];
+
+_c = _c + ['MLRS'];
+_i = _i + [['','',5800,40,-2,3,2,0,'USMC',[]]];
+
+_c = _c + ['M1A2_TUSK_MG'];
+_i = _i + [['','',6950,40,-2,if (WF_A2_Vanilla) then {2} else {3},2,0,'USMC',[]]];
+
+/* Air Vehicles */
+_c = _c + ['MH60S'];
+_i = _i + [['','',15000,35,-2,0,3,0,'USMC',[]]];
+
+_c = _c + ['UH1Y'];
+_i = _i + [['','',25000,40,-2,1,3,0,'USMC',[]]];
+
+_c = _c + ['MV22'];
+_i = _i + [['','',25000,43,-2,1,3,0,'USMC',[]]];
+
+_c = _c + ['C130J'];
+_i = _i + [['','',26500,52,-2,1,3,0,'USMC',[]]];
+
+_c = _c + ['AH1Z'];
+_i = _i + [['','',86000,60,-2,2,3,0,'USMC',[]]];
+
+_c = _c + ['AH64D'];
+_i = _i + [['','',80000,60,-2,2,3,0,'USMC',[]]];
+
+_c = _c + ['F35B'];
+_i = _i + [['','',90000,62,-2,3,3,0,'USMC',[]]];
+
+_c = _c + ['AV8B'];
+_i = _i + [['','',95000,65,-2,3,3,0,'USMC',[]]];
+
+_c = _c + ['AV8B2'];
+_i = _i + [['','',130000,65,-2,3,3,0,'USMC',[]]];
+
+_c = _c + ['A10'];
+_i = _i + [['','',100000,70,-2,3,3,0,'USMC',[]]];
+
+/* Special */
+_c = _c + ['MQ9PredatorB'];
+_i = _i + [['','',30000,35,2,2,3,0,'USMC',[]]];
+
+/* Static Defenses */
+_c = _c + ['USMC_WarfareBMGNest_M240'];
+_i = _i + [['','',300,0,1,0,'Defense',0,'USMC',[]]];
+
+_c = _c + ['M2HD_mini_TriPod'];
+_i = _i + [['','',200,0,1,0,'Defense',0,'USMC',[]]];
+
+_c = _c + ['M2StaticMG'];
+_i = _i + [['','',225,0,1,0,'Defense',0,'USMC',[]]];
+
+_c = _c + ['SearchLight'];
+_i = _i + [['','',125,0,1,0,'Defense',0,'USMC',[]]];
+
+_c = _c + ['MK19_TriPod'];
+_i = _i + [['','',700,0,1,0,'Defense',0,'USMC',[]]];
+
+_c = _c + ['TOW_TriPod'];
+_i = _i + [['','',800,0,1,0,'Defense',0,'USMC',[]]];
+
+_c = _c + ['Stinger_Pod'];
+_i = _i + [['','',850,0,1,0,'Defense',0,'USMC',[]]];
+
+_c = _c + ['M252'];
+_i = _i + [['','',1150,0,1,0,'Defense',0,'USMC',[]]];
+
+_c = _c + ['M119'];
+_i = _i + [['','',2250,0,1,0,'Defense',0,'USMC',[]]];
+
+/* Defense Structures */
+_c = _c + ['Land_CamoNet_NATO'];
+_i = _i + [['','',35,0,0,0,'Strategic',0,'USMC',[]]];
+
+_c = _c + ['Land_CamoNetVar_NATO'];
+_i = _i + [['','',45,0,0,0,'Strategic',0,'USMC',[]]];
+
+_c = _c + ['Land_CamoNetB_NATO'];
+_i = _i + [['','',55,0,0,0,'Strategic',0,'USMC',[]]];
+
+_c = _c + ['USOrdnanceBox'];
+_i = _i + [['','',850,0,0,0,'Ammo',0,'USMC',[]]];
+
+_c = _c + ['USVehicleBox'];
+_i = _i + [['','',1200,0,0,0,'Ammo',0,'USMC',[]]];
+
+_c = _c + ['USBasicAmmunitionBox'];
+_i = _i + [['','',1950,0,0,0,'Ammo',0,'USMC',[]]];
+
+_c = _c + ['USBasicWeaponsBox'];
+_i = _i + [['','',2975,0,0,0,'Ammo',0,'USMC',[]]];
+
+_c = _c + ['USLaunchersBox'];
+_i = _i + [['','',6250,0,0,0,'Ammo',0,'USMC',[]]];
+
+_c = _c + ['USSpecialWeaponsBox'];
+_i = _i + [['','',7200,0,0,0,'Ammo',0,'USMC',[]]];
+
+for '_z' from 0 to (count _c)-1 do {
+ if (isClass (configFile >> 'CfgVehicles' >> (_c select _z))) then {
+ _get = (_c select _z) Call GetNamespace;
+ if (isNil '_get') then {
+ if ((_i select _z) select 0 == '') then {(_i select _z) set [0, [_c select _z,'displayName'] Call GetConfigInfo]};
+ if (typeName ((_i select _z) select 4) == 'SCALAR') then {
+ if (((_i select _z) select 4) == -2) then {
+ _ret = (_c select _z) Call Compile preprocessFile "Common\Functions\Common_GetConfigVehicleCrewSlot.sqf";
+ (_i select _z) set [4, _ret select 0];
+ (_i select _z) set [9, _ret select 1];
+ };
+ };
+ if (WF_Debug) then {(_i select _z) set [3,1]};
+ _p = if ((_c select _z) isKindOf 'Man') then {'portrait'} else {'picture'};
+ (_i select _z) set [1, [_c select _z,_p] Call GetConfigInfo];
+ [_c select _z,_i select _z] Call SetNamespace;
+ } else {
+ diag_log Format ["[WFBE (INIT)][frameno:%2 | ticktime:%3] Core_USMC: Duplicated Element found '%1'",(_c select _z),diag_frameno,diag_tickTime];
+ };
+ } else {
+ diag_log Format ["[WFBE (ERROR)][frameno:%2 | ticktime:%3] Core_USMC: Element '%1' is not a valid class.",(_c select _z),diag_frameno,diag_tickTime];
+ };
+};
+
+diag_log Format ["[WFBE (INIT)][frameno:%2 | ticktime:%3] Core_USMC: Initialization (%1 Elements) - [Done]",count _c,diag_frameno,diag_tickTime]; \ No newline at end of file
diff --git a/Common/Config/Core_Artillery/Arrowhead/Artillery_TKA.sqf b/Common/Config/Core_Artillery/Arrowhead/Artillery_TKA.sqf
new file mode 100644
index 0000000..430c73c
--- /dev/null
+++ b/Common/Config/Core_Artillery/Arrowhead/Artillery_TKA.sqf
@@ -0,0 +1,43 @@
+Private ["_maxRange"];
+_maxRange = 'WFBE_ARTILLERYMAXRANGE' Call GetNamespace;
+
+['WFBE_EAST_ARTILLERY_DESC',['D30','2B14','GRAD'],true] Call SetNamespace;
+['WFBE_EAST_ARTILLERY_NAMES',
+ [
+ ['D30_TK_EP1'],
+ ['2b14_82mm_TK_EP1'],
+ ['GRAD_TK_EP1']
+ ]
+,true] Call SetNamespace;
+['WFBE_EAST_ARTILLERY_WEAPONS',['D30','2B14','GRAD'],true] Call SetNamespace;
+['WFBE_EAST_ARTILLERY_AMMOS',
+ [
+ ['Sh_122_HE','Sh_122_WP','Sh_122_SADARM','Sh_122_LASER','Sh_122_SMOKE','Sh_122_ILLUM'],
+ ['Sh_82_HE','Sh_82_WP','Sh_82_ILLUM'],
+ ['R_GRAD']
+ ]
+,true] Call SetNamespace;
+['WFBE_EAST_ARTILLERY_EXTENDED_MAGS',
+ [
+ ['30Rnd_122mmWP_D30','30Rnd_122mmSADARM_D30','30Rnd_122mmLASER_D30','30Rnd_122mmSMOKE_D30','30Rnd_122mmILLUM_D30'],
+ ['8Rnd_82mmWP_2B14','8Rnd_82mmILLUM_2B14'],
+ []
+ ]
+,true] Call SetNamespace;
+['WFBE_EAST_ARTILLERY_EXTENDED_MAGS_UPGRD',
+ [
+ [2,3,3,1,1],
+ [2,1],
+ []
+ ]
+,true] Call SetNamespace;
+['WFBE_EAST_ARTILLERY_MINRANGES',[1000,500,800],true] Call SetNamespace;
+['WFBE_EAST_ARTILLERY_MAXRANGES',[2333*_maxRange,1833*_maxRange,3000*_maxRange],true] Call SetNamespace;
+['WFBE_EAST_ARTILLERY_RELOADTIME',[7,4,2],true] Call SetNamespace;
+['WFBE_EAST_ARTILLERY_BURST',[10,4,10],true] Call SetNamespace;
+['WFBE_EAST_ARTILLERY_VELOCITIES',[500,475,550],true] Call SetNamespace;
+['WFBE_EAST_ARTILLERY_DISPERSIONS',[50,60,40],true] Call SetNamespace;
+['WFBE_EAST_ARTILLERY_AMMO_LASER',['Sh_122_LASER'],true] Call SetNamespace;
+['WFBE_EAST_ARTILLERY_AMMO_SADARM',['Sh_122_SADARM'],true] Call SetNamespace;
+['WFBE_EAST_ARTILLERY_AMMO_ILLUMN',['Sh_122_ILLUM'],true] Call SetNamespace;
+['WFBE_EAST_ARTILLERY_DEPLOY_SMOKE',['Sh_122_WP','Sh_122_SMOKE'],true] Call SetNamespace; \ No newline at end of file
diff --git a/Common/Config/Core_Artillery/Arrowhead/Artillery_US.sqf b/Common/Config/Core_Artillery/Arrowhead/Artillery_US.sqf
new file mode 100644
index 0000000..6543534
--- /dev/null
+++ b/Common/Config/Core_Artillery/Arrowhead/Artillery_US.sqf
@@ -0,0 +1,47 @@
+Private ["_maxRange"];
+_maxRange = 'WFBE_ARTILLERYMAXRANGE' Call GetNamespace;
+
+['WFBE_WEST_ARTILLERY_DESC',['M119','M252','MLRS','Stryker MC'],true] Call SetNamespace;
+['WFBE_WEST_ARTILLERY_NAMES',
+ [
+ ['M119_US_EP1'],
+ ['M252_US_EP1'],
+ ['MLRS_DES_EP1'],
+ ['M1129_MC_EP1']
+ ]
+,true] Call SetNamespace;
+['WFBE_WEST_ARTILLERY_WEAPONS',['M119','M252','MLRS','M120'],true] Call SetNamespace;
+['WFBE_WEST_ARTILLERY_AMMOS',
+ [
+ ['Sh_105_HE','Sh_105_WP','Sh_105_SADARM','Sh_105_LASER','Sh_105_SMOKE','Sh_105_ILLUM'],
+ ['Sh_81_HE','Sh_81_WP','Sh_81_ILLUM'],
+ ['R_MLRS'],
+ ['120mmHE_M120']
+ ]
+,true] Call SetNamespace;
+['WFBE_WEST_ARTILLERY_EXTENDED_MAGS',
+ [
+ ['30Rnd_105mmWP_M119','30Rnd_105mmSADARM_M119','30Rnd_105mmLASER_M119','30Rnd_105mmSMOKE_M119','30Rnd_105mmILLUM_M119'],
+ ['8Rnd_81mmWP_M252','8Rnd_81mmILLUM_M252'],
+ [],
+ []
+ ]
+,true] Call SetNamespace;
+['WFBE_WEST_ARTILLERY_EXTENDED_MAGS_UPGRD',
+ [
+ [2,3,3,1,1],
+ [2,1],
+ [],
+ []
+ ]
+,true] Call SetNamespace;
+['WFBE_WEST_ARTILLERY_MINRANGES',[1000,500,1200,550],true] Call SetNamespace;
+['WFBE_WEST_ARTILLERY_MAXRANGES',[2333*_maxRange,1833*_maxRange,3000*_maxRange,2150*_maxRange],true] Call SetNamespace;
+['WFBE_WEST_ARTILLERY_RELOADTIME',[7,4,2,4],true] Call SetNamespace;
+['WFBE_WEST_ARTILLERY_BURST',[10,4,6,6],true] Call SetNamespace;
+['WFBE_WEST_ARTILLERY_VELOCITIES',[500,475,550,475],true] Call SetNamespace;
+['WFBE_WEST_ARTILLERY_DISPERSIONS',[50,60,40,55],true] Call SetNamespace;
+['WFBE_WEST_ARTILLERY_AMMO_LASER',['Sh_105_LASER'],true] Call SetNamespace;
+['WFBE_WEST_ARTILLERY_AMMO_SADARM',['Sh_105_SADARM'],true] Call SetNamespace;
+['WFBE_WEST_ARTILLERY_AMMO_ILLUMN',['Sh_105_ILLUM'],true] Call SetNamespace;
+['WFBE_WEST_ARTILLERY_DEPLOY_SMOKE',['Sh_105_WP','Sh_105_SMOKE'],true] Call SetNamespace; \ No newline at end of file
diff --git a/Common/Config/Core_Artillery/CombinedOps/Artillery_RU.sqf b/Common/Config/Core_Artillery/CombinedOps/Artillery_RU.sqf
new file mode 100644
index 0000000..d23a09e
--- /dev/null
+++ b/Common/Config/Core_Artillery/CombinedOps/Artillery_RU.sqf
@@ -0,0 +1,43 @@
+Private ["_maxRange"];
+_maxRange = 'WFBE_ARTILLERYMAXRANGE' Call GetNamespace;
+
+['WFBE_EAST_ARTILLERY_DESC',['D30','2B14','GRAD'],true] Call SetNamespace;
+['WFBE_EAST_ARTILLERY_NAMES',
+ [
+ ['D30_TK_EP1','D30_RU'],
+ ['2b14_82mm_TK_EP1','2b14_82mm'],
+ ['GRAD_RU','GRAD_TK_EP1']
+ ]
+,true] Call SetNamespace;
+['WFBE_EAST_ARTILLERY_WEAPONS',['D30','2B14','GRAD'],true] Call SetNamespace;
+['WFBE_EAST_ARTILLERY_AMMOS',
+ [
+ ['Sh_122_HE','Sh_122_WP','Sh_122_SADARM','Sh_122_LASER','Sh_122_SMOKE','Sh_122_ILLUM'],
+ ['Sh_82_HE','Sh_82_WP','Sh_82_ILLUM'],
+ ['R_GRAD']
+ ]
+,true] Call SetNamespace;
+['WFBE_EAST_ARTILLERY_EXTENDED_MAGS',
+ [
+ ['30Rnd_122mmWP_D30','30Rnd_122mmSADARM_D30','30Rnd_122mmLASER_D30','30Rnd_122mmSMOKE_D30','30Rnd_122mmILLUM_D30'],
+ ['8Rnd_82mmWP_2B14','8Rnd_82mmILLUM_2B14'],
+ []
+ ]
+,true] Call SetNamespace;
+['WFBE_EAST_ARTILLERY_EXTENDED_MAGS_UPGRD',
+ [
+ [2,3,3,1,1],
+ [2,1],
+ []
+ ]
+,true] Call SetNamespace;
+['WFBE_EAST_ARTILLERY_MINRANGES',[1000,500,800],true] Call SetNamespace;
+['WFBE_EAST_ARTILLERY_MAXRANGES',[2333*_maxRange,1833*_maxRange,3000*_maxRange],true] Call SetNamespace;
+['WFBE_EAST_ARTILLERY_RELOADTIME',[7,4,2],true] Call SetNamespace;
+['WFBE_EAST_ARTILLERY_BURST',[10,4,10],true] Call SetNamespace;
+['WFBE_EAST_ARTILLERY_VELOCITIES',[500,475,550],true] Call SetNamespace;
+['WFBE_EAST_ARTILLERY_DISPERSIONS',[50,60,40],true] Call SetNamespace;
+['WFBE_EAST_ARTILLERY_AMMO_LASER',['Sh_122_LASER'],true] Call SetNamespace;
+['WFBE_EAST_ARTILLERY_AMMO_SADARM',['Sh_122_SADARM'],true] Call SetNamespace;
+['WFBE_EAST_ARTILLERY_AMMO_ILLUMN',['Sh_122_ILLUM'],true] Call SetNamespace;
+['WFBE_EAST_ARTILLERY_DEPLOY_SMOKE',['Sh_122_WP','Sh_122_SMOKE'],true] Call SetNamespace; \ No newline at end of file
diff --git a/Common/Config/Core_Artillery/CombinedOps/Artillery_US.sqf b/Common/Config/Core_Artillery/CombinedOps/Artillery_US.sqf
new file mode 100644
index 0000000..f3bab35
--- /dev/null
+++ b/Common/Config/Core_Artillery/CombinedOps/Artillery_US.sqf
@@ -0,0 +1,47 @@
+Private ["_maxRange"];
+_maxRange = 'WFBE_ARTILLERYMAXRANGE' Call GetNamespace;
+
+['WFBE_WEST_ARTILLERY_DESC',['M119','M252','MLRS','Stryker MC'],true] Call SetNamespace;
+['WFBE_WEST_ARTILLERY_NAMES',
+ [
+ ['M119_US_EP1','M119'],
+ ['M252_US_EP1','M252'],
+ ['MLRS','MLRS_DES_EP1'],
+ ['M1129_MC_EP1']
+ ]
+,true] Call SetNamespace;
+['WFBE_WEST_ARTILLERY_WEAPONS',['M119','M252','MLRS','M120'],true] Call SetNamespace;
+['WFBE_WEST_ARTILLERY_AMMOS',
+ [
+ ['Sh_105_HE','Sh_105_WP','Sh_105_SADARM','Sh_105_LASER','Sh_105_SMOKE','Sh_105_ILLUM'],
+ ['Sh_81_HE','Sh_81_WP','Sh_81_ILLUM'],
+ ['R_MLRS'],
+ ['120mmHE_M120']
+ ]
+,true] Call SetNamespace;
+['WFBE_WEST_ARTILLERY_EXTENDED_MAGS',
+ [
+ ['30Rnd_105mmWP_M119','30Rnd_105mmSADARM_M119','30Rnd_105mmLASER_M119','30Rnd_105mmSMOKE_M119','30Rnd_105mmILLUM_M119'],
+ ['8Rnd_81mmWP_M252','8Rnd_81mmILLUM_M252'],
+ [],
+ []
+ ]
+,true] Call SetNamespace;
+['WFBE_WEST_ARTILLERY_EXTENDED_MAGS_UPGRD',
+ [
+ [2,3,3,1,1],
+ [2,1],
+ [],
+ []
+ ]
+,true] Call SetNamespace;
+['WFBE_WEST_ARTILLERY_MINRANGES',[1000,500,1200,550],true] Call SetNamespace;
+['WFBE_WEST_ARTILLERY_MAXRANGES',[2333*_maxRange,1833*_maxRange,3000*_maxRange,2150*_maxRange],true] Call SetNamespace;
+['WFBE_WEST_ARTILLERY_RELOADTIME',[7,4,2,4],true] Call SetNamespace;
+['WFBE_WEST_ARTILLERY_BURST',[10,4,6,6],true] Call SetNamespace;
+['WFBE_WEST_ARTILLERY_VELOCITIES',[500,475,550,475],true] Call SetNamespace;
+['WFBE_WEST_ARTILLERY_DISPERSIONS',[50,60,40,55],true] Call SetNamespace;
+['WFBE_WEST_ARTILLERY_AMMO_LASER',['Sh_105_LASER'],true] Call SetNamespace;
+['WFBE_WEST_ARTILLERY_AMMO_SADARM',['Sh_105_SADARM'],true] Call SetNamespace;
+['WFBE_WEST_ARTILLERY_AMMO_ILLUMN',['Sh_105_ILLUM'],true] Call SetNamespace;
+['WFBE_WEST_ARTILLERY_DEPLOY_SMOKE',['Sh_105_WP','Sh_105_SMOKE'],true] Call SetNamespace; \ No newline at end of file
diff --git a/Common/Config/Core_Artillery/Vanilla/Artillery_CDF.sqf b/Common/Config/Core_Artillery/Vanilla/Artillery_CDF.sqf
new file mode 100644
index 0000000..67d3390
--- /dev/null
+++ b/Common/Config/Core_Artillery/Vanilla/Artillery_CDF.sqf
@@ -0,0 +1,43 @@
+Private ["_maxRange"];
+_maxRange = 'WFBE_ARTILLERYMAXRANGE' Call GetNamespace;
+
+['WFBE_WEST_ARTILLERY_DESC',['D30','2B14','GRAD'],true] Call SetNamespace;
+['WFBE_WEST_ARTILLERY_NAMES',
+ [
+ ['D30_CDF'],
+ ['2b14_82mm_CDF'],
+ ['GRAD_CDF']
+ ]
+,true] Call SetNamespace;
+['WFBE_WEST_ARTILLERY_WEAPONS',['D30','2B14','GRAD'],true] Call SetNamespace;
+['WFBE_WEST_ARTILLERY_AMMOS',
+ [
+ ['ARTY_Sh_122_HE','Sh_122_HE','ARTY_Sh_122_WP','ARTY_Sh_122_SADARM','ARTY_Sh_122_LASER','ARTY_Sh_122_SMOKE','ARTY_Sh_122_ILLUM'],
+ ['ARTY_Sh_82_HE','Sh_82_HE','ARTY_Sh_82_WP','ARTY_Sh_82_ILLUM'],
+ ['ARTY_R_227mm_HE_Rocket','R_GRAD']
+ ]
+,true] Call SetNamespace;
+['WFBE_WEST_ARTILLERY_EXTENDED_MAGS',
+ [
+ ['ARTY_30Rnd_122mmWP_D30','ARTY_30Rnd_122mmSADARM_D30','ARTY_30Rnd_122mmLASER_D30','ARTY_30Rnd_122mmSMOKE_D30','ARTY_30Rnd_122mmILLUM_D30'],
+ ['ARTY_8Rnd_82mmWP_2B14','ARTY_8Rnd_82mmILLUM_2B14'],
+ []
+ ]
+,true] Call SetNamespace;
+['WFBE_WEST_ARTILLERY_EXTENDED_MAGS_UPGRD',
+ [
+ [2,3,3,1,1],
+ [2,1],
+ []
+ ]
+,true] Call SetNamespace;
+['WFBE_WEST_ARTILLERY_MINRANGES',[1000,500,800],true] Call SetNamespace;
+['WFBE_WEST_ARTILLERY_MAXRANGES',[2333*_maxRange,1833*_maxRange,3000*_maxRange],true] Call SetNamespace;
+['WFBE_WEST_ARTILLERY_RELOADTIME',[7,4,2],true] Call SetNamespace;
+['WFBE_WEST_ARTILLERY_BURST',[10,4,10],true] Call SetNamespace;
+['WFBE_WEST_ARTILLERY_VELOCITIES',[500,475,550],true] Call SetNamespace;
+['WFBE_WEST_ARTILLERY_DISPERSIONS',[50,60,40],true] Call SetNamespace;
+['WFBE_EAST_ARTILLERY_AMMO_LASER',['ARTY_Sh_122_LASER'],true] Call SetNamespace;
+['WFBE_EAST_ARTILLERY_AMMO_SADARM',['ARTY_Sh_122_SADARM'],true] Call SetNamespace;
+['WFBE_EAST_ARTILLERY_AMMO_ILLUMN',['ARTY_Sh_122_ILLUM'],true] Call SetNamespace;
+['WFBE_EAST_ARTILLERY_DEPLOY_SMOKE',['ARTY_Sh_122_WP','ARTY_Sh_122_SMOKE'],true] Call SetNamespace; \ No newline at end of file
diff --git a/Common/Config/Core_Artillery/Vanilla/Artillery_INS.sqf b/Common/Config/Core_Artillery/Vanilla/Artillery_INS.sqf
new file mode 100644
index 0000000..0e20921
--- /dev/null
+++ b/Common/Config/Core_Artillery/Vanilla/Artillery_INS.sqf
@@ -0,0 +1,43 @@
+Private ["_maxRange"];
+_maxRange = 'WFBE_ARTILLERYMAXRANGE' Call GetNamespace;
+
+['WFBE_EAST_ARTILLERY_DESC',['D30','2B14','GRAD'],true] Call SetNamespace;
+['WFBE_EAST_ARTILLERY_NAMES',
+ [
+ ['D30_Ins'],
+ ['2b14_82mm_INS'],
+ ['GRAD_INS']
+ ]
+,true] Call SetNamespace;
+['WFBE_EAST_ARTILLERY_WEAPONS',['D30','2B14','GRAD'],true] Call SetNamespace;
+['WFBE_EAST_ARTILLERY_AMMOS',
+ [
+ ['ARTY_Sh_122_HE','Sh_122_HE','ARTY_Sh_122_WP','ARTY_Sh_122_SADARM','ARTY_Sh_122_LASER','ARTY_Sh_122_SMOKE','ARTY_Sh_122_ILLUM'],
+ ['ARTY_Sh_82_HE','Sh_82_HE','ARTY_Sh_82_WP','ARTY_Sh_82_ILLUM'],
+ ['ARTY_R_227mm_HE_Rocket','R_GRAD']
+ ]
+,true] Call SetNamespace;
+['WFBE_EAST_ARTILLERY_EXTENDED_MAGS',
+ [
+ ['ARTY_30Rnd_122mmWP_D30','ARTY_30Rnd_122mmSADARM_D30','ARTY_30Rnd_122mmLASER_D30','ARTY_30Rnd_122mmSMOKE_D30','ARTY_30Rnd_122mmILLUM_D30'],
+ ['ARTY_8Rnd_82mmWP_2B14','ARTY_8Rnd_82mmILLUM_2B14'],
+ []
+ ]
+,true] Call SetNamespace;
+['WFBE_EAST_ARTILLERY_EXTENDED_MAGS_UPGRD',
+ [
+ [2,3,3,1,1],
+ [2,1],
+ []
+ ]
+,true] Call SetNamespace;
+['WFBE_EAST_ARTILLERY_MINRANGES',[1000,500,800],true] Call SetNamespace;
+['WFBE_EAST_ARTILLERY_MAXRANGES',[2333*_maxRange,1833*_maxRange,3000*_maxRange],true] Call SetNamespace;
+['WFBE_EAST_ARTILLERY_RELOADTIME',[7,4,2],true] Call SetNamespace;
+['WFBE_EAST_ARTILLERY_BURST',[10,4,10],true] Call SetNamespace;
+['WFBE_EAST_ARTILLERY_VELOCITIES',[500,475,550],true] Call SetNamespace;
+['WFBE_EAST_ARTILLERY_DISPERSIONS',[50,60,40],true] Call SetNamespace;
+['WFBE_EAST_ARTILLERY_AMMO_LASER',['ARTY_Sh_122_LASER'],true] Call SetNamespace;
+['WFBE_EAST_ARTILLERY_AMMO_SADARM',['ARTY_Sh_122_SADARM'],true] Call SetNamespace;
+['WFBE_EAST_ARTILLERY_AMMO_ILLUMN',['ARTY_Sh_122_ILLUM'],true] Call SetNamespace;
+['WFBE_EAST_ARTILLERY_DEPLOY_SMOKE',['ARTY_Sh_122_WP','ARTY_Sh_122_SMOKE'],true] Call SetNamespace; \ No newline at end of file
diff --git a/Common/Config/Core_Artillery/Vanilla/Artillery_RU.sqf b/Common/Config/Core_Artillery/Vanilla/Artillery_RU.sqf
new file mode 100644
index 0000000..c58738d
--- /dev/null
+++ b/Common/Config/Core_Artillery/Vanilla/Artillery_RU.sqf
@@ -0,0 +1,43 @@
+Private ["_maxRange"];
+_maxRange = 'WFBE_ARTILLERYMAXRANGE' Call GetNamespace;
+
+['WFBE_EAST_ARTILLERY_DESC',['D30','2B14','GRAD'],true] Call SetNamespace;
+['WFBE_EAST_ARTILLERY_NAMES',
+ [
+ ['D30_RU'],
+ ['2b14_82mm'],
+ ['GRAD_RU']
+ ]
+,true] Call SetNamespace;
+['WFBE_EAST_ARTILLERY_WEAPONS',['D30','2B14','GRAD'],true] Call SetNamespace;
+['WFBE_EAST_ARTILLERY_AMMOS',
+ [
+ ['ARTY_Sh_122_HE','Sh_122_HE','ARTY_Sh_122_WP','ARTY_Sh_122_SADARM','ARTY_Sh_122_LASER','ARTY_Sh_122_SMOKE','ARTY_Sh_122_ILLUM'],
+ ['ARTY_Sh_82_HE','Sh_82_HE','ARTY_Sh_82_WP','ARTY_Sh_82_ILLUM'],
+ ['ARTY_R_227mm_HE_Rocket','R_GRAD']
+ ]
+,true] Call SetNamespace;
+['WFBE_EAST_ARTILLERY_EXTENDED_MAGS',
+ [
+ ['ARTY_30Rnd_122mmWP_D30','ARTY_30Rnd_122mmSADARM_D30','ARTY_30Rnd_122mmLASER_D30','ARTY_30Rnd_122mmSMOKE_D30','ARTY_30Rnd_122mmILLUM_D30'],
+ ['ARTY_8Rnd_82mmWP_2B14','ARTY_8Rnd_82mmILLUM_2B14'],
+ []
+ ]
+,true] Call SetNamespace;
+['WFBE_EAST_ARTILLERY_EXTENDED_MAGS_UPGRD',
+ [
+ [2,3,3,1,1],
+ [2,1],
+ []
+ ]
+,true] Call SetNamespace;
+['WFBE_EAST_ARTILLERY_MINRANGES',[1000,500,800],true] Call SetNamespace;
+['WFBE_EAST_ARTILLERY_MAXRANGES',[2333*_maxRange,1833*_maxRange,3000*_maxRange],true] Call SetNamespace;
+['WFBE_EAST_ARTILLERY_RELOADTIME',[7,4,2],true] Call SetNamespace;
+['WFBE_EAST_ARTILLERY_BURST',[10,4,10],true] Call SetNamespace;
+['WFBE_EAST_ARTILLERY_VELOCITIES',[500,475,550],true] Call SetNamespace;
+['WFBE_EAST_ARTILLERY_DISPERSIONS',[50,60,40],true] Call SetNamespace;
+['WFBE_EAST_ARTILLERY_AMMO_LASER',['ARTY_Sh_122_LASER'],true] Call SetNamespace;
+['WFBE_EAST_ARTILLERY_AMMO_SADARM',['ARTY_Sh_122_SADARM'],true] Call SetNamespace;
+['WFBE_EAST_ARTILLERY_AMMO_ILLUMN',['ARTY_Sh_122_ILLUM'],true] Call SetNamespace;
+['WFBE_EAST_ARTILLERY_DEPLOY_SMOKE',['ARTY_Sh_122_WP','ARTY_Sh_122_SMOKE'],true] Call SetNamespace; \ No newline at end of file
diff --git a/Common/Config/Core_Artillery/Vanilla/Artillery_USMC.sqf b/Common/Config/Core_Artillery/Vanilla/Artillery_USMC.sqf
new file mode 100644
index 0000000..f5830d0
--- /dev/null
+++ b/Common/Config/Core_Artillery/Vanilla/Artillery_USMC.sqf
@@ -0,0 +1,59 @@
+Private ["_maxRange"];
+_maxRange = 'WFBE_ARTILLERYMAXRANGE' Call GetNamespace;
+
+//--- Label shown in the GUI.
+['WFBE_WEST_ARTILLERY_DESC',['M119','M252','MLRS'],true] Call SetNamespace;
+//--- Class name of the Artillery unit.
+['WFBE_WEST_ARTILLERY_NAMES',
+ [
+ ['M119'],
+ ['M252'],
+ ['MLRS']
+ ]
+,true] Call SetNamespace;
+//--- Artillery Weapon used to fire the shells.
+['WFBE_WEST_ARTILLERY_WEAPONS',['M119','M252','MLRS'],true] Call SetNamespace;
+//--- Compatible ammo.
+['WFBE_WEST_ARTILLERY_AMMOS',
+ [
+ ['ARTY_Sh_105_HE','Sh_105_HE','ARTY_Sh_105_WP','ARTY_Sh_105_SADARM','ARTY_Sh_105_LASER','ARTY_Sh_105_SMOKE','ARTY_Sh_105_ILLUM'],
+ ['ARTY_Sh_81_HE','Sh_81_HE','ARTY_Sh_81_WP','ARTY_Sh_81_ILLUM'],
+ ['ARTY_R_227mm_HE_Rocket','R_MLRS']
+ ]
+,true] Call SetNamespace;
+//--- Extended ammo.
+['WFBE_WEST_ARTILLERY_EXTENDED_MAGS',
+ [
+ ['ARTY_30Rnd_105mmWP_M119','ARTY_30Rnd_105mmSADARM_M119','ARTY_30Rnd_105mmLASER_M119','ARTY_30Rnd_105mmSMOKE_M119','ARTY_30Rnd_105mmILLUM_M119'],
+ ['ARTY_8Rnd_81mmWP_M252','ARTY_8Rnd_81mmILLUM_M252'],
+ []
+ ]
+,true] Call SetNamespace;
+//--- Upgrade level required for the extended ammo.
+['WFBE_WEST_ARTILLERY_EXTENDED_MAGS_UPGRD',
+ [
+ [2,3,3,1,1],
+ [2,1],
+ []
+ ]
+,true] Call SetNamespace;
+//--- Artillery Minimal fire distance.
+['WFBE_WEST_ARTILLERY_MINRANGES',[1000,500,1200],true] Call SetNamespace;
+//--- Artillery Maximal fire distance multiplied by the artillery range parameter.
+['WFBE_WEST_ARTILLERY_MAXRANGES',[2333*_maxRange,1833*_maxRange,3000*_maxRange],true] Call SetNamespace;
+//--- Artillery Reload time between each shot.
+['WFBE_WEST_ARTILLERY_RELOADTIME',[7,4,2],true] Call SetNamespace;
+//--- Amount of shells fired during a fire mission.
+['WFBE_WEST_ARTILLERY_BURST',[10,4,6],true] Call SetNamespace;
+//--- Velocity of the shell (note: try to keep it above 400 for a realistic result).
+['WFBE_WEST_ARTILLERY_VELOCITIES',[500,475,550],true] Call SetNamespace;
+//--- Shell land dispersion.
+['WFBE_WEST_ARTILLERY_DISPERSIONS',[50,60,40],true] Call SetNamespace;
+//--- Laser Guided Ammunitions.
+['WFBE_WEST_ARTILLERY_AMMO_LASER',['ARTY_Sh_105_LASER'],true] Call SetNamespace;
+//--- Search And Destroy Armor ammunition.
+['WFBE_WEST_ARTILLERY_AMMO_SADARM',['ARTY_Sh_105_SADARM'],true] Call SetNamespace;
+//--- Illum rounds.
+['WFBE_WEST_ARTILLERY_AMMO_ILLUMN',['ARTY_Sh_105_ILLUM'],true] Call SetNamespace;
+//--- Deploy smoke on impact if it's this type.
+['WFBE_WEST_ARTILLERY_DEPLOY_SMOKE',['ARTY_Sh_105_WP','ARTY_Sh_105_SMOKE'],true] Call SetNamespace; \ No newline at end of file
diff --git a/Common/Config/Core_Definition/Arrowhead/Definition_US_TKA.sqf b/Common/Config/Core_Definition/Arrowhead/Definition_US_TKA.sqf
new file mode 100644
index 0000000..0fab77d
--- /dev/null
+++ b/Common/Config/Core_Definition/Arrowhead/Definition_US_TKA.sqf
@@ -0,0 +1,27 @@
+/* Arrowhead - US versus Takistan Army */
+
+/* Units Core */
+WFBE_V_West_UnitsRootVersion = 'Arrowhead';
+WFBE_V_West_Faction = 'US';
+WFBE_V_East_UnitsRootVersion = 'Arrowhead';
+WFBE_V_East_Faction = 'TKA';
+/* Loadout Core */
+WFBE_V_West_LoadoutRootVersion = 'Arrowhead';
+WFBE_V_West_Loadout = 'US';
+WFBE_V_East_LoadoutRootVersion = 'Arrowhead';
+WFBE_V_East_Loadout = 'TKA';
+/* Squads Core */
+WFBE_V_West_SquadsRootVersion = 'Arrowhead';
+WFBE_V_West_SquadsFaction = 'US';
+WFBE_V_East_SquadsRootVersion = 'Arrowhead';
+WFBE_V_East_SquadsFaction = 'TKA';
+/* Structures Core */
+WFBE_V_West_StructuresRootVersion = 'Arrowhead';
+WFBE_V_West_StructuresFaction = 'US';
+WFBE_V_East_StructuresRootVersion = 'Arrowhead';
+WFBE_V_East_StructuresFaction = 'TKA';
+/* Artillery Core */
+WFBE_V_West_ArtilleryRootVersion = 'Arrowhead';
+WFBE_V_West_ArtilleryFaction = 'US';
+WFBE_V_East_ArtilleryRootVersion = 'Arrowhead';
+WFBE_V_East_ArtilleryFaction = 'TKA'; \ No newline at end of file
diff --git a/Common/Config/Core_Definition/CombinedOps/Definition_US_INS.sqf b/Common/Config/Core_Definition/CombinedOps/Definition_US_INS.sqf
new file mode 100644
index 0000000..d5cc3e5
--- /dev/null
+++ b/Common/Config/Core_Definition/CombinedOps/Definition_US_INS.sqf
@@ -0,0 +1,32 @@
+/* Arrowhead - US versus Insurgents */
+
+/* Units Core */
+WFBE_V_West_UnitsRootVersion = 'CombinedOps';
+WFBE_V_West_Faction = 'US';
+WFBE_V_East_UnitsRootVersion = 'Vanilla';
+WFBE_V_East_Faction = 'INS';
+/* Loadout Core */
+WFBE_V_West_LoadoutRootVersion = 'CombinedOps';
+WFBE_V_West_Loadout = 'US';
+WFBE_V_East_LoadoutRootVersion = 'Vanilla';
+WFBE_V_East_Loadout = 'INS';
+/* Squads Core */
+if (WF_Camo) then {
+ WFBE_V_West_SquadsRootVersion = 'CombinedOps';
+ WFBE_V_West_SquadsFaction = 'US_Camo';
+} else {
+ WFBE_V_West_SquadsRootVersion = 'Arrowhead';
+ WFBE_V_West_SquadsFaction = 'US';
+};
+WFBE_V_East_SquadsRootVersion = 'Vanilla';
+WFBE_V_East_SquadsFaction = 'INS';
+/* Structures Core */
+WFBE_V_West_StructuresRootVersion = 'CombinedOps';
+WFBE_V_West_StructuresFaction = 'US';
+WFBE_V_East_StructuresRootVersion = 'Vanilla';
+WFBE_V_East_StructuresFaction = 'INS';
+/* Artillery Core */
+WFBE_V_West_ArtilleryRootVersion = 'CombinedOps';
+WFBE_V_West_ArtilleryFaction = 'US';
+WFBE_V_East_ArtilleryRootVersion = 'Vanilla';
+WFBE_V_East_ArtilleryFaction = 'INS'; \ No newline at end of file
diff --git a/Common/Config/Core_Definition/CombinedOps/Definition_US_RU.sqf b/Common/Config/Core_Definition/CombinedOps/Definition_US_RU.sqf
new file mode 100644
index 0000000..a900b46
--- /dev/null
+++ b/Common/Config/Core_Definition/CombinedOps/Definition_US_RU.sqf
@@ -0,0 +1,32 @@
+/* Arrowhead - US versus Russians */
+
+/* Units Core */
+WFBE_V_West_UnitsRootVersion = 'CombinedOps';
+WFBE_V_West_Faction = 'US';
+WFBE_V_East_UnitsRootVersion = 'CombinedOps';
+WFBE_V_East_Faction = 'RU';
+/* Loadout Core */
+WFBE_V_West_LoadoutRootVersion = 'CombinedOps';
+WFBE_V_West_Loadout = 'US';
+WFBE_V_East_LoadoutRootVersion = 'CombinedOps';
+WFBE_V_East_Loadout = 'RU';
+/* Squads Core */
+if (WF_Camo) then {
+ WFBE_V_West_SquadsRootVersion = 'CombinedOps';
+ WFBE_V_West_SquadsFaction = 'US_Camo';
+} else {
+ WFBE_V_West_SquadsRootVersion = 'Arrowhead';
+ WFBE_V_West_SquadsFaction = 'US';
+};
+WFBE_V_East_SquadsRootVersion = 'Vanilla';
+WFBE_V_East_SquadsFaction = 'RU';
+/* Structures Core */
+WFBE_V_West_StructuresRootVersion = 'CombinedOps';
+WFBE_V_West_StructuresFaction = 'US';
+WFBE_V_East_StructuresRootVersion = 'CombinedOps';
+WFBE_V_East_StructuresFaction = 'TKA';
+/* Artillery Core */
+WFBE_V_West_ArtilleryRootVersion = 'CombinedOps';
+WFBE_V_West_ArtilleryFaction = 'US';
+WFBE_V_East_ArtilleryRootVersion = 'CombinedOps';
+WFBE_V_East_ArtilleryFaction = 'RU'; \ No newline at end of file
diff --git a/Common/Config/Core_Definition/Vanilla/Definition_CDF_INS.sqf b/Common/Config/Core_Definition/Vanilla/Definition_CDF_INS.sqf
new file mode 100644
index 0000000..cc8fe56
--- /dev/null
+++ b/Common/Config/Core_Definition/Vanilla/Definition_CDF_INS.sqf
@@ -0,0 +1,27 @@
+/* Vanilla - CDF versus Insurgents */
+
+/* Units Core */
+WFBE_V_West_UnitsRootVersion = 'Vanilla';
+WFBE_V_West_Faction = 'CDF';
+WFBE_V_East_UnitsRootVersion = 'Vanilla';
+WFBE_V_East_Faction = 'INS';
+/* Loadout Core */
+WFBE_V_West_LoadoutRootVersion = 'Vanilla';
+WFBE_V_West_Loadout = 'CDF';
+WFBE_V_East_LoadoutRootVersion = 'Vanilla';
+WFBE_V_East_Loadout = 'INS';
+/* Squads Core */
+WFBE_V_West_SquadsRootVersion = 'Vanilla';
+WFBE_V_West_SquadsFaction = 'CDF';
+WFBE_V_East_SquadsRootVersion = 'Vanilla';
+WFBE_V_East_SquadsFaction = 'INS';
+/* Structures Core */
+WFBE_V_West_StructuresRootVersion = if (WF_A2_Vanilla) then {'Vanilla'} else {'CombinedOps'};
+WFBE_V_West_StructuresFaction = 'CDF';
+WFBE_V_East_StructuresRootVersion = if (WF_A2_Vanilla) then {'Vanilla'} else {'CombinedOps'};
+WFBE_V_East_StructuresFaction = 'INS';
+/* Artillery Core */
+WFBE_V_West_ArtilleryRootVersion = 'Vanilla';
+WFBE_V_West_ArtilleryFaction = 'CDF';
+WFBE_V_East_ArtilleryRootVersion = 'Vanilla';
+WFBE_V_East_ArtilleryFaction = 'INS'; \ No newline at end of file
diff --git a/Common/Config/Core_Definition/Vanilla/Definition_CDF_RU.sqf b/Common/Config/Core_Definition/Vanilla/Definition_CDF_RU.sqf
new file mode 100644
index 0000000..5c6afd1
--- /dev/null
+++ b/Common/Config/Core_Definition/Vanilla/Definition_CDF_RU.sqf
@@ -0,0 +1,27 @@
+/* Vanilla - CDF versus Russians */
+
+/* Units Core */
+WFBE_V_West_UnitsRootVersion = 'Vanilla';
+WFBE_V_West_Faction = 'CDF';
+WFBE_V_East_UnitsRootVersion = 'Vanilla';
+WFBE_V_East_Faction = 'RU';
+/* Loadout Core */
+WFBE_V_West_LoadoutRootVersion = 'Vanilla';
+WFBE_V_West_Loadout = 'CDF';
+WFBE_V_East_LoadoutRootVersion = 'Vanilla';
+WFBE_V_East_Loadout = 'RU';
+/* Squads Core */
+WFBE_V_West_SquadsRootVersion = 'Vanilla';
+WFBE_V_West_SquadsFaction = 'CDF';
+WFBE_V_East_SquadsRootVersion = 'Vanilla';
+WFBE_V_East_SquadsFaction = 'RU';
+/* Structures Core */
+WFBE_V_West_StructuresRootVersion = 'Vanilla';
+WFBE_V_West_StructuresFaction = 'CDF';
+WFBE_V_East_StructuresRootVersion = 'Vanilla';
+WFBE_V_East_StructuresFaction = 'RU';
+/* Artillery Core */
+WFBE_V_West_ArtilleryRootVersion = 'Vanilla';
+WFBE_V_West_ArtilleryFaction = 'CDF';
+WFBE_V_East_ArtilleryRootVersion = 'Vanilla';
+WFBE_V_East_ArtilleryFaction = 'RU'; \ No newline at end of file
diff --git a/Common/Config/Core_Definition/Vanilla/Definition_USMC_INS.sqf b/Common/Config/Core_Definition/Vanilla/Definition_USMC_INS.sqf
new file mode 100644
index 0000000..4d311fd
--- /dev/null
+++ b/Common/Config/Core_Definition/Vanilla/Definition_USMC_INS.sqf
@@ -0,0 +1,27 @@
+/* Vanilla - USMC versus Insurgents */
+
+/* Units Core */
+WFBE_V_West_UnitsRootVersion = 'Vanilla';
+WFBE_V_West_Faction = 'USMC';
+WFBE_V_East_UnitsRootVersion = 'Vanilla';
+WFBE_V_East_Faction = 'INS';
+/* Loadout Core */
+WFBE_V_West_LoadoutRootVersion = 'Vanilla';
+WFBE_V_West_Loadout = 'USMC';
+WFBE_V_East_LoadoutRootVersion = 'Vanilla';
+WFBE_V_East_Loadout = 'INS';
+/* Squads Core */
+WFBE_V_West_SquadsRootVersion = 'Vanilla';
+WFBE_V_West_SquadsFaction = 'USMC';
+WFBE_V_East_SquadsRootVersion = 'Vanilla';
+WFBE_V_East_SquadsFaction = 'INS';
+/* Structures Core */
+WFBE_V_West_StructuresRootVersion = 'Vanilla';
+WFBE_V_West_StructuresFaction = 'USMC';
+WFBE_V_East_StructuresRootVersion = 'Vanilla';
+WFBE_V_East_StructuresFaction = 'INS';
+/* Artillery Core */
+WFBE_V_West_ArtilleryRootVersion = 'Vanilla';
+WFBE_V_West_ArtilleryFaction = 'USMC';
+WFBE_V_East_ArtilleryRootVersion = 'Vanilla';
+WFBE_V_East_ArtilleryFaction = 'INS'; \ No newline at end of file
diff --git a/Common/Config/Core_Definition/Vanilla/Definition_USMC_RU.sqf b/Common/Config/Core_Definition/Vanilla/Definition_USMC_RU.sqf
new file mode 100644
index 0000000..d633884
--- /dev/null
+++ b/Common/Config/Core_Definition/Vanilla/Definition_USMC_RU.sqf
@@ -0,0 +1,27 @@
+/* Vanilla - USMC versus Russians */
+
+/* Units Core */
+WFBE_V_West_UnitsRootVersion = 'Vanilla';
+WFBE_V_West_Faction = 'USMC';
+WFBE_V_East_UnitsRootVersion = 'Vanilla';
+WFBE_V_East_Faction = 'RU';
+/* Loadout Core */
+WFBE_V_West_LoadoutRootVersion = 'Vanilla';
+WFBE_V_West_Loadout = 'USMC';
+WFBE_V_East_LoadoutRootVersion = 'Vanilla';
+WFBE_V_East_Loadout = 'RU';
+/* Squads Core */
+WFBE_V_West_SquadsRootVersion = 'Vanilla';
+WFBE_V_West_SquadsFaction = 'USMC';
+WFBE_V_East_SquadsRootVersion = 'Vanilla';
+WFBE_V_East_SquadsFaction = 'RU';
+/* Structures Core */
+WFBE_V_West_StructuresRootVersion = 'Vanilla';
+WFBE_V_West_StructuresFaction = 'USMC';
+WFBE_V_East_StructuresRootVersion = 'Vanilla';
+WFBE_V_East_StructuresFaction = 'RU';
+/* Artillery Core */
+WFBE_V_West_ArtilleryRootVersion = 'Vanilla';
+WFBE_V_West_ArtilleryFaction = 'USMC';
+WFBE_V_East_ArtilleryRootVersion = 'Vanilla';
+WFBE_V_East_ArtilleryFaction = 'RU'; \ No newline at end of file
diff --git a/Common/Config/Core_Gear/Core_ACE_G.sqf b/Common/Config/Core_Gear/Core_ACE_G.sqf
new file mode 100644
index 0000000..a31c41a
--- /dev/null
+++ b/Common/Config/Core_Gear/Core_ACE_G.sqf
@@ -0,0 +1,407 @@
+Private ['_config','_element','_get','_i','_info','_prefix','_proceed','_u','_z'];
+
+_u = [];
+_i = [];
+
+/* _i = _i + [[label, picture, config, belong to type, cost, upgrade level, allowed in camps, belong to the handgun pool, magazines, magazine space, allow two weapons]]*/
+
+/* Magazines - West */
+_u = _u + ['ACE_10Rnd_127x99_T_m107'];
+_i = _i + [['','','CfgMagazines','primary',18,0,true,false,0,0,true]];
+
+_u = _u + ['ACE_10Rnd_127x99_Raufoss_m107'];
+_i = _i + [['','','CfgMagazines','primary',23,0,true,false,0,0,true]];
+
+_u = _u + ['ACE_5Rnd_25x59_HEDP_Barrett'];
+_i = _i + [['','','CfgMagazines','primary',33,0,true,false,0,0,true]];
+
+_u = _u + ['ACE_5Rnd_127x99_B_TAC50'];
+_i = _i + [['','','CfgMagazines','primary',12,0,true,false,0,0,true]];
+
+_u = _u + ['ACE_5Rnd_127x99_S_TAC50'];
+_i = _i + [['','','CfgMagazines','primary',22,0,true,false,0,0,true]];
+
+_u = _u + ['ACE_5Rnd_127x99_T_TAC50'];
+_i = _i + [['','','CfgMagazines','primary',14,0,true,false,0,0,true]];
+
+_u = _u + ['ACE_20Rnd_762x51_B_HK417'];
+_i = _i + [['','','CfgMagazines','primary',8,0,true,false,0,0,true]];
+
+_u = _u + ['ACE_20Rnd_762x51_T_HK417'];
+_i = _i + [['','','CfgMagazines','primary',9,0,true,false,0,0,true]];
+
+_u = _u + ['ACE_30Rnd_556x45_T_G36'];
+_i = _i + [['','','CfgMagazines','primary',8,0,true,false,0,0,true]];
+
+_u = _u + ['ACE_30Rnd_556x45_T_Stanag'];
+_i = _i + [['','','CfgMagazines','primary',6,0,true,false,0,0,true]];
+
+_u = _u + ['ACE_200Rnd_556x45_T_M249'];
+_i = _i + [['','','CfgMagazines','primary',15,0,true,false,0,0,true]];
+
+_u = _u + ['ACE_100Rnd_556x45_T_M249'];
+_i = _i + [['','','CfgMagazines','primary',25,0,true,false,0,0,true]];
+
+_u = _u + ['ACE_15Rnd_9x19_P226'];
+_i = _i + [['','','CfgMagazines','sidearm',2,0,true,true,0,0,true]];
+
+_u = _u + ['ACE_15Rnd_9x19_P8'];
+_i = _i + [['','','CfgMagazines','sidearm',2,0,true,true,0,0,true]];
+
+_u = _u + ['ACE_40Rnd_B_46x30_MP7'];
+_i = _i + [['','','CfgMagazines','primary',5,0,true,true,0,0,true]];
+
+_u = _u + ['ACE_25Rnd_1143x23_B_UMP45'];
+_i = _i + [['','','CfgMagazines','primary',5,0,true,true,0,0,true]];
+
+_u = _u + ['ACE_25Rnd_1143x23_S_UMP45'];
+_i = _i + [['','','CfgMagazines','primary',7,0,true,true,0,0,true]];
+
+_u = _u + ['ACE_12Rnd_45ACP_USP'];
+_i = _i + [['','','CfgMagazines','sidearm',3,0,true,true,0,0,true]];
+
+_u = _u + ['ACE_12Rnd_45ACP_USPSD'];
+_i = _i + [['','','CfgMagazines','sidearm',4,0,true,true,0,0,true]];
+
+/* Primary weapons - West */
+_u = _u + ['ACE_G36A2_Bipod_D'];
+_i = _i + [['','','CfgWeapons','',230,1,false,false,0,0,true]];
+
+_u = _u + ['ACE_G36A1_AG36A1_D'];
+_i = _i + [['','','CfgWeapons','',240,2,false,false,0,0,true]];
+
+_u = _u + ['ACE_M60'];
+_i = _i + [['','','CfgWeapons','',150,0,true,false,0,0,false]];
+
+_u = _u + ['ACE_M240L'];
+_i = _i + [['','','CfgWeapons','',165,0,true,false,0,0,false]];
+
+_u = _u + ['ACE_M240L_M145'];
+_i = _i + [['','','CfgWeapons','',175,0,true,false,0,0,false]];
+
+_u = _u + ['ACE_HK416_D10'];
+_i = _i + [['','','CfgWeapons','',100,0,true,false,0,0,true]];
+
+_u = _u + ['ACE_HK416_D10_AIM'];
+_i = _i + [['','','CfgWeapons','',110,0,true,false,0,0,true]];
+
+_u = _u + ['ACE_HK416_D10_COMPM3'];
+_i = _i + [['','','CfgWeapons','',115,1,true,false,0,0,true]];
+
+_u = _u + ['ACE_HK416_D10_COMPM3_SD'];
+_i = _i + [['','','CfgWeapons','',135,3,true,false,0,0,true]];
+
+_u = _u + ['ACE_HK416_D10_Holo'];
+_i = _i + [['','','CfgWeapons','',115,1,true,false,0,0,true]];
+
+_u = _u + ['ACE_HK416_D10_M320'];
+_i = _i + [['','','CfgWeapons','',140,1,true,false,0,0,true]];
+
+_u = _u + ['ACE_HK416_D10_SD'];
+_i = _i + [['','','CfgWeapons','',125,2,true,false,0,0,true]];
+
+_u = _u + ['ACE_HK416_D14'];
+_i = _i + [['','','CfgWeapons','',100,1,true,false,0,0,true]];
+
+_u = _u + ['ACE_HK416_D14_ACOG_PVS14'];
+_i = _i + [['','','CfgWeapons','',130,2,true,false,0,0,true]];
+
+_u = _u + ['ACE_HK416_D14_COMPM3'];
+_i = _i + [['','','CfgWeapons','',115,1,true,false,0,0,true]];
+
+_u = _u + ['ACE_HK416_D14_COMPM3_M320'];
+_i = _i + [['','','CfgWeapons','',140,2,true,false,0,0,true]];
+
+_u = _u + ['ACE_HK416_D14_SD'];
+_i = _i + [['','','CfgWeapons','',120,1,true,false,0,0,true]];
+
+_u = _u + ['ACE_HK416_D14_TWS'];
+_i = _i + [['','','CfgWeapons','',160,3,true,false,0,0,true]];
+
+_u = _u + ['ACE_HK417_Eotech_4x'];
+_i = _i + [['','','CfgWeapons','',130,2,true,false,0,0,true]];
+
+_u = _u + ['ACE_HK417_leupold'];
+_i = _i + [['','','CfgWeapons','',140,2,true,false,0,0,true]];
+
+_u = _u + ['ACE_HK417_micro'];
+_i = _i + [['','','CfgWeapons','',115,1,true,false,0,0,true]];
+
+_u = _u + ['ACE_HK417_Shortdot'];
+_i = _i + [['','','CfgWeapons','',145,3,true,false,0,0,true]];
+
+_u = _u + ['ACE_M4'];
+_i = _i + [['','','CfgWeapons','',85,0,true,false,0,0,true]];
+
+_u = _u + ['ACE_M4_ACOG'];
+_i = _i + [['','','CfgWeapons','',95,1,true,false,0,0,true]];
+
+_u = _u + ['ACE_M4_Aim'];
+_i = _i + [['','','CfgWeapons','',95,1,true,false,0,0,true]];
+
+_u = _u + ['ACE_M4_AIM_GL'];
+_i = _i + [['','','CfgWeapons','',125,2,true,false,0,0,true]];
+
+_u = _u + ['ACE_M4_Eotech'];
+_i = _i + [['','','CfgWeapons','',95,1,true,false,0,0,true]];
+
+_u = _u + ['ACE_M4_Eotech_GL'];
+_i = _i + [['','','CfgWeapons','',125,2,true,false,0,0,true]];
+
+_u = _u + ['ACE_M4_GL'];
+_i = _i + [['','','CfgWeapons','',105,2,true,false,0,0,true]];
+
+_u = _u + ['ACE_M4_RCO_GL'];
+_i = _i + [['','','CfgWeapons','',125,2,true,false,0,0,true]];
+
+_u = _u + ['ACE_M4A1_ACOG'];
+_i = _i + [['','','CfgWeapons','',155,1,true,false,0,0,true]];
+
+_u = _u + ['ACE_M4A1_ACOG_SD'];
+_i = _i + [['','','CfgWeapons','',165,3,true,false,0,0,true]];
+
+_u = _u + ['ACE_M4A1_AIM_GL'];
+_i = _i + [['','','CfgWeapons','',195,2,true,false,0,0,true]];
+
+_u = _u + ['ACE_M4A1_AIM_GL_SD'];
+_i = _i + [['','','CfgWeapons','',205,3,true,false,0,0,true]];
+
+_u = _u + ['ACE_M4A1_Aim_SD'];
+_i = _i + [['','','CfgWeapons','',185,2,true,false,0,0,true]];
+
+_u = _u + ['ACE_M4A1_Eotech'];
+_i = _i + [['','','CfgWeapons','',105,1,true,false,0,0,true]];
+
+_u = _u + ['ACE_M4A1_GL'];
+_i = _i + [['','','CfgWeapons','',195,2,true,false,0,0,true]];
+
+_u = _u + ['ACE_M4A1_GL_SD'];
+_i = _i + [['','','CfgWeapons','',205,3,true,false,0,0,true]];
+
+_u = _u + ['ACE_SOC_M4A1'];
+_i = _i + [['','','CfgWeapons','',115,1,true,false,0,0,true]];
+
+_u = _u + ['ACE_SOC_M4A1_Aim'];
+_i = _i + [['','','CfgWeapons','',125,2,true,false,0,0,true]];
+
+_u = _u + ['ACE_SOC_M4A1_AIM_SD'];
+_i = _i + [['','','CfgWeapons','',135,3,true,false,0,0,true]];
+
+_u = _u + ['ACE_SOC_M4A1_Eotech'];
+_i = _i + [['','','CfgWeapons','',125,2,true,false,0,0,true]];
+
+_u = _u + ['ACE_SOC_M4A1_Eotech_4x'];
+_i = _i + [['','','CfgWeapons','',135,3,true,false,0,0,true]];
+
+_u = _u + ['ACE_SOC_M4A1_GL'];
+_i = _i + [['','','CfgWeapons','',145,2,true,false,0,0,true]];
+
+_u = _u + ['ACE_SOC_M4A1_GL_13'];
+_i = _i + [['','','CfgWeapons','',135,2,true,false,0,0,true]];
+
+_u = _u + ['ACE_SOC_M4A1_GL_AIMPOINT'];
+_i = _i + [['','','CfgWeapons','',155,3,true,false,0,0,true]];
+
+_u = _u + ['ACE_SOC_M4A1_GL_EOTECH'];
+_i = _i + [['','','CfgWeapons','',155,3,true,false,0,0,true]];
+
+_u = _u + ['ACE_SOC_M4A1_GL_SD'];
+_i = _i + [['','','CfgWeapons','',155,3,true,false,0,0,true]];
+
+_u = _u + ['ACE_SOC_M4A1_RCO_GL'];
+_i = _i + [['','','CfgWeapons','',155,3,true,false,0,0,true]];
+
+_u = _u + ['ACE_SOC_M4A1_SD_9'];
+_i = _i + [['','','CfgWeapons','',125,1,true,false,0,0,true]];
+
+_u = _u + ['ACE_SOC_M4A1_SHORTDOT'];
+_i = _i + [['','','CfgWeapons','',145,2,true,false,0,0,true]];
+
+_u = _u + ['ACE_SOC_M4A1_SHORTDOT_SD'];
+_i = _i + [['','','CfgWeapons','',155,3,true,false,0,0,true]];
+
+_u = _u + ['ACE_SOC_M4A1_TWS'];
+_i = _i + [['','','CfgWeapons','',195,3,true,false,0,0,true]];
+
+_u = _u + ['ACE_SPAS12'];
+_i = _i + [['','','CfgWeapons','',120,0,true,false,0,0,true]];
+
+_u = _u + ['ACE_UMP45'];
+_i = _i + [['','','CfgWeapons','',70,0,true,false,0,0,true]];
+
+_u = _u + ['ACE_UMP45_AIM'];
+_i = _i + [['','','CfgWeapons','',80,1,true,false,0,0,true]];
+
+_u = _u + ['ACE_UMP45_AIM_SD'];
+_i = _i + [['','','CfgWeapons','',100,3,true,false,0,0,true]];
+
+_u = _u + ['ACE_UMP45_SD'];
+_i = _i + [['','','CfgWeapons','',90,2,true,false,0,0,true]];
+
+_u = _u + ['ACE_Mk12mod1'];
+_i = _i + [['','','CfgWeapons','',210,1,true,false,0,0,true]];
+
+_u = _u + ['ACE_Mk12mod1_SD'];
+_i = _i + [['','','CfgWeapons','',220,2,true,false,0,0,true]];
+
+_u = _u + ['ACE_MP5A4'];
+_i = _i + [['','','CfgWeapons','',50,0,true,false,0,0,true]];
+
+_u = _u + ['ACE_MP5A5'];
+_i = _i + [['','','CfgWeapons','',60,1,true,false,0,0,true]];
+
+_u = _u + ['ACE_MP5SD'];
+_i = _i + [['','','CfgWeapons','',80,2,true,false,0,0,true]];
+
+_u = _u + ['ACE_MP7'];
+_i = _i + [['','','CfgWeapons','',90,0,true,false,0,0,true]];
+
+_u = _u + ['ACE_MP7_RSAS'];
+_i = _i + [['','','CfgWeapons','',100,1,true,false,0,0,true]];
+
+_u = _u + ['ACE_M109'];
+_i = _i + [['','','CfgWeapons','',510,3,false,false,0,0,false]];
+
+_u = _u + ['ACE_M110'];
+_i = _i + [['','','CfgWeapons','',300,1,false,false,0,0,false]];
+
+_u = _u + ['ACE_M110_SD'];
+_i = _i + [['','','CfgWeapons','',320,2,false,false,0,0,false]];
+
+_u = _u + ['ACE_TAC50'];
+_i = _i + [['','','CfgWeapons','',410,3,false,false,0,0,false]];
+
+_u = _u + ['ACE_TAC50_SD'];
+_i = _i + [['','','CfgWeapons','',470,3,false,false,0,0,false]];
+
+_u = _u + ['ACE_MG36_D'];
+_i = _i + [['','','CfgWeapons','',250,2,false,false,0,0,false]];
+
+/* Secondary weapons - West */
+_u = _u + ['ACE_M224TripodProxy'];
+_i = _i + [['','','CfgVehicles','',550,2,true,false,0,0,false]];
+
+_u = _u + ['ACE_M224Proxy'];
+_i = _i + [['','','CfgVehicles','',40,2,true,false,0,0,false]];
+
+_u = _u + ['ACE_VTAC_RUSH72_ACU'];
+_i = _i + [['','','CfgVehicles','',90,2,true,false,0,0,false]];
+
+_u = _u + ['ACE_BackPack_ACR_TT'];
+_i = _i + [['','','CfgVehicles','',90,2,true,false,0,0,false]];
+
+_u = _u + ['ACE_CharliePack_ACU'];
+_i = _i + [['','','CfgVehicles','',90,2,true,false,0,0,false]];
+
+_u = _u + ['ACE_CharliePack_ACU_Medic'];
+_i = _i + [['','','CfgVehicles','',90,2,true,false,0,0,false]];
+
+_u = _u + ['ACE_M252Proxy'];
+_i = _i + [['','','CfgVehicles','',750,1,false,false,0,0,false]];
+
+_u = _u + ['ACE_M252TripodProxy'];
+_i = _i + [['','','CfgVehicles','',40,1,false,false,0,0,false]];
+
+/* Pistols - West */
+_u = _u + ['ACE_USP'];
+_i = _i + [['','','CfgWeapons','',35,1,true,false,0,0,true]];
+
+_u = _u + ['ACE_USPSD'];
+_i = _i + [['','','CfgWeapons','',45,2,true,false,0,0,true]];
+
+_u = _u + ['ACE_P226'];
+_i = _i + [['','','CfgWeapons','',30,1,true,false,0,0,true]];
+
+_u = _u + ['ACE_P8'];
+_i = _i + [['','','CfgWeapons','',20,0,true,false,0,0,true]];
+
+/* Misc - West */
+_u = _u + ['ACE_HuntIR_M203'];
+_i = _i + [['','','CfgMagazines','CfgMagazines',32,0,true,true,0,0,true]];
+
+_u = _u + ['ACE_FlareIR_M203'];
+_i = _i + [['','','CfgMagazines','CfgMagazines',12,0,true,true,0,0,true]];
+
+_u = _u + ['ACE_Earplugs'];
+_i = _i + [['','','CfgWeapons','Item',2,0,true,false,0,0,true]];
+
+_u = _u + ['ACE_GlassesBalaklava'];
+_i = _i + [['','','CfgWeapons','Item',5,0,true,false,0,0,true]];
+
+_u = _u + ['ACE_GlassesGasMask_US'];
+_i = _i + [['','','CfgWeapons','Item',15,0,true,false,0,0,true]];
+
+_u = _u + ['ACE_GlassesTactical'];
+_i = _i + [['','','CfgWeapons','Item',5,0,true,false,0,0,true]];
+
+_u = _u + ['ACE_GlassesLHD_glasses'];
+_i = _i + [['','','CfgWeapons','Item',10,0,true,false,0,0,true]];
+
+_u = _u + ['ACE_HuntIR_monitor'];
+_i = _i + [['','','CfgWeapons','Item',30,0,true,false,0,0,true]];
+
+_u = _u + ['ACE_Javelin_CLU'];
+_i = _i + [['','','CfgWeapons','Special',300,3,true,false,0,0,true]];
+
+_u = _u + ['ACE_SpottingScope'];
+_i = _i + [['','','CfgWeapons','Item',15,0,true,false,0,0,true]];
+
+_u = _u + ['ACE_Kestrel4500'];
+_i = _i + [['','','CfgWeapons','Item',25,0,true,false,0,0,true]];
+
+for '_z' from 0 to (count _u)-1 do {
+ _info = (_i select _z);
+ _element = (_u select _z);
+ _config = (_info select 2);
+
+ if (isClass (configFile >> _config >> _element)) then {
+ //--- The loadout has a prefix since we can have two elements with the same name but with different class.
+ _get = _element Call GetNamespace;
+ _proceed = false;
+ _prefix = "";
+
+ if (isNil '_get') then {
+ _proceed = true;
+ } else {
+ //--- Two elements can have the same name, like "Javelin(Weapon) >> Javelin (Magazine)", if two elements are found, we compare the class to see if they're already defined or not.
+ if ((_get select 2) == _config) then {
+ diag_log Format ["[WFBE (INIT)][frameno:%3 | ticktime:%4] Core_ACE_G: Duplicated Loadout Element found '%1' for class '%2'",_element,_config,diag_frameno,diag_tickTime];
+ } else {
+ //--- Is it a special class?
+ _get = (_element+'_W') Call GetNamespace;
+ if (isNil '_get') then {
+ _prefix = '_W';
+ _proceed = true;
+ } else {
+ diag_log Format ["[WFBE (INIT)][frameno:%3 | ticktime:%4] Core_ACE_G: Duplicated Loadout Element found '%1' for class '%2'",_element,_config,diag_frameno,diag_tickTime];
+ };
+ };
+ };
+
+ if (_proceed) then {
+ //--- A custom loadout displayName can be set.
+ if ((_info select 1) == '') then {_info set [0, [_element,'displayName',_config] Call GetConfigInfo]};
+ _info set [1, [_element,'picture',_config] Call GetConfigInfo];
+
+ if (_config == 'CfgWeapons') then {
+ //--- A custom loadout magazine can be set.
+ if (typeName (_info select 8) != 'ARRAY') then {
+ _info set [8, getArray (configFile >> _config >> _element >> 'magazines')];
+ };
+ };
+
+ //--- Set the magazine space.
+ if (_config == 'CfgMagazines') then {
+ if ((_info select 3) in ['CfgMagazines','primary','secondary','sidearm']) then {
+ _info set [9, ceil(getNumber(configFile >> _config >> _element >> 'type') / 256)];
+ };
+ };
+
+ [_element+_prefix,_info] Call SetNamespace;
+ };
+ } else {
+ diag_log Format ["[WFBE (ERROR)][frameno:%3 | ticktime:%4] Core_ACE_G: Loadout Element '%1' with class '%2' is not a defined a class!",_element,_config,diag_frameno,diag_tickTime];
+ };
+};
+
+diag_log Format ["[WFBE (INIT)][frameno:%2 | ticktime:%3] Core_ACE_G: Loadout Initialization (%1 Elements) - [Done]",count _u,diag_frameno,diag_tickTime]; \ No newline at end of file
diff --git a/Common/Config/Core_Gear/Core_Arrowhead_G.sqf b/Common/Config/Core_Gear/Core_Arrowhead_G.sqf
new file mode 100644
index 0000000..c946dbb
--- /dev/null
+++ b/Common/Config/Core_Gear/Core_Arrowhead_G.sqf
@@ -0,0 +1,801 @@
+private ["_config","_element","_get","_i","_info","_prefix","_proceed","_u"];
+
+_u = [];
+_i = [];
+
+/* _i = _i + [[label, picture, config, belong to type, cost, upgrade level, allowed in camps, belong to the handgun pool, magazines, magazine space, allow two weapons]]*/
+
+/* Magazines - West */
+_u = _u + ['5Rnd_762x51_M24'];
+_i = _i + [['','','CfgMagazines','primary',7,0,true,false,0,0,true]];
+
+_u = _u + ['6Rnd_HE_M203'];
+_i = _i + [['','','CfgMagazines','primary',40,0,true,false,0,0,true]];
+
+_u = _u + ['6Rnd_FlareWhite_M203'];
+_i = _i + [['','','CfgMagazines','primary',30,0,true,false,0,0,true]];
+
+_u = _u + ['6Rnd_FlareGreen_M203'];
+_i = _i + [['','','CfgMagazines','primary',30,0,true,false,0,0,true]];
+
+_u = _u + ['6Rnd_FlareRed_M203'];
+_i = _i + [['','','CfgMagazines','primary',30,0,true,false,0,0,true]];
+
+_u = _u + ['6Rnd_FlareYellow_M203'];
+_i = _i + [['','','CfgMagazines','primary',30,0,true,false,0,0,true]];
+
+_u = _u + ['6Rnd_Smoke_M203'];
+_i = _i + [['','','CfgMagazines','primary',35,0,true,false,0,0,true]];
+
+_u = _u + ['6Rnd_SmokeRed_M203'];
+_i = _i + [['','','CfgMagazines','primary',35,0,true,false,0,0,true]];
+
+_u = _u + ['6Rnd_SmokeGreen_M203'];
+_i = _i + [['','','CfgMagazines','primary',35,0,true,false,0,0,true]];
+
+_u = _u + ['6Rnd_SmokeYellow_M203'];
+_i = _i + [['','','CfgMagazines','primary',35,0,true,false,0,0,true]];
+
+_u = _u + ['8Rnd_B_Beneli_Pellets'];
+_i = _i + [['','','CfgMagazines','primary',3,0,true,false,0,0,true]];
+
+_u = _u + ['10Rnd_127x99_m107'];
+_i = _i + [['','','CfgMagazines','primary',18,0,true,false,0,0,true]];
+
+_u = _u + ['20Rnd_762x51_B_SCAR'];
+_i = _i + [['','','CfgMagazines','primary',6,0,true,false,0,0,true]];
+
+_u = _u + ['20Rnd_762x51_DMR'];
+_i = _i + [['','','CfgMagazines','primary',9,0,true,false,0,0,true]];
+
+_u = _u + ['20Rnd_762x51_SB_SCAR'];
+_i = _i + [['','','CfgMagazines','primary',8,0,true,false,0,0,true]];
+
+_u = _u + ['20Rnd_556x45_Stanag'];
+_i = _i + [['','','CfgMagazines','primary',4,0,true,false,0,0,true]];
+
+_u = _u + ['30Rnd_556x45_G36'];
+_i = _i + [['','','CfgMagazines','primary',7,0,true,false,0,0,true]];
+
+_u = _u + ['30Rnd_556x45_G36SD'];
+_i = _i + [['','','CfgMagazines','primary',9,0,true,false,0,0,true]];
+
+_u = _u + ['30Rnd_556x45_Stanag'];
+_i = _i + [['','','CfgMagazines','primary',5,0,true,false,0,0,true]];
+
+_u = _u + ['30Rnd_556x45_StanagSD'];
+_i = _i + [['','','CfgMagazines','primary',7,0,true,false,0,0,true]];
+
+_u = _u + ['100Rnd_556x45_BetaCMag'];
+_i = _i + [['','','CfgMagazines','primary',16,0,true,false,0,0,true]];
+
+_u = _u + ['100Rnd_556x45_M249'];
+_i = _i + [['','','CfgMagazines','primary',12,0,true,false,0,0,true]];
+
+_u = _u + ['100Rnd_762x51_M240'];
+_i = _i + [['','','CfgMagazines','primary',14,0,true,false,0,0,true]];
+
+_u = _u + ['200Rnd_556x45_M249'];
+_i = _i + [['','','CfgMagazines','primary',24,0,true,false,0,0,true]];
+
+_u = _u + ['Laserbatteries'];
+_i = _i + [['','','CfgMagazines','secondary',20,3,true,false,0,0,true]];
+
+_u = _u + ['Javelin'];
+_i = _i + [['','','CfgMagazines','secondary',290,3,false,false,0,0,true]];
+
+_u = _u + ['M136'];
+_i = _i + [['','','CfgMagazines','secondary',50,0,true,false,0,0,true]];
+
+_u = _u + ['MAAWS_HEAT'];
+_i = _i + [['','','CfgMagazines','secondary',250,3,false,false,0,0,true]];
+
+_u = _u + ['MAAWS_HEDP'];
+_i = _i + [['','','CfgMagazines','secondary',275,2,false,false,0,0,true]];
+
+_u = _u + ['Stinger'];
+_i = _i + [['','','CfgMagazines','secondary',125,2,false,false,0,0,true]];
+
+_u = _u + ['7Rnd_45ACP_1911'];
+_i = _i + [['','','CfgMagazines','sidearm',2,0,true,true,0,0,true]];
+
+_u = _u + ['15Rnd_9x19_M9'];
+_i = _i + [['','','CfgMagazines','sidearm',2,0,true,true,0,0,true]];
+
+_u = _u + ['15Rnd_9x19_M9SD'];
+_i = _i + [['','','CfgMagazines','sidearm',3,0,true,true,0,0,true]];
+
+_u = _u + ['17Rnd_9x19_glock17'];
+_i = _i + [['','','CfgMagazines','sidearm',3,0,true,true,0,0,true]];
+
+if (WF_ACE) then
+{
+ _u = _u + ['ACE_Battery_Rangefinder'];
+ _i = _i + [['','','CfgMagazines','primary',2,0,true,false,0,0,true]];
+
+ _u = _u + ['ACE_HuntIR_M203'];
+ _i = _i + [['','','CfgMagazines','CfgMagazines',50,2,true,true,0,0,true]];
+};
+
+/* Magazines - East */
+_u = _u + ['5Rnd_127x108_KSVK'];
+_i = _i + [['','','CfgMagazines','primary',11,0,true,false,0,0,true]];
+
+_u = _u + ['8Rnd_B_Saiga12_Pellets'];
+_i = _i + [['','','CfgMagazines','primary',3,0,true,false,0,0,true]];
+
+_u = _u + ['10Rnd_762x54_SVD'];
+_i = _i + [['','','CfgMagazines','primary',6,0,true,false,0,0,true]];
+
+_u = _u + ['10x_303'];
+_i = _i + [['','','CfgMagazines','primary',2,0,true,false,0,0,true]];
+
+_u = _u + ['20Rnd_762x51_FNFAL'];
+_i = _i + [['','','CfgMagazines','primary',4,0,true,false,0,0,true]];
+
+_u = _u + ['20Rnd_9x39_SP5_VSS'];
+_i = _i + [['','','CfgMagazines','primary',9,0,true,false,0,0,true]];
+
+_u = _u + ['30Rnd_545x39_AK'];
+_i = _i + [['','','CfgMagazines','primary',4,0,true,false,0,0,true]];
+
+_u = _u + ['30Rnd_545x39_AKSD'];
+_i = _i + [['','','CfgMagazines','primary',6,0,true,false,0,0,true]];
+
+_u = _u + ['30Rnd_762x39_AK47'];
+_i = _i + [['','','CfgMagazines','primary',3,0,true,false,0,0,true]];
+
+_u = _u + ['30Rnd_762x39_SA58'];
+_i = _i + [['','','CfgMagazines','primary',6,0,true,false,0,0,true]];
+
+_u = _u + ['75Rnd_545x39_RPK'];
+_i = _i + [['','','CfgMagazines','primary',9,0,true,false,0,0,true]];
+
+_u = _u + ['100Rnd_762x54_PK'];
+_i = _i + [['','','CfgMagazines','primary',12,0,true,false,0,0,true]];
+
+_u = _u + ['AT13'];
+_i = _i + [['','','CfgMagazines','secondary',280,3,false,false,0,0,true]];
+
+_u = _u + ['Dragon_EP1'];
+_i = _i + [['','','CfgMagazines','secondary',155,1,false,false,0,0,true]];
+
+_u = _u + ['Igla'];
+_i = _i + [['','','CfgMagazines','secondary',110,2,false,false,0,0,true]];
+
+_u = _u + ['OG7'];
+_i = _i + [['','','CfgMagazines','secondary',95,2,false,false,0,0,true]];
+
+_u = _u + ['PG7V'];
+_i = _i + [['','','CfgMagazines','secondary',50,0,true,false,0,0,true]];
+
+_u = _u + ['PG7VR'];
+_i = _i + [['','','CfgMagazines','secondary',100,2,false,false,0,0,true]];
+
+_u = _u + ['PG7VL'];
+_i = _i + [['','','CfgMagazines','secondary',70,1,true,false,0,0,true]];
+
+_u = _u + ['RPG18'];
+_i = _i + [['','','CfgMagazines','secondary',40,0,true,false,0,0,true]];
+
+_u = _u + ['Strela'];
+_i = _i + [['','','CfgMagazines','secondary',100,0,false,false,0,0,true]];
+
+_u = _u + ['6Rnd_45ACP'];
+_i = _i + [['','','CfgMagazines','sidearm',2,0,true,true,0,0,true]];
+
+_u = _u + ['8Rnd_9x18_Makarov'];
+_i = _i + [['','','CfgMagazines','sidearm',2,0,true,true,0,0,true]];
+
+_u = _u + ['8Rnd_9x18_MakarovSD'];
+_i = _i + [['','','CfgMagazines','sidearm',3,0,true,true,0,0,true]];
+
+_u = _u + ['10Rnd_B_765x17_Ball'];
+_i = _i + [['','','CfgMagazines','sidearm',3,0,true,true,0,0,true]];
+
+_u = _u + ['20Rnd_B_765x17_Ball'];
+_i = _i + [['','','CfgMagazines','sidearm',4,0,true,true,0,0,true]];
+
+_u = _u + ['30Rnd_9x19_UZI'];
+_i = _i + [['','','CfgMagazines','sidearm',4,0,true,true,0,0,true]];
+
+_u = _u + ['30Rnd_9x19_UZI_SD'];
+_i = _i + [['','','CfgMagazines','sidearm',6,0,true,true,0,0,true]];
+
+if (WF_ACE) then
+{
+ _u = _u + ['ACE_Battery_Rangefinder'];
+ _i = _i + [['','','CfgMagazines','sidearm',2,0,true,true,0,0,true]];
+};
+
+/* Primary weapons - West */
+_u = _u + ['G36A_camo'];
+_i = _i + [['','','CfgWeapons','',225,1,false,false,0,0,true]];
+
+_u = _u + ['G36C_camo'];
+_i = _i + [['','','CfgWeapons','',195,0,true,false,0,0,true]];
+
+_u = _u + ['G36_C_SD_camo'];
+_i = _i + [['','','CfgWeapons','',210,2,false,false,0,0,true]];
+
+_u = _u + ['G36K_camo'];
+_i = _i + [['','','CfgWeapons','',205,1,false,false,0,0,true]];
+
+_u = _u + ['M16A2'];
+_i = _i + [['','','CfgWeapons','',60,0,true,false,0,0,true]];
+
+_u = _u + ['M16A2GL'];
+_i = _i + [['','','CfgWeapons','',70,0,true,false,0,0,true]];
+
+_u = _u + ['M24_des_EP1'];
+_i = _i + [['','','CfgWeapons','',140,0,true,false,0,0,true]];
+
+_u = _u + ['M60A4_EP1'];
+_i = _i + [['','','CfgWeapons','',170,0,true,false,0,0,false]];
+
+_u = _u + ['m240_scoped_EP1'];
+_i = _i + [['','','CfgWeapons','',165,0,true,false,0,0,false]];
+
+_u = _u + ['M249_EP1'];
+_i = _i + [['','','CfgWeapons','',185,2,true,false,0,0,false]];
+
+_u = _u + ['M249_m145_EP1'];
+_i = _i + [['','','CfgWeapons','',210,2,true,false,0,0,false]];
+
+_u = _u + ['M249_TWS_EP1'];
+_i = _i + [['','','CfgWeapons','',285,3,false,false,0,0,false]];
+
+_u = _u + ['M4A1'];
+_i = _i + [['','','CfgWeapons','',95,0,true,false,0,0,true]];
+
+_u = _u + ['M4A3_CCO_EP1'];
+_i = _i + [['','','CfgWeapons','',115,0,true,false,0,0,true]];
+
+_u = _u + ['M4A3_RCO_GL_EP1'];
+_i = _i + [['','','CfgWeapons','',125,1,true,false,0,0,true]];
+
+_u = _u + ['m107'];
+_i = _i + [['','','CfgWeapons','',310,3,false,false,0,0,true]];
+
+_u = _u + ['m107_TWS_EP1'];
+_i = _i + [['','','CfgWeapons','',410,3,false,false,0,0,false]];
+
+_u = _u + ['Mk_48_DES_EP1'];
+_i = _i + [['','','CfgWeapons','',220,3,false,false,0,0,false]];
+
+_u = _u + ['MG36_camo'];
+_i = _i + [['','','CfgWeapons','',240,2,false,false,0,0,false]];
+
+_u = _u + ['M32_EP1'];
+_i = _i + [['','','CfgWeapons','',210,2,false,false,["6Rnd_HE_M203","6Rnd_FlareWhite_M203","6Rnd_FlareGreen_M203","6Rnd_FlareRed_M203","6Rnd_FlareYellow_M203","6Rnd_Smoke_M203","6Rnd_SmokeRed_M203","6Rnd_SmokeGreen_M203","6Rnd_SmokeYellow_M203"],0,true]];
+
+_u = _u + ['M79_EP1'];
+_i = _i + [['','','CfgWeapons','',80,0,true,false,[],0,true]];
+
+/* Mk13 use handgun pool ammos */
+_u = _u + ['Mk13_EP1'];
+_i = _i + [['','','CfgWeapons','',110,0,true,false,[],0,true]];
+
+_u = _u + ['M14_EP1'];
+_i = _i + [['','','CfgWeapons','',190,0,true,false,0,0,true]];
+
+_u = _u + ['M110_TWS_EP1'];
+_i = _i + [['','','CfgWeapons','',350,3,false,false,0,0,true]];
+
+_u = _u + ['M110_NVG_EP1'];
+_i = _i + [['','','CfgWeapons','',290,2,false,false,0,0,true]];
+
+_u = _u + ['SCAR_L_CQC'];
+_i = _i + [['','','CfgWeapons','',190,0,true,false,0,0,true]];
+
+_u = _u + ['SCAR_L_CQC_Holo'];
+_i = _i + [['','','CfgWeapons','',210,1,true,false,0,0,true]];
+
+_u = _u + ['SCAR_L_STD_Mk4CQT'];
+_i = _i + [['','','CfgWeapons','',215,2,true,false,0,0,true]];
+
+_u = _u + ['SCAR_L_STD_EGLM_RCO'];
+_i = _i + [['','','CfgWeapons','',230,1,true,false,0,0,true]];
+
+_u = _u + ['SCAR_L_CQC_EGLM_Holo'];
+_i = _i + [['','','CfgWeapons','',245,1,true,false,0,0,true]];
+
+_u = _u + ['SCAR_L_STD_EGLM_TWS'];
+_i = _i + [['','','CfgWeapons','',345,3,true,false,0,0,true]];
+
+_u = _u + ['SCAR_L_STD_HOLO'];
+_i = _i + [['','','CfgWeapons','',215,1,true,false,0,0,true]];
+
+_u = _u + ['SCAR_H_CQC_CCO'];
+_i = _i + [['','','CfgWeapons','',225,1,true,false,0,0,true]];
+
+_u = _u + ['SCAR_H_CQC_CCO_SD'];
+_i = _i + [['','','CfgWeapons','',250,2,true,false,0,0,true]];
+
+_u = _u + ['SCAR_H_STD_EGLM_Spect'];
+_i = _i + [['','','CfgWeapons','',280,2,true,false,0,0,true]];
+
+_u = _u + ['SCAR_H_LNG_Sniper'];
+_i = _i + [['','','CfgWeapons','',275,2,true,false,0,0,true]];
+
+_u = _u + ['SCAR_H_LNG_Sniper_SD'];
+_i = _i + [['','','CfgWeapons','',295,3,true,false,0,0,true]];
+
+_u = _u + ['SCAR_H_STD_TWS_SD'];
+_i = _i + [['','','CfgWeapons','',395,3,true,false,0,0,true]];
+
+/* Primary weapons - East */
+_u = _u + ['AK_47_M'];
+_i = _i + [['','','CfgWeapons','',40,0,true,false,0,0,true]];
+
+_u = _u + ['AK_47_S'];
+_i = _i + [['','','CfgWeapons','',50,0,true,false,0,0,true]];
+
+_u = _u + ['AK_74'];
+_i = _i + [['','','CfgWeapons','',60,0,true,false,0,0,true]];
+
+_u = _u + ['AK_74_GL'];
+_i = _i + [['','','CfgWeapons','',70,0,true,false,0,0,true]];
+
+_u = _u + ['AK_74_GL_kobra'];
+_i = _i + [['','','CfgWeapons','',85,0,true,false,0,0,true]];
+
+_u = _u + ['AKS_74'];
+_i = _i + [['','','CfgWeapons','',80,0,true,false,0,0,true]];
+
+_u = _u + ['AKS_74_GOSHAWK'];
+_i = _i + [['','','CfgWeapons','',180,2,true,false,0,0,true]];
+
+_u = _u + ['AKS_74_kobra'];
+_i = _i + [['','','CfgWeapons','',90,0,true,false,0,0,true]];
+
+_u = _u + ['AKS_74_NSPU'];
+_i = _i + [['','','CfgWeapons','',145,1,true,false,0,0,true]];
+
+_u = _u + ['AKS_74_pso'];
+_i = _i + [['','','CfgWeapons','',105,1,true,false,0,0,true]];
+
+_u = _u + ['AKS_74_U'];
+_i = _i + [['','','CfgWeapons','',115,0,true,false,0,0,true]];
+
+_u = _u + ['FN_FAL'];
+_i = _i + [['','','CfgWeapons','',110,0,true,false,0,0,true]];
+
+_u = _u + ['FN_FAL_ANPVS4'];
+_i = _i + [['','','CfgWeapons','',140,1,true,false,0,0,true]];
+
+_u = _u + ['LeeEnfield'];
+_i = _i + [['','','CfgWeapons','',25,0,true,false,0,0,true]];
+
+_u = _u + ['PK'];
+_i = _i + [['','','CfgWeapons','',190,0,true,false,0,0,false]];
+
+_u = _u + ['RPK_74'];
+_i = _i + [['','','CfgWeapons','',185,1,true,false,0,0,true]];
+
+_u = _u + ['Sa58P_EP1'];
+_i = _i + [['','','CfgWeapons','',110,0,true,false,0,0,true]];
+
+_u = _u + ['Sa58V_EP1'];
+_i = _i + [['','','CfgWeapons','',120,0,true,false,0,0,true]];
+
+_u = _u + ['Sa58V_RCO_EP1'];
+_i = _i + [['','','CfgWeapons','',155,1,true,false,0,0,true]];
+
+_u = _u + ['Sa58V_CCO_EP1'];
+_i = _i + [['','','CfgWeapons','',145,1,true,false,0,0,true]];
+
+_u = _u + ['SVD'];
+_i = _i + [['','','CfgWeapons','',160,1,true,false,0,0,true]];
+
+_u = _u + ['SVD_des_EP1'];
+_i = _i + [['','','CfgWeapons','',180,2,false,false,0,0,true]];
+
+_u = _u + ['SVD_NSPU_EP1'];
+_i = _i + [['','','CfgWeapons','',210,2,false,false,0,0,true]];
+
+_u = _u + ['ksvk'];
+_i = _i + [['','','CfgWeapons','',255,3,false,false,0,0,false]];
+
+/* Secondary weapons - West */
+_u = _u + ['Javelin'];
+_i = _i + [['','','CfgWeapons','',290,3,false,false,0,0,false]];
+
+_u = _u + ['Laserdesignator'];
+_i = _i + [['','','CfgWeapons','',275,3,true,false,0,0,true]];
+
+_u = _u + ['M136'];
+_i = _i + [['','','CfgWeapons','',85,0,true,false,0,0,false]];
+
+_u = _u + ['MAAWS'];
+_i = _i + [['','','CfgWeapons','',350,2,false,false,0,0,false]];
+
+_u = _u + ['Stinger'];
+_i = _i + [['','','CfgWeapons','',250,2,false,false,0,0,false]];
+
+if(WF_ACE) then
+{
+ _u = _u + ['ACE_Rucksack_MOLLE_Brown'];
+ _i = _i + [['','','CfgWeapons','',80,1,true,false,0,0,false]];
+
+ _u = _u + ['ACE_Coyote_Pack'];
+ _i = _i + [['','','CfgWeapons','',70,0,true,false,0,0,false]];
+
+ _u = _u + ['ACE_CharliePack'];
+ _i = _i + [['','','CfgWeapons','',90,2,true,false,0,0,false]];
+
+ _u = _u + ['ACE_M252Proxy'];
+ _i = _i + [['','','CfgWeapons','',600,1,true,false,0,0,false]];
+
+ _u = _u + ['ACE_M252TripodProxy'];
+ _i = _i + [['','','CfgWeapons','',40,1,true,false,0,0,false]];
+
+ _u = _u + ['ACE_M2HBProxy'];
+ _i = _i + [['','','CfgWeapons','',140,0,true,false,0,0,false]];
+
+ _u = _u + ['ACE_M3TripodProxy'];
+ _i = _i + [['','','CfgWeapons','',25,0,true,false,0,0,false]];
+
+ _u = _u + ['ACE_M220Proxy'];
+ _i = _i + [['','','CfgWeapons','',500,2,true,false,0,0,false]];
+
+ _u = _u + ['ACE_M220TripodProxy'];
+ _i = _i + [['','','CfgWeapons','',40,2,true,false,0,0,false]];
+}
+else
+{
+ _u = _u + ['US_Assault_Pack_EP1'];
+ _i = _i + [['','','CfgVehicles','',80,1,true,false,0,0,false]];
+
+ _u = _u + ['US_Patrol_Pack_EP1'];
+ _i = _i + [['','','CfgVehicles','',70,0,true,false,0,0,false]];
+
+ _u = _u + ['US_Backpack_EP1'];
+ _i = _i + [['','','CfgVehicles','',90,2,true,false,0,0,false]];
+
+ _u = _u + ['Tripod_Bag'];
+ _i = _i + [['','','CfgVehicles','',25,0,true,false,0,0,false]];
+
+ _u = _u + ['M2HD_mini_TriPod_US_Bag_EP1'];
+ _i = _i + [['','','CfgVehicles','',155,0,false,false,0,0,false]];
+
+ _u = _u + ['M2StaticMG_US_Bag_EP1'];
+ _i = _i + [['','','CfgVehicles','',190,0,false,false,0,0,false]];
+
+ _u = _u + ['MK19_TriPod_US_Bag_EP1'];
+ _i = _i + [['','','CfgVehicles','',450,1,false,false,0,0,false]];
+
+ _u = _u + ['TOW_TriPod_US_Bag_EP1'];
+ _i = _i + [['','','CfgVehicles','',600,2,false,false,0,0,false]];
+
+ _u = _u + ['M252_US_Bag_EP1'];
+ _i = _i + [['','','CfgVehicles','',750,1,false,false,0,0,false]];
+};
+
+/* Secondary weapons - East */
+_u = _u + ['Igla'];
+_i = _i + [['','','CfgWeapons','',250,2,false,false,0,0,false]];
+
+_u = _u + ['M47Launcher_EP1'];
+_i = _i + [['','','CfgWeapons','',275,2,false,false,0,0,false]];
+
+_u = _u + ['MetisLauncher'];
+_i = _i + [['','','CfgWeapons','',350,3,false,false,0,0,false]];
+
+_u = _u + ['RPG7V'];
+_i = _i + [['','','CfgWeapons','',90,1,true,false,0,0,false]];
+
+_u = _u + ['RPG18'];
+_i = _i + [['','','CfgWeapons','',50,0,true,false,0,0,false]];
+
+_u = _u + ['Strela'];
+_i = _i + [['','','CfgWeapons','',230,2,false,false,0,0,false]];
+
+if(WF_ACE) then
+{
+ _u = _u + ['ACE_Rucksack_RD90'];
+ _i = _i + [['','','CfgWeapons','',80,1,true,false,0,0,false]];
+
+ _u = _u + ['ACE_Rucksack_RD54'];
+ _i = _i + [['','','CfgWeapons','',70,0,true,false,0,0,false]];
+
+ _u = _u + ['ACE_Rucksack_RD99'];
+ _i = _i + [['','','CfgWeapons','',90,2,true,false,0,0,false]];
+
+ _u = _u + ['ACE_2b14Proxy'];
+ _i = _i + [['','','CfgWeapons','',600,1,true,false,0,0,false]];
+
+ _u = _u + ['ACE_2b14TripodProxy'];
+ _i = _i + [['','','CfgWeapons','',40,1,true,false,0,0,false]];
+
+ _u = _u + ['ACE_KORDProxy'];
+ _i = _i + [['','','CfgWeapons','',140,0,true,false,0,0,false]];
+
+ _u = _u + ['ACE_6T7TripodProxy'];
+ _i = _i + [['','','CfgWeapons','',25,0,true,false,0,0,false]];
+
+ _u = _u + ['ACE_KonkursTripodProxy'];
+ _i = _i + [['','','CfgWeapons','',500,2,true,false,0,0,false]];
+}
+else
+{
+ _u = _u + ['TK_Assault_Pack_EP1'];
+ _i = _i + [['','','CfgVehicles','',80,1,true,false,0,0,false]];
+
+ _u = _u + ['TK_RPG_Backpack_EP1'];
+ _i = _i + [['','','CfgVehicles','',70,0,true,false,0,0,false]];
+
+ _u = _u + ['TK_ALICE_Pack_EP1'];
+ _i = _i + [['','','CfgVehicles','',90,2,true,false,0,0,false]];
+
+ _u = _u + ['Tripod_Bag'];
+ _i = _i + [['','','CfgVehicles','',40,0,false,false,0,0,false]];
+
+ _u = _u + ['KORD_TK_Bag_EP1'];
+ _i = _i + [['','','CfgVehicles','',155,0,false,false,0,0,false]];
+
+ _u = _u + ['KORD_high_TK_Bag_EP1'];
+ _i = _i + [['','','CfgVehicles','',190,0,false,false,0,0,false]];
+
+ _u = _u + ['SPG9_TK_INS_Bag_EP1'];
+ _i = _i + [['','','CfgVehicles','',410,1,false,false,0,0,false]];
+
+ _u = _u + ['AGS_TK_Bag_EP1'];
+ _i = _i + [['','','CfgVehicles','',490,1,false,false,0,0,false]];
+
+ _u = _u + ['Metis_TK_Bag_EP1'];
+ _i = _i + [['','','CfgVehicles','',600,2,false,false,0,0,false]];
+
+ _u = _u + ['2b14_82mm_TK_Bag_EP1'];
+ _i = _i + [['','','CfgVehicles','',750,1,false,false,0,0,false]];
+};
+
+/* Pistols - West */
+_u = _u + ['Colt1911'];
+_i = _i + [['','','CfgWeapons','',15,0,true,false,0,0,true]];
+
+_u = _u + ['M9'];
+_i = _i + [['','','CfgWeapons','',20,0,true,false,0,0,true]];
+
+_u = _u + ['M9SD'];
+_i = _i + [['','','CfgWeapons','',25,0,true,false,0,0,true]];
+
+_u = _u + ['glock17_EP1'];
+_i = _i + [['','','CfgWeapons','',35,1,true,false,0,0,true]];
+
+/* Pistols - East */
+_u = _u + ['Makarov'];
+_i = _i + [['','','CfgWeapons','',8,0,true,false,0,0,true]];
+
+_u = _u + ['MakarovSD'];
+_i = _i + [['','','CfgWeapons','',15,0,true,false,0,0,true]];
+
+_u = _u + ['revolver_EP1'];
+_i = _i + [['','','CfgWeapons','',10,0,true,false,0,0,true]];
+
+_u = _u + ['revolver_gold_EP1'];
+_i = _i + [['','','CfgWeapons','',10,1,true,false,0,0,true]];
+
+_u = _u + ['Sa61_EP1'];
+_i = _i + [['','','CfgWeapons','',25,0,true,false,0,0,true]];
+
+_u = _u + ['UZI_EP1'];
+_i = _i + [['','','CfgWeapons','',55,1,true,false,["30Rnd_9x19_UZI","30Rnd_9x19_UZI_SD"],0,true]];
+
+_u = _u + ['UZI_SD_EP1'];
+_i = _i + [['','','CfgWeapons','',65,2,true,false,["30Rnd_9x19_UZI_SD"],0,true]];
+
+/* Misc - West */
+_u = _u + ['HandGrenade_West'];
+_i = _i + [['','','CfgMagazines','CfgMagazines',10,0,true,false,0,0,true]];
+
+_u = _u + ['HandGrenade_Stone'];
+_i = _i + [['','','CfgMagazines','CfgMagazines',1,0,true,false,0,0,true]];
+
+_u = _u + ['IR_Strobe_Target'];
+_i = _i + [['','','CfgMagazines','CfgMagazines',25,0,true,false,0,0,true]];
+
+_u = _u + ['IR_Strobe_Marker'];
+_i = _i + [['','','CfgMagazines','CfgMagazines',35,0,true,false,0,0,true]];
+
+_u = _u + ['SmokeShell'];
+_i = _i + [['','','CfgMagazines','CfgMagazines',8,0,true,false,0,0,true]];
+
+_u = _u + ['SmokeShellRed'];
+_i = _i + [['','','CfgMagazines','CfgMagazines',8,0,true,false,0,0,true]];
+
+_u = _u + ['SmokeShellGreen'];
+_i = _i + [['','','CfgMagazines','CfgMagazines',8,0,true,false,0,0,true]];
+
+_u = _u + ['SmokeShellBlue'];
+_i = _i + [['','','CfgMagazines','CfgMagazines',8,0,true,false,0,0,true]];
+
+_u = _u + ['SmokeShellYellow'];
+_i = _i + [['','','CfgMagazines','CfgMagazines',8,0,true,false,0,0,true]];
+
+_u = _u + ['SmokeShellOrange'];
+_i = _i + [['','','CfgMagazines','CfgMagazines',8,0,true,false,0,0,true]];
+
+_u = _u + ['SmokeShellPurple'];
+_i = _i + [['','','CfgMagazines','CfgMagazines',8,0,true,false,0,0,true]];
+
+_u = _u + ['FlareWhite_M203'];
+_i = _i + [['','','CfgMagazines','CfgMagazines',9,0,true,true,0,0,true]];
+
+_u = _u + ['FlareYellow_M203'];
+_i = _i + [['','','CfgMagazines','CfgMagazines',9,0,true,true,0,0,true]];
+
+_u = _u + ['FlareGreen_M203'];
+_i = _i + [['','','CfgMagazines','CfgMagazines',9,0,true,true,0,0,true]];
+
+_u = _u + ['FlareRed_M203'];
+_i = _i + [['','','CfgMagazines','CfgMagazines',9,0,true,true,0,0,true]];
+
+_u = _u + ['1Rnd_HE_M203'];
+_i = _i + [['','','CfgMagazines','CfgMagazines',15,0,true,true,0,0,true]];
+
+_u = _u + ['1Rnd_Smoke_M203'];
+_i = _i + [['','','CfgMagazines','CfgMagazines',12,0,true,true,0,0,true]];
+
+_u = _u + ['1Rnd_SmokeRed_M203'];
+_i = _i + [['','','CfgMagazines','CfgMagazines',12,0,true,true,0,0,true]];
+
+_u = _u + ['1Rnd_SmokeGreen_M203'];
+_i = _i + [['','','CfgMagazines','CfgMagazines',12,0,true,true,0,0,true]];
+
+_u = _u + ['1Rnd_SmokeYellow_M203'];
+_i = _i + [['','','CfgMagazines','CfgMagazines',12,0,true,true,0,0,true]];
+
+if(WF_ACE) then
+{
+ _u = _u + ['ACE_Bandage'];
+ _i = _i + [['','','CfgMagazines','CfgMagazines',2,0,true,true,0,0,true]];
+
+ _u = _u + ['ACE_Epinephrine'];
+ _i = _i + [['','','CfgMagazines','CfgMagazines',20,0,true,true,0,0,true]];
+
+ _u = _u + ['ACE_Morphine'];
+ _i = _i + [['','','CfgMagazines','CfgMagazines',20,0,true,true,0,0,true]];
+
+ _u = _u + ['ACE_Medkit'];
+ _i = _i + [['','','CfgMagazines','CfgMagazines',50,0,true,true,0,0,true]];
+};
+
+_u = _u + ['Mine'];
+_i = _i + [['','','CfgMagazines','CfgMagazines',35,0,true,false,0,0,true]];
+
+_u = _u + ['PipeBomb'];
+_i = _i + [['','','CfgMagazines','CfgMagazines',50,0,true,false,0,0,true]];
+
+_u = _u + ['Binocular'];
+_i = _i + [['','','CfgWeapons','Special',10,0,true,false,0,0,true]];
+
+_u = _u + ['NVGoggles'];
+_i = _i + [['','','CfgWeapons','Special',20,0,true,false,0,0,true]];
+
+_u = _u + ['Binocular_Vector'];
+_i = _i + [['','','CfgWeapons','Special',50,1,true,false,0,0,true]];
+
+_u = _u + ['ItemCompass'];
+_i = _i + [['','','CfgWeapons','Item',4,0,true,false,0,0,true]];
+
+_u = _u + ['ItemGPS'];
+_i = _i + [['','','CfgWeapons','Item',25,0,true,false,0,0,true]];
+
+_u = _u + ['ItemMap'];
+_i = _i + [['','','CfgWeapons','Item',5,0,true,false,0,0,true]];
+
+_u = _u + ['ItemRadio'];
+_i = _i + [['','','CfgWeapons','Item',10,0,true,false,0,0,true]];
+
+_u = _u + ['ItemWatch'];
+_i = _i + [['','','CfgWeapons','Item',5,0,true,false,0,0,true]];
+
+if (WF_ACE) then
+{
+ _u = _u + ['ACE_HuntIR_monitor'];
+ _i = _i + [['','','CfgWeapons','Item',50,2,true,false,0,0,true]];
+
+ _u = _u + ['ACE_Earplugs'];
+ _i = _i + [['','','CfgWeapons','Item',1,0,true,false,0,0,true]];
+
+ _u = _u + ['ACE_MX2A'];
+ _i = _i + [['','','CfgWeapons','Special',50,2,true,false,0,0,true]];
+
+ _u = _u + ['ACE_GlassesLHD_glasses'];
+ _i = _i + [['','','CfgWeapons','Item',5,0,true,false,0,0,true]];
+
+ _u = _u + ['ACE_GlassesTactical'];
+ _i = _i + [['','','CfgWeapons','Item',3,0,true,false,0,0,true]];
+};
+
+/* Misc - East */
+_u = _u + ['HandGrenade_East'];
+_i = _i + [['','','CfgMagazines','CfgMagazines',9,0,true,false,0,0,true]];
+
+_u = _u + ['FlareWhite_GP25'];
+_i = _i + [['','','CfgMagazines','CfgMagazines',8,0,true,true,0,0,true]];
+
+_u = _u + ['FlareYellow_GP25'];
+_i = _i + [['','','CfgMagazines','CfgMagazines',8,0,true,true,0,0,true]];
+
+_u = _u + ['FlareGreen_GP25'];
+_i = _i + [['','','CfgMagazines','CfgMagazines',8,0,true,true,0,0,true]];
+
+_u = _u + ['FlareRed_GP25'];
+_i = _i + [['','','CfgMagazines','CfgMagazines',8,0,true,true,0,0,true]];
+
+_u = _u + ['1Rnd_HE_GP25'];
+_i = _i + [['','','CfgMagazines','CfgMagazines',13,0,true,true,0,0,true]];
+
+_u = _u + ['1Rnd_SMOKE_GP25'];
+_i = _i + [['','','CfgMagazines','CfgMagazines',10,0,true,true,0,0,true]];
+
+_u = _u + ['1Rnd_SMOKERED_GP25'];
+_i = _i + [['','','CfgMagazines','CfgMagazines',10,0,true,true,0,0,true]];
+
+_u = _u + ['1Rnd_SMOKEGREEN_GP25'];
+_i = _i + [['','','CfgMagazines','CfgMagazines',10,0,true,true,0,0,true]];
+
+_u = _u + ['1Rnd_SMOKEYELLOW_GP25'];
+_i = _i + [['','','CfgMagazines','CfgMagazines',10,0,true,true,0,0,true]];
+
+_u = _u + ['MineE'];
+_i = _i + [['','','CfgMagazines','CfgMagazines',40,0,true,false,0,0,true]];
+
+for '_z' from 0 to (count _u)-1 do {
+ _info = (_i select _z);
+ _element = (_u select _z);
+ _config = (_info select 2);
+
+ if (isClass (configFile >> _config >> _element)) then {
+ //--- The loadout has a prefix since we can have two elements with the same name but with different class.
+ _get = _element Call GetNamespace;
+ _proceed = false;
+ _prefix = "";
+
+ if (isNil '_get') then {
+ _proceed = true;
+ } else {
+ //--- Two elements can have the same name, like "Javelin(Weapon) >> Javelin (Magazine)", if two elements are found, we compare the class to see if they're already defined or not.
+ if ((_get select 2) == _config) then {
+ diag_log Format ["[WFBE (INIT)][frameno:%3 | ticktime:%4] Core_Arrowhead_G: Duplicated Loadout Element found '%1' for class '%2'",_element,_config,diag_frameno,diag_tickTime];
+ } else {
+ //--- Is it a special class?
+ _get = (_element+'_W') Call GetNamespace;
+ if (isNil '_get') then {
+ _prefix = '_W';
+ _proceed = true;
+ } else {
+ diag_log Format ["[WFBE (INIT)][frameno:%3 | ticktime:%4] Core_Arrowhead_G: Duplicated Loadout Element found '%1' for class '%2'",_element,_config,diag_frameno,diag_tickTime];
+ };
+ };
+ };
+
+ if (_proceed) then {
+ //--- A custom loadout displayName can be set.
+ if ((_info select 1) == '') then {_info set [0, [_element,'displayName',_config] Call GetConfigInfo]};
+ _info set [1, [_element,'picture',_config] Call GetConfigInfo];
+
+ if (_config == 'CfgWeapons') then {
+ //--- A custom loadout magazine can be set.
+ if (typeName (_info select 8) != 'ARRAY') then {
+ _info set [8, getArray (configFile >> _config >> _element >> 'magazines')];
+ };
+ };
+
+ //--- Set the magazine space.
+ if (_config == 'CfgMagazines') then {
+ if ((_info select 3) in ['CfgMagazines','primary','secondary','sidearm']) then {
+ _info set [9, ceil(getNumber(configFile >> _config >> _element >> 'type') / 256)];
+ };
+ };
+
+ [_element+_prefix,_info] Call SetNamespace;
+ };
+ } else {
+ diag_log Format ["[WFBE (ERROR)][frameno:%3 | ticktime:%4] Core_Arrowhead_G: Loadout Element '%1' with class '%2' is not a defined a class!",_element,_config,diag_frameno,diag_tickTime];
+ };
+};
+
+diag_log Format ["[WFBE (INIT)][frameno:%2 | ticktime:%3] Core_Arrowhead_G: Loadout Initialization (%1 Elements) - [Done]",count _u,diag_frameno,diag_tickTime]; \ No newline at end of file
diff --git a/Common/Config/Core_Gear/Core_BAF_G.sqf b/Common/Config/Core_Gear/Core_BAF_G.sqf
new file mode 100644
index 0000000..f9581df
--- /dev/null
+++ b/Common/Config/Core_Gear/Core_BAF_G.sqf
@@ -0,0 +1,155 @@
+private ["_config","_element","_get","_i","_info","_prefix","_proceed","_u"];
+
+_u = [];
+_i = [];
+
+/* _i = _i + [[label, picture, config, belong to type, cost, upgrade level, allowed in camps, belong to the handgun pool, magazines, magazine space, allow two weapons]]*/
+
+/* Magazines - West */
+_u = _u + ['5Rnd_127x99_AS50'];
+_i = _i + [['','','CfgMagazines','primary',14,0,true,false,0,0,true]];
+
+_u = _u + ['5Rnd_86x70_L115A1'];
+_i = _i + [['','','CfgMagazines','primary',8,0,true,false,0,0,true]];
+
+_u = _u + ['200Rnd_556x45_L110A1'];
+_i = _i + [['','','CfgMagazines','primary',12,0,true,false,0,0,true]];
+
+_u = _u + ['NLAW'];
+_i = _i + [['','','CfgMagazines','secondary',225,0,false,false,0,0,true]];
+
+/* Primary Weapons - West */
+_u = _u + ['BAF_AS50_scoped'];
+_i = _i + [['','','CfgWeapons','',380,2,true,false,0,0,false]];
+
+_u = _u + ['BAF_AS50_TWS'];
+_i = _i + [['','','CfgWeapons','',460,3,false,false,0,0,false]];
+
+_u = _u + ['BAF_LRR_scoped'];
+_i = _i + [['','','CfgWeapons','',350,2,true,false,0,0,true]];
+
+_u = _u + ['BAF_LRR_scoped_W'];
+_i = _i + [['','','CfgWeapons','',330,2,true,false,0,0,true]];
+
+_u = _u + ['BAF_L85A2_RIS_Holo'];
+_i = _i + [['','','CfgWeapons','',250,1,true,false,0,0,true]];
+
+_u = _u + ['BAF_L85A2_UGL_Holo'];
+_i = _i + [['','','CfgWeapons','',265,2,true,false,0,0,true]];
+
+_u = _u + ['BAF_L85A2_RIS_SUSAT'];
+_i = _i + [['','','CfgWeapons','',280,1,true,false,0,0,true]];
+
+_u = _u + ['BAF_L85A2_UGL_SUSAT'];
+_i = _i + [['','','CfgWeapons','',290,2,true,false,0,0,true]];
+
+_u = _u + ['BAF_L85A2_RIS_ACOG'];
+_i = _i + [['','','CfgWeapons','',300,1,true,false,0,0,true]];
+
+_u = _u + ['BAF_L85A2_UGL_ACOG'];
+_i = _i + [['','','CfgWeapons','',320,2,true,false,0,0,true]];
+
+_u = _u + ['BAF_L85A2_RIS_CWS'];
+_i = _i + [['','','CfgWeapons','',400,3,false,false,0,0,true]];
+
+_u = _u + ['BAF_L86A2_ACOG'];
+_i = _i + [['','','CfgWeapons','',330,2,true,false,0,0,true]];
+
+_u = _u + ['BAF_L110A1_Aim'];
+_i = _i + [['','','CfgWeapons','',350,2,false,false,0,0,false]];
+
+_u = _u + ['BAF_L7A2_GPMG'];
+_i = _i + [['','','CfgWeapons','',210,0,false,false,0,0,false]];
+
+/* Secondary weapons - West */
+_u = _u + ['BAF_NLAW_Launcher'];
+_i = _i + [['','','CfgWeapons','',500,2,false,false,0,0,false]];
+
+_u = _u + ['BAF_AssaultPack_RifleAmmo'];
+_i = _i + [['','','CfgVehicles','',95,2,true,false,0,0,false]];
+
+_u = _u + ['BAF_L2A1_ACOG_minitripod_bag'];
+_i = _i + [['','','CfgVehicles','',165,1,false,false,0,0,false]];
+
+_u = _u + ['BAF_L2A1_ACOG_tripod_bag'];
+_i = _i + [['','','CfgVehicles','',175,1,false,false,0,0,false]];
+
+_u = _u + ['BAF_GPMG_Minitripod_D_bag'];
+_i = _i + [['','','CfgVehicles','',175,0,false,false,0,0,false]];
+
+_u = _u + ['BAF_GMG_ACOG_minitripod_bag'];
+_i = _i + [['','','CfgVehicles','',175,1,false,false,0,0,false]];
+
+/* Misc - West */
+_u = _u + ['BAF_L109A1_HE'];
+_i = _i + [['','','CfgMagazines','CfgMagazines',12,0,true,false,0,0,true]];
+
+/* Misc - East */
+_u = _u + ['BAF_ied_v1'];
+_i = _i + [['','','CfgMagazines','CfgMagazines',25,0,true,false,0,0,true]];
+
+_u = _u + ['BAF_ied_v2'];
+_i = _i + [['','','CfgMagazines','CfgMagazines',35,1,true,false,0,0,true]];
+
+_u = _u + ['BAF_ied_v3'];
+_i = _i + [['','','CfgMagazines','CfgMagazines',45,2,true,false,0,0,true]];
+
+_u = _u + ['BAF_ied_v4'];
+_i = _i + [['','','CfgMagazines','CfgMagazines',55,2,true,false,0,0,true]];
+
+for '_z' from 0 to (count _u)-1 do {
+ _info = (_i select _z);
+ _element = (_u select _z);
+ _config = (_info select 2);
+
+ if (isClass (configFile >> _config >> _element)) then {
+ //--- The loadout has a prefix since we can have two elements with the same name but with different class.
+ _get = _element Call GetNamespace;
+ _proceed = false;
+ _prefix = "";
+
+ if (isNil '_get') then {
+ _proceed = true;
+ } else {
+ //--- Two elements can have the same name, like "Javelin(Weapon) >> Javelin (Magazine)", if two elements are found, we compare the class to see if they're already defined or not.
+ if ((_get select 2) == _config) then {
+ diag_log Format ["[WFBE (INIT)][frameno:%3 | ticktime:%4] Core_BAF_G: Duplicated Loadout Element found '%1' for class '%2'",_element,_config,diag_frameno,diag_tickTime];
+ } else {
+ //--- Is it a special class?
+ _get = (_element+'_W') Call GetNamespace;
+ if (isNil '_get') then {
+ _prefix = '_W';
+ _proceed = true;
+ } else {
+ diag_log Format ["[WFBE (INIT)][frameno:%3 | ticktime:%4] Core_BAF_G: Duplicated Loadout Element found '%1' for class '%2'",_element,_config,diag_frameno,diag_tickTime];
+ };
+ };
+ };
+
+ if (_proceed) then {
+ //--- A custom loadout displayName can be set.
+ if ((_info select 1) == '') then {_info set [0, [_element,'displayName',_config] Call GetConfigInfo]};
+ _info set [1, [_element,'picture',_config] Call GetConfigInfo];
+
+ if (_config == 'CfgWeapons') then {
+ //--- A custom loadout magazine can be set.
+ if (typeName (_info select 8) != 'ARRAY') then {
+ _info set [8, getArray (configFile >> _config >> _element >> 'magazines')];
+ };
+ };
+
+ //--- Set the magazine space.
+ if (_config == 'CfgMagazines') then {
+ if ((_info select 3) in ['CfgMagazines','primary','secondary','sidearm']) then {
+ _info set [9, ceil(getNumber(configFile >> _config >> _element >> 'type') / 256)];
+ };
+ };
+
+ [_element+_prefix,_info] Call SetNamespace;
+ };
+ } else {
+ diag_log Format ["[WFBE (ERROR)][frameno:%3 | ticktime:%4] Core_BAF_G: Loadout Element '%1' with class '%2' is not a defined a class!",_element,_config,diag_frameno,diag_tickTime];
+ };
+};
+
+diag_log Format ["[WFBE (INIT)][frameno:%2 | ticktime:%3] Core_BAF_G: Loadout Initialization (%1 Elements) - [Done]",count _u,diag_frameno,diag_tickTime]; \ No newline at end of file
diff --git a/Common/Config/Core_Gear/Core_PMC_G.sqf b/Common/Config/Core_Gear/Core_PMC_G.sqf
new file mode 100644
index 0000000..7dffb3c
--- /dev/null
+++ b/Common/Config/Core_Gear/Core_PMC_G.sqf
@@ -0,0 +1,107 @@
+private ["_config","_element","_get","_i","_info","_prefix","_proceed","_u"];
+
+_u = [];
+_i = [];
+
+/* _i = _i + [[label, picture, config, belong to type, cost, upgrade level, allowed in camps, belong to the handgun pool, magazines, magazine space, allow two weapons]]*/
+
+/* Magazines - West */
+_u = _u + ['20Rnd_B_AA12_Pellets'];
+_i = _i + [['','','CfgMagazines','primary',8,0,true,false,0,0,true]];
+
+_u = _u + ['20Rnd_B_AA12_74Slug'];
+_i = _i + [['','','CfgMagazines','primary',10,0,true,false,0,0,true]];
+
+_u = _u + ['20Rnd_B_AA12_HE'];
+_i = _i + [['','','CfgMagazines','primary',45,3,true,false,0,0,true]];
+
+/* Primary Weapons - West */
+_u = _u + ['AA12_PMC'];
+_i = _i + [['','','CfgWeapons','',380,2,true,false,0,0,true]];
+
+_u = _u + ['m8_carbine'];
+_i = _i + [['','','CfgWeapons','',280,2,true,false,0,0,true]];
+
+_u = _u + ['m8_carbineGL'];
+_i = _i + [['','','CfgWeapons','',290,3,true,false,0,0,true]];
+
+_u = _u + ['m8_compact'];
+_i = _i + [['','','CfgWeapons','',285,2,false,false,0,0,true]];
+
+_u = _u + ['m8_SAW'];
+_i = _i + [['','','CfgWeapons','',310,3,false,false,0,0,false]];
+
+_u = _u + ['m8_sharpshooter'];
+_i = _i + [['','','CfgWeapons','',295,3,false,false,0,0,true]];
+
+_u = _u + ['m8_carbine_pmc'];
+_i = _i + [['','','CfgWeapons','',290,2,true,false,0,0,true]];
+
+_u = _u + ['m8_compact_pmc'];
+_i = _i + [['','','CfgWeapons','',295,2,false,false,0,0,true]];
+
+_u = _u + ['m8_holo_sd'];
+_i = _i + [['','','CfgWeapons','',335,3,false,false,0,0,true]];
+
+_u = _u + ['m8_tws'];
+_i = _i + [['','','CfgWeapons','',350,3,false,false,0,0,true]];
+
+_u = _u + ['m8_tws_sd'];
+_i = _i + [['','','CfgWeapons','',385,3,false,false,0,0,true]];
+
+for '_z' from 0 to (count _u)-1 do {
+ _info = (_i select _z);
+ _element = (_u select _z);
+ _config = (_info select 2);
+
+ if (isClass (configFile >> _config >> _element)) then {
+ //--- The loadout has a prefix since we can have two elements with the same name but with different class.
+ _get = _element Call GetNamespace;
+ _proceed = false;
+ _prefix = "";
+
+ if (isNil '_get') then {
+ _proceed = true;
+ } else {
+ //--- Two elements can have the same name, like "Javelin(Weapon) >> Javelin (Magazine)", if two elements are found, we compare the class to see if they're already defined or not.
+ if ((_get select 2) == _config) then {
+ diag_log Format ["[WFBE (INIT)][frameno:%3 | ticktime:%4] Core_PMC_G: Duplicated Loadout Element found '%1' for class '%2'",_element,_config,diag_frameno,diag_tickTime];
+ } else {
+ //--- Is it a special class?
+ _get = (_element+'_W') Call GetNamespace;
+ if (isNil '_get') then {
+ _prefix = '_W';
+ _proceed = true;
+ } else {
+ diag_log Format ["[WFBE (INIT)][frameno:%3 | ticktime:%4] Core_PMC_G: Duplicated Loadout Element found '%1' for class '%2'",_element,_config,diag_frameno,diag_tickTime];
+ };
+ };
+ };
+
+ if (_proceed) then {
+ //--- A custom loadout displayName can be set.
+ if ((_info select 1) == '') then {_info set [0, [_element,'displayName',_config] Call GetConfigInfo]};
+ _info set [1, [_element,'picture',_config] Call GetConfigInfo];
+
+ if (_config == 'CfgWeapons') then {
+ //--- A custom loadout magazine can be set.
+ if (typeName (_info select 8) != 'ARRAY') then {
+ _info set [8, getArray (configFile >> _config >> _element >> 'magazines')];
+ };
+ };
+
+ //--- Set the magazine space.
+ if (_config == 'CfgMagazines') then {
+ if ((_info select 3) in ['CfgMagazines','primary','secondary','sidearm']) then {
+ _info set [9, ceil(getNumber(configFile >> _config >> _element >> 'type') / 256)];
+ };
+ };
+
+ [_element+_prefix,_info] Call SetNamespace;
+ };
+ } else {
+ diag_log Format ["[WFBE (ERROR)][frameno:%3 | ticktime:%4] Core_PMC_G: Loadout Element '%1' with class '%2' is not a defined a class!",_element,_config,diag_frameno,diag_tickTime];
+ };
+};
+
+diag_log Format ["[WFBE (INIT)][frameno:%2 | ticktime:%3] Core_PMC_G: Loadout Initialization (%1 Elements) - [Done]",count _u,diag_frameno,diag_tickTime]; \ No newline at end of file
diff --git a/Common/Config/Core_Gear/Core_Vanilla_G.sqf b/Common/Config/Core_Gear/Core_Vanilla_G.sqf
new file mode 100644
index 0000000..33cbde4
--- /dev/null
+++ b/Common/Config/Core_Gear/Core_Vanilla_G.sqf
@@ -0,0 +1,811 @@
+private ["_config","_element","_get","_i","_info","_prefix","_proceed","_u"];
+
+_u = [];
+_i = [];
+
+/* _i = _i + [[label, picture, config, belong to type, cost, upgrade level, allowed in camps, belong to the handgun pool, magazines, magazine space, allow two weapons]]*/
+
+/* Magazines - West */
+_u = _u + ['5Rnd_762x51_M24'];
+_i = _i + [['','','CfgMagazines','primary',7,0,true,false,0,0,true]];
+
+_u = _u + ['8Rnd_B_Beneli_74Slug'];
+_i = _i + [['','','CfgMagazines','primary',4,0,true,false,0,0,true]];
+
+_u = _u + ['10Rnd_127x99_m107'];
+_i = _i + [['','','CfgMagazines','primary',18,0,true,false,0,0,true]];
+
+_u = _u + ['20Rnd_762x51_DMR'];
+_i = _i + [['','','CfgMagazines','primary',9,0,true,false,0,0,true]];
+
+_u = _u + ['20Rnd_556x45_Stanag'];
+_i = _i + [['','','CfgMagazines','primary',4,0,true,false,0,0,true]];
+
+_u = _u + ['30Rnd_9x19_MP5'];
+_i = _i + [['','','CfgMagazines','primary',3,0,true,false,0,0,true]];
+
+_u = _u + ['30Rnd_9x19_MP5SD'];
+_i = _i + [['','','CfgMagazines','primary',4,0,true,false,0,0,true]];
+
+_u = _u + ['30Rnd_556x45_G36'];
+_i = _i + [['','','CfgMagazines','primary',7,0,true,false,0,0,true]];
+
+_u = _u + ['30Rnd_556x45_G36SD'];
+_i = _i + [['','','CfgMagazines','primary',9,0,true,false,0,0,true]];
+
+_u = _u + ['30Rnd_556x45_Stanag'];
+_i = _i + [['','','CfgMagazines','primary',5,0,true,false,0,0,true]];
+
+_u = _u + ['30Rnd_556x45_StanagSD'];
+_i = _i + [['','','CfgMagazines','primary',7,0,true,false,0,0,true]];
+
+_u = _u + ['100Rnd_556x45_BetaCMag'];
+_i = _i + [['','','CfgMagazines','primary',16,0,true,false,0,0,true]];
+
+_u = _u + ['100Rnd_762x51_M240'];
+_i = _i + [['','','CfgMagazines','primary',14,0,true,false,0,0,true]];
+
+_u = _u + ['200Rnd_556x45_M249'];
+_i = _i + [['','','CfgMagazines','primary',24,0,true,false,0,0,true]];
+
+_u = _u + ['Laserbatteries'];
+_i = _i + [['','','CfgMagazines','secondary',20,3,true,false,0,0,true]];
+
+_u = _u + ['Javelin'];
+_i = _i + [['','','CfgMagazines','secondary',290,3,false,false,0,0,true]];
+
+_u = _u + ['M136'];
+_i = _i + [['','','CfgMagazines','secondary',50,0,true,false,0,0,true]];
+
+_u = _u + ['SMAW_HEAA'];
+_i = _i + [['','','CfgMagazines','secondary',225,2,false,false,0,0,true]];
+
+_u = _u + ['SMAW_HEDP'];
+_i = _i + [['','','CfgMagazines','secondary',250,3,false,false,0,0,true]];
+
+_u = _u + ['Stinger'];
+_i = _i + [['','','CfgMagazines','secondary',100,2,false,false,0,0,true]];
+
+_u = _u + ['7Rnd_45ACP_1911'];
+_i = _i + [['','','CfgMagazines','sidearm',2,0,true,true,0,0,true]];
+
+_u = _u + ['15Rnd_9x19_M9'];
+_i = _i + [['','','CfgMagazines','sidearm',2,0,true,true,0,0,true]];
+
+_u = _u + ['15Rnd_9x19_M9SD'];
+_i = _i + [['','','CfgMagazines','sidearm',3,0,true,true,0,0,true]];
+
+if (WF_ACE) then
+{
+ _u = _u + ['ACE_SMAW_Spotting'];
+ _i = _i + [['','','CfgMagazines','CfgMagazines',5,2,true,true,0,0,true]];
+
+ _u = _u + ['ACE_30Rnd_556x45_T_G36'];
+ _i = _i + [['','','CfgMagazines','primary',9,0,true,false,0,0,true]];
+
+ _u = _u + ['ACE_30Rnd_556x45_S_G36'];
+ _i = _i + [['','','CfgMagazines','primary',8,0,true,false,0,0,true]];
+
+ _u = _u + ['ACE_20Rnd_762x51_T_HK417'];
+ _i = _i + [['','','CfgMagazines','primary',10,1,true,false,0,0,true]];
+
+ _u = _u + ['ACE_20Rnd_762x51_S_HK417'];
+ _i = _i + [['','','CfgMagazines','primary',9,1,true,false,0,0,true]];
+
+ _u = _u + ['ACE_5Rnd_762x51_T_M24'];
+ _i = _i + [['','','CfgMagazines','primary',8,0,true,false,0,0,true]];
+
+ _u = _u + ['ACE_20Rnd_762x51_B_HK417'];
+ _i = _i + [['','','CfgMagazines','primary',9,2,true,false,0,0,true]];
+
+ _u = _u + ['ACE_30Rnd_556x45_T_Stanag'];
+ _i = _i + [['','','CfgMagazines','primary',7,0,true,false,0,0,true]];
+
+ _u = _u + ['ACE_30Rnd_556x45_S_Stanag'];
+ _i = _i + [['','','CfgMagazines','primary',6,0,true,false,0,0,true]];
+
+ _u = _u + ['ACE_20Rnd_762x51_T_M110'];
+ _i = _i + [['','','CfgMagazines','primary',10,1,true,false,0,0,true]];
+
+ _u = _u + ['ACE_100Rnd_556x45_T_M249'];
+ _i = _i + [['','','CfgMagazines','primary',17,0,true,false,0,0,true]];
+
+ _u = _u + ['ACE_200Rnd_556x45_T_M249'];
+ _i = _i + [['','','CfgMagazines','primary',25,0,true,false,0,0,true]];
+
+ _u = _u + ['ACE_10Rnd_127x99_T_m107'];
+ _i = _i + [['','','CfgMagazines','primary',19,3,true,false,0,0,true]];
+
+ _u = _u + ['ACE_10Rnd_127x99_Raufoss_m107'];
+ _i = _i + [['','','CfgMagazines','primary',25,3,true,false,0,0,true]];
+
+ _u = _u + ['ACE_5Rnd_25x59_HEDP_Barrett'];
+ _i = _i + [['','','CfgMagazines','primary',35,3,true,false,0,0,true]];
+
+ _u = _u + ['ACE_M252HE_CSWDM'];
+ _i = _i + [['','','CfgMagazines','secondary',40,1,true,false,0,0,true]];
+
+ _u = _u + ['ACE_M252WP_CSWDM'];
+ _i = _i + [['','','CfgMagazines','secondary',15,1,true,false,0,0,true]];
+
+ _u = _u + ['ACE_M2_CSWDM'];
+ _i = _i + [['','','CfgMagazines','secondary',20,0,true,false,0,0,true]];
+
+ _u = _u + ['ACE_TOW_CSWDM'];
+ _i = _i + [['','','CfgMagazines','secondary',100,2,true,false,0,0,true]];
+
+ _u = _u + ['ACE_20Rnd_762x51_SB_SCAR'];
+ _i = _i + [['','','CfgMagazines','secondary',15,2,true,false,0,0,true]];
+
+ _u = _u + ['ACE_20Rnd_762x51_SB_S_SCAR'];
+ _i = _i + [['','','CfgMagazines','secondary',15,2,true,false,0,0,true]];
+};
+
+/* Magazines - East */
+_u = _u + ['5x_22_LR_17_HMR'];
+_i = _i + [['','','CfgMagazines','primary',3,0,true,false,0,0,true]];
+
+_u = _u + ['5Rnd_127x108_KSVK'];
+_i = _i + [['','','CfgMagazines','primary',11,0,true,false,0,0,true]];
+
+_u = _u + ['8Rnd_B_Saiga12_74Slug'];
+_i = _i + [['','','CfgMagazines','primary',5,0,true,false,0,0,true]];
+
+_u = _u + ['10Rnd_9x39_SP5_VSS'];
+_i = _i + [['','','CfgMagazines','primary',5,0,true,false,0,0,true]];
+
+_u = _u + ['10Rnd_762x54_SVD'];
+_i = _i + [['','','CfgMagazines','primary',6,0,true,false,0,0,true]];
+
+_u = _u + ['20Rnd_9x39_SP5_VSS'];
+_i = _i + [['','','CfgMagazines','primary',9,0,true,false,0,0,true]];
+
+_u = _u + ['30Rnd_545x39_AK'];
+_i = _i + [['','','CfgMagazines','primary',4,0,true,false,0,0,true]];
+
+_u = _u + ['30Rnd_545x39_AKSD'];
+_i = _i + [['','','CfgMagazines','primary',6,0,true,false,0,0,true]];
+
+_u = _u + ['30Rnd_762x39_AK47'];
+_i = _i + [['','','CfgMagazines','primary',3,0,true,false,0,0,true]];
+
+_u = _u + ['64Rnd_9x19_Bizon'];
+_i = _i + [['','','CfgMagazines','primary',6,0,true,false,0,0,true]];
+
+_u = _u + ['64Rnd_9x19_SD_Bizon'];
+_i = _i + [['','','CfgMagazines','primary',8,0,true,false,0,0,true]];
+
+_u = _u + ['75Rnd_545x39_RPK'];
+_i = _i + [['','','CfgMagazines','primary',9,0,true,false,0,0,true]];
+
+_u = _u + ['100Rnd_762x54_PK'];
+_i = _i + [['','','CfgMagazines','primary',12,0,true,false,0,0,true]];
+
+_u = _u + ['AT13'];
+_i = _i + [['','','CfgMagazines','secondary',280,3,false,false,0,0,true]];
+
+_u = _u + ['Igla'];
+_i = _i + [['','','CfgMagazines','secondary',110,2,false,false,0,0,true]];
+
+_u = _u + ['OG7'];
+_i = _i + [['','','CfgMagazines','secondary',95,2,false,false,0,0,true]];
+
+_u = _u + ['PG7V'];
+_i = _i + [['','','CfgMagazines','secondary',50,0,true,false,0,0,true]];
+
+_u = _u + ['PG7VR'];
+_i = _i + [['','','CfgMagazines','secondary',100,2,false,false,0,0,true]];
+
+_u = _u + ['PG7VL'];
+_i = _i + [['','','CfgMagazines','secondary',70,1,true,false,0,0,true]];
+
+_u = _u + ['RPG18'];
+_i = _i + [['','','CfgMagazines','secondary',40,0,true,false,0,0,true]];
+
+_u = _u + ['Strela'];
+_i = _i + [['','','CfgMagazines','secondary',100,0,false,false,0,0,true]];
+
+_u = _u + ['8Rnd_9x18_Makarov'];
+_i = _i + [['','','CfgMagazines','sidearm',2,0,true,true,0,0,true]];
+
+_u = _u + ['8Rnd_9x18_MakarovSD'];
+_i = _i + [['','','CfgMagazines','sidearm',3,0,true,true,0,0,true]];
+
+if (WF_ACE) then
+{
+ _u = _u + ['ACE_75Rnd_762x39_B_AK47'];
+ _i = _i + [['','','CfgMagazines','primary',6,0,true,false,0,0,true]];
+
+ _u = _u + ['ACE_40Rnd_762x39_B_AK47'];
+ _i = _i + [['','','CfgMagazines','primary',4,0,true,false,0,0,true]];
+
+ _u = _u + ['ACE_75Rnd_762x39_T_AK47'];
+ _i = _i + [['','','CfgMagazines','primary',6,0,true,false,0,0,true]];
+
+ _u = _u + ['ACE_40Rnd_762x39_T_AK47'];
+ _i = _i + [['','','CfgMagazines','primary',5,0,true,false,0,0,true]];
+
+ _u = _u + ['ACE_30Rnd_762x39_T_AK47'];
+ _i = _i + [['','','CfgMagazines','primary',5,0,true,false,0,0,true]];
+
+ _u = _u + ['ACE_30Rnd_762x39_SD_AK47'];
+ _i = _i + [['','','CfgMagazines','primary',5,0,true,false,0,0,true]];
+
+ _u = _u + ['ACE_75Rnd_545x39_T_RPK'];
+ _i = _i + [['','','CfgMagazines','primary',10,0,true,false,0,0,true]];
+
+ _u = _u + ['ACE_30Rnd_545x39_T_AK'];
+ _i = _i + [['','','CfgMagazines','primary',5,0,true,false,0,0,true]];
+
+ _u = _u + ['ACE_10Rnd_762x54_T_SVD'];
+ _i = _i + [['','','CfgMagazines','primary',5,0,true,false,0,0,true]];
+
+ _u = _u + ['ACE_5Rnd_127x108_T_KSVK'];
+ _i = _i + [['','','CfgMagazines','primary',12,0,true,false,0,0,true]];
+
+ _u = _u + ['ACE_TBG7V'];
+ _i = _i + [['','','CfgMagazines','secondary',120,2,true,false,0,0,true]];
+
+ _u = _u + ['ACE_OG7_PGO7'];
+ _i = _i + [['','','CfgMagazines','secondary',95,1,true,false,0,0,true]];
+
+ _u = _u + ['ACE_PG7V_PGO7'];
+ _i = _i + [['','','CfgMagazines','secondary',50,0,true,false,0,0,true]];
+
+ _u = _u + ['ACE_PG7VL_PGO7'];
+ _i = _i + [['','','CfgMagazines','secondary',70,0,true,false,0,0,true]];
+
+ _u = _u + ['ACE_PG7VR_PGO7'];
+ _i = _i + [['','','CfgMagazines','secondary',100,0,true,false,0,0,true]];
+
+ _u = _u + ['ACE_TBG7V_PGO7'];
+ _i = _i + [['','','CfgMagazines','secondary',120,2,true,false,0,0,true]];
+
+ _u = _u + ['ACE_RPG29_PG29'];
+ _i = _i + [['','','CfgMagazines','secondary',85,2,true,false,0,0,true]];
+
+ _u = _u + ['ACE_RPG29_TBG29'];
+ _i = _i + [['','','CfgMagazines','secondary',110,2,true,false,0,0,true]];
+
+ _u = _u + ['ACE_2B14HE_CSWDM'];
+ _i = _i + [['','','CfgMagazines','secondary',40,1,true,false,0,0,true]];
+
+ _u = _u + ['ACE_2B14WP_CSWDM'];
+ _i = _i + [['','','CfgMagazines','secondary',15,1,true,false,0,0,true]];
+
+ _u = _u + ['ACE_KORD_CSWDM'];
+ _i = _i + [['','','CfgMagazines','secondary',20,0,true,false,0,0,true]];
+
+ _u = _u + ['ACE_Konkurs_CSWDM'];
+ _i = _i + [['','','CfgMagazines','secondary',100,2,true,false,0,0,true]];
+
+ _u = _u + ['ACE_30Rnd_762x39_T_SA58'];
+ _i = _i + [['','','CfgMagazines','secondary',5,1,true,false,0,0,true]];
+};
+
+/* Primary weapons - West */
+_u = _u + ['DMR'];
+_i = _i + [['','','CfgWeapons','',270,2,false,false,0,0,true]];
+
+_u = _u + ['G36a'];
+_i = _i + [['','','CfgWeapons','',225,1,false,false,0,0,true]];
+
+_u = _u + ['G36C'];
+_i = _i + [['','','CfgWeapons','',195,0,true,false,0,0,true]];
+
+_u = _u + ['G36_C_SD_eotech'];
+_i = _i + [['','','CfgWeapons','',210,2,false,false,0,0,true]];
+
+_u = _u + ['G36K'];
+_i = _i + [['','','CfgWeapons','',205,1,false,false,0,0,true]];
+
+_u = _u + ['M16A2'];
+_i = _i + [['','','CfgWeapons','',60,0,true,false,0,0,true]];
+
+_u = _u + ['M16A2GL'];
+_i = _i + [['','','CfgWeapons','',70,0,true,false,0,0,true]];
+
+_u = _u + ['m16a4'];
+_i = _i + [['','','CfgWeapons','',75,0,true,false,0,0,true]];
+
+_u = _u + ['m16a4_acg'];
+_i = _i + [['','','CfgWeapons','',85,1,true,false,0,0,true]];
+
+_u = _u + ['M16A4_ACG_GL'];
+_i = _i + [['','','CfgWeapons','',95,1,true,false,0,0,true]];
+
+_u = _u + ['M16A4_GL'];
+_i = _i + [['','','CfgWeapons','',90,0,true,false,0,0,true]];
+
+_u = _u + ['M24'];
+_i = _i + [['','','CfgWeapons','',140,0,true,false,0,0,true]];
+
+_u = _u + ['M40A3'];
+_i = _i + [['','','CfgWeapons','',155,2,false,false,0,0,true]];
+
+_u = _u + ['M240'];
+_i = _i + [['','','CfgWeapons','',150,0,true,false,0,0,false]];
+
+_u = _u + ['M249'];
+_i = _i + [['','','CfgWeapons','',185,2,true,false,0,0,false]];
+
+_u = _u + ['M4A1'];
+_i = _i + [['','','CfgWeapons','',95,0,true,false,0,0,true]];
+
+_u = _u + ['M4A1_Aim'];
+_i = _i + [['','','CfgWeapons','',105,0,true,false,0,0,true]];
+
+_u = _u + ['M4A1_Aim_camo'];
+_i = _i + [['','','CfgWeapons','',150,1,true,false,0,0,true]];
+
+_u = _u + ['M4SPR'];
+_i = _i + [['','','CfgWeapons','',160,1,true,false,0,0,true]];
+
+_u = _u + ['M4A1_RCO_GL'];
+_i = _i + [['','','CfgWeapons','',115,2,true,false,0,0,true]];
+
+_u = _u + ['M4A1_AIM_SD_camo'];
+_i = _i + [['','','CfgWeapons','',165,3,false,false,0,0,true]];
+
+_u = _u + ['M4A1_HWS_GL_SD_Camo'];
+_i = _i + [['','','CfgWeapons','',200,3,false,false,0,0,true]];
+
+_u = _u + ['M4A1_HWS_GL'];
+_i = _i + [['','','CfgWeapons','',180,3,false,false,0,0,true]];
+
+_u = _u + ['M4A1_HWS_GL_camo'];
+_i = _i + [['','','CfgWeapons','',195,3,false,false,0,0,true]];
+
+_u = _u + ['m8_carbine'];
+_i = _i + [['','','CfgWeapons','',280,2,true,false,0,0,true]];
+
+_u = _u + ['m8_carbineGL'];
+_i = _i + [['','','CfgWeapons','',290,3,true,false,0,0,true]];
+
+_u = _u + ['m8_compact'];
+_i = _i + [['','','CfgWeapons','',285,2,false,false,0,0,true]];
+
+_u = _u + ['m8_SAW'];
+_i = _i + [['','','CfgWeapons','',310,3,false,false,0,0,false]];
+
+_u = _u + ['m8_sharpshooter'];
+_i = _i + [['','','CfgWeapons','',295,3,false,false,0,0,true]];
+
+_u = _u + ['m107'];
+_i = _i + [['','','CfgWeapons','',310,3,false,false,0,0,false]];
+
+_u = _u + ['M1014'];
+_i = _i + [['','','CfgWeapons','',60,0,true,false,0,0,true]];
+
+_u = _u + ['Mk_48'];
+_i = _i + [['','','CfgWeapons','',220,3,false,false,0,0,false]];
+
+_u = _u + ['MP5A5'];
+_i = _i + [['','','CfgWeapons','',70,0,true,false,["30Rnd_9x19_MP5","30Rnd_9x19_MP5SD"],0,true]];
+
+_u = _u + ['MP5SD'];
+_i = _i + [['','','CfgWeapons','',90,1,true,false,["30Rnd_9x19_MP5SD"],0,true]];
+
+_u = _u + ['MG36'];
+_i = _i + [['','','CfgWeapons','',240,2,false,false,0,0,false]];
+
+if (WF_ACE) then
+{
+ _u = _u + ['ACE_HK416_D10'];
+ _i = _i + [['','','CfgWeapons','',100,0,true,false,0,0,true]];
+
+ _u = _u + ['ACE_HK416_D10_Holo'];
+ _i = _i + [['','','CfgWeapons','',120,1,true,false,0,0,true]];
+
+ _u = _u + ['ACE_HK416_D10_COMPM3_SD'];
+ _i = _i + [['','','CfgWeapons','',140,1,true,false,0,0,true]];
+
+ _u = _u + ['ACE_HK416_D10_M320'];
+ _i = _i + [['','','CfgWeapons','',150,0,true,false,0,0,true]];
+
+ _u = _u + ['ACE_HK416_D14'];
+ _i = _i + [['','','CfgWeapons','',105,0,true,false,0,0,true]];
+
+ _u = _u + ['ACE_HK416_D14_ACOG_PVS14'];
+ _i = _i + [['','','CfgWeapons','',155,1,true,false,0,0,true]];
+
+ _u = _u + ['ACE_HK416_D14_TWS'];
+ _i = _i + [['','','CfgWeapons','',220,3,true,false,0,0,true]];
+
+ _u = _u + ['ACE_HK416_D14_COMPM3_M320'];
+ _i = _i + [['','','CfgWeapons','',165,1,true,false,0,0,true]];
+
+ _u = _u + ['ACE_HK417_Eotech_4x'];
+ _i = _i + [['','','CfgWeapons','',125,2,true,false,0,0,true]];
+
+ _u = _u + ['ACE_HK417_micro'];
+ _i = _i + [['','','CfgWeapons','',115,2,true,false,0,0,true]];
+
+ _u = _u + ['ACE_HK417_leupold'];
+ _i = _i + [['','','CfgWeapons','',115,2,true,false,0,0,true]];
+
+ _u = _u + ['ACE_M109'];
+ _i = _i + [['','','CfgWeapons','',350,3,true,false,0,0,false]];
+
+ _u = _u + ['ACE_Javelin_CLU'];
+ _i = _i + [['','','CfgWeapons','Special',160,3,true,false,0,0,false]];
+};
+
+/* Primary weapons - East */
+_u = _u + ['AK_47_M'];
+_i = _i + [['','','CfgWeapons','',40,0,true,false,0,0,true]];
+
+_u = _u + ['AK_47_S'];
+_i = _i + [['','','CfgWeapons','',50,0,true,false,0,0,true]];
+
+_u = _u + ['AK_74'];
+_i = _i + [['','','CfgWeapons','',60,0,true,false,0,0,true]];
+
+_u = _u + ['AK_74_GL'];
+_i = _i + [['','','CfgWeapons','',70,0,true,false,0,0,true]];
+
+_u = _u + ['AK_107_kobra'];
+_i = _i + [['','','CfgWeapons','',110,0,true,false,0,0,true]];
+
+_u = _u + ['AK_107_GL_kobra'];
+_i = _i + [['','','CfgWeapons','',120,0,true,false,0,0,true]];
+
+_u = _u + ['AK_107_pso'];
+_i = _i + [['','','CfgWeapons','',125,1,false,false,0,0,true]];
+
+_u = _u + ['AK_107_GL_pso'];
+_i = _i + [['','','CfgWeapons','',135,1,false,false,0,0,true]];
+
+_u = _u + ['AKS_74_kobra'];
+_i = _i + [['','','CfgWeapons','',90,0,true,false,0,0,true]];
+
+_u = _u + ['AKS_74_pso'];
+_i = _i + [['','','CfgWeapons','',105,1,true,false,0,0,true]];
+
+_u = _u + ['AKS_74_U'];
+_i = _i + [['','','CfgWeapons','',115,0,true,false,0,0,true]];
+
+_u = _u + ['AKS_74_UN_kobra'];
+_i = _i + [['','','CfgWeapons','',155,2,true,false,0,0,true]];
+
+_u = _u + ['AKS_GOLD'];
+_i = _i + [['','','CfgWeapons','',350,2,true,false,0,0,true]];
+
+_u = _u + ['bizon'];
+_i = _i + [['','','CfgWeapons','',155,1,true,false,0,0,true]];
+
+_u = _u + ['bizon_silenced'];
+_i = _i + [['','','CfgWeapons','',175,2,false,false,0,0,true]];
+
+_u = _u + ['PK'];
+_i = _i + [['','','CfgWeapons','',190,0,true,false,0,0,false]];
+
+_u = _u + ['Pecheneg'];
+_i = _i + [['','','CfgWeapons','',225,2,false,false,0,0,false]];
+
+_u = _u + ['RPK_74'];
+_i = _i + [['','','CfgWeapons','',185,1,true,false,0,0,true]];
+
+_u = _u + ['huntingrifle'];
+_i = _i + [['','','CfgWeapons','',120,0,true,false,0,0,true]];
+
+_u = _u + ['SVD'];
+_i = _i + [['','','CfgWeapons','',160,1,true,false,0,0,true]];
+
+_u = _u + ['SVD_CAMO'];
+_i = _i + [['','','CfgWeapons','',180,2,false,false,0,0,true]];
+
+_u = _u + ['Saiga12K'];
+_i = _i + [['','','CfgWeapons','',85,0,true,false,0,0,true]];
+
+_u = _u + ['ksvk'];
+_i = _i + [['','','CfgWeapons','',255,3,false,false,0,0,false]];
+
+_u = _u + ['VSS_vintorez'];
+_i = _i + [['','','CfgWeapons','',220,2,false,false,0,0,true]];
+
+if (WF_ACE) then
+{
+ _u = _u + ['ACE_SVD_Bipod'];
+ _i = _i + [['','','CfgWeapons','',190,2,true,false,0,0,true]];
+
+ _u = _u + ['ACE_AK103'];
+ _i = _i + [['','','CfgWeapons','',120,0,true,false,0,0,true]];
+
+ _u = _u + ['ACE_AK103_Kobra'];
+ _i = _i + [['','','CfgWeapons','',130,1,true,false,0,0,true]];
+
+ _u = _u + ['ACE_AK103_PSO'];
+ _i = _i + [['','','CfgWeapons','',150,1,true,false,0,0,true]];
+
+ _u = _u + ['ACE_AK104_Kobra'];
+ _i = _i + [['','','CfgWeapons','',120,1,true,false,0,0,true]];
+
+ _u = _u + ['ACE_AK104'];
+ _i = _i + [['','','CfgWeapons','',105,1,true,false,0,0,true]];
+
+ _u = _u + ['ACE_AK104_PSO'];
+ _i = _i + [['','','CfgWeapons','',130,2,true,false,0,0,true]];
+
+ _u = _u + ['ACE_AK104_1P29'];
+ _i = _i + [['','','CfgWeapons','',135,2,true,false,0,0,true]];
+
+ _u = _u + ['ACE_AK103_GL'];
+ _i = _i + [['','','CfgWeapons','',160,0,true,false,0,0,true]];
+
+ _u = _u + ['ACE_AK103_1P29'];
+ _i = _i + [['','','CfgWeapons','',140,2,true,false,0,0,true]];
+
+ _u = _u + ['ACE_AK103_GL_1P29'];
+ _i = _i + [['','','CfgWeapons','',175,2,true,false,0,0,true]];
+
+ _u = _u + ['ACE_AK103_GL_PSO'];
+ _i = _i + [['','','CfgWeapons','',175,2,true,false,0,0,true]];
+
+ _u = _u + ['ACE_AK103_GL_Kobra'];
+ _i = _i + [['','','CfgWeapons','',155,2,true,false,0,0,true]];
+
+ _u = _u + ['ACE_AK105_1P29'];
+ _i = _i + [['','','CfgWeapons','',125,1,true,false,0,0,true]];
+
+ _u = _u + ['ACE_AK105_PSO'];
+ _i = _i + [['','','CfgWeapons','',130,1,true,false,0,0,true]];
+
+ _u = _u + ['ACE_AK105_Kobra'];
+ _i = _i + [['','','CfgWeapons','',105,0,true,false,0,0,true]];
+
+ _u = _u + ['ACE_RPK74M_1P29'];
+ _i = _i + [['','','CfgWeapons','',205,2,true,false,0,0,true]];
+
+ _u = _u + ['ACE_AKMS_SD'];
+ _i = _i + [['','','CfgWeapons','',120,1,true,false,0,0,true]];
+
+ _u = _u + ['ACE_AK74M_GL_1P29'];
+ _i = _i + [['','','CfgWeapons','',140,1,true,false,0,0,true]];
+
+ _u = _u + ['ACE_AK74M_GL_PSO'];
+ _i = _i + [['','','CfgWeapons','',145,1,true,false,0,0,true]];
+
+ _u = _u + ['ACE_AK74M_GL_Kobra'];
+ _i = _i + [['','','CfgWeapons','',120,0,true,false,0,0,true]];
+
+ _u = _u + ['ACE_AK74M_PSO'];
+ _i = _i + [['','','CfgWeapons','',105,1,true,false,0,0,true]];
+
+ _u = _u + ['ACE_AK74M_1P29'];
+ _i = _i + [['','','CfgWeapons','',105,1,true,false,0,0,true]];
+};
+
+/* Secondary weapons - West */
+_u = _u + ['Javelin'];
+_i = _i + [['','','CfgWeapons','',450,3,false,false,0,0,false]];
+
+_u = _u + ['Laserdesignator'];
+_i = _i + [['','','CfgWeapons','Special',275,3,true,false,0,0,true]];
+
+_u = _u + ['M136'];
+_i = _i + [['','','CfgWeapons','',85,0,true,false,0,0,false]];
+
+_u = _u + ['SMAW'];
+_i = _i + [['','','CfgWeapons','',325,2,false,false,0,0,false]];
+
+_u = _u + ['Stinger'];
+_i = _i + [['','','CfgWeapons','',250,2,false,false,0,0,false]];
+
+/* Secondary weapons - East */
+_u = _u + ['Igla'];
+_i = _i + [['','','CfgWeapons','',250,2,false,false,0,0,false]];
+
+_u = _u + ['MetisLauncher'];
+_i = _i + [['','','CfgWeapons','',375,3,false,false,0,0,false]];
+
+_u = _u + ['RPG7V'];
+_i = _i + [['','','CfgWeapons','',90,1,true,false,0,0,false]];
+
+_u = _u + ['RPG18'];
+_i = _i + [['','','CfgWeapons','',50,0,true,false,0,0,false]];
+
+_u = _u + ['Strela'];
+_i = _i + [['','','CfgWeapons','',230,2,false,false,0,0,false]];
+
+if (WF_ACE) then
+{
+ _u = _u + ['ACE_RPG27'];
+ _i = _i + [['','','CfgWeapons','',95,1,true,false,0,0,false]];
+
+ _u = _u + ['ACE_RPG7V_PGO7'];
+ _i = _i + [['','','CfgWeapons','',175,1,true,false,0,0,false]];
+
+ _u = _u + ['ACE_RPG29'];
+ _i = _i + [['','','CfgWeapons','',165,2,true,false,0,0,false]];
+};
+
+/* Pistols - West */
+_u = _u + ['Colt1911'];
+_i = _i + [['','','CfgWeapons','',15,0,true,false,0,0,true]];
+
+_u = _u + ['M9'];
+_i = _i + [['','','CfgWeapons','',20,0,true,false,0,0,true]];
+
+_u = _u + ['M9SD'];
+_i = _i + [['','','CfgWeapons','',25,0,true,false,0,0,true]];
+
+/* Pistols - East */
+_u = _u + ['Makarov'];
+_i = _i + [['','','CfgWeapons','',8,0,true,false,0,0,true]];
+
+_u = _u + ['MakarovSD'];
+_i = _i + [['','','CfgWeapons','',15,0,true,false,0,0,true]];
+
+/* Misc - West */
+_u = _u + ['HandGrenade_West'];
+_i = _i + [['','','CfgMagazines','CfgMagazines',10,0,true,false,0,0,true]];
+
+_u = _u + ['HandGrenade_Stone'];
+_i = _i + [['','','CfgMagazines','CfgMagazines',1,0,true,false,0,0,true]];
+
+_u = _u + ['SmokeShell'];
+_i = _i + [['','','CfgMagazines','CfgMagazines',8,0,true,false,0,0,true]];
+
+_u = _u + ['SmokeShellRed'];
+_i = _i + [['','','CfgMagazines','CfgMagazines',8,0,true,false,0,0,true]];
+
+_u = _u + ['SmokeShellGreen'];
+_i = _i + [['','','CfgMagazines','CfgMagazines',8,0,true,false,0,0,true]];
+
+_u = _u + ['SmokeShellBlue'];
+_i = _i + [['','','CfgMagazines','CfgMagazines',8,0,true,false,0,0,true]];
+
+_u = _u + ['SmokeShellYellow'];
+_i = _i + [['','','CfgMagazines','CfgMagazines',8,0,true,false,0,0,true]];
+
+_u = _u + ['SmokeShellOrange'];
+_i = _i + [['','','CfgMagazines','CfgMagazines',8,0,true,false,0,0,true]];
+
+_u = _u + ['SmokeShellPurple'];
+_i = _i + [['','','CfgMagazines','CfgMagazines',8,0,true,false,0,0,true]];
+
+_u = _u + ['FlareWhite_M203'];
+_i = _i + [['','','CfgMagazines','CfgMagazines',9,0,true,true,0,0,true]];
+
+_u = _u + ['FlareYellow_M203'];
+_i = _i + [['','','CfgMagazines','CfgMagazines',9,0,true,true,0,0,true]];
+
+_u = _u + ['FlareGreen_M203'];
+_i = _i + [['','','CfgMagazines','CfgMagazines',9,0,true,true,0,0,true]];
+
+_u = _u + ['FlareRed_M203'];
+_i = _i + [['','','CfgMagazines','CfgMagazines',9,0,true,true,0,0,true]];
+
+_u = _u + ['1Rnd_HE_M203'];
+_i = _i + [['','','CfgMagazines','CfgMagazines',15,0,true,true,0,0,true]];
+
+_u = _u + ['1Rnd_Smoke_M203'];
+_i = _i + [['','','CfgMagazines','CfgMagazines',12,0,true,true,0,0,true]];
+
+_u = _u + ['1Rnd_SmokeRed_M203'];
+_i = _i + [['','','CfgMagazines','CfgMagazines',12,0,true,true,0,0,true]];
+
+_u = _u + ['1Rnd_SmokeGreen_M203'];
+_i = _i + [['','','CfgMagazines','CfgMagazines',12,0,true,true,0,0,true]];
+
+_u = _u + ['1Rnd_SmokeYellow_M203'];
+_i = _i + [['','','CfgMagazines','CfgMagazines',12,0,true,true,0,0,true]];
+
+_u = _u + ['Mine'];
+_i = _i + [['','','CfgMagazines','CfgMagazines',35,0,true,false,0,0,true]];
+
+_u = _u + ['PipeBomb'];
+_i = _i + [['','','CfgMagazines','CfgMagazines',50,0,true,false,0,0,true]];
+
+_u = _u + ['Binocular'];
+_i = _i + [['','','CfgWeapons','Special',10,0,true,false,0,0,true]];
+
+_u = _u + ['NVGoggles'];
+_i = _i + [['','','CfgWeapons','Special',20,0,true,false,0,0,true]];
+
+_u = _u + ['ItemCompass'];
+_i = _i + [['','','CfgWeapons','Item',4,0,true,false,0,0,true]];
+
+_u = _u + ['ItemGPS'];
+_i = _i + [['','','CfgWeapons','Item',25,0,true,false,0,0,true]];
+
+_u = _u + ['ItemMap'];
+_i = _i + [['','','CfgWeapons','Item',5,0,true,false,0,0,true]];
+
+_u = _u + ['ItemRadio'];
+_i = _i + [['','','CfgWeapons','Item',10,0,true,false,0,0,true]];
+
+_u = _u + ['ItemWatch'];
+_i = _i + [['','','CfgWeapons','Item',5,0,true,false,0,0,true]];
+
+/* Misc - East */
+_u = _u + ['HandGrenade_East'];
+_i = _i + [['','','CfgMagazines','CfgMagazines',9,0,true,false,0,0,true]];
+
+_u = _u + ['FlareWhite_GP25'];
+_i = _i + [['','','CfgMagazines','CfgMagazines',8,0,true,true,0,0,true]];
+
+_u = _u + ['FlareYellow_GP25'];
+_i = _i + [['','','CfgMagazines','CfgMagazines',8,0,true,true,0,0,true]];
+
+_u = _u + ['FlareGreen_GP25'];
+_i = _i + [['','','CfgMagazines','CfgMagazines',8,0,true,true,0,0,true]];
+
+_u = _u + ['FlareRed_GP25'];
+_i = _i + [['','','CfgMagazines','CfgMagazines',8,0,true,true,0,0,true]];
+
+_u = _u + ['1Rnd_HE_GP25'];
+_i = _i + [['','','CfgMagazines','CfgMagazines',13,0,true,true,0,0,true]];
+
+_u = _u + ['1Rnd_SMOKE_GP25'];
+_i = _i + [['','','CfgMagazines','CfgMagazines',10,0,true,true,0,0,true]];
+
+_u = _u + ['1Rnd_SMOKERED_GP25'];
+_i = _i + [['','','CfgMagazines','CfgMagazines',10,0,true,true,0,0,true]];
+
+_u = _u + ['1Rnd_SMOKEGREEN_GP25'];
+_i = _i + [['','','CfgMagazines','CfgMagazines',10,0,true,true,0,0,true]];
+
+_u = _u + ['1Rnd_SMOKEYELLOW_GP25'];
+_i = _i + [['','','CfgMagazines','CfgMagazines',10,0,true,true,0,0,true]];
+
+_u = _u + ['MineE'];
+_i = _i + [['','','CfgMagazines','CfgMagazines',40,0,true,false,0,0,true]];
+
+for '_z' from 0 to (count _u)-1 do {
+ _info = (_i select _z);
+ _element = (_u select _z);
+ _config = (_info select 2);
+
+ if (isClass (configFile >> _config >> _element)) then {
+ //--- The loadout has a prefix since we can have two elements with the same name but with different class.
+ _get = _element Call GetNamespace;
+ _proceed = false;
+ _prefix = "";
+
+ if (isNil '_get') then {
+ _proceed = true;
+ } else {
+ //--- Two elements can have the same name, like "Javelin(Weapon) >> Javelin (Magazine)", if two elements are found, we compare the class to see if they're already defined or not.
+ if ((_get select 2) == _config) then {
+ diag_log Format ["[WFBE (INIT)][frameno:%3 | ticktime:%4] Core_Vanilla_G: Duplicated Loadout Element found '%1' for class '%2'",_element,_config,diag_frameno,diag_tickTime];
+ } else {
+ //--- Is it a special class?
+ _get = (_element+'_W') Call GetNamespace;
+ if (isNil '_get') then {
+ _prefix = '_w';
+ _proceed = true;
+ } else {
+ diag_log Format ["[WFBE (INIT)][frameno:%3 | ticktime:%4] Core_Vanilla_G: Duplicated Loadout Element found '%1' for class '%2'",_element,_config,diag_frameno,diag_tickTime];
+ };
+ };
+ };
+
+ if (_proceed) then {
+ //--- A custom loadout displayName can be set.
+ if ((_info select 1) == '') then {_info set [0, [_element,'displayName',_config] Call GetConfigInfo]};
+ _info set [1, [_element,'picture',_config] Call GetConfigInfo];
+
+ if (_config == 'CfgWeapons') then {
+ //--- A custom loadout magazine can be set.
+ if (typeName (_info select 8) != 'ARRAY') then {
+ _info set [8, getArray (configFile >> _config >> _element >> 'magazines')];
+ };
+ };
+
+ //--- Set the magazine space.
+ if (_config == 'CfgMagazines') then {
+ if ((_info select 3) in ['CfgMagazines','primary','secondary','sidearm']) then {
+ _info set [9, ceil(getNumber(configFile >> _config >> _element >> 'type') / 256)];
+ };
+ };
+
+ [_element+_prefix,_info] Call SetNamespace;
+ };
+ } else {
+ diag_log Format ["[WFBE (ERROR)][frameno:%3 | ticktime:%4] Core_Vanilla_G: Loadout Element '%1' with class '%2' is not a defined a class!",_element,_config,diag_frameno,diag_tickTime];
+ };
+};
+
+diag_log Format ["[WFBE (INIT)][frameno:%2 | ticktime:%3] Core_Vanilla_G: Loadout Initialization (%1 Elements) - [Done]",count _u,diag_frameno,diag_tickTime]; \ No newline at end of file
diff --git a/Common/Config/Core_Loadout/Arrowhead/Loadout_TK.sqf b/Common/Config/Core_Loadout/Arrowhead/Loadout_TK.sqf
new file mode 100644
index 0000000..03c3ace
--- /dev/null
+++ b/Common/Config/Core_Loadout/Arrowhead/Loadout_TK.sqf
@@ -0,0 +1,355 @@
+/* TK Loadout */
+Private ['_tiMode'];
+_tiMode = 'WFBE_THERMALIMAGING' Call GetNamespace;
+_tiMode = if (_tiMode == 1 || _tiMode == 3) then {true} else {false};
+
+if (!isServer || local player) then {
+ if (side player == EAST) then {
+ /* Magazines. */
+ _m = ["30Rnd_762x39_AK47"];
+ _m = _m + ["30Rnd_556x45_Stanag"];
+ _m = _m + ["30Rnd_545x39_AK"];
+ _m = _m + ["30Rnd_545x39_AKSD"];
+ _m = _m + ["100Rnd_762x54_PK"];
+ _m = _m + ["75Rnd_545x39_RPK"];
+ _m = _m + ["10Rnd_762x54_SVD"];
+ _m = _m + ["5Rnd_127x108_KSVK"];
+ _m = _m + ["10x_303"];
+ _m = _m + ["30Rnd_762x39_SA58"];
+ _m = _m + ["20Rnd_762x51_FNFAL"];
+ _m = _m + ["PG7V"];
+ _m = _m + ["PG7VL"];
+ _m = _m + ["OG7"];
+ _m = _m + ["PG7VR"];
+ _m = _m + ["RPG18"];
+ _m = _m + ["Dragon_EP1"];
+ _m = _m + ["AT13"];
+ _m = _m + ["Igla"];
+ _m = _m + ["Strela"];
+ _m = _m + ["Laserbatteries"];
+ _m = _m + ["6Rnd_45ACP"];
+ _m = _m + ["8Rnd_9x18_Makarov"];
+ _m = _m + ["8Rnd_9x18_MakarovSD"];
+ _m = _m + ["10Rnd_B_765x17_Ball"];
+ _m = _m + ["20Rnd_B_765x17_Ball"];
+ _m = _m + ["30Rnd_9x19_UZI"];
+ _m = _m + ["30Rnd_9x19_UZI_SD"];
+
+ WF_Logic setVariable ['magazineClasses',_m];
+
+ /* Primary. */
+ _w = ['AK_47_M'];
+ _w = _w + ['AK_47_S'];
+ _w = _w + ['M16A2'];
+ _w = _w + ['M16A2GL'];
+ _w = _w + ['AK_74'];
+ _w = _w + ['AK_74_GL'];
+ _w = _w + ['AK_74_GL_kobra'];
+ _w = _w + ['AKS_74'];
+ if (_tiMode) then {
+ _w = _w + ['AKS_74_GOSHAWK'];
+ };
+ _w = _w + ['AKS_74_kobra'];
+ _w = _w + ['AKS_74_NSPU'];
+ _w = _w + ['AKS_74_pso'];
+ _w = _w + ['AKS_74_U'];
+ _w = _w + ['FN_FAL'];
+ _w = _w + ['FN_FAL_ANPVS4'];
+ _w = _w + ['LeeEnfield'];
+ _w = _w + ['PK'];
+ _w = _w + ['RPK_74'];
+ _w = _w + ['Sa58P_EP1'];
+ _w = _w + ['Sa58V_EP1'];
+ _w = _w + ['Sa58V_RCO_EP1'];
+ _w = _w + ['Sa58V_CCO_EP1'];
+ _w = _w + ['SVD'];
+ _w = _w + ['SVD_des_EP1'];
+ _w = _w + ['SVD_NSPU_EP1'];
+ _w = _w + ['ksvk'];;
+
+ WF_Logic setVariable ['primaryClasses',_w];
+
+ /* Secondary. */
+ _w = ['RPG7V'];
+ _w = _w + ['RPG18'];
+ _w = _w + ['M47Launcher_EP1'];
+ _w = _w + ['MetisLauncher'];
+ _w = _w + ['Igla'];
+ _w = _w + ['Strela'];
+ _w = _w + ['Laserdesignator'];
+
+ /* Not all units are able to carry a backpack */
+ _get = getNumber(configFile >> 'CfgVehicles' >> typeOf player >> 'canCarryBackPack');
+
+ if (_get == 1) then {
+ _w = _w + ['TK_Assault_Pack_EP1'];
+ _w = _w + ['TK_RPG_Backpack_EP1'];
+ _w = _w + ['TK_ALICE_Pack_EP1'];
+ _w = _w + ['Tripod_Bag'];
+ _w = _w + ['KORD_TK_Bag_EP1'];
+ _w = _w + ['KORD_high_TK_Bag_EP1'];
+ _w = _w + ['SPG9_TK_INS_Bag_EP1'];
+ _w = _w + ['AGS_TK_Bag_EP1'];
+ _w = _w + ['Metis_TK_Bag_EP1'];
+ _w = _w + ['2b14_82mm_TK_Bag_EP1'];
+ };
+
+ WF_Logic setVariable ['secondaryClasses',_w];
+
+ /* Sidearm. */
+ _w = ['Makarov'];
+ _w = _w + ['revolver_EP1'];
+ _w = _w + ['revolver_gold_EP1'];
+ _w = _w + ['MakarovSD'];
+ _w = _w + ['Sa61_EP1'];
+ _w = _w + ['UZI_EP1'];
+ _w = _w + ['UZI_SD_EP1'];
+
+ WF_Logic setVariable ['sidearmClasses',_w];
+
+ /* Misc. */
+ _w = ['HandGrenade_East'];
+ _w = _w + ['HandGrenade_Stone'];
+ _w = _w + ['SmokeShell'];
+ _w = _w + ['SmokeShellRed'];
+ _w = _w + ['SmokeShellGreen'];
+ _w = _w + ['SmokeShellBlue'];
+ _w = _w + ['SmokeShellYellow'];
+ _w = _w + ['SmokeShellOrange'];
+ _w = _w + ['SmokeShellPurple'];
+ _w = _w + ['FlareWhite_GP25'];
+ _w = _w + ['FlareYellow_GP25'];
+ _w = _w + ['FlareGreen_GP25'];
+ _w = _w + ['FlareRed_GP25'];
+ _w = _w + ['1Rnd_HE_M203'];
+ _w = _w + ['1Rnd_HE_GP25'];
+ _w = _w + ['1Rnd_SMOKE_GP25'];
+ _w = _w + ['1Rnd_SMOKERED_GP25'];
+ _w = _w + ['1Rnd_SMOKEGREEN_GP25'];
+ _w = _w + ['1Rnd_SMOKEYELLOW_GP25'];
+
+ if (paramDLCBAF) then {
+ _w = _w + ['BAF_ied_v1'];
+ _w = _w + ['BAF_ied_v2'];
+ _w = _w + ['BAF_ied_v3'];
+ _w = _w + ['BAF_ied_v4'];
+ };
+
+ _w = _w + ['MineE'];
+ _w = _w + ['PipeBomb'];
+ _w = _w + ['Binocular'];
+ _w = _w + ['NVGoggles'];
+ _w = _w + ['Binocular_Vector'];
+ _w = _w + ['ItemCompass'];
+ _w = _w + ['ItemGPS'];
+ _w = _w + ['ItemMap'];
+ _w = _w + ['ItemRadio'];
+ _w = _w + ['ItemWatch'];
+
+ WF_Logic setVariable ['miscClasses',_w];
+
+ //--- Templates.
+ _items = ['ItemCompass','ItemGPS','ItemMap','ItemRadio','ItemWatch'];
+
+ _d = [getText(configFile >> 'CfgWeapons' >> 'AKS_74_kobra' >> 'displayName') + '/' + getText(configFile >> 'CfgWeapons' >> 'Makarov' >> 'displayName')];
+ _p = [getText(configFile >> 'CfgWeapons' >> 'AKS_74_kobra' >> 'picture')];
+ _t = [['AKS_74_kobra','Makarov']];
+ _m = [['30Rnd_545x39_AK','30Rnd_545x39_AK','30Rnd_545x39_AK','30Rnd_545x39_AK','30Rnd_545x39_AK','30Rnd_545x39_AK','30Rnd_545x39_AK','30Rnd_545x39_AK',
+ 'HandGrenade_East','HandGrenade_East','SmokeShellBlue','SmokeShellBlue','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov',
+ '8Rnd_9x18_Makarov','8Rnd_9x18_Makarov']];
+ _s = [['Binocular']];
+ _i = [_items];
+ _l = [0];
+ _b = [true];
+
+ _d = _d + [getText(configFile >> 'CfgWeapons' >> 'AK_74_GL_kobra' >> 'displayName')];
+ _p = _p + [getText(configFile >> 'CfgWeapons' >> 'AK_74_GL_kobra' >> 'picture')];
+ _t = _t + [['AK_74_GL_kobra']];
+ _m = _m + [['30Rnd_545x39_AK','30Rnd_545x39_AK','30Rnd_545x39_AK','30Rnd_545x39_AK','30Rnd_545x39_AK','30Rnd_545x39_AK','30Rnd_545x39_AK','30Rnd_545x39_AK',
+ '30Rnd_545x39_AK','30Rnd_545x39_AK','HandGrenade_East','HandGrenade_East','1Rnd_HE_GP25','1Rnd_HE_GP25','1Rnd_HE_GP25','1Rnd_HE_GP25','1Rnd_HE_GP25','1Rnd_HE_GP25',
+ '1Rnd_HE_GP25','1Rnd_HE_GP25']];
+ _s = _s + [['Binocular']];
+ _i = _i + [_items];
+ _l = _l + [0];
+ _b = _b + [true];
+
+ _d = _d + [getText(configFile >> 'CfgWeapons' >> 'AKS_74_pso' >> 'displayName') + '/' + getText(configFile >> 'CfgWeapons' >> 'RPG7V' >> 'displayName')];
+ _p = _p + [getText(configFile >> 'CfgWeapons' >> 'AKS_74_pso' >> 'picture')];
+ _t = _t + [['AKS_74_pso','RPG7V']];
+ _m = _m + [['30Rnd_545x39_AK','30Rnd_545x39_AK','30Rnd_545x39_AK','30Rnd_545x39_AK','30Rnd_545x39_AK','30Rnd_545x39_AK','PG7VL','PG7VL','PG7VL']];
+ _s = _s + [['Binocular','NVGoggles']];
+ _i = _i + [_items];
+ _l = _l + [1];
+ _b = _b + [false];
+
+ _d = _d + [getText(configFile >> 'CfgWeapons' >> 'AK_74_GL' >> 'displayName') + '/' + getText(configFile >> 'CfgWeapons' >> 'RPG7V' >> 'displayName')];
+ _p = _p + [getText(configFile >> 'CfgWeapons' >> 'AK_74_GL' >> 'picture')];
+ _t = _t + [['AK_74_GL','RPG7V']];
+ _m = _m + [['30Rnd_545x39_AK','30Rnd_545x39_AK','30Rnd_545x39_AK','30Rnd_545x39_AK','30Rnd_545x39_AK','30Rnd_545x39_AK','PG7V',
+ 'PG7V','PG7V','1Rnd_HE_GP25','1Rnd_HE_GP25','1Rnd_HE_GP25','1Rnd_HE_GP25','1Rnd_HE_GP25','1Rnd_HE_GP25','1Rnd_HE_GP25','1Rnd_HE_GP25']];
+ _s = _s + [['Binocular','NVGoggles']];
+ _i = _i + [_items];
+ _l = _l + [1];
+ _b = _b + [false];
+
+ _d = _d + [getText(configFile >> 'CfgWeapons' >> 'Sa58V_RCO_EP1' >> 'displayName') + '/' + getText(configFile >> 'CfgWeapons' >> 'RPG7V' >> 'displayName') + '/' + getText(configFile >> 'CfgWeapons' >> 'Makarov' >> 'displayName')];
+ _p = _p + [getText(configFile >> 'CfgWeapons' >> 'Sa58V_RCO_EP1' >> 'picture')];
+ _t = _t + [['Sa58V_RCO_EP1','RPG7V','Makarov']];
+ _m = _m + [['30Rnd_762x39_SA58','30Rnd_762x39_SA58','30Rnd_762x39_SA58','30Rnd_762x39_SA58','30Rnd_762x39_SA58','30Rnd_762x39_SA58','PG7VL','PG7VL','PG7VL',
+ '8Rnd_9x18_Makarov','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov']];
+ _s = _s + [['Binocular','NVGoggles']];
+ _i = _i + [_items];
+ _l = _l + [1];
+ _b = _b + [true];
+
+ _d = _d + [getText(configFile >> 'CfgWeapons' >> 'AKS_74_kobra' >> 'displayName') + '/' + getText(configFile >> 'CfgWeapons' >> 'MetisLauncher' >> 'displayName') + '/' + getText(configFile >> 'CfgWeapons' >> 'Makarov' >> 'displayName')];
+ _p = _p + [getText(configFile >> 'CfgWeapons' >> 'AKS_74_kobra' >> 'picture')];
+ _t = _t + [['AKS_74_kobra','MetisLauncher','Makarov']];
+ _m = _m + [['30Rnd_545x39_AK','30Rnd_545x39_AK','30Rnd_545x39_AK','30Rnd_545x39_AK','30Rnd_545x39_AK','30Rnd_545x39_AK','AT13',
+ '8Rnd_9x18_Makarov','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov']];
+ _s = _s + [['Binocular','NVGoggles']];
+ _i = _i + [_items];
+ _l = _l + [3];
+ _b = _b + [false];
+
+ _d = _d + [getText(configFile >> 'CfgWeapons' >> 'AK_74' >> 'displayName') + '/' + getText(configFile >> 'CfgWeapons' >> 'Igla' >> 'displayName') + '/' + getText(configFile >> 'CfgWeapons' >> 'Makarov' >> 'displayName')];
+ _p = _p + [getText(configFile >> 'CfgWeapons' >> 'AK_74' >> 'picture')];
+ _t = _t + [['AK_74','Igla','Makarov']];
+ _m = _m + [['30Rnd_545x39_AK','30Rnd_545x39_AK','30Rnd_545x39_AK','30Rnd_545x39_AK','30Rnd_545x39_AK','30Rnd_545x39_AK','Igla',
+ '8Rnd_9x18_Makarov','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov']];
+ _s = _s + [['Binocular','NVGoggles']];
+ _i = _i + [_items];
+ _l = _l + [2];
+ _b = _b + [false];
+
+ _d = _d + [getText(configFile >> 'CfgWeapons' >> 'AKS_74_U' >> 'displayName') + '/' + getText(configFile >> 'CfgWeapons' >> 'Makarov' >> 'displayName') + '/' + getText(configFile >> 'CfgMagazines' >> 'MineE' >> 'displayName')];
+ _p = _p + [getText(configFile >> 'CfgWeapons' >> 'AKS_74_U' >> 'picture')];
+ _t = _t + [['AKS_74_U','Makarov']];
+ _m = _m + [['30Rnd_545x39_AK','30Rnd_545x39_AK','30Rnd_545x39_AK','30Rnd_545x39_AK','30Rnd_545x39_AK','30Rnd_545x39_AK','MineE','MineE','MineE',
+ '8Rnd_9x18_Makarov','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov']];
+ _s = _s + [['Binocular']];
+ _i = _i + [_items];
+ _l = _l + [0];
+ _b = _b + [true];
+
+ if (_tiMode) then {
+ _d = _d + [getText(configFile >> 'CfgWeapons' >> 'AKS_74_GOSHAWK' >> 'displayName') + '/' + getText(configFile >> 'CfgWeapons' >> 'MakarovSD' >> 'displayName') + '/' + getText(configFile >> 'CfgMagazines' >> 'PipeBomb' >> 'displayName')];
+ _p = _p + [getText(configFile >> 'CfgWeapons' >> 'AKS_74_GOSHAWK' >> 'picture')];
+ _t = _t + [['AKS_74_GOSHAWK','MakarovSD']];
+ _m = _m + [['30Rnd_545x39_AK','30Rnd_545x39_AK','30Rnd_545x39_AK','30Rnd_545x39_AK','30Rnd_545x39_AK','30Rnd_545x39_AK','PipeBomb','PipeBomb','PipeBomb',
+ '8Rnd_9x18_MakarovSD','8Rnd_9x18_MakarovSD','8Rnd_9x18_MakarovSD','8Rnd_9x18_MakarovSD','8Rnd_9x18_MakarovSD','8Rnd_9x18_MakarovSD','8Rnd_9x18_MakarovSD','8Rnd_9x18_MakarovSD']];
+ _s = _s + [['Binocular_Vector','NVGoggles']];
+ _i = _i + [_items];
+ _l = _l + [2];
+ _b = _b + [true];
+ };
+
+ _d = _d + [getText(configFile >> 'CfgWeapons' >> 'PK' >> 'displayName') + '/' + getText(configFile >> 'CfgWeapons' >> 'Makarov' >> 'displayName')];
+ _p = _p + [getText(configFile >> 'CfgWeapons' >> 'PK' >> 'picture')];
+ _t = _t + [['PK','Makarov']];
+ _m = _m + [['100Rnd_762x54_PK','100Rnd_762x54_PK','100Rnd_762x54_PK','100Rnd_762x54_PK','100Rnd_762x54_PK','SmokeShellBlue','SmokeShellBlue','8Rnd_9x18_Makarov',
+ '8Rnd_9x18_Makarov','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov']];
+ _s = _s + [['Binocular']];
+ _i = _i + [_items];
+ _l = _l + [0];
+ _b = _b + [true];
+
+ _d = _d + [getText(configFile >> 'CfgWeapons' >> 'SVD_des_EP1' >> 'displayName') + '/' + getText(configFile >> 'CfgWeapons' >> 'MakarovSD' >> 'displayName')];
+ _p = _p + [getText(configFile >> 'CfgWeapons' >> 'SVD_des_EP1' >> 'picture')];
+ _t = _t + [['SVD_des_EP1','MakarovSD']];
+ _m = _m + [['10Rnd_762x54_SVD','10Rnd_762x54_SVD','10Rnd_762x54_SVD','10Rnd_762x54_SVD','10Rnd_762x54_SVD','10Rnd_762x54_SVD','10Rnd_762x54_SVD','10Rnd_762x54_SVD',
+ '10Rnd_762x54_SVD','10Rnd_762x54_SVD','HandGrenade_East','HandGrenade_East','8Rnd_9x18_MakarovSD','8Rnd_9x18_MakarovSD','8Rnd_9x18_MakarovSD','8Rnd_9x18_MakarovSD','8Rnd_9x18_MakarovSD',
+ '8Rnd_9x18_MakarovSD','8Rnd_9x18_MakarovSD','8Rnd_9x18_MakarovSD']];
+ _s = _s + [['Binocular']];
+ _i = _i + [_items];
+ _l = _l + [0];
+ _b = _b + [true];
+
+ _d = _d + [getText(configFile >> 'CfgWeapons' >> 'AKS_74_NSPU' >> 'displayName') + '/' + getText(configFile >> 'CfgWeapons' >> 'Laserdesignator' >> 'displayName') + '/' + getText(configFile >> 'CfgWeapons' >> 'MakarovSD' >> 'displayName')];
+ _p = _p + [getText(configFile >> 'CfgWeapons' >> 'AKS_74_NSPU' >> 'picture')];
+ _t = _t + [['AKS_74_NSPU','Laserdesignator','MakarovSD']];
+ _m = _m + [['30Rnd_545x39_AK','30Rnd_545x39_AK','30Rnd_545x39_AK','30Rnd_545x39_AK','30Rnd_545x39_AK','30Rnd_545x39_AK','30Rnd_545x39_AK','30Rnd_545x39_AK',
+ '30Rnd_545x39_AK','30Rnd_545x39_AK','HandGrenade_East','Laserbatteries','8Rnd_9x18_MakarovSD','8Rnd_9x18_MakarovSD','8Rnd_9x18_MakarovSD','8Rnd_9x18_MakarovSD','8Rnd_9x18_MakarovSD',
+ '8Rnd_9x18_MakarovSD','8Rnd_9x18_MakarovSD','8Rnd_9x18_MakarovSD']];
+ _s = _s + [['Binocular_Vector','NVGoggles']];
+ _i = _i + [_items];
+ _l = _l + [2];
+ _b = _b + [false];
+
+ _d = _d + [getText(configFile >> 'CfgWeapons' >> 'ksvk' >> 'displayName') + '/' + getText(configFile >> 'CfgWeapons' >> 'MakarovSD' >> 'displayName')];
+ _p = _p + [getText(configFile >> 'CfgWeapons' >> 'ksvk' >> 'picture')];
+ _t = _t + [['ksvk','MakarovSD']];
+ _m = _m + [['5Rnd_127x108_KSVK','5Rnd_127x108_KSVK','5Rnd_127x108_KSVK','5Rnd_127x108_KSVK','5Rnd_127x108_KSVK','5Rnd_127x108_KSVK','5Rnd_127x108_KSVK','5Rnd_127x108_KSVK',
+ '5Rnd_127x108_KSVK','5Rnd_127x108_KSVK','HandGrenade_East','HandGrenade_East','8Rnd_9x18_MakarovSD','8Rnd_9x18_MakarovSD','8Rnd_9x18_MakarovSD','8Rnd_9x18_MakarovSD','8Rnd_9x18_MakarovSD',
+ '8Rnd_9x18_MakarovSD','8Rnd_9x18_MakarovSD','8Rnd_9x18_MakarovSD']];
+ _s = _s + [['Binocular','NVGoggles']];
+ _i = _i + [_items];
+ _l = _l + [3];
+ _b = _b + [false];
+
+ _c = [];
+ _totalTemplates = count _d;
+
+ for [{_count = 0},{_count < _totalTemplates},{_count = _count + 1}] do {
+ _cost = 0;
+ {
+ _get = (_x+"_W") Call GetNamespace;
+ if (isNil '_get') then {
+ _get = _x Call GetNamespace;
+ };
+ if !(isNil '_get') then {_cost = _cost + (_get select QUERYGEARCOST)};
+ } forEach (_t select _count);
+
+ {
+ _get = _x Call GetNamespace;
+ if !(isNil '_get') then {_cost = _cost + (_get select QUERYGEARCOST)};
+ } forEach ((_m select _count) + (_s select _count) + (_i select _count));
+
+ _c = _c + [_cost];
+ };
+ WF_Logic setVariable ['templateClasses',_t];
+ WF_Logic setVariable ['templateNames',_d];
+ WF_Logic setVariable ['templateCosts',_c];
+ WF_Logic setVariable ['templatePictures',_p];
+ WF_Logic setVariable ['templateMags',_m];
+ WF_Logic setVariable ['templateItems',_i];
+ WF_Logic setVariable ['templateSpecs',_s];
+ WF_Logic setVariable ['templateUpgrades',_l];
+ WF_Logic setVariable ['templateAllowed',_b];
+ };
+};
+
+['WFBE_EASTDEFAULTWEAPONS',['AK_74','ItemCompass','ItemMap','ItemWatch','ItemRadio'],true] Call SetNamespace;
+['WFBE_EASTDEFAULTAMMO',['30Rnd_545x39_AK','30Rnd_545x39_AK','30Rnd_545x39_AK','30Rnd_545x39_AK','30Rnd_545x39_AK','30Rnd_545x39_AK','HandGrenade_East','HandGrenade_East'],true] Call SetNamespace;
+
+//--- AI Leaders Loadouts.
+if (isServer) then {
+ //--- No Upgrade.
+ ['WFBE_EASTLEADERWEAPONS01',['AKS_74','RPG18','Makarov','Binocular','ItemRadio','ItemMap'],true] Call SetNamespace;
+ ['WFBE_EASTLEADERAMMO01',['30Rnd_545x39_AK','30Rnd_545x39_AK','30Rnd_545x39_AK','30Rnd_545x39_AK','30Rnd_545x39_AK','30Rnd_545x39_AK','RPG18','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov'],true] Call SetNamespace;
+ ['WFBE_EASTLEADERWEAPONS02',['AKS_74_kobra','RPG18','Makarov','Binocular','ItemRadio','ItemMap'],true] Call SetNamespace;
+ ['WFBE_EASTLEADERAMMO02',['30Rnd_545x39_AK','30Rnd_545x39_AK','30Rnd_545x39_AK','30Rnd_545x39_AK','30Rnd_545x39_AK','30Rnd_545x39_AK','RPG18','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov'],true] Call SetNamespace;
+ ['WFBE_EASTLEADERWEAPONS03',['PK','Makarov','Binocular','ItemRadio','ItemMap'],true] Call SetNamespace;;
+ ['WFBE_EASTLEADERAMMO03',['100Rnd_762x54_PK','100Rnd_762x54_PK','100Rnd_762x54_PK','100Rnd_762x54_PK','100Rnd_762x54_PK','HandGrenade_East','HandGrenade_East','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov'],true] Call SetNamespace;
+ //--- Upgrade 1.
+ ['WFBE_EASTLEADERWEAPONS11',['AKS_74_kobra','RPG7V','Makarov','Binocular','NVGoggles','ItemRadio','ItemMap'],true] Call SetNamespace;
+ ['WFBE_EASTLEADERAMMO11',['30Rnd_545x39_AK','30Rnd_545x39_AK','30Rnd_545x39_AK','30Rnd_545x39_AK','30Rnd_545x39_AK','30Rnd_545x39_AK','PG7VL','PG7VL','PG7VL','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov'],true] Call SetNamespace;
+ ['WFBE_EASTLEADERWEAPONS12',['RPK_74','RPG7V','Makarov','Binocular','NVGoggles','ItemRadio','ItemMap'],true] Call SetNamespace;
+ ['WFBE_EASTLEADERAMMO12',['75Rnd_545x39_RPK','75Rnd_545x39_RPK','75Rnd_545x39_RPK','75Rnd_545x39_RPK','75Rnd_545x39_RPK','75Rnd_545x39_RPK','PG7VL','PG7VL','PG7VL','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov'],true] Call SetNamespace;
+ ['WFBE_EASTLEADERWEAPONS13',['SVD','MakarovSD','Binocular','NVGoggles','ItemRadio','ItemMap'],true] Call SetNamespace;
+ ['WFBE_EASTLEADERAMMO13',['10Rnd_762x54_SVD','10Rnd_762x54_SVD','10Rnd_762x54_SVD','10Rnd_762x54_SVD','10Rnd_762x54_SVD','10Rnd_762x54_SVD','10Rnd_762x54_SVD','10Rnd_762x54_SVD','10Rnd_762x54_SVD','10Rnd_762x54_SVD','HandGrenade_East','HandGrenade_East','8Rnd_9x18_MakarovSD','8Rnd_9x18_MakarovSD','8Rnd_9x18_MakarovSD','8Rnd_9x18_MakarovSD'],true] Call SetNamespace;
+ //--- Upgrade 2.
+ ['WFBE_EASTLEADERWEAPONS21',['AKS_74_NSPU','RPG7V','Makarov','Binocular','NVGoggles','ItemRadio','ItemMap'],true] Call SetNamespace;
+ ['WFBE_EASTLEADERAMMO21',['30Rnd_545x39_AK','30Rnd_545x39_AK','30Rnd_545x39_AK','30Rnd_545x39_AK','30Rnd_545x39_AK','30Rnd_545x39_AK','PG7VL','PG7VL','PG7VL','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov'],true] Call SetNamespace;
+ ['WFBE_EASTLEADERWEAPONS22',['SVD_des_EP1','RPG7V','Makarov','Binocular','NVGoggles','ItemRadio','ItemMap'],true] Call SetNamespace;
+ ['WFBE_EASTLEADERAMMO22',['10Rnd_762x54_SVD','10Rnd_762x54_SVD','10Rnd_762x54_SVD','10Rnd_762x54_SVD','10Rnd_762x54_SVD','10Rnd_762x54_SVD','PG7VL','PG7VL','PG7VL','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov'],true] Call SetNamespace;
+ ['WFBE_EASTLEADERWEAPONS23',['PK','Makarov','Binocular','NVGoggles','ItemRadio','ItemMap'],true] Call SetNamespace;
+ ['WFBE_EASTLEADERAMMO23',['100Rnd_762x54_PK','100Rnd_762x54_PK','100Rnd_762x54_PK','100Rnd_762x54_PK','100Rnd_762x54_PK','HandGrenade_East','HandGrenade_East','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov'],true] Call SetNamespace;
+ //--- Upgrade 3.
+ ['WFBE_EASTLEADERWEAPONS31',['AK_74_GL','RPG7V','Binocular','NVGoggles','ItemRadio','ItemMap'],true] Call SetNamespace;
+ ['WFBE_EASTLEADERAMMO31',['30Rnd_545x39_AK','30Rnd_545x39_AK','30Rnd_545x39_AK','30Rnd_545x39_AK','30Rnd_545x39_AK','30Rnd_545x39_AK','PG7VL','PG7VL','PG7VL','1Rnd_HE_GP25','1Rnd_HE_GP25','1Rnd_HE_GP25','1Rnd_HE_GP25'],true] Call SetNamespace;
+ ['WFBE_EASTLEADERWEAPONS32',['Sa58V_RCO_EP1','MetisLauncher','Makarov','Binocular','NVGoggles','ItemRadio','ItemMap'],true] Call SetNamespace;
+ ['WFBE_EASTLEADERAMMO32',['30Rnd_762x39_SA58','30Rnd_762x39_SA58','30Rnd_762x39_SA58','30Rnd_762x39_SA58','30Rnd_762x39_SA58','30Rnd_762x39_SA58','AT13','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov'],true] Call SetNamespace;
+ ['WFBE_EASTLEADERWEAPONS33',['SVD_NSPU_EP1','Makarov','Binocular','NVGoggles','ItemRadio','ItemMap'],true] Call SetNamespace;
+ ['WFBE_EASTLEADERAMMO33',['10Rnd_762x54_SVD','10Rnd_762x54_SVD','10Rnd_762x54_SVD','10Rnd_762x54_SVD','10Rnd_762x54_SVD','10Rnd_762x54_SVD','10Rnd_762x54_SVD','10Rnd_762x54_SVD','10Rnd_762x54_SVD','10Rnd_762x54_SVD','HandGrenade_East','HandGrenade_East','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov'],true] Call SetNamespace;
+}; \ No newline at end of file
diff --git a/Common/Config/Core_Loadout/Arrowhead/Loadout_TKA.sqf b/Common/Config/Core_Loadout/Arrowhead/Loadout_TKA.sqf
new file mode 100644
index 0000000..5b7e7cd
--- /dev/null
+++ b/Common/Config/Core_Loadout/Arrowhead/Loadout_TKA.sqf
@@ -0,0 +1,355 @@
+/* TK Loadout */
+Private ['_tiMode'];
+_tiMode = 'WFBE_THERMALIMAGING' Call GetNamespace;
+_tiMode = if (_tiMode == 1 || _tiMode == 3) then {true} else {false};
+
+if (!isServer || local player) then {
+ if (side player == EAST) then {
+ /* Magazines. */
+ _m = ["30Rnd_762x39_AK47"];
+ _m = _m + ["30Rnd_556x45_Stanag"];
+ _m = _m + ["30Rnd_545x39_AK"];
+ _m = _m + ["30Rnd_545x39_AKSD"];
+ _m = _m + ["100Rnd_762x54_PK"];
+ _m = _m + ["75Rnd_545x39_RPK"];
+ _m = _m + ["10Rnd_762x54_SVD"];
+ _m = _m + ["5Rnd_127x108_KSVK"];
+ _m = _m + ["10x_303"];
+ _m = _m + ["30Rnd_762x39_SA58"];
+ _m = _m + ["20Rnd_762x51_FNFAL"];
+ _m = _m + ["PG7V"];
+ _m = _m + ["PG7VL"];
+ _m = _m + ["OG7"];
+ _m = _m + ["PG7VR"];
+ _m = _m + ["RPG18"];
+ _m = _m + ["Dragon_EP1"];
+ _m = _m + ["AT13"];
+ _m = _m + ["Igla"];
+ _m = _m + ["Strela"];
+ _m = _m + ["Laserbatteries"];
+ _m = _m + ["6Rnd_45ACP"];
+ _m = _m + ["8Rnd_9x18_Makarov"];
+ _m = _m + ["8Rnd_9x18_MakarovSD"];
+ _m = _m + ["10Rnd_B_765x17_Ball"];
+ _m = _m + ["20Rnd_B_765x17_Ball"];
+ _m = _m + ["30Rnd_9x19_UZI"];
+ _m = _m + ["30Rnd_9x19_UZI_SD"];
+
+ WF_Logic setVariable ['magazineClasses',_m];
+
+ /* Primary. */
+ _w = ['AK_47_M'];
+ _w = _w + ['AK_47_S'];
+ _w = _w + ['M16A2'];
+ _w = _w + ['M16A2GL'];
+ _w = _w + ['AK_74'];
+ _w = _w + ['AK_74_GL'];
+ _w = _w + ['AK_74_GL_kobra'];
+ _w = _w + ['AKS_74'];
+ if (_tiMode) then {
+ _w = _w + ['AKS_74_GOSHAWK'];
+ };
+ _w = _w + ['AKS_74_kobra'];
+ _w = _w + ['AKS_74_NSPU'];
+ _w = _w + ['AKS_74_pso'];
+ _w = _w + ['AKS_74_U'];
+ _w = _w + ['FN_FAL'];
+ _w = _w + ['FN_FAL_ANPVS4'];
+ _w = _w + ['LeeEnfield'];
+ _w = _w + ['PK'];
+ _w = _w + ['RPK_74'];
+ _w = _w + ['Sa58P_EP1'];
+ _w = _w + ['Sa58V_EP1'];
+ _w = _w + ['Sa58V_RCO_EP1'];
+ _w = _w + ['Sa58V_CCO_EP1'];
+ _w = _w + ['SVD'];
+ _w = _w + ['SVD_des_EP1'];
+ _w = _w + ['SVD_NSPU_EP1'];
+ _w = _w + ['ksvk'];;
+
+ WF_Logic setVariable ['primaryClasses',_w];
+
+ /* Secondary. */
+ _w = ['RPG7V'];
+ _w = _w + ['RPG18'];
+ _w = _w + ['M47Launcher_EP1'];
+ _w = _w + ['MetisLauncher'];
+ _w = _w + ['Igla'];
+ _w = _w + ['Strela'];
+ _w = _w + ['Laserdesignator'];
+
+ /* Not all units are able to carry a backpack */
+ _get = getNumber(configFile >> 'CfgVehicles' >> typeOf player >> 'canCarryBackPack');
+
+ if (_get == 1) then {
+ _w = _w + ['TK_Assault_Pack_EP1'];
+ _w = _w + ['TK_RPG_Backpack_EP1'];
+ _w = _w + ['TK_ALICE_Pack_EP1'];
+ _w = _w + ['Tripod_Bag'];
+ _w = _w + ['KORD_TK_Bag_EP1'];
+ _w = _w + ['KORD_high_TK_Bag_EP1'];
+ _w = _w + ['SPG9_TK_INS_Bag_EP1'];
+ _w = _w + ['AGS_TK_Bag_EP1'];
+ _w = _w + ['Metis_TK_Bag_EP1'];
+ _w = _w + ['2b14_82mm_TK_Bag_EP1'];
+ };
+
+ WF_Logic setVariable ['secondaryClasses',_w];
+
+ /* Sidearm. */
+ _w = ['Makarov'];
+ _w = _w + ['revolver_EP1'];
+ _w = _w + ['revolver_gold_EP1'];
+ _w = _w + ['MakarovSD'];
+ _w = _w + ['Sa61_EP1'];
+ _w = _w + ['UZI_EP1'];
+ _w = _w + ['UZI_SD_EP1'];
+
+ WF_Logic setVariable ['sidearmClasses',_w];
+
+ /* Misc. */
+ _w = ['HandGrenade_East'];
+ _w = _w + ['HandGrenade_Stone'];
+ _w = _w + ['SmokeShell'];
+ _w = _w + ['SmokeShellRed'];
+ _w = _w + ['SmokeShellGreen'];
+ _w = _w + ['SmokeShellBlue'];
+ _w = _w + ['SmokeShellYellow'];
+ _w = _w + ['SmokeShellOrange'];
+ _w = _w + ['SmokeShellPurple'];
+ _w = _w + ['FlareWhite_GP25'];
+ _w = _w + ['FlareYellow_GP25'];
+ _w = _w + ['FlareGreen_GP25'];
+ _w = _w + ['FlareRed_GP25'];
+ _w = _w + ['1Rnd_HE_M203'];
+ _w = _w + ['1Rnd_HE_GP25'];
+ _w = _w + ['1Rnd_SMOKE_GP25'];
+ _w = _w + ['1Rnd_SMOKERED_GP25'];
+ _w = _w + ['1Rnd_SMOKEGREEN_GP25'];
+ _w = _w + ['1Rnd_SMOKEYELLOW_GP25'];
+
+ if (paramDLCBAF) then {
+ _w = _w + ['BAF_ied_v1'];
+ _w = _w + ['BAF_ied_v2'];
+ _w = _w + ['BAF_ied_v3'];
+ _w = _w + ['BAF_ied_v4'];
+ };
+
+ _w = _w + ['MineE'];
+ _w = _w + ['PipeBomb'];
+ _w = _w + ['Binocular'];
+ _w = _w + ['NVGoggles'];
+ _w = _w + ['Binocular_Vector'];
+ _w = _w + ['ItemCompass'];
+ _w = _w + ['ItemGPS'];
+ _w = _w + ['ItemMap'];
+ _w = _w + ['ItemRadio'];
+ _w = _w + ['ItemWatch'];
+
+ WF_Logic setVariable ['miscClasses',_w];
+
+ //--- Templates.
+ _items = ['ItemCompass','ItemGPS','ItemMap','ItemRadio','ItemWatch'];
+
+ _d = [getText(configFile >> 'CfgWeapons' >> 'AKS_74_kobra' >> 'displayName') + '/' + getText(configFile >> 'CfgWeapons' >> 'Makarov' >> 'displayName')];
+ _p = [getText(configFile >> 'CfgWeapons' >> 'AKS_74_kobra' >> 'picture')];
+ _t = [['AKS_74_kobra','Makarov']];
+ _m = [['30Rnd_545x39_AK','30Rnd_545x39_AK','30Rnd_545x39_AK','30Rnd_545x39_AK','30Rnd_545x39_AK','30Rnd_545x39_AK','30Rnd_545x39_AK','30Rnd_545x39_AK',
+ 'HandGrenade_East','HandGrenade_East','SmokeShellBlue','SmokeShellBlue','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov',
+ '8Rnd_9x18_Makarov','8Rnd_9x18_Makarov']];
+ _s = [['Binocular']];
+ _i = [_items];
+ _l = [0];
+ _b = [true];
+
+ _d = _d + [getText(configFile >> 'CfgWeapons' >> 'AK_74_GL_kobra' >> 'displayName')];
+ _p = _p + [getText(configFile >> 'CfgWeapons' >> 'AK_74_GL_kobra' >> 'picture')];
+ _t = _t + [['AK_74_GL_kobra']];
+ _m = _m + [['30Rnd_545x39_AK','30Rnd_545x39_AK','30Rnd_545x39_AK','30Rnd_545x39_AK','30Rnd_545x39_AK','30Rnd_545x39_AK','30Rnd_545x39_AK','30Rnd_545x39_AK',
+ '30Rnd_545x39_AK','30Rnd_545x39_AK','HandGrenade_East','HandGrenade_East','1Rnd_HE_GP25','1Rnd_HE_GP25','1Rnd_HE_GP25','1Rnd_HE_GP25','1Rnd_HE_GP25','1Rnd_HE_GP25',
+ '1Rnd_HE_GP25','1Rnd_HE_GP25']];
+ _s = _s + [['Binocular']];
+ _i = _i + [_items];
+ _l = _l + [0];
+ _b = _b + [true];
+
+ _d = _d + [getText(configFile >> 'CfgWeapons' >> 'AKS_74_pso' >> 'displayName') + '/' + getText(configFile >> 'CfgWeapons' >> 'RPG7V' >> 'displayName')];
+ _p = _p + [getText(configFile >> 'CfgWeapons' >> 'AKS_74_pso' >> 'picture')];
+ _t = _t + [['AKS_74_pso','RPG7V']];
+ _m = _m + [['30Rnd_545x39_AK','30Rnd_545x39_AK','30Rnd_545x39_AK','30Rnd_545x39_AK','30Rnd_545x39_AK','30Rnd_545x39_AK','PG7VL','PG7VL','PG7VL']];
+ _s = _s + [['Binocular','NVGoggles']];
+ _i = _i + [_items];
+ _l = _l + [1];
+ _b = _b + [false];
+
+ _d = _d + [getText(configFile >> 'CfgWeapons' >> 'AK_74_GL' >> 'displayName') + '/' + getText(configFile >> 'CfgWeapons' >> 'RPG7V' >> 'displayName')];
+ _p = _p + [getText(configFile >> 'CfgWeapons' >> 'AK_74_GL' >> 'picture')];
+ _t = _t + [['AK_74_GL','RPG7V']];
+ _m = _m + [['30Rnd_545x39_AK','30Rnd_545x39_AK','30Rnd_545x39_AK','30Rnd_545x39_AK','30Rnd_545x39_AK','30Rnd_545x39_AK','PG7V',
+ 'PG7V','PG7V','1Rnd_HE_GP25','1Rnd_HE_GP25','1Rnd_HE_GP25','1Rnd_HE_GP25','1Rnd_HE_GP25','1Rnd_HE_GP25','1Rnd_HE_GP25','1Rnd_HE_GP25']];
+ _s = _s + [['Binocular','NVGoggles']];
+ _i = _i + [_items];
+ _l = _l + [1];
+ _b = _b + [false];
+
+ _d = _d + [getText(configFile >> 'CfgWeapons' >> 'Sa58V_RCO_EP1' >> 'displayName') + '/' + getText(configFile >> 'CfgWeapons' >> 'RPG7V' >> 'displayName') + '/' + getText(configFile >> 'CfgWeapons' >> 'Makarov' >> 'displayName')];
+ _p = _p + [getText(configFile >> 'CfgWeapons' >> 'Sa58V_RCO_EP1' >> 'picture')];
+ _t = _t + [['Sa58V_RCO_EP1','RPG7V','Makarov']];
+ _m = _m + [['30Rnd_762x39_SA58','30Rnd_762x39_SA58','30Rnd_762x39_SA58','30Rnd_762x39_SA58','30Rnd_762x39_SA58','30Rnd_762x39_SA58','PG7VL','PG7VL','PG7VL',
+ '8Rnd_9x18_Makarov','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov']];
+ _s = _s + [['Binocular','NVGoggles']];
+ _i = _i + [_items];
+ _l = _l + [1];
+ _b = _b + [true];
+
+ _d = _d + [getText(configFile >> 'CfgWeapons' >> 'AKS_74_kobra' >> 'displayName') + '/' + getText(configFile >> 'CfgWeapons' >> 'MetisLauncher' >> 'displayName') + '/' + getText(configFile >> 'CfgWeapons' >> 'Makarov' >> 'displayName')];
+ _p = _p + [getText(configFile >> 'CfgWeapons' >> 'AKS_74_kobra' >> 'picture')];
+ _t = _t + [['AKS_74_kobra','MetisLauncher','Makarov']];
+ _m = _m + [['30Rnd_545x39_AK','30Rnd_545x39_AK','30Rnd_545x39_AK','30Rnd_545x39_AK','30Rnd_545x39_AK','30Rnd_545x39_AK','AT13',
+ '8Rnd_9x18_Makarov','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov']];
+ _s = _s + [['Binocular','NVGoggles']];
+ _i = _i + [_items];
+ _l = _l + [3];
+ _b = _b + [false];
+
+ _d = _d + [getText(configFile >> 'CfgWeapons' >> 'AK_74' >> 'displayName') + '/' + getText(configFile >> 'CfgWeapons' >> 'Igla' >> 'displayName') + '/' + getText(configFile >> 'CfgWeapons' >> 'Makarov' >> 'displayName')];
+ _p = _p + [getText(configFile >> 'CfgWeapons' >> 'AK_74' >> 'picture')];
+ _t = _t + [['AK_74','Igla','Makarov']];
+ _m = _m + [['30Rnd_545x39_AK','30Rnd_545x39_AK','30Rnd_545x39_AK','30Rnd_545x39_AK','30Rnd_545x39_AK','30Rnd_545x39_AK','Igla',
+ '8Rnd_9x18_Makarov','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov']];
+ _s = _s + [['Binocular','NVGoggles']];
+ _i = _i + [_items];
+ _l = _l + [2];
+ _b = _b + [false];
+
+ _d = _d + [getText(configFile >> 'CfgWeapons' >> 'AKS_74_U' >> 'displayName') + '/' + getText(configFile >> 'CfgWeapons' >> 'Makarov' >> 'displayName') + '/' + getText(configFile >> 'CfgMagazines' >> 'MineE' >> 'displayName')];
+ _p = _p + [getText(configFile >> 'CfgWeapons' >> 'AKS_74_U' >> 'picture')];
+ _t = _t + [['AKS_74_U','Makarov']];
+ _m = _m + [['30Rnd_545x39_AK','30Rnd_545x39_AK','30Rnd_545x39_AK','30Rnd_545x39_AK','30Rnd_545x39_AK','30Rnd_545x39_AK','MineE','MineE','MineE',
+ '8Rnd_9x18_Makarov','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov']];
+ _s = _s + [['Binocular']];
+ _i = _i + [_items];
+ _l = _l + [0];
+ _b = _b + [true];
+
+ if (_tiMode) then {
+ _d = _d + [getText(configFile >> 'CfgWeapons' >> 'AKS_74_GOSHAWK' >> 'displayName') + '/' + getText(configFile >> 'CfgWeapons' >> 'MakarovSD' >> 'displayName') + '/' + getText(configFile >> 'CfgMagazines' >> 'PipeBomb' >> 'displayName')];
+ _p = _p + [getText(configFile >> 'CfgWeapons' >> 'AKS_74_GOSHAWK' >> 'picture')];
+ _t = _t + [['AKS_74_GOSHAWK','MakarovSD']];
+ _m = _m + [['30Rnd_545x39_AK','30Rnd_545x39_AK','30Rnd_545x39_AK','30Rnd_545x39_AK','30Rnd_545x39_AK','30Rnd_545x39_AK','PipeBomb','PipeBomb','PipeBomb',
+ '8Rnd_9x18_MakarovSD','8Rnd_9x18_MakarovSD','8Rnd_9x18_MakarovSD','8Rnd_9x18_MakarovSD','8Rnd_9x18_MakarovSD','8Rnd_9x18_MakarovSD','8Rnd_9x18_MakarovSD','8Rnd_9x18_MakarovSD']];
+ _s = _s + [['Binocular_Vector','NVGoggles']];
+ _i = _i + [_items];
+ _l = _l + [2];
+ _b = _b + [true];
+ };
+
+ _d = _d + [getText(configFile >> 'CfgWeapons' >> 'PK' >> 'displayName') + '/' + getText(configFile >> 'CfgWeapons' >> 'Makarov' >> 'displayName')];
+ _p = _p + [getText(configFile >> 'CfgWeapons' >> 'PK' >> 'picture')];
+ _t = _t + [['PK','Makarov']];
+ _m = _m + [['100Rnd_762x54_PK','100Rnd_762x54_PK','100Rnd_762x54_PK','100Rnd_762x54_PK','100Rnd_762x54_PK','SmokeShellBlue','SmokeShellBlue','8Rnd_9x18_Makarov',
+ '8Rnd_9x18_Makarov','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov']];
+ _s = _s + [['Binocular']];
+ _i = _i + [_items];
+ _l = _l + [0];
+ _b = _b + [true];
+
+ _d = _d + [getText(configFile >> 'CfgWeapons' >> 'SVD_des_EP1' >> 'displayName') + '/' + getText(configFile >> 'CfgWeapons' >> 'MakarovSD' >> 'displayName')];
+ _p = _p + [getText(configFile >> 'CfgWeapons' >> 'SVD_des_EP1' >> 'picture')];
+ _t = _t + [['SVD_des_EP1','MakarovSD']];
+ _m = _m + [['10Rnd_762x54_SVD','10Rnd_762x54_SVD','10Rnd_762x54_SVD','10Rnd_762x54_SVD','10Rnd_762x54_SVD','10Rnd_762x54_SVD','10Rnd_762x54_SVD','10Rnd_762x54_SVD',
+ '10Rnd_762x54_SVD','10Rnd_762x54_SVD','HandGrenade_East','HandGrenade_East','8Rnd_9x18_MakarovSD','8Rnd_9x18_MakarovSD','8Rnd_9x18_MakarovSD','8Rnd_9x18_MakarovSD','8Rnd_9x18_MakarovSD',
+ '8Rnd_9x18_MakarovSD','8Rnd_9x18_MakarovSD','8Rnd_9x18_MakarovSD']];
+ _s = _s + [['Binocular']];
+ _i = _i + [_items];
+ _l = _l + [1];
+ _b = _b + [true];
+
+ _d = _d + [getText(configFile >> 'CfgWeapons' >> 'AKS_74_NSPU' >> 'displayName') + '/' + getText(configFile >> 'CfgWeapons' >> 'Laserdesignator' >> 'displayName') + '/' + getText(configFile >> 'CfgWeapons' >> 'MakarovSD' >> 'displayName')];
+ _p = _p + [getText(configFile >> 'CfgWeapons' >> 'AKS_74_NSPU' >> 'picture')];
+ _t = _t + [['AKS_74_NSPU','Laserdesignator','MakarovSD']];
+ _m = _m + [['30Rnd_545x39_AK','30Rnd_545x39_AK','30Rnd_545x39_AK','30Rnd_545x39_AK','30Rnd_545x39_AK','30Rnd_545x39_AK','30Rnd_545x39_AK','30Rnd_545x39_AK',
+ '30Rnd_545x39_AK','30Rnd_545x39_AK','HandGrenade_East','Laserbatteries','8Rnd_9x18_MakarovSD','8Rnd_9x18_MakarovSD','8Rnd_9x18_MakarovSD','8Rnd_9x18_MakarovSD','8Rnd_9x18_MakarovSD',
+ '8Rnd_9x18_MakarovSD','8Rnd_9x18_MakarovSD','8Rnd_9x18_MakarovSD']];
+ _s = _s + [['Binocular_Vector','NVGoggles']];
+ _i = _i + [_items];
+ _l = _l + [2];
+ _b = _b + [false];
+
+ _d = _d + [getText(configFile >> 'CfgWeapons' >> 'ksvk' >> 'displayName') + '/' + getText(configFile >> 'CfgWeapons' >> 'MakarovSD' >> 'displayName')];
+ _p = _p + [getText(configFile >> 'CfgWeapons' >> 'ksvk' >> 'picture')];
+ _t = _t + [['ksvk','MakarovSD']];
+ _m = _m + [['5Rnd_127x108_KSVK','5Rnd_127x108_KSVK','5Rnd_127x108_KSVK','5Rnd_127x108_KSVK','5Rnd_127x108_KSVK','5Rnd_127x108_KSVK','5Rnd_127x108_KSVK','5Rnd_127x108_KSVK',
+ '5Rnd_127x108_KSVK','5Rnd_127x108_KSVK','HandGrenade_East','HandGrenade_East','8Rnd_9x18_MakarovSD','8Rnd_9x18_MakarovSD','8Rnd_9x18_MakarovSD','8Rnd_9x18_MakarovSD','8Rnd_9x18_MakarovSD',
+ '8Rnd_9x18_MakarovSD','8Rnd_9x18_MakarovSD','8Rnd_9x18_MakarovSD']];
+ _s = _s + [['Binocular','NVGoggles']];
+ _i = _i + [_items];
+ _l = _l + [3];
+ _b = _b + [false];
+
+ _c = [];
+ _totalTemplates = count _d;
+
+ for [{_count = 0},{_count < _totalTemplates},{_count = _count + 1}] do {
+ _cost = 0;
+ {
+ _get = (_x+"_W") Call GetNamespace;
+ if (isNil '_get') then {
+ _get = _x Call GetNamespace;
+ };
+ if !(isNil '_get') then {_cost = _cost + (_get select QUERYGEARCOST)};
+ } forEach (_t select _count);
+
+ {
+ _get = _x Call GetNamespace;
+ if !(isNil '_get') then {_cost = _cost + (_get select QUERYGEARCOST)};
+ } forEach ((_m select _count) + (_s select _count) + (_i select _count));
+
+ _c = _c + [_cost];
+ };
+ WF_Logic setVariable ['templateClasses',_t];
+ WF_Logic setVariable ['templateNames',_d];
+ WF_Logic setVariable ['templateCosts',_c];
+ WF_Logic setVariable ['templatePictures',_p];
+ WF_Logic setVariable ['templateMags',_m];
+ WF_Logic setVariable ['templateItems',_i];
+ WF_Logic setVariable ['templateSpecs',_s];
+ WF_Logic setVariable ['templateUpgrades',_l];
+ WF_Logic setVariable ['templateAllowed',_b];
+ };
+};
+
+['WFBE_EASTDEFAULTWEAPONS',['AK_74','ItemCompass','ItemMap','ItemWatch','ItemRadio'],true] Call SetNamespace;
+['WFBE_EASTDEFAULTAMMO',['30Rnd_545x39_AK','30Rnd_545x39_AK','30Rnd_545x39_AK','30Rnd_545x39_AK','30Rnd_545x39_AK','30Rnd_545x39_AK','HandGrenade_East','HandGrenade_East'],true] Call SetNamespace;
+
+//--- AI Leaders Loadouts.
+if (isServer) then {
+ //--- No Upgrade.
+ ['WFBE_EASTLEADERWEAPONS01',['AKS_74','RPG18','Makarov','Binocular','ItemRadio','ItemMap'],true] Call SetNamespace;
+ ['WFBE_EASTLEADERAMMO01',['30Rnd_545x39_AK','30Rnd_545x39_AK','30Rnd_545x39_AK','30Rnd_545x39_AK','30Rnd_545x39_AK','30Rnd_545x39_AK','RPG18','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov'],true] Call SetNamespace;
+ ['WFBE_EASTLEADERWEAPONS02',['AKS_74_kobra','RPG18','Makarov','Binocular','ItemRadio','ItemMap'],true] Call SetNamespace;
+ ['WFBE_EASTLEADERAMMO02',['30Rnd_545x39_AK','30Rnd_545x39_AK','30Rnd_545x39_AK','30Rnd_545x39_AK','30Rnd_545x39_AK','30Rnd_545x39_AK','RPG18','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov'],true] Call SetNamespace;
+ ['WFBE_EASTLEADERWEAPONS03',['PK','Makarov','Binocular','ItemRadio','ItemMap'],true] Call SetNamespace;;
+ ['WFBE_EASTLEADERAMMO03',['100Rnd_762x54_PK','100Rnd_762x54_PK','100Rnd_762x54_PK','100Rnd_762x54_PK','100Rnd_762x54_PK','HandGrenade_East','HandGrenade_East','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov'],true] Call SetNamespace;
+ //--- Upgrade 1.
+ ['WFBE_EASTLEADERWEAPONS11',['AKS_74_kobra','RPG7V','Makarov','Binocular','NVGoggles','ItemRadio','ItemMap'],true] Call SetNamespace;
+ ['WFBE_EASTLEADERAMMO11',['30Rnd_545x39_AK','30Rnd_545x39_AK','30Rnd_545x39_AK','30Rnd_545x39_AK','30Rnd_545x39_AK','30Rnd_545x39_AK','PG7VL','PG7VL','PG7VL','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov'],true] Call SetNamespace;
+ ['WFBE_EASTLEADERWEAPONS12',['RPK_74','RPG7V','Makarov','Binocular','NVGoggles','ItemRadio','ItemMap'],true] Call SetNamespace;
+ ['WFBE_EASTLEADERAMMO12',['75Rnd_545x39_RPK','75Rnd_545x39_RPK','75Rnd_545x39_RPK','75Rnd_545x39_RPK','75Rnd_545x39_RPK','75Rnd_545x39_RPK','PG7VL','PG7VL','PG7VL','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov'],true] Call SetNamespace;
+ ['WFBE_EASTLEADERWEAPONS13',['SVD','MakarovSD','Binocular','NVGoggles','ItemRadio','ItemMap'],true] Call SetNamespace;
+ ['WFBE_EASTLEADERAMMO13',['10Rnd_762x54_SVD','10Rnd_762x54_SVD','10Rnd_762x54_SVD','10Rnd_762x54_SVD','10Rnd_762x54_SVD','10Rnd_762x54_SVD','10Rnd_762x54_SVD','10Rnd_762x54_SVD','10Rnd_762x54_SVD','10Rnd_762x54_SVD','HandGrenade_East','HandGrenade_East','8Rnd_9x18_MakarovSD','8Rnd_9x18_MakarovSD','8Rnd_9x18_MakarovSD','8Rnd_9x18_MakarovSD'],true] Call SetNamespace;
+ //--- Upgrade 2.
+ ['WFBE_EASTLEADERWEAPONS21',['AKS_74_NSPU','RPG7V','Makarov','Binocular','NVGoggles','ItemRadio','ItemMap'],true] Call SetNamespace;
+ ['WFBE_EASTLEADERAMMO21',['30Rnd_545x39_AK','30Rnd_545x39_AK','30Rnd_545x39_AK','30Rnd_545x39_AK','30Rnd_545x39_AK','30Rnd_545x39_AK','PG7VL','PG7VL','PG7VL','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov'],true] Call SetNamespace;
+ ['WFBE_EASTLEADERWEAPONS22',['SVD_des_EP1','RPG7V','Makarov','Binocular','NVGoggles','ItemRadio','ItemMap'],true] Call SetNamespace;
+ ['WFBE_EASTLEADERAMMO22',['10Rnd_762x54_SVD','10Rnd_762x54_SVD','10Rnd_762x54_SVD','10Rnd_762x54_SVD','10Rnd_762x54_SVD','10Rnd_762x54_SVD','PG7VL','PG7VL','PG7VL','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov'],true] Call SetNamespace;
+ ['WFBE_EASTLEADERWEAPONS23',['PK','Makarov','Binocular','NVGoggles','ItemRadio','ItemMap'],true] Call SetNamespace;
+ ['WFBE_EASTLEADERAMMO23',['100Rnd_762x54_PK','100Rnd_762x54_PK','100Rnd_762x54_PK','100Rnd_762x54_PK','100Rnd_762x54_PK','HandGrenade_East','HandGrenade_East','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov'],true] Call SetNamespace;
+ //--- Upgrade 3.
+ ['WFBE_EASTLEADERWEAPONS31',['AK_74_GL','RPG7V','Binocular','NVGoggles','ItemRadio','ItemMap'],true] Call SetNamespace;
+ ['WFBE_EASTLEADERAMMO31',['30Rnd_545x39_AK','30Rnd_545x39_AK','30Rnd_545x39_AK','30Rnd_545x39_AK','30Rnd_545x39_AK','30Rnd_545x39_AK','PG7VL','PG7VL','PG7VL','1Rnd_HE_GP25','1Rnd_HE_GP25','1Rnd_HE_GP25','1Rnd_HE_GP25'],true] Call SetNamespace;
+ ['WFBE_EASTLEADERWEAPONS32',['Sa58V_RCO_EP1','MetisLauncher','Makarov','Binocular','NVGoggles','ItemRadio','ItemMap'],true] Call SetNamespace;
+ ['WFBE_EASTLEADERAMMO32',['30Rnd_762x39_SA58','30Rnd_762x39_SA58','30Rnd_762x39_SA58','30Rnd_762x39_SA58','30Rnd_762x39_SA58','30Rnd_762x39_SA58','AT13','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov'],true] Call SetNamespace;
+ ['WFBE_EASTLEADERWEAPONS33',['SVD_NSPU_EP1','Makarov','Binocular','NVGoggles','ItemRadio','ItemMap'],true] Call SetNamespace;
+ ['WFBE_EASTLEADERAMMO33',['10Rnd_762x54_SVD','10Rnd_762x54_SVD','10Rnd_762x54_SVD','10Rnd_762x54_SVD','10Rnd_762x54_SVD','10Rnd_762x54_SVD','10Rnd_762x54_SVD','10Rnd_762x54_SVD','10Rnd_762x54_SVD','10Rnd_762x54_SVD','HandGrenade_East','HandGrenade_East','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov'],true] Call SetNamespace;
+}; \ No newline at end of file
diff --git a/Common/Config/Core_Loadout/Arrowhead/Loadout_US.sqf b/Common/Config/Core_Loadout/Arrowhead/Loadout_US.sqf
new file mode 100644
index 0000000..d1333e0
--- /dev/null
+++ b/Common/Config/Core_Loadout/Arrowhead/Loadout_US.sqf
@@ -0,0 +1,450 @@
+/* US Loadout */
+Private ['_tiMode'];
+_tiMode = 'WFBE_THERMALIMAGING' Call GetNamespace;
+_tiMode = if (_tiMode == 1 || _tiMode == 3) then {true} else {false};
+
+if (!isServer || local player) then {
+ if (side player == WEST) then {
+ /* Magazines. */
+ _m = ["30Rnd_556x45_Stanag"];
+ _m = _m + ["30Rnd_556x45_StanagSD"];
+ _m = _m + ["20Rnd_556x45_Stanag"];
+ _m = _m + ["30Rnd_556x45_G36"];
+ _m = _m + ["30Rnd_556x45_G36SD"];
+ _m = _m + ["100Rnd_556x45_BetaCMag"];
+ _m = _m + ["5Rnd_762x51_M24"];
+ _m = _m + ["20Rnd_762x51_DMR"];
+ _m = _m + ["10Rnd_127x99_m107"];
+ _m = _m + ["100Rnd_762x51_M240"];
+ _m = _m + ["100Rnd_556x45_M249"];
+ _m = _m + ["200Rnd_556x45_M249"];
+ _m = _m + ["20Rnd_762x51_B_SCAR"];
+ _m = _m + ["20Rnd_762x51_SB_SCAR"];
+ _m = _m + ["6Rnd_HE_M203"];
+ _m = _m + ["6Rnd_FlareWhite_M203"];
+ _m = _m + ["6Rnd_FlareGreen_M203"];
+ _m = _m + ["6Rnd_FlareRed_M203"];
+ _m = _m + ["6Rnd_FlareYellow_M203"];
+ _m = _m + ["6Rnd_Smoke_M203"];
+ _m = _m + ["6Rnd_SmokeRed_M203"];
+ _m = _m + ["6Rnd_SmokeGreen_M203"];
+ _m = _m + ["6Rnd_SmokeYellow_M203"];
+ _m = _m + ["M136"];
+ _m = _m + ["MAAWS_HEAT"];
+ _m = _m + ["MAAWS_HEDP"];
+ _m = _m + ["Javelin"];
+ _m = _m + ["Stinger"];
+ _m = _m + ["Laserbatteries"];
+ _m = _m + ["15Rnd_9x19_M9"];
+ _m = _m + ["15Rnd_9x19_M9SD"];
+ _m = _m + ["7Rnd_45ACP_1911"];
+ _m = _m + ["17Rnd_9x19_glock17"];
+
+ if (paramDLCBAF) then {
+ _m = _m + ["5Rnd_127x99_AS50"];
+ _m = _m + ["5Rnd_86x70_L115A1"];
+ _m = _m + ["200Rnd_556x45_L110A1"];
+ _m = _m + ["NLAW"];
+ };
+
+ if (paramDLCPMC) then {
+ _m = _m + ["20Rnd_B_AA12_Pellets"];
+ _m = _m + ["20Rnd_B_AA12_74Slug"];
+ _m = _m + ["20Rnd_B_AA12_HE"];
+ };
+
+ WF_Logic setVariable ['magazineClasses',_m];
+
+ /* Primary. */
+ _w = ['M16A2'];
+ _w = _w + ['M16A2GL'];
+ _w = _w + ['M24_des_EP1'];
+ _w = _w + ['m240_scoped_EP1'];
+ _w = _w + ['M60A4_EP1'];
+ _w = _w + ['Mk_48_DES_EP1'];
+ _w = _w + ['M249_EP1'];
+ if (_tiMode) then {
+ _w = _w + ['M249_TWS_EP1'];
+ };
+ _w = _w + ['M249_m145_EP1'];
+ _w = _w + ['M4A1'];
+ _w = _w + ['M4A3_CCO_EP1'];
+ _w = _w + ['M4A3_RCO_GL_EP1'];
+ _w = _w + ['G36C_camo'];
+ _w = _w + ['G36_C_SD_camo'];
+ _w = _w + ['G36A_camo'];
+ _w = _w + ['G36K_camo'];
+ _w = _w + ['MG36_camo'];
+ _w = _w + ['M32_EP1'];
+ _w = _w + ['M79_EP1'];
+ _w = _w + ['Mk13_EP1'];
+ _w = _w + ['M14_EP1'];
+ _w = _w + ['m107'];
+ if (_tiMode) then {
+ _w = _w + ['m107_TWS_EP1'];
+ _w = _w + ['M110_TWS_EP1'];
+ };
+ _w = _w + ['M110_NVG_EP1'];
+ _w = _w + ['SCAR_L_CQC'];
+ _w = _w + ['SCAR_L_CQC_Holo'];
+ _w = _w + ['SCAR_L_STD_Mk4CQT'];
+ _w = _w + ['SCAR_L_STD_EGLM_RCO'];
+ _w = _w + ['SCAR_L_CQC_EGLM_Holo'];
+ if (_tiMode) then {
+ _w = _w + ['SCAR_L_STD_EGLM_TWS'];
+ };
+ _w = _w + ['SCAR_L_STD_HOLO'];
+ _w = _w + ['SCAR_H_CQC_CCO'];
+ _w = _w + ['SCAR_H_CQC_CCO_SD'];
+ _w = _w + ['SCAR_H_STD_EGLM_Spect'];
+ _w = _w + ['SCAR_H_LNG_Sniper'];
+ _w = _w + ['SCAR_H_LNG_Sniper_SD'];
+ if (_tiMode) then {
+ _w = _w + ['SCAR_H_STD_TWS_SD'];
+ };
+
+ if (paramDLCBAF) then {
+ _w = _w + ['BAF_AS50_scoped'];
+ if (_tiMode) then {
+ _w = _w + ['BAF_AS50_TWS'];
+ };
+ _w = _w + ['BAF_LRR_scoped'];
+ _w = _w + ['BAF_LRR_scoped_W'];
+ _w = _w + ['BAF_L85A2_RIS_Holo'];
+ _w = _w + ['BAF_L85A2_UGL_Holo'];
+ _w = _w + ['BAF_L85A2_RIS_SUSAT'];
+ _w = _w + ['BAF_L85A2_UGL_SUSAT'];
+ _w = _w + ['BAF_L85A2_RIS_ACOG'];
+ _w = _w + ['BAF_L85A2_UGL_ACOG'];
+ if (_tiMode) then {
+ _w = _w + ['BAF_L85A2_RIS_CWS'];
+ };
+ _w = _w + ['BAF_L86A2_ACOG'];
+ _w = _w + ['BAF_L110A1_Aim'];
+ _w = _w + ['BAF_L7A2_GPMG'];
+ };
+
+ if (paramDLCPMC) then {
+ _w = _w + ['AA12_PMC'];
+ _w = _w + ['m8_carbine'];
+ _w = _w + ['m8_carbineGL'];
+ _w = _w + ['m8_compact'];
+ _w = _w + ['m8_sharpshooter'];
+ _w = _w + ['m8_SAW'];
+ _w = _w + ['m8_carbine_pmc'];
+ _w = _w + ['m8_compact_pmc'];
+ _w = _w + ['m8_holo_sd'];
+ if (_tiMode) then {
+ _w = _w + ['m8_tws'];
+ _w = _w + ['m8_tws_sd'];
+ };
+ };
+
+ WF_Logic setVariable ['primaryClasses',_w];
+
+ /* Secondary. */
+
+ _w = ['M136'];
+ _w = _w + ['MAAWS'];
+
+ if (paramDLCBAF) then {
+ _w = _w + ['BAF_NLAW_Launcher'];
+ };
+
+ _w = _w + ['Javelin'];
+ _w = _w + ['Stinger'];
+ _w = _w + ['Laserdesignator'];
+
+ /* Not all units are able to carry a backpack */
+ _get = getNumber(configFile >> 'CfgVehicles' >> typeOf player >> 'canCarryBackPack');
+
+ if (_get == 1) then {
+ _w = _w + ['US_Assault_Pack_EP1'];
+ _w = _w + ['US_Patrol_Pack_EP1'];
+ _w = _w + ['US_Backpack_EP1'];
+
+ if (paramDLCBAF) then {
+ _w = _w + ['BAF_AssaultPack_RifleAmmo'];
+ };
+
+ _w = _w + ['Tripod_Bag'];
+
+ if (paramDLCBAF) then {
+ _w = _w + ['BAF_L2A1_ACOG_minitripod_bag'];
+ _w = _w + ['BAF_L2A1_ACOG_tripod_bag'];
+ _w = _w + ['BAF_GPMG_Minitripod_D_bag'];
+ _w = _w + ['BAF_GMG_ACOG_minitripod_bag'];
+ };
+
+ _w = _w + ['M2HD_mini_TriPod_US_Bag_EP1'];
+ _w = _w + ['M2StaticMG_US_Bag_EP1'];
+ _w = _w + ['MK19_TriPod_US_Bag_EP1'];
+ _w = _w + ['TOW_TriPod_US_Bag_EP1'];
+ _w = _w + ['M252_US_Bag_EP1'];
+ };
+
+ WF_Logic setVariable ['secondaryClasses',_w];
+
+ /* Sidearm. */
+ _w = ['Colt1911'];
+ _w = _w + ['M9'];
+ _w = _w + ['M9SD'];
+ _w = _w + ['glock17_EP1'];
+
+ WF_Logic setVariable ['sidearmClasses',_w];
+
+ /* Misc. */
+
+ _w = ['HandGrenade_West'];
+
+ if (paramDLCBAF) then {
+ _w = _w + ['BAF_L109A1_HE'];
+ };
+
+ _w = _w + ['HandGrenade_Stone'];
+ _w = _w + ['IR_Strobe_Target'];
+ _w = _w + ['IR_Strobe_Marker'];
+ _w = _w + ['SmokeShell'];
+ _w = _w + ['SmokeShellRed'];
+ _w = _w + ['SmokeShellGreen'];
+ _w = _w + ['SmokeShellBlue'];
+ _w = _w + ['SmokeShellYellow'];
+ _w = _w + ['SmokeShellOrange'];
+ _w = _w + ['SmokeShellPurple'];
+ _w = _w + ['FlareWhite_M203'];
+ _w = _w + ['FlareYellow_M203'];
+ _w = _w + ['FlareGreen_M203'];
+ _w = _w + ['FlareRed_M203'];
+ _w = _w + ['1Rnd_HE_M203'];
+ _w = _w + ['1Rnd_Smoke_M203'];
+ _w = _w + ['1Rnd_SmokeRed_M203'];
+ _w = _w + ['1Rnd_SmokeGreen_M203'];
+ _w = _w + ['1Rnd_SmokeYellow_M203'];
+ _w = _w + ['Mine'];
+ _w = _w + ['PipeBomb'];
+ _w = _w + ['Binocular'];
+ _w = _w + ['NVGoggles'];
+ _w = _w + ['Binocular_Vector'];
+ _w = _w + ['ItemCompass'];
+ _w = _w + ['ItemGPS'];
+ _w = _w + ['ItemMap'];
+ _w = _w + ['ItemRadio'];
+ _w = _w + ['ItemWatch'];
+
+ WF_Logic setVariable ['miscClasses',_w];
+
+ //--- Templates.
+ _items = ['ItemCompass','ItemGPS','ItemMap','ItemRadio','ItemWatch'];
+
+ _d = [getText(configFile >> 'CfgWeapons' >> 'SCAR_L_CQC' >> 'displayName') + '/' + getText(configFile >> 'CfgWeapons' >> 'Colt1911' >> 'displayName')];
+ _p = [getText(configFile >> 'CfgWeapons' >> 'SCAR_L_CQC' >> 'picture')];
+ _t = [['SCAR_L_CQC','Colt1911']];
+ _m = [['30Rnd_556x45_Stanag','30Rnd_556x45_Stanag','30Rnd_556x45_Stanag','30Rnd_556x45_Stanag','30Rnd_556x45_Stanag','30Rnd_556x45_Stanag','30Rnd_556x45_Stanag','30Rnd_556x45_Stanag',
+ 'HandGrenade_West','HandGrenade_West','SmokeShellBlue','SmokeShellBlue','7Rnd_45ACP_1911','7Rnd_45ACP_1911','7Rnd_45ACP_1911','7Rnd_45ACP_1911','7Rnd_45ACP_1911','7Rnd_45ACP_1911',
+ '7Rnd_45ACP_1911','7Rnd_45ACP_1911']];
+ _s = [['Binocular']];
+ _i = [_items];
+ _l = [0];
+ _b = [true];
+
+ _d = _d + [getText(configFile >> 'CfgWeapons' >> 'M16A2GL' >> 'displayName')];
+ _p = _p + [getText(configFile >> 'CfgWeapons' >> 'M16A2GL' >> 'picture')];
+ _t = _t + [['M16A2GL']];
+ _m = _m + [['30Rnd_556x45_Stanag','30Rnd_556x45_Stanag','30Rnd_556x45_Stanag','30Rnd_556x45_Stanag','30Rnd_556x45_Stanag','30Rnd_556x45_Stanag','30Rnd_556x45_Stanag','30Rnd_556x45_Stanag',
+ '30Rnd_556x45_Stanag','30Rnd_556x45_Stanag','HandGrenade_West','HandGrenade_West','1Rnd_HE_M203','1Rnd_HE_M203','1Rnd_HE_M203','1Rnd_HE_M203','1Rnd_HE_M203','1Rnd_HE_M203',
+ '1Rnd_HE_M203','1Rnd_HE_M203']];
+ _s = _s + [['Binocular']];
+ _i = _i + [_items];
+ _l = _l + [0];
+ _b = _b + [true];
+
+ _d = _d + [getText(configFile >> 'CfgWeapons' >> 'G36C_camo' >> 'displayName') + '/' + getText(configFile >> 'CfgWeapons' >> 'M136' >> 'displayName')];
+ _p = _p + [getText(configFile >> 'CfgWeapons' >> 'G36C_camo' >> 'picture')];
+ _t = _t + [['G36C_camo','M136']];
+ _m = _m + [['30Rnd_556x45_G36','30Rnd_556x45_G36','30Rnd_556x45_G36','30Rnd_556x45_G36','30Rnd_556x45_G36','30Rnd_556x45_G36','M136']];
+ _s = _s + [['Binocular']];
+ _i = _i + [_items];
+ _l = _l + [0];
+ _b = _b + [true];
+
+ _d = _d + [getText(configFile >> 'CfgWeapons' >> 'SCAR_H_STD_EGLM_Spect' >> 'displayName') + '/' + getText(configFile >> 'CfgWeapons' >> 'MAAWS' >> 'displayName')];
+ _p = _p + [getText(configFile >> 'CfgWeapons' >> 'SCAR_H_STD_EGLM_Spect' >> 'picture')];
+ _t = _t + [['SCAR_H_STD_EGLM_Spect','MAAWS']];
+ _m = _m + [['20rnd_762x51_B_SCAR','20rnd_762x51_B_SCAR','20rnd_762x51_B_SCAR','20rnd_762x51_B_SCAR','20rnd_762x51_B_SCAR','20rnd_762x51_B_SCAR','MAAWS_HEAT',
+ 'MAAWS_HEAT','1Rnd_HE_M203','1Rnd_HE_M203','1Rnd_HE_M203','1Rnd_HE_M203','1Rnd_HE_M203','1Rnd_HE_M203','1Rnd_HE_M203','1Rnd_HE_M203']];
+ _s = _s + [['Binocular','NVGoggles']];
+ _i = _i + [_items];
+ _l = _l + [3];
+ _b = _b + [false];
+
+ _d = _d + [getText(configFile >> 'CfgWeapons' >> 'SCAR_L_STD_HOLO' >> 'displayName') + '/' + getText(configFile >> 'CfgWeapons' >> 'MAAWS' >> 'displayName') + '/' + getText(configFile >> 'CfgWeapons' >> 'M9' >> 'displayName')];
+ _p = _p + [getText(configFile >> 'CfgWeapons' >> 'SCAR_L_STD_HOLO' >> 'picture')];
+ _t = _t + [['SCAR_L_STD_HOLO','MAAWS','M9']];
+ _m = _m + [['30Rnd_556x45_Stanag','30Rnd_556x45_Stanag','30Rnd_556x45_Stanag','30Rnd_556x45_Stanag','30Rnd_556x45_Stanag','30Rnd_556x45_Stanag','MAAWS_HEAT','MAAWS_HEAT',
+ '15Rnd_9x19_M9','15Rnd_9x19_M9','15Rnd_9x19_M9','15Rnd_9x19_M9','15Rnd_9x19_M9','15Rnd_9x19_M9','15Rnd_9x19_M9','15Rnd_9x19_M9']];
+ _s = _s + [['Binocular','NVGoggles']];
+ _i = _i + [_items];
+ _l = _l + [2];
+ _b = _b + [false];
+
+ _d = _d + [getText(configFile >> 'CfgWeapons' >> 'M4A3_CCO_EP1' >> 'displayName') + '/' + getText(configFile >> 'CfgWeapons' >> 'Javelin' >> 'displayName') + '/' + getText(configFile >> 'CfgWeapons' >> 'Colt1911' >> 'displayName')];
+ _p = _p + [getText(configFile >> 'CfgWeapons' >> 'M4A3_CCO_EP1' >> 'picture')];
+ _t = _t + [['M4A3_CCO_EP1','Javelin','Colt1911']];
+ _m = _m + [['30Rnd_556x45_Stanag','30Rnd_556x45_Stanag','30Rnd_556x45_Stanag','30Rnd_556x45_Stanag','30Rnd_556x45_Stanag','30Rnd_556x45_Stanag','Javelin',
+ '7Rnd_45ACP_1911','7Rnd_45ACP_1911','7Rnd_45ACP_1911','7Rnd_45ACP_1911','7Rnd_45ACP_1911','7Rnd_45ACP_1911','7Rnd_45ACP_1911','7Rnd_45ACP_1911']];
+ _s = _s + [['Binocular','NVGoggles']];
+ _i = _i + [_items];
+ _l = _l + [3];
+ _b = _b + [false];
+
+ _d = _d + [getText(configFile >> 'CfgWeapons' >> 'SCAR_L_STD_Mk4CQT' >> 'displayName') + '/' + getText(configFile >> 'CfgWeapons' >> 'Stinger' >> 'displayName') + '/' + getText(configFile >> 'CfgWeapons' >> 'M9' >> 'displayName')];
+ _p = _p + [getText(configFile >> 'CfgWeapons' >> 'SCAR_L_STD_Mk4CQT' >> 'picture')];
+ _t = _t + [['SCAR_L_STD_Mk4CQT','Stinger','M9']];
+ _m = _m + [['30Rnd_556x45_Stanag','30Rnd_556x45_Stanag','30Rnd_556x45_Stanag','30Rnd_556x45_Stanag','30Rnd_556x45_Stanag','30Rnd_556x45_Stanag','Stinger',
+ '15Rnd_9x19_M9','15Rnd_9x19_M9','15Rnd_9x19_M9','15Rnd_9x19_M9','15Rnd_9x19_M9','15Rnd_9x19_M9','15Rnd_9x19_M9','15Rnd_9x19_M9']];
+ _s = _s + [['Binocular','NVGoggles']];
+ _i = _i + [_items];
+ _l = _l + [2];
+ _b = _b + [false];
+
+ _d = _d + [getText(configFile >> 'CfgWeapons' >> 'SCAR_L_CQC' >> 'displayName') + '/' + getText(configFile >> 'CfgWeapons' >> 'M9' >> 'displayName') + '/' + getText(configFile >> 'CfgMagazines' >> 'Mine' >> 'displayName')];
+ _p = _p + [getText(configFile >> 'CfgWeapons' >> 'SCAR_L_CQC' >> 'picture')];
+ _t = _t + [['SCAR_L_CQC','M9']];
+ _m = _m + [['30Rnd_556x45_Stanag','30Rnd_556x45_Stanag','30Rnd_556x45_Stanag','30Rnd_556x45_Stanag','30Rnd_556x45_Stanag','30Rnd_556x45_Stanag','Mine','Mine','Mine',
+ '15Rnd_9x19_M9','15Rnd_9x19_M9','15Rnd_9x19_M9','15Rnd_9x19_M9','15Rnd_9x19_M9','15Rnd_9x19_M9','15Rnd_9x19_M9','15Rnd_9x19_M9']];
+ _s = _s + [['Binocular']];
+ _i = _i + [_items];
+ _l = _l + [0];
+ _b = _b + [true];
+
+ _d = _d + [getText(configFile >> 'CfgWeapons' >> 'SCAR_H_CQC_CCO_SD' >> 'displayName') + '/' + getText(configFile >> 'CfgWeapons' >> 'M9SD' >> 'displayName') + '/' + getText(configFile >> 'CfgMagazines' >> 'PipeBomb' >> 'displayName')];
+ _p = _p + [getText(configFile >> 'CfgWeapons' >> 'SCAR_H_CQC_CCO_SD' >> 'picture')];
+ _t = _t + [['SCAR_H_CQC_CCO_SD','M9SD']];
+ _m = _m + [['20Rnd_762x51_SB_SCAR','20Rnd_762x51_SB_SCAR','20Rnd_762x51_SB_SCAR','20Rnd_762x51_SB_SCAR','20Rnd_762x51_SB_SCAR','20Rnd_762x51_SB_SCAR','PipeBomb','PipeBomb','PipeBomb',
+ '15Rnd_9x19_M9SD','15Rnd_9x19_M9SD','15Rnd_9x19_M9SD','15Rnd_9x19_M9SD','15Rnd_9x19_M9SD','15Rnd_9x19_M9SD','15Rnd_9x19_M9SD','15Rnd_9x19_M9SD']];
+ _s = _s + [['Binocular','NVGoggles']];
+ _i = _i + [_items];
+ _l = _l + [1];
+ _b = _b + [true];
+
+ _d = _d + [getText(configFile >> 'CfgWeapons' >> 'm240_scoped_EP1' >> 'displayName') + '/' + getText(configFile >> 'CfgWeapons' >> 'Colt1911' >> 'displayName')];
+ _p = _p + [getText(configFile >> 'CfgWeapons' >> 'm240_scoped_EP1' >> 'picture')];
+ _t = _t + [['m240_scoped_EP1','Colt1911']];
+ _m = _m + [['100Rnd_762x51_M240','100Rnd_762x51_M240','100Rnd_762x51_M240','100Rnd_762x51_M240','100Rnd_762x51_M240','SmokeShellRed','SmokeShellRed','7Rnd_45ACP_1911',
+ '7Rnd_45ACP_1911','7Rnd_45ACP_1911','7Rnd_45ACP_1911','7Rnd_45ACP_1911','7Rnd_45ACP_1911','7Rnd_45ACP_1911','7Rnd_45ACP_1911']];
+ _s = _s + [['Binocular']];
+ _i = _i + [_items];
+ _l = _l + [0];
+ _b = _b + [true];
+
+ _d = _d + [getText(configFile >> 'CfgWeapons' >> 'M249_EP1' >> 'displayName') + '/' + getText(configFile >> 'CfgWeapons' >> 'Colt1911' >> 'displayName')];
+ _p = _p + [getText(configFile >> 'CfgWeapons' >> 'M249_EP1' >> 'picture')];
+ _t = _t + [['M249_EP1','Colt1911']];
+ _m = _m + [['200Rnd_556x45_M249','200Rnd_556x45_M249','200Rnd_556x45_M249','200Rnd_556x45_M249','200Rnd_556x45_M249','SmokeShellRed','SmokeShellRed','7Rnd_45ACP_1911',
+ '7Rnd_45ACP_1911','7Rnd_45ACP_1911','7Rnd_45ACP_1911','7Rnd_45ACP_1911','7Rnd_45ACP_1911','7Rnd_45ACP_1911','7Rnd_45ACP_1911']];
+ _s = _s + [['Binocular','NVGoggles']];
+ _i = _i + [_items];
+ _l = _l + [2];
+ _b = _b + [true];
+
+ _d = _d + [getText(configFile >> 'CfgWeapons' >> 'M14_EP1' >> 'displayName') + '/' + getText(configFile >> 'CfgWeapons' >> 'M9SD' >> 'displayName')];
+ _p = _p + [getText(configFile >> 'CfgWeapons' >> 'M14_EP1' >> 'picture')];
+ _t = _t + [['M14_EP1','M9SD']];
+ _m = _m + [['20Rnd_762x51_DMR','20Rnd_762x51_DMR','20Rnd_762x51_DMR','20Rnd_762x51_DMR','20Rnd_762x51_DMR','20Rnd_762x51_DMR','20Rnd_762x51_DMR','20Rnd_762x51_DMR',
+ '20Rnd_762x51_DMR','20Rnd_762x51_DMR','HandGrenade_West','HandGrenade_West','15Rnd_9x19_M9SD','15Rnd_9x19_M9SD','15Rnd_9x19_M9SD','15Rnd_9x19_M9SD','15Rnd_9x19_M9SD',
+ '15Rnd_9x19_M9SD','15Rnd_9x19_M9SD','15Rnd_9x19_M9SD']];
+ _s = _s + [['Binocular_Vector','NVGoggles']];
+ _i = _i + [_items];
+ _l = _l + [2];
+ _b = _b + [false];
+
+ if (_tiMode) then {
+ _d = _d + [getText(configFile >> 'CfgWeapons' >> 'M110_TWS_EP1' >> 'displayName') + '/' + getText(configFile >> 'CfgWeapons' >> 'Laserdesignator' >> 'displayName') + '/' + getText(configFile >> 'CfgWeapons' >> 'M9SD' >> 'displayName')];
+ _p = _p + [getText(configFile >> 'CfgWeapons' >> 'M110_TWS_EP1' >> 'picture')];
+ _t = _t + [['M110_TWS_EP1','Laserdesignator','M9SD']];
+ _m = _m + [['20Rnd_762x51_B_SCAR','20Rnd_762x51_B_SCAR','20Rnd_762x51_B_SCAR','20Rnd_762x51_B_SCAR','20Rnd_762x51_B_SCAR','20Rnd_762x51_B_SCAR','20Rnd_762x51_B_SCAR','20Rnd_762x51_B_SCAR',
+ '20Rnd_762x51_B_SCAR','20Rnd_762x51_B_SCAR','HandGrenade_West','Laserbatteries','15Rnd_9x19_M9SD','15Rnd_9x19_M9SD','15Rnd_9x19_M9SD','15Rnd_9x19_M9SD','15Rnd_9x19_M9SD',
+ '15Rnd_9x19_M9SD','15Rnd_9x19_M9SD','15Rnd_9x19_M9SD']];
+ _s = _s + [['Binocular_Vector','NVGoggles']];
+ _i = _i + [_items];
+ _l = _l + [2];
+ _b = _b + [false];
+ };
+
+ _d = _d + [getText(configFile >> 'CfgWeapons' >> 'm107' >> 'displayName') + '/' + getText(configFile >> 'CfgWeapons' >> 'M9SD' >> 'displayName')];
+ _p = _p + [getText(configFile >> 'CfgWeapons' >> 'm107' >> 'picture')];
+ _t = _t + [['m107','M9SD']];
+ _m = _m + [['10Rnd_127x99_m107','10Rnd_127x99_m107','10Rnd_127x99_m107','10Rnd_127x99_m107','10Rnd_127x99_m107','10Rnd_127x99_m107','10Rnd_127x99_m107','10Rnd_127x99_m107',
+ '10Rnd_127x99_m107','10Rnd_127x99_m107','HandGrenade_West','HandGrenade_West','15Rnd_9x19_M9SD','15Rnd_9x19_M9SD','15Rnd_9x19_M9SD','15Rnd_9x19_M9SD','15Rnd_9x19_M9SD',
+ '15Rnd_9x19_M9SD','15Rnd_9x19_M9SD','15Rnd_9x19_M9SD']];
+ _s = _s + [['Binocular_Vector','NVGoggles']];
+ _i = _i + [_items];
+ _l = _l + [3];
+ _b = _b + [false];
+
+ _c = [];
+ _totalTemplates = count _d;
+
+ for [{_count = 0},{_count < _totalTemplates},{_count = _count + 1}] do {
+ _cost = 0;
+ {
+ _get = (_x+"_W") Call GetNamespace;
+ if (isNil '_get') then {
+ _get = _x Call GetNamespace;
+ };
+ if !(isNil '_get') then {_cost = _cost + (_get select QUERYGEARCOST)};
+ } forEach (_t select _count);
+
+ {
+ _get = _x Call GetNamespace;
+ if !(isNil '_get') then {_cost = _cost + (_get select QUERYGEARCOST)};
+ } forEach ((_m select _count) + (_s select _count) + (_i select _count));
+
+ _c = _c + [_cost];
+ };
+ WF_Logic setVariable ['templateClasses',_t];
+ WF_Logic setVariable ['templateNames',_d];
+ WF_Logic setVariable ['templateCosts',_c];
+ WF_Logic setVariable ['templatePictures',_p];
+ WF_Logic setVariable ['templateMags',_m];
+ WF_Logic setVariable ['templateItems',_i];
+ WF_Logic setVariable ['templateSpecs',_s];
+ WF_Logic setVariable ['templateUpgrades',_l];
+ WF_Logic setVariable ['templateAllowed',_b];
+ };
+};
+
+['WFBE_WESTDEFAULTWEAPONS',['M16A2','ItemCompass','ItemMap','ItemWatch','ItemRadio'],true] Call SetNamespace;
+['WFBE_WESTDEFAULTAMMO',['30Rnd_556x45_Stanag','30Rnd_556x45_Stanag','30Rnd_556x45_Stanag','30Rnd_556x45_Stanag','30Rnd_556x45_Stanag','30Rnd_556x45_Stanag','HandGrenade_West','HandGrenade_West'],true] Call SetNamespace;
+
+//--- AI Leaders Loadouts.
+if (isServer) then {
+ //--- No Upgrade.
+ ['WFBE_WESTLEADERWEAPONS01',['SCAR_L_CQC','M136','Colt1911','Binocular','ItemRadio','ItemMap'],true] Call SetNamespace;
+ ['WFBE_WESTLEADERAMMO01',['30Rnd_556x45_Stanag','30Rnd_556x45_Stanag','30Rnd_556x45_Stanag','30Rnd_556x45_Stanag','30Rnd_556x45_Stanag','30Rnd_556x45_Stanag','M136','7Rnd_45ACP_1911','7Rnd_45ACP_1911','7Rnd_45ACP_1911','7Rnd_45ACP_1911'],true] Call SetNamespace;
+ ['WFBE_WESTLEADERWEAPONS02',['G36C_camo','M136','Colt1911','Binocular','ItemRadio','ItemMap'],true] Call SetNamespace;
+ ['WFBE_WESTLEADERAMMO02',['30Rnd_556x45_G36','30Rnd_556x45_G36','30Rnd_556x45_G36','30Rnd_556x45_G36','30Rnd_556x45_G36','30Rnd_556x45_G36','M136','7Rnd_45ACP_1911','7Rnd_45ACP_1911','7Rnd_45ACP_1911','7Rnd_45ACP_1911'],true] Call SetNamespace;
+ ['WFBE_WESTLEADERWEAPONS03',['m240_scoped_EP1','Colt1911','Binocular','ItemRadio','ItemMap'],true] Call SetNamespace;;
+ ['WFBE_WESTLEADERAMMO03',['100Rnd_762x51_M240','100Rnd_762x51_M240','100Rnd_762x51_M240','100Rnd_762x51_M240','100Rnd_762x51_M240','HandGrenade_West','HandGrenade_West','7Rnd_45ACP_1911','7Rnd_45ACP_1911','7Rnd_45ACP_1911','7Rnd_45ACP_1911'],true] Call SetNamespace;
+ //--- Upgrade 1.
+ ['WFBE_WESTLEADERWEAPONS11',['M4A3_CCO_EP1','M136','Colt1911','Binocular','NVGoggles','ItemRadio','ItemMap'],true] Call SetNamespace;
+ ['WFBE_WESTLEADERAMMO11',['30Rnd_556x45_Stanag','30Rnd_556x45_Stanag','30Rnd_556x45_Stanag','30Rnd_556x45_Stanag','30Rnd_556x45_Stanag','30Rnd_556x45_Stanag','M136','7Rnd_45ACP_1911','7Rnd_45ACP_1911','7Rnd_45ACP_1911','7Rnd_45ACP_1911'],true] Call SetNamespace;
+ ['WFBE_WESTLEADERWEAPONS12',['G36K_camo','M136','Colt1911','Binocular','NVGoggles','ItemRadio','ItemMap'],true] Call SetNamespace;
+ ['WFBE_WESTLEADERAMMO12',['30Rnd_556x45_G36','30Rnd_556x45_G36','30Rnd_556x45_G36','30Rnd_556x45_G36','30Rnd_556x45_G36','30Rnd_556x45_G36','M136','7Rnd_45ACP_1911','7Rnd_45ACP_1911','7Rnd_45ACP_1911','7Rnd_45ACP_1911'],true] Call SetNamespace;
+ ['WFBE_WESTLEADERWEAPONS13',['M14_EP1','M9SD','Binocular','NVGoggles','ItemRadio','ItemMap'],true] Call SetNamespace;
+ ['WFBE_WESTLEADERAMMO13',['20Rnd_762x51_DMR','20Rnd_762x51_DMR','20Rnd_762x51_DMR','20Rnd_762x51_DMR','20Rnd_762x51_DMR','20Rnd_762x51_DMR','20Rnd_762x51_DMR','20Rnd_762x51_DMR','20Rnd_762x51_DMR','20Rnd_762x51_DMR','HandGrenade_West','HandGrenade_West','15Rnd_9x19_M9SD','15Rnd_9x19_M9SD','15Rnd_9x19_M9SD','15Rnd_9x19_M9SD'],true] Call SetNamespace;
+ //--- Upgrade 2.
+ ['WFBE_WESTLEADERWEAPONS21',['SCAR_L_STD_HOLO','MAAWS','Colt1911','Binocular','NVGoggles','ItemRadio','ItemMap'],true] Call SetNamespace;
+ ['WFBE_WESTLEADERAMMO21',['30Rnd_556x45_Stanag','30Rnd_556x45_Stanag','30Rnd_556x45_Stanag','30Rnd_556x45_Stanag','30Rnd_556x45_Stanag','30Rnd_556x45_Stanag','MAAWS_HEAT','MAAWS_HEAT','7Rnd_45ACP_1911','7Rnd_45ACP_1911','7Rnd_45ACP_1911','7Rnd_45ACP_1911'],true] Call SetNamespace;
+ ['WFBE_WESTLEADERWEAPONS22',['G36C_camo','MAAWS','Colt1911','Binocular','NVGoggles','ItemRadio','ItemMap'],true] Call SetNamespace;
+ ['WFBE_WESTLEADERAMMO22',['30Rnd_556x45_G36','30Rnd_556x45_G36','30Rnd_556x45_G36','30Rnd_556x45_G36','30Rnd_556x45_G36','30Rnd_556x45_G36','MAAWS_HEAT','MAAWS_HEAT','7Rnd_45ACP_1911','7Rnd_45ACP_1911','7Rnd_45ACP_1911','7Rnd_45ACP_1911'],true] Call SetNamespace;
+ ['WFBE_WESTLEADERWEAPONS23',['MG36_camo','Colt1911','Binocular','NVGoggles','ItemRadio','ItemMap'],true] Call SetNamespace;
+ ['WFBE_WESTLEADERAMMO23',['100Rnd_556x45_BetaCMag','100Rnd_556x45_BetaCMag','100Rnd_556x45_BetaCMag','100Rnd_556x45_BetaCMag','100Rnd_556x45_BetaCMag','HandGrenade_West','HandGrenade_West','7Rnd_45ACP_1911','7Rnd_45ACP_1911','7Rnd_45ACP_1911','7Rnd_45ACP_1911'],true] Call SetNamespace;
+ //--- Upgrade 3.
+ ['WFBE_WESTLEADERWEAPONS31',['SCAR_L_CQC_EGLM_Holo','MAAWS','Binocular','NVGoggles','ItemRadio','ItemMap'],true] Call SetNamespace;
+ ['WFBE_WESTLEADERAMMO31',['30Rnd_556x45_Stanag','30Rnd_556x45_Stanag','30Rnd_556x45_Stanag','30Rnd_556x45_Stanag','30Rnd_556x45_Stanag','30Rnd_556x45_Stanag','MAAWS_HEAT','MAAWS_HEAT','1Rnd_HE_M203','1Rnd_HE_M203','1Rnd_HE_M203','1Rnd_HE_M203'],true] Call SetNamespace;
+ ['WFBE_WESTLEADERWEAPONS32',['SCAR_H_STD_EGLM_Spect','Javelin','Colt1911','Binocular','NVGoggles','ItemRadio','ItemMap'],true] Call SetNamespace;
+ ['WFBE_WESTLEADERAMMO32',['20Rnd_762x51_SB_SCAR','20Rnd_762x51_SB_SCAR','20Rnd_762x51_SB_SCAR','20Rnd_762x51_SB_SCAR','20Rnd_762x51_SB_SCAR','20Rnd_762x51_SB_SCAR','Javelin','7Rnd_45ACP_1911','7Rnd_45ACP_1911','7Rnd_45ACP_1911','7Rnd_45ACP_1911'],true] Call SetNamespace;
+ ['WFBE_WESTLEADERWEAPONS33',['Mk_48_DES_EP1','Colt1911','Binocular','NVGoggles','ItemRadio','ItemMap'],true] Call SetNamespace;
+ ['WFBE_WESTLEADERAMMO33',['100Rnd_762x51_M240','100Rnd_762x51_M240','100Rnd_762x51_M240','100Rnd_762x51_M240','100Rnd_762x51_M240','HandGrenade_West','HandGrenade_West','7Rnd_45ACP_1911','7Rnd_45ACP_1911','7Rnd_45ACP_1911','7Rnd_45ACP_1911'],true] Call SetNamespace;
+}; \ No newline at end of file
diff --git a/Common/Config/Core_Loadout/CombinedOps/Loadout_RU.sqf b/Common/Config/Core_Loadout/CombinedOps/Loadout_RU.sqf
new file mode 100644
index 0000000..137c6a8
--- /dev/null
+++ b/Common/Config/Core_Loadout/CombinedOps/Loadout_RU.sqf
@@ -0,0 +1,483 @@
+/* RU Loadout */
+Private ['_tiMode'];
+_tiMode = 'WFBE_THERMALIMAGING' Call GetNamespace;
+_tiMode = if (_tiMode == 1 || _tiMode == 3) then {true} else {false};
+
+if (!isServer || local player) then {
+ if (side player == EAST) then {
+ /* Magazines. */
+ _m = ["30Rnd_762x39_AK47"];
+ _m = _m + ["30Rnd_556x45_Stanag"];
+ _m = _m + ["30Rnd_545x39_AK"];
+ _m = _m + ["30Rnd_545x39_AKSD"];
+ _m = _m + ["30Rnd_556x45_G36"];
+ _m = _m + ["30Rnd_556x45_G36SD"];
+ _m = _m + ["100Rnd_556x45_BetaCMag"];
+ _m = _m + ["64Rnd_9x19_Bizon"];
+ _m = _m + ["64Rnd_9x19_SD_Bizon"];
+ _m = _m + ["100Rnd_762x54_PK"];
+ _m = _m + ["75Rnd_545x39_RPK"];
+ _m = _m + ["5x_22_LR_17_HMR"];
+ _m = _m + ["10Rnd_762x54_SVD"];
+ _m = _m + ["8Rnd_B_Saiga12_74Slug"];
+ _m = _m + ["8Rnd_B_Saiga12_Pellets"];
+ _m = _m + ["5Rnd_127x108_KSVK"];
+ _m = _m + ["10Rnd_9x39_SP5_VSS"];
+ _m = _m + ["20Rnd_9x39_SP5_VSS"];
+ _m = _m + ["10x_303"];
+ _m = _m + ["30Rnd_762x39_SA58"];
+ _m = _m + ["20Rnd_762x51_FNFAL"];
+ _m = _m + ["PG7V"];
+ _m = _m + ["PG7VL"];
+ _m = _m + ["OG7"];
+ _m = _m + ["PG7VR"];
+ _m = _m + ["RPG18"];
+ _m = _m + ["Dragon_EP1"];
+ _m = _m + ["SMAW_HEAA"];
+ _m = _m + ["SMAW_HEDP"];
+ _m = _m + ["AT13"];
+ _m = _m + ["Igla"];
+ _m = _m + ["Strela"];
+ _m = _m + ["Laserbatteries"];
+ _m = _m + ["6Rnd_45ACP"];
+ _m = _m + ["8Rnd_9x18_Makarov"];
+ _m = _m + ["8Rnd_9x18_MakarovSD"];
+ _m = _m + ["10Rnd_B_765x17_Ball"];
+ _m = _m + ["20Rnd_B_765x17_Ball"];
+ _m = _m + ["30Rnd_9x19_UZI"];
+ _m = _m + ["30Rnd_9x19_UZI_SD"];
+ if (paramDLCPMC) then {
+ _m = _m + ["20Rnd_B_AA12_Pellets"];
+ _m = _m + ["20Rnd_B_AA12_74Slug"];
+ _m = _m + ["20Rnd_B_AA12_HE"];
+ };
+
+ if (WF_ACE) then
+ {
+ _m = _m + ["ACE_Battery_Rangefinder"];
+ _m = _m + ["ACE_75Rnd_762x39_B_AK47"];
+ _m = _m + ["ACE_40Rnd_762x39_B_AK47"];
+ _m = _m + ["ACE_75Rnd_762x39_T_AK47"];
+ _m = _m + ["ACE_40Rnd_762x39_T_AK47"];
+ _m = _m + ["ACE_30Rnd_762x39_T_AK47"];
+ _m = _m + ["ACE_30Rnd_762x39_SD_AK47"];
+ _m = _m + ["ACE_75Rnd_545x39_T_RPK"];
+ _m = _m + ["ACE_30Rnd_545x39_T_AK"];
+ _m = _m + ["ACE_10Rnd_762x54_T_SVD"];
+ _m = _m + ["ACE_5Rnd_127x108_T_KSVK"];
+ _m = _m + ["ACE_TBG7V"];
+ _m = _m + ["ACE_RPG29_PG29"];
+ _m = _m + ["ACE_RPG29_TBG29"];
+ _m = _m + ["ACE_2B14HE_CSWDM"];
+ _m = _m + ["ACE_KORD_CSWDM"];
+ _m = _m + ["ACE_Konkurs_CSWDM"];
+ _m = _m + ["ACE_2B14WP_CSWDM"];
+ _m = _m + ["ACE_30Rnd_762x39_T_SA58"];
+ _m = _m + ["ACE_5Rnd_25x59_HEDP_Barrett"];
+ };
+
+ WF_Logic setVariable ['magazineClasses',_m];
+
+ /* Primary. */
+ _w = ['AK_47_M'];
+ _w = _w + ['AK_47_S'];
+ _w = _w + ['M16A2'];
+ _w = _w + ['M16A2GL'];
+ _w = _w + ['AK_74'];
+ _w = _w + ['AK_74_GL'];
+ _w = _w + ['AK_74_GL_kobra'];
+ _w = _w + ['AK_107_kobra'];
+ _w = _w + ['AK_107_GL_kobra'];
+ _w = _w + ['AK_107_pso'];
+ _w = _w + ['AK_107_GL_pso'];
+ _w = _w + ['AKS_74'];
+ if (_tiMode) then {
+ _w = _w + ['AKS_74_GOSHAWK'];
+ };
+ _w = _w + ['AKS_74_kobra'];
+ _w = _w + ['AKS_74_NSPU'];
+ _w = _w + ['AKS_74_pso'];
+ _w = _w + ['AKS_74_U'];
+ _w = _w + ['AKS_74_UN_kobra'];
+ _w = _w + ['AKS_GOLD'];
+ _w = _w + ['bizon'];
+ _w = _w + ['bizon_silenced'];
+ _w = _w + ['FN_FAL'];
+ _w = _w + ['FN_FAL_ANPVS4'];
+ _w = _w + ['LeeEnfield'];
+ _w = _w + ['PK'];
+ _w = _w + ['Pecheneg'];
+ _w = _w + ['RPK_74'];
+ _w = _w + ['huntingrifle'];
+ _w = _w + ['Sa58P_EP1'];
+ _w = _w + ['Sa58V_EP1'];
+ _w = _w + ['Sa58V_RCO_EP1'];
+ _w = _w + ['Sa58V_CCO_EP1'];
+ _w = _w + ['SVD'];
+ _w = _w + ['SVD_des_EP1'];
+ _w = _w + ['SVD_NSPU_EP1'];
+ _w = _w + ['SVD_CAMO'];
+ _w = _w + ['Saiga12K'];
+ _w = _w + ['ksvk'];
+ _w = _w + ['VSS_vintorez'];
+
+ if (WF_ACE) then
+ {
+ _w = _w + ['ACE_SVD_Bipod'];
+ _w = _w + ['ACE_AK103'];
+ _w = _w + ['ACE_AK103_Kobra'];
+ _w = _w + ['ACE_AK104_Kobra'];
+ _w = _w + ['ACE_AK104'];
+ _w = _w + ['ACE_AK104_PSO'];
+ _w = _w + ['ACE_AK104_1P29'];
+ _w = _w + ['ACE_AK103_GL'];
+ _w = _w + ['ACE_AK103_1P29'];
+ _w = _w + ['ACE_AK103_GL_1P29'];
+ _w = _w + ['ACE_AK103_GL_PSO'];
+ _w = _w + ['ACE_AK103_GL_Kobra'];
+ _w = _w + ['ACE_AK105_1P29'];
+ _w = _w + ['ACE_RPK74M_1P29'];
+ _w = _w + ['ACE_AKMS_SD'];
+ _w = _w + ['ACE_AK105_Kobra'];
+ _w = _w + ['ACE_AK103_PSO'];
+ _w = _w + ['ACE_AK74M_GL_1P29'];
+ _w = _w + ['ACE_AK74M_GL_PSO'];
+ _w = _w + ['ACE_AK74M_GL_Kobra'];
+ _w = _w + ['ACE_AK74M_PSO'];
+ _w = _w + ['ACE_AK74M_1P29'];
+ _w = _w + ['ACE_M109'];
+ };
+
+ _w = _w + ['m8_carbine'];
+ _w = _w + ['m8_carbineGL'];
+ _w = _w + ['m8_compact'];
+ _w = _w + ['m8_sharpshooter'];
+ _w = _w + ['m8_SAW'];
+ if (paramDLCPMC) then {
+ _w = _w + ['AA12_PMC'];
+ _w = _w + ['m8_carbine_pmc'];
+ _w = _w + ['m8_compact_pmc'];
+ _w = _w + ['m8_holo_sd'];
+ if (_tiMode) then {
+ _w = _w + ['m8_tws'];
+ _w = _w + ['m8_tws_sd'];
+ };
+ };
+
+ WF_Logic setVariable ['primaryClasses',_w];
+
+ /* Secondary. */
+
+ _w = ['RPG7V'];
+ _w = _w + ['RPG18'];
+ _w = _w + ['M47Launcher_EP1'];
+ _w = _w + ['SMAW'];
+ _w = _w + ['MetisLauncher'];
+ _w = _w + ['Igla'];
+ _w = _w + ['Strela'];
+ _w = _w + ['Laserdesignator'];
+
+ if (WF_ACE) then
+ {
+ _w = _w + ['ACE_RPG7V_PGO7'];
+ _w = _w + ['ACE_RPG29'];
+ _w = _w + ['ACE_RPG27'];
+ _w = _w + ['ACE_KORDProxy'];
+ _w = _w + ['ACE_6T7TripodProxy'];
+ _w = _w + ['ACE_KonkursTripodProxy'];
+ _w = _w + ['ACE_2b14Proxy'];
+ _w = _w + ['ACE_2b14TripodProxy'];
+ _w = _w + ['ACE_Rucksack_RD90'];
+ _w = _w + ['ACE_Rucksack_RD54'];
+ _w = _w + ['ACE_Rucksack_RD99'];
+ }
+ else
+ {
+ /* Not all units are able to carry a backpack */
+ _get = getNumber(configFile >> 'CfgVehicles' >> typeOf player >> 'canCarryBackPack');
+
+ if (_get == 1) then {
+ _w = _w + ['TK_Assault_Pack_EP1'];
+ _w = _w + ['TK_RPG_Backpack_EP1'];
+ _w = _w + ['TK_ALICE_Pack_EP1'];
+ _w = _w + ['Tripod_Bag'];
+ _w = _w + ['KORD_TK_Bag_EP1'];
+ _w = _w + ['KORD_high_TK_Bag_EP1'];
+ _w = _w + ['SPG9_TK_INS_Bag_EP1'];
+ _w = _w + ['AGS_TK_Bag_EP1'];
+ _w = _w + ['Metis_TK_Bag_EP1'];
+ _w = _w + ['2b14_82mm_TK_Bag_EP1'];
+ };
+ };
+
+ WF_Logic setVariable ['secondaryClasses',_w];
+
+ /* Sidearms. */
+ _w = ['Makarov'];
+ _w = _w + ['revolver_EP1'];
+ _w = _w + ['revolver_gold_EP1'];
+ _w = _w + ['MakarovSD'];
+ _w = _w + ['Sa61_EP1'];
+ _w = _w + ['UZI_EP1'];
+ _w = _w + ['UZI_SD_EP1'];
+
+ WF_Logic setVariable ['sidearmClasses',_w];
+
+ /* Misc. */
+ _w = ['HandGrenade_East'];
+ _w = _w + ['HandGrenade_Stone'];
+ _w = _w + ['SmokeShell'];
+ _w = _w + ['SmokeShellRed'];
+ _w = _w + ['SmokeShellGreen'];
+ _w = _w + ['SmokeShellBlue'];
+ _w = _w + ['SmokeShellYellow'];
+ _w = _w + ['SmokeShellOrange'];
+ _w = _w + ['SmokeShellPurple'];
+ _w = _w + ['FlareWhite_GP25'];
+ _w = _w + ['FlareYellow_GP25'];
+ _w = _w + ['FlareGreen_GP25'];
+ _w = _w + ['FlareRed_GP25'];
+ _w = _w + ['1Rnd_HE_M203'];
+ _w = _w + ['1Rnd_HE_GP25'];
+ _w = _w + ['1Rnd_SMOKE_GP25'];
+ _w = _w + ['1Rnd_SMOKERED_GP25'];
+ _w = _w + ['1Rnd_SMOKEGREEN_GP25'];
+ _w = _w + ['1Rnd_SMOKEYELLOW_GP25'];
+ _w = _w + ['MineE'];
+ _w = _w + ['PipeBomb'];
+ _w = _w + ['Binocular'];
+ _w = _w + ['NVGoggles'];
+ _w = _w + ['Binocular_Vector'];
+ _w = _w + ['ItemCompass'];
+ _w = _w + ['ItemGPS'];
+ _w = _w + ['ItemMap'];
+ _w = _w + ['ItemRadio'];
+ _w = _w + ['ItemWatch'];
+
+ if (WF_ACE) then
+ {
+ _w = _w + ['ACE_MX2A'];
+ _w = _w + ['ACE_Earplugs'];
+ _w = _w + ['ACE_Bandage'];
+ _w = _w + ['ACE_Morphine'];
+ _w = _w + ['ACE_Epinephrine'];
+ _w = _w + ['ACE_Medkit'];
+ _w = _w + ['ACE_GlassesLHD_glasses'];
+ _w = _w + ['ACE_GlassesTactical'];
+ };
+
+ WF_Logic setVariable ['miscClasses',_w];
+
+ //--- Templates.
+ _items = ['ItemCompass','ItemGPS','ItemMap','ItemRadio','ItemWatch'];
+
+ _d = [getText(configFile >> 'CfgWeapons' >> 'AK_107_kobra' >> 'displayName') + '/' + getText(configFile >> 'CfgWeapons' >> 'Makarov' >> 'displayName')];
+ _p = [getText(configFile >> 'CfgWeapons' >> 'AK_107_kobra' >> 'picture')];
+ _t = [['AK_107_kobra','Makarov']];
+ _m = [['30Rnd_545x39_AK','30Rnd_545x39_AK','30Rnd_545x39_AK','30Rnd_545x39_AK','30Rnd_545x39_AK','30Rnd_545x39_AK','30Rnd_545x39_AK','30Rnd_545x39_AK',
+ 'HandGrenade_East','HandGrenade_East','SmokeShellBlue','SmokeShellBlue','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov',
+ '8Rnd_9x18_Makarov','8Rnd_9x18_Makarov']];
+ _s = [['Binocular']];
+ _i = [_items];
+ _l = [0];
+ _b = [true];
+
+ _d = _d + [getText(configFile >> 'CfgWeapons' >> 'AK_107_GL_kobra' >> 'displayName')];
+ _p = _p + [getText(configFile >> 'CfgWeapons' >> 'AK_107_GL_kobra' >> 'picture')];
+ _t = _t + [['AK_107_GL_kobra']];
+ _m = _m + [['30Rnd_545x39_AK','30Rnd_545x39_AK','30Rnd_545x39_AK','30Rnd_545x39_AK','30Rnd_545x39_AK','30Rnd_545x39_AK','30Rnd_545x39_AK','30Rnd_545x39_AK',
+ '30Rnd_545x39_AK','30Rnd_545x39_AK','HandGrenade_East','HandGrenade_East','1Rnd_HE_GP25','1Rnd_HE_GP25','1Rnd_HE_GP25','1Rnd_HE_GP25','1Rnd_HE_GP25','1Rnd_HE_GP25',
+ '1Rnd_HE_GP25','1Rnd_HE_GP25']];
+ _s = _s + [['Binocular']];
+ _i = _i + [_items];
+ _l = _l + [0];
+ _b = _b + [true];
+
+ _d = _d + [getText(configFile >> 'CfgWeapons' >> 'AK_107_pso' >> 'displayName') + '/' + getText(configFile >> 'CfgWeapons' >> 'RPG7V' >> 'displayName')];
+ _p = _p + [getText(configFile >> 'CfgWeapons' >> 'AK_107_pso' >> 'picture')];
+ _t = _t + [['AK_107_pso','RPG7V']];
+ _m = _m + [['30Rnd_545x39_AK','30Rnd_545x39_AK','30Rnd_545x39_AK','30Rnd_545x39_AK','30Rnd_545x39_AK','30Rnd_545x39_AK','PG7VL','PG7VL','PG7VL']];
+ _s = _s + [['Binocular','NVGoggles']];
+ _i = _i + [_items];
+ _l = _l + [1];
+ _b = _b + [false];
+
+ _d = _d + [getText(configFile >> 'CfgWeapons' >> 'AK_74_GL' >> 'displayName') + '/' + getText(configFile >> 'CfgWeapons' >> 'RPG7V' >> 'displayName')];
+ _p = _p + [getText(configFile >> 'CfgWeapons' >> 'AK_74_GL' >> 'picture')];
+ _t = _t + [['AK_74_GL','RPG7V']];
+ _m = _m + [['30Rnd_545x39_AK','30Rnd_545x39_AK','30Rnd_545x39_AK','30Rnd_545x39_AK','30Rnd_545x39_AK','30Rnd_545x39_AK','PG7V',
+ 'PG7V','PG7V','1Rnd_HE_GP25','1Rnd_HE_GP25','1Rnd_HE_GP25','1Rnd_HE_GP25','1Rnd_HE_GP25','1Rnd_HE_GP25','1Rnd_HE_GP25','1Rnd_HE_GP25']];
+ _s = _s + [['Binocular','NVGoggles']];
+ _i = _i + [_items];
+ _l = _l + [1];
+ _b = _b + [false];
+
+ _d = _d + [getText(configFile >> 'CfgWeapons' >> 'Sa58V_RCO_EP1' >> 'displayName') + '/' + getText(configFile >> 'CfgWeapons' >> 'RPG7V' >> 'displayName') + '/' + getText(configFile >> 'CfgWeapons' >> 'Makarov' >> 'displayName')];
+ _p = _p + [getText(configFile >> 'CfgWeapons' >> 'Sa58V_RCO_EP1' >> 'picture')];
+ _t = _t + [['Sa58V_RCO_EP1','RPG7V','Makarov']];
+ _m = _m + [['30Rnd_762x39_SA58','30Rnd_762x39_SA58','30Rnd_762x39_SA58','30Rnd_762x39_SA58','30Rnd_762x39_SA58','30Rnd_762x39_SA58','PG7VL','PG7VL','PG7VL',
+ '8Rnd_9x18_Makarov','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov']];
+ _s = _s + [['Binocular','NVGoggles']];
+ _i = _i + [_items];
+ _l = _l + [1];
+ _b = _b + [true];
+
+ _d = _d + [getText(configFile >> 'CfgWeapons' >> 'AKS_74_kobra' >> 'displayName') + '/' + getText(configFile >> 'CfgWeapons' >> 'MetisLauncher' >> 'displayName') + '/' + getText(configFile >> 'CfgWeapons' >> 'Makarov' >> 'displayName')];
+ _p = _p + [getText(configFile >> 'CfgWeapons' >> 'AKS_74_kobra' >> 'picture')];
+ _t = _t + [['AKS_74_kobra','MetisLauncher','Makarov']];
+ _m = _m + [['30Rnd_545x39_AK','30Rnd_545x39_AK','30Rnd_545x39_AK','30Rnd_545x39_AK','30Rnd_545x39_AK','30Rnd_545x39_AK','AT13',
+ '8Rnd_9x18_Makarov','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov']];
+ _s = _s + [['Binocular','NVGoggles']];
+ _i = _i + [_items];
+ _l = _l + [3];
+ _b = _b + [false];
+
+ _d = _d + [getText(configFile >> 'CfgWeapons' >> 'AK_107_kobra' >> 'displayName') + '/' + getText(configFile >> 'CfgWeapons' >> 'Igla' >> 'displayName') + '/' + getText(configFile >> 'CfgWeapons' >> 'Makarov' >> 'displayName')];
+ _p = _p + [getText(configFile >> 'CfgWeapons' >> 'AK_107_kobra' >> 'picture')];
+ _t = _t + [['AK_107_kobra','Igla','Makarov']];
+ _m = _m + [['30Rnd_545x39_AK','30Rnd_545x39_AK','30Rnd_545x39_AK','30Rnd_545x39_AK','30Rnd_545x39_AK','30Rnd_545x39_AK','Igla',
+ '8Rnd_9x18_Makarov','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov']];
+ _s = _s + [['Binocular','NVGoggles']];
+ _i = _i + [_items];
+ _l = _l + [2];
+ _b = _b + [false];
+
+ _d = _d + [getText(configFile >> 'CfgWeapons' >> 'bizon_silenced' >> 'displayName') + '/' + getText(configFile >> 'CfgWeapons' >> 'Makarov' >> 'displayName') + '/' + getText(configFile >> 'CfgMagazines' >> 'MineE' >> 'displayName')];
+ _p = _p + [getText(configFile >> 'CfgWeapons' >> 'bizon_silenced' >> 'picture')];
+ _t = _t + [['bizon_silenced','Makarov']];
+ _m = _m + [['64Rnd_9x19_SD_Bizon','64Rnd_9x19_SD_Bizon','64Rnd_9x19_SD_Bizon','64Rnd_9x19_SD_Bizon','64Rnd_9x19_SD_Bizon','64Rnd_9x19_SD_Bizon','MineE','MineE','MineE',
+ '8Rnd_9x18_Makarov','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov']];
+ _s = _s + [['Binocular']];
+ _i = _i + [_items];
+ _l = _l + [2];
+ _b = _b + [true];
+
+ if (_tiMode) then {
+ _d = _d + [getText(configFile >> 'CfgWeapons' >> 'AKS_74_GOSHAWK' >> 'displayName') + '/' + getText(configFile >> 'CfgWeapons' >> 'MakarovSD' >> 'displayName') + '/' + getText(configFile >> 'CfgMagazines' >> 'PipeBomb' >> 'displayName')];
+ _p = _p + [getText(configFile >> 'CfgWeapons' >> 'AKS_74_GOSHAWK' >> 'picture')];
+ _t = _t + [['AKS_74_GOSHAWK','MakarovSD']];
+ _m = _m + [['30Rnd_545x39_AK','30Rnd_545x39_AK','30Rnd_545x39_AK','30Rnd_545x39_AK','30Rnd_545x39_AK','30Rnd_545x39_AK','PipeBomb','PipeBomb','PipeBomb',
+ '8Rnd_9x18_MakarovSD','8Rnd_9x18_MakarovSD','8Rnd_9x18_MakarovSD','8Rnd_9x18_MakarovSD','8Rnd_9x18_MakarovSD','8Rnd_9x18_MakarovSD','8Rnd_9x18_MakarovSD','8Rnd_9x18_MakarovSD']];
+ _s = _s + [['Binocular','NVGoggles']];
+ _i = _i + [_items];
+ _l = _l + [2];
+ _b = _b + [true];
+ };
+
+ _d = _d + [getText(configFile >> 'CfgWeapons' >> 'PK' >> 'displayName') + '/' + getText(configFile >> 'CfgWeapons' >> 'Makarov' >> 'displayName')];
+ _p = _p + [getText(configFile >> 'CfgWeapons' >> 'PK' >> 'picture')];
+ _t = _t + [['PK','Makarov']];
+ _m = _m + [['100Rnd_762x54_PK','100Rnd_762x54_PK','100Rnd_762x54_PK','100Rnd_762x54_PK','100Rnd_762x54_PK','SmokeShellBlue','SmokeShellBlue','8Rnd_9x18_Makarov',
+ '8Rnd_9x18_Makarov','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov']];
+ _s = _s + [['Binocular']];
+ _i = _i + [_items];
+ _l = _l + [0];
+ _b = _b + [true];
+
+ _d = _d + [getText(configFile >> 'CfgWeapons' >> 'SVD_des_EP1' >> 'displayName') + '/' + getText(configFile >> 'CfgWeapons' >> 'MakarovSD' >> 'displayName')];
+ _p = _p + [getText(configFile >> 'CfgWeapons' >> 'SVD_des_EP1' >> 'picture')];
+ _t = _t + [['SVD_des_EP1','MakarovSD']];
+ _m = _m + [['10Rnd_762x54_SVD','10Rnd_762x54_SVD','10Rnd_762x54_SVD','10Rnd_762x54_SVD','10Rnd_762x54_SVD','10Rnd_762x54_SVD','10Rnd_762x54_SVD','10Rnd_762x54_SVD',
+ '10Rnd_762x54_SVD','10Rnd_762x54_SVD','HandGrenade_East','HandGrenade_East','8Rnd_9x18_MakarovSD','8Rnd_9x18_MakarovSD','8Rnd_9x18_MakarovSD','8Rnd_9x18_MakarovSD','8Rnd_9x18_MakarovSD',
+ '8Rnd_9x18_MakarovSD','8Rnd_9x18_MakarovSD','8Rnd_9x18_MakarovSD']];
+ _s = _s + [['Binocular']];
+ _i = _i + [_items];
+ _l = _l + [1];
+ _b = _b + [true];
+
+ _d = _d + [getText(configFile >> 'CfgWeapons' >> 'VSS_vintorez' >> 'displayName') + '/' + getText(configFile >> 'CfgWeapons' >> 'Laserdesignator' >> 'displayName') + '/' + getText(configFile >> 'CfgWeapons' >> 'MakarovSD' >> 'displayName')];
+ _p = _p + [getText(configFile >> 'CfgWeapons' >> 'VSS_vintorez' >> 'picture')];
+ _t = _t + [['VSS_vintorez','Laserdesignator','MakarovSD']];
+ _m = _m + [['20Rnd_9x39_SP5_VSS','20Rnd_9x39_SP5_VSS','20Rnd_9x39_SP5_VSS','20Rnd_9x39_SP5_VSS','20Rnd_9x39_SP5_VSS','20Rnd_9x39_SP5_VSS','20Rnd_9x39_SP5_VSS','20Rnd_9x39_SP5_VSS',
+ '20Rnd_9x39_SP5_VSS','20Rnd_9x39_SP5_VSS','HandGrenade_East','Laserbatteries','8Rnd_9x18_MakarovSD','8Rnd_9x18_MakarovSD','8Rnd_9x18_MakarovSD','8Rnd_9x18_MakarovSD','8Rnd_9x18_MakarovSD',
+ '8Rnd_9x18_MakarovSD','8Rnd_9x18_MakarovSD','8Rnd_9x18_MakarovSD']];
+ _s = _s + [['Binocular_Vector','NVGoggles']];
+ _i = _i + [_items];
+ _l = _l + [2];
+ _b = _b + [false];
+
+ _d = _d + [getText(configFile >> 'CfgWeapons' >> 'ksvk' >> 'displayName') + '/' + getText(configFile >> 'CfgWeapons' >> 'MakarovSD' >> 'displayName')];
+ _p = _p + [getText(configFile >> 'CfgWeapons' >> 'ksvk' >> 'picture')];
+ _t = _t + [['ksvk','MakarovSD']];
+ _m = _m + [['5Rnd_127x108_KSVK','5Rnd_127x108_KSVK','5Rnd_127x108_KSVK','5Rnd_127x108_KSVK','5Rnd_127x108_KSVK','5Rnd_127x108_KSVK','5Rnd_127x108_KSVK','5Rnd_127x108_KSVK',
+ '5Rnd_127x108_KSVK','5Rnd_127x108_KSVK','HandGrenade_East','HandGrenade_East','8Rnd_9x18_MakarovSD','8Rnd_9x18_MakarovSD','8Rnd_9x18_MakarovSD','8Rnd_9x18_MakarovSD','8Rnd_9x18_MakarovSD',
+ '8Rnd_9x18_MakarovSD','8Rnd_9x18_MakarovSD','8Rnd_9x18_MakarovSD']];
+ _s = _s + [['Binocular_Vector','NVGoggles']];
+ _i = _i + [_items];
+ _l = _l + [3];
+ _b = _b + [false];
+
+ _c = [];
+ _totalTemplates = count _d;
+
+ for [{_count = 0},{_count < _totalTemplates},{_count = _count + 1}] do {
+ _cost = 0;
+ {
+ _get = (_x+"_W") Call GetNamespace;
+ if (isNil '_get') then {
+ _get = _x Call GetNamespace;
+ };
+ if !(isNil '_get') then {_cost = _cost + (_get select QUERYGEARCOST)};
+ } forEach (_t select _count);
+
+ {
+ _get = _x Call GetNamespace;
+ if !(isNil '_get') then {_cost = _cost + (_get select QUERYGEARCOST)};
+ } forEach ((_m select _count) + (_s select _count) + (_i select _count));
+
+ _c = _c + [_cost];
+ };
+ WF_Logic setVariable ['templateClasses',_t];
+ WF_Logic setVariable ['templateNames',_d];
+ WF_Logic setVariable ['templateCosts',_c];
+ WF_Logic setVariable ['templatePictures',_p];
+ WF_Logic setVariable ['templateMags',_m];
+ WF_Logic setVariable ['templateItems',_i];
+ WF_Logic setVariable ['templateSpecs',_s];
+ WF_Logic setVariable ['templateUpgrades',_l];
+ WF_Logic setVariable ['templateAllowed',_b];
+ };
+};
+
+if (WF_ACE) then
+{
+ ['WFBE_EASTDEFAULTWEAPONS',['AK_107_kobra','ItemCompass','ItemMap','ItemWatch','ItemRadio','ACE_Earplugs','Binocular','RPG18'],true] Call SetNamespace;
+ ['WFBE_EASTDEFAULTAMMO',['30Rnd_545x39_AK','30Rnd_545x39_AK','30Rnd_545x39_AK','30Rnd_545x39_AK','30Rnd_545x39_AK','30Rnd_545x39_AK','HandGrenade_East','HandGrenade_East'],true] Call SetNamespace;
+}
+else
+{
+ ['WFBE_EASTDEFAULTWEAPONS',['AK_107_kobra','ItemCompass','ItemMap','ItemWatch','ItemRadio'],true] Call SetNamespace;
+ ['WFBE_EASTDEFAULTAMMO',['30Rnd_545x39_AK','30Rnd_545x39_AK','30Rnd_545x39_AK','30Rnd_545x39_AK','30Rnd_545x39_AK','30Rnd_545x39_AK','HandGrenade_East','HandGrenade_East'],true] Call SetNamespace;
+};
+
+//--- AI Leaders Loadouts.
+if (isServer) then {
+ //--- No Upgrade.
+ ['WFBE_EASTLEADERWEAPONS01',['AKS_74','RPG18','Makarov','Binocular','ItemRadio','ItemMap'],true] Call SetNamespace;
+ ['WFBE_EASTLEADERAMMO01',['30Rnd_545x39_AK','30Rnd_545x39_AK','30Rnd_545x39_AK','30Rnd_545x39_AK','30Rnd_545x39_AK','30Rnd_545x39_AK','RPG18','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov'],true] Call SetNamespace;
+ ['WFBE_EASTLEADERWEAPONS02',['AK_107_kobra','RPG18','Makarov','Binocular','ItemRadio','ItemMap'],true] Call SetNamespace;
+ ['WFBE_EASTLEADERAMMO02',['30Rnd_545x39_AK','30Rnd_545x39_AK','30Rnd_545x39_AK','30Rnd_545x39_AK','30Rnd_545x39_AK','30Rnd_545x39_AK','RPG18','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov'],true] Call SetNamespace;
+ ['WFBE_EASTLEADERWEAPONS03',['PK','Makarov','Binocular','ItemRadio','ItemMap'],true] Call SetNamespace;;
+ ['WFBE_EASTLEADERAMMO03',['100Rnd_762x54_PK','100Rnd_762x54_PK','100Rnd_762x54_PK','100Rnd_762x54_PK','100Rnd_762x54_PK','HandGrenade_East','HandGrenade_East','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov'],true] Call SetNamespace;
+ //--- Upgrade 1.
+ ['WFBE_EASTLEADERWEAPONS11',['AK_107_kobra','RPG7V','Makarov','Binocular','NVGoggles','ItemRadio','ItemMap'],true] Call SetNamespace;
+ ['WFBE_EASTLEADERAMMO11',['30Rnd_545x39_AK','30Rnd_545x39_AK','30Rnd_545x39_AK','30Rnd_545x39_AK','30Rnd_545x39_AK','30Rnd_545x39_AK','PG7VL','PG7VL','PG7VL','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov'],true] Call SetNamespace;
+ ['WFBE_EASTLEADERWEAPONS12',['RPK_74','RPG7V','Makarov','Binocular','NVGoggles','ItemRadio','ItemMap'],true] Call SetNamespace;
+ ['WFBE_EASTLEADERAMMO12',['75Rnd_545x39_RPK','75Rnd_545x39_RPK','75Rnd_545x39_RPK','75Rnd_545x39_RPK','75Rnd_545x39_RPK','75Rnd_545x39_RPK','PG7VL','PG7VL','PG7VL','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov'],true] Call SetNamespace;
+ ['WFBE_EASTLEADERWEAPONS13',['SVD','MakarovSD','Binocular','NVGoggles','ItemRadio','ItemMap'],true] Call SetNamespace;
+ ['WFBE_EASTLEADERAMMO13',['10Rnd_762x54_SVD','10Rnd_762x54_SVD','10Rnd_762x54_SVD','10Rnd_762x54_SVD','10Rnd_762x54_SVD','10Rnd_762x54_SVD','10Rnd_762x54_SVD','10Rnd_762x54_SVD','10Rnd_762x54_SVD','10Rnd_762x54_SVD','HandGrenade_East','HandGrenade_East','8Rnd_9x18_MakarovSD','8Rnd_9x18_MakarovSD','8Rnd_9x18_MakarovSD','8Rnd_9x18_MakarovSD'],true] Call SetNamespace;
+ //--- Upgrade 2.
+ ['WFBE_EASTLEADERWEAPONS21',['AK_107_pso','RPG7V','Makarov','Binocular','NVGoggles','ItemRadio','ItemMap'],true] Call SetNamespace;
+ ['WFBE_EASTLEADERAMMO21',['30Rnd_545x39_AK','30Rnd_545x39_AK','30Rnd_545x39_AK','30Rnd_545x39_AK','30Rnd_545x39_AK','30Rnd_545x39_AK','PG7VL','PG7VL','PG7VL','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov'],true] Call SetNamespace;
+ ['WFBE_EASTLEADERWEAPONS22',['SVD_des_EP1','RPG7V','Makarov','Binocular','NVGoggles','ItemRadio','ItemMap'],true] Call SetNamespace;
+ ['WFBE_EASTLEADERAMMO22',['10Rnd_762x54_SVD','10Rnd_762x54_SVD','10Rnd_762x54_SVD','10Rnd_762x54_SVD','10Rnd_762x54_SVD','10Rnd_762x54_SVD','PG7VL','PG7VL','PG7VL','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov'],true] Call SetNamespace;
+ ['WFBE_EASTLEADERWEAPONS23',['Pecheneg','Makarov','Binocular','NVGoggles','ItemRadio','ItemMap'],true] Call SetNamespace;
+ ['WFBE_EASTLEADERAMMO23',['100Rnd_762x54_PK','100Rnd_762x54_PK','100Rnd_762x54_PK','100Rnd_762x54_PK','100Rnd_762x54_PK','HandGrenade_East','HandGrenade_East','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov'],true] Call SetNamespace;
+ //--- Upgrade 3.
+ ['WFBE_EASTLEADERWEAPONS31',['AK_107_GL_pso','RPG7V','Binocular','NVGoggles','ItemRadio','ItemMap'],true] Call SetNamespace;
+ ['WFBE_EASTLEADERAMMO31',['30Rnd_545x39_AK','30Rnd_545x39_AK','30Rnd_545x39_AK','30Rnd_545x39_AK','30Rnd_545x39_AK','30Rnd_545x39_AK','PG7VL','PG7VL','PG7VL','1Rnd_HE_GP25','1Rnd_HE_GP25','1Rnd_HE_GP25','1Rnd_HE_GP25'],true] Call SetNamespace;
+ ['WFBE_EASTLEADERWEAPONS32',['Sa58V_RCO_EP1','MetisLauncher','Makarov','Binocular','NVGoggles','ItemRadio','ItemMap'],true] Call SetNamespace;
+ ['WFBE_EASTLEADERAMMO32',['30Rnd_762x39_SA58','30Rnd_762x39_SA58','30Rnd_762x39_SA58','30Rnd_762x39_SA58','30Rnd_762x39_SA58','30Rnd_762x39_SA58','AT13','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov'],true] Call SetNamespace;
+ ['WFBE_EASTLEADERWEAPONS33',['VSS_vintorez','Makarov','Binocular','NVGoggles','ItemRadio','ItemMap'],true] Call SetNamespace;
+ ['WFBE_EASTLEADERAMMO33',['20Rnd_9x39_SP5_VSS','20Rnd_9x39_SP5_VSS','20Rnd_9x39_SP5_VSS','20Rnd_9x39_SP5_VSS','20Rnd_9x39_SP5_VSS','20Rnd_9x39_SP5_VSS','20Rnd_9x39_SP5_VSS','20Rnd_9x39_SP5_VSS','20Rnd_9x39_SP5_VSS','20Rnd_9x39_SP5_VSS','HandGrenade_East','HandGrenade_East','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov'],true] Call SetNamespace;
+}; \ No newline at end of file
diff --git a/Common/Config/Core_Loadout/CombinedOps/Loadout_US.sqf b/Common/Config/Core_Loadout/CombinedOps/Loadout_US.sqf
new file mode 100644
index 0000000..0d658e2
--- /dev/null
+++ b/Common/Config/Core_Loadout/CombinedOps/Loadout_US.sqf
@@ -0,0 +1,574 @@
+/* US Loadout */
+Private ['_tiMode'];
+_tiMode = 'WFBE_THERMALIMAGING' Call GetNamespace;
+_tiMode = if (_tiMode == 1 || _tiMode == 3) then {true} else {false};
+
+if (!isServer || local player) then {
+ if (side player == WEST) then {
+ /* Magazines. */
+ _m = ["30Rnd_556x45_Stanag"];
+ _m = _m + ["30Rnd_556x45_StanagSD"];
+ _m = _m + ["20Rnd_556x45_Stanag"];
+ _m = _m + ["30Rnd_556x45_G36"];
+ _m = _m + ["30Rnd_556x45_G36SD"];
+ _m = _m + ["100Rnd_556x45_BetaCMag"];
+ _m = _m + ["5Rnd_762x51_M24"];
+ _m = _m + ["20Rnd_762x51_DMR"];
+ _m = _m + ["10Rnd_127x99_m107"];
+ _m = _m + ["100Rnd_762x51_M240"];
+ _m = _m + ["100Rnd_556x45_M249"];
+ _m = _m + ["200Rnd_556x45_M249"];
+ _m = _m + ["30Rnd_9x19_MP5"];
+ _m = _m + ["30Rnd_9x19_MP5SD"];
+ _m = _m + ["8Rnd_B_Beneli_74Slug"];
+ _m = _m + ["8Rnd_B_Beneli_Pellets"];
+ _m = _m + ["20Rnd_762x51_B_SCAR"];
+ _m = _m + ["20Rnd_762x51_SB_SCAR"];
+ _m = _m + ["6Rnd_HE_M203"];
+ _m = _m + ["6Rnd_FlareWhite_M203"];
+ _m = _m + ["6Rnd_FlareGreen_M203"];
+ _m = _m + ["6Rnd_FlareRed_M203"];
+ _m = _m + ["6Rnd_FlareYellow_M203"];
+ _m = _m + ["6Rnd_Smoke_M203"];
+ _m = _m + ["6Rnd_SmokeRed_M203"];
+ _m = _m + ["6Rnd_SmokeGreen_M203"];
+ _m = _m + ["6Rnd_SmokeYellow_M203"];
+ _m = _m + ["M136"];
+ _m = _m + ["MAAWS_HEAT"];
+ _m = _m + ["MAAWS_HEDP"];
+ _m = _m + ["SMAW_HEAA"];
+ _m = _m + ["SMAW_HEDP"];
+ _m = _m + ["Javelin"];
+ _m = _m + ["Stinger"];
+ _m = _m + ["Laserbatteries"];
+ _m = _m + ["15Rnd_9x19_M9"];
+ _m = _m + ["15Rnd_9x19_M9SD"];
+ _m = _m + ["7Rnd_45ACP_1911"];
+ _m = _m + ["17Rnd_9x19_glock17"];
+
+ if (WF_ACE) then
+ {
+ _m = _m + ["ACE_Battery_Rangefinder"];
+ _m = _m + ["ACE_20Rnd_762x51_B_HK417"];
+ _m = _m + ["ACE_30Rnd_556x45_T_Stanag"];
+ _m = _m + ["ACE_20Rnd_762x51_T_M110"];
+ _m = _m + ["ACE_100Rnd_556x45_T_M249"];
+ _m = _m + ["ACE_200Rnd_556x45_T_M249"];
+ _m = _m + ["ACE_10Rnd_127x99_T_m107"];
+ _m = _m + ["ACE_10Rnd_127x99_Raufoss_m107"];
+ _m = _m + ["ACE_M252HE_CSWDM"];
+ _m = _m + ["ACE_M252WP_CSWDM"];
+ _m = _m + ["ACE_M2_CSWDM"];
+ _m = _m + ["ACE_TOW_CSWDM"];
+ _m = _m + ["ACE_5Rnd_25x59_HEDP_Barrett"];
+ _m = _m + ["ACE_30Rnd_556x45_T_G36"];
+ _m = _m + ["ACE_20Rnd_762x51_T_HK417"];
+ _m = _m + ["ACE_5Rnd_762x51_T_M24"];
+ _m = _m + ["ACE_20Rnd_762x51_SB_SCAR"];
+ };
+
+ if (paramDLCBAF) then {
+ _m = _m + ["5Rnd_127x99_AS50"];
+ _m = _m + ["5Rnd_86x70_L115A1"];
+ _m = _m + ["200Rnd_556x45_L110A1"];
+ _m = _m + ["NLAW"];
+ };
+
+ if (paramDLCPMC) then {
+ _m = _m + ["20Rnd_B_AA12_Pellets"];
+ _m = _m + ["20Rnd_B_AA12_74Slug"];
+ _m = _m + ["20Rnd_B_AA12_HE"];
+ };
+
+ WF_Logic setVariable ['magazineClasses',_m];
+
+ /* Primary. */
+ _w = ['M16A2'];
+ _w = _w + ['M16A2GL'];
+ _w = _w + ['m16a4'];
+ _w = _w + ['m16a4_acg'];
+ _w = _w + ['M16A4_GL'];
+ _w = _w + ['M16A4_ACG_GL'];
+ _w = _w + ['M24'];
+ _w = _w + ['M40A3'];
+ _w = _w + ['M24_des_EP1'];
+ _w = _w + ['M240'];
+ _w = _w + ['m240_scoped_EP1'];
+ _w = _w + ['M60A4_EP1'];
+ _w = _w + ['Mk_48'];
+ _w = _w + ['Mk_48_DES_EP1'];
+ _w = _w + ['M249_EP1'];
+ if (_tiMode) then {
+ _w = _w + ['M249_TWS_EP1'];
+ };
+ _w = _w + ['M249_m145_EP1'];
+ _w = _w + ['M4A1'];
+ _w = _w + ['M4A1_Aim'];
+ _w = _w + ['M4A1_Aim_camo'];
+ _w = _w + ['M4A1_RCO_GL'];
+ _w = _w + ['M4A1_AIM_SD_camo'];
+ _w = _w + ['M4A1_HWS_GL_SD_Camo'];
+ _w = _w + ['M4A1_HWS_GL'];
+ _w = _w + ['M4A1_HWS_GL_camo'];
+ _w = _w + ['M4SPR'];
+ _w = _w + ['M4A3_CCO_EP1'];
+ _w = _w + ['M4A3_RCO_GL_EP1'];
+ _w = _w + ['MP5SD'];
+ _w = _w + ['MP5A5'];
+ _w = _w + ['G36C'];
+ _w = _w + ['G36C_camo'];
+ _w = _w + ['G36_C_SD_eotech'];
+ _w = _w + ['G36_C_SD_camo'];
+ _w = _w + ['G36a'];
+ _w = _w + ['G36A_camo'];
+ _w = _w + ['G36K'];
+ _w = _w + ['G36K_camo'];
+ _w = _w + ['MG36'];
+ _w = _w + ['MG36_camo'];
+ _w = _w + ['DMR'];
+ _w = _w + ['M1014'];
+ _w = _w + ['M32_EP1'];
+ _w = _w + ['M79_EP1'];
+ _w = _w + ['Mk13_EP1'];
+ _w = _w + ['M14_EP1'];
+ _w = _w + ['m107'];
+ if (_tiMode) then {
+ _w = _w + ['m107_TWS_EP1'];
+ _w = _w + ['M110_TWS_EP1'];
+ };
+ _w = _w + ['M110_NVG_EP1'];
+ _w = _w + ['SCAR_L_CQC'];
+ _w = _w + ['SCAR_L_CQC_Holo'];
+ _w = _w + ['SCAR_L_STD_Mk4CQT'];
+ _w = _w + ['SCAR_L_STD_EGLM_RCO'];
+ _w = _w + ['SCAR_L_CQC_EGLM_Holo'];
+ if (_tiMode) then {
+ _w = _w + ['SCAR_L_STD_EGLM_TWS'];
+ };
+ _w = _w + ['SCAR_L_STD_HOLO'];
+ _w = _w + ['SCAR_H_CQC_CCO'];
+ _w = _w + ['SCAR_H_CQC_CCO_SD'];
+ _w = _w + ['SCAR_H_STD_EGLM_Spect'];
+ _w = _w + ['SCAR_H_LNG_Sniper'];
+ _w = _w + ['SCAR_H_LNG_Sniper_SD'];
+ if (_tiMode) then {
+ _w = _w + ['SCAR_H_STD_TWS_SD'];
+ };
+ _w = _w + ['m8_carbine'];
+ _w = _w + ['m8_carbineGL'];
+ _w = _w + ['m8_compact'];
+ _w = _w + ['m8_sharpshooter'];
+ _w = _w + ['m8_SAW'];
+
+ if (paramDLCBAF) then {
+ _w = _w + ['BAF_AS50_scoped'];
+ if (_tiMode) then {
+ _w = _w + ['BAF_AS50_TWS'];
+ };
+ _w = _w + ['BAF_LRR_scoped'];
+ _w = _w + ['BAF_LRR_scoped_W'];
+ _w = _w + ['BAF_L85A2_RIS_Holo'];
+ _w = _w + ['BAF_L85A2_UGL_Holo'];
+ _w = _w + ['BAF_L85A2_RIS_SUSAT'];
+ _w = _w + ['BAF_L85A2_UGL_SUSAT'];
+ _w = _w + ['BAF_L85A2_RIS_ACOG'];
+ _w = _w + ['BAF_L85A2_UGL_ACOG'];
+ if (_tiMode) then {
+ _w = _w + ['BAF_L85A2_RIS_CWS'];
+ };
+ _w = _w + ['BAF_L86A2_ACOG'];
+ _w = _w + ['BAF_L110A1_Aim'];
+ _w = _w + ['BAF_L7A2_GPMG'];
+ };
+
+ if (paramDLCPMC) then {
+ _w = _w + ['AA12_PMC'];
+ _w = _w + ['m8_carbine_pmc'];
+ _w = _w + ['m8_compact_pmc'];
+ _w = _w + ['m8_holo_sd'];
+ if (_tiMode) then {
+ _w = _w + ['m8_tws'];
+ _w = _w + ['m8_tws_sd'];
+ };
+ };
+
+ if (WF_ACE) then
+ {
+ _w = _w + ['ACE_HK416_D10'];
+ _w = _w + ['ACE_HK416_D10_Holo'];
+ _w = _w + ['ACE_HK416_D10_COMPM3_SD'];
+ _w = _w + ['ACE_HK416_D10_M320'];
+ _w = _w + ['ACE_HK416_D14'];
+ _w = _w + ['ACE_HK416_D14_ACOG_PVS14'];
+ _w = _w + ['ACE_HK416_D14_TWS'];
+ _w = _w + ['ACE_HK416_D14_COMPM3_M320'];
+ _w = _w + ['ACE_HK417_Eotech_4x'];
+ _w = _w + ['ACE_HK417_micro'];
+ _w = _w + ['ACE_HK417_leupold'];
+ _w = _w + ['ACE_M109'];
+ };
+
+ WF_Logic setVariable ['primaryClasses',_w];
+
+ /* Secondary. */
+
+ _w = ['M136'];
+ _w = _w + ['MAAWS'];
+ if (paramDLCBAF) then {
+ _w = _w + ['BAF_NLAW_Launcher'];
+ };
+
+ _w = _w + ['Javelin'];
+ _w = _w + ['Stinger'];
+ _w = _w + ['Laserdesignator'];
+ _w = _w + ['SMAW'];
+
+ if(WF_ACE) then
+ {
+ _w = _w + ['ACE_Rucksack_MOLLE_Brown'];
+ _w = _w + ['ACE_Coyote_Pack'];
+ _w = _w + ['ACE_CharliePack'];
+ _w = _w + ['ACE_M252Proxy'];
+ _w = _w + ['ACE_M252TripodProxy'];
+ _w = _w + ['ACE_M2HBProxy'];
+ _w = _w + ['ACE_M3TripodProxy'];
+ _w = _w + ['ACE_M220Proxy'];
+ _w = _w + ['ACE_M220TripodProxy'];
+ }
+ else
+ {
+ /* Not all units are able to carry a backpack */
+ _get = getNumber(configFile >> 'CfgVehicles' >> typeOf player >> 'canCarryBackPack');
+
+ if (_get == 1) then {
+ _w = _w + ['US_Assault_Pack_EP1'];
+ _w = _w + ['US_Patrol_Pack_EP1'];
+ _w = _w + ['US_Backpack_EP1'];
+
+ if (paramDLCBAF) then {
+ _w = _w + ['BAF_AssaultPack_RifleAmmo'];
+ };
+
+ _w = _w + ['Tripod_Bag'];
+
+ if (paramDLCBAF) then {
+ _w = _w + ['BAF_L2A1_ACOG_minitripod_bag'];
+ _w = _w + ['BAF_L2A1_ACOG_tripod_bag'];
+ _w = _w + ['BAF_GPMG_Minitripod_D_bag'];
+ _w = _w + ['BAF_GMG_ACOG_minitripod_bag'];
+ };
+
+ _w = _w + ['M2HD_mini_TriPod_US_Bag_EP1'];
+ _w = _w + ['M2StaticMG_US_Bag_EP1'];
+ _w = _w + ['MK19_TriPod_US_Bag_EP1'];
+ _w = _w + ['TOW_TriPod_US_Bag_EP1'];
+ _w = _w + ['M252_US_Bag_EP1'];
+ };
+
+ if (WF_ACE) then {
+ _w = _w + ['ACE_M224TripodProxy'];
+ _w = _w + ['ACE_M224Proxy'];
+ _w = _w + ['ACE_VTAC_RUSH72_ACU'];
+ _w = _w + ['ACE_BackPack_ACR_TT'];
+ _w = _w + ['ACE_CharliePack_ACU'];
+ _w = _w + ['ACE_CharliePack_ACU_Medic'];
+ _w = _w + ['ACE_M252Proxy'];
+ _w = _w + ['ACE_M252TripodProxy'];
+ };
+ };
+
+ WF_Logic setVariable ['secondaryClasses',_w];
+
+ /* Sidearms. */
+ _w = ['Colt1911'];
+ _w = _w + ['M9'];
+ _w = _w + ['M9SD'];
+ _w = _w + ['glock17_EP1'];
+ if (WF_ACE) then {
+ _w = _w + ['ACE_USP'];
+ _w = _w + ['ACE_USPSD'];
+ _w = _w + ['ACE_P226'];
+ _w = _w + ['ACE_P8'];
+ };
+
+ WF_Logic setVariable ['sidearmClasses',_w];
+
+ /* Misc. */
+ _w = ['HandGrenade_West'];
+
+ if (paramDLCBAF) then {
+ _w = _w + ['BAF_L109A1_HE'];
+ };
+
+ _w = _w + ['HandGrenade_Stone'];
+ _w = _w + ['IR_Strobe_Target'];
+ _w = _w + ['IR_Strobe_Marker'];
+ _w = _w + ['SmokeShell'];
+ _w = _w + ['SmokeShellRed'];
+ _w = _w + ['SmokeShellGreen'];
+ _w = _w + ['SmokeShellBlue'];
+ _w = _w + ['SmokeShellYellow'];
+ _w = _w + ['SmokeShellOrange'];
+ _w = _w + ['SmokeShellPurple'];
+ _w = _w + ['FlareWhite_M203'];
+ _w = _w + ['FlareYellow_M203'];
+ _w = _w + ['FlareGreen_M203'];
+ _w = _w + ['FlareRed_M203'];
+ _w = _w + ['1Rnd_HE_M203'];
+ _w = _w + ['1Rnd_Smoke_M203'];
+ _w = _w + ['1Rnd_SmokeRed_M203'];
+ _w = _w + ['1Rnd_SmokeGreen_M203'];
+ _w = _w + ['1Rnd_SmokeYellow_M203'];
+ _w = _w + ['Mine'];
+ _w = _w + ['PipeBomb'];
+ _w = _w + ['Binocular'];
+ _w = _w + ['NVGoggles'];
+ _w = _w + ['Binocular_Vector'];
+ _w = _w + ['ItemCompass'];
+ _w = _w + ['ItemGPS'];
+ _w = _w + ['ItemMap'];
+ _w = _w + ['ItemRadio'];
+ _w = _w + ['ItemWatch'];
+
+ if (WF_ACE) then
+ {
+ _w = _w + ['ACE_MX2A'];
+ _w = _w + ['ACE_Earplugs'];
+ _w = _w + ["ACE_SMAW_Spotting"];
+ _w = _w + ["ACE_HuntIR_M203"];
+ _w = _w + ["ACE_HuntIR_monitor"];
+ _w = _w + ["ACE_HuntIR_monitor"];
+ _w = _w + ['ACE_Bandage'];
+ _w = _w + ['ACE_Morphine'];
+ _w = _w + ['ACE_Epinephrine'];
+ _w = _w + ['ACE_Medkit'];
+ _w = _w + ['ACE_GlassesLHD_glasses'];
+ _w = _w + ['ACE_GlassesTactical'];
+ _w = _w + ['ACE_Javelin_CLU'];
+ };
+
+ WF_Logic setVariable ['miscClasses',_w];
+
+ //--- Templates.
+ _items = ['ItemCompass','ItemGPS','ItemMap','ItemRadio','ItemWatch'];
+
+ _d = [getText(configFile >> 'CfgWeapons' >> 'SCAR_L_CQC' >> 'displayName') + '/' + getText(configFile >> 'CfgWeapons' >> 'Colt1911' >> 'displayName')];
+ _p = [getText(configFile >> 'CfgWeapons' >> 'SCAR_L_CQC' >> 'picture')];
+ _t = [['SCAR_L_CQC','Colt1911']];
+ _m = [['30Rnd_556x45_Stanag','30Rnd_556x45_Stanag','30Rnd_556x45_Stanag','30Rnd_556x45_Stanag','30Rnd_556x45_Stanag','30Rnd_556x45_Stanag','30Rnd_556x45_Stanag','30Rnd_556x45_Stanag',
+ 'HandGrenade_West','HandGrenade_West','SmokeShellBlue','SmokeShellBlue','7Rnd_45ACP_1911','7Rnd_45ACP_1911','7Rnd_45ACP_1911','7Rnd_45ACP_1911','7Rnd_45ACP_1911','7Rnd_45ACP_1911',
+ '7Rnd_45ACP_1911','7Rnd_45ACP_1911']];
+ _s = [['Binocular']];
+ _i = [_items];
+ _l = [0];
+ _b = [true];
+
+ _d = _d + [getText(configFile >> 'CfgWeapons' >> 'M16A4_GL' >> 'displayName')];
+ _p = _p + [getText(configFile >> 'CfgWeapons' >> 'M16A4_GL' >> 'picture')];
+ _t = _t + [['M16A4_GL']];
+ _m = _m + [['30Rnd_556x45_Stanag','30Rnd_556x45_Stanag','30Rnd_556x45_Stanag','30Rnd_556x45_Stanag','30Rnd_556x45_Stanag','30Rnd_556x45_Stanag','30Rnd_556x45_Stanag','30Rnd_556x45_Stanag',
+ '30Rnd_556x45_Stanag','30Rnd_556x45_Stanag','HandGrenade_West','HandGrenade_West','1Rnd_HE_M203','1Rnd_HE_M203','1Rnd_HE_M203','1Rnd_HE_M203','1Rnd_HE_M203','1Rnd_HE_M203',
+ '1Rnd_HE_M203','1Rnd_HE_M203']];
+ _s = _s + [['Binocular']];
+ _i = _i + [_items];
+ _l = _l + [0];
+ _b = _b + [true];
+
+ _d = _d + [getText(configFile >> 'CfgWeapons' >> 'G36C_camo' >> 'displayName') + '/' + getText(configFile >> 'CfgWeapons' >> 'M136' >> 'displayName')];
+ _p = _p + [getText(configFile >> 'CfgWeapons' >> 'G36C_camo' >> 'picture')];
+ _t = _t + [['G36C_camo','M136']];
+ _m = _m + [['30Rnd_556x45_G36','30Rnd_556x45_G36','30Rnd_556x45_G36','30Rnd_556x45_G36','30Rnd_556x45_G36','30Rnd_556x45_G36','M136']];
+ _s = _s + [['Binocular']];
+ _i = _i + [_items];
+ _l = _l + [0];
+ _b = _b + [true];
+
+ _d = _d + [getText(configFile >> 'CfgWeapons' >> 'SCAR_H_STD_EGLM_Spect' >> 'displayName') + '/' + getText(configFile >> 'CfgWeapons' >> 'MAAWS' >> 'displayName')];
+ _p = _p + [getText(configFile >> 'CfgWeapons' >> 'SCAR_H_STD_EGLM_Spect' >> 'picture')];
+ _t = _t + [['SCAR_H_STD_EGLM_Spect','MAAWS']];
+ _m = _m + [['20rnd_762x51_B_SCAR','20rnd_762x51_B_SCAR','20rnd_762x51_B_SCAR','20rnd_762x51_B_SCAR','20rnd_762x51_B_SCAR','20rnd_762x51_B_SCAR','MAAWS_HEAT',
+ 'MAAWS_HEAT','1Rnd_HE_M203','1Rnd_HE_M203','1Rnd_HE_M203','1Rnd_HE_M203','1Rnd_HE_M203','1Rnd_HE_M203','1Rnd_HE_M203','1Rnd_HE_M203']];
+ _s = _s + [['Binocular','NVGoggles']];
+ _i = _i + [_items];
+ _l = _l + [3];
+ _b = _b + [false];
+
+ _d = _d + [getText(configFile >> 'CfgWeapons' >> 'SCAR_L_STD_HOLO' >> 'displayName') + '/' + getText(configFile >> 'CfgWeapons' >> 'MAAWS' >> 'displayName') + '/' + getText(configFile >> 'CfgWeapons' >> 'M9' >> 'displayName')];
+ _p = _p + [getText(configFile >> 'CfgWeapons' >> 'SCAR_L_STD_HOLO' >> 'picture')];
+ _t = _t + [['SCAR_L_STD_HOLO','MAAWS','M9']];
+ _m = _m + [['30Rnd_556x45_Stanag','30Rnd_556x45_Stanag','30Rnd_556x45_Stanag','30Rnd_556x45_Stanag','30Rnd_556x45_Stanag','30Rnd_556x45_Stanag','MAAWS_HEAT','MAAWS_HEAT',
+ '15Rnd_9x19_M9','15Rnd_9x19_M9','15Rnd_9x19_M9','15Rnd_9x19_M9','15Rnd_9x19_M9','15Rnd_9x19_M9','15Rnd_9x19_M9','15Rnd_9x19_M9']];
+ _s = _s + [['Binocular','NVGoggles']];
+ _i = _i + [_items];
+ _l = _l + [2];
+ _b = _b + [false];
+
+ _d = _d + [getText(configFile >> 'CfgWeapons' >> 'M4A3_CCO_EP1' >> 'displayName') + '/' + getText(configFile >> 'CfgWeapons' >> 'Javelin' >> 'displayName') + '/' + getText(configFile >> 'CfgWeapons' >> 'Colt1911' >> 'displayName')];
+ _p = _p + [getText(configFile >> 'CfgWeapons' >> 'M4A3_CCO_EP1' >> 'picture')];
+ _t = _t + [['M4A3_CCO_EP1','Javelin','Colt1911']];
+ _m = _m + [['30Rnd_556x45_Stanag','30Rnd_556x45_Stanag','30Rnd_556x45_Stanag','30Rnd_556x45_Stanag','30Rnd_556x45_Stanag','30Rnd_556x45_Stanag','Javelin',
+ '7Rnd_45ACP_1911','7Rnd_45ACP_1911','7Rnd_45ACP_1911','7Rnd_45ACP_1911','7Rnd_45ACP_1911','7Rnd_45ACP_1911','7Rnd_45ACP_1911','7Rnd_45ACP_1911']];
+ _s = _s + [['Binocular','NVGoggles']];
+ _i = _i + [_items];
+ _l = _l + [3];
+ _b = _b + [false];
+
+ _d = _d + [getText(configFile >> 'CfgWeapons' >> 'SCAR_L_STD_Mk4CQT' >> 'displayName') + '/' + getText(configFile >> 'CfgWeapons' >> 'Stinger' >> 'displayName') + '/' + getText(configFile >> 'CfgWeapons' >> 'M9' >> 'displayName')];
+ _p = _p + [getText(configFile >> 'CfgWeapons' >> 'SCAR_L_STD_Mk4CQT' >> 'picture')];
+ _t = _t + [['SCAR_L_STD_Mk4CQT','Stinger','M9']];
+ _m = _m + [['30Rnd_556x45_Stanag','30Rnd_556x45_Stanag','30Rnd_556x45_Stanag','30Rnd_556x45_Stanag','30Rnd_556x45_Stanag','30Rnd_556x45_Stanag','Stinger',
+ '15Rnd_9x19_M9','15Rnd_9x19_M9','15Rnd_9x19_M9','15Rnd_9x19_M9','15Rnd_9x19_M9','15Rnd_9x19_M9','15Rnd_9x19_M9','15Rnd_9x19_M9']];
+ _s = _s + [['Binocular','NVGoggles']];
+ _i = _i + [_items];
+ _l = _l + [2];
+ _b = _b + [false];
+
+ _d = _d + [getText(configFile >> 'CfgWeapons' >> 'SCAR_L_CQC' >> 'displayName') + '/' + getText(configFile >> 'CfgWeapons' >> 'M9' >> 'displayName') + '/' + getText(configFile >> 'CfgMagazines' >> 'Mine' >> 'displayName')];
+ _p = _p + [getText(configFile >> 'CfgWeapons' >> 'SCAR_L_CQC' >> 'picture')];
+ _t = _t + [['SCAR_L_CQC','M9']];
+ _m = _m + [['30Rnd_556x45_Stanag','30Rnd_556x45_Stanag','30Rnd_556x45_Stanag','30Rnd_556x45_Stanag','30Rnd_556x45_Stanag','30Rnd_556x45_Stanag','Mine','Mine','Mine',
+ '15Rnd_9x19_M9','15Rnd_9x19_M9','15Rnd_9x19_M9','15Rnd_9x19_M9','15Rnd_9x19_M9','15Rnd_9x19_M9','15Rnd_9x19_M9','15Rnd_9x19_M9']];
+ _s = _s + [['Binocular']];
+ _i = _i + [_items];
+ _l = _l + [0];
+ _b = _b + [true];
+
+ _d = _d + [getText(configFile >> 'CfgWeapons' >> 'SCAR_H_CQC_CCO_SD' >> 'displayName') + '/' + getText(configFile >> 'CfgWeapons' >> 'M9SD' >> 'displayName') + '/' + getText(configFile >> 'CfgMagazines' >> 'PipeBomb' >> 'displayName')];
+ _p = _p + [getText(configFile >> 'CfgWeapons' >> 'SCAR_H_CQC_CCO_SD' >> 'picture')];
+ _t = _t + [['SCAR_H_CQC_CCO_SD','M9SD']];
+ _m = _m + [['20Rnd_762x51_SB_SCAR','20Rnd_762x51_SB_SCAR','20Rnd_762x51_SB_SCAR','20Rnd_762x51_SB_SCAR','20Rnd_762x51_SB_SCAR','20Rnd_762x51_SB_SCAR','PipeBomb','PipeBomb','PipeBomb',
+ '15Rnd_9x19_M9SD','15Rnd_9x19_M9SD','15Rnd_9x19_M9SD','15Rnd_9x19_M9SD','15Rnd_9x19_M9SD','15Rnd_9x19_M9SD','15Rnd_9x19_M9SD','15Rnd_9x19_M9SD']];
+ _s = _s + [['Binocular','NVGoggles']];
+ _i = _i + [_items];
+ _l = _l + [1];
+ _b = _b + [true];
+
+ _d = _d + [getText(configFile >> 'CfgWeapons' >> 'm240_scoped_EP1' >> 'displayName') + '/' + getText(configFile >> 'CfgWeapons' >> 'Colt1911' >> 'displayName')];
+ _p = _p + [getText(configFile >> 'CfgWeapons' >> 'm240_scoped_EP1' >> 'picture')];
+ _t = _t + [['m240_scoped_EP1','Colt1911']];
+ _m = _m + [['100Rnd_762x51_M240','100Rnd_762x51_M240','100Rnd_762x51_M240','100Rnd_762x51_M240','100Rnd_762x51_M240','SmokeShellRed','SmokeShellRed','7Rnd_45ACP_1911',
+ '7Rnd_45ACP_1911','7Rnd_45ACP_1911','7Rnd_45ACP_1911','7Rnd_45ACP_1911','7Rnd_45ACP_1911','7Rnd_45ACP_1911','7Rnd_45ACP_1911']];
+ _s = _s + [['Binocular']];
+ _i = _i + [_items];
+ _l = _l + [0];
+ _b = _b + [true];
+
+ _d = _d + [getText(configFile >> 'CfgWeapons' >> 'M249_EP1' >> 'displayName') + '/' + getText(configFile >> 'CfgWeapons' >> 'Colt1911' >> 'displayName')];
+ _p = _p + [getText(configFile >> 'CfgWeapons' >> 'M249_EP1' >> 'picture')];
+ _t = _t + [['M249_EP1','Colt1911']];
+ _m = _m + [['200Rnd_556x45_M249','200Rnd_556x45_M249','200Rnd_556x45_M249','200Rnd_556x45_M249','200Rnd_556x45_M249','SmokeShellRed','SmokeShellRed','7Rnd_45ACP_1911',
+ '7Rnd_45ACP_1911','7Rnd_45ACP_1911','7Rnd_45ACP_1911','7Rnd_45ACP_1911','7Rnd_45ACP_1911','7Rnd_45ACP_1911','7Rnd_45ACP_1911']];
+ _s = _s + [['Binocular','NVGoggles']];
+ _i = _i + [_items];
+ _l = _l + [2];
+ _b = _b + [true];
+
+ _d = _d + [getText(configFile >> 'CfgWeapons' >> 'M14_EP1' >> 'displayName') + '/' + getText(configFile >> 'CfgWeapons' >> 'M9SD' >> 'displayName')];
+ _p = _p + [getText(configFile >> 'CfgWeapons' >> 'M14_EP1' >> 'picture')];
+ _t = _t + [['M14_EP1','M9SD']];
+ _m = _m + [['20Rnd_762x51_DMR','20Rnd_762x51_DMR','20Rnd_762x51_DMR','20Rnd_762x51_DMR','20Rnd_762x51_DMR','20Rnd_762x51_DMR','20Rnd_762x51_DMR','20Rnd_762x51_DMR',
+ '20Rnd_762x51_DMR','20Rnd_762x51_DMR','HandGrenade_West','HandGrenade_West','15Rnd_9x19_M9SD','15Rnd_9x19_M9SD','15Rnd_9x19_M9SD','15Rnd_9x19_M9SD','15Rnd_9x19_M9SD',
+ '15Rnd_9x19_M9SD','15Rnd_9x19_M9SD','15Rnd_9x19_M9SD']];
+ _s = _s + [['Binocular_Vector','NVGoggles']];
+ _i = _i + [_items];
+ _l = _l + [2];
+ _b = _b + [false];
+
+ if (_tiMode) then {
+ _d = _d + [getText(configFile >> 'CfgWeapons' >> 'M110_TWS_EP1' >> 'displayName') + '/' + getText(configFile >> 'CfgWeapons' >> 'Laserdesignator' >> 'displayName') + '/' + getText(configFile >> 'CfgWeapons' >> 'M9SD' >> 'displayName')];
+ _p = _p + [getText(configFile >> 'CfgWeapons' >> 'M110_TWS_EP1' >> 'picture')];
+ _t = _t + [['M110_TWS_EP1','Laserdesignator','M9SD']];
+ _m = _m + [['20Rnd_762x51_B_SCAR','20Rnd_762x51_B_SCAR','20Rnd_762x51_B_SCAR','20Rnd_762x51_B_SCAR','20Rnd_762x51_B_SCAR','20Rnd_762x51_B_SCAR','20Rnd_762x51_B_SCAR','20Rnd_762x51_B_SCAR',
+ '20Rnd_762x51_B_SCAR','20Rnd_762x51_B_SCAR','HandGrenade_West','Laserbatteries','15Rnd_9x19_M9SD','15Rnd_9x19_M9SD','15Rnd_9x19_M9SD','15Rnd_9x19_M9SD','15Rnd_9x19_M9SD',
+ '15Rnd_9x19_M9SD','15Rnd_9x19_M9SD','15Rnd_9x19_M9SD']];
+ _s = _s + [['Binocular_Vector','NVGoggles']];
+ _i = _i + [_items];
+ _l = _l + [2];
+ _b = _b + [false];
+ };
+
+ _d = _d + [getText(configFile >> 'CfgWeapons' >> 'm107' >> 'displayName') + '/' + getText(configFile >> 'CfgWeapons' >> 'M9SD' >> 'displayName')];
+ _p = _p + [getText(configFile >> 'CfgWeapons' >> 'm107' >> 'picture')];
+ _t = _t + [['m107','M9SD']];
+ _m = _m + [['10Rnd_127x99_m107','10Rnd_127x99_m107','10Rnd_127x99_m107','10Rnd_127x99_m107','10Rnd_127x99_m107','10Rnd_127x99_m107','10Rnd_127x99_m107','10Rnd_127x99_m107',
+ '10Rnd_127x99_m107','10Rnd_127x99_m107','HandGrenade_West','HandGrenade_West','15Rnd_9x19_M9SD','15Rnd_9x19_M9SD','15Rnd_9x19_M9SD','15Rnd_9x19_M9SD','15Rnd_9x19_M9SD',
+ '15Rnd_9x19_M9SD','15Rnd_9x19_M9SD','15Rnd_9x19_M9SD']];
+ _s = _s + [['Binocular_Vector','NVGoggles']];
+ _i = _i + [_items];
+ _l = _l + [3];
+ _b = _b + [false];
+
+ _c = [];
+ _totalTemplates = count _d;
+
+ for [{_count = 0},{_count < _totalTemplates},{_count = _count + 1}] do {
+ _cost = 0;
+ {
+ _get = (_x+"_W") Call GetNamespace;
+ if (isNil '_get') then {
+ _get = _x Call GetNamespace;
+ };
+ if !(isNil '_get') then {_cost = _cost + (_get select QUERYGEARCOST)};
+ } forEach (_t select _count);
+
+ {
+ _get = _x Call GetNamespace;
+ if !(isNil '_get') then {_cost = _cost + (_get select QUERYGEARCOST)};
+ } forEach ((_m select _count) + (_s select _count) + (_i select _count));
+
+ _c = _c + [_cost];
+ };
+ WF_Logic setVariable ['templateClasses',_t];
+ WF_Logic setVariable ['templateNames',_d];
+ WF_Logic setVariable ['templateCosts',_c];
+ WF_Logic setVariable ['templatePictures',_p];
+ WF_Logic setVariable ['templateMags',_m];
+ WF_Logic setVariable ['templateItems',_i];
+ WF_Logic setVariable ['templateSpecs',_s];
+ WF_Logic setVariable ['templateUpgrades',_l];
+ WF_Logic setVariable ['templateAllowed',_b];
+ };
+};
+
+if (WF_ACE) then
+{
+ ['WFBE_WESTDEFAULTWEAPONS',['m16a4','ItemCompass','ItemMap','ItemWatch','ItemRadio','ACE_Earplugs','Binocular','M136'],true] Call SetNamespace;
+ ['WFBE_WESTDEFAULTAMMO',['30Rnd_556x45_Stanag','30Rnd_556x45_Stanag','30Rnd_556x45_Stanag','30Rnd_556x45_Stanag','30Rnd_556x45_Stanag','30Rnd_556x45_Stanag','HandGrenade_West','HandGrenade_West'],true] Call SetNamespace;
+}
+else
+{
+ ['WFBE_WESTDEFAULTWEAPONS',['m16a4','ItemCompass','ItemMap','ItemWatch','ItemRadio'],true] Call SetNamespace;
+ ['WFBE_WESTDEFAULTAMMO',['30Rnd_556x45_Stanag','30Rnd_556x45_Stanag','30Rnd_556x45_Stanag','30Rnd_556x45_Stanag','30Rnd_556x45_Stanag','30Rnd_556x45_Stanag','HandGrenade_West','HandGrenade_West'],true] Call SetNamespace;
+};
+
+//--- AI Leaders Loadouts.
+if (isServer) then {
+ //--- No Upgrade.
+ ['WFBE_WESTLEADERWEAPONS01',['SCAR_L_CQC','M136','Colt1911','Binocular','ItemRadio','ItemMap'],true] Call SetNamespace;
+ ['WFBE_WESTLEADERAMMO01',['30Rnd_556x45_Stanag','30Rnd_556x45_Stanag','30Rnd_556x45_Stanag','30Rnd_556x45_Stanag','30Rnd_556x45_Stanag','30Rnd_556x45_Stanag','M136','7Rnd_45ACP_1911','7Rnd_45ACP_1911','7Rnd_45ACP_1911','7Rnd_45ACP_1911'],true] Call SetNamespace;
+ ['WFBE_WESTLEADERWEAPONS02',['G36C_camo','M136','Colt1911','Binocular','ItemRadio','ItemMap'],true] Call SetNamespace;
+ ['WFBE_WESTLEADERAMMO02',['30Rnd_556x45_G36','30Rnd_556x45_G36','30Rnd_556x45_G36','30Rnd_556x45_G36','30Rnd_556x45_G36','30Rnd_556x45_G36','M136','7Rnd_45ACP_1911','7Rnd_45ACP_1911','7Rnd_45ACP_1911','7Rnd_45ACP_1911'],true] Call SetNamespace;
+ ['WFBE_WESTLEADERWEAPONS03',['m240_scoped_EP1','Colt1911','Binocular','ItemRadio','ItemMap'],true] Call SetNamespace;;
+ ['WFBE_WESTLEADERAMMO03',['100Rnd_762x51_M240','100Rnd_762x51_M240','100Rnd_762x51_M240','100Rnd_762x51_M240','100Rnd_762x51_M240','HandGrenade_West','HandGrenade_West','7Rnd_45ACP_1911','7Rnd_45ACP_1911','7Rnd_45ACP_1911','7Rnd_45ACP_1911'],true] Call SetNamespace;
+ //--- Upgrade 1.
+ ['WFBE_WESTLEADERWEAPONS11',['M4A3_CCO_EP1','M136','Colt1911','Binocular','NVGoggles','ItemRadio','ItemMap'],true] Call SetNamespace;
+ ['WFBE_WESTLEADERAMMO11',['30Rnd_556x45_Stanag','30Rnd_556x45_Stanag','30Rnd_556x45_Stanag','30Rnd_556x45_Stanag','30Rnd_556x45_Stanag','30Rnd_556x45_Stanag','M136','7Rnd_45ACP_1911','7Rnd_45ACP_1911','7Rnd_45ACP_1911','7Rnd_45ACP_1911'],true] Call SetNamespace;
+ ['WFBE_WESTLEADERWEAPONS12',['G36K_camo','M136','Colt1911','Binocular','NVGoggles','ItemRadio','ItemMap'],true] Call SetNamespace;
+ ['WFBE_WESTLEADERAMMO12',['30Rnd_556x45_G36','30Rnd_556x45_G36','30Rnd_556x45_G36','30Rnd_556x45_G36','30Rnd_556x45_G36','30Rnd_556x45_G36','M136','7Rnd_45ACP_1911','7Rnd_45ACP_1911','7Rnd_45ACP_1911','7Rnd_45ACP_1911'],true] Call SetNamespace;
+ ['WFBE_WESTLEADERWEAPONS13',['M14_EP1','M9SD','Binocular','NVGoggles','ItemRadio','ItemMap'],true] Call SetNamespace;
+ ['WFBE_WESTLEADERAMMO13',['20Rnd_762x51_DMR','20Rnd_762x51_DMR','20Rnd_762x51_DMR','20Rnd_762x51_DMR','20Rnd_762x51_DMR','20Rnd_762x51_DMR','20Rnd_762x51_DMR','20Rnd_762x51_DMR','20Rnd_762x51_DMR','20Rnd_762x51_DMR','HandGrenade_West','HandGrenade_West','15Rnd_9x19_M9SD','15Rnd_9x19_M9SD','15Rnd_9x19_M9SD','15Rnd_9x19_M9SD'],true] Call SetNamespace;
+ //--- Upgrade 2.
+ ['WFBE_WESTLEADERWEAPONS21',['SCAR_L_STD_HOLO','MAAWS','Colt1911','Binocular','NVGoggles','ItemRadio','ItemMap'],true] Call SetNamespace;
+ ['WFBE_WESTLEADERAMMO21',['30Rnd_556x45_Stanag','30Rnd_556x45_Stanag','30Rnd_556x45_Stanag','30Rnd_556x45_Stanag','30Rnd_556x45_Stanag','30Rnd_556x45_Stanag','MAAWS_HEAT','MAAWS_HEAT','7Rnd_45ACP_1911','7Rnd_45ACP_1911','7Rnd_45ACP_1911','7Rnd_45ACP_1911'],true] Call SetNamespace;
+ ['WFBE_WESTLEADERWEAPONS22',['G36C_camo','MAAWS','Colt1911','Binocular','NVGoggles','ItemRadio','ItemMap'],true] Call SetNamespace;
+ ['WFBE_WESTLEADERAMMO22',['30Rnd_556x45_G36','30Rnd_556x45_G36','30Rnd_556x45_G36','30Rnd_556x45_G36','30Rnd_556x45_G36','30Rnd_556x45_G36','MAAWS_HEAT','MAAWS_HEAT','7Rnd_45ACP_1911','7Rnd_45ACP_1911','7Rnd_45ACP_1911','7Rnd_45ACP_1911'],true] Call SetNamespace;
+ ['WFBE_WESTLEADERWEAPONS23',['MG36_camo','Colt1911','Binocular','NVGoggles','ItemRadio','ItemMap'],true] Call SetNamespace;
+ ['WFBE_WESTLEADERAMMO23',['100Rnd_556x45_BetaCMag','100Rnd_556x45_BetaCMag','100Rnd_556x45_BetaCMag','100Rnd_556x45_BetaCMag','100Rnd_556x45_BetaCMag','HandGrenade_West','HandGrenade_West','7Rnd_45ACP_1911','7Rnd_45ACP_1911','7Rnd_45ACP_1911','7Rnd_45ACP_1911'],true] Call SetNamespace;
+ //--- Upgrade 3.
+ ['WFBE_WESTLEADERWEAPONS31',['SCAR_L_CQC_EGLM_Holo','MAAWS','Binocular','NVGoggles','ItemRadio','ItemMap'],true] Call SetNamespace;
+ ['WFBE_WESTLEADERAMMO31',['30Rnd_556x45_Stanag','30Rnd_556x45_Stanag','30Rnd_556x45_Stanag','30Rnd_556x45_Stanag','30Rnd_556x45_Stanag','30Rnd_556x45_Stanag','MAAWS_HEAT','MAAWS_HEAT','1Rnd_HE_M203','1Rnd_HE_M203','1Rnd_HE_M203','1Rnd_HE_M203'],true] Call SetNamespace;
+ ['WFBE_WESTLEADERWEAPONS32',['SCAR_H_STD_EGLM_Spect','Javelin','Colt1911','Binocular','NVGoggles','ItemRadio','ItemMap'],true] Call SetNamespace;
+ ['WFBE_WESTLEADERAMMO32',['20Rnd_762x51_B_SCAR','20Rnd_762x51_B_SCAR','20Rnd_762x51_B_SCAR','20Rnd_762x51_B_SCAR','20Rnd_762x51_B_SCAR','20Rnd_762x51_B_SCAR','Javelin','7Rnd_45ACP_1911','7Rnd_45ACP_1911','7Rnd_45ACP_1911','7Rnd_45ACP_1911'],true] Call SetNamespace;
+ ['WFBE_WESTLEADERWEAPONS33',['Mk_48_DES_EP1','Colt1911','Binocular','NVGoggles','ItemRadio','ItemMap'],true] Call SetNamespace;
+ ['WFBE_WESTLEADERAMMO33',['100Rnd_762x51_M240','100Rnd_762x51_M240','100Rnd_762x51_M240','100Rnd_762x51_M240','100Rnd_762x51_M240','HandGrenade_West','HandGrenade_West','7Rnd_45ACP_1911','7Rnd_45ACP_1911','7Rnd_45ACP_1911','7Rnd_45ACP_1911'],true] Call SetNamespace;
+}; \ No newline at end of file
diff --git a/Common/Config/Core_Loadout/Vanilla/Loadout_CDF.sqf b/Common/Config/Core_Loadout/Vanilla/Loadout_CDF.sqf
new file mode 100644
index 0000000..df76937
--- /dev/null
+++ b/Common/Config/Core_Loadout/Vanilla/Loadout_CDF.sqf
@@ -0,0 +1,306 @@
+/* USMC Loadout */
+
+if (!isServer || local player) then {
+ if (side player == WEST) then {
+ /* Magazines. */
+ _m = ["30Rnd_762x39_AK47"];
+ _m = _m + ["30Rnd_545x39_AK"];
+ _m = _m + ["30Rnd_545x39_AKSD"];
+ _m = _m + ["64Rnd_9x19_Bizon"];
+ _m = _m + ["64Rnd_9x19_SD_Bizon"];
+ _m = _m + ["100Rnd_762x54_PK"];
+ _m = _m + ["75Rnd_545x39_RPK"];
+ _m = _m + ["5x_22_LR_17_HMR"];
+ _m = _m + ["10Rnd_762x54_SVD"];
+ _m = _m + ["8Rnd_B_Saiga12_74Slug"];
+ _m = _m + ["5Rnd_127x108_KSVK"];
+ _m = _m + ["10Rnd_9x39_SP5_VSS"];
+ _m = _m + ["20Rnd_9x39_SP5_VSS"];
+ _m = _m + ["PG7V"];
+ _m = _m + ["PG7VL"];
+ _m = _m + ["OG7"];
+ _m = _m + ["PG7VR"];
+ _m = _m + ["RPG18"];
+ _m = _m + ["AT13"];
+ _m = _m + ["Igla"];
+ _m = _m + ["Strela"];
+ _m = _m + ["Laserbatteries"];
+ _m = _m + ["8Rnd_9x18_Makarov"];
+ _m = _m + ["8Rnd_9x18_MakarovSD"];
+
+ WF_Logic setVariable ['magazineClasses',_m];
+
+ /* Primary. */
+ _w = ['AK_47_M'];
+ _w = _w + ['AK_47_S'];
+ _w = _w + ['AK_74'];
+ _w = _w + ['AK_74_GL'];
+ _w = _w + ['AKS_74_kobra'];
+ _w = _w + ['AKS_74_pso'];
+ _w = _w + ['AKS_74_U'];
+ _w = _w + ['AKS_74_UN_kobra'];
+ _w = _w + ['AKS_GOLD'];
+ _w = _w + ['bizon'];
+ _w = _w + ['bizon_silenced'];
+ _w = _w + ['PK'];
+ _w = _w + ['RPK_74'];
+ _w = _w + ['huntingrifle'];
+ _w = _w + ['SVD'];
+ _w = _w + ['SVD_CAMO'];
+ _w = _w + ['Saiga12K'];
+ _w = _w + ['ksvk'];
+ _w = _w + ['VSS_vintorez'];
+
+ WF_Logic setVariable ['primaryClasses',_w];
+
+ /* Secondary. */
+ _w = ['RPG7V'];
+ _w = _w + ['RPG18'];
+ _w = _w + ['MetisLauncher'];
+ _w = _w + ['Igla'];
+ _w = _w + ['Strela'];
+ _w = _w + ['Laserdesignator'];
+
+ WF_Logic setVariable ['secondaryClasses',_w];
+
+ /* Sidearms. */
+ _w = ['Makarov'];
+ _w = _w + ['MakarovSD'];
+
+ WF_Logic setVariable ['sidearmClasses',_w];
+
+ /* Misc. */
+ _w = ['HandGrenade_East'];
+ _w = _w + ['HandGrenade_Stone'];
+ _w = _w + ['SmokeShell'];
+ _w = _w + ['SmokeShellRed'];
+ _w = _w + ['SmokeShellGreen'];
+ _w = _w + ['SmokeShellBlue'];
+ _w = _w + ['SmokeShellYellow'];
+ _w = _w + ['SmokeShellOrange'];
+ _w = _w + ['SmokeShellPurple'];
+ _w = _w + ['FlareWhite_GP25'];
+ _w = _w + ['FlareYellow_GP25'];
+ _w = _w + ['FlareGreen_GP25'];
+ _w = _w + ['FlareRed_GP25'];
+ _w = _w + ['1Rnd_HE_GP25'];
+ _w = _w + ['1Rnd_SMOKE_GP25'];
+ _w = _w + ['1Rnd_SMOKERED_GP25'];
+ _w = _w + ['1Rnd_SMOKEGREEN_GP25'];
+ _w = _w + ['1Rnd_SMOKEYELLOW_GP25'];
+ _w = _w + ['MineE'];
+ _w = _w + ['PipeBomb'];
+ _w = _w + ['Binocular'];
+ _w = _w + ['NVGoggles'];
+ _w = _w + ['ItemCompass'];
+ _w = _w + ['ItemGPS'];
+ _w = _w + ['ItemMap'];
+ _w = _w + ['ItemRadio'];
+ _w = _w + ['ItemWatch'];
+
+ WF_Logic setVariable ['miscClasses',_w];
+
+ //--- Templates.
+ _items = ['ItemCompass','ItemGPS','ItemMap','ItemRadio','ItemWatch'];
+
+ _d = [getText(configFile >> 'CfgWeapons' >> 'AKS_74_kobra' >> 'displayName') + '/' + getText(configFile >> 'CfgWeapons' >> 'Makarov' >> 'displayName')];
+ _p = [getText(configFile >> 'CfgWeapons' >> 'AKS_74_kobra' >> 'picture')];
+ _t = [['AKS_74_kobra','Makarov']];
+ _m = [['30Rnd_545x39_AK','30Rnd_545x39_AK','30Rnd_545x39_AK','30Rnd_545x39_AK','30Rnd_545x39_AK','30Rnd_545x39_AK','30Rnd_545x39_AK','30Rnd_545x39_AK',
+ 'HandGrenade_East','HandGrenade_East','SmokeShellBlue','SmokeShellBlue','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov',
+ '8Rnd_9x18_Makarov','8Rnd_9x18_Makarov']];
+ _s = [['Binocular']];
+ _i = [_items];
+ _l = [0];
+ _b = [true];
+
+ _d = _d + [getText(configFile >> 'CfgWeapons' >> 'AK_74_GL' >> 'displayName')];
+ _p = _p + [getText(configFile >> 'CfgWeapons' >> 'AK_74_GL' >> 'picture')];
+ _t = _t + [['AK_74_GL']];
+ _m = _m + [['30Rnd_545x39_AK','30Rnd_545x39_AK','30Rnd_545x39_AK','30Rnd_545x39_AK','30Rnd_545x39_AK','30Rnd_545x39_AK','30Rnd_545x39_AK','30Rnd_545x39_AK',
+ '30Rnd_545x39_AK','30Rnd_545x39_AK','HandGrenade_East','HandGrenade_East','1Rnd_HE_GP25','1Rnd_HE_GP25','1Rnd_HE_GP25','1Rnd_HE_GP25','1Rnd_HE_GP25','1Rnd_HE_GP25',
+ '1Rnd_HE_GP25','1Rnd_HE_GP25']];
+ _s = _s + [['Binocular']];
+ _i = _i + [_items];
+ _l = _l + [0];
+ _b = _b + [true];
+
+ _d = _d + [getText(configFile >> 'CfgWeapons' >> 'AKS_74_pso' >> 'displayName') + '/' + getText(configFile >> 'CfgWeapons' >> 'RPG7V' >> 'displayName')];
+ _p = _p + [getText(configFile >> 'CfgWeapons' >> 'AKS_74_pso' >> 'picture')];
+ _t = _t + [['AKS_74_pso','RPG7V']];
+ _m = _m + [['30Rnd_545x39_AK','30Rnd_545x39_AK','30Rnd_545x39_AK','30Rnd_545x39_AK','30Rnd_545x39_AK','30Rnd_545x39_AK','PG7VL','PG7VL','PG7VL']];
+ _s = _s + [['Binocular','NVGoggles']];
+ _i = _i + [_items];
+ _l = _l + [1];
+ _b = _b + [false];
+
+ _d = _d + [getText(configFile >> 'CfgWeapons' >> 'AK_74_GL' >> 'displayName') + '/' + getText(configFile >> 'CfgWeapons' >> 'RPG7V' >> 'displayName')];
+ _p = _p + [getText(configFile >> 'CfgWeapons' >> 'AK_74_GL' >> 'picture')];
+ _t = _t + [['AK_74_GL','RPG7V']];
+ _m = _m + [['30Rnd_545x39_AK','30Rnd_545x39_AK','30Rnd_545x39_AK','30Rnd_545x39_AK','30Rnd_545x39_AK','30Rnd_545x39_AK','PG7V',
+ 'PG7V','PG7V','1Rnd_HE_GP25','1Rnd_HE_GP25','1Rnd_HE_GP25','1Rnd_HE_GP25','1Rnd_HE_GP25','1Rnd_HE_GP25','1Rnd_HE_GP25','1Rnd_HE_GP25']];
+ _s = _s + [['Binocular','NVGoggles']];
+ _i = _i + [_items];
+ _l = _l + [1];
+ _b = _b + [false];
+
+ _d = _d + [getText(configFile >> 'CfgWeapons' >> 'AKS_74_U' >> 'displayName') + '/' + getText(configFile >> 'CfgWeapons' >> 'RPG7V' >> 'displayName') + '/' + getText(configFile >> 'CfgWeapons' >> 'Makarov' >> 'displayName')];
+ _p = _p + [getText(configFile >> 'CfgWeapons' >> 'AKS_74_U' >> 'picture')];
+ _t = _t + [['AKS_74_U','RPG7V','Makarov']];
+ _m = _m + [['30Rnd_545x39_AK','30Rnd_545x39_AK','30Rnd_545x39_AK','30Rnd_545x39_AK','30Rnd_545x39_AK','30Rnd_545x39_AK','PG7VL','PG7VL','PG7VL',
+ '8Rnd_9x18_Makarov','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov']];
+ _s = _s + [['Binocular','NVGoggles']];
+ _i = _i + [_items];
+ _l = _l + [1];
+ _b = _b + [true];
+
+ _d = _d + [getText(configFile >> 'CfgWeapons' >> 'AKS_74_kobra' >> 'displayName') + '/' + getText(configFile >> 'CfgWeapons' >> 'MetisLauncher' >> 'displayName') + '/' + getText(configFile >> 'CfgWeapons' >> 'Makarov' >> 'displayName')];
+ _p = _p + [getText(configFile >> 'CfgWeapons' >> 'AKS_74_kobra' >> 'picture')];
+ _t = _t + [['AKS_74_kobra','MetisLauncher','Makarov']];
+ _m = _m + [['30Rnd_545x39_AK','30Rnd_545x39_AK','30Rnd_545x39_AK','30Rnd_545x39_AK','30Rnd_545x39_AK','30Rnd_545x39_AK','AT13',
+ '8Rnd_9x18_Makarov','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov']];
+ _s = _s + [['Binocular','NVGoggles']];
+ _i = _i + [_items];
+ _l = _l + [3];
+ _b = _b + [false];
+
+ _d = _d + [getText(configFile >> 'CfgWeapons' >> 'AK_74' >> 'displayName') + '/' + getText(configFile >> 'CfgWeapons' >> 'Igla' >> 'displayName') + '/' + getText(configFile >> 'CfgWeapons' >> 'Makarov' >> 'displayName')];
+ _p = _p + [getText(configFile >> 'CfgWeapons' >> 'AK_74' >> 'picture')];
+ _t = _t + [['AK_74','Igla','Makarov']];
+ _m = _m + [['30Rnd_545x39_AK','30Rnd_545x39_AK','30Rnd_545x39_AK','30Rnd_545x39_AK','30Rnd_545x39_AK','30Rnd_545x39_AK','Igla',
+ '8Rnd_9x18_Makarov','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov']];
+ _s = _s + [['Binocular','NVGoggles']];
+ _i = _i + [_items];
+ _l = _l + [2];
+ _b = _b + [false];
+
+ _d = _d + [getText(configFile >> 'CfgWeapons' >> 'Saiga12K' >> 'displayName') + '/' + getText(configFile >> 'CfgWeapons' >> 'Makarov' >> 'displayName') + '/' + getText(configFile >> 'CfgMagazines' >> 'MineE' >> 'displayName')];
+ _p = _p + [getText(configFile >> 'CfgWeapons' >> 'Saiga12K' >> 'picture')];
+ _t = _t + [['Saiga12K','Makarov']];
+ _m = _m + [['8Rnd_B_Saiga12_74Slug','8Rnd_B_Saiga12_74Slug','8Rnd_B_Saiga12_74Slug','8Rnd_B_Saiga12_74Slug','8Rnd_B_Saiga12_74Slug','8Rnd_B_Saiga12_74Slug','MineE','MineE','MineE',
+ '8Rnd_9x18_Makarov','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov']];
+ _s = _s + [['Binocular']];
+ _i = _i + [_items];
+ _l = _l + [0];
+ _b = _b + [true];
+
+ _d = _d + [getText(configFile >> 'CfgWeapons' >> 'AKS_74_UN_kobra' >> 'displayName') + '/' + getText(configFile >> 'CfgWeapons' >> 'MakarovSD' >> 'displayName') + '/' + getText(configFile >> 'CfgMagazines' >> 'PipeBomb' >> 'displayName')];
+ _p = _p + [getText(configFile >> 'CfgWeapons' >> 'AKS_74_UN_kobra' >> 'picture')];
+ _t = _t + [['AKS_74_UN_kobra','MakarovSD']];
+ _m = _m + [['30Rnd_545x39_AKSD','30Rnd_545x39_AKSD','30Rnd_545x39_AKSD','30Rnd_545x39_AKSD','30Rnd_545x39_AKSD','30Rnd_545x39_AKSD','PipeBomb','PipeBomb','PipeBomb',
+ '8Rnd_9x18_MakarovSD','8Rnd_9x18_MakarovSD','8Rnd_9x18_MakarovSD','8Rnd_9x18_MakarovSD','8Rnd_9x18_MakarovSD','8Rnd_9x18_MakarovSD','8Rnd_9x18_MakarovSD','8Rnd_9x18_MakarovSD']];
+ _s = _s + [['Binocular','NVGoggles']];
+ _i = _i + [_items];
+ _l = _l + [2];
+ _b = _b + [true];
+
+ _d = _d + [getText(configFile >> 'CfgWeapons' >> 'PK' >> 'displayName') + '/' + getText(configFile >> 'CfgWeapons' >> 'Makarov' >> 'displayName')];
+ _p = _p + [getText(configFile >> 'CfgWeapons' >> 'PK' >> 'picture')];
+ _t = _t + [['PK','Makarov']];
+ _m = _m + [['100Rnd_762x54_PK','100Rnd_762x54_PK','100Rnd_762x54_PK','100Rnd_762x54_PK','100Rnd_762x54_PK','SmokeShellBlue','SmokeShellBlue','8Rnd_9x18_Makarov',
+ '8Rnd_9x18_Makarov','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov']];
+ _s = _s + [['Binocular']];
+ _i = _i + [_items];
+ _l = _l + [0];
+ _b = _b + [true];
+
+ _d = _d + [getText(configFile >> 'CfgWeapons' >> 'SVD' >> 'displayName') + '/' + getText(configFile >> 'CfgWeapons' >> 'MakarovSD' >> 'displayName')];
+ _p = _p + [getText(configFile >> 'CfgWeapons' >> 'SVD' >> 'picture')];
+ _t = _t + [['SVD','MakarovSD']];
+ _m = _m + [['10Rnd_762x54_SVD','10Rnd_762x54_SVD','10Rnd_762x54_SVD','10Rnd_762x54_SVD','10Rnd_762x54_SVD','10Rnd_762x54_SVD','10Rnd_762x54_SVD','10Rnd_762x54_SVD',
+ '10Rnd_762x54_SVD','10Rnd_762x54_SVD','HandGrenade_East','HandGrenade_East','8Rnd_9x18_MakarovSD','8Rnd_9x18_MakarovSD','8Rnd_9x18_MakarovSD','8Rnd_9x18_MakarovSD','8Rnd_9x18_MakarovSD',
+ '8Rnd_9x18_MakarovSD','8Rnd_9x18_MakarovSD','8Rnd_9x18_MakarovSD']];
+ _s = _s + [['Binocular']];
+ _i = _i + [_items];
+ _l = _l + [1];
+ _b = _b + [true];
+
+ _d = _d + [getText(configFile >> 'CfgWeapons' >> 'VSS_vintorez' >> 'displayName') + '/' + getText(configFile >> 'CfgWeapons' >> 'Laserdesignator' >> 'displayName') + '/' + getText(configFile >> 'CfgWeapons' >> 'MakarovSD' >> 'displayName')];
+ _p = _p + [getText(configFile >> 'CfgWeapons' >> 'VSS_vintorez' >> 'picture')];
+ _t = _t + [['VSS_vintorez','Laserdesignator','MakarovSD']];
+ _m = _m + [['20Rnd_9x39_SP5_VSS','20Rnd_9x39_SP5_VSS','20Rnd_9x39_SP5_VSS','20Rnd_9x39_SP5_VSS','20Rnd_9x39_SP5_VSS','20Rnd_9x39_SP5_VSS','20Rnd_9x39_SP5_VSS','20Rnd_9x39_SP5_VSS',
+ '20Rnd_9x39_SP5_VSS','20Rnd_9x39_SP5_VSS','HandGrenade_East','Laserbatteries','8Rnd_9x18_MakarovSD','8Rnd_9x18_MakarovSD','8Rnd_9x18_MakarovSD','8Rnd_9x18_MakarovSD','8Rnd_9x18_MakarovSD',
+ '8Rnd_9x18_MakarovSD','8Rnd_9x18_MakarovSD','8Rnd_9x18_MakarovSD']];
+ _s = _s + [['Binocular','NVGoggles']];
+ _i = _i + [_items];
+ _l = _l + [2];
+ _b = _b + [false];
+
+ _d = _d + [getText(configFile >> 'CfgWeapons' >> 'ksvk' >> 'displayName') + '/' + getText(configFile >> 'CfgWeapons' >> 'MakarovSD' >> 'displayName')];
+ _p = _p + [getText(configFile >> 'CfgWeapons' >> 'ksvk' >> 'picture')];
+ _t = _t + [['ksvk','MakarovSD']];
+ _m = _m + [['5Rnd_127x108_KSVK','5Rnd_127x108_KSVK','5Rnd_127x108_KSVK','5Rnd_127x108_KSVK','5Rnd_127x108_KSVK','5Rnd_127x108_KSVK','5Rnd_127x108_KSVK','5Rnd_127x108_KSVK',
+ '5Rnd_127x108_KSVK','5Rnd_127x108_KSVK','HandGrenade_East','HandGrenade_East','8Rnd_9x18_MakarovSD','8Rnd_9x18_MakarovSD','8Rnd_9x18_MakarovSD','8Rnd_9x18_MakarovSD','8Rnd_9x18_MakarovSD',
+ '8Rnd_9x18_MakarovSD','8Rnd_9x18_MakarovSD','8Rnd_9x18_MakarovSD']];
+ _s = _s + [['Binocular','NVGoggles']];
+ _i = _i + [_items];
+ _l = _l + [3];
+ _b = _b + [false];
+
+ _c = [];
+ _totalTemplates = count _d;
+
+ for [{_count = 0},{_count < _totalTemplates},{_count = _count + 1}] do {
+ _cost = 0;
+ {
+ _get = (_x+"_W") Call GetNamespace;
+ if (isNil '_get') then {
+ _get = _x Call GetNamespace;
+ };
+ if !(isNil '_get') then {_cost = _cost + (_get select QUERYGEARCOST)};
+ } forEach (_t select _count);
+
+ {
+ _get = _x Call GetNamespace;
+ if !(isNil '_get') then {_cost = _cost + (_get select QUERYGEARCOST)};
+ } forEach ((_m select _count) + (_s select _count) + (_i select _count));
+
+ _c = _c + [_cost];
+ };
+
+ WF_Logic setVariable ['templateClasses',_t];
+ WF_Logic setVariable ['templateNames',_d];
+ WF_Logic setVariable ['templateCosts',_c];
+ WF_Logic setVariable ['templatePictures',_p];
+ WF_Logic setVariable ['templateMags',_m];
+ WF_Logic setVariable ['templateItems',_i];
+ WF_Logic setVariable ['templateSpecs',_s];
+ WF_Logic setVariable ['templateUpgrades',_l];
+ WF_Logic setVariable ['templateAllowed',_b];
+ };
+};
+
+['WFBE_WESTDEFAULTWEAPONS',['AK_74','ItemCompass','ItemMap','ItemWatch','ItemRadio'],true] Call SetNamespace;
+['WFBE_WESTDEFAULTAMMO',['30Rnd_545x39_AK','30Rnd_545x39_AK','30Rnd_545x39_AK','30Rnd_545x39_AK','30Rnd_545x39_AK','30Rnd_545x39_AK','HandGrenade_East','HandGrenade_East'],true] Call SetNamespace;
+
+//--- AI Leaders Loadouts.
+if (isServer) then {
+ //--- No Upgrade.
+ ['WFBE_WESTLEADERWEAPONS01',['AKS_74_kobra','RPG18','Makarov','Binocular','ItemRadio','ItemMap'],true] Call SetNamespace;
+ ['WFBE_WESTLEADERAMMO01',['30Rnd_545x39_AK','30Rnd_545x39_AK','30Rnd_545x39_AK','30Rnd_545x39_AK','30Rnd_545x39_AK','30Rnd_545x39_AK','RPG18','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov'],true] Call SetNamespace;
+ ['WFBE_WESTLEADERWEAPONS02',['AKS_74_kobra','RPG18','Makarov','Binocular','ItemRadio','ItemMap'],true] Call SetNamespace;
+ ['WFBE_WESTLEADERAMMO02',['30Rnd_545x39_AK','30Rnd_545x39_AK','30Rnd_545x39_AK','30Rnd_545x39_AK','30Rnd_545x39_AK','30Rnd_545x39_AK','RPG18','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov'],true] Call SetNamespace;
+ ['WFBE_WESTLEADERWEAPONS03',['PK','Makarov','Binocular','ItemRadio','ItemMap'],true] Call SetNamespace;;
+ ['WFBE_WESTLEADERAMMO03',['100Rnd_762x54_PK','100Rnd_762x54_PK','100Rnd_762x54_PK','100Rnd_762x54_PK','100Rnd_762x54_PK','HandGrenade_East','HandGrenade_East','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov'],true] Call SetNamespace;
+ //--- Upgrade 1.
+ ['WFBE_WESTLEADERWEAPONS11',['AK_74_GL','RPG7V','Makarov','Binocular','NVGoggles','ItemRadio','ItemMap'],true] Call SetNamespace;
+ ['WFBE_WESTLEADERAMMO11',['30Rnd_545x39_AK','30Rnd_545x39_AK','30Rnd_545x39_AK','30Rnd_545x39_AK','30Rnd_545x39_AK','30Rnd_545x39_AK','PG7VL','PG7VL','PG7VR','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov'],true] Call SetNamespace;
+ ['WFBE_WESTLEADERWEAPONS12',['RPK_74','RPG7V','Makarov','Binocular','NVGoggles','ItemRadio','ItemMap'],true] Call SetNamespace;
+ ['WFBE_WESTLEADERAMMO12',['75Rnd_545x39_RPK','75Rnd_545x39_RPK','75Rnd_545x39_RPK','75Rnd_545x39_RPK','75Rnd_545x39_RPK','75Rnd_545x39_RPK','PG7VL','PG7VL','PG7VR','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov'],true] Call SetNamespace;
+ ['WFBE_WESTLEADERWEAPONS13',['SVD','MakarovSD','Binocular','NVGoggles','ItemRadio','ItemMap'],true] Call SetNamespace;
+ ['WFBE_WESTLEADERAMMO13',['10Rnd_762x54_SVD','10Rnd_762x54_SVD','10Rnd_762x54_SVD','10Rnd_762x54_SVD','10Rnd_762x54_SVD','10Rnd_762x54_SVD','10Rnd_762x54_SVD','10Rnd_762x54_SVD','10Rnd_762x54_SVD','10Rnd_762x54_SVD','HandGrenade_East','HandGrenade_East','8Rnd_9x18_MakarovSD','8Rnd_9x18_MakarovSD','8Rnd_9x18_MakarovSD','8Rnd_9x18_MakarovSD'],true] Call SetNamespace;
+ //--- Upgrade 2.
+ ['WFBE_WESTLEADERWEAPONS21',['VSS_vintorez','RPG7V','Makarov','Binocular','NVGoggles','ItemRadio','ItemMap'],true] Call SetNamespace;
+ ['WFBE_WESTLEADERAMMO21',['20Rnd_9x39_SP5_VSS','20Rnd_9x39_SP5_VSS','20Rnd_9x39_SP5_VSS','20Rnd_9x39_SP5_VSS','20Rnd_9x39_SP5_VSS','20Rnd_9x39_SP5_VSS','PG7VL','PG7VL','PG7VL','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov'],true] Call SetNamespace;
+ ['WFBE_WESTLEADERWEAPONS22',['AKS_74_pso','RPG7V','Makarov','Binocular','NVGoggles','ItemRadio','ItemMap'],true] Call SetNamespace;
+ ['WFBE_WESTLEADERAMMO22',['30Rnd_545x39_AK','30Rnd_545x39_AK','30Rnd_545x39_AK','30Rnd_545x39_AK','30Rnd_545x39_AK','30Rnd_545x39_AK','PG7VL','PG7VL','PG7VL','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov'],true] Call SetNamespace;
+ ['WFBE_WESTLEADERWEAPONS23',['RPK_74','Makarov','Binocular','NVGoggles','ItemRadio','ItemMap'],true] Call SetNamespace;
+ ['WFBE_WESTLEADERAMMO23',['75Rnd_545x39_RPK','75Rnd_545x39_RPK','75Rnd_545x39_RPK','75Rnd_545x39_RPK','75Rnd_545x39_RPK','75Rnd_545x39_RPK','HandGrenade_East','HandGrenade_East','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov'],true] Call SetNamespace;
+ //--- Upgrade 3.
+ ['WFBE_WESTLEADERWEAPONS31',['AK_74_GL','RPG7V','Binocular','NVGoggles','ItemRadio','ItemMap'],true] Call SetNamespace;
+ ['WFBE_WESTLEADERAMMO31',['30Rnd_545x39_AK','30Rnd_545x39_AK','30Rnd_545x39_AK','30Rnd_545x39_AK','30Rnd_545x39_AK','30Rnd_545x39_AK','PG7VL','PG7VL','PG7VL','1Rnd_HE_GP25','1Rnd_HE_GP25','1Rnd_HE_GP25','1Rnd_HE_GP25'],true] Call SetNamespace;
+ ['WFBE_WESTLEADERWEAPONS32',['AKS_74_kobra','MetisLauncher','Makarov','Binocular','NVGoggles','ItemRadio','ItemMap'],true] Call SetNamespace;
+ ['WFBE_WESTLEADERAMMO32',['30Rnd_545x39_AK','30Rnd_545x39_AK','30Rnd_545x39_AK','30Rnd_545x39_AK','30Rnd_545x39_AK','30Rnd_545x39_AK','AT13','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov'],true] Call SetNamespace;
+ ['WFBE_WESTLEADERWEAPONS33',['SVD_CAMO','Makarov','Binocular','NVGoggles','ItemRadio','ItemMap'],true] Call SetNamespace;
+ ['WFBE_WESTLEADERAMMO33',['10Rnd_762x54_SVD','10Rnd_762x54_SVD','10Rnd_762x54_SVD','10Rnd_762x54_SVD','10Rnd_762x54_SVD','10Rnd_762x54_SVD','10Rnd_762x54_SVD','10Rnd_762x54_SVD','10Rnd_762x54_SVD','10Rnd_762x54_SVD','HandGrenade_East','HandGrenade_East','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov'],true] Call SetNamespace;
+}; \ No newline at end of file
diff --git a/Common/Config/Core_Loadout/Vanilla/Loadout_INS.sqf b/Common/Config/Core_Loadout/Vanilla/Loadout_INS.sqf
new file mode 100644
index 0000000..e655422
--- /dev/null
+++ b/Common/Config/Core_Loadout/Vanilla/Loadout_INS.sqf
@@ -0,0 +1,306 @@
+/* USMC Loadout */
+
+if (!isServer || local player) then {
+ if (side player == EAST) then {
+ /* Magazines. */
+ _m = ["30Rnd_762x39_AK47"];
+ _m = _m + ["30Rnd_545x39_AK"];
+ _m = _m + ["30Rnd_545x39_AKSD"];
+ _m = _m + ["64Rnd_9x19_Bizon"];
+ _m = _m + ["64Rnd_9x19_SD_Bizon"];
+ _m = _m + ["100Rnd_762x54_PK"];
+ _m = _m + ["75Rnd_545x39_RPK"];
+ _m = _m + ["5x_22_LR_17_HMR"];
+ _m = _m + ["10Rnd_762x54_SVD"];
+ _m = _m + ["8Rnd_B_Saiga12_74Slug"];
+ _m = _m + ["5Rnd_127x108_KSVK"];
+ _m = _m + ["10Rnd_9x39_SP5_VSS"];
+ _m = _m + ["20Rnd_9x39_SP5_VSS"];
+ _m = _m + ["PG7V"];
+ _m = _m + ["PG7VL"];
+ _m = _m + ["OG7"];
+ _m = _m + ["PG7VR"];
+ _m = _m + ["RPG18"];
+ _m = _m + ["AT13"];
+ _m = _m + ["Igla"];
+ _m = _m + ["Strela"];
+ _m = _m + ["Laserbatteries"];
+ _m = _m + ["8Rnd_9x18_Makarov"];
+ _m = _m + ["8Rnd_9x18_MakarovSD"];
+
+ WF_Logic setVariable ['magazineClasses',_m];
+
+ /* Primary. */
+ _w = ['AK_47_M'];
+ _w = _w + ['AK_47_S'];
+ _w = _w + ['AK_74'];
+ _w = _w + ['AK_74_GL'];
+ _w = _w + ['AKS_74_kobra'];
+ _w = _w + ['AKS_74_pso'];
+ _w = _w + ['AKS_74_U'];
+ _w = _w + ['AKS_74_UN_kobra'];
+ _w = _w + ['AKS_GOLD'];
+ _w = _w + ['bizon'];
+ _w = _w + ['bizon_silenced'];
+ _w = _w + ['PK'];
+ _w = _w + ['RPK_74'];
+ _w = _w + ['huntingrifle'];
+ _w = _w + ['SVD'];
+ _w = _w + ['SVD_CAMO'];
+ _w = _w + ['Saiga12K'];
+ _w = _w + ['ksvk'];
+ _w = _w + ['VSS_vintorez'];
+
+ WF_Logic setVariable ['primaryClasses',_w];
+
+ /* Secondary. */
+ _w = ['RPG7V'];
+ _w = _w + ['RPG18'];
+ _w = _w + ['MetisLauncher'];
+ _w = _w + ['Igla'];
+ _w = _w + ['Strela'];
+ _w = _w + ['Laserdesignator'];
+
+ WF_Logic setVariable ['secondaryClasses',_w];
+
+ /* Sidearms. */
+ _w = ['Makarov'];
+ _w = _w + ['MakarovSD'];
+
+ WF_Logic setVariable ['sidearmClasses',_w];
+
+ /* Misc. */
+ _w = ['HandGrenade_East'];
+ _w = _w + ['HandGrenade_Stone'];
+ _w = _w + ['SmokeShell'];
+ _w = _w + ['SmokeShellRed'];
+ _w = _w + ['SmokeShellGreen'];
+ _w = _w + ['SmokeShellBlue'];
+ _w = _w + ['SmokeShellYellow'];
+ _w = _w + ['SmokeShellOrange'];
+ _w = _w + ['SmokeShellPurple'];
+ _w = _w + ['FlareWhite_GP25'];
+ _w = _w + ['FlareYellow_GP25'];
+ _w = _w + ['FlareGreen_GP25'];
+ _w = _w + ['FlareRed_GP25'];
+ _w = _w + ['1Rnd_HE_GP25'];
+ _w = _w + ['1Rnd_SMOKE_GP25'];
+ _w = _w + ['1Rnd_SMOKERED_GP25'];
+ _w = _w + ['1Rnd_SMOKEGREEN_GP25'];
+ _w = _w + ['1Rnd_SMOKEYELLOW_GP25'];
+ _w = _w + ['MineE'];
+ _w = _w + ['PipeBomb'];
+ _w = _w + ['Binocular'];
+ _w = _w + ['NVGoggles'];
+ _w = _w + ['ItemCompass'];
+ _w = _w + ['ItemGPS'];
+ _w = _w + ['ItemMap'];
+ _w = _w + ['ItemRadio'];
+ _w = _w + ['ItemWatch'];
+
+ WF_Logic setVariable ['miscClasses',_w];
+
+ //--- Templates.
+ _items = ['ItemCompass','ItemGPS','ItemMap','ItemRadio','ItemWatch'];
+
+ _d = [getText(configFile >> 'CfgWeapons' >> 'AKS_74_kobra' >> 'displayName') + '/' + getText(configFile >> 'CfgWeapons' >> 'Makarov' >> 'displayName')];
+ _p = [getText(configFile >> 'CfgWeapons' >> 'AKS_74_kobra' >> 'picture')];
+ _t = [['AKS_74_kobra','Makarov']];
+ _m = [['30Rnd_545x39_AK','30Rnd_545x39_AK','30Rnd_545x39_AK','30Rnd_545x39_AK','30Rnd_545x39_AK','30Rnd_545x39_AK','30Rnd_545x39_AK','30Rnd_545x39_AK',
+ 'HandGrenade_East','HandGrenade_East','SmokeShellBlue','SmokeShellBlue','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov',
+ '8Rnd_9x18_Makarov','8Rnd_9x18_Makarov']];
+ _s = [['Binocular']];
+ _i = [_items];
+ _l = [0];
+ _b = [true];
+
+ _d = _d + [getText(configFile >> 'CfgWeapons' >> 'AK_74_GL' >> 'displayName')];
+ _p = _p + [getText(configFile >> 'CfgWeapons' >> 'AK_74_GL' >> 'picture')];
+ _t = _t + [['AK_74_GL']];
+ _m = _m + [['30Rnd_545x39_AK','30Rnd_545x39_AK','30Rnd_545x39_AK','30Rnd_545x39_AK','30Rnd_545x39_AK','30Rnd_545x39_AK','30Rnd_545x39_AK','30Rnd_545x39_AK',
+ '30Rnd_545x39_AK','30Rnd_545x39_AK','HandGrenade_East','HandGrenade_East','1Rnd_HE_GP25','1Rnd_HE_GP25','1Rnd_HE_GP25','1Rnd_HE_GP25','1Rnd_HE_GP25','1Rnd_HE_GP25',
+ '1Rnd_HE_GP25','1Rnd_HE_GP25']];
+ _s = _s + [['Binocular']];
+ _i = _i + [_items];
+ _l = _l + [0];
+ _b = _b + [true];
+
+ _d = _d + [getText(configFile >> 'CfgWeapons' >> 'AKS_74_pso' >> 'displayName') + '/' + getText(configFile >> 'CfgWeapons' >> 'RPG7V' >> 'displayName')];
+ _p = _p + [getText(configFile >> 'CfgWeapons' >> 'AKS_74_pso' >> 'picture')];
+ _t = _t + [['AKS_74_pso','RPG7V']];
+ _m = _m + [['30Rnd_545x39_AK','30Rnd_545x39_AK','30Rnd_545x39_AK','30Rnd_545x39_AK','30Rnd_545x39_AK','30Rnd_545x39_AK','PG7VL','PG7VL','PG7VL']];
+ _s = _s + [['Binocular','NVGoggles']];
+ _i = _i + [_items];
+ _l = _l + [1];
+ _b = _b + [false];
+
+ _d = _d + [getText(configFile >> 'CfgWeapons' >> 'AK_74_GL' >> 'displayName') + '/' + getText(configFile >> 'CfgWeapons' >> 'RPG7V' >> 'displayName')];
+ _p = _p + [getText(configFile >> 'CfgWeapons' >> 'AK_74_GL' >> 'picture')];
+ _t = _t + [['AK_74_GL','RPG7V']];
+ _m = _m + [['30Rnd_545x39_AK','30Rnd_545x39_AK','30Rnd_545x39_AK','30Rnd_545x39_AK','30Rnd_545x39_AK','30Rnd_545x39_AK','PG7V',
+ 'PG7V','PG7V','1Rnd_HE_GP25','1Rnd_HE_GP25','1Rnd_HE_GP25','1Rnd_HE_GP25','1Rnd_HE_GP25','1Rnd_HE_GP25','1Rnd_HE_GP25','1Rnd_HE_GP25']];
+ _s = _s + [['Binocular','NVGoggles']];
+ _i = _i + [_items];
+ _l = _l + [1];
+ _b = _b + [false];
+
+ _d = _d + [getText(configFile >> 'CfgWeapons' >> 'AKS_74_U' >> 'displayName') + '/' + getText(configFile >> 'CfgWeapons' >> 'RPG7V' >> 'displayName') + '/' + getText(configFile >> 'CfgWeapons' >> 'Makarov' >> 'displayName')];
+ _p = _p + [getText(configFile >> 'CfgWeapons' >> 'AKS_74_U' >> 'picture')];
+ _t = _t + [['AKS_74_U','RPG7V','Makarov']];
+ _m = _m + [['30Rnd_545x39_AK','30Rnd_545x39_AK','30Rnd_545x39_AK','30Rnd_545x39_AK','30Rnd_545x39_AK','30Rnd_545x39_AK','PG7VL','PG7VL','PG7VL',
+ '8Rnd_9x18_Makarov','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov']];
+ _s = _s + [['Binocular','NVGoggles']];
+ _i = _i + [_items];
+ _l = _l + [1];
+ _b = _b + [true];
+
+ _d = _d + [getText(configFile >> 'CfgWeapons' >> 'AKS_74_kobra' >> 'displayName') + '/' + getText(configFile >> 'CfgWeapons' >> 'MetisLauncher' >> 'displayName') + '/' + getText(configFile >> 'CfgWeapons' >> 'Makarov' >> 'displayName')];
+ _p = _p + [getText(configFile >> 'CfgWeapons' >> 'AKS_74_kobra' >> 'picture')];
+ _t = _t + [['AKS_74_kobra','MetisLauncher','Makarov']];
+ _m = _m + [['30Rnd_545x39_AK','30Rnd_545x39_AK','30Rnd_545x39_AK','30Rnd_545x39_AK','30Rnd_545x39_AK','30Rnd_545x39_AK','AT13',
+ '8Rnd_9x18_Makarov','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov']];
+ _s = _s + [['Binocular','NVGoggles']];
+ _i = _i + [_items];
+ _l = _l + [3];
+ _b = _b + [false];
+
+ _d = _d + [getText(configFile >> 'CfgWeapons' >> 'AK_74' >> 'displayName') + '/' + getText(configFile >> 'CfgWeapons' >> 'Igla' >> 'displayName') + '/' + getText(configFile >> 'CfgWeapons' >> 'Makarov' >> 'displayName')];
+ _p = _p + [getText(configFile >> 'CfgWeapons' >> 'AK_74' >> 'picture')];
+ _t = _t + [['AK_74','Igla','Makarov']];
+ _m = _m + [['30Rnd_545x39_AK','30Rnd_545x39_AK','30Rnd_545x39_AK','30Rnd_545x39_AK','30Rnd_545x39_AK','30Rnd_545x39_AK','Igla',
+ '8Rnd_9x18_Makarov','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov']];
+ _s = _s + [['Binocular','NVGoggles']];
+ _i = _i + [_items];
+ _l = _l + [2];
+ _b = _b + [false];
+
+ _d = _d + [getText(configFile >> 'CfgWeapons' >> 'Saiga12K' >> 'displayName') + '/' + getText(configFile >> 'CfgWeapons' >> 'Makarov' >> 'displayName') + '/' + getText(configFile >> 'CfgMagazines' >> 'MineE' >> 'displayName')];
+ _p = _p + [getText(configFile >> 'CfgWeapons' >> 'Saiga12K' >> 'picture')];
+ _t = _t + [['Saiga12K','Makarov']];
+ _m = _m + [['8Rnd_B_Saiga12_74Slug','8Rnd_B_Saiga12_74Slug','8Rnd_B_Saiga12_74Slug','8Rnd_B_Saiga12_74Slug','8Rnd_B_Saiga12_74Slug','8Rnd_B_Saiga12_74Slug','MineE','MineE','MineE',
+ '8Rnd_9x18_Makarov','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov']];
+ _s = _s + [['Binocular']];
+ _i = _i + [_items];
+ _l = _l + [0];
+ _b = _b + [true];
+
+ _d = _d + [getText(configFile >> 'CfgWeapons' >> 'AKS_74_UN_kobra' >> 'displayName') + '/' + getText(configFile >> 'CfgWeapons' >> 'MakarovSD' >> 'displayName') + '/' + getText(configFile >> 'CfgMagazines' >> 'PipeBomb' >> 'displayName')];
+ _p = _p + [getText(configFile >> 'CfgWeapons' >> 'AKS_74_UN_kobra' >> 'picture')];
+ _t = _t + [['AKS_74_UN_kobra','MakarovSD']];
+ _m = _m + [['30Rnd_545x39_AKSD','30Rnd_545x39_AKSD','30Rnd_545x39_AKSD','30Rnd_545x39_AKSD','30Rnd_545x39_AKSD','30Rnd_545x39_AKSD','PipeBomb','PipeBomb','PipeBomb',
+ '8Rnd_9x18_MakarovSD','8Rnd_9x18_MakarovSD','8Rnd_9x18_MakarovSD','8Rnd_9x18_MakarovSD','8Rnd_9x18_MakarovSD','8Rnd_9x18_MakarovSD','8Rnd_9x18_MakarovSD','8Rnd_9x18_MakarovSD']];
+ _s = _s + [['Binocular','NVGoggles']];
+ _i = _i + [_items];
+ _l = _l + [2];
+ _b = _b + [true];
+
+ _d = _d + [getText(configFile >> 'CfgWeapons' >> 'PK' >> 'displayName') + '/' + getText(configFile >> 'CfgWeapons' >> 'Makarov' >> 'displayName')];
+ _p = _p + [getText(configFile >> 'CfgWeapons' >> 'PK' >> 'picture')];
+ _t = _t + [['PK','Makarov']];
+ _m = _m + [['100Rnd_762x54_PK','100Rnd_762x54_PK','100Rnd_762x54_PK','100Rnd_762x54_PK','100Rnd_762x54_PK','SmokeShellBlue','SmokeShellBlue','8Rnd_9x18_Makarov',
+ '8Rnd_9x18_Makarov','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov']];
+ _s = _s + [['Binocular']];
+ _i = _i + [_items];
+ _l = _l + [0];
+ _b = _b + [true];
+
+ _d = _d + [getText(configFile >> 'CfgWeapons' >> 'SVD' >> 'displayName') + '/' + getText(configFile >> 'CfgWeapons' >> 'MakarovSD' >> 'displayName')];
+ _p = _p + [getText(configFile >> 'CfgWeapons' >> 'SVD' >> 'picture')];
+ _t = _t + [['SVD','MakarovSD']];
+ _m = _m + [['10Rnd_762x54_SVD','10Rnd_762x54_SVD','10Rnd_762x54_SVD','10Rnd_762x54_SVD','10Rnd_762x54_SVD','10Rnd_762x54_SVD','10Rnd_762x54_SVD','10Rnd_762x54_SVD',
+ '10Rnd_762x54_SVD','10Rnd_762x54_SVD','HandGrenade_East','HandGrenade_East','8Rnd_9x18_MakarovSD','8Rnd_9x18_MakarovSD','8Rnd_9x18_MakarovSD','8Rnd_9x18_MakarovSD','8Rnd_9x18_MakarovSD',
+ '8Rnd_9x18_MakarovSD','8Rnd_9x18_MakarovSD','8Rnd_9x18_MakarovSD']];
+ _s = _s + [['Binocular']];
+ _i = _i + [_items];
+ _l = _l + [1];
+ _b = _b + [true];
+
+ _d = _d + [getText(configFile >> 'CfgWeapons' >> 'VSS_vintorez' >> 'displayName') + '/' + getText(configFile >> 'CfgWeapons' >> 'Laserdesignator' >> 'displayName') + '/' + getText(configFile >> 'CfgWeapons' >> 'MakarovSD' >> 'displayName')];
+ _p = _p + [getText(configFile >> 'CfgWeapons' >> 'VSS_vintorez' >> 'picture')];
+ _t = _t + [['VSS_vintorez','Laserdesignator','MakarovSD']];
+ _m = _m + [['20Rnd_9x39_SP5_VSS','20Rnd_9x39_SP5_VSS','20Rnd_9x39_SP5_VSS','20Rnd_9x39_SP5_VSS','20Rnd_9x39_SP5_VSS','20Rnd_9x39_SP5_VSS','20Rnd_9x39_SP5_VSS','20Rnd_9x39_SP5_VSS',
+ '20Rnd_9x39_SP5_VSS','20Rnd_9x39_SP5_VSS','HandGrenade_East','Laserbatteries','8Rnd_9x18_MakarovSD','8Rnd_9x18_MakarovSD','8Rnd_9x18_MakarovSD','8Rnd_9x18_MakarovSD','8Rnd_9x18_MakarovSD',
+ '8Rnd_9x18_MakarovSD','8Rnd_9x18_MakarovSD','8Rnd_9x18_MakarovSD']];
+ _s = _s + [['Binocular','NVGoggles']];
+ _i = _i + [_items];
+ _l = _l + [2];
+ _b = _b + [false];
+
+ _d = _d + [getText(configFile >> 'CfgWeapons' >> 'ksvk' >> 'displayName') + '/' + getText(configFile >> 'CfgWeapons' >> 'MakarovSD' >> 'displayName')];
+ _p = _p + [getText(configFile >> 'CfgWeapons' >> 'ksvk' >> 'picture')];
+ _t = _t + [['ksvk','MakarovSD']];
+ _m = _m + [['5Rnd_127x108_KSVK','5Rnd_127x108_KSVK','5Rnd_127x108_KSVK','5Rnd_127x108_KSVK','5Rnd_127x108_KSVK','5Rnd_127x108_KSVK','5Rnd_127x108_KSVK','5Rnd_127x108_KSVK',
+ '5Rnd_127x108_KSVK','5Rnd_127x108_KSVK','HandGrenade_East','HandGrenade_East','8Rnd_9x18_MakarovSD','8Rnd_9x18_MakarovSD','8Rnd_9x18_MakarovSD','8Rnd_9x18_MakarovSD','8Rnd_9x18_MakarovSD',
+ '8Rnd_9x18_MakarovSD','8Rnd_9x18_MakarovSD','8Rnd_9x18_MakarovSD']];
+ _s = _s + [['Binocular','NVGoggles']];
+ _i = _i + [_items];
+ _l = _l + [3];
+ _b = _b + [false];
+
+ _c = [];
+ _totalTemplates = count _d;
+
+ for [{_count = 0},{_count < _totalTemplates},{_count = _count + 1}] do {
+ _cost = 0;
+ {
+ _get = (_x+"_W") Call GetNamespace;
+ if (isNil '_get') then {
+ _get = _x Call GetNamespace;
+ };
+ if !(isNil '_get') then {_cost = _cost + (_get select QUERYGEARCOST)};
+ } forEach (_t select _count);
+
+ {
+ _get = _x Call GetNamespace;
+ if !(isNil '_get') then {_cost = _cost + (_get select QUERYGEARCOST)};
+ } forEach ((_m select _count) + (_s select _count) + (_i select _count));
+
+ _c = _c + [_cost];
+ };
+
+ WF_Logic setVariable ['templateClasses',_t];
+ WF_Logic setVariable ['templateNames',_d];
+ WF_Logic setVariable ['templateCosts',_c];
+ WF_Logic setVariable ['templatePictures',_p];
+ WF_Logic setVariable ['templateMags',_m];
+ WF_Logic setVariable ['templateItems',_i];
+ WF_Logic setVariable ['templateSpecs',_s];
+ WF_Logic setVariable ['templateUpgrades',_l];
+ WF_Logic setVariable ['templateAllowed',_b];
+ };
+};
+
+['WFBE_EASTDEFAULTWEAPONS',['AK_74','ItemCompass','ItemMap','ItemWatch','ItemRadio'],true] Call SetNamespace;
+['WFBE_EASTDEFAULTAMMO',['30Rnd_545x39_AK','30Rnd_545x39_AK','30Rnd_545x39_AK','30Rnd_545x39_AK','30Rnd_545x39_AK','30Rnd_545x39_AK','HandGrenade_East','HandGrenade_East'],true] Call SetNamespace;
+
+//--- AI Leaders Loadouts.
+if (isServer) then {
+ //--- No Upgrade.
+ ['WFBE_EASTLEADERWEAPONS01',['AKS_74_kobra','RPG18','Makarov','Binocular','ItemRadio','ItemMap'],true] Call SetNamespace;
+ ['WFBE_EASTLEADERAMMO01',['30Rnd_545x39_AK','30Rnd_545x39_AK','30Rnd_545x39_AK','30Rnd_545x39_AK','30Rnd_545x39_AK','30Rnd_545x39_AK','RPG18','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov'],true] Call SetNamespace;
+ ['WFBE_EASTLEADERWEAPONS02',['AKS_74_kobra','RPG18','Makarov','Binocular','ItemRadio','ItemMap'],true] Call SetNamespace;
+ ['WFBE_EASTLEADERAMMO02',['30Rnd_545x39_AK','30Rnd_545x39_AK','30Rnd_545x39_AK','30Rnd_545x39_AK','30Rnd_545x39_AK','30Rnd_545x39_AK','RPG18','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov'],true] Call SetNamespace;
+ ['WFBE_EASTLEADERWEAPONS03',['PK','Makarov','Binocular','ItemRadio','ItemMap'],true] Call SetNamespace;;
+ ['WFBE_EASTLEADERAMMO03',['100Rnd_762x54_PK','100Rnd_762x54_PK','100Rnd_762x54_PK','100Rnd_762x54_PK','100Rnd_762x54_PK','HandGrenade_East','HandGrenade_East','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov'],true] Call SetNamespace;
+ //--- Upgrade 1.
+ ['WFBE_EASTLEADERWEAPONS11',['AK_74_GL','RPG7V','Makarov','Binocular','NVGoggles','ItemRadio','ItemMap'],true] Call SetNamespace;
+ ['WFBE_EASTLEADERAMMO11',['30Rnd_545x39_AK','30Rnd_545x39_AK','30Rnd_545x39_AK','30Rnd_545x39_AK','30Rnd_545x39_AK','30Rnd_545x39_AK','PG7VL','PG7VL','PG7VR','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov'],true] Call SetNamespace;
+ ['WFBE_EASTLEADERWEAPONS12',['RPK_74','RPG7V','Makarov','Binocular','NVGoggles','ItemRadio','ItemMap'],true] Call SetNamespace;
+ ['WFBE_EASTLEADERAMMO12',['75Rnd_545x39_RPK','75Rnd_545x39_RPK','75Rnd_545x39_RPK','75Rnd_545x39_RPK','75Rnd_545x39_RPK','75Rnd_545x39_RPK','PG7VL','PG7VL','PG7VR','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov'],true] Call SetNamespace;
+ ['WFBE_EASTLEADERWEAPONS13',['SVD','MakarovSD','Binocular','NVGoggles','ItemRadio','ItemMap'],true] Call SetNamespace;
+ ['WFBE_EASTLEADERAMMO13',['10Rnd_762x54_SVD','10Rnd_762x54_SVD','10Rnd_762x54_SVD','10Rnd_762x54_SVD','10Rnd_762x54_SVD','10Rnd_762x54_SVD','10Rnd_762x54_SVD','10Rnd_762x54_SVD','10Rnd_762x54_SVD','10Rnd_762x54_SVD','HandGrenade_East','HandGrenade_East','8Rnd_9x18_MakarovSD','8Rnd_9x18_MakarovSD','8Rnd_9x18_MakarovSD','8Rnd_9x18_MakarovSD'],true] Call SetNamespace;
+ //--- Upgrade 2.
+ ['WFBE_EASTLEADERWEAPONS21',['VSS_vintorez','RPG7V','Makarov','Binocular','NVGoggles','ItemRadio','ItemMap'],true] Call SetNamespace;
+ ['WFBE_EASTLEADERAMMO21',['20Rnd_9x39_SP5_VSS','20Rnd_9x39_SP5_VSS','20Rnd_9x39_SP5_VSS','20Rnd_9x39_SP5_VSS','20Rnd_9x39_SP5_VSS','20Rnd_9x39_SP5_VSS','PG7VL','PG7VL','PG7VL','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov'],true] Call SetNamespace;
+ ['WFBE_EASTLEADERWEAPONS22',['AKS_74_pso','RPG7V','Makarov','Binocular','NVGoggles','ItemRadio','ItemMap'],true] Call SetNamespace;
+ ['WFBE_EASTLEADERAMMO22',['30Rnd_545x39_AK','30Rnd_545x39_AK','30Rnd_545x39_AK','30Rnd_545x39_AK','30Rnd_545x39_AK','30Rnd_545x39_AK','PG7VL','PG7VL','PG7VL','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov'],true] Call SetNamespace;
+ ['WFBE_EASTLEADERWEAPONS23',['RPK_74','Makarov','Binocular','NVGoggles','ItemRadio','ItemMap'],true] Call SetNamespace;
+ ['WFBE_EASTLEADERAMMO23',['75Rnd_545x39_RPK','75Rnd_545x39_RPK','75Rnd_545x39_RPK','75Rnd_545x39_RPK','75Rnd_545x39_RPK','75Rnd_545x39_RPK','HandGrenade_East','HandGrenade_East','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov'],true] Call SetNamespace;
+ //--- Upgrade 3.
+ ['WFBE_EASTLEADERWEAPONS31',['AK_74_GL','RPG7V','Binocular','NVGoggles','ItemRadio','ItemMap'],true] Call SetNamespace;
+ ['WFBE_EASTLEADERAMMO31',['30Rnd_545x39_AK','30Rnd_545x39_AK','30Rnd_545x39_AK','30Rnd_545x39_AK','30Rnd_545x39_AK','30Rnd_545x39_AK','PG7VL','PG7VL','PG7VL','1Rnd_HE_GP25','1Rnd_HE_GP25','1Rnd_HE_GP25','1Rnd_HE_GP25'],true] Call SetNamespace;
+ ['WFBE_EASTLEADERWEAPONS32',['AKS_74_kobra','MetisLauncher','Makarov','Binocular','NVGoggles','ItemRadio','ItemMap'],true] Call SetNamespace;
+ ['WFBE_EASTLEADERAMMO32',['30Rnd_545x39_AK','30Rnd_545x39_AK','30Rnd_545x39_AK','30Rnd_545x39_AK','30Rnd_545x39_AK','30Rnd_545x39_AK','AT13','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov'],true] Call SetNamespace;
+ ['WFBE_EASTLEADERWEAPONS33',['SVD_CAMO','Makarov','Binocular','NVGoggles','ItemRadio','ItemMap'],true] Call SetNamespace;
+ ['WFBE_EASTLEADERAMMO33',['10Rnd_762x54_SVD','10Rnd_762x54_SVD','10Rnd_762x54_SVD','10Rnd_762x54_SVD','10Rnd_762x54_SVD','10Rnd_762x54_SVD','10Rnd_762x54_SVD','10Rnd_762x54_SVD','10Rnd_762x54_SVD','10Rnd_762x54_SVD','HandGrenade_East','HandGrenade_East','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov'],true] Call SetNamespace;
+}; \ No newline at end of file
diff --git a/Common/Config/Core_Loadout/Vanilla/Loadout_RU.sqf b/Common/Config/Core_Loadout/Vanilla/Loadout_RU.sqf
new file mode 100644
index 0000000..6bc4d45
--- /dev/null
+++ b/Common/Config/Core_Loadout/Vanilla/Loadout_RU.sqf
@@ -0,0 +1,320 @@
+/* RU Loadout */
+
+if (!isServer || local player) then {
+ if (side player == EAST) then {
+ /* Magazines. */
+ _m = ["30Rnd_762x39_AK47"];
+ _m = _m + ["30Rnd_545x39_AK"];
+ _m = _m + ["30Rnd_545x39_AKSD"];
+ _m = _m + ["64Rnd_9x19_Bizon"];
+ _m = _m + ["64Rnd_9x19_SD_Bizon"];
+ _m = _m + ["100Rnd_762x54_PK"];
+ _m = _m + ["75Rnd_545x39_RPK"];
+ _m = _m + ["5x_22_LR_17_HMR"];
+ _m = _m + ["10Rnd_762x54_SVD"];
+ _m = _m + ["8Rnd_B_Saiga12_74Slug"];
+ _m = _m + ["5Rnd_127x108_KSVK"];
+ _m = _m + ["10Rnd_9x39_SP5_VSS"];
+ _m = _m + ["20Rnd_9x39_SP5_VSS"];
+ _m = _m + ["PG7V"];
+ _m = _m + ["PG7VL"];
+ _m = _m + ["OG7"];
+ _m = _m + ["PG7VR"];
+ _m = _m + ["RPG18"];
+ _m = _m + ["AT13"];
+ _m = _m + ["Igla"];
+ _m = _m + ["Strela"];
+ _m = _m + ["Laserbatteries"];
+ _m = _m + ["8Rnd_9x18_Makarov"];
+ _m = _m + ["8Rnd_9x18_MakarovSD"];
+
+ WF_Logic setVariable ['magazineClasses',_m];
+
+ /* Primary. */
+ _w = ['AK_47_M'];
+ _w = _w + ['AK_47_S'];
+ _w = _w + ['AK_74'];
+ _w = _w + ['AK_74_GL'];
+ _w = _w + ['AK_107_kobra'];
+ _w = _w + ['AK_107_GL_kobra'];
+ _w = _w + ['AK_107_pso'];
+ _w = _w + ['AK_107_GL_pso'];
+ _w = _w + ['AKS_74_kobra'];
+ _w = _w + ['AKS_74_pso'];
+ _w = _w + ['AKS_74_U'];
+ _w = _w + ['AKS_74_UN_kobra'];
+ _w = _w + ['AKS_GOLD'];
+ _w = _w + ['bizon'];
+ _w = _w + ['bizon_silenced'];
+ _w = _w + ['PK'];
+ _w = _w + ['Pecheneg'];
+ _w = _w + ['RPK_74'];
+ _w = _w + ['huntingrifle'];
+ _w = _w + ['SVD'];
+ _w = _w + ['SVD_CAMO'];
+ _w = _w + ['Saiga12K'];
+ _w = _w + ['ksvk'];
+ _w = _w + ['VSS_vintorez'];
+
+ WF_Logic setVariable ['primaryClasses',_w];
+
+ /* Secondary. */
+ _w = ['RPG7V'];
+ _w = _w + ['RPG18'];
+ _w = _w + ['MetisLauncher'];
+ _w = _w + ['Igla'];
+ _w = _w + ['Strela'];
+ _w = _w + ['Laserdesignator'];
+
+ WF_Logic setVariable ['secondaryClasses',_w];
+
+ /* Sidearms. */
+ _w = ['Makarov'];
+ _w = _w + ['MakarovSD'];
+
+ WF_Logic setVariable ['sidearmClasses',_w];
+
+ /* Misc. */
+ _w = ['HandGrenade_East'];
+ _w = _w + ['HandGrenade_Stone'];
+ _w = _w + ['SmokeShell'];
+ _w = _w + ['SmokeShellRed'];
+ _w = _w + ['SmokeShellGreen'];
+ _w = _w + ['SmokeShellBlue'];
+ _w = _w + ['SmokeShellYellow'];
+ _w = _w + ['SmokeShellOrange'];
+ _w = _w + ['SmokeShellPurple'];
+ _w = _w + ['FlareWhite_GP25'];
+ _w = _w + ['FlareYellow_GP25'];
+ _w = _w + ['FlareGreen_GP25'];
+ _w = _w + ['FlareRed_GP25'];
+ _w = _w + ['1Rnd_HE_GP25'];
+ _w = _w + ['1Rnd_SMOKE_GP25'];
+ _w = _w + ['1Rnd_SMOKERED_GP25'];
+ _w = _w + ['1Rnd_SMOKEGREEN_GP25'];
+ _w = _w + ['1Rnd_SMOKEYELLOW_GP25'];
+ _w = _w + ['MineE'];
+ _w = _w + ['PipeBomb'];
+ _w = _w + ['Binocular'];
+ _w = _w + ['NVGoggles'];
+ _w = _w + ['ItemCompass'];
+ _w = _w + ['ItemGPS'];
+ _w = _w + ['ItemMap'];
+ _w = _w + ['ItemRadio'];
+ _w = _w + ['ItemWatch'];
+
+ WF_Logic setVariable ['miscClasses',_w];
+
+ //--- Templates.
+ _items = ['ItemCompass','ItemGPS','ItemMap','ItemRadio','ItemWatch'];
+
+ _d = [getText(configFile >> 'CfgWeapons' >> 'AK_107_kobra' >> 'displayName') + '/' + getText(configFile >> 'CfgWeapons' >> 'Makarov' >> 'displayName')];
+ _p = [getText(configFile >> 'CfgWeapons' >> 'AK_107_kobra' >> 'picture')];
+ _t = [['AK_107_kobra','Makarov']];
+ _m = [['30Rnd_545x39_AK','30Rnd_545x39_AK','30Rnd_545x39_AK','30Rnd_545x39_AK','30Rnd_545x39_AK','30Rnd_545x39_AK','30Rnd_545x39_AK','30Rnd_545x39_AK',
+ 'HandGrenade_East','HandGrenade_East','SmokeShellBlue','SmokeShellBlue','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov',
+ '8Rnd_9x18_Makarov','8Rnd_9x18_Makarov']];
+ _s = [['Binocular']];
+ _i = [_items];
+ _l = [0];
+ _b = [true];
+
+ _d = _d + [getText(configFile >> 'CfgWeapons' >> 'AK_107_GL_kobra' >> 'displayName')];
+ _p = _p + [getText(configFile >> 'CfgWeapons' >> 'AK_107_GL_kobra' >> 'picture')];
+ _t = _t + [['AK_107_GL_kobra']];
+ _m = _m + [['30Rnd_545x39_AK','30Rnd_545x39_AK','30Rnd_545x39_AK','30Rnd_545x39_AK','30Rnd_545x39_AK','30Rnd_545x39_AK','30Rnd_545x39_AK','30Rnd_545x39_AK',
+ '30Rnd_545x39_AK','30Rnd_545x39_AK','HandGrenade_East','HandGrenade_East','1Rnd_HE_GP25','1Rnd_HE_GP25','1Rnd_HE_GP25','1Rnd_HE_GP25','1Rnd_HE_GP25','1Rnd_HE_GP25',
+ '1Rnd_HE_GP25','1Rnd_HE_GP25']];
+ _s = _s + [['Binocular']];
+ _i = _i + [_items];
+ _l = _l + [0];
+ _b = _b + [true];
+
+ _d = _d + [getText(configFile >> 'CfgWeapons' >> 'AK_107_pso' >> 'displayName') + '/' + getText(configFile >> 'CfgWeapons' >> 'RPG7V' >> 'displayName')];
+ _p = _p + [getText(configFile >> 'CfgWeapons' >> 'AK_107_pso' >> 'picture')];
+ _t = _t + [['AK_107_pso','RPG7V']];
+ _m = _m + [['30Rnd_545x39_AK','30Rnd_545x39_AK','30Rnd_545x39_AK','30Rnd_545x39_AK','30Rnd_545x39_AK','30Rnd_545x39_AK','PG7VL','PG7VL','PG7VL']];
+ _s = _s + [['Binocular','NVGoggles']];
+ _i = _i + [_items];
+ _l = _l + [1];
+ _b = _b + [false];
+
+ _d = _d + [getText(configFile >> 'CfgWeapons' >> 'AK_107_GL_pso' >> 'displayName') + '/' + getText(configFile >> 'CfgWeapons' >> 'RPG7V' >> 'displayName')];
+ _p = _p + [getText(configFile >> 'CfgWeapons' >> 'AK_107_GL_pso' >> 'picture')];
+ _t = _t + [['AK_107_GL_pso','RPG7V']];
+ _m = _m + [['30Rnd_545x39_AK','30Rnd_545x39_AK','30Rnd_545x39_AK','30Rnd_545x39_AK','30Rnd_545x39_AK','30Rnd_545x39_AK','PG7V',
+ 'PG7V','PG7V','1Rnd_HE_GP25','1Rnd_HE_GP25','1Rnd_HE_GP25','1Rnd_HE_GP25','1Rnd_HE_GP25','1Rnd_HE_GP25','1Rnd_HE_GP25','1Rnd_HE_GP25']];
+ _s = _s + [['Binocular','NVGoggles']];
+ _i = _i + [_items];
+ _l = _l + [1];
+ _b = _b + [false];
+
+ _d = _d + [getText(configFile >> 'CfgWeapons' >> 'AKS_74_U' >> 'displayName') + '/' + getText(configFile >> 'CfgWeapons' >> 'RPG7V' >> 'displayName') + '/' + getText(configFile >> 'CfgWeapons' >> 'Makarov' >> 'displayName')];
+ _p = _p + [getText(configFile >> 'CfgWeapons' >> 'AKS_74_U' >> 'picture')];
+ _t = _t + [['AKS_74_U','RPG7V','Makarov']];
+ _m = _m + [['30Rnd_545x39_AK','30Rnd_545x39_AK','30Rnd_545x39_AK','30Rnd_545x39_AK','30Rnd_545x39_AK','30Rnd_545x39_AK','PG7VL','PG7VL','PG7VL',
+ '8Rnd_9x18_Makarov','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov']];
+ _s = _s + [['Binocular','NVGoggles']];
+ _i = _i + [_items];
+ _l = _l + [1];
+ _b = _b + [true];
+
+ _d = _d + [getText(configFile >> 'CfgWeapons' >> 'AK_107_kobra' >> 'displayName') + '/' + getText(configFile >> 'CfgWeapons' >> 'MetisLauncher' >> 'displayName') + '/' + getText(configFile >> 'CfgWeapons' >> 'Makarov' >> 'displayName')];
+ _p = _p + [getText(configFile >> 'CfgWeapons' >> 'AK_107_kobra' >> 'picture')];
+ _t = _t + [['AK_107_kobra','MetisLauncher','Makarov']];
+ _m = _m + [['30Rnd_545x39_AK','30Rnd_545x39_AK','30Rnd_545x39_AK','30Rnd_545x39_AK','30Rnd_545x39_AK','30Rnd_545x39_AK','AT13',
+ '8Rnd_9x18_Makarov','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov']];
+ _s = _s + [['Binocular','NVGoggles']];
+ _i = _i + [_items];
+ _l = _l + [3];
+ _b = _b + [false];
+
+ _d = _d + [getText(configFile >> 'CfgWeapons' >> 'AK_74' >> 'displayName') + '/' + getText(configFile >> 'CfgWeapons' >> 'Igla' >> 'displayName') + '/' + getText(configFile >> 'CfgWeapons' >> 'Makarov' >> 'displayName')];
+ _p = _p + [getText(configFile >> 'CfgWeapons' >> 'AK_74' >> 'picture')];
+ _t = _t + [['AK_74','Igla','Makarov']];
+ _m = _m + [['30Rnd_545x39_AK','30Rnd_545x39_AK','30Rnd_545x39_AK','30Rnd_545x39_AK','30Rnd_545x39_AK','30Rnd_545x39_AK','Igla',
+ '8Rnd_9x18_Makarov','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov']];
+ _s = _s + [['Binocular','NVGoggles']];
+ _i = _i + [_items];
+ _l = _l + [2];
+ _b = _b + [false];
+
+ _d = _d + [getText(configFile >> 'CfgWeapons' >> 'Saiga12K' >> 'displayName') + '/' + getText(configFile >> 'CfgWeapons' >> 'Makarov' >> 'displayName') + '/' + getText(configFile >> 'CfgMagazines' >> 'MineE' >> 'displayName')];
+ _p = _p + [getText(configFile >> 'CfgWeapons' >> 'Saiga12K' >> 'picture')];
+ _t = _t + [['Saiga12K','Makarov']];
+ _m = _m + [['8Rnd_B_Saiga12_74Slug','8Rnd_B_Saiga12_74Slug','8Rnd_B_Saiga12_74Slug','8Rnd_B_Saiga12_74Slug','8Rnd_B_Saiga12_74Slug','8Rnd_B_Saiga12_74Slug','MineE','MineE','MineE',
+ '8Rnd_9x18_Makarov','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov']];
+ _s = _s + [['Binocular']];
+ _i = _i + [_items];
+ _l = _l + [0];
+ _b = _b + [true];
+
+ _d = _d + [getText(configFile >> 'CfgWeapons' >> 'AKS_74_UN_kobra' >> 'displayName') + '/' + getText(configFile >> 'CfgWeapons' >> 'MakarovSD' >> 'displayName') + '/' + getText(configFile >> 'CfgMagazines' >> 'PipeBomb' >> 'displayName')];
+ _p = _p + [getText(configFile >> 'CfgWeapons' >> 'AKS_74_UN_kobra' >> 'picture')];
+ _t = _t + [['AKS_74_UN_kobra','MakarovSD']];
+ _m = _m + [['30Rnd_545x39_AKSD','30Rnd_545x39_AKSD','30Rnd_545x39_AKSD','30Rnd_545x39_AKSD','30Rnd_545x39_AKSD','30Rnd_545x39_AKSD','PipeBomb','PipeBomb','PipeBomb',
+ '8Rnd_9x18_MakarovSD','8Rnd_9x18_MakarovSD','8Rnd_9x18_MakarovSD','8Rnd_9x18_MakarovSD','8Rnd_9x18_MakarovSD','8Rnd_9x18_MakarovSD','8Rnd_9x18_MakarovSD','8Rnd_9x18_MakarovSD']];
+ _s = _s + [['Binocular','NVGoggles']];
+ _i = _i + [_items];
+ _l = _l + [2];
+ _b = _b + [true];
+
+ _d = _d + [getText(configFile >> 'CfgWeapons' >> 'PK' >> 'displayName') + '/' + getText(configFile >> 'CfgWeapons' >> 'Makarov' >> 'displayName')];
+ _p = _p + [getText(configFile >> 'CfgWeapons' >> 'PK' >> 'picture')];
+ _t = _t + [['PK','Makarov']];
+ _m = _m + [['100Rnd_762x54_PK','100Rnd_762x54_PK','100Rnd_762x54_PK','100Rnd_762x54_PK','100Rnd_762x54_PK','SmokeShellBlue','SmokeShellBlue','8Rnd_9x18_Makarov',
+ '8Rnd_9x18_Makarov','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov']];
+ _s = _s + [['Binocular']];
+ _i = _i + [_items];
+ _l = _l + [0];
+ _b = _b + [true];
+
+ _d = _d + [getText(configFile >> 'CfgWeapons' >> 'Pecheneg' >> 'displayName') + '/' + getText(configFile >> 'CfgWeapons' >> 'Makarov' >> 'displayName')];
+ _p = _p + [getText(configFile >> 'CfgWeapons' >> 'Pecheneg' >> 'picture')];
+ _t = _t + [['Pecheneg','Makarov']];
+ _m = _m + [['100Rnd_762x54_PK','100Rnd_762x54_PK','100Rnd_762x54_PK','100Rnd_762x54_PK','100Rnd_762x54_PK','SmokeShellBlue','SmokeShellBlue','8Rnd_9x18_Makarov',
+ '8Rnd_9x18_Makarov','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov']];
+ _s = _s + [['Binocular','NVGoggles']];
+ _i = _i + [_items];
+ _l = _l + [2];
+ _b = _b + [false];
+
+ _d = _d + [getText(configFile >> 'CfgWeapons' >> 'SVD' >> 'displayName') + '/' + getText(configFile >> 'CfgWeapons' >> 'MakarovSD' >> 'displayName')];
+ _p = _p + [getText(configFile >> 'CfgWeapons' >> 'SVD' >> 'picture')];
+ _t = _t + [['SVD','MakarovSD']];
+ _m = _m + [['10Rnd_762x54_SVD','10Rnd_762x54_SVD','10Rnd_762x54_SVD','10Rnd_762x54_SVD','10Rnd_762x54_SVD','10Rnd_762x54_SVD','10Rnd_762x54_SVD','10Rnd_762x54_SVD',
+ '10Rnd_762x54_SVD','10Rnd_762x54_SVD','HandGrenade_East','HandGrenade_East','8Rnd_9x18_MakarovSD','8Rnd_9x18_MakarovSD','8Rnd_9x18_MakarovSD','8Rnd_9x18_MakarovSD','8Rnd_9x18_MakarovSD',
+ '8Rnd_9x18_MakarovSD','8Rnd_9x18_MakarovSD','8Rnd_9x18_MakarovSD']];
+ _s = _s + [['Binocular']];
+ _i = _i + [_items];
+ _l = _l + [1];
+ _b = _b + [true];
+
+ _d = _d + [getText(configFile >> 'CfgWeapons' >> 'VSS_vintorez' >> 'displayName') + '/' + getText(configFile >> 'CfgWeapons' >> 'Laserdesignator' >> 'displayName') + '/' + getText(configFile >> 'CfgWeapons' >> 'MakarovSD' >> 'displayName')];
+ _p = _p + [getText(configFile >> 'CfgWeapons' >> 'VSS_vintorez' >> 'picture')];
+ _t = _t + [['VSS_vintorez','Laserdesignator','MakarovSD']];
+ _m = _m + [['20Rnd_9x39_SP5_VSS','20Rnd_9x39_SP5_VSS','20Rnd_9x39_SP5_VSS','20Rnd_9x39_SP5_VSS','20Rnd_9x39_SP5_VSS','20Rnd_9x39_SP5_VSS','20Rnd_9x39_SP5_VSS','20Rnd_9x39_SP5_VSS',
+ '20Rnd_9x39_SP5_VSS','20Rnd_9x39_SP5_VSS','HandGrenade_East','Laserbatteries','8Rnd_9x18_MakarovSD','8Rnd_9x18_MakarovSD','8Rnd_9x18_MakarovSD','8Rnd_9x18_MakarovSD','8Rnd_9x18_MakarovSD',
+ '8Rnd_9x18_MakarovSD','8Rnd_9x18_MakarovSD','8Rnd_9x18_MakarovSD']];
+ _s = _s + [['Binocular','NVGoggles']];
+ _i = _i + [_items];
+ _l = _l + [2];
+ _b = _b + [false];
+
+ _d = _d + [getText(configFile >> 'CfgWeapons' >> 'ksvk' >> 'displayName') + '/' + getText(configFile >> 'CfgWeapons' >> 'MakarovSD' >> 'displayName')];
+ _p = _p + [getText(configFile >> 'CfgWeapons' >> 'ksvk' >> 'picture')];
+ _t = _t + [['ksvk','MakarovSD']];
+ _m = _m + [['5Rnd_127x108_KSVK','5Rnd_127x108_KSVK','5Rnd_127x108_KSVK','5Rnd_127x108_KSVK','5Rnd_127x108_KSVK','5Rnd_127x108_KSVK','5Rnd_127x108_KSVK','5Rnd_127x108_KSVK',
+ '5Rnd_127x108_KSVK','5Rnd_127x108_KSVK','HandGrenade_East','HandGrenade_East','8Rnd_9x18_MakarovSD','8Rnd_9x18_MakarovSD','8Rnd_9x18_MakarovSD','8Rnd_9x18_MakarovSD','8Rnd_9x18_MakarovSD',
+ '8Rnd_9x18_MakarovSD','8Rnd_9x18_MakarovSD','8Rnd_9x18_MakarovSD']];
+ _s = _s + [['Binocular','NVGoggles']];
+ _i = _i + [_items];
+ _l = _l + [3];
+ _b = _b + [false];
+
+ _c = [];
+ _totalTemplates = count _d;
+
+ for [{_count = 0},{_count < _totalTemplates},{_count = _count + 1}] do {
+ _cost = 0;
+ {
+ _get = (_x+"_W") Call GetNamespace;
+ if (isNil '_get') then {
+ _get = _x Call GetNamespace;
+ };
+ if !(isNil '_get') then {_cost = _cost + (_get select QUERYGEARCOST)};
+ } forEach (_t select _count);
+
+ {
+ _get = _x Call GetNamespace;
+ if !(isNil '_get') then {_cost = _cost + (_get select QUERYGEARCOST)};
+ } forEach ((_m select _count) + (_s select _count) + (_i select _count));
+
+ _c = _c + [_cost];
+ };
+ WF_Logic setVariable ['templateClasses',_t];
+ WF_Logic setVariable ['templateNames',_d];
+ WF_Logic setVariable ['templateCosts',_c];
+ WF_Logic setVariable ['templatePictures',_p];
+ WF_Logic setVariable ['templateMags',_m];
+ WF_Logic setVariable ['templateItems',_i];
+ WF_Logic setVariable ['templateSpecs',_s];
+ WF_Logic setVariable ['templateUpgrades',_l];
+ WF_Logic setVariable ['templateAllowed',_b];
+ };
+};
+
+['WFBE_EASTDEFAULTWEAPONS',['AK_74','ItemCompass','ItemMap','ItemWatch','ItemRadio'],true] Call SetNamespace;
+['WFBE_EASTDEFAULTAMMO',['30Rnd_545x39_AK','30Rnd_545x39_AK','30Rnd_545x39_AK','30Rnd_545x39_AK','30Rnd_545x39_AK','30Rnd_545x39_AK','HandGrenade_East','HandGrenade_East'],true] Call SetNamespace;
+
+//--- AI Leaders Loadouts.
+if (isServer) then {
+ //--- No upgrades.
+ ['WFBE_EASTLEADERWEAPONS01',['AK_107_kobra','RPG18','Makarov','Binocular','ItemRadio','ItemMap'],true] Call SetNamespace;
+ ['WFBE_EASTLEADERAMMO01',['30Rnd_545x39_AK','30Rnd_545x39_AK','30Rnd_545x39_AK','30Rnd_545x39_AK','30Rnd_545x39_AK','30Rnd_545x39_AK','RPG18','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov'],true] Call SetNamespace;
+ ['WFBE_EASTLEADERWEAPONS02',['AKS_74_kobra','RPG18','Makarov','Binocular','ItemRadio','ItemMap'],true] Call SetNamespace;
+ ['WFBE_EASTLEADERAMMO02',['30Rnd_545x39_AK','30Rnd_545x39_AK','30Rnd_545x39_AK','30Rnd_545x39_AK','30Rnd_545x39_AK','30Rnd_545x39_AK','RPG18','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov'],true] Call SetNamespace;
+ ['WFBE_EASTLEADERWEAPONS03',['PK','Makarov','Binocular','ItemRadio','ItemMap'],true] Call SetNamespace;;
+ ['WFBE_EASTLEADERAMMO03',['100Rnd_762x54_PK','100Rnd_762x54_PK','100Rnd_762x54_PK','100Rnd_762x54_PK','100Rnd_762x54_PK','HandGrenade_East','HandGrenade_East','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov'],true] Call SetNamespace;
+ //--- Upgrade 1.
+ ['WFBE_EASTLEADERWEAPONS11',['AK_107_pso','RPG7V','Makarov','Binocular','NVGoggles','ItemRadio','ItemMap'],true] Call SetNamespace;
+ ['WFBE_EASTLEADERAMMO11',['30Rnd_545x39_AK','30Rnd_545x39_AK','30Rnd_545x39_AK','30Rnd_545x39_AK','30Rnd_545x39_AK','30Rnd_545x39_AK','PG7VL','PG7VL','PG7VR','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov'],true] Call SetNamespace;
+ ['WFBE_EASTLEADERWEAPONS12',['RPK_74','RPG7V','Makarov','Binocular','NVGoggles','ItemRadio','ItemMap'],true] Call SetNamespace;
+ ['WFBE_EASTLEADERAMMO12',['75Rnd_545x39_RPK','75Rnd_545x39_RPK','75Rnd_545x39_RPK','75Rnd_545x39_RPK','75Rnd_545x39_RPK','75Rnd_545x39_RPK','PG7VL','PG7VL','PG7VR','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov'],true] Call SetNamespace;
+ ['WFBE_EASTLEADERWEAPONS13',['SVD','MakarovSD','Binocular','NVGoggles','ItemRadio','ItemMap'],true] Call SetNamespace;
+ ['WFBE_EASTLEADERAMMO13',['10Rnd_762x54_SVD','10Rnd_762x54_SVD','10Rnd_762x54_SVD','10Rnd_762x54_SVD','10Rnd_762x54_SVD','10Rnd_762x54_SVD','10Rnd_762x54_SVD','10Rnd_762x54_SVD','10Rnd_762x54_SVD','10Rnd_762x54_SVD','HandGrenade_East','HandGrenade_East','8Rnd_9x18_MakarovSD','8Rnd_9x18_MakarovSD','8Rnd_9x18_MakarovSD','8Rnd_9x18_MakarovSD'],true] Call SetNamespace;
+ //--- Upgrade 2.
+ ['WFBE_EASTLEADERWEAPONS21',['VSS_vintorez','RPG7V','Makarov','Binocular','NVGoggles','ItemRadio','ItemMap'],true] Call SetNamespace;
+ ['WFBE_EASTLEADERAMMO21',['20Rnd_9x39_SP5_VSS','20Rnd_9x39_SP5_VSS','20Rnd_9x39_SP5_VSS','20Rnd_9x39_SP5_VSS','20Rnd_9x39_SP5_VSS','20Rnd_9x39_SP5_VSS','PG7VL','PG7VL','PG7VL','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov'],true] Call SetNamespace;
+ ['WFBE_EASTLEADERWEAPONS22',['bizon','RPG7V','Makarov','Binocular','NVGoggles','ItemRadio','ItemMap'],true] Call SetNamespace;
+ ['WFBE_EASTLEADERAMMO22',['64Rnd_9x19_Bizon','64Rnd_9x19_Bizon','64Rnd_9x19_Bizon','64Rnd_9x19_Bizon','64Rnd_9x19_Bizon','64Rnd_9x19_Bizon','PG7VL','PG7VL','PG7VL','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov'],true] Call SetNamespace;
+ ['WFBE_EASTLEADERWEAPONS23',['Pecheneg','Makarov','Binocular','NVGoggles','ItemRadio','ItemMap'],true] Call SetNamespace;
+ ['WFBE_EASTLEADERAMMO23',['100Rnd_762x54_PK','100Rnd_762x54_PK','100Rnd_762x54_PK','100Rnd_762x54_PK','100Rnd_762x54_PK','HandGrenade_East','HandGrenade_East','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov'],true] Call SetNamespace;
+ //--- Upgrade 3.
+ ['WFBE_EASTLEADERWEAPONS31',['AK_107_GL_pso','RPG7V','Binocular','NVGoggles','ItemRadio','ItemMap'],true] Call SetNamespace;
+ ['WFBE_EASTLEADERAMMO31',['30Rnd_545x39_AK','30Rnd_545x39_AK','30Rnd_545x39_AK','30Rnd_545x39_AK','30Rnd_545x39_AK','30Rnd_545x39_AK','PG7VL','PG7VL','PG7VL','1Rnd_HE_GP25','1Rnd_HE_GP25','1Rnd_HE_GP25','1Rnd_HE_GP25'],true] Call SetNamespace;
+ ['WFBE_EASTLEADERWEAPONS32',['AK_107_kobra','MetisLauncher','Makarov','Binocular','NVGoggles','ItemRadio','ItemMap'],true] Call SetNamespace;
+ ['WFBE_EASTLEADERAMMO32',['30Rnd_545x39_AK','30Rnd_545x39_AK','30Rnd_545x39_AK','30Rnd_545x39_AK','30Rnd_545x39_AK','30Rnd_545x39_AK','AT13','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov'],true] Call SetNamespace;
+ ['WFBE_EASTLEADERWEAPONS33',['SVD_CAMO','Makarov','Binocular','NVGoggles','ItemRadio','ItemMap'],true] Call SetNamespace;
+ ['WFBE_EASTLEADERAMMO33',['10Rnd_762x54_SVD','10Rnd_762x54_SVD','10Rnd_762x54_SVD','10Rnd_762x54_SVD','10Rnd_762x54_SVD','10Rnd_762x54_SVD','10Rnd_762x54_SVD','10Rnd_762x54_SVD','10Rnd_762x54_SVD','10Rnd_762x54_SVD','HandGrenade_East','HandGrenade_East','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov','8Rnd_9x18_Makarov'],true] Call SetNamespace;
+}; \ No newline at end of file
diff --git a/Common/Config/Core_Loadout/Vanilla/Loadout_USMC.sqf b/Common/Config/Core_Loadout/Vanilla/Loadout_USMC.sqf
new file mode 100644
index 0000000..09046c5
--- /dev/null
+++ b/Common/Config/Core_Loadout/Vanilla/Loadout_USMC.sqf
@@ -0,0 +1,331 @@
+/* USMC Loadout */
+
+if (!isServer || local player) then {
+ if (side player == WEST) then {
+ /* Magazines. */
+ _m = ["30Rnd_556x45_Stanag"];
+ _m = _m + ["30Rnd_556x45_StanagSD"];
+ _m = _m + ["20Rnd_556x45_Stanag"];
+ _m = _m + ["30Rnd_556x45_G36"];
+ _m = _m + ["30Rnd_556x45_G36SD"];
+ _m = _m + ["100Rnd_556x45_BetaCMag"];
+ _m = _m + ["5Rnd_762x51_M24"];
+ _m = _m + ["20Rnd_762x51_DMR"];
+ _m = _m + ["10Rnd_127x99_m107"];
+ _m = _m + ["100Rnd_762x51_M240"];
+ _m = _m + ["200Rnd_556x45_M249"];
+ _m = _m + ["30Rnd_9x19_MP5"];
+ _m = _m + ["30Rnd_9x19_MP5SD"];
+ _m = _m + ["8Rnd_B_Beneli_74Slug"];
+ _m = _m + ["M136"];
+ _m = _m + ["SMAW_HEAA"];
+ _m = _m + ["SMAW_HEDP"];
+ _m = _m + ["Javelin"];
+ _m = _m + ["Stinger"];
+ _m = _m + ["Laserbatteries"];
+ _m = _m + ["15Rnd_9x19_M9"];
+ _m = _m + ["15Rnd_9x19_M9SD"];
+ _m = _m + ["7Rnd_45ACP_1911"];
+
+ WF_Logic setVariable ['magazineClasses',_m];
+
+ /* Primary. */
+ _w = ['M16A2'];
+ _w = _w + ['M16A2GL'];
+ _w = _w + ['m16a4'];
+ _w = _w + ['m16a4_acg'];
+ _w = _w + ['M16A4_GL'];
+ _w = _w + ['M16A4_ACG_GL'];
+ _w = _w + ['M24'];
+ _w = _w + ['M40A3'];
+ _w = _w + ['M240'];
+ _w = _w + ['Mk_48'];
+ _w = _w + ['M249'];
+ _w = _w + ['M4A1'];
+ _w = _w + ['M4A1_Aim'];
+ _w = _w + ['M4A1_Aim_camo'];
+ _w = _w + ['M4SPR'];
+ _w = _w + ['M4A1_RCO_GL'];
+ _w = _w + ['M4A1_AIM_SD_camo'];
+ _w = _w + ['M4A1_HWS_GL_SD_Camo'];
+ _w = _w + ['M4A1_HWS_GL'];
+ _w = _w + ['M4A1_HWS_GL_camo'];
+ _w = _w + ['MP5SD'];
+ _w = _w + ['MP5A5'];
+ _w = _w + ['G36C'];
+ _w = _w + ['G36_C_SD_eotech'];
+ _w = _w + ['G36a'];
+ _w = _w + ['G36K'];
+ _w = _w + ['MG36'];
+ _w = _w + ['DMR'];
+ _w = _w + ['M1014'];
+ _w = _w + ['m107'];
+ _w = _w + ['m8_carbine'];
+ _w = _w + ['m8_carbineGL'];
+ _w = _w + ['m8_compact'];
+ _w = _w + ['m8_sharpshooter'];
+ _w = _w + ['m8_SAW'];
+
+ WF_Logic setVariable ['primaryClasses',_w];
+
+ /* Secondary. */
+ _w = ['M136'];
+ _w = _w + ['SMAW'];
+ _w = _w + ['Javelin'];
+ _w = _w + ['Stinger'];
+ _w = _w + ['Laserdesignator'];
+
+ WF_Logic setVariable ['secondaryClasses',_w];
+
+ /* Sidearms. */
+ _w = ['Colt1911'];
+ _w = _w + ['M9'];
+ _w = _w + ['M9SD'];
+
+ WF_Logic setVariable ['sidearmClasses',_w];
+
+ /* Misc. */
+ _w = ['HandGrenade_West'];
+ _w = _w + ['HandGrenade_Stone'];
+ _w = _w + ['SmokeShell'];
+ _w = _w + ['SmokeShellRed'];
+ _w = _w + ['SmokeShellGreen'];
+ _w = _w + ['SmokeShellBlue'];
+ _w = _w + ['SmokeShellYellow'];
+ _w = _w + ['SmokeShellOrange'];
+ _w = _w + ['SmokeShellPurple'];
+ _w = _w + ['FlareWhite_M203'];
+ _w = _w + ['FlareYellow_M203'];
+ _w = _w + ['FlareGreen_M203'];
+ _w = _w + ['FlareRed_M203'];
+ _w = _w + ['1Rnd_HE_M203'];
+ _w = _w + ['1Rnd_Smoke_M203'];
+ _w = _w + ['1Rnd_SmokeRed_M203'];
+ _w = _w + ['1Rnd_SmokeGreen_M203'];
+ _w = _w + ['1Rnd_SmokeYellow_M203'];
+ _w = _w + ['Mine'];
+ _w = _w + ['PipeBomb'];
+ _w = _w + ['Binocular'];
+ _w = _w + ['NVGoggles'];
+ _w = _w + ['ItemCompass'];
+ _w = _w + ['ItemGPS'];
+ _w = _w + ['ItemMap'];
+ _w = _w + ['ItemRadio'];
+ _w = _w + ['ItemWatch'];
+
+ WF_Logic setVariable ['miscClasses',_w];
+
+ //--- Templates.
+ _items = ['ItemCompass','ItemGPS','ItemMap','ItemRadio','ItemWatch'];
+
+ _d = [getText(configFile >> 'CfgWeapons' >> 'm16a4' >> 'displayName') + '/' + getText(configFile >> 'CfgWeapons' >> 'Colt1911' >> 'displayName')];
+ _p = [getText(configFile >> 'CfgWeapons' >> 'm16a4' >> 'picture')];
+ _t = [['m16a4','Colt1911']];
+ _m = [['30Rnd_556x45_Stanag','30Rnd_556x45_Stanag','30Rnd_556x45_Stanag','30Rnd_556x45_Stanag','30Rnd_556x45_Stanag','30Rnd_556x45_Stanag','30Rnd_556x45_Stanag','30Rnd_556x45_Stanag',
+ 'HandGrenade_West','HandGrenade_West','SmokeShellBlue','SmokeShellBlue','7Rnd_45ACP_1911','7Rnd_45ACP_1911','7Rnd_45ACP_1911','7Rnd_45ACP_1911','7Rnd_45ACP_1911','7Rnd_45ACP_1911',
+ '7Rnd_45ACP_1911','7Rnd_45ACP_1911']];
+ _s = [['Binocular']];
+ _i = [_items];
+ _l = [0];
+ _b = [true];
+
+ _d = _d + [getText(configFile >> 'CfgWeapons' >> 'M16A4_GL' >> 'displayName')];
+ _p = _p + [getText(configFile >> 'CfgWeapons' >> 'M16A4_GL' >> 'picture')];
+ _t = _t + [['M16A4_GL']];
+ _m = _m + [['30Rnd_556x45_Stanag','30Rnd_556x45_Stanag','30Rnd_556x45_Stanag','30Rnd_556x45_Stanag','30Rnd_556x45_Stanag','30Rnd_556x45_Stanag','30Rnd_556x45_Stanag','30Rnd_556x45_Stanag',
+ '30Rnd_556x45_Stanag','30Rnd_556x45_Stanag','HandGrenade_West','HandGrenade_West','1Rnd_HE_M203','1Rnd_HE_M203','1Rnd_HE_M203','1Rnd_HE_M203','1Rnd_HE_M203','1Rnd_HE_M203',
+ '1Rnd_HE_M203','1Rnd_HE_M203']];
+ _s = _s + [['Binocular']];
+ _i = _i + [_items];
+ _l = _l + [0];
+ _b = _b + [true];
+
+ _d = _d + [getText(configFile >> 'CfgWeapons' >> 'G36C' >> 'displayName') + '/' + getText(configFile >> 'CfgWeapons' >> 'M136' >> 'displayName')];
+ _p = _p + [getText(configFile >> 'CfgWeapons' >> 'G36C' >> 'picture')];
+ _t = _t + [['G36C','M136']];
+ _m = _m + [['30Rnd_556x45_G36','30Rnd_556x45_G36','30Rnd_556x45_G36','30Rnd_556x45_G36','30Rnd_556x45_G36','30Rnd_556x45_G36','M136']];
+ _s = _s + [['Binocular']];
+ _i = _i + [_items];
+ _l = _l + [0];
+ _b = _b + [true];
+
+ _d = _d + [getText(configFile >> 'CfgWeapons' >> 'M4A1_HWS_GL_SD_Camo' >> 'displayName') + '/' + getText(configFile >> 'CfgWeapons' >> 'SMAW' >> 'displayName')];
+ _p = _p + [getText(configFile >> 'CfgWeapons' >> 'M4A1_HWS_GL_SD_Camo' >> 'picture')];
+ _t = _t + [['M4A1_HWS_GL_SD_Camo','SMAW']];
+ _m = _m + [['30Rnd_556x45_StanagSD','30Rnd_556x45_StanagSD','30Rnd_556x45_StanagSD','30Rnd_556x45_StanagSD','30Rnd_556x45_StanagSD','30Rnd_556x45_StanagSD','SMAW_HEAA',
+ 'SMAW_HEAA','SMAW_HEDP','1Rnd_HE_M203','1Rnd_HE_M203','1Rnd_HE_M203','1Rnd_HE_M203','1Rnd_HE_M203','1Rnd_HE_M203','1Rnd_HE_M203','1Rnd_HE_M203']];
+ _s = _s + [['Binocular','NVGoggles']];
+ _i = _i + [_items];
+ _l = _l + [3];
+ _b = _b + [false];
+
+ _d = _d + [getText(configFile >> 'CfgWeapons' >> 'm8_carbine' >> 'displayName') + '/' + getText(configFile >> 'CfgWeapons' >> 'SMAW' >> 'displayName') + '/' + getText(configFile >> 'CfgWeapons' >> 'M9' >> 'displayName')];
+ _p = _p + [getText(configFile >> 'CfgWeapons' >> 'm8_carbine' >> 'picture')];
+ _t = _t + [['m8_carbine','SMAW','M9']];
+ _m = _m + [['30Rnd_556x45_G36','30Rnd_556x45_G36','30Rnd_556x45_G36','30Rnd_556x45_G36','30Rnd_556x45_G36','30Rnd_556x45_G36','SMAW_HEAA','SMAW_HEAA','SMAW_HEDP',
+ '15Rnd_9x19_M9','15Rnd_9x19_M9','15Rnd_9x19_M9','15Rnd_9x19_M9','15Rnd_9x19_M9','15Rnd_9x19_M9','15Rnd_9x19_M9','15Rnd_9x19_M9']];
+ _s = _s + [['Binocular','NVGoggles']];
+ _i = _i + [_items];
+ _l = _l + [2];
+ _b = _b + [false];
+
+ _d = _d + [getText(configFile >> 'CfgWeapons' >> 'M4A1_Aim' >> 'displayName') + '/' + getText(configFile >> 'CfgWeapons' >> 'Javelin' >> 'displayName') + '/' + getText(configFile >> 'CfgWeapons' >> 'Colt1911' >> 'displayName')];
+ _p = _p + [getText(configFile >> 'CfgWeapons' >> 'M4A1_Aim' >> 'picture')];
+ _t = _t + [['M4A1_Aim','Javelin','Colt1911']];
+ _m = _m + [['30Rnd_556x45_Stanag','30Rnd_556x45_Stanag','30Rnd_556x45_Stanag','30Rnd_556x45_Stanag','30Rnd_556x45_Stanag','30Rnd_556x45_Stanag','Javelin',
+ '7Rnd_45ACP_1911','7Rnd_45ACP_1911','7Rnd_45ACP_1911','7Rnd_45ACP_1911','7Rnd_45ACP_1911','7Rnd_45ACP_1911','7Rnd_45ACP_1911','7Rnd_45ACP_1911']];
+ _s = _s + [['Binocular','NVGoggles']];
+ _i = _i + [_items];
+ _l = _l + [3];
+ _b = _b + [false];
+
+ _d = _d + [getText(configFile >> 'CfgWeapons' >> 'M16A2' >> 'displayName') + '/' + getText(configFile >> 'CfgWeapons' >> 'Stinger' >> 'displayName') + '/' + getText(configFile >> 'CfgWeapons' >> 'M9' >> 'displayName')];
+ _p = _p + [getText(configFile >> 'CfgWeapons' >> 'M16A2' >> 'picture')];
+ _t = _t + [['M16A2','Stinger','M9']];
+ _m = _m + [['30Rnd_556x45_Stanag','30Rnd_556x45_Stanag','30Rnd_556x45_Stanag','30Rnd_556x45_Stanag','30Rnd_556x45_Stanag','30Rnd_556x45_Stanag','Stinger',
+ '15Rnd_9x19_M9','15Rnd_9x19_M9','15Rnd_9x19_M9','15Rnd_9x19_M9','15Rnd_9x19_M9','15Rnd_9x19_M9','15Rnd_9x19_M9','15Rnd_9x19_M9']];
+ _s = _s + [['Binocular','NVGoggles']];
+ _i = _i + [_items];
+ _l = _l + [2];
+ _b = _b + [false];
+
+ _d = _d + [getText(configFile >> 'CfgWeapons' >> 'M1014' >> 'displayName') + '/' + getText(configFile >> 'CfgWeapons' >> 'M9' >> 'displayName') + '/' + getText(configFile >> 'CfgMagazines' >> 'Mine' >> 'displayName')];
+ _p = _p + [getText(configFile >> 'CfgWeapons' >> 'M1014' >> 'picture')];
+ _t = _t + [['M1014','M9']];
+ _m = _m + [['8Rnd_B_Beneli_74Slug','8Rnd_B_Beneli_74Slug','8Rnd_B_Beneli_74Slug','8Rnd_B_Beneli_74Slug','8Rnd_B_Beneli_74Slug','8Rnd_B_Beneli_74Slug','Mine','Mine','Mine',
+ '15Rnd_9x19_M9','15Rnd_9x19_M9','15Rnd_9x19_M9','15Rnd_9x19_M9','15Rnd_9x19_M9','15Rnd_9x19_M9','15Rnd_9x19_M9','15Rnd_9x19_M9']];
+ _s = _s + [['Binocular']];
+ _i = _i + [_items];
+ _l = _l + [0];
+ _b = _b + [true];
+
+ _d = _d + [getText(configFile >> 'CfgWeapons' >> 'MP5SD' >> 'displayName') + '/' + getText(configFile >> 'CfgWeapons' >> 'M9SD' >> 'displayName') + '/' + getText(configFile >> 'CfgMagazines' >> 'PipeBomb' >> 'displayName')];
+ _p = _p + [getText(configFile >> 'CfgWeapons' >> 'MP5SD' >> 'picture')];
+ _t = _t + [['MP5SD','M9SD']];
+ _m = _m + [['30Rnd_9x19_MP5SD','30Rnd_9x19_MP5SD','30Rnd_9x19_MP5SD','30Rnd_9x19_MP5SD','30Rnd_9x19_MP5SD','30Rnd_9x19_MP5SD','PipeBomb','PipeBomb','PipeBomb',
+ '15Rnd_9x19_M9SD','15Rnd_9x19_M9SD','15Rnd_9x19_M9SD','15Rnd_9x19_M9SD','15Rnd_9x19_M9SD','15Rnd_9x19_M9SD','15Rnd_9x19_M9SD','15Rnd_9x19_M9SD']];
+ _s = _s + [['Binocular','NVGoggles']];
+ _i = _i + [_items];
+ _l = _l + [1];
+ _b = _b + [true];
+
+ _d = _d + [getText(configFile >> 'CfgWeapons' >> 'M240' >> 'displayName') + '/' + getText(configFile >> 'CfgWeapons' >> 'Colt1911' >> 'displayName')];
+ _p = _p + [getText(configFile >> 'CfgWeapons' >> 'M240' >> 'picture')];
+ _t = _t + [['M240','Colt1911']];
+ _m = _m + [['100Rnd_762x51_M240','100Rnd_762x51_M240','100Rnd_762x51_M240','100Rnd_762x51_M240','100Rnd_762x51_M240','SmokeShellRed','SmokeShellRed','7Rnd_45ACP_1911',
+ '7Rnd_45ACP_1911','7Rnd_45ACP_1911','7Rnd_45ACP_1911','7Rnd_45ACP_1911','7Rnd_45ACP_1911','7Rnd_45ACP_1911','7Rnd_45ACP_1911']];
+ _s = _s + [['Binocular']];
+ _i = _i + [_items];
+ _l = _l + [0];
+ _b = _b + [true];
+
+ _d = _d + [getText(configFile >> 'CfgWeapons' >> 'M249' >> 'displayName') + '/' + getText(configFile >> 'CfgWeapons' >> 'Colt1911' >> 'displayName')];
+ _p = _p + [getText(configFile >> 'CfgWeapons' >> 'M249' >> 'picture')];
+ _t = _t + [['M249','Colt1911']];
+ _m = _m + [['200Rnd_556x45_M249','200Rnd_556x45_M249','200Rnd_556x45_M249','200Rnd_556x45_M249','200Rnd_556x45_M249','SmokeShellRed','SmokeShellRed','7Rnd_45ACP_1911',
+ '7Rnd_45ACP_1911','7Rnd_45ACP_1911','7Rnd_45ACP_1911','7Rnd_45ACP_1911','7Rnd_45ACP_1911','7Rnd_45ACP_1911','7Rnd_45ACP_1911']];
+ _s = _s + [['Binocular','NVGoggles']];
+ _i = _i + [_items];
+ _l = _l + [2];
+ _b = _b + [true];
+
+ _d = _d + [getText(configFile >> 'CfgWeapons' >> 'DMR' >> 'displayName') + '/' + getText(configFile >> 'CfgWeapons' >> 'M9SD' >> 'displayName')];
+ _p = _p + [getText(configFile >> 'CfgWeapons' >> 'DMR' >> 'picture')];
+ _t = _t + [['DMR','M9SD']];
+ _m = _m + [['20Rnd_762x51_DMR','20Rnd_762x51_DMR','20Rnd_762x51_DMR','20Rnd_762x51_DMR','20Rnd_762x51_DMR','20Rnd_762x51_DMR','20Rnd_762x51_DMR','20Rnd_762x51_DMR',
+ '20Rnd_762x51_DMR','20Rnd_762x51_DMR','HandGrenade_West','HandGrenade_West','15Rnd_9x19_M9SD','15Rnd_9x19_M9SD','15Rnd_9x19_M9SD','15Rnd_9x19_M9SD','15Rnd_9x19_M9SD',
+ '15Rnd_9x19_M9SD','15Rnd_9x19_M9SD','15Rnd_9x19_M9SD']];
+ _s = _s + [['Binocular','NVGoggles']];
+ _i = _i + [_items];
+ _l = _l + [2];
+ _b = _b + [false];
+
+ _d = _d + [getText(configFile >> 'CfgWeapons' >> 'M40A3' >> 'displayName') + '/' + getText(configFile >> 'CfgWeapons' >> 'Laserdesignator' >> 'displayName') + '/' + getText(configFile >> 'CfgWeapons' >> 'M9SD' >> 'displayName')];
+ _p = _p + [getText(configFile >> 'CfgWeapons' >> 'M40A3' >> 'picture')];
+ _t = _t + [['M40A3','Laserdesignator','M9SD']];
+ _m = _m + [['5Rnd_762x51_M24','5Rnd_762x51_M24','5Rnd_762x51_M24','5Rnd_762x51_M24','5Rnd_762x51_M24','5Rnd_762x51_M24','5Rnd_762x51_M24','5Rnd_762x51_M24',
+ '5Rnd_762x51_M24','5Rnd_762x51_M24','HandGrenade_West','Laserbatteries','15Rnd_9x19_M9SD','15Rnd_9x19_M9SD','15Rnd_9x19_M9SD','15Rnd_9x19_M9SD','15Rnd_9x19_M9SD',
+ '15Rnd_9x19_M9SD','15Rnd_9x19_M9SD','15Rnd_9x19_M9SD']];
+ _s = _s + [['Binocular','NVGoggles']];
+ _i = _i + [_items];
+ _l = _l + [2];
+ _b = _b + [false];
+
+ _d = _d + [getText(configFile >> 'CfgWeapons' >> 'm107' >> 'displayName') + '/' + getText(configFile >> 'CfgWeapons' >> 'M9SD' >> 'displayName')];
+ _p = _p + [getText(configFile >> 'CfgWeapons' >> 'm107' >> 'picture')];
+ _t = _t + [['m107','M9SD']];
+ _m = _m + [['10Rnd_127x99_m107','10Rnd_127x99_m107','10Rnd_127x99_m107','10Rnd_127x99_m107','10Rnd_127x99_m107','10Rnd_127x99_m107','10Rnd_127x99_m107','10Rnd_127x99_m107',
+ '10Rnd_127x99_m107','10Rnd_127x99_m107','HandGrenade_West','HandGrenade_West','15Rnd_9x19_M9SD','15Rnd_9x19_M9SD','15Rnd_9x19_M9SD','15Rnd_9x19_M9SD','15Rnd_9x19_M9SD',
+ '15Rnd_9x19_M9SD','15Rnd_9x19_M9SD','15Rnd_9x19_M9SD']];
+ _s = _s + [['Binocular','NVGoggles']];
+ _i = _i + [_items];
+ _l = _l + [3];
+ _b = _b + [false];
+
+ _c = [];
+ _totalTemplates = count _d;
+
+ for [{_count = 0},{_count < _totalTemplates},{_count = _count + 1}] do {
+ _cost = 0;
+ {
+ _get = (_x+"_W") Call GetNamespace;
+ if (isNil '_get') then {
+ _get = _x Call GetNamespace;
+ };
+ if !(isNil '_get') then {_cost = _cost + (_get select QUERYGEARCOST)};
+ } forEach (_t select _count);
+
+ {
+ _get = _x Call GetNamespace;
+ if !(isNil '_get') then {_cost = _cost + (_get select QUERYGEARCOST)};
+ } forEach ((_m select _count) + (_s select _count) + (_i select _count));
+
+ _c = _c + [_cost];
+ };
+
+ WF_Logic setVariable ['templateClasses',_t];
+ WF_Logic setVariable ['templateNames',_d];
+ WF_Logic setVariable ['templateCosts',_c];
+ WF_Logic setVariable ['templatePictures',_p];
+ WF_Logic setVariable ['templateMags',_m];
+ WF_Logic setVariable ['templateItems',_i];
+ WF_Logic setVariable ['templateSpecs',_s];
+ WF_Logic setVariable ['templateUpgrades',_l];
+ WF_Logic setVariable ['templateAllowed',_b];
+ };
+};
+
+['WFBE_WESTDEFAULTWEAPONS',['M16A2','ItemCompass','ItemMap','ItemWatch','ItemRadio'],true] Call SetNamespace;
+['WFBE_WESTDEFAULTAMMO',['30Rnd_556x45_Stanag','30Rnd_556x45_Stanag','30Rnd_556x45_Stanag','30Rnd_556x45_Stanag','30Rnd_556x45_Stanag','30Rnd_556x45_Stanag','HandGrenade_West','HandGrenade_West'],true] Call SetNamespace;
+
+//--- AI Leaders Loadouts.
+if (isServer) then {
+ //--- No Upgrade.
+ ['WFBE_WESTLEADERWEAPONS01',['m16a4','M136','Colt1911','Binocular','ItemRadio','ItemMap'],true] Call SetNamespace;
+ ['WFBE_WESTLEADERAMMO01',['30Rnd_556x45_Stanag','30Rnd_556x45_Stanag','30Rnd_556x45_Stanag','30Rnd_556x45_Stanag','30Rnd_556x45_Stanag','30Rnd_556x45_Stanag','M136','7Rnd_45ACP_1911','7Rnd_45ACP_1911','7Rnd_45ACP_1911','7Rnd_45ACP_1911'],true] Call SetNamespace;
+ ['WFBE_WESTLEADERWEAPONS02',['G36C','M136','Colt1911','Binocular','ItemRadio','ItemMap'],true] Call SetNamespace;
+ ['WFBE_WESTLEADERAMMO02',['30Rnd_556x45_G36','30Rnd_556x45_G36','30Rnd_556x45_G36','30Rnd_556x45_G36','30Rnd_556x45_G36','30Rnd_556x45_G36','M136','7Rnd_45ACP_1911','7Rnd_45ACP_1911','7Rnd_45ACP_1911','7Rnd_45ACP_1911'],true] Call SetNamespace;
+ ['WFBE_WESTLEADERWEAPONS03',['M240','Colt1911','Binocular','ItemRadio','ItemMap'],true] Call SetNamespace;;
+ ['WFBE_WESTLEADERAMMO03',['100Rnd_762x51_M240','100Rnd_762x51_M240','100Rnd_762x51_M240','100Rnd_762x51_M240','100Rnd_762x51_M240','HandGrenade_West','HandGrenade_West','7Rnd_45ACP_1911','7Rnd_45ACP_1911','7Rnd_45ACP_1911','7Rnd_45ACP_1911'],true] Call SetNamespace;
+ //--- Upgrade 1.
+ ['WFBE_WESTLEADERWEAPONS11',['m16a4_acg','M136','Colt1911','Binocular','NVGoggles','ItemRadio','ItemMap'],true] Call SetNamespace;
+ ['WFBE_WESTLEADERAMMO11',['30Rnd_556x45_Stanag','30Rnd_556x45_Stanag','30Rnd_556x45_Stanag','30Rnd_556x45_Stanag','30Rnd_556x45_Stanag','30Rnd_556x45_Stanag','M136','7Rnd_45ACP_1911','7Rnd_45ACP_1911','7Rnd_45ACP_1911','7Rnd_45ACP_1911'],true] Call SetNamespace;
+ ['WFBE_WESTLEADERWEAPONS12',['G36K','M136','Colt1911','Binocular','NVGoggles','ItemRadio','ItemMap'],true] Call SetNamespace;
+ ['WFBE_WESTLEADERAMMO12',['30Rnd_556x45_G36','30Rnd_556x45_G36','30Rnd_556x45_G36','30Rnd_556x45_G36','30Rnd_556x45_G36','30Rnd_556x45_G36','M136','7Rnd_45ACP_1911','7Rnd_45ACP_1911','7Rnd_45ACP_1911','7Rnd_45ACP_1911'],true] Call SetNamespace;
+ ['WFBE_WESTLEADERWEAPONS13',['M4SPR','M9SD','Binocular','NVGoggles','ItemRadio','ItemMap'],true] Call SetNamespace;
+ ['WFBE_WESTLEADERAMMO13',['20Rnd_556x45_Stanag','20Rnd_556x45_Stanag','20Rnd_556x45_Stanag','20Rnd_556x45_Stanag','20Rnd_556x45_Stanag','20Rnd_556x45_Stanag','20Rnd_556x45_Stanag','20Rnd_556x45_Stanag','20Rnd_556x45_Stanag','20Rnd_556x45_Stanag','HandGrenade_West','HandGrenade_West','15Rnd_9x19_M9SD','15Rnd_9x19_M9SD','15Rnd_9x19_M9SD','15Rnd_9x19_M9SD'],true] Call SetNamespace;
+ //--- Upgrade 2.
+ ['WFBE_WESTLEADERWEAPONS21',['M4A1_Aim_camo','SMAW','Colt1911','Binocular','NVGoggles','ItemRadio','ItemMap'],true] Call SetNamespace;
+ ['WFBE_WESTLEADERAMMO21',['30Rnd_556x45_Stanag','30Rnd_556x45_Stanag','30Rnd_556x45_Stanag','30Rnd_556x45_Stanag','30Rnd_556x45_Stanag','30Rnd_556x45_Stanag','SMAW_HEAA','SMAW_HEAA','SMAW_HEDP','7Rnd_45ACP_1911','7Rnd_45ACP_1911','7Rnd_45ACP_1911','7Rnd_45ACP_1911'],true] Call SetNamespace;
+ ['WFBE_WESTLEADERWEAPONS22',['m8_carbine','SMAW','Colt1911','Binocular','NVGoggles','ItemRadio','ItemMap'],true] Call SetNamespace;
+ ['WFBE_WESTLEADERAMMO22',['30Rnd_556x45_G36','30Rnd_556x45_G36','30Rnd_556x45_G36','30Rnd_556x45_G36','30Rnd_556x45_G36','30Rnd_556x45_G36','SMAW_HEAA','SMAW_HEAA','SMAW_HEDP','7Rnd_45ACP_1911','7Rnd_45ACP_1911','7Rnd_45ACP_1911','7Rnd_45ACP_1911'],true] Call SetNamespace;
+ ['WFBE_WESTLEADERWEAPONS23',['MG36','Colt1911','Binocular','NVGoggles','ItemRadio','ItemMap'],true] Call SetNamespace;
+ ['WFBE_WESTLEADERAMMO23',['100Rnd_556x45_BetaCMag','100Rnd_556x45_BetaCMag','100Rnd_556x45_BetaCMag','100Rnd_556x45_BetaCMag','100Rnd_556x45_BetaCMag','HandGrenade_West','HandGrenade_West','7Rnd_45ACP_1911','7Rnd_45ACP_1911','7Rnd_45ACP_1911','7Rnd_45ACP_1911'],true] Call SetNamespace;
+ //--- Upgrade 3.
+ ['WFBE_WESTLEADERWEAPONS31',['M4A1_HWS_GL','SMAW','Binocular','NVGoggles','ItemRadio','ItemMap'],true] Call SetNamespace;
+ ['WFBE_WESTLEADERAMMO31',['30Rnd_556x45_Stanag','30Rnd_556x45_Stanag','30Rnd_556x45_Stanag','30Rnd_556x45_Stanag','30Rnd_556x45_Stanag','30Rnd_556x45_Stanag','SMAW_HEAA','SMAW_HEAA','SMAW_HEDP','1Rnd_HE_M203','1Rnd_HE_M203','1Rnd_HE_M203','1Rnd_HE_M203'],true] Call SetNamespace;
+ ['WFBE_WESTLEADERWEAPONS32',['m8_compact','Javelin','Colt1911','Binocular','NVGoggles','ItemRadio','ItemMap'],true] Call SetNamespace;
+ ['WFBE_WESTLEADERAMMO32',['30Rnd_556x45_G36','30Rnd_556x45_G36','30Rnd_556x45_G36','30Rnd_556x45_G36','30Rnd_556x45_G36','30Rnd_556x45_G36','Javelin','7Rnd_45ACP_1911','7Rnd_45ACP_1911','7Rnd_45ACP_1911','7Rnd_45ACP_1911'],true] Call SetNamespace;
+ ['WFBE_WESTLEADERWEAPONS33',['Mk_48','Colt1911','Binocular','NVGoggles','ItemRadio','ItemMap'],true] Call SetNamespace;
+ ['WFBE_WESTLEADERAMMO33',['100Rnd_762x51_M240','100Rnd_762x51_M240','100Rnd_762x51_M240','100Rnd_762x51_M240','100Rnd_762x51_M240','HandGrenade_West','HandGrenade_West','7Rnd_45ACP_1911','7Rnd_45ACP_1911','7Rnd_45ACP_1911','7Rnd_45ACP_1911'],true] Call SetNamespace;
+}; \ No newline at end of file
diff --git a/Common/Config/Core_Occupation/Occupation_CDF.sqf b/Common/Config/Core_Occupation/Occupation_CDF.sqf
new file mode 100644
index 0000000..eb3d2ad
--- /dev/null
+++ b/Common/Config/Core_Occupation/Occupation_CDF.sqf
@@ -0,0 +1,188 @@
+Private ["_n","_u"];
+
+_n = ["SmallTeam1"];
+_u = ["CDF_Soldier_TL"];
+_u = _u + ["CDF_Soldier_Medic"];
+_u = _u + ["CDF_Soldier"];
+_u = _u + ["CDF_Soldier_AR"];
+_u = _u + ["CDF_Soldier"];
+[Format["WFBE_WEST%1UNITS",_n select (count _n - 1)],_u,true] Call SetNamespace;
+
+_n = _n + ["SmallTeam2"];
+_u = ["CDF_Soldier_TL"];
+_u = _u + ["CDF_Soldier_AR"];
+_u = _u + ["CDF_Soldier_RPG"];
+_u = _u + ["CDF_Soldier_Medic"];
+_u = _u + ["CDF_Soldier"];
+[Format["WFBE_WEST%1UNITS",_n select (count _n - 1)],_u,true] Call SetNamespace;
+
+_n = _n + ["SmallTeam3"];
+_u = ["CDF_Soldier_TL"];
+_u = _u + ["CDF_Soldier_MG"];
+_u = _u + ["CDF_Soldier_AR"];
+_u = _u + ["CDF_Soldier_Engineer"];
+_u = _u + ["CDF_Soldier_RPG"];
+_u = _u + ["CDF_Soldier"];
+[Format["WFBE_WEST%1UNITS",_n select (count _n - 1)],_u,true] Call SetNamespace;
+
+_n = _n + ["SmallVehTeam1"];
+_u = ["CDF_Soldier_TL"];
+_u = _u + ["BRDM2_ATGM_CDF"];
+_u = _u + ["BRDM2_CDF"];
+_u = _u + ["UAZ_MG_CDF"];
+[Format["WFBE_WEST%1UNITS",_n select (count _n - 1)],_u,true] Call SetNamespace;
+
+_n = _n + ["SmallVehTeam2"];
+_u = ["CDF_Soldier_TL"];
+_u = _u + ["BRDM2_ATGM_CDF"];
+_u = _u + ["Ural_ZU23_CDF"];
+[Format["WFBE_WEST%1UNITS",_n select (count _n - 1)],_u,true] Call SetNamespace;
+
+_n = _n + ["SmallVehTeam3"];
+_u = ["CDF_Soldier_TL"];
+_u = _u + ["UAZ_AGS30_CDF"];
+_u = _u + ["UAZ_MG_CDF"];
+_u = _u + ["Ural_ZU23_CDF"];
+[Format["WFBE_WEST%1UNITS",_n select (count _n - 1)],_u,true] Call SetNamespace;
+
+_n = _n + ["MediumTeam1"];
+_u = ["CDF_Soldier_TL"];
+_u = _u + ["CDF_Soldier_AR"];
+_u = _u + ["CDF_Soldier_Medic"];
+_u = _u + ["CDF_Soldier_Strela"];
+_u = _u + ["CDF_Soldier_Strela"];
+[Format["WFBE_WEST%1UNITS",_n select (count _n - 1)],_u,true] Call SetNamespace;
+
+_n = _n + ["MediumTeam2"];
+_u = ["CDF_Soldier_TL"];
+_u = _u + ["CDF_Soldier_Strela"];
+_u = _u + ["CDF_Soldier_Strela"];
+_u = _u + ["CDF_Soldier_RPG"];
+_u = _u + ["CDF_Soldier_RPG"];
+_u = _u + ["CDF_Soldier_RPG"];
+_u = _u + ["CDF_Soldier_AR"];
+_u = _u + ["CDF_Soldier_MG"];
+[Format["WFBE_WEST%1UNITS",_n select (count _n - 1)],_u,true] Call SetNamespace;
+
+_n = _n + ["MediumTeam3"];
+_u = ["CDF_Soldier_Sniper"];
+_u = _u + ["CDF_Soldier_Spotter"];
+_u = _u + ["CDF_Soldier_Spotter"];
+_u = _u + ["CDF_Soldier_Marksman"];
+_u = _u + ["CDF_Soldier_Marksman"];
+[Format["WFBE_WEST%1UNITS",_n select (count _n - 1)],_u,true] Call SetNamespace;
+
+_n = _n + ["MediumVehTeam1"];
+_u = ["CDF_Soldier_TL"];
+_u = _u + ["Ural_ZU23_CDF"];
+_u = _u + ["BMP2_CDF"];
+_u = _u + ["ZSU_CDF"];
+[Format["WFBE_WEST%1UNITS",_n select (count _n - 1)],_u,true] Call SetNamespace;
+
+_n = _n + ["MediumVehTeam2"];
+_u = ["CDF_Soldier_TL"];
+_u = _u + ["T72_CDF"];
+_u = _u + ["T72_CDF"];
+_u = _u + ["BMP2_Ambul_CDF"];
+[Format["WFBE_WEST%1UNITS",_n select (count _n - 1)],_u,true] Call SetNamespace;
+
+_n = _n + ["MediumVehTeam3"];
+_u = ["CDF_Soldier_TL"];
+_u = _u + ["ZSU_CDF"];
+_u = _u + ["BMP2_CDF"];
+_u = _u + ["T72_CDF"];
+[Format["WFBE_WEST%1UNITS",_n select (count _n - 1)],_u,true] Call SetNamespace;
+
+_n = _n + ["LargeTeam1"];
+_u = ["CDF_Soldier_RPG"];
+_u = _u + ["CDF_Soldier_RPG"];
+_u = _u + ["CDF_Soldier_RPG"];
+_u = _u + ["CDF_Soldier_RPG"];
+_u = _u + ["CDF_Soldier_RPG"];
+_u = _u + ["CDF_Soldier_RPG"];
+_u = _u + ["CDF_Soldier_Medic"];
+_u = _u + ["CDF_Soldier"];
+_u = _u + ["CDF_Soldier_Strela"];
+_u = _u + ["CDF_Soldier_Strela"];
+_u = _u + ["CDF_Soldier_Strela"];
+[Format["WFBE_WEST%1UNITS",_n select (count _n - 1)],_u,true] Call SetNamespace;
+
+_n = _n + ["LargeTeam2"];
+_u = ["CDF_Soldier_TL"];
+_u = _u + ["CDF_Soldier_Strela"];
+_u = _u + ["CDF_Soldier_Medic"];
+_u = _u + ["CDF_Soldier_GL"];
+_u = _u + ["CDF_Soldier"];
+_u = _u + ["CDF_Soldier"];
+_u = _u + ["CDF_Soldier_Sniper"];
+_u = _u + ["CDF_Soldier_RPG"];
+_u = _u + ["CDF_Soldier_AR"];
+_u = _u + ["CDF_Soldier_RPG"];
+[Format["WFBE_WEST%1UNITS",_n select (count _n - 1)],_u,true] Call SetNamespace;
+
+_n = _n + ["LargeTeam3"];
+_u = ["CDF_Soldier_TL"];
+_u = _u + ["CDF_Soldier_Strela"];
+_u = _u + ["CDF_Soldier_Strela"];
+_u = _u + ["CDF_Soldier_Medic"];
+_u = _u + ["CDF_Soldier_GL"];
+_u = _u + ["CDF_Soldier_Sniper"];
+_u = _u + ["CDF_Soldier_RPG"];
+_u = _u + ["CDF_Soldier_MG"];
+_u = _u + ["CDF_Soldier_Engineer"];
+_u = _u + ["CDF_Soldier_AR"];
+_u = _u + ["CDF_Soldier_RPG"];
+[Format["WFBE_WEST%1UNITS",_n select (count _n - 1)],_u,true] Call SetNamespace;
+
+_n = _n + ["LargeVehTeam1"];
+_u = ["CDF_Soldier_TL"];
+_u = _u + ["T72_CDF"];
+_u = _u + ["T72_CDF"];
+_u = _u + ["T72_CDF"];
+_u = _u + ["T72_CDF"];
+[Format["WFBE_WEST%1UNITS",_n select (count _n - 1)],_u,true] Call SetNamespace;
+
+_n = _n + ["LargeVehTeam2"];
+_u = ["CDF_Soldier_TL"];
+_u = _u + ["T72_CDF"];
+_u = _u + ["T72_CDF"];
+_u = _u + ["ZSU_CDF"];
+_u = _u + ["BMP2_CDF"];
+_u = _u + ["T72_CDF"];
+[Format["WFBE_WEST%1UNITS",_n select (count _n - 1)],_u,true] Call SetNamespace;
+
+_n = _n + ["LargeVehTeam3"];
+_u = ["CDF_Soldier_TL"];
+_u = _u + ["T72_CDF"];
+_u = _u + ["T72_CDF"];
+_u = _u + ["T72_CDF"];
+_u = _u + ["ZSU_CDF"];
+_u = _u + ["GRAD_CDF"];
+[Format["WFBE_WEST%1UNITS",_n select (count _n - 1)],_u,true] Call SetNamespace;
+
+//--- AA Units used by towns occupation in case of 'air assault' only.
+_n = _n + ["SmallAATeam"];
+_u = ["CDF_Soldier_TL"];
+_u = _u + ["CDF_Soldier_Strela"];
+_u = _u + ["CDF_Soldier_Strela"];
+_u = _u + ["CDF_Soldier_Strela"];
+[Format["WFBE_WEST%1UNITS",_n select (count _n - 1)],_u,true] Call SetNamespace;
+
+_n = _n + ["MediumAATeam"];
+_u = ["CDF_Soldier_TL"];
+_u = _u + ["CDF_Soldier_Strela"];
+_u = _u + ["CDF_Soldier_Strela"];
+_u = _u + ["CDF_Soldier_Strela"];
+_u = _u + ["ZSU_CDF"];
+[Format["WFBE_WEST%1UNITS",_n select (count _n - 1)],_u,true] Call SetNamespace;
+
+_n = _n + ["LargeAATeam"];
+_u = ["CDF_Soldier_TL"];
+_u = _u + ["CDF_Soldier_Strela"];
+_u = _u + ["CDF_Soldier_Strela"];
+_u = _u + ["ZSU_CDF"];
+_u = _u + ["ZSU_CDF"];
+_u = _u + ["BMP2_CDF"];
+[Format["WFBE_WEST%1UNITS",_n select (count _n - 1)],_u,true] Call SetNamespace;
+
+diag_log Format ["[WFBE (INIT)][frameno:%1 | ticktime:%2] Occupation_CDF: Initialization - [Done]",diag_frameno,diag_tickTime]; \ No newline at end of file
diff --git a/Common/Config/Core_Occupation/Occupation_INS.sqf b/Common/Config/Core_Occupation/Occupation_INS.sqf
new file mode 100644
index 0000000..3a09496
--- /dev/null
+++ b/Common/Config/Core_Occupation/Occupation_INS.sqf
@@ -0,0 +1,188 @@
+Private ["_n","_u"];
+
+_n = ["SmallTeam1"];
+_u = ["Ins_Soldier_CO"];
+_u = _u + ["Ins_Soldier_MG"];
+_u = _u + ["Ins_Soldier_AT"];
+_u = _u + ["Ins_Soldier_1"];
+_u = _u + ["Ins_Soldier_2"];
+[Format["WFBE_EAST%1UNITS",_n select (count _n - 1)],_u,true] Call SetNamespace;
+
+_n = _n + ["SmallTeam2"];
+_u = ["Ins_Soldier_CO"];
+_u = _u + ["Ins_Soldier_AT"];
+_u = _u + ["Ins_Soldier_Sniper"];
+_u = _u + ["Ins_Soldier_AR"];
+_u = _u + ["Ins_Soldier_GL"];
+[Format["WFBE_EAST%1UNITS",_n select (count _n - 1)],_u,true] Call SetNamespace;
+
+_n = _n + ["SmallTeam3"];
+_u = ["Ins_Soldier_CO"];
+_u = _u + ["Ins_Soldier_MG"];
+_u = _u + ["Ins_Soldier_MG"];
+_u = _u + ["Ins_Soldier_GL"];
+_u = _u + ["Ins_Soldier_AT"];
+_u = _u + ["Ins_Soldier_AT"];
+[Format["WFBE_EAST%1UNITS",_n select (count _n - 1)],_u,true] Call SetNamespace;
+
+_n = _n + ["SmallVehTeam1"];
+_u = ["Ins_Soldier_CO"];
+_u = _u + ["BRDM2_INS"];
+_u = _u + ["BRDM2_ATGM_INS"];
+_u = _u + ["UAZ_MG_INS"];
+[Format["WFBE_EAST%1UNITS",_n select (count _n - 1)],_u,true] Call SetNamespace;
+
+_n = _n + ["SmallVehTeam2"];
+_u = ["Ins_Soldier_CO"];
+_u = _u + ["Ural_ZU23_INS"];
+_u = _u + ["BRDM2_ATGM_INS"];
+[Format["WFBE_EAST%1UNITS",_n select (count _n - 1)],_u,true] Call SetNamespace;
+
+_n = _n + ["SmallVehTeam3"];
+_u = ["Ins_Soldier_CO"];
+_u = _u + ["UAZ_AGS30_INS"];
+_u = _u + ["UAZ_SPG9_INS"];
+_u = _u + ["Ural_ZU23_INS"];
+[Format["WFBE_EAST%1UNITS",_n select (count _n - 1)],_u,true] Call SetNamespace;
+
+_n = _n + ["MediumTeam1"];
+_u = ["Ins_Soldier_CO"];
+_u = _u + ["Ins_Soldier_AA"];
+_u = _u + ["Ins_Soldier_AT"];
+_u = _u + ["Ins_Soldier_AT"];
+_u = _u + ["Ins_Soldier_1"];
+[Format["WFBE_EAST%1UNITS",_n select (count _n - 1)],_u,true] Call SetNamespace;
+
+_n = _n + ["MediumTeam2"];
+_u = ["Ins_Soldier_CO"];
+_u = _u + ["Ins_Soldier_AA"];
+_u = _u + ["Ins_Soldier_AA"];
+_u = _u + ["Ins_Soldier_AT"];
+_u = _u + ["Ins_Soldier_AT"];
+_u = _u + ["Ins_Soldier_AT"];
+_u = _u + ["Ins_Soldier_MG"];
+_u = _u + ["Ins_Soldier_AR"];
+[Format["WFBE_EAST%1UNITS",_n select (count _n - 1)],_u,true] Call SetNamespace;
+
+_n = _n + ["MediumTeam3"];
+_u = ["Ins_Soldier_CO"];
+_u = _u + ["Ins_Soldier_MG"];
+_u = _u + ["Ins_Soldier_AT"];
+_u = _u + ["Ins_Soldier_Sniper"];
+_u = _u + ["Ins_Soldier_Sniper"];
+[Format["WFBE_EAST%1UNITS",_n select (count _n - 1)],_u,true] Call SetNamespace;
+
+_n = _n + ["MediumVehTeam1"];
+_u = ["Ins_Soldier_CO"];
+_u = _u + ["Ural_ZU23_INS"];
+_u = _u + ["BMP2_INS"];
+_u = _u + ["ZSU_INS"];
+[Format["WFBE_EAST%1UNITS",_n select (count _n - 1)],_u,true] Call SetNamespace;
+
+_n = _n + ["MediumVehTeam2"];
+_u = ["Ins_Soldier_CO"];
+_u = _u + ["T72_INS"];
+_u = _u + ["T72_INS"];
+_u = _u + ["BMP2_Ambul_INS"];
+[Format["WFBE_EAST%1UNITS",_n select (count _n - 1)],_u,true] Call SetNamespace;
+
+_n = _n + ["MediumVehTeam3"];
+_u = ["Ins_Soldier_CO"];
+_u = _u + ["ZSU_INS"];
+_u = _u + ["BMP2_INS"];
+_u = _u + ["T72_INS"];
+[Format["WFBE_EAST%1UNITS",_n select (count _n - 1)],_u,true] Call SetNamespace;
+
+_n = _n + ["LargeTeam1"];
+_u = ["Ins_Soldier_AT"];
+_u = _u + ["Ins_Soldier_AT"];
+_u = _u + ["Ins_Soldier_AT"];
+_u = _u + ["Ins_Soldier_AT"];
+_u = _u + ["Ins_Soldier_AT"];
+_u = _u + ["Ins_Soldier_Medic"];
+_u = _u + ["Ins_Soldier_1"];
+_u = _u + ["Ins_Soldier_AA"];
+_u = _u + ["Ins_Soldier_AA"];
+_u = _u + ["Ins_Soldier_AT"];
+_u = _u + ["Ins_Soldier_1"];
+[Format["WFBE_EAST%1UNITS",_n select (count _n - 1)],_u,true] Call SetNamespace;
+
+_n = _n + ["LargeTeam2"];
+_u = ["Ins_Soldier_CO"];
+_u = _u + ["Ins_Soldier_MG"];
+_u = _u + ["Ins_Soldier_AT"];
+_u = _u + ["Ins_Soldier_AT"];
+_u = _u + ["Ins_Soldier_Medic"];
+_u = _u + ["Ins_Soldier_AA"];
+_u = _u + ["Ins_Soldier_1"];
+_u = _u + ["Ins_Soldier_AT"];
+_u = _u + ["Ins_Soldier_GL"];
+_u = _u + ["Ins_Soldier_1"];
+[Format["WFBE_EAST%1UNITS",_n select (count _n - 1)],_u,true] Call SetNamespace;
+
+_n = _n + ["LargeTeam3"];
+_u = ["Ins_Soldier_CO"];
+_u = _u + ["Ins_Soldier_MG"];
+_u = _u + ["Ins_Soldier_AT"];
+_u = _u + ["Ins_Soldier_AT"];
+_u = _u + ["Ins_Soldier_AT"];
+_u = _u + ["Ins_Soldier_AA"];
+_u = _u + ["Ins_Soldier_AA"];
+_u = _u + ["Ins_Soldier_Sniper"];
+_u = _u + ["Ins_Soldier_AR"];
+_u = _u + ["Ins_Soldier_GL"];
+_u = _u + ["Ins_Soldier_1"];
+[Format["WFBE_EAST%1UNITS",_n select (count _n - 1)],_u,true] Call SetNamespace;
+
+_n = _n + ["LargeVehTeam1"];
+_u = ["Ins_Soldier_CO"];
+_u = _u + ["T72_INS"];
+_u = _u + ["T72_INS"];
+_u = _u + ["T72_INS"];
+_u = _u + ["T72_INS"];
+[Format["WFBE_EAST%1UNITS",_n select (count _n - 1)],_u,true] Call SetNamespace;
+
+_n = _n + ["LargeVehTeam2"];
+_u = ["Ins_Soldier_CO"];
+_u = _u + ["T72_INS"];
+_u = _u + ["T72_INS"];
+_u = _u + ["ZSU_INS"];
+_u = _u + ["BMP2_INS"];
+_u = _u + ["T72_INS"];
+[Format["WFBE_EAST%1UNITS",_n select (count _n - 1)],_u,true] Call SetNamespace;
+
+_n = _n + ["LargeVehTeam3"];
+_u = ["Ins_Soldier_CO"];
+_u = _u + ["T72_INS"];
+_u = _u + ["T72_INS"];
+_u = _u + ["T72_INS"];
+_u = _u + ["ZSU_INS"];
+_u = _u + ["GRAD_INS"];
+[Format["WFBE_EAST%1UNITS",_n select (count _n - 1)],_u,true] Call SetNamespace;
+
+//--- AA Units used by towns occupation in case of 'air assault' only.
+_n = _n + ["SmallAATeam"];
+_u = ["Ins_Soldier_CO"];
+_u = _u + ["Ins_Soldier_AA"];
+_u = _u + ["Ins_Soldier_AA"];
+_u = _u + ["Ins_Soldier_AA"];
+[Format["WFBE_EAST%1UNITS",_n select (count _n - 1)],_u,true] Call SetNamespace;
+
+_n = _n + ["MediumAATeam"];
+_u = ["Ins_Soldier_CO"];
+_u = _u + ["Ins_Soldier_AA"];
+_u = _u + ["Ins_Soldier_AA"];
+_u = _u + ["Ins_Soldier_AA"];
+_u = _u + ["ZSU_INS"];
+[Format["WFBE_EAST%1UNITS",_n select (count _n - 1)],_u,true] Call SetNamespace;
+
+_n = _n + ["LargeAATeam"];
+_u = ["Ins_Soldier_CO"];
+_u = _u + ["Ins_Soldier_AA"];
+_u = _u + ["Ins_Soldier_AA"];
+_u = _u + ["ZSU_INS"];
+_u = _u + ["ZSU_INS"];
+_u = _u + ["BMP2_INS"];
+[Format["WFBE_EAST%1UNITS",_n select (count _n - 1)],_u,true] Call SetNamespace;
+
+diag_log Format ["[WFBE (INIT)][frameno:%1 | ticktime:%2] Occupation_INS: Initialization - [Done]",diag_frameno,diag_tickTime]; \ No newline at end of file
diff --git a/Common/Config/Core_Occupation/Occupation_RU.sqf b/Common/Config/Core_Occupation/Occupation_RU.sqf
new file mode 100644
index 0000000..748c3a2
--- /dev/null
+++ b/Common/Config/Core_Occupation/Occupation_RU.sqf
@@ -0,0 +1,177 @@
+Private ["_n","_u"];
+
+_n = ["SmallTeam1"];
+_u = ["RU_Soldier_SL"];
+_u = _u + ["RU_Soldier_MG"];
+_u = _u + ["RU_Soldier_AT"];
+_u = _u + ["RU_Soldier"];
+[Format["WFBE_EAST%1UNITS",_n select (count _n - 1)],_u,true] Call SetNamespace;
+
+_n = _n + ["SmallTeam2"];
+_u = ["RU_Soldier_SL"];
+_u = _u + ["RU_Soldier_LAT"];
+_u = _u + ["RU_Soldier_Marksman"];
+_u = _u + ["RU_Soldier_AR"];
+_u = _u + ["RU_Soldier_GL"];
+[Format["WFBE_EAST%1UNITS",_n select (count _n - 1)],_u,true] Call SetNamespace;
+
+_n = _n + ["SmallTeam3"];
+_u = ["RU_Soldier_TL"];
+_u = _u + ["RU_Soldier_MG"];
+_u = _u + ["RU_Soldier_GL"];
+_u = _u + ["RU_Soldier_AT"];
+[Format["WFBE_EAST%1UNITS",_n select (count _n - 1)],_u,true] Call SetNamespace;
+
+_n = _n + ["SmallVehTeam1"];
+_u = ["RU_Soldier_SL"];
+_u = _u + ["UAZ_AGS30_RU"];
+_u = _u + ["GAZ_Vodnik"];
+[Format["WFBE_EAST%1UNITS",_n select (count _n - 1)],_u,true] Call SetNamespace;
+
+_n = _n + ["SmallVehTeam2"];
+_u = ["RU_Soldier_SL"];
+_u = _u + ["GAZ_Vodnik"];
+_u = _u + ["GAZ_Vodnik_HMG"];
+[Format["WFBE_EAST%1UNITS",_n select (count _n - 1)],_u,true] Call SetNamespace;
+
+_n = _n + ["SmallVehTeam3"];
+_u = ["RU_Soldier_SL"];
+_u = _u + ["UAZ_AGS30_RU"];
+_u = _u + ["GAZ_Vodnik_HMG"];
+[Format["WFBE_EAST%1UNITS",_n select (count _n - 1)],_u,true] Call SetNamespace;
+
+_n = _n + ["MediumTeam1"];
+_u = ["RU_Soldier_SL"];
+_u = _u + ["RU_Soldier_AA"];
+_u = _u + ["RU_Soldier_LAT"];
+_u = _u + ["RU_Soldier_AT"];
+_u = _u + ["RU_Soldier"];
+[Format["WFBE_EAST%1UNITS",_n select (count _n - 1)],_u,true] Call SetNamespace;
+
+_n = _n + ["MediumTeam2"];
+_u = ["RUS_Commander"];
+_u = _u + ["RUS_Soldier1"];
+_u = _u + ["RUS_Soldier2"];
+_u = _u + ["RUS_Soldier_GL"];
+_u = _u + ["RUS_Soldier_Marksman"];
+_u = _u + ["RUS_Soldier3"];
+_u = _u + ["RUS_Soldier_TL"];
+[Format["WFBE_EAST%1UNITS",_n select (count _n - 1)],_u,true] Call SetNamespace;
+
+_n = _n + ["MediumTeam3"];
+_u = ["MVD_Soldier_TL"];
+_u = _u + ["MVD_Soldier_MG"];
+_u = _u + ["MVD_Soldier_AT"];
+_u = _u + ["MVD_Soldier_GL"];
+_u = _u + ["MVD_Soldier_Sniper"];
+_u = _u + ["MVD_Soldier_Marksman"];
+[Format["WFBE_EAST%1UNITS",_n select (count _n - 1)],_u,true] Call SetNamespace;
+
+_n = _n + ["MediumVehTeam1"];
+_u = ["RU_Soldier_TL"];
+_u = _u + ["GAZ_Vodnik"];
+_u = _u + ["BMP3"];
+_u = _u + ["BTR90"];
+[Format["WFBE_EAST%1UNITS",_n select (count _n - 1)],_u,true] Call SetNamespace;
+
+_n = _n + ["MediumVehTeam2"];
+_u = ["RU_Soldier_TL"];
+_u = _u + ["T72_RU"];
+_u = _u + ["T72_RU"];
+_u = _u + ["GAZ_Vodnik_MedEvac"];
+[Format["WFBE_EAST%1UNITS",_n select (count _n - 1)],_u,true] Call SetNamespace;
+
+_n = _n + ["MediumVehTeam3"];
+_u = ["RU_Soldier_TL"];
+_u = _u + ["BMP3"];
+_u = _u + ["GAZ_Vodnik_HMG"];
+_u = _u + ["T72_RU"];
+[Format["WFBE_EAST%1UNITS",_n select (count _n - 1)],_u,true] Call SetNamespace;
+
+_n = _n + ["LargeTeam1"];
+_u = ["RU_Soldier_HAT"];
+_u = _u + ["RU_Soldier_HAT"];
+_u = _u + ["RU_Soldier_HAT"];
+_u = _u + ["RU_Soldier_AT"];
+_u = _u + ["RU_Soldier"];
+[Format["WFBE_EAST%1UNITS",_n select (count _n - 1)],_u,true] Call SetNamespace;
+
+_n = _n + ["LargeTeam2"];
+_u = ["RUS_Commander"];
+_u = _u + ["RUS_Soldier1"];
+_u = _u + ["RUS_Soldier2"];
+_u = _u + ["RUS_Soldier_GL"];
+_u = _u + ["RUS_Soldier_Marksman"];
+_u = _u + ["RUS_Soldier3"];
+_u = _u + ["RUS_Soldier_TL"];
+[Format["WFBE_EAST%1UNITS",_n select (count _n - 1)],_u,true] Call SetNamespace;
+
+_n = _n + ["LargeTeam3"];
+_u = ["RU_Soldier_SL"];
+_u = _u + ["RU_Soldier_MG"];
+_u = _u + ["RU_Soldier_AT"];
+_u = _u + ["RU_Soldier_LAT"];
+_u = _u + ["RU_Soldier_Marksman"];
+_u = _u + ["RU_Soldier_AR"];
+_u = _u + ["RU_Soldier_GL"];
+_u = _u + ["RU_Soldier"];
+[Format["WFBE_EAST%1UNITS",_n select (count _n - 1)],_u,true] Call SetNamespace;
+
+_n = _n + ["LargeVehTeam1"];
+_u = ["RU_Soldier_TL"];
+if (WF_ACE) then
+{
+ _u = _u + ["ACE_T90A"];
+ _u = _u + ["ACE_T90A"];
+ _u = _u + ["ACE_T90A"];
+}
+else
+{
+ _u = _u + ["T90"];
+ _u = _u + ["T90"];
+ _u = _u + ["T90"];
+};
+_u = _u + ["T72_RU"];
+[Format["WFBE_EAST%1UNITS",_n select (count _n - 1)],_u,true] Call SetNamespace;
+
+_n = _n + ["LargeVehTeam2"];
+_u = ["RU_Soldier_TL"];
+_u = _u + ["T90"];
+_u = _u + ["GRAD_RU"];
+_u = _u + ["T72_RU"];
+_u = _u + ["2S6M_Tunguska"];
+[Format["WFBE_EAST%1UNITS",_n select (count _n - 1)],_u,true] Call SetNamespace;
+
+_n = _n + ["LargeVehTeam3"];
+_u = ["RU_Soldier_TL"];
+_u = _u + ["T90"];
+_u = _u + ["T90"];
+_u = _u + ["2S6M_Tunguska"];
+_u = _u + ["T72_RU"];
+[Format["WFBE_EAST%1UNITS",_n select (count _n - 1)],_u,true] Call SetNamespace;
+
+//--- AA Units used by towns occupation in case of 'air assault' only.
+_n = _n + ["SmallAATeam"];
+_u = ["RU_Soldier_TL"];
+_u = _u + ["RU_Soldier_AA"];
+_u = _u + ["RU_Soldier_AA"];
+_u = _u + ["RU_Soldier_AA"];
+[Format["WFBE_EAST%1UNITS",_n select (count _n - 1)],_u,true] Call SetNamespace;
+
+_n = _n + ["MediumAATeam"];
+_u = ["RU_Soldier_TL"];
+_u = _u + ["RU_Soldier_AA"];
+_u = _u + ["RU_Soldier_AA"];
+_u = _u + ["RU_Soldier_AA"];
+_u = _u + ["BTR90"];
+[Format["WFBE_EAST%1UNITS",_n select (count _n - 1)],_u,true] Call SetNamespace;
+
+_n = _n + ["LargeAATeam"];
+_u = ["RU_Soldier_TL"];
+_u = _u + ["RU_Soldier_AA"];
+_u = _u + ["RU_Soldier_AA"];
+_u = _u + ["BTR90"];
+_u = _u + ["2S6M_Tunguska"];
+[Format["WFBE_EAST%1UNITS",_n select (count _n - 1)],_u,true] Call SetNamespace;
+
+diag_log Format ["[WFBE (INIT)][frameno:%1 | ticktime:%2] Occupation_RU: Initialization - [Done]",diag_frameno,diag_tickTime]; \ No newline at end of file
diff --git a/Common/Config/Core_Occupation/Occupation_TKA.sqf b/Common/Config/Core_Occupation/Occupation_TKA.sqf
new file mode 100644
index 0000000..9c2596a
--- /dev/null
+++ b/Common/Config/Core_Occupation/Occupation_TKA.sqf
@@ -0,0 +1,176 @@
+Private ["_n","_u"];
+
+_n = ["SmallTeam1"];
+_u = ["TK_Soldier_SL_EP1"];
+_u = _u + ["TK_Soldier_MG_EP1"];
+_u = _u + ["TK_Soldier_AT_EP1"];
+_u = _u + ["TK_Soldier_EP1"];
+[Format["WFBE_EAST%1UNITS",_n select (count _n - 1)],_u,true] Call SetNamespace;
+
+_n = _n + ["SmallTeam2"];
+_u = ["TK_Soldier_SL_EP1"];
+_u = _u + ["TK_Soldier_LAT_EP1"];
+_u = _u + ["TK_Soldier_Spotter_EP1"];
+_u = _u + ["TK_Soldier_AR_EP1"];
+_u = _u + ["TK_Soldier_GL_EP1"];
+[Format["WFBE_EAST%1UNITS",_n select (count _n - 1)],_u,true] Call SetNamespace;
+
+_n = _n + ["SmallTeam3"];
+_u = ["TK_Soldier_SL_EP1"];
+_u = _u + ["TK_Soldier_MG_EP1"];
+_u = _u + ["TK_Soldier_GL_EP1"];
+_u = _u + ["TK_Soldier_AT_EP1"];
+[Format["WFBE_EAST%1UNITS",_n select (count _n - 1)],_u,true] Call SetNamespace;
+
+_n = _n + ["SmallVehTeam1"];
+_u = ["TK_Soldier_SL_EP1"];
+_u = _u + ["LandRover_MG_TK_EP1"];
+_u = _u + ["BTR60_TK_EP1"];
+[Format["WFBE_EAST%1UNITS",_n select (count _n - 1)],_u,true] Call SetNamespace;
+
+_n = _n + ["SmallVehTeam2"];
+_u = ["TK_Soldier_SL_EP1"];
+_u = _u + ["BTR60_TK_EP1"];
+_u = _u + ["BRDM2_TK_EP1"];
+_u = _u + ["BRDM2_ATGM_TK_EP1"];
+[Format["WFBE_EAST%1UNITS",_n select (count _n - 1)],_u,true] Call SetNamespace;
+
+_n = _n + ["SmallVehTeam3"];
+_u = ["TK_Soldier_SL_EP1"];
+_u = _u + ["UAZ_AGS30_TK_EP1"];
+_u = _u + ["BRDM2_TK_EP1"];
+[Format["WFBE_EAST%1UNITS",_n select (count _n - 1)],_u,true] Call SetNamespace;
+
+_n = _n + ["MediumTeam1"];
+_u = ["TK_Soldier_SL_EP1"];
+_u = _u + ["TK_Soldier_AA_EP1"];
+_u = _u + ["TK_Soldier_LAT_EP1"];
+_u = _u + ["TK_Soldier_AT_EP1"];
+_u = _u + ["TK_Soldier_EP1"];
+[Format["WFBE_EAST%1UNITS",_n select (count _n - 1)],_u,true] Call SetNamespace;
+
+_n = _n + ["MediumTeam2"];
+_u = ["TK_Special_Forces_TL_EP1"];
+_u = _u + ["TK_Soldier_Medic_EP1"];
+_u = _u + ["TK_Soldier_HAT_EP1"];
+_u = _u + ["TK_Soldier_HAT_EP1"];
+_u = _u + ["TK_Special_Forces_EP1"];
+_u = _u + ["TK_Special_Forces_EP1"];
+_u = _u + ["TK_Special_Forces_MG_EP1"];
+[Format["WFBE_EAST%1UNITS",_n select (count _n - 1)],_u,true] Call SetNamespace;
+
+_n = _n + ["MediumTeam3"];
+_u = ["TK_Special_Forces_TL_EP1"];
+_u = _u + ["TK_Soldier_Medic_EP1"];
+_u = _u + ["TK_Soldier_SniperH_EP1"];
+_u = _u + ["TK_Soldier_Sniper_Night_EP1"];
+_u = _u + ["TK_Soldier_Night_1_EP1"];
+_u = _u + ["TK_Soldier_Night_2_EP1"];
+[Format["WFBE_EAST%1UNITS",_n select (count _n - 1)],_u,true] Call SetNamespace;
+
+_n = _n + ["MediumVehTeam1"];
+_u = ["TK_Soldier_SL_EP1"];
+_u = _u + ["BMP2_TK_EP1"];
+_u = _u + ["BMP2_TK_EP1"];
+_u = _u + ["BTR60_TK_EP1"];
+[Format["WFBE_EAST%1UNITS",_n select (count _n - 1)],_u,true] Call SetNamespace;
+
+_n = _n + ["MediumVehTeam2"];
+_u = ["TK_Soldier_SL_EP1"];
+_u = _u + ["T72_TK_EP1"];
+_u = _u + ["T72_TK_EP1"];
+_u = _u + ["M113Ambul_TK_EP1"];
+[Format["WFBE_EAST%1UNITS",_n select (count _n - 1)],_u,true] Call SetNamespace;
+
+_n = _n + ["MediumVehTeam3"];
+_u = ["TK_Soldier_SL_EP1"];
+_u = _u + ["BMP2_TK_EP1"];
+_u = _u + ["Ural_ZU23_TK_EP1"];
+_u = _u + ["T72_TK_EP1"];
+[Format["WFBE_EAST%1UNITS",_n select (count _n - 1)],_u,true] Call SetNamespace;
+
+_n = _n + ["LargeTeam1"];
+_u = ["TK_Soldier_HAT_EP1"];
+_u = _u + ["TK_Soldier_HAT_EP1"];
+_u = _u + ["TK_Soldier_HAT_EP1"];
+_u = _u + ["TK_Soldier_AT_EP1"];
+_u = _u + ["TK_Soldier_EP1"];
+[Format["WFBE_EAST%1UNITS",_n select (count _n - 1)],_u,true] Call SetNamespace;
+
+_n = _n + ["LargeTeam2"];
+_u = ["TK_Special_Forces_TL_EP1"];
+_u = _u + ["TK_Special_Forces_EP1"];
+_u = _u + ["TK_Special_Forces_EP1"];
+_u = _u + ["TK_Special_Forces_EP1"];
+_u = _u + ["TK_Special_Forces_MG_EP1"];
+_u = _u + ["TK_Special_Forces_MG_EP1"];
+_u = _u + ["TK_Special_Forces_MG_EP1"];
+[Format["WFBE_EAST%1UNITS",_n select (count _n - 1)],_u,true] Call SetNamespace;
+
+_n = _n + ["LargeTeam3"];
+_u = ["TK_Soldier_SL_EP1"];
+_u = _u + ["TK_Soldier_MG_EP1"];
+_u = _u + ["TK_Soldier_AT_EP1"];
+_u = _u + ["TK_Soldier_LAT_EP1"];
+_u = _u + ["TK_Soldier_Spotter_EP1"];
+_u = _u + ["TK_Soldier_AR_EP1"];
+_u = _u + ["TK_Soldier_GL_EP1"];
+_u = _u + ["TK_Soldier_EP1"];
+[Format["WFBE_EAST%1UNITS",_n select (count _n - 1)],_u,true] Call SetNamespace;
+
+_n = _n + ["LargeVehTeam1"];
+_u = ["TK_Soldier_SL_EP1"];
+_u = _u + ["T55_TK_EP1"];
+_u = _u + ["T72_TK_EP1"];
+_u = _u + ["T72_TK_EP1"];
+_u = _u + ["T72_TK_EP1"];
+[Format["WFBE_EAST%1UNITS",_n select (count _n - 1)],_u,true] Call SetNamespace;
+
+_n = _n + ["LargeVehTeam2"];
+_u = ["TK_Soldier_SL_EP1"];
+_u = _u + ["T55_TK_EP1"];
+_u = _u + ["T55_TK_EP1"];
+_u = _u + ["T72_TK_EP1"];
+_u = _u + ["ZSU_TK_EP1"];
+[Format["WFBE_EAST%1UNITS",_n select (count _n - 1)],_u,true] Call SetNamespace;
+
+_n = _n + ["LargeVehTeam3"];
+_u = ["TK_Soldier_SL_EP1"];
+_u = _u + ["T72_TK_EP1"];
+_u = _u + ["T72_TK_EP1"];
+_u = _u + ["T72_TK_EP1"];
+_u = _u + ["ZSU_TK_EP1"];
+_u = _u + ["T72_TK_EP1"];
+[Format["WFBE_EAST%1UNITS",_n select (count _n - 1)],_u,true] Call SetNamespace;
+
+//--- AA Units used by towns occupation in case of 'air assault' only.
+_n = _n + ["SmallAATeam"];
+_u = ["TK_Soldier_SL_EP1"];
+_u = _u + ["TK_Soldier_AA_EP1"];
+_u = _u + ["TK_Soldier_AA_EP1"];
+_u = _u + ["TK_Soldier_AA_EP1"];
+_u = _u + ["TK_Soldier_AA_EP1"];
+[Format["WFBE_EAST%1UNITS",_n select (count _n - 1)],_u,true] Call SetNamespace;
+
+_n = _n + ["MediumAATeam"];
+_u = ["TK_Soldier_SL_EP1"];
+_u = _u + ["TK_Soldier_AA_EP1"];
+_u = _u + ["TK_Soldier_AA_EP1"];
+_u = _u + ["TK_Soldier_AA_EP1"];
+_u = _u + ["Ural_ZU23_TK_EP1"];
+_u = _u + ["Ural_ZU23_TK_EP1"];
+[Format["WFBE_EAST%1UNITS",_n select (count _n - 1)],_u,true] Call SetNamespace;
+
+_n = _n + ["LargeAATeam"];
+_u = ["TK_Soldier_SL_EP1"];
+_u = _u + ["TK_Soldier_AA_EP1"];
+_u = _u + ["TK_Soldier_AA_EP1"];
+_u = _u + ["TK_Soldier_AA_EP1"];
+_u = _u + ["TK_Soldier_AA_EP1"];
+_u = _u + ["TK_Soldier_AA_EP1"];
+_u = _u + ["ZSU_TK_EP1"];
+_u = _u + ["ZSU_TK_EP1"];
+_u = _u + ["BMP2_TK_EP1"];
+[Format["WFBE_EAST%1UNITS",_n select (count _n - 1)],_u,true] Call SetNamespace;
+
+diag_log Format ["[WFBE (INIT)][frameno:%1 | ticktime:%2] Occupation_TKA: Initialization - [Done]",diag_frameno,diag_tickTime]; \ No newline at end of file
diff --git a/Common/Config/Core_Occupation/Occupation_US.sqf b/Common/Config/Core_Occupation/Occupation_US.sqf
new file mode 100644
index 0000000..6df144e
--- /dev/null
+++ b/Common/Config/Core_Occupation/Occupation_US.sqf
@@ -0,0 +1,172 @@
+Private ["_n","_u"];
+
+_n = ["SmallTeam1"];
+_u = ["US_Soldier_SL_EP1"];
+_u = _u + ["US_Soldier_TL_EP1"];
+_u = _u + ["US_Soldier_AR_EP1"];
+_u = _u + ["US_Soldier_EP1"];
+[Format["WFBE_WEST%1UNITS",_n select (count _n - 1)],_u,true] Call SetNamespace;
+
+_n = _n + ["SmallTeam2"];
+_u = ["US_Soldier_TL_EP1"];
+_u = _u + ["US_Soldier_AR_EP1"];
+_u = _u + ["US_Soldier_LAT_EP1"];
+_u = _u + ["US_Soldier_Medic_EP1"];
+[Format["WFBE_WEST%1UNITS",_n select (count _n - 1)],_u,true] Call SetNamespace;
+
+_n = _n + ["SmallTeam3"];
+_u = ["US_Soldier_TL_EP1"];
+_u = _u + ["US_Soldier_MG_EP1"];
+_u = _u + ["US_Soldier_AR_EP1"];
+_u = _u + ["US_Soldier_LAT_EP1"];
+[Format["WFBE_WEST%1UNITS",_n select (count _n - 1)],_u,true] Call SetNamespace;
+
+_n = _n + ["SmallVehTeam1"];
+_u = ["US_Soldier_TL_EP1"];
+_u = _u + ["HMMWV_Avenger_DES_EP1"];
+_u = _u + ["HMMWV_M1151_M2_DES_EP1"];
+[Format["WFBE_WEST%1UNITS",_n select (count _n - 1)],_u,true] Call SetNamespace;
+
+_n = _n + ["SmallVehTeam2"];
+_u = ["US_Soldier_SL_EP1"];
+_u = _u + ["HMMWV_TOW_DES_EP1"];
+_u = _u + ["M1126_ICV_mk19_EP1"];
+[Format["WFBE_WEST%1UNITS",_n select (count _n - 1)],_u,true] Call SetNamespace;
+
+_n = _n + ["SmallVehTeam3"];
+_u = ["US_Soldier_TL_EP1"];
+_u = _u + ["HMMWV_Avenger_DES_EP1"];
+_u = _u + ["HMMWV_M998_crows_MK19_DES_EP1"];
+[Format["WFBE_WEST%1UNITS",_n select (count _n - 1)],_u,true] Call SetNamespace;
+
+_n = _n + ["MediumTeam1"];
+_u = ["US_Soldier_TL_EP1"];
+_u = _u + ["US_Soldier_AR_EP1"];
+_u = _u + ["US_Soldier_Medic_EP1"];
+_u = _u + ["US_Soldier_AA_EP1"];
+_u = _u + ["US_Soldier_AA_EP1"];
+[Format["WFBE_WEST%1UNITS",_n select (count _n - 1)],_u,true] Call SetNamespace;
+
+_n = _n + ["MediumTeam2"];
+_u = ["US_Soldier_TL_EP1"];
+_u = _u + ["US_Soldier_AA_EP1"];
+_u = _u + ["US_Soldier_AA_EP1"];
+_u = _u + ["US_Soldier_LAT_EP1"];
+_u = _u + ["US_Soldier_AT_EP1"];
+_u = _u + ["US_Soldier_AR_EP1"];
+_u = _u + ["US_Soldier_MG_EP1"];
+[Format["WFBE_WEST%1UNITS",_n select (count _n - 1)],_u,true] Call SetNamespace;
+
+_n = _n + ["MediumTeam3"];
+_u = ["US_Soldier_Sniper_EP1"];
+_u = _u + ["US_Soldier_Marksman_EP1"];
+_u = _u + ["US_Soldier_Marksman_EP1"];
+_u = _u + ["US_Soldier_SniperH_EP1"];
+_u = _u + ["US_Soldier_SniperH_EP1"];
+[Format["WFBE_WEST%1UNITS",_n select (count _n - 1)],_u,true] Call SetNamespace;
+
+_n = _n + ["MediumVehTeam1"];
+_u = ["US_Soldier_TL_EP1"];
+_u = _u + ["HMMWV_Avenger_DES_EP1"];
+_u = _u + ["M2A3_EP1"];
+_u = _u + ["M1126_ICV_M2_EP1"];
+[Format["WFBE_WEST%1UNITS",_n select (count _n - 1)],_u,true] Call SetNamespace;
+
+_n = _n + ["MediumVehTeam2"];
+_u = ["US_Soldier_TL_EP1"];
+_u = _u + ["M1A1_US_DES_EP1"];
+_u = _u + ["M1A1_US_DES_EP1"];
+_u = _u + ["HMMWV_Ambulance_DES_EP1"];
+[Format["WFBE_WEST%1UNITS",_n select (count _n - 1)],_u,true] Call SetNamespace;
+
+_n = _n + ["MediumVehTeam3"];
+_u = ["US_Soldier_TL_EP1"];
+_u = _u + ["M1126_ICV_M2_EP1"];
+_u = _u + ["HMMWV_M998_crows_M2_DES_EP1"];
+_u = _u + ["M1A1_US_DES_EP1"];
+[Format["WFBE_WEST%1UNITS",_n select (count _n - 1)],_u,true] Call SetNamespace;
+
+_n = _n + ["LargeTeam1"];
+_u = ["US_Soldier_HAT_EP1"];
+_u = _u + ["US_Soldier_AT_EP1"];
+_u = _u + ["US_Soldier_HAT_EP1"];
+_u = _u + ["US_Soldier_HAT_EP1"];
+_u = _u + ["US_Soldier_HAT_EP1"];
+_u = _u + ["US_Soldier_EP1"];
+[Format["WFBE_WEST%1UNITS",_n select (count _n - 1)],_u,true] Call SetNamespace;
+
+_n = _n + ["LargeTeam2"];
+_u = ["US_Delta_Force_EP1"];
+_u = _u + ["US_Delta_Force_AR_EP1"];
+_u = _u + ["US_Delta_Force_SD_EP1"];
+_u = _u + ["US_Delta_Force_Assault_EP1"];
+_u = _u + ["US_Delta_Force_Marksman_EP1"];
+_u = _u + ["US_Delta_Force_M14_EP1"];
+_u = _u + ["US_Delta_Force_MG_EP1"];
+_u = _u + ["US_Delta_Force_Medic_EP1"];
+[Format["WFBE_WEST%1UNITS",_n select (count _n - 1)],_u,true] Call SetNamespace;
+
+_n = _n + ["LargeTeam3"];
+_u = ["US_Soldier_TL_EP1"];
+_u = _u + ["US_Soldier_AA_EP1"];
+_u = _u + ["US_Soldier_AA_EP1"];
+_u = _u + ["US_Soldier_Medic_EP1"];
+_u = _u + ["US_Soldier_GL_EP1"];
+_u = _u + ["US_Soldier_Sniper_EP1"];
+_u = _u + ["US_Soldier_AT_EP1"];
+_u = _u + ["US_Soldier_MG_EP1"];
+_u = _u + ["US_Soldier_AR_EP1"];
+_u = _u + ["US_Soldier_LAT_EP1"];
+[Format["WFBE_WEST%1UNITS",_n select (count _n - 1)],_u,true] Call SetNamespace;
+
+_n = _n + ["LargeVehTeam1"];
+_u = ["US_Soldier_TL_EP1"];
+_u = _u + ["M1A2_US_TUSK_MG_EP1"];
+_u = _u + ["M1A2_US_TUSK_MG_EP1"];
+_u = _u + ["M1A2_US_TUSK_MG_EP1"];
+_u = _u + ["M1A2_US_TUSK_MG_EP1"];
+[Format["WFBE_WEST%1UNITS",_n select (count _n - 1)],_u,true] Call SetNamespace;
+
+_n = _n + ["LargeVehTeam2"];
+_u = ["US_Soldier_TL_EP1"];
+_u = _u + ["M1A2_US_TUSK_MG_EP1"];
+_u = _u + ["M1A2_US_TUSK_MG_EP1"];
+_u = _u + ["MLRS_DES_EP1"];
+_u = _u + ["M1A2_US_TUSK_MG_EP1"];
+[Format["WFBE_WEST%1UNITS",_n select (count _n - 1)],_u,true] Call SetNamespace;
+
+_n = _n + ["LargeVehTeam3"];
+_u = ["US_Soldier_TL_EP1"];
+_u = _u + ["M1A2_US_TUSK_MG_EP1"];
+_u = _u + ["M1A2_US_TUSK_MG_EP1"];
+_u = _u + ["M1A2_US_TUSK_MG_EP1"];
+_u = _u + ["M6_EP1"];
+[Format["WFBE_WEST%1UNITS",_n select (count _n - 1)],_u,true] Call SetNamespace;
+
+//--- AA Units used by towns occupation in case of 'air assault' only.
+_n = _n + ["SmallAATeam"];
+_u = ["US_Soldier_TL_EP1"];
+_u = _u + ["US_Soldier_AA_EP1"];
+_u = _u + ["US_Soldier_AA_EP1"];
+_u = _u + ["US_Soldier_AA_EP1"];
+[Format["WFBE_WEST%1UNITS",_n select (count _n - 1)],_u,true] Call SetNamespace;
+
+_n = _n + ["MediumAATeam"];
+_u = ["US_Soldier_TL_EP1"];
+_u = _u + ["US_Soldier_AA_EP1"];
+_u = _u + ["US_Soldier_AA_EP1"];
+_u = _u + ["HMMWV_Avenger_DES_EP1"];
+_u = _u + ["HMMWV_Avenger_DES_EP1"];
+[Format["WFBE_WEST%1UNITS",_n select (count _n - 1)],_u,true] Call SetNamespace;
+
+_n = _n + ["LargeAATeam"];
+_u = ["US_Soldier_TL_EP1"];
+_u = _u + ["US_Soldier_AA_EP1"];
+_u = _u + ["US_Soldier_AA_EP1"];
+_u = _u + ["US_Soldier_AA_EP1"];
+_u = _u + ["M2A3_EP1"];
+_u = _u + ["M6_EP1"];
+_u = _u + ["M6_EP1"];
+[Format["WFBE_WEST%1UNITS",_n select (count _n - 1)],_u,true] Call SetNamespace;
+
+diag_log Format ["[WFBE (INIT)][frameno:%1 | ticktime:%2] Occupation_US: Initialization - [Done]",diag_frameno,diag_tickTime]; \ No newline at end of file
diff --git a/Common/Config/Core_Occupation/Occupation_USMC.sqf b/Common/Config/Core_Occupation/Occupation_USMC.sqf
new file mode 100644
index 0000000..7969bad
--- /dev/null
+++ b/Common/Config/Core_Occupation/Occupation_USMC.sqf
@@ -0,0 +1,173 @@
+Private ["_n","_u"];
+
+_n = ["SmallTeam1"];
+_u = ["USMC_Soldier_SL"];
+_u = _u + ["USMC_Soldier_TL"];
+_u = _u + ["USMC_Soldier_AR"];
+_u = _u + ["USMC_Soldier"];
+[Format["WFBE_WEST%1UNITS",_n select (count _n - 1)],_u,true] Call SetNamespace;
+
+_n = _n + ["SmallTeam2"];
+_u = ["USMC_Soldier_TL"];
+_u = _u + ["USMC_Soldier_AR"];
+_u = _u + ["USMC_Soldier_LAT"];
+_u = _u + ["USMC_Soldier_Medic"];
+[Format["WFBE_WEST%1UNITS",_n select (count _n - 1)],_u,true] Call SetNamespace;
+
+_n = _n + ["SmallTeam3"];
+_u = ["USMC_Soldier_TL"];
+_u = _u + ["USMC_Soldier_MG"];
+_u = _u + ["USMC_Soldier_AR"];
+_u = _u + ["USMC_Soldier_LAT"];
+[Format["WFBE_WEST%1UNITS",_n select (count _n - 1)],_u,true] Call SetNamespace;
+
+_n = _n + ["SmallVehTeam1"];
+_u = ["USMC_Soldier_TL"];
+_u = _u + ["HMMWV_Avenger"];
+_u = _u + ["HMMWV_Armored"];
+[Format["WFBE_WEST%1UNITS",_n select (count _n - 1)],_u,true] Call SetNamespace;
+
+_n = _n + ["SmallVehTeam2"];
+_u = ["USMC_Soldier_SL"];
+_u = _u + ["HMMWV_TOW"];
+_u = _u + ["LAV25"];
+[Format["WFBE_WEST%1UNITS",_n select (count _n - 1)],_u,true] Call SetNamespace;
+
+_n = _n + ["SmallVehTeam3"];
+_u = ["USMC_Soldier_TL"];
+_u = _u + ["HMMWV_Avenger"];
+_u = _u + ["HMMWV_MK19"];
+[Format["WFBE_WEST%1UNITS",_n select (count _n - 1)],_u,true] Call SetNamespace;
+
+_n = _n + ["MediumTeam1"];
+_u = ["USMC_Soldier_TL"];
+_u = _u + ["USMC_Soldier_AR"];
+_u = _u + ["USMC_Soldier_Medic"];
+_u = _u + ["USMC_Soldier_AA"];
+_u = _u + ["USMC_Soldier_AA"];
+[Format["WFBE_WEST%1UNITS",_n select (count _n - 1)],_u,true] Call SetNamespace;
+
+_n = _n + ["MediumTeam2"];
+_u = ["USMC_Soldier_TL"];
+_u = _u + ["USMC_Soldier_AA"];
+_u = _u + ["USMC_Soldier_AA"];
+_u = _u + ["USMC_Soldier_LAT"];
+_u = _u + ["USMC_Soldier_AT"];
+_u = _u + ["USMC_Soldier_AR"];
+_u = _u + ["USMC_Soldier_MG"];
+[Format["WFBE_WEST%1UNITS",_n select (count _n - 1)],_u,true] Call SetNamespace;
+
+_n = _n + ["MediumTeam3"];
+_u = ["USMC_SoldierS_Sniper"];
+_u = _u + ["USMC_SoldierS_Spotter"];
+_u = _u + ["USMC_SoldierS_Spotter"];
+_u = _u + ["USMC_SoldierS"];
+_u = _u + ["USMC_SoldierS"];
+[Format["WFBE_WEST%1UNITS",_n select (count _n - 1)],_u,true] Call SetNamespace;
+
+_n = _n + ["MediumVehTeam1"];
+_u = ["USMC_Soldier_TL"];
+_u = _u + ["HMMWV_Avenger"];
+_u = _u + ["AAV"];
+_u = _u + ["LAV25"];
+[Format["WFBE_WEST%1UNITS",_n select (count _n - 1)],_u,true] Call SetNamespace;
+
+_n = _n + ["MediumVehTeam2"];
+_u = ["USMC_Soldier_TL"];
+_u = _u + ["M1A1"];
+_u = _u + ["M1A1"];
+_u = _u + ["HMMWV_Ambulance"];
+[Format["WFBE_WEST%1UNITS",_n select (count _n - 1)],_u,true] Call SetNamespace;
+
+_n = _n + ["MediumVehTeam3"];
+_u = ["USMC_Soldier_TL"];
+_u = _u + ["AAV"];
+_u = _u + ["HMMWV_M2"];
+_u = _u + ["M1A1"];
+[Format["WFBE_WEST%1UNITS",_n select (count _n - 1)],_u,true] Call SetNamespace;
+
+_n = _n + ["LargeTeam1"];
+_u = ["USMC_Soldier_HAT"];
+_u = _u + ["USMC_Soldier_AT"];
+_u = _u + ["USMC_Soldier_HAT"];
+_u = _u + ["USMC_Soldier_HAT"];
+_u = _u + ["USMC_Soldier_HAT"];
+_u = _u + ["USMC_Soldier"];
+[Format["WFBE_WEST%1UNITS",_n select (count _n - 1)],_u,true] Call SetNamespace;
+
+_n = _n + ["LargeTeam2"];
+_u = ["FR_TL"];
+_u = _u + ["FR_AR"];
+_u = _u + ["FR_GL"];
+_u = _u + ["FR_Marksman"];
+_u = _u + ["FR_R"];
+_u = _u + ["FR_Corpsman"];
+_u = _u + ["FR_Sapper"];
+_u = _u + ["FR_AC"];
+[Format["WFBE_WEST%1UNITS",_n select (count _n - 1)],_u,true] Call SetNamespace;
+
+_n = _n + ["LargeTeam3"];
+_u = ["USMC_Soldier_TL"];
+_u = _u + ["USMC_Soldier_AA"];
+_u = _u + ["USMC_Soldier_AA"];
+_u = _u + ["USMC_Soldier_Medic"];
+_u = _u + ["USMC_Soldier_GL"];
+_u = _u + ["USMC_SoldierS_Sniper"];
+_u = _u + ["USMC_Soldier_AT"];
+_u = _u + ["USMC_Soldier_MG"];
+_u = _u + ["USMC_Soldier_AR"];
+_u = _u + ["USMC_Soldier_LAT"];
+[Format["WFBE_WEST%1UNITS",_n select (count _n - 1)],_u,true] Call SetNamespace;
+
+_n = _n + ["LargeVehTeam1"];
+_u = ["USMC_Soldier_TL"];
+_u = _u + ["M1A2_TUSK_MG"];
+_u = _u + ["M1A2_TUSK_MG"];
+_u = _u + ["M1A2_TUSK_MG"];
+_u = _u + ["M1A2_TUSK_MG"];
+[Format["WFBE_WEST%1UNITS",_n select (count _n - 1)],_u,true] Call SetNamespace;
+
+_n = _n + ["LargeVehTeam2"];
+_u = ["USMC_Soldier_TL"];
+_u = _u + ["M1A2_TUSK_MG"];
+_u = _u + ["M1A2_TUSK_MG"];
+_u = _u + ["MLRS"];
+_u = _u + ["M1A2_TUSK_MG"];
+[Format["WFBE_WEST%1UNITS",_n select (count _n - 1)],_u,true] Call SetNamespace;
+
+_n = _n + ["LargeVehTeam3"];
+_u = ["USMC_Soldier_TL"];
+_u = _u + ["M1A2_TUSK_MG"];
+_u = _u + ["M1A2_TUSK_MG"];
+_u = _u + ["M1A2_TUSK_MG"];
+_u = _u + ["AAV"];
+[Format["WFBE_WEST%1UNITS",_n select (count _n - 1)],_u,true] Call SetNamespace;
+
+//--- AA Units used by towns occupation in case of 'air assault' only.
+_n = _n + ["SmallAATeam"];
+_u = ["USMC_Soldier_TL"];
+_u = _u + ["USMC_Soldier_AA"];
+_u = _u + ["USMC_Soldier_AA"];
+_u = _u + ["USMC_Soldier_AA"];
+[Format["WFBE_WEST%1UNITS",_n select (count _n - 1)],_u,true] Call SetNamespace;
+
+_n = _n + ["MediumAATeam"];
+_u = ["USMC_Soldier_TL"];
+_u = _u + ["USMC_Soldier_AA"];
+_u = _u + ["USMC_Soldier_AA"];
+_u = _u + ["HMMWV_Avenger"];
+_u = _u + ["HMMWV_Avenger"];
+[Format["WFBE_WEST%1UNITS",_n select (count _n - 1)],_u,true] Call SetNamespace;
+
+_n = _n + ["LargeAATeam"];
+_u = ["USMC_Soldier_TL"];
+_u = _u + ["USMC_Soldier_AA"];
+_u = _u + ["USMC_Soldier_AA"];
+_u = _u + ["USMC_Soldier_AA"];
+_u = _u + ["HMMWV_Avenger"];
+_u = _u + ["HMMWV_Avenger"];
+_u = _u + ["HMMWV_Avenger"];
+_u = _u + ["HMMWV_Armored"];
+[Format["WFBE_WEST%1UNITS",_n select (count _n - 1)],_u,true] Call SetNamespace;
+
+diag_log Format ["[WFBE (INIT)][frameno:%1 | ticktime:%2] Occupation_USMC: Initialization - [Done]",diag_frameno,diag_tickTime]; \ No newline at end of file
diff --git a/Common/Config/Core_Resistance/Resistance_GUE.sqf b/Common/Config/Core_Resistance/Resistance_GUE.sqf
new file mode 100644
index 0000000..3f44b2f
--- /dev/null
+++ b/Common/Config/Core_Resistance/Resistance_GUE.sqf
@@ -0,0 +1,100 @@
+Private ["_n","_u"];
+
+//--- Resistance Key Units.
+['WFBE_GUERCREW','GUE_Soldier_Crew',true] Call SetNamespace;
+['WFBE_GUERPILOT','GUE_Soldier_1',true] Call SetNamespace;
+['WFBE_GUERSOLDIER','GUE_Soldier_1',true] Call SetNamespace;
+
+//--- Town Resistance.
+_n = ["Group"];
+_u = ["Guerrila", "GUE", "Infantry", "GUE_InfSquad"] Call GetGroupFromConfig;
+[Format["WFBE_RES%1UNITS",_n select (count _n - 1)],_u,true] Call SetNamespace;
+
+_n = _n + ["GroupAssault"];
+_u = ["Guerrila", "GUE", "Infantry", "GUE_InfSquad_Assault"] Call GetGroupFromConfig;
+[Format["WFBE_RES%1UNITS",_n select (count _n - 1)],_u,true] Call SetNamespace;
+
+_n = _n + ["GroupWeapons"];
+_u = ["Guerrila", "GUE", "Infantry", "GUE_InfSquad_Weapons"] Call GetGroupFromConfig;
+[Format["WFBE_RES%1UNITS",_n select (count _n - 1)],_u,true] Call SetNamespace;
+
+_n = _n + ["Patrol1"];
+_u = ["Guerrila", "GUE", "Infantry", "GUE_InfTeam_1"] Call GetGroupFromConfig;
+[Format["WFBE_RES%1UNITS",_n select (count _n - 1)],_u,true] Call SetNamespace;
+
+_n = _n + ["Patrol2"];
+_u = ["Guerrila", "GUE", "Infantry", "GUE_InfTeam_2"] Call GetGroupFromConfig;
+[Format["WFBE_RES%1UNITS",_n select (count _n - 1)],_u,true] Call SetNamespace;
+
+_n = _n + ["ATTeam"];
+_u = ["Guerrila", "GUE", "Infantry", "GUE_InfTeam_AT"] Call GetGroupFromConfig;
+[Format["WFBE_RES%1UNITS",_n select (count _n - 1)],_u,true] Call SetNamespace;
+
+_n = _n + ["AATeam"];
+_u = ["Guerrila", "GUE", "Infantry", "GUE_GrpInf_TeamAA"] Call GetGroupFromConfig;
+[Format["WFBE_RES%1UNITS",_n select (count _n - 1)],_u,true] Call SetNamespace;
+
+_n = _n + ["SniperTeam"];
+_u = ["Guerrila", "GUE", "Infantry", "GUE_GrpInf_TeamSniper"] Call GetGroupFromConfig;
+[Format["WFBE_RES%1UNITS",_n select (count _n - 1)],_u,true] Call SetNamespace;
+
+_n = _n + ["Militia"];
+_u = ["Guerrila", "GUE", "Infantry", "GUE_MilitiaSquad"] Call GetGroupFromConfig;
+[Format["WFBE_RES%1UNITS",_n select (count _n - 1)],_u,true] Call SetNamespace;
+
+_n = _n + ["Technical"];
+_u = ["Guerrila", "GUE", "Motorized", "GUE_MotInfSection"] Call GetGroupFromConfig;
+[Format["WFBE_RES%1UNITS",_n select (count _n - 1)],_u,true] Call SetNamespace;
+
+_n = _n + ["MotorizedGroup"];
+_u = ["Guerrila", "GUE", "Motorized", "GUE_MotInfSquad"] Call GetGroupFromConfig;
+[Format["WFBE_RES%1UNITS",_n select (count _n - 1)],_u,true] Call SetNamespace;
+
+_n = _n + ["MotorizedAATeam"];
+_u = ["Guerrila", "GUE", "Mechanized", "GUE_MechInfSection"] Call GetGroupFromConfig;
+_u = _u + ["Ural_ZU23_Gue"];
+[Format["WFBE_RES%1UNITS",_n select (count _n - 1)],_u,true] Call SetNamespace;
+
+_n = _n + ["MechanizedGroup"];
+_u = ["Guerrila", "GUE", "Mechanized", "GUE_MechInfSquad"] Call GetGroupFromConfig;
+_u = _u + ["GUE_Soldier_1"];
+_u = _u + ["GUE_Soldier_MG"];
+_u = _u + ["GUE_Soldier_MG"];
+_u = _u + ["GUE_Soldier_Medic"];
+[Format["WFBE_RES%1UNITS",_n select (count _n - 1)],_u,true] Call SetNamespace;
+
+_n = _n + ["MechanizedPatrol"];
+_u = ["Guerrila", "GUE", "Mechanized", "GUE_MechInfSquad"] Call GetGroupFromConfig;
+[Format["WFBE_RES%1UNITS",_n select (count _n - 1)],_u,true] Call SetNamespace;
+
+_n = _n + ["LightArmor"];
+_u = ["BMP2_GUE"];
+_u = _u + ["BMP2_GUE"];
+[Format["WFBE_RES%1UNITS",_n select (count _n - 1)],_u,true] Call SetNamespace;
+
+_n = _n + ["HeavyArmor"];
+_u = ["Guerrila", "GUE", "Armored", "GUE_TankSection"] Call GetGroupFromConfig;
+[Format["WFBE_RES%1UNITS",_n select (count _n - 1)],_u,true] Call SetNamespace;
+
+//--- Patroling Resistance.
+if (('WFBE_RESPATROL' Call GetNamespace) > 0) then {
+ ['WFBE_RESPATROLTYPE10',['GUE_Soldier_1','GUE_Soldier_MG','GUE_Soldier_Sniper','GUE_Soldier_Medic'],true] Call SetNamespace;
+ ['WFBE_RESPATROLTYPE11',['GUE_Soldier_CO','GUE_Soldier_AR','GUE_Soldier_3','GUE_Soldier_AT','GUE_Soldier_2'],true] Call SetNamespace;
+ ['WFBE_RESPATROLTYPE12',['Offroad_DSHKM_Gue','Offroad_SPG9_Gue'],true] Call SetNamespace;
+ ['WFBE_RESPATROLTYPE20',['BRDM2_GUE','BRDM2_GUE'],true] Call SetNamespace;
+ ['WFBE_RESPATROLTYPE21',['V3S_GUE','GUE_Soldier_CO','GUE_Soldier_AT','GUE_Soldier_MG','GUE_Soldier_AT'],true] Call SetNamespace;
+ ['WFBE_RESPATROLTYPE22',['BMP2_GUE','GUE_Soldier_AA','GUE_Soldier_AA','GUE_Soldier_Medic'],true] Call SetNamespace;
+ ['WFBE_RESPATROLTYPE30',['BMP2_GUE','BMP2_GUE'],true] Call SetNamespace;
+ ['WFBE_RESPATROLTYPE31',['T72_GUE','T72_GUE'],true] Call SetNamespace;
+ ['WFBE_RESPATROLTYPE32',['GUE_Soldier_Sniper','GUE_Soldier_Scout','GUE_Soldier_Sniper'],true] Call SetNamespace;
+};
+
+//--- Base Attacker Resistance.
+if (('WFBE_RESSTRIKER' Call GetNamespace) > 0) then {
+ ['WFBE_RESSTRIKERTYPE10',['GUE_Soldier_Sab','GUE_Soldier_Scout','GUE_Soldier_Sniper'],true] Call SetNamespace;
+ ['WFBE_RESSTRIKERTYPE11',['GUE_Soldier_CO','GUE_Soldier_AR','GUE_Soldier_3','GUE_Soldier_AT','GUE_Soldier_2'],true] Call SetNamespace;
+ ['WFBE_RESSTRIKERTYPE12',['GUE_Soldier_CO','GUE_Soldier_AA','GUE_Soldier_AA','GUE_Soldier_3'],true] Call SetNamespace;
+ ['WFBE_RESSTRIKERTYPE13',['GUE_Soldier_CO','GUE_Soldier_MG','GUE_Soldier_Medic','GUE_Soldier_AT','GUE_Soldier_AT'],true] Call SetNamespace;
+};
+
+diag_log Format ["[WFBE (INIT)][frameno:%1 | ticktime:%2] Resistance_GUE: Initialization - [Done]",diag_frameno,diag_tickTime]; \ No newline at end of file
diff --git a/Common/Config/Core_Resistance/Resistance_PMC.sqf b/Common/Config/Core_Resistance/Resistance_PMC.sqf
new file mode 100644
index 0000000..ab70291
--- /dev/null
+++ b/Common/Config/Core_Resistance/Resistance_PMC.sqf
@@ -0,0 +1,127 @@
+Private ["_n","_u"];
+
+//--- Resistance Key Units.
+['WFBE_GUERCREW','Soldier_Crew_PMC',true] Call SetNamespace;
+['WFBE_GUERPILOT','Soldier_Pilot_PMC',true] Call SetNamespace;
+['WFBE_GUERSOLDIER','Soldier_PMC',true] Call SetNamespace;
+
+//--- Town Resistance.
+_n = ["Group"];
+_u = ["Guerrila", "PMC_BAF", "Infantry", "PMC_Field_Security_Team"] Call GetGroupFromConfig;
+[Format["WFBE_RES%1UNITS",_n select (count _n - 1)],_u,true] Call SetNamespace;
+
+_n = _n + ["GroupAssault"];
+_u = ["Guerrila", "PMC_BAF", "Infantry", "PMC_Security_Detail"] Call GetGroupFromConfig;
+[Format["WFBE_RES%1UNITS",_n select (count _n - 1)],_u,true] Call SetNamespace;
+
+_n = _n + ["GroupWeapons"];
+_u = ["Guerrila", "PMC_BAF", "Infantry", "PMC_Security_Specialists"] Call GetGroupFromConfig;
+[Format["WFBE_RES%1UNITS",_n select (count _n - 1)],_u,true] Call SetNamespace;
+
+_n = _n + ["Patrol1"];
+_u = ["Guerrila", "PMC_BAF", "Infantry", "PMC_VIP_Bodyguard"] Call GetGroupFromConfig;
+[Format["WFBE_RES%1UNITS",_n select (count _n - 1)],_u,true] Call SetNamespace;
+
+_n = _n + ["Patrol2"];
+_u = ["Guerrila", "PMC_BAF", "Infantry", "PMC_Field_Security_Patrol"] Call GetGroupFromConfig;
+[Format["WFBE_RES%1UNITS",_n select (count _n - 1)],_u,true] Call SetNamespace;
+
+_n = _n + ["ATTeam"];
+_u = ["Soldier_AT_PMC"];
+_u = _u + ["Soldier_AT_PMC"];
+_u = _u + ["Soldier_Bodyguard_M4_PMC"];
+[Format["WFBE_RES%1UNITS",_n select (count _n - 1)],_u,true] Call SetNamespace;
+
+_n = _n + ["AATeam"];
+_u = ["Soldier_TL_PMC"];
+_u = _u + ["Soldier_AA_PMC"];
+_u = _u + ["Soldier_AA_PMC"];
+_u = _u + ["Soldier_Bodyguard_M4_PMC"];
+[Format["WFBE_RES%1UNITS",_n select (count _n - 1)],_u,true] Call SetNamespace;
+
+_n = _n + ["SniperTeam"];
+_u = ["Soldier_Sniper_KSVK_PMC"];
+_u = _u + ["Soldier_Sniper_PMC"];
+[Format["WFBE_RES%1UNITS",_n select (count _n - 1)],_u,true] Call SetNamespace;
+
+_n = _n + ["Militia"];
+_u = ["Guerrila", "PMC_BAF", "Infantry", "PMC_Field_Support_Team"] Call GetGroupFromConfig;
+[Format["WFBE_RES%1UNITS",_n select (count _n - 1)],_u,true] Call SetNamespace;
+
+_n = _n + ["Technical"];
+_u = ["Soldier_TL_PMC"];
+_u = _u + ["Offroad_DSHKM_TK_GUE_EP1"];
+_u = _u + ["Offroad_SPG9_TK_GUE_EP1"];
+_u = _u + ["ArmoredSUV_PMC"];
+_u = _u + ["Soldier_MG_PMC"];
+_u = _u + ["Soldier_GL_PMC"];
+_u = _u + ["Soldier_Sniper_KSVK_PMC"];
+_u = _u + ["Soldier_AT_PMC"];
+_u = _u + ["Soldier_Bodyguard_M4_PMC"];
+_u = _u + ["Soldier_Medic_PMC"];
+[Format["WFBE_RES%1UNITS",_n select (count _n - 1)],_u,true] Call SetNamespace;
+
+_n = _n + ["MotorizedGroup"];
+_u = ["Guerrila", "PMC_BAF", "Motorized", "PMC_Armored_Patrol"] Call GetGroupFromConfig;
+[Format["WFBE_RES%1UNITS",_n select (count _n - 1)],_u,true] Call SetNamespace;
+
+_n = _n + ["MotorizedAATeam"];
+_u = ["Soldier_TL_PMC"];
+_u = _u + ["Ural_ZU23_TK_GUE_EP1"];
+_u = _u + ["Soldier_Sniper_PMC"];
+_u = _u + ["Soldier_AA_PMC"];
+_u = _u + ["Soldier_PMC"];
+[Format["WFBE_RES%1UNITS",_n select (count _n - 1)],_u,true] Call SetNamespace;
+
+_n = _n + ["MechanizedPatrol"];
+_u = ["Soldier_Bodyguard_M4_PMC"];
+_u = _u + ["BTR40_MG_TK_GUE_EP1"];
+_u = _u + ["BRDM2_TK_GUE_EP1"];
+_u = _u + ["Soldier_Bodyguard_AA12_PMC"];
+_u = _u + ["Soldier_PMC"];
+[Format["WFBE_RES%1UNITS",_n select (count _n - 1)],_u,true] Call SetNamespace;
+
+_n = _n + ["MechanizedGroup"];
+_u = ["Soldier_TL_PMC"];
+_u = _u + ["T34_TK_GUE_EP1"];
+_u = _u + ["ArmoredSUV_PMC"];
+_u = _u + ["Soldier_MG_PMC"];
+_u = _u + ["Soldier_Bodyguard_AA12_PMC"];
+_u = _u + ["Soldier_AT_PMC"];
+_u = _u + ["Soldier_Bodyguard_M4_PMC"];
+_u = _u + ["Soldier_Sniper_KSVK_PMC"];
+_u = _u + ["Soldier_AT_PMC"];
+[Format["WFBE_RES%1UNITS",_n select (count _n - 1)],_u,true] Call SetNamespace;
+
+_n = _n + ["LightArmor"];
+_u = ["T34_TK_GUE_EP1"];
+_u = _u + ["T34_TK_GUE_EP1"];
+[Format["WFBE_RES%1UNITS",_n select (count _n - 1)],_u,true] Call SetNamespace;
+
+_n = _n + ["HeavyArmor"];
+_u = ["T55_TK_GUE_EP1"];
+_u = _u + ["T55_TK_GUE_EP1"];
+[Format["WFBE_RES%1UNITS",_n select (count _n - 1)],_u,true] Call SetNamespace;
+
+//--- Patroling Resistance.
+if (('WFBE_RESPATROL' Call GetNamespace) > 0) then {
+ ['WFBE_RESPATROLTYPE10',['Soldier_PMC','Soldier_MG_PKM_PMC','Soldier_Sniper_PMC','Soldier_Medic_PMC'],true] Call SetNamespace;
+ ['WFBE_RESPATROLTYPE11',['Soldier_TL_PMC','Soldier_MG_PMC','Soldier_M4A3_PMC','Soldier_AT_PMC','Soldier_GL_PMC'],true] Call SetNamespace;
+ ['WFBE_RESPATROLTYPE12',['ArmoredSUV_PMC','ArmoredSUV_PMC'],true] Call SetNamespace;
+ ['WFBE_RESPATROLTYPE20',['BTR40_MG_TK_GUE_EP1','Ural_ZU23_TK_GUE_EP1'],true] Call SetNamespace;
+ ['WFBE_RESPATROLTYPE21',['SUV_PMC','Soldier_TL_PMC','Soldier_AT_PMC','Soldier_Bodyguard_AA12_PMC'],true] Call SetNamespace;
+ ['WFBE_RESPATROLTYPE22',['BTR40_MG_TK_GUE_EP1','Soldier_AA_PMC','Soldier_AA_PMC','Soldier_Medic_PMC'],true] Call SetNamespace;
+ ['WFBE_RESPATROLTYPE30',['T34_TK_GUE_EP1','T34_TK_GUE_EP1'],true] Call SetNamespace;
+ ['WFBE_RESPATROLTYPE31',['T55_TK_GUE_EP1','T55_TK_GUE_EP1'],true] Call SetNamespace;
+ ['WFBE_RESPATROLTYPE32',['Ka60_GL_PMC','Soldier_TL_PMC','Soldier_AT_PMC','Soldier_Bodyguard_M4_PMC','Soldier_Bodyguard_M4_PMC'],true] Call SetNamespace;
+};
+
+//--- Base Attacker Resistance.
+if (('WFBE_RESSTRIKER' Call GetNamespace) > 0) then {
+ ['WFBE_RESSTRIKERTYPE10',['ArmoredSUV_PMC','Soldier_PMC','Soldier_PMC'],true] Call SetNamespace;
+ ['WFBE_RESSTRIKERTYPE11',['Soldier_TL_PMC','Soldier_Bodyguard_M4_PMC','Soldier_M4A3_PMC','Soldier_AT_PMC','Soldier_AA_PMC'],true] Call SetNamespace;
+ ['WFBE_RESSTRIKERTYPE12',['Soldier_TL_PMC','Soldier_Bodyguard_AA12_PMC','Soldier_AA_PMC','Soldier_Engineer_PMC'],true] Call SetNamespace;
+ ['WFBE_RESSTRIKERTYPE13',['Ka60_PMC','Soldier_MG_PMC','Soldier_Medic_PMC','Soldier_AT_PMC','Soldier_AT_PMC'],true] Call SetNamespace;
+};
+
+diag_log Format ["[WFBE (INIT)][frameno:%1 | ticktime:%2] Resistance_PMC: Initialization - [Done]",diag_frameno,diag_tickTime]; \ No newline at end of file
diff --git a/Common/Config/Core_Resistance/Resistance_TKGUE.sqf b/Common/Config/Core_Resistance/Resistance_TKGUE.sqf
new file mode 100644
index 0000000..db5998b
--- /dev/null
+++ b/Common/Config/Core_Resistance/Resistance_TKGUE.sqf
@@ -0,0 +1,110 @@
+Private ["_n","_u"];
+
+//--- Resistance Key Units.
+['WFBE_GUERCREW','TK_GUE_Soldier_EP1',true] Call SetNamespace;
+['WFBE_GUERPILOT','TK_GUE_Soldier_EP1',true] Call SetNamespace;
+['WFBE_GUERSOLDIER','TK_GUE_Soldier_EP1',true] Call SetNamespace;
+
+//--- Town Resistance.
+_n = ["Group"];
+_u = ["Guerrila", "BIS_TK_GUE", "Infantry", "TK_GUE_Group"] Call GetGroupFromConfig;
+[Format["WFBE_RES%1UNITS",_n select (count _n - 1)],_u,true] Call SetNamespace;
+
+_n = _n + ["GroupAssault"];
+_u = ["TK_GUE_Warlord_EP1"];
+_u = _u + ["TK_GUE_Soldier_4_EP1"];
+_u = _u + ["TK_GUE_Soldier_AT_EP1"];
+_u = _u + ["TK_GUE_Soldier_AR_EP1"];
+_u = _u + ["TK_GUE_Soldier_MG_EP1"];
+_u = _u + ["TK_GUE_Soldier_HAT_EP1"];
+_u = _u + ["TK_GUE_Soldier_5_EP1"];
+_u = _u + ["TK_GUE_Bonesetter_EP1"];
+[Format["WFBE_RES%1UNITS",_n select (count _n - 1)],_u,true] Call SetNamespace;
+
+_n = _n + ["GroupWeapons"];
+_u = ["Guerrila", "BIS_TK_GUE", "Infantry", "TK_GUE_GroupWeapons"] Call GetGroupFromConfig;
+[Format["WFBE_RES%1UNITS",_n select (count _n - 1)],_u,true] Call SetNamespace;
+
+_n = _n + ["Patrol1"];
+_u = ["Guerrila", "BIS_TK_GUE", "Infantry", "TK_GUE_Patrol"] Call GetGroupFromConfig;
+[Format["WFBE_RES%1UNITS",_n select (count _n - 1)],_u,true] Call SetNamespace;
+
+_n = _n + ["Patrol2"];
+_u = ["TK_GUE_Soldier_EP1"];
+_u = _u + ["TK_GUE_Soldier_AR_EP1"];
+_u = _u + ["TK_GUE_Soldier_4_EP1"];
+_u = _u + ["TK_GUE_Soldier_HAT_EP1"];
+[Format["WFBE_RES%1UNITS",_n select (count _n - 1)],_u,true] Call SetNamespace;
+
+_n = _n + ["ATTeam"];
+_u = ["Guerrila", "BIS_TK_GUE", "Infantry", "TK_GUE_ATTeam"] Call GetGroupFromConfig;
+[Format["WFBE_RES%1UNITS",_n select (count _n - 1)],_u,true] Call SetNamespace;
+
+_n = _n + ["AATeam"];
+_u = ["Guerrila", "BIS_TK_GUE", "Infantry", "TK_GUE_AATeam"] Call GetGroupFromConfig;
+[Format["WFBE_RES%1UNITS",_n select (count _n - 1)],_u,true] Call SetNamespace;
+
+_n = _n + ["SniperTeam"];
+_u = ["Guerrila", "BIS_TK_GUE", "Infantry", "TK_GUE_SniperTeam"] Call GetGroupFromConfig;
+[Format["WFBE_RES%1UNITS",_n select (count _n - 1)],_u,true] Call SetNamespace;
+
+_n = _n + ["Militia"];
+_u = ["TK_GUE_Soldier_2_EP1"];
+_u = _u + ["TK_GUE_Soldier_3_EP1"];
+_u = _u + ["TK_GUE_Soldier_4_EP1"];
+_u = _u + ["TK_GUE_Soldier_5_EP1"];
+_u = _u + ["TK_GUE_Bonesetter_EP1"];
+_u = _u + ["TK_GUE_Soldier_EP1"];
+[Format["WFBE_RES%1UNITS",_n select (count _n - 1)],_u,true] Call SetNamespace;
+
+_n = _n + ["Technical"];
+_u = ["Guerrila", "BIS_TK_GUE", "Motorized", "TK_GUE_Technicals"] Call GetGroupFromConfig;
+[Format["WFBE_RES%1UNITS",_n select (count _n - 1)],_u,true] Call SetNamespace;
+
+_n = _n + ["MotorizedGroup"];
+_u = ["Guerrila", "BIS_TK_GUE", "Motorized", "TK_GUE_MotorizedGroup"] Call GetGroupFromConfig;
+[Format["WFBE_RES%1UNITS",_n select (count _n - 1)],_u,true] Call SetNamespace;
+
+_n = _n + ["MotorizedAATeam"];
+_u = ["Guerrila", "BIS_TK_GUE", "Motorized", "TK_GUE_MotorizedPatrol"] Call GetGroupFromConfig;
+_u = _u + ["Ural_ZU23_TK_GUE_EP1"];
+[Format["WFBE_RES%1UNITS",_n select (count _n - 1)],_u,true] Call SetNamespace;
+
+_n = _n + ["MechanizedPatrol"];
+_u = ["Guerrila", "BIS_TK_GUE", "Mechanized", "TK_GUE_MechanizedPatrol"] Call GetGroupFromConfig;
+[Format["WFBE_RES%1UNITS",_n select (count _n - 1)],_u,true] Call SetNamespace;
+
+_n = _n + ["MechanizedGroup"];
+_u = ["Guerrila", "BIS_TK_GUE", "Mechanized", "TK_GUE_MechanizedGroup"] Call GetGroupFromConfig;
+[Format["WFBE_RES%1UNITS",_n select (count _n - 1)],_u,true] Call SetNamespace;
+
+_n = _n + ["LightArmor"];
+_u = ["Guerrila", "BIS_TK_GUE", "Armored", "TK_GUE_T34Platoon"] Call GetGroupFromConfig;
+[Format["WFBE_RES%1UNITS",_n select (count _n - 1)],_u,true] Call SetNamespace;
+
+_n = _n + ["HeavyArmor"];
+_u = ["Guerrila", "BIS_TK_GUE", "Armored", "TK_GUE_T55Section"] Call GetGroupFromConfig;
+[Format["WFBE_RES%1UNITS",_n select (count _n - 1)],_u,true] Call SetNamespace;
+
+//--- Patroling Resistance.
+if (('WFBE_RESPATROL' Call GetNamespace) > 0) then {
+ ['WFBE_RESPATROLTYPE10',['TK_GUE_Soldier_EP1','TK_GUE_Soldier_MG_EP1','TK_GUE_Soldier_Sniper_EP1','TK_GUE_Bonesetter_EP1'],true] Call SetNamespace;
+ ['WFBE_RESPATROLTYPE11',['TK_GUE_Warlord_EP1','TK_GUE_Soldier_AR_EP1','TK_GUE_Soldier_3_EP1','TK_GUE_Soldier_AT_EP1','TK_GUE_Soldier_4_EP1'],true] Call SetNamespace;
+ ['WFBE_RESPATROLTYPE12',['Offroad_DSHKM_TK_GUE_EP1','Offroad_SPG9_TK_GUE_EP1'],true] Call SetNamespace;
+ ['WFBE_RESPATROLTYPE20',['BTR40_MG_TK_GUE_EP1','Ural_ZU23_TK_GUE_EP1'],true] Call SetNamespace;
+ ['WFBE_RESPATROLTYPE21',['V3S_TK_GUE_EP1','TK_GUE_Warlord_EP1','TK_GUE_Soldier_AT_EP1','TK_GUE_Soldier_MG_EP1','TK_GUE_Soldier_HAT_EP1'],true] Call SetNamespace;
+ ['WFBE_RESPATROLTYPE22',['BTR40_MG_TK_GUE_EP1','TK_GUE_Soldier_AA_EP1','TK_GUE_Soldier_AA_EP1','TK_GUE_Bonesetter_EP1'],true] Call SetNamespace;
+ ['WFBE_RESPATROLTYPE30',['T34_TK_GUE_EP1','T34_TK_GUE_EP1'],true] Call SetNamespace;
+ ['WFBE_RESPATROLTYPE31',['T55_TK_GUE_EP1','T55_TK_GUE_EP1'],true] Call SetNamespace;
+ ['WFBE_RESPATROLTYPE32',['TK_GUE_Soldier_Sniper_EP1','TK_GUE_Soldier_5_EP1','TK_GUE_Soldier_Sniper_EP1'],true] Call SetNamespace;
+};
+
+//--- Base Attacker Resistance.
+if (('WFBE_RESSTRIKER' Call GetNamespace) > 0) then {
+ ['WFBE_RESSTRIKERTYPE10',['TK_GUE_Soldier_EP1','TK_GUE_Soldier_5_EP1','TK_GUE_Soldier_Sniper_EP1'],true] Call SetNamespace;
+ ['WFBE_RESSTRIKERTYPE11',['TK_GUE_Warlord_EP1','TK_GUE_Soldier_AR_EP1','TK_GUE_Soldier_3_EP1','TK_GUE_Soldier_AT_EP1','TK_GUE_Soldier_4_EP1'],true] Call SetNamespace;
+ ['WFBE_RESSTRIKERTYPE12',['TK_GUE_Warlord_EP1','TK_GUE_Soldier_AA_EP1','TK_GUE_Soldier_AA_EP1','TK_GUE_Soldier_3_EP1'],true] Call SetNamespace;
+ ['WFBE_RESSTRIKERTYPE13',['TK_GUE_Warlord_EP1','TK_GUE_Soldier_MG_EP1','TK_GUE_Bonesetter_EP1','TK_GUE_Soldier_AT_EP1','TK_GUE_Soldier_AT_EP1'],true] Call SetNamespace;
+};
+
+diag_log Format ["[WFBE (INIT)][frameno:%1 | ticktime:%2] Resistance_TKGUE: Initialization - [Done]",diag_frameno,diag_tickTime]; \ No newline at end of file
diff --git a/Common/Config/Core_Squads/Arrowhead/Squad_TK.sqf b/Common/Config/Core_Squads/Arrowhead/Squad_TK.sqf
new file mode 100644
index 0000000..7ba782e
--- /dev/null
+++ b/Common/Config/Core_Squads/Arrowhead/Squad_TK.sqf
@@ -0,0 +1,285 @@
+Private ['_aiTeamTemplateRequires','_aiTeamTemplates','_aiTeamTypes','_aiTeamUpgrades','_d','_f','_l','_u'];
+
+_aiTeamTemplates = [];
+_aiTeamTemplateRequires = [];
+_aiTeamTypes = [];
+_aiTeamUpgrades = [];
+
+_d = ["Infantry - Infantry Squad"];
+_u = ["TK_Soldier_SL_EP1"];
+_u = _u + ["TK_Soldier_MG_EP1"];
+_u = _u + ["TK_Soldier_AT_EP1"];
+_u = _u + ["TK_Soldier_LAT_EP1"];
+_u = _u + ["TK_Soldier_Spotter_EP1"];
+_u = _u + ["TK_Soldier_AR_EP1"];
+_u = _u + ["TK_Soldier_GL_EP1"];
+_u = _u + ["TK_Soldier_EP1"];
+_f = [true,false,false,false];
+_l = [0,0,0,0];
+
+_aiTeamTemplates = _aiTeamTemplates + [_u];
+_aiTeamTemplateRequires = _aiTeamTemplateRequires + [_f];
+_aiTeamTypes = _aiTeamTypes + [0];
+_aiTeamUpgrades = _aiTeamUpgrades + [_l];
+
+_d = _d + ["Infantry - Infantry Section"];
+_u = ["TK_Soldier_SL_EP1"];
+_u = _u + ["TK_Soldier_AR_EP1"];
+_u = _u + ["TK_Soldier_AT_EP1"];
+_u = _u + ["TK_Soldier_GL_EP1"];
+_u = _u + ["TK_Soldier_EP1"];
+_f = [true,false,false,false];
+_l = [1,0,0,0];
+
+_aiTeamTemplates = _aiTeamTemplates + [_u];
+_aiTeamTemplateRequires = _aiTeamTemplateRequires + [_f];
+_aiTeamTypes = _aiTeamTypes + [0];
+_aiTeamUpgrades = _aiTeamUpgrades + [_l];
+
+_d = _d + ["Infantry - Infantry Section (AT)"];
+_u = ["TK_Soldier_AT_EP1"];
+_u = _u + ["TK_Soldier_AT_EP1"];
+_u = _u + ["TK_Soldier_LAT_EP1"];
+_u = _u + ["TK_Soldier_EP1"];
+_f = [true,false,false,false];
+_l = [1,0,0,0];
+
+_aiTeamTemplates = _aiTeamTemplates + [_u];
+_aiTeamTemplateRequires = _aiTeamTemplateRequires + [_f];
+_aiTeamTypes = _aiTeamTypes + [0];
+_aiTeamUpgrades = _aiTeamUpgrades + [_l];
+
+_d = _d + ["Infantry - Infantry Section (HAT)"];
+_u = ["TK_Soldier_HAT_EP1"];
+_u = _u + ["TK_Soldier_HAT_EP1"];
+_u = _u + ["TK_Soldier_AT_EP1"];
+_u = _u + ["TK_Soldier_EP1"];
+_f = [true,false,false,false];
+_l = [3,0,0,0];
+
+_aiTeamTemplates = _aiTeamTemplates + [_u];
+_aiTeamTemplateRequires = _aiTeamTemplateRequires + [_f];
+_aiTeamTypes = _aiTeamTypes + [0];
+_aiTeamUpgrades = _aiTeamUpgrades + [_l];
+
+_d = _d + ["Infantry - Infantry Section (AA)"];
+_u = ["TK_Soldier_AA_EP1"];
+_u = _u + ["TK_Soldier_AA_EP1"];
+_u = _u + ["TK_Soldier_AA_EP1"];
+_u = _u + ["TK_Soldier_EP1"];
+_f = [true,false,false,false];
+_l = [2,0,0,0];
+
+_aiTeamTemplates = _aiTeamTemplates + [_u];
+_aiTeamTemplateRequires = _aiTeamTemplateRequires + [_f];
+_aiTeamTypes = _aiTeamTypes + [0];
+_aiTeamUpgrades = _aiTeamUpgrades + [_l];
+
+_d = _d + ["Infantry - Infantry Section (AA/AT)"];
+_u = ["TK_Soldier_SL_EP1"];
+_u = _u + ["TK_Soldier_AA_EP1"];
+_u = _u + ["TK_Soldier_AA_EP1"];
+_u = _u + ["TK_Soldier_LAT_EP1"];
+_u = _u + ["TK_Soldier_AT_EP1"];
+_u = _u + ["TK_Soldier_EP1"];
+_f = [true,false,false,false];
+_l = [2,0,0,0];
+
+_aiTeamTemplates = _aiTeamTemplates + [_u];
+_aiTeamTemplateRequires = _aiTeamTemplateRequires + [_f];
+_aiTeamTypes = _aiTeamTypes + [0];
+_aiTeamUpgrades = _aiTeamUpgrades + [_l];
+
+_d = _d + ["Infantry - Infantry Section (MG)"];
+_u = ["TK_Soldier_SL_EP1"];
+_u = _u + ["TK_Soldier_MG_EP1"];
+_u = _u + ["TK_Soldier_MG_EP1"];
+_u = _u + ["TK_Soldier_GL_EP1"];
+_u = _u + ["TK_Soldier_AT_EP1"];
+_f = [true,false,false,false];
+_l = [1,0,0,0];
+
+_aiTeamTemplates = _aiTeamTemplates + [_u];
+_aiTeamTemplateRequires = _aiTeamTemplateRequires + [_f];
+_aiTeamTypes = _aiTeamTypes + [0];
+_aiTeamUpgrades = _aiTeamUpgrades + [_l];
+
+_d = _d + ["Infantry - Snipers Team"];
+_u = ["TK_Soldier_Spotter_EP1"];
+_u = _u + ["TK_Soldier_Sniper_EP1"];
+_f = [true,false,false,false];
+_l = [2,0,0,0];
+
+_aiTeamTemplates = _aiTeamTemplates + [_u];
+_aiTeamTemplateRequires = _aiTeamTemplateRequires + [_f];
+_aiTeamTypes = _aiTeamTypes + [0];
+_aiTeamUpgrades = _aiTeamUpgrades + [_l];
+
+_d = _d + ["Infantry - Special Ops Team"];
+_u = ["TK_Special_Forces_EP1"];
+_u = _u + ["TK_Special_Forces_TL_EP1"];
+_u = _u + ["TK_Special_Forces_MG_EP1"];
+_f = [true,false,false,false];
+_l = [3,0,0,0];
+
+_aiTeamTemplates = _aiTeamTemplates + [_u];
+_aiTeamTemplateRequires = _aiTeamTemplateRequires + [_f];
+_aiTeamTypes = _aiTeamTypes + [0];
+_aiTeamUpgrades = _aiTeamUpgrades + [_l];
+
+_d = _d + ["Motorized Infantry - Motorized Infantry Squad"];
+_u = ["TK_Soldier_SL_EP1"];
+_u = _u + ["V3S_TK_EP1"];
+_u = _u + ["TK_Soldier_MG_EP1"];
+_u = _u + ["TK_Soldier_AT_EP1"];
+_u = _u + ["TK_Soldier_LAT_EP1"];
+_u = _u + ["TK_Soldier_Spotter_EP1"];
+_u = _u + ["TK_Soldier_MG_EP1"];
+_u = _u + ["TK_Soldier_AR_EP1"];
+_u = _u + ["TK_Soldier_GL_EP1"];
+_u = _u + ["TK_Soldier_EP1"];
+_f = [true,true,false,false];
+_l = [1,0,0,0];
+
+_aiTeamTemplates = _aiTeamTemplates + [_u];
+_aiTeamTemplateRequires = _aiTeamTemplateRequires + [_f];
+_aiTeamTypes = _aiTeamTypes + [1];
+_aiTeamUpgrades = _aiTeamUpgrades + [_l];
+
+_d = _d + ["Motorized Infantry - Motorized Patrol Section"];
+_u = ["TK_Soldier_SL_EP1"];
+_u = _u + ["BRDM2_TK_EP1"];
+_f = [true,true,false,false];
+_l = [0,1,0,0];
+
+_aiTeamTemplates = _aiTeamTemplates + [_u];
+_aiTeamTemplateRequires = _aiTeamTemplateRequires + [_f];
+_aiTeamTypes = _aiTeamTypes + [1];
+_aiTeamUpgrades = _aiTeamUpgrades + [_l];
+
+_d = _d + ["Mechanized Infantry - Motor Rifles (BMP)"];
+_u = ["TK_Soldier_SL_EP1"];
+_u = _u + ["BMP2_TK_EP1"];
+_u = _u + ["TK_Soldier_MG_EP1"];
+_u = _u + ["TK_Soldier_AT_EP1"];
+_u = _u + ["TK_Soldier_LAT_EP1"];
+_u = _u + ["TK_Soldier_GL_EP1"];
+_f = [true,false,true,false];
+_l = [1,0,0,0];
+
+_aiTeamTemplates = _aiTeamTemplates + [_u];
+_aiTeamTemplateRequires = _aiTeamTemplateRequires + [_f];
+_aiTeamTypes = _aiTeamTypes + [2];
+_aiTeamUpgrades = _aiTeamUpgrades + [_l];
+
+_d = _d + ["Mechanized Infantry - Motor Rifles (BTR)"];
+_u = ["TK_Soldier_SL_EP1"];
+_u = _u + ["BTR60_TK_EP1"];
+_u = _u + ["TK_Soldier_MG_EP1"];
+_u = _u + ["TK_Soldier_MG_EP1"];
+_u = _u + ["TK_Soldier_AT_EP1"];
+_u = _u + ["TK_Soldier_LAT_EP1"];
+_u = _u + ["TK_Soldier_GL_EP1"];
+_f = [true,true,false,false];
+_l = [1,2,0,0];
+
+_aiTeamTemplates = _aiTeamTemplates + [_u];
+_aiTeamTemplateRequires = _aiTeamTemplateRequires + [_f];
+_aiTeamTypes = _aiTeamTypes + [1];
+_aiTeamUpgrades = _aiTeamUpgrades + [_l];
+
+_d = _d + ["Armor - IFV Platoon (Light)"];
+_u = ["BMP2_TK_EP1"];
+_u = _u + ["BMP2_TK_EP1"];
+_f = [false,false,true,false];
+_l = [0,0,0,0];
+
+_aiTeamTemplates = _aiTeamTemplates + [_u];
+_aiTeamTemplateRequires = _aiTeamTemplateRequires + [_f];
+_aiTeamTypes = _aiTeamTypes + [2];
+_aiTeamUpgrades = _aiTeamUpgrades + [_l];
+
+_d = _d + ["Armor - Anti Air Platoon"];
+_u = ["ZSU_TK_EP1"];
+_u = _u + ["ZSU_TK_EP1"];
+_f = [false,false,true,false];
+_l = [0,0,1,0];
+
+_aiTeamTemplates = _aiTeamTemplates + [_u];
+_aiTeamTemplateRequires = _aiTeamTemplateRequires + [_f];
+_aiTeamTypes = _aiTeamTypes + [2];
+_aiTeamUpgrades = _aiTeamUpgrades + [_l];
+
+_d = _d + ["Armor - Tank Platoon (Light)"];
+_u = ["T55_TK_EP1"];
+_u = _u + ["T55_TK_EP1"];
+_f = [false,false,true,false];
+_l = [0,0,1,0];
+
+_aiTeamTemplates = _aiTeamTemplates + [_u];
+_aiTeamTemplateRequires = _aiTeamTemplateRequires + [_f];
+_aiTeamTypes = _aiTeamTypes + [2];
+_aiTeamUpgrades = _aiTeamUpgrades + [_l];
+
+_d = _d + ["Armor - Tank Platoon (Heavy)"];
+_u = ["T72_TK_EP1"];
+_u = _u + ["T72_TK_EP1"];
+_f = [false,false,true,false];
+_l = [0,0,2,0];
+
+_aiTeamTemplates = _aiTeamTemplates + [_u];
+_aiTeamTemplateRequires = _aiTeamTemplateRequires + [_f];
+_aiTeamTypes = _aiTeamTypes + [2];
+_aiTeamUpgrades = _aiTeamUpgrades + [_l];
+
+_d = _d + ["Air - Mi-17 Squadron"];
+_u = ["Mi17_TK_EP1"];
+_u = _u + ["TK_Soldier_SL_EP1"];
+_u = _u + ["TK_Soldier_AA_EP1"];
+_u = _u + ["TK_Soldier_AA_EP1"];
+_u = _u + ["TK_Soldier_LAT_EP1"];
+_u = _u + ["TK_Soldier_LAT_EP1"];
+_u = _u + ["TK_Soldier_MG_EP1"];
+_u = _u + ["TK_Soldier_MG_EP1"];
+_f = [true,false,false,true];
+_l = [2,0,0,0];
+
+_aiTeamTemplates = _aiTeamTemplates + [_u];
+_aiTeamTemplateRequires = _aiTeamTemplateRequires + [_f];
+_aiTeamTypes = _aiTeamTypes + [3];
+_aiTeamUpgrades = _aiTeamUpgrades + [_l];
+
+_d = _d + ["Air - Mi-24 Squadron"];
+_u = ["Mi24_D_TK_EP1"];
+_u = _u + ["Mi24_D_TK_EP1"];
+_f = [false,false,false,true];
+_l = [0,0,0,1];
+
+_aiTeamTemplates = _aiTeamTemplates + [_u];
+_aiTeamTemplateRequires = _aiTeamTemplateRequires + [_f];
+_aiTeamTypes = _aiTeamTypes + [3];
+_aiTeamUpgrades = _aiTeamUpgrades + [_l];
+
+_d = _d + ["Air - L39 Squadron"];
+_u = ["L39_TK_EP1"];
+_u = _u + ["L39_TK_EP1"];
+_f = [false,false,false,true];
+_l = [0,0,0,2];
+
+_aiTeamTemplates = _aiTeamTemplates + [_u];
+_aiTeamTemplateRequires = _aiTeamTemplateRequires + [_f];
+_aiTeamTypes = _aiTeamTypes + [3];
+_aiTeamUpgrades = _aiTeamUpgrades + [_l];
+
+_d = _d + ["Air - Sukhoi 25 Squadron"];
+_u = ["Su25_TK_EP1"];
+_u = _u + ["Su25_TK_EP1"];
+_f = [false,false,false,true];
+_l = [0,0,0,3];
+
+_aiTeamTemplates = _aiTeamTemplates + [_u];
+_aiTeamTemplateRequires = _aiTeamTemplateRequires + [_f];
+_aiTeamTypes = _aiTeamTypes + [3];
+_aiTeamUpgrades = _aiTeamUpgrades + [_l];
+
+[_aiTeamTemplates,_aiTeamTemplateRequires,_aiTeamTypes,_aiTeamUpgrades,_d] \ No newline at end of file
diff --git a/Common/Config/Core_Squads/Arrowhead/Squad_TKA.sqf b/Common/Config/Core_Squads/Arrowhead/Squad_TKA.sqf
new file mode 100644
index 0000000..8360f83
--- /dev/null
+++ b/Common/Config/Core_Squads/Arrowhead/Squad_TKA.sqf
@@ -0,0 +1,45 @@
+Private ['_aiTeamTemplateRequires','_aiTeamTemplateName','_aiTeamTemplates','_aiTeamTypes','_aiTeamUpgrades','_return','_u'];
+
+//--- Overall Dump.
+_return = ["East", "BIS_TK", ["TK_An2Flight"]] Call Compile preprocessFile "Common\Config\Core_Squads\Squads_GetFactionGroups.sqf";
+_aiTeamTemplates = _return select 0;
+_aiTeamTemplateName = _return select 1;
+_aiTeamTemplateRequires = _return select 2;
+_aiTeamTypes = _return select 3;
+_aiTeamUpgrades = _return select 4;
+
+//--- Custom Groups.
+_u = ["BMP2_TK_EP1"];
+_u = _u + ["BMP2_TK_EP1"];
+
+_aiTeamTemplateName = _aiTeamTemplateName + ["Armor - IFV Platoon (Light)"];
+_aiTeamTemplates = _aiTeamTemplates + [_u];
+_aiTeamTemplateRequires = _aiTeamTemplateRequires + [[false,false,true,false]];
+_aiTeamTypes = _aiTeamTypes + [2];
+_aiTeamUpgrades = _aiTeamUpgrades + [[0,0,0,0]];
+
+_u = ["ZSU_TK_EP1"];
+_u = _u + ["ZSU_TK_EP1"];
+
+_aiTeamTemplateName = _aiTeamTemplateName + ["Armor - Anti Air Platoon"];
+_aiTeamTemplates = _aiTeamTemplates + [_u];
+_aiTeamTemplateRequires = _aiTeamTemplateRequires + [[false,false,true,false]];
+_aiTeamTypes = _aiTeamTypes + [2];
+_aiTeamUpgrades = _aiTeamUpgrades + [[0,0,1,0]];
+
+_u = ["Mi17_TK_EP1"];
+_u = _u + ["TK_Soldier_SL_EP1"];
+_u = _u + ["TK_Soldier_AA_EP1"];
+_u = _u + ["TK_Soldier_AA_EP1"];
+_u = _u + ["TK_Soldier_LAT_EP1"];
+_u = _u + ["TK_Soldier_LAT_EP1"];
+_u = _u + ["TK_Soldier_MG_EP1"];
+_u = _u + ["TK_Soldier_MG_EP1"];
+
+_aiTeamTemplateName = _aiTeamTemplateName + ["Air - Infantry Mi-17 Squadron"];
+_aiTeamTemplates = _aiTeamTemplates + [_u];
+_aiTeamTemplateRequires = _aiTeamTemplateRequires + [[true,false,false,true]];
+_aiTeamTypes = _aiTeamTypes + [3];
+_aiTeamUpgrades = _aiTeamUpgrades + [[2,0,0,0]];
+
+[_aiTeamTemplates,_aiTeamTemplateRequires,_aiTeamTypes,_aiTeamUpgrades,_aiTeamTemplateName] \ No newline at end of file
diff --git a/Common/Config/Core_Squads/Arrowhead/Squad_US.sqf b/Common/Config/Core_Squads/Arrowhead/Squad_US.sqf
new file mode 100644
index 0000000..8003458
--- /dev/null
+++ b/Common/Config/Core_Squads/Arrowhead/Squad_US.sqf
@@ -0,0 +1,45 @@
+Private ['_aiTeamTemplateRequires','_aiTeamTemplateName','_aiTeamTemplates','_aiTeamTypes','_aiTeamUpgrades','_return','_u'];
+
+//--- Overall Dump.
+_return = ["West", "BIS_US", ["US_AH6XFlight","US_C130JFlight","US_MQ9Flight"]] Call Compile preprocessFile "Common\Config\Core_Squads\Squads_GetFactionGroups.sqf";
+_aiTeamTemplates = _return select 0;
+_aiTeamTemplateName = _return select 1;
+_aiTeamTemplateRequires = _return select 2;
+_aiTeamTypes = _return select 3;
+_aiTeamUpgrades = _return select 4;
+
+//--- Custom Groups.
+_u = ["M2A2_EP1"];
+_u = _u + ["M2A2_EP1"];
+
+_aiTeamTemplateName = _aiTeamTemplateName + ["Armor - APC Platoon (Bradley)"];
+_aiTeamTemplates = _aiTeamTemplates + [_u];
+_aiTeamTemplateRequires = _aiTeamTemplateRequires + [[false,false,true,false]];
+_aiTeamTypes = _aiTeamTypes + [2];
+_aiTeamUpgrades = _aiTeamUpgrades + [[0,0,1,0]];
+
+_u = ["M6_EP1"];
+_u = _u + ["M6_EP1"];
+
+_aiTeamTemplateName = _aiTeamTemplateName + ["Armor - Anti-Air Platoon"];
+_aiTeamTemplates = _aiTeamTemplates + [_u];
+_aiTeamTemplateRequires = _aiTeamTemplateRequires + [[false,false,true,false]];
+_aiTeamTypes = _aiTeamTypes + [2];
+_aiTeamUpgrades = _aiTeamUpgrades + [[0,0,3,0]];
+
+_u = ["CH_47F_EP1"];
+_u = _u + ["US_Soldier_TL_EP1"];
+_u = _u + ["US_Soldier_AR_EP1"];
+_u = _u + ["US_Soldier_LAT_EP1"];
+_u = _u + ["US_Soldier_Medic_EP1"];
+_u = _u + ["US_Soldier_EP1"];
+_u = _u + ["US_Soldier_EP1"];
+_u = _u + ["US_Soldier_EP1"];
+
+_aiTeamTemplateName = _aiTeamTemplateName + ["Air - Infantry CH-47F Squadron"];
+_aiTeamTemplates = _aiTeamTemplates + [_u];
+_aiTeamTemplateRequires = _aiTeamTemplateRequires + [[true,false,false,true]];
+_aiTeamTypes = _aiTeamTypes + [3];
+_aiTeamUpgrades = _aiTeamUpgrades + [[0,0,0,0]];
+
+[_aiTeamTemplates,_aiTeamTemplateRequires,_aiTeamTypes,_aiTeamUpgrades,_aiTeamTemplateName] \ No newline at end of file
diff --git a/Common/Config/Core_Squads/CombinedOps/Squad_US_Camo.sqf b/Common/Config/Core_Squads/CombinedOps/Squad_US_Camo.sqf
new file mode 100644
index 0000000..350bf06
--- /dev/null
+++ b/Common/Config/Core_Squads/CombinedOps/Squad_US_Camo.sqf
@@ -0,0 +1,51 @@
+Private ['_aiTeamTemplateRequires','_aiTeamTemplateName','_aiTeamTemplates','_aiTeamTypes','_aiTeamUpgrades','_return','_u'];
+
+//--- Overall Dump.
+_return = ["West", "USMC", ["USMC_MQ9Squadron","USMC_FRTeam_Razor"]] Call Compile preprocessFile "Common\Config\Core_Squads\Squads_GetFactionGroups.sqf";
+_aiTeamTemplates = _return select 0;
+_aiTeamTemplateName = _return select 1;
+_aiTeamTemplateRequires = _return select 2;
+_aiTeamTypes = _return select 3;
+_aiTeamUpgrades = _return select 4;
+
+//--- Custom Groups.
+_u = ["M1A1"];
+_u = _u + ["M1A1"];
+
+_aiTeamTemplateName = _aiTeamTemplateName + ["Armor - M1A1 Section"];
+_aiTeamTemplates = _aiTeamTemplates + [_u];
+_aiTeamTemplateRequires = _aiTeamTemplateRequires + [[false,false,true,false]];
+_aiTeamTypes = _aiTeamTypes + [2];
+_aiTeamUpgrades = _aiTeamUpgrades + [[0,0,1,0]];
+
+_u = ["UH1Y"];
+_u = _u + ["USMC_Soldier_TL"];
+_u = _u + ["USMC_Soldier_AR"];
+_u = _u + ["USMC_Soldier_LAT"];
+_u = _u + ["USMC_Soldier_Medic"];
+_u = _u + ["USMC_Soldier"];
+_u = _u + ["USMC_Soldier"];
+_u = _u + ["USMC_Soldier"];
+
+_aiTeamTemplateName = _aiTeamTemplateName + ["Air - Infantry UH1Y Squadron"];
+_aiTeamTemplates = _aiTeamTemplates + [_u];
+_aiTeamTemplateRequires = _aiTeamTemplateRequires + [[true,false,false,true]];
+_aiTeamTypes = _aiTeamTypes + [3];
+_aiTeamUpgrades = _aiTeamUpgrades + [[0,0,0,1]];
+
+_u = ["MH60S"];
+_u = _u + ["USMC_Soldier_TL"];
+_u = _u + ["USMC_Soldier_MG"];
+_u = _u + ["USMC_Soldier_AT"];
+_u = _u + ["USMC_Soldier_Medic"];
+_u = _u + ["USMC_Soldier"];
+_u = _u + ["USMC_Soldier"];
+_u = _u + ["USMC_Soldier"];
+
+_aiTeamTemplateName = _aiTeamTemplateName + ["Air - Infantry MH-60S Squadron"];
+_aiTeamTemplates = _aiTeamTemplates + [_u];
+_aiTeamTemplateRequires = _aiTeamTemplateRequires + [[true,false,false,true]];
+_aiTeamTypes = _aiTeamTypes + [3];
+_aiTeamUpgrades = _aiTeamUpgrades + [[2,0,0,0]];
+
+[_aiTeamTemplates,_aiTeamTemplateRequires,_aiTeamTypes,_aiTeamUpgrades,_aiTeamTemplateName] \ No newline at end of file
diff --git a/Common/Config/Core_Squads/Squads_GetFactionGroups.sqf b/Common/Config/Core_Squads/Squads_GetFactionGroups.sqf
new file mode 100644
index 0000000..cf5df82
--- /dev/null
+++ b/Common/Config/Core_Squads/Squads_GetFactionGroups.sqf
@@ -0,0 +1,78 @@
+/* Use this file if you wish to set quickly a faction's groups */
+Private ['_aiTeamTemplates','_aiTeamTemplateName','_aiTeamTemplateRequires','_aiTeamTypes','_aiTeamUpgrades','_blacklist','_cfgFaction','_faction','_side'];
+
+_side = _this select 0;
+_faction = _this select 1;
+_blacklist = if (count _this > 2) then {_this select 2} else {[]};
+
+_cfgFaction = configFile >> "CfgGroups" >> _side >> _faction;
+
+if !(isClass _cfgFaction) exitWith {diag_log Format ["[WFBE (ERROR)][frameno:%1 | ticktime:%2] Squads_SetFactionGroups: Entry (configFile >> '%3' >> '%4') is not a valid group config.",diag_frameno,diag_tickTime,_side,_faction]};
+
+_aiTeamTemplates = [];
+_aiTeamTemplateName = [];
+_aiTeamTemplateRequires = [];
+_aiTeamTypes = [];
+_aiTeamUpgrades = [];
+
+//--- Iterate through the faction's config and grab the group along with it's properties.
+for "_i" from 0 to ((count _cfgFaction) - 1) do {
+ Private ["_classKind"];
+ _classKind = _cfgFaction select _i;
+
+ // ACE CSW squads don't work quite right.
+ if (isClass _classKind && toUpper (configName(_classKind)) != "ACE_CSW_INFANTRY") then {
+ Private ["_nameKind"];
+ _nameKind = getText (_classKind >> "name");
+ for "_j" from 0 to ((count _classKind) - 1) do {
+ Private ["_classType"];
+ _classType = _classKind select _j;
+ if (isClass _classType && !(configName(_classType) in _blacklist)) then {
+ Private ["_factoryPool","_groupUnits","_levels","_nameGroup","_require"];
+ _nameGroup = getText (_classType >> "name");
+ _aiTeamTemplateName = _aiTeamTemplateName + [Format ["%1 - %2",_nameKind,_nameGroup]];
+ _groupUnits = [];
+ _require = [false, false, false, false];
+ _levels = [0,0,0,0];
+
+ for "_k" from 0 to ((count _classType) - 1) do {
+ Private ["_classUnit"];
+ _classUnit = _classType select _k;
+
+ if (isClass _classUnit) then {
+ Private ["_unit"];
+ _unit = getText (_classUnit >> "vehicle");
+ _groupUnits = _groupUnits + [_unit];
+
+ _get = _unit Call GetNamespace;
+ if !(isNil "_get") then {
+ _type = _get select QUERYUNITFACTORY;
+ _upgrade = _get select QUERYUNITUPGRADE;
+
+ _require set [_type, true];
+ _levels set [_type, _upgrade];
+ } else {
+ diag_log Format ["[WFBE (ERROR)][frameno:%2 | ticktime:%3] Squads_SetFactionGroups: Unit '%1' is not a defined within the core files.",_unit,diag_frameno,diag_tickTime];
+ /* TODO, Attempt to define*/
+ };
+ };
+ };
+
+ _factoryPool = switch (configName _classKind) do {
+ case "Infantry": {0};
+ case "Motorized": {1};
+ case "Mechanized": {2};
+ case "Armor": {2};
+ case "Air": {3};
+ default {0};
+ };
+ _aiTeamTypes = _aiTeamTypes + [_factoryPool];
+ _aiTeamUpgrades = _aiTeamUpgrades + [_levels];
+ _aiTeamTemplateRequires = _aiTeamTemplateRequires + [_require];
+ _aiTeamTemplates = _aiTeamTemplates + [_groupUnits];
+ };
+ };
+ };
+};
+
+[_aiTeamTemplates, _aiTeamTemplateName, _aiTeamTemplateRequires, _aiTeamTypes, _aiTeamUpgrades] \ No newline at end of file
diff --git a/Common/Config/Core_Squads/Vanilla/Squad_CDF.sqf b/Common/Config/Core_Squads/Vanilla/Squad_CDF.sqf
new file mode 100644
index 0000000..2ab99ed
--- /dev/null
+++ b/Common/Config/Core_Squads/Vanilla/Squad_CDF.sqf
@@ -0,0 +1,45 @@
+Private ['_aiTeamTemplateRequires','_aiTeamTemplateName','_aiTeamTemplates','_aiTeamTypes','_aiTeamUpgrades','_return','_u'];
+
+//--- Overall Dump.
+_return = ["West", "CDF"] Call Compile preprocessFile "Common\Config\Core_Squads\Squads_GetFactionGroups.sqf";
+_aiTeamTemplates = _return select 0;
+_aiTeamTemplateName = _return select 1;
+_aiTeamTemplateRequires = _return select 2;
+_aiTeamTypes = _return select 3;
+_aiTeamUpgrades = _return select 4;
+
+//--- Custom Groups.
+_u = ["BMP2_CDF"];
+_u = _u + ["BMP2_CDF"];
+
+_aiTeamTemplateName = _aiTeamTemplateName + ["Armor - APC Platoon"];
+_aiTeamTemplates = _aiTeamTemplates + [_u];
+_aiTeamTypes = _aiTeamTypes + [2];
+_aiTeamTemplateRequires = _aiTeamTemplateRequires + [[false,false,true,false]];
+_aiTeamUpgrades = _aiTeamUpgrades + [[0,0,2,0]];
+
+_u = ["ZSU_CDF"];
+_u = _u + ["ZSU_CDF"];
+
+_aiTeamTemplateName = _aiTeamTemplateName + ["Armor - AA Platoon"];
+_aiTeamTemplates = _aiTeamTemplates + [_u];
+_aiTeamTypes = _aiTeamTypes + [2];
+_aiTeamTemplateRequires = _aiTeamTemplateRequires + [[false,false,true,false]];
+_aiTeamUpgrades = _aiTeamUpgrades + [[0,0,1,0]];
+
+_u = ["Mi17_CDF"];
+_u = _u + ["CDF_Soldier_Medic"];
+_u = _u + ["CDF_Soldier_MG"];
+_u = _u + ["CDF_Soldier_AR"];
+_u = _u + ["CDF_Soldier_RPG"];
+_u = _u + ["CDF_Soldier_RPG"];
+_u = _u + ["CDF_Soldier_Spotter"];
+_u = _u + ["CDF_Soldier"];
+
+_aiTeamTemplateName = _aiTeamTemplateName + ["Air - Mi-8 Infantry Squadron"];
+_aiTeamTemplates = _aiTeamTemplates + [_u];
+_aiTeamTypes = _aiTeamTypes + [3];
+_aiTeamTemplateRequires = _aiTeamTemplateRequires + [[false,false,false,true]];
+_aiTeamUpgrades = _aiTeamUpgrades + [[1,0,0,0]];
+
+[_aiTeamTemplates,_aiTeamTemplateRequires,_aiTeamTypes,_aiTeamUpgrades,_aiTeamTemplateName] \ No newline at end of file
diff --git a/Common/Config/Core_Squads/Vanilla/Squad_INS.sqf b/Common/Config/Core_Squads/Vanilla/Squad_INS.sqf
new file mode 100644
index 0000000..f379743
--- /dev/null
+++ b/Common/Config/Core_Squads/Vanilla/Squad_INS.sqf
@@ -0,0 +1,45 @@
+Private ['_aiTeamTemplateRequires','_aiTeamTemplateName','_aiTeamTemplates','_aiTeamTypes','_aiTeamUpgrades','_return','_u'];
+
+//--- Overall Dump.
+_return = ["East", "INS"] Call Compile preprocessFile "Common\Config\Core_Squads\Squads_GetFactionGroups.sqf";
+_aiTeamTemplates = _return select 0;
+_aiTeamTemplateName = _return select 1;
+_aiTeamTemplateRequires = _return select 2;
+_aiTeamTypes = _return select 3;
+_aiTeamUpgrades = _return select 4;
+
+//--- Custom Groups.
+_u = ["BMP2_INS"];
+_u = _u + ["BMP2_INS"];
+
+_aiTeamTemplateName = _aiTeamTemplateName + ["Armor - APC Platoon"];
+_aiTeamTemplates = _aiTeamTemplates + [_u];
+_aiTeamTypes = _aiTeamTypes + [2];
+_aiTeamTemplateRequires = _aiTeamTemplateRequires + [[false,false,true,false]];
+_aiTeamUpgrades = _aiTeamUpgrades + [[0,0,2,0]];
+
+_u = ["ZSU_INS"];
+_u = _u + ["ZSU_INS"];
+
+_aiTeamTemplateName = _aiTeamTemplateName + ["Armor - AA Platoon"];
+_aiTeamTemplates = _aiTeamTemplates + [_u];
+_aiTeamTypes = _aiTeamTypes + [2];
+_aiTeamTemplateRequires = _aiTeamTemplateRequires + [[false,false,true,false]];
+_aiTeamUpgrades = _aiTeamUpgrades + [[0,0,1,0]];
+
+_u = ["Mi17_Ins"];
+_u = _u + ["Ins_Soldier_Medic"];
+_u = _u + ["Ins_Soldier_MG"];
+_u = _u + ["Ins_Soldier_AR"];
+_u = _u + ["Ins_Soldier_AT"];
+_u = _u + ["Ins_Soldier_AT"];
+_u = _u + ["Ins_Soldier_Sniper"];
+_u = _u + ["Ins_Soldier_1"];
+
+_aiTeamTemplateName = _aiTeamTemplateName + ["Air - Mi-8 Infantry Squadron"];
+_aiTeamTemplates = _aiTeamTemplates + [_u];
+_aiTeamTypes = _aiTeamTypes + [3];
+_aiTeamTemplateRequires = _aiTeamTemplateRequires + [[false,false,false,true]];
+_aiTeamUpgrades = _aiTeamUpgrades + [[1,0,0,0]];
+
+[_aiTeamTemplates,_aiTeamTemplateRequires,_aiTeamTypes,_aiTeamUpgrades,_aiTeamTemplateName] \ No newline at end of file
diff --git a/Common/Config/Core_Squads/Vanilla/Squad_RU.sqf b/Common/Config/Core_Squads/Vanilla/Squad_RU.sqf
new file mode 100644
index 0000000..39f77bc
--- /dev/null
+++ b/Common/Config/Core_Squads/Vanilla/Squad_RU.sqf
@@ -0,0 +1,70 @@
+Private ['_aiTeamTemplateRequires','_aiTeamTemplateName','_aiTeamTemplates','_aiTeamTypes','_aiTeamUpgrades','_return','_u'];
+
+//--- Overall Dump.
+_return = ["East", "RU", ["RU_Pchela1TSquadron","RU_Ka52Squadron"]] Call Compile preprocessFile "Common\Config\Core_Squads\Squads_GetFactionGroups.sqf";
+_aiTeamTemplates = _return select 0;
+_aiTeamTemplateName = _return select 1;
+_aiTeamTemplateRequires = _return select 2;
+_aiTeamTypes = _return select 3;
+_aiTeamUpgrades = _return select 4;
+
+//--- Custom Groups.
+_u = ["2S6M_Tunguska"];
+_u = _u + ["2S6M_Tunguska"];
+
+_aiTeamTemplateName = _aiTeamTemplateName + ["Armor - Anti Air Platoon"];
+_aiTeamTemplates = _aiTeamTemplates + [_u];
+_aiTeamTemplateRequires = _aiTeamTemplateRequires + [[false,false,true,false]];
+_aiTeamTypes = _aiTeamTypes + [2];
+_aiTeamUpgrades = _aiTeamUpgrades + [[0,0,3,0]];
+
+_u = ["T72_RU"];
+_u = _u + ["T72_RU"];
+
+_aiTeamTemplateName = _aiTeamTemplateName + ["Armor - Tank Platoon (Light)"];
+_aiTeamTemplates = _aiTeamTemplates + [_u];
+_aiTeamTemplateRequires = _aiTeamTemplateRequires + [[false,false,true,false]];
+_aiTeamTypes = _aiTeamTypes + [2];
+_aiTeamUpgrades = _aiTeamUpgrades + [[0,0,1,0]];
+
+_u = ["Mi17_Ins"];
+_u = _u + ["MVD_Soldier_TL"];
+_u = _u + ["MVD_Soldier_GL"];
+_u = _u + ["MVD_Soldier_MG"];
+_u = _u + ["MVD_Soldier_MG"];
+_u = _u + ["MVD_Soldier_Marksman"];
+_u = _u + ["MVD_Soldier_AT"];
+_u = _u + ["MVD_Soldier_AT"];
+
+_aiTeamTemplateName = _aiTeamTemplateName + ["Air - Infantry Mi-8 Squadron"];
+_aiTeamTemplates = _aiTeamTemplates + [_u];
+_aiTeamTemplateRequires = _aiTeamTemplateRequires + [[true,false,false,true]];
+_aiTeamTypes = _aiTeamTypes + [3];
+_aiTeamUpgrades = _aiTeamUpgrades + [[2,0,0,0]];
+
+_u = ["Mi17_rockets_RU"];
+_u = _u + ["RU_Soldier_TL"];
+_u = _u + ["RU_Soldier_AA"];
+_u = _u + ["RU_Soldier_LAT"];
+_u = _u + ["RU_Soldier_LAT"];
+_u = _u + ["RU_Soldier_MG"];
+_u = _u + ["RU_Soldier_MG"];
+
+_aiTeamTemplateName = _aiTeamTemplateName + ["Air - Infantry Mi-8 Squadron (Rockets)"];
+_aiTeamTemplates = _aiTeamTemplates + [_u];
+_aiTeamTemplateRequires = _aiTeamTemplateRequires + [[true,false,false,true]];
+_aiTeamTypes = _aiTeamTypes + [3];
+_aiTeamUpgrades = _aiTeamUpgrades + [[2,0,0,1]];
+
+if !(paramRestrictionKamov) then {
+ _u = ["Ka52Black"];
+ _u = _u + ["Ka52"];
+
+ _aiTeamTemplateName = _aiTeamTemplateName + ["Air - Ka-52 Squadron"];
+ _aiTeamTemplates = _aiTeamTemplates + [_u];
+ _aiTeamTemplateRequires = _aiTeamTemplateRequires + [[false,false,false,true]];
+ _aiTeamTypes = _aiTeamTypes + [3];
+ _aiTeamUpgrades = _aiTeamUpgrades + [[0,0,0,3]];
+};
+
+[_aiTeamTemplates,_aiTeamTemplateRequires,_aiTeamTypes,_aiTeamUpgrades,_aiTeamTemplateName] \ No newline at end of file
diff --git a/Common/Config/Core_Squads/Vanilla/Squad_USMC.sqf b/Common/Config/Core_Squads/Vanilla/Squad_USMC.sqf
new file mode 100644
index 0000000..350bf06
--- /dev/null
+++ b/Common/Config/Core_Squads/Vanilla/Squad_USMC.sqf
@@ -0,0 +1,51 @@
+Private ['_aiTeamTemplateRequires','_aiTeamTemplateName','_aiTeamTemplates','_aiTeamTypes','_aiTeamUpgrades','_return','_u'];
+
+//--- Overall Dump.
+_return = ["West", "USMC", ["USMC_MQ9Squadron","USMC_FRTeam_Razor"]] Call Compile preprocessFile "Common\Config\Core_Squads\Squads_GetFactionGroups.sqf";
+_aiTeamTemplates = _return select 0;
+_aiTeamTemplateName = _return select 1;
+_aiTeamTemplateRequires = _return select 2;
+_aiTeamTypes = _return select 3;
+_aiTeamUpgrades = _return select 4;
+
+//--- Custom Groups.
+_u = ["M1A1"];
+_u = _u + ["M1A1"];
+
+_aiTeamTemplateName = _aiTeamTemplateName + ["Armor - M1A1 Section"];
+_aiTeamTemplates = _aiTeamTemplates + [_u];
+_aiTeamTemplateRequires = _aiTeamTemplateRequires + [[false,false,true,false]];
+_aiTeamTypes = _aiTeamTypes + [2];
+_aiTeamUpgrades = _aiTeamUpgrades + [[0,0,1,0]];
+
+_u = ["UH1Y"];
+_u = _u + ["USMC_Soldier_TL"];
+_u = _u + ["USMC_Soldier_AR"];
+_u = _u + ["USMC_Soldier_LAT"];
+_u = _u + ["USMC_Soldier_Medic"];
+_u = _u + ["USMC_Soldier"];
+_u = _u + ["USMC_Soldier"];
+_u = _u + ["USMC_Soldier"];
+
+_aiTeamTemplateName = _aiTeamTemplateName + ["Air - Infantry UH1Y Squadron"];
+_aiTeamTemplates = _aiTeamTemplates + [_u];
+_aiTeamTemplateRequires = _aiTeamTemplateRequires + [[true,false,false,true]];
+_aiTeamTypes = _aiTeamTypes + [3];
+_aiTeamUpgrades = _aiTeamUpgrades + [[0,0,0,1]];
+
+_u = ["MH60S"];
+_u = _u + ["USMC_Soldier_TL"];
+_u = _u + ["USMC_Soldier_MG"];
+_u = _u + ["USMC_Soldier_AT"];
+_u = _u + ["USMC_Soldier_Medic"];
+_u = _u + ["USMC_Soldier"];
+_u = _u + ["USMC_Soldier"];
+_u = _u + ["USMC_Soldier"];
+
+_aiTeamTemplateName = _aiTeamTemplateName + ["Air - Infantry MH-60S Squadron"];
+_aiTeamTemplates = _aiTeamTemplates + [_u];
+_aiTeamTemplateRequires = _aiTeamTemplateRequires + [[true,false,false,true]];
+_aiTeamTypes = _aiTeamTypes + [3];
+_aiTeamUpgrades = _aiTeamUpgrades + [[2,0,0,0]];
+
+[_aiTeamTemplates,_aiTeamTemplateRequires,_aiTeamTypes,_aiTeamUpgrades,_aiTeamTemplateName] \ No newline at end of file
diff --git a/Common/Config/Core_Structures/Arrowhead/Structures_TKA.sqf b/Common/Config/Core_Structures/Arrowhead/Structures_TKA.sqf
new file mode 100644
index 0000000..a2dd569
--- /dev/null
+++ b/Common/Config/Core_Structures/Arrowhead/Structures_TKA.sqf
@@ -0,0 +1,162 @@
+Private ['_c','_count','_d','_dir','_dis','_n','_s','_t','_v'];
+
+/* Root Definition */
+EASTHQ = "BMP2_HQ_TK_unfolded_EP1";
+EASTBAR = "TK_WarfareBBarracks_EP1";
+EASTLVF = "TK_WarfareBLightFactory_EP1";
+EASTCC = "TK_WarfareBUAVterminal_EP1";
+EASTHEAVY = "TK_WarfareBHeavyFactory_EP1";
+EASTAIR = "TK_WarfareBAircraftFactory_EP1";
+EASTSP = "TK_WarfareBVehicleServicePoint_EP1";
+EASTAAR = "TK_WarfareBAntiAirRadar_EP1";
+
+/* Flag Textures */
+['WFBE_EASTFLAG','\Ca\ca_e\Data\flag_tka_co.paa',true] Call SetNamespace;
+
+/* Mash used after being deployed */
+['WFBE_EASTFARP','CampEast_EP1',true] Call SetNamespace;
+
+/* Construction Crates */
+['WFBE_EASTCONSTRUCTIONSITE','TK_WarfareBContructionSite_EP1',true] Call SetNamespace;
+
+/* Structures */
+_v = ["Headquarters"];
+_n = [EASTHQ];
+_d = [getText (configFile >> "CfgVehicles" >> (_n select (count _n - 1)) >> "displayName")];
+_c = [('WFBE_HQDEPLOYPRICE' Call GetNamespace)];
+_t = [if (WF_Debug) then {1} else {30}];
+_s = ["HQSite"];
+_dis = [15];
+_dir = [0];
+
+_v = _v + ["Barracks"];
+_n = _n + [EASTBAR];
+_d = _d + [getText (configFile >> "CfgVehicles" >> (_n select (count _n - 1)) >> "displayName")];
+_c = _c + [200];
+_t = _t + [if (WF_Debug) then {1} else {70}];
+_s = _s + ["SmallSite"];
+_dis = _dis + [18];
+_dir = _dir + [90];
+
+_v = _v + ["Light"];
+_n = _n + [EASTLVF];
+_d = _d + [getText (configFile >> "CfgVehicles" >> (_n select (count _n - 1)) >> "displayName")];
+_c = _c + [600];
+_t = _t + [if (WF_Debug) then {1} else {90}];
+_s = _s + ["MediumSite"];
+_dis = _dis + [25];
+_dir = _dir + [90];
+
+_v = _v + ["CommandCenter"];
+_n = _n + [EASTCC];
+_d = _d + [localize "STR_WF_CommandCenter_RU"];
+_c = _c + [1200];
+_t = _t + [if (WF_Debug) then {1} else {110}];
+_s = _s + ["SmallSite"];
+_dis = _dis + [20];
+_dir = _dir + [90];
+
+_v = _v + ["Heavy"];
+_n = _n + [EASTHEAVY];
+_d = _d + [getText (configFile >> "CfgVehicles" >> (_n select (count _n - 1)) >> "displayName")];
+_c = _c + [2800];
+_t = _t + [if (WF_Debug) then {1} else {130}];
+_s = _s + ["MediumSite"];
+_dis = _dis + [25];
+_dir = _dir + [90];
+
+_v = _v + ["Aircraft"];
+_n = _n + [EASTAIR];
+_d = _d + [localize "STR_WF_AircraftFactory"];
+_c = _c + [4400];
+_t = _t + [if (WF_Debug) then {1} else {150}];
+_s = _s + ["SmallSite"];
+_dis = _dis + [21];
+_dir = _dir + [90];
+
+_v = _v + ["ServicePoint"];
+_n = _n + [EASTSP];
+_d = _d + [localize "STR_WF_MAIN_ServicePoint"];
+_c = _c + [700];
+_t = _t + [if (WF_Debug) then {1} else {70}];
+_s = _s + ["SmallSite"];
+_dis = _dis + [21];
+_dir = _dir + [90];
+
+if (paramAARadar) then {
+ _v = _v + ["AARadar"];
+ _n = _n + [EASTAAR];
+ _d = _d + [getText (configFile >> "CfgVehicles" >> (_n select (count _n - 1)) >> "displayName")];
+ _c = _c + [3200];
+ _t = _t + [if (WF_Debug) then {1} else {280}];
+ _s = _s + ["MediumSite"];
+ _dis = _dis + [21];
+ _dir = _dir + [90];
+};
+
+for [{_count = count _v - 1},{_count >= 0},{_count = _count - 1}] do {
+ [Format["WFBE_EAST%1TYPE",_v select _count],_count,true] Call SetNamespace;
+};
+
+['WFBE_EASTMHQNAME','BMP2_HQ_TK_EP1',true] Call SetNamespace;
+
+['WFBE_EASTSTRUCTURES',_v,true] Call SetNamespace;
+['WFBE_EASTSTRUCTURENAMES',_n,true] Call SetNamespace;
+['WFBE_EASTSTRUCTUREDESCRIPTIONS',_d,true] Call SetNamespace;
+['WFBE_EASTSTRUCTURECOSTS',_c,true] Call SetNamespace;
+['WFBE_EASTSTRUCTURETIMES',_t,true] Call SetNamespace;
+['WFBE_EASTSTRUCTUREDISTANCES',_dis,true] Call SetNamespace;
+['WFBE_EASTSTRUCTUREDIRECTIONS',_dir,true] Call SetNamespace;
+['WFBE_EASTSTRUCTURESCRIPTS',_s,true] Call SetNamespace;
+
+/* Defenses */
+_n = ["WarfareBMGNest_PK_TK_EP1"];
+_n = _n + ["SearchLight_TK_EP1"];
+_n = _n + ["KORD_TK_EP1"];
+_n = _n + ["KORD_high_TK_EP1"];
+_n = _n + ["AGS_TK_EP1"];
+_n = _n + ["SPG9_TK_INS_EP1"];
+_n = _n + ["Metis_TK_EP1"];
+_n = _n + ["Igla_AA_pod_TK_EP1"];
+_n = _n + ["ZU23_TK_EP1"];
+_n = _n + ["2b14_82mm_TK_EP1"];
+_n = _n + ["D30_TK_EP1"];
+_n = _n + ["Land_HBarrier3"];
+_n = _n + ["Land_HBarrier5"];
+_n = _n + ["Land_HBarrier_large"];
+_n = _n + ["TK_WarfareBBarrier5x_EP1"];
+_n = _n + ["TK_WarfareBBarrier10x_EP1"];
+_n = _n + ["TK_WarfareBBarrier10xTall_EP1"];
+_n = _n + ["MASH_EP1"];
+_n = _n + ["Land_fort_bagfence_long"];
+_n = _n + ["Land_fort_bagfence_corner"];
+_n = _n + ["Land_fort_bagfence_round"];
+_n = _n + ["Land_fortified_nest_small_EP1"];
+_n = _n + ["Land_fort_rampart_EP1"];
+_n = _n + ["Land_fort_artillery_nest_EP1"];
+_n = _n + ["Hhedgehog_concreteBig"];
+_n = _n + ["Hedgehog_EP1"];
+_n = _n + ["Land_CamoNet_EAST_EP1"];
+_n = _n + ["Land_CamoNetVar_EAST_EP1"];
+_n = _n + ["Land_CamoNetB_EAST_EP1"];
+_n = _n + ["Sign_Danger"];
+_n = _n + ["HeliH"];
+_n = _n + ["Fort_RazorWire"];
+_n = _n + ["Concrete_Wall_EP1"];
+_n = _n + ["Land_Campfire"];
+_n = _n + ["TKOrdnanceBox_EP1"];
+_n = _n + ["TKVehicleBox_EP1"];
+_n = _n + ["TKBasicAmmunitionBox_EP1"];
+_n = _n + ["TKBasicWeapons_EP1"];
+_n = _n + ["TKLaunchers_EP1"];
+_n = _n + ["TKSpecialWeapons_EP1"];
+
+/* Class used for AI, AI will attempt to build those */
+['WFBE_EASTDEFENSES_MG',['KORD_high_TK_EP1'],true] Call SetNamespace;
+['WFBE_EASTDEFENSES_GL',['AGS_TK_EP1'],true] Call SetNamespace;
+['WFBE_EASTDEFENSES_AAPOD',['Igla_AA_pod_TK_EP1','ZU23_TK_EP1'],true] Call SetNamespace;
+['WFBE_EASTDEFENSES_ATPOD',['Metis_TK_EP1','SPG9_TK_INS_EP1'],true] Call SetNamespace;
+['WFBE_EASTDEFENSES_CANNON',['D30_TK_EP1'],true] Call SetNamespace;
+['WFBE_EASTDEFENSES_MASH',['MASH_EP1'],true] Call SetNamespace;
+
+['WFBE_EASTDEFENSENAMES',_n,true] Call SetNamespace; \ No newline at end of file
diff --git a/Common/Config/Core_Structures/Arrowhead/Structures_US.sqf b/Common/Config/Core_Structures/Arrowhead/Structures_US.sqf
new file mode 100644
index 0000000..cb59721
--- /dev/null
+++ b/Common/Config/Core_Structures/Arrowhead/Structures_US.sqf
@@ -0,0 +1,166 @@
+Private ['_c','_count','_d','_dir','_dis','_n','_s','_t','_v'];
+
+/* Root Definition */
+WESTHQ = "M1130_HQ_unfolded_EP1";
+WESTBAR = "US_WarfareBBarracks_EP1";
+WESTLVF = "US_WarfareBLightFactory_EP1";
+WESTCC = "US_WarfareBUAVterminal_EP1";
+WESTHEAVY = "US_WarfareBHeavyFactory_EP1";
+WESTAIR = "US_WarfareBAircraftFactory_EP1";
+WESTSP = "US_WarfareBVehicleServicePoint_EP1";
+WESTAAR = "US_WarfareBAntiAirRadar_EP1";
+
+/* Flag Textures */
+['WFBE_WESTFLAG','\Ca\ca_e\Data\flag_us_co.paa',true] Call SetNamespace;
+
+/* Mash used after being deployed */
+['WFBE_WESTFARP','Camp_EP1',true] Call SetNamespace;
+
+/* Construction Crates */
+['WFBE_WESTCONSTRUCTIONSITE','US_WarfareBContructionSite_EP1',true] Call SetNamespace;
+
+/* Structures */
+_v = ["Headquarters"];
+_n = [WESTHQ];
+_d = [getText (configFile >> "CfgVehicles" >> (_n select (count _n - 1)) >> "displayName")];
+_c = [('WFBE_HQDEPLOYPRICE' Call GetNamespace)];
+_t = [if (WF_Debug) then {1} else {30}];
+_s = ["HQSite"];
+_dis = [15];
+_dir = [0];
+
+_v = _v + ["Barracks"];
+_n = _n + [WESTBAR];
+_d = _d + [getText (configFile >> "CfgVehicles" >> (_n select (count _n - 1)) >> "displayName")];
+_c = _c + [200];
+_t = _t + [if (WF_Debug) then {1} else {70}];
+_s = _s + ["SmallSite"];
+_dis = _dis + [18];
+_dir = _dir + [90];
+
+_v = _v + ["Light"];
+_n = _n + [WESTLVF];
+_d = _d + [getText (configFile >> "CfgVehicles" >> (_n select (count _n - 1)) >> "displayName")];
+_c = _c + [600];
+_t = _t + [if (WF_Debug) then {1} else {90}];
+_s = _s + ["MediumSite"];
+_dis = _dis + [25];
+_dir = _dir + [90];
+
+_v = _v + ["CommandCenter"];
+_n = _n + [WESTCC];
+_d = _d + [localize "STR_WF_CommandCenter_USMC"];
+_c = _c + [1200];
+_t = _t + [if (WF_Debug) then {1} else {110}];
+_s = _s + ["SmallSite"];
+_dis = _dis + [20];
+_dir = _dir + [90];
+
+_v = _v + ["Heavy"];
+_n = _n + [WESTHEAVY];
+_d = _d + [getText (configFile >> "CfgVehicles" >> (_n select (count _n - 1)) >> "displayName")];
+_c = _c + [2800];
+_t = _t + [if (WF_Debug) then {1} else {130}];
+_s = _s + ["MediumSite"];
+_dis = _dis + [25];
+_dir = _dir + [90];
+
+_v = _v + ["Aircraft"];
+_n = _n + [WESTAIR];
+_d = _d + [localize "STR_WF_AircraftFactory"];
+_c = _c + [4400];
+_t = _t + [if (WF_Debug) then {1} else {150}];
+_s = _s + ["SmallSite"];
+_dis = _dis + [31];
+_dir = _dir + [90];
+
+_v = _v + ["ServicePoint"];
+_n = _n + [WESTSP];
+_d = _d + [localize "STR_WF_MAIN_ServicePoint"];
+_c = _c + [700];
+_t = _t + [if (WF_Debug) then {1} else {70}];
+_s = _s + ["SmallSite"];
+_dis = _dis + [21];
+_dir = _dir + [90];
+
+if (paramAARadar) then {
+ _v = _v + ["AARadar"];
+ _n = _n + [WESTAAR];
+ _d = _d + [getText (configFile >> "CfgVehicles" >> (_n select (count _n - 1)) >> "displayName")];
+ _c = _c + [3200];
+ _t = _t + [if (WF_Debug) then {1} else {280}];
+ _s = _s + ["MediumSite"];
+ _dis = _dis + [21];
+ _dir = _dir + [90];
+};
+
+for [{_count = count _v - 1},{_count >= 0},{_count = _count - 1}] do {
+ [Format["WFBE_WEST%1TYPE",_v select _count],_count,true] Call SetNamespace;
+};
+
+['WFBE_WESTMHQNAME','M1130_CV_EP1',true] Call SetNamespace;
+
+['WFBE_WESTSTRUCTURES',_v,true] Call SetNamespace;
+['WFBE_WESTSTRUCTURENAMES',_n,true] Call SetNamespace;
+['WFBE_WESTSTRUCTUREDESCRIPTIONS',_d,true] Call SetNamespace;
+['WFBE_WESTSTRUCTURECOSTS',_c,true] Call SetNamespace;
+['WFBE_WESTSTRUCTURETIMES',_t,true] Call SetNamespace;
+['WFBE_WESTSTRUCTUREDISTANCES',_dis,true] Call SetNamespace;
+['WFBE_WESTSTRUCTUREDIRECTIONS',_dir,true] Call SetNamespace;
+['WFBE_WESTSTRUCTURESCRIPTS',_s,true] Call SetNamespace;
+
+/* Defenses */
+_n = ["WarfareBMGNest_M240_US_EP1"];
+_n = _n + ["M2HD_mini_TriPod_US_EP1"];
+_n = _n + ["SearchLight_US_EP1"];
+_n = _n + ["M2StaticMG_US_EP1"];
+if (paramDLCBAF) then {
+ _n = _n + ["BAF_GPMG_Minitripod_W"];
+ _n = _n + ["BAF_GMG_Tripod_W"];
+ _n = _n + ["BAF_L2A1_Minitripod_W"];
+ _n = _n + ["BAF_L2A1_Tripod_W"];
+};
+_n = _n + ["MK19_TriPod_US_EP1"];
+_n = _n + ["TOW_TriPod_US_EP1"];
+_n = _n + ["Stinger_Pod_US_EP1"];
+_n = _n + ["M252_US_EP1"];
+_n = _n + ["M119_US_EP1"];
+_n = _n + ["Land_HBarrier3"];
+_n = _n + ["Land_HBarrier5"];
+_n = _n + ["Land_HBarrier_large"];
+_n = _n + ["US_WarfareBBarrier5x_EP1"];
+_n = _n + ["US_WarfareBBarrier10x_EP1"];
+_n = _n + ["US_WarfareBBarrier10xTall_EP1"];
+_n = _n + ["MASH_EP1"];
+_n = _n + ["Land_fort_bagfence_long"];
+_n = _n + ["Land_fort_bagfence_corner"];
+_n = _n + ["Land_fort_bagfence_round"];
+_n = _n + ["Land_fortified_nest_small_EP1"];
+_n = _n + ["Land_fort_rampart_EP1"];
+_n = _n + ["Land_fort_artillery_nest_EP1"];
+_n = _n + ["Hhedgehog_concreteBig"];
+_n = _n + ["Hedgehog_EP1"];
+_n = _n + ["Land_CamoNet_NATO_EP1"];
+_n = _n + ["Land_CamoNetVar_NATO_EP1"];
+_n = _n + ["Land_CamoNetB_NATO_EP1"];
+_n = _n + ["Sign_Danger"];
+_n = _n + ["HeliH"];
+_n = _n + ["Fort_RazorWire"];
+_n = _n + ["Concrete_Wall_EP1"];
+_n = _n + ["Land_Campfire"];
+_n = _n + ["USOrdnanceBox_EP1"];
+_n = _n + ["USVehicleBox_EP1"];
+_n = _n + ["USBasicAmmunitionBox_EP1"];
+_n = _n + ["USBasicWeapons_EP1"];
+_n = _n + ["USLaunchers_EP1"];
+_n = _n + ["USSpecialWeapons_EP1"];
+
+/* Class used for AI, AI will attempt to build those */
+['WFBE_WESTDEFENSES_MG',['M2StaticMG_US_EP1'],true] Call SetNamespace;
+['WFBE_WESTDEFENSES_GL',['MK19_TriPod_US_EP1'],true] Call SetNamespace;
+['WFBE_WESTDEFENSES_AAPOD',['Stinger_Pod_US_EP1'],true] Call SetNamespace;
+['WFBE_WESTDEFENSES_ATPOD',['TOW_TriPod_US_EP1'],true] Call SetNamespace;
+['WFBE_WESTDEFENSES_CANNON',['M119_US_EP1'],true] Call SetNamespace;
+['WFBE_WESTDEFENSES_MASH',['MASH_EP1'],true] Call SetNamespace;
+
+['WFBE_WESTDEFENSENAMES',_n,true] Call SetNamespace; \ No newline at end of file
diff --git a/Common/Config/Core_Structures/CombinedOps/Structures_CDF.sqf b/Common/Config/Core_Structures/CombinedOps/Structures_CDF.sqf
new file mode 100644
index 0000000..265eb8c
--- /dev/null
+++ b/Common/Config/Core_Structures/CombinedOps/Structures_CDF.sqf
@@ -0,0 +1,161 @@
+Private ['_c','_count','_d','_dir','_dis','_n','_s','_t','_v'];
+
+/* Root Definition */
+WESTHQ = "BMP2_HQ_CDF_unfolded";
+WESTBAR = "CDF_WarfareBBarracks";
+WESTLVF = "CDF_WarfareBLightFactory";
+WESTCC = "CDF_WarfareBUAVterminal";
+WESTHEAVY = "CDF_WarfareBHeavyFactory";
+WESTAIR = "CDF_WarfareBAircraftFactory";
+WESTSP = "CDF_WarfareBVehicleServicePoint";
+WESTAAR = "CDF_WarfareBAntiAirRadar";
+
+/* Flag Textures */
+['WFBE_WESTFLAG','\ca\ca_e\data\flag_cdf_co.paa',true] Call SetNamespace;
+
+/* Mash used after being deployed */
+['WFBE_WESTFARP','Camp',true] Call SetNamespace;
+
+/* Construction Crates */
+['WFBE_WESTCONSTRUCTIONSITE','CDF_WarfareBContructionSite',true] Call SetNamespace;
+
+/* Structures */
+_v = ["Headquarters"];
+_n = [WESTHQ];
+_d = [getText (configFile >> "CfgVehicles" >> (_n select (count _n - 1)) >> "displayName")];
+_c = [('WFBE_HQDEPLOYPRICE' Call GetNamespace)];
+_t = [if (WF_Debug) then {1} else {30}];
+_s = ["HQSite"];
+_dis = [15];
+_dir = [0];
+
+_v = _v + ["Barracks"];
+_n = _n + [WESTBAR];
+_d = _d + [getText (configFile >> "CfgVehicles" >> (_n select (count _n - 1)) >> "displayName")];
+_c = _c + [200];
+_t = _t + [if (WF_Debug) then {1} else {70}];
+_s = _s + ["SmallSite"];
+_dis = _dis + [18];
+_dir = _dir + [90];
+
+_v = _v + ["Light"];
+_n = _n + [WESTLVF];
+_d = _d + [getText (configFile >> "CfgVehicles" >> (_n select (count _n - 1)) >> "displayName")];
+_c = _c + [600];
+_t = _t + [if (WF_Debug) then {1} else {90}];
+_s = _s + ["MediumSite"];
+_dis = _dis + [25];
+_dir = _dir + [90];
+
+_v = _v + ["CommandCenter"];
+_n = _n + [WESTCC];
+_d = _d + [localize "STR_WF_CommandCenter_USMC"];
+_c = _c + [1200];
+_t = _t + [if (WF_Debug) then {1} else {110}];
+_s = _s + ["SmallSite"];
+_dis = _dis + [20];
+_dir = _dir + [90];
+
+_v = _v + ["Heavy"];
+_n = _n + [WESTHEAVY];
+_d = _d + [getText (configFile >> "CfgVehicles" >> (_n select (count _n - 1)) >> "displayName")];
+_c = _c + [2800];
+_t = _t + [if (WF_Debug) then {1} else {130}];
+_s = _s + ["MediumSite"];
+_dis = _dis + [25];
+_dir = _dir + [90];
+
+_v = _v + ["Aircraft"];
+_n = _n + [WESTAIR];
+_d = _d + [getText (configFile >> "CfgVehicles" >> (_n select (count _n - 1)) >> "displayName")];
+_c = _c + [4400];
+_t = _t + [if (WF_Debug) then {1} else {150}];
+_s = _s + ["SmallSite"];
+_dis = _dis + [31];
+_dir = _dir + [90];
+
+_v = _v + ["ServicePoint"];
+_n = _n + [WESTSP];
+_d = _d + [getText (configFile >> "CfgVehicles" >> (_n select (count _n - 1)) >> "displayName")];
+_c = _c + [700];
+_t = _t + [if (WF_Debug) then {1} else {70}];
+_s = _s + ["SmallSite"];
+_dis = _dis + [21];
+_dir = _dir + [90];
+
+if (paramAARadar) then {
+ _v = _v + ["AARadar"];
+ _n = _n + [WESTAAR];
+ _d = _d + [getText (configFile >> "CfgVehicles" >> (_n select (count _n - 1)) >> "displayName")];
+ _c = _c + [3200];
+ _t = _t + [if (WF_Debug) then {1} else {280}];
+ _s = _s + ["MediumSite"];
+ _dis = _dis + [21];
+ _dir = _dir + [90];
+};
+
+for [{_count = count _v - 1},{_count >= 0},{_count = _count - 1}] do {
+ [Format["WFBE_WEST%1TYPE",_v select _count],_count,true] Call SetNamespace;
+};
+
+['WFBE_WESTMHQNAME','BMP2_HQ_CDF',true] Call SetNamespace;
+
+['WFBE_WESTSTRUCTURES',_v,true] Call SetNamespace;
+['WFBE_WESTSTRUCTURENAMES',_n,true] Call SetNamespace;
+['WFBE_WESTSTRUCTUREDESCRIPTIONS',_d,true] Call SetNamespace;
+['WFBE_WESTSTRUCTURECOSTS',_c,true] Call SetNamespace;
+['WFBE_WESTSTRUCTURETIMES',_t,true] Call SetNamespace;
+['WFBE_WESTSTRUCTUREDISTANCES',_dis,true] Call SetNamespace;
+['WFBE_WESTSTRUCTUREDIRECTIONS',_dir,true] Call SetNamespace;
+['WFBE_WESTSTRUCTURESCRIPTS',_s,true] Call SetNamespace;
+
+/* Defenses */
+_n = ["CDF_WarfareBMGNest_PK"];
+_n = _n + ["DSHkM_Mini_TriPod_CDF"];
+_n = _n + ["DSHKM_CDF"];
+_n = _n + ["SearchLight_CDF"];
+_n = _n + ["AGS_CDF"];
+_n = _n + ["SPG9_CDF"];
+_n = _n + ["ZU23_CDF"];
+_n = _n + ["2b14_82mm_CDF"];
+_n = _n + ["D30_CDF"];
+_n = _n + ["Land_HBarrier3"];
+_n = _n + ["Land_HBarrier5"];
+_n = _n + ["Land_HBarrier_large"];
+_n = _n + ["Base_WarfareBBarrier5x"];
+_n = _n + ["Base_WarfareBBarrier10x"];
+_n = _n + ["Base_WarfareBBarrier10xTall"];
+_n = _n + ["MASH_EP1"];
+_n = _n + ["Land_fort_bagfence_long"];
+_n = _n + ["Land_fort_bagfence_corner"];
+_n = _n + ["Land_fort_bagfence_round"];
+_n = _n + [if (WF_Camo) then {"Land_fortified_nest_small"} else {"Land_fortified_nest_small_EP1"}];
+_n = _n + [if (WF_Camo) then {"Land_fort_rampart"} else {"Land_fort_rampart_EP1"}];
+_n = _n + [if (WF_Camo) then {"Land_fort_artillery_nest"} else {"Land_fort_artillery_nest_EP1"}];
+_n = _n + ["Hhedgehog_concreteBig"];
+_n = _n + ["Hedgehog_EP1"];
+_n = _n + [if (WF_Camo) then {"Land_CamoNet_NATO"} else {"Land_CamoNet_NATO_EP1"}];
+_n = _n + [if (WF_Camo) then {"Land_CamoNetVar_NATO"} else {"Land_CamoNetVar_NATO_EP1"}];
+_n = _n + [if (WF_Camo) then {"Land_CamoNetB_NATO"} else {"Land_CamoNetB_NATO_EP1"}];
+_n = _n + ["Sign_Danger"];
+_n = _n + ["HeliH"];
+_n = _n + ["Fort_RazorWire"];
+_n = _n + ["Land_Ind_IlluminantTower"];
+_n = _n + ["Concrete_Wall_EP1"];
+_n = _n + ["Land_Campfire"];
+_n = _n + ["RUOrdnanceBox"];
+_n = _n + ["RUVehicleBox"];
+_n = _n + ["RUBasicAmmunitionBox"];
+_n = _n + ["RUBasicWeaponsBox"];
+_n = _n + ["RULaunchersBox"];
+_n = _n + ["RUSpecialWeaponsBox"];
+
+/* Class used for AI, AI will attempt to build those */
+['WFBE_WESTDEFENSES_MG',['DSHKM_CDF'],true] Call SetNamespace;
+['WFBE_WESTDEFENSES_GL',['AGS_CDF'],true] Call SetNamespace;
+['WFBE_WESTDEFENSES_AAPOD',['ZU23_CDF'],true] Call SetNamespace;
+['WFBE_WESTDEFENSES_ATPOD',['SPG9_CDF'],true] Call SetNamespace;
+['WFBE_WESTDEFENSES_CANNON',['D30_CDF'],true] Call SetNamespace;
+['WFBE_WESTDEFENSES_MASH',['MASH'],true] Call SetNamespace;
+
+['WFBE_WESTDEFENSENAMES',_n,true] Call SetNamespace; \ No newline at end of file
diff --git a/Common/Config/Core_Structures/CombinedOps/Structures_INS.sqf b/Common/Config/Core_Structures/CombinedOps/Structures_INS.sqf
new file mode 100644
index 0000000..9be1133
--- /dev/null
+++ b/Common/Config/Core_Structures/CombinedOps/Structures_INS.sqf
@@ -0,0 +1,162 @@
+Private ['_c','_count','_d','_dir','_dis','_n','_s','_t','_v'];
+
+/* Root Definition */
+EASTHQ = "BMP2_HQ_INS_unfolded";
+EASTBAR = "Ins_WarfareBBarracks";
+EASTLVF = "Ins_WarfareBLightFactory";
+EASTCC = "INS_WarfareBUAVterminal";
+EASTHEAVY = "Ins_WarfareBHeavyFactory";
+EASTAIR = "INS_WarfareBAircraftFactory";
+EASTSP = "INS_WarfareBVehicleServicePoint";
+EASTAAR = "INS_WarfareBAntiAirRadar";
+
+/* Flag Textures */
+['WFBE_EASTFLAG','\Ca\Data\flag_chdkz_co.paa',true] Call SetNamespace;
+
+/* Mash used after being deployed */
+['WFBE_EASTFARP','CampEast',true] Call SetNamespace;
+
+/* Construction Crates */
+['WFBE_EASTCONSTRUCTIONSITE','Ins_WarfareBContructionSite',true] Call SetNamespace;
+
+/* Structures */
+_v = ["Headquarters"];
+_n = [EASTHQ];
+_d = [getText (configFile >> "CfgVehicles" >> (_n select (count _n - 1)) >> "displayName")];
+_c = [('WFBE_HQDEPLOYPRICE' Call GetNamespace)];
+_t = [if (WF_Debug) then {1} else {30}];
+_s = ["HQSite"];
+_dis = [15];
+_dir = [0];
+
+_v = _v + ["Barracks"];
+_n = _n + [EASTBAR];
+_d = _d + [getText (configFile >> "CfgVehicles" >> (_n select (count _n - 1)) >> "displayName")];
+_c = _c + [200];
+_t = _t + [if (WF_Debug) then {1} else {70}];
+_s = _s + ["SmallSite"];
+_dis = _dis + [18];
+_dir = _dir + [90];
+
+_v = _v + ["Light"];
+_n = _n + [EASTLVF];
+_d = _d + [getText (configFile >> "CfgVehicles" >> (_n select (count _n - 1)) >> "displayName")];
+_c = _c + [600];
+_t = _t + [if (WF_Debug) then {1} else {90}];
+_s = _s + ["MediumSite"];
+_dis = _dis + [25];
+_dir = _dir + [90];
+
+_v = _v + ["CommandCenter"];
+_n = _n + [EASTCC];
+_d = _d + [localize "STR_WF_CommandCenter_RU"];
+_c = _c + [1200];
+_t = _t + [if (WF_Debug) then {1} else {110}];
+_s = _s + ["SmallSite"];
+
+_dis = _dis + [20];
+_dir = _dir + [90];
+
+_v = _v + ["Heavy"];
+_n = _n + [EASTHEAVY];
+_d = _d + [getText (configFile >> "CfgVehicles" >> (_n select (count _n - 1)) >> "displayName")];
+_c = _c + [2800];
+_t = _t + [if (WF_Debug) then {1} else {130}];
+_s = _s + ["MediumSite"];
+_dis = _dis + [25];
+_dir = _dir + [90];
+
+_v = _v + ["Aircraft"];
+_n = _n + [EASTAIR];
+_d = _d + [getText (configFile >> "CfgVehicles" >> (_n select (count _n - 1)) >> "displayName")];
+_c = _c + [4400];
+_t = _t + [if (WF_Debug) then {1} else {150}];
+_s = _s + ["SmallSite"];
+_dis = _dis + [21];
+_dir = _dir + [90];
+
+_v = _v + ["ServicePoint"];
+_n = _n + [EASTSP];
+_d = _d + [getText (configFile >> "CfgVehicles" >> (_n select (count _n - 1)) >> "displayName")];
+_c = _c + [700];
+_t = _t + [if (WF_Debug) then {1} else {70}];
+_s = _s + ["SmallSite"];
+_dis = _dis + [21];
+_dir = _dir + [90];
+
+if (paramAARadar) then {
+ _v = _v + ["AARadar"];
+ _n = _n + [EASTAAR];
+ _d = _d + [getText (configFile >> "CfgVehicles" >> (_n select (count _n - 1)) >> "displayName")];
+ _c = _c + [3200];
+ _t = _t + [if (WF_Debug) then {1} else {280}];
+ _s = _s + ["MediumSite"];
+ _dis = _dis + [21];
+ _dir = _dir + [90];
+};
+
+for [{_count = count _v - 1},{_count >= 0},{_count = _count - 1}] do {
+ [Format["WFBE_EAST%1TYPE",_v select _count],_count,true] Call SetNamespace;
+};
+
+['WFBE_EASTMHQNAME','BMP2_HQ_INS',true] Call SetNamespace;
+
+['WFBE_EASTSTRUCTURES',_v,true] Call SetNamespace;
+['WFBE_EASTSTRUCTURENAMES',_n,true] Call SetNamespace;
+['WFBE_EASTSTRUCTUREDESCRIPTIONS',_d,true] Call SetNamespace;
+['WFBE_EASTSTRUCTURECOSTS',_c,true] Call SetNamespace;
+['WFBE_EASTSTRUCTURETIMES',_t,true] Call SetNamespace;
+['WFBE_EASTSTRUCTUREDISTANCES',_dis,true] Call SetNamespace;
+['WFBE_EASTSTRUCTUREDIRECTIONS',_dir,true] Call SetNamespace;
+['WFBE_EASTSTRUCTURESCRIPTS',_s,true] Call SetNamespace;
+
+/* Defenses */
+_n = ["Ins_WarfareBMGNest_PK"];
+_n = _n + ["SearchLight_INS"];
+_n = _n + ["DSHkM_Mini_TriPod"];
+_n = _n + ["DSHKM_Ins"];
+_n = _n + ["AGS_Ins"];
+_n = _n + ["SPG9_Ins"];
+_n = _n + ["ZU23_Ins"];
+_n = _n + ["2b14_82mm_INS"];
+_n = _n + ["D30_Ins"];
+_n = _n + ["Land_HBarrier3"];
+_n = _n + ["Land_HBarrier5"];
+_n = _n + ["Land_HBarrier_large"];
+_n = _n + ["Base_WarfareBBarrier5x"];
+_n = _n + ["Base_WarfareBBarrier10x"];
+_n = _n + ["Base_WarfareBBarrier10xTall"];
+_n = _n + ["MASH_EP1"];
+_n = _n + ["Land_fort_bagfence_long"];
+_n = _n + ["Land_fort_bagfence_corner"];
+_n = _n + ["Land_fort_bagfence_round"];
+_n = _n + [if (WF_Camo) then {"Land_fortified_nest_small"} else {"Land_fortified_nest_small_EP1"}];
+_n = _n + [if (WF_Camo) then {"Land_fort_rampart"} else {"Land_fort_rampart_EP1"}];
+_n = _n + [if (WF_Camo) then {"Land_fort_artillery_nest"} else {"Land_fort_artillery_nest_EP1"}];
+_n = _n + ["Hhedgehog_concreteBig"];
+_n = _n + ["Hedgehog_EP1"];
+_n = _n + [if (WF_Camo) then {"Land_CamoNet_EAST"} else {"Land_CamoNet_EAST_EP1"}];
+_n = _n + [if (WF_Camo) then {"Land_CamoNetVar_EAST"} else {"Land_CamoNetVar_EAST_EP1"}];
+_n = _n + [if (WF_Camo) then {"Land_CamoNetB_EAST"} else {"Land_CamoNetB_EAST_EP1"}];
+_n = _n + ["Sign_Danger"];
+_n = _n + ["HeliH"];
+_n = _n + ["Fort_RazorWire"];
+_n = _n + ["Land_Ind_IlluminantTower"];
+_n = _n + ["Concrete_Wall_EP1"];
+_n = _n + ["Land_Campfire"];
+_n = _n + ["RUOrdnanceBox"];
+_n = _n + ["RUVehicleBox"];
+_n = _n + ["RUBasicAmmunitionBox"];
+_n = _n + ["RUBasicWeaponsBox"];
+_n = _n + ["RULaunchersBox"];
+_n = _n + ["RUSpecialWeaponsBox"];
+
+/* Class used for AI, AI will attempt to build those */
+['WFBE_EASTDEFENSES_MG',['DSHKM_Ins'],true] Call SetNamespace;
+['WFBE_EASTDEFENSES_GL',['AGS_Ins'],true] Call SetNamespace;
+['WFBE_EASTDEFENSES_AAPOD',['ZU23_Ins'],true] Call SetNamespace;
+['WFBE_EASTDEFENSES_ATPOD',['SPG9_Ins'],true] Call SetNamespace;
+['WFBE_EASTDEFENSES_CANNON',['D30_Ins'],true] Call SetNamespace;
+['WFBE_EASTDEFENSES_MASH',['MASH'],true] Call SetNamespace;
+
+['WFBE_EASTDEFENSENAMES',_n,true] Call SetNamespace; \ No newline at end of file
diff --git a/Common/Config/Core_Structures/CombinedOps/Structures_TKA.sqf b/Common/Config/Core_Structures/CombinedOps/Structures_TKA.sqf
new file mode 100644
index 0000000..d5c5220
--- /dev/null
+++ b/Common/Config/Core_Structures/CombinedOps/Structures_TKA.sqf
@@ -0,0 +1,163 @@
+Private ['_c','_count','_d','_dir','_dis','_n','_s','_t','_v'];
+
+/* Root Definition */
+EASTHQ = if (WF_Camo) then {"BTR90_HQ_unfolded"} else {"BTR90_HQ_unfolded"};
+EASTBAR = if (WF_Camo) then {"RU_WarfareBBarracks"} else {"TK_WarfareBBarracks_EP1"};
+EASTLVF = if (WF_Camo) then {"RU_WarfareBLightFactory"} else {"TK_WarfareBLightFactory_EP1"};
+EASTCC = if (WF_Camo) then {"RU_WarfareBUAVterminal"} else {"TK_WarfareBUAVterminal_EP1"};
+EASTHEAVY = if (WF_Camo) then {"RU_WarfareBHeavyFactory"} else {"TK_WarfareBHeavyFactory_EP1"};
+EASTAIR = if (WF_Camo) then {"RU_WarfareBAircraftFactory"} else {"TK_WarfareBAircraftFactory_EP1"};
+EASTSP = if (WF_Camo) then {"RU_WarfareBVehicleServicePoint"} else {"TK_WarfareBVehicleServicePoint_EP1"};
+EASTAAR = if (WF_Camo) then {"RU_WarfareBAntiAirRadar"} else {"TK_WarfareBAntiAirRadar_EP1"};
+
+/* Flag Textures */
+['WFBE_EASTFLAG','\Ca\Data\flag_rus_co.paa',true] Call SetNamespace;
+
+/* Mash used after being deployed */
+['WFBE_EASTFARP','CampEast',true] Call SetNamespace;
+
+/* Construction Crates */
+['WFBE_EASTCONSTRUCTIONSITE','RU_WarfareBContructionSite',true] Call SetNamespace;
+
+/* Structures */
+_v = ["Headquarters"];
+_n = [EASTHQ];
+_d = [getText (configFile >> "CfgVehicles" >> (_n select (count _n - 1)) >> "displayName")];
+_c = [('WFBE_HQDEPLOYPRICE' Call GetNamespace)];
+_t = [if (WF_Debug) then {1} else {30}];
+_s = ["HQSite"];
+_dis = [15];
+_dir = [0];
+
+_v = _v + ["Barracks"];
+_n = _n + [EASTBAR];
+_d = _d + [getText (configFile >> "CfgVehicles" >> (_n select (count _n - 1)) >> "displayName")];
+_c = _c + [200];
+_t = _t + [if (WF_Debug) then {1} else {70}];
+_s = _s + ["SmallSite"];
+_dis = _dis + [18];
+_dir = _dir + [90];
+
+_v = _v + ["Light"];
+_n = _n + [EASTLVF];
+_d = _d + [getText (configFile >> "CfgVehicles" >> (_n select (count _n - 1)) >> "displayName")];
+_c = _c + [600];
+_t = _t + [if (WF_Debug) then {1} else {90}];
+_s = _s + ["MediumSite"];
+_dis = _dis + [25];
+_dir = _dir + [90];
+
+_v = _v + ["CommandCenter"];
+_n = _n + [EASTCC];
+_d = _d + [localize "STR_WF_CommandCenter_RU"];
+_c = _c + [1200];
+_t = _t + [if (WF_Debug) then {1} else {110}];
+_s = _s + ["SmallSite"];
+_dis = _dis + [20];
+_dir = _dir + [90];
+
+_v = _v + ["Heavy"];
+_n = _n + [EASTHEAVY];
+_d = _d + [getText (configFile >> "CfgVehicles" >> (_n select (count _n - 1)) >> "displayName")];
+_c = _c + [2800];
+_t = _t + [if (WF_Debug) then {1} else {130}];
+_s = _s + ["MediumSite"];
+_dis = _dis + [25];
+_dir = _dir + [90];
+
+_v = _v + ["Aircraft"];
+_n = _n + [EASTAIR];
+_d = _d + [localize "STR_WF_AircraftFactory"];
+_c = _c + [4400];
+_t = _t + [if (WF_Debug) then {1} else {150}];
+_s = _s + ["SmallSite"];
+_dis = _dis + [21];
+_dir = _dir + [90];
+
+_v = _v + ["ServicePoint"];
+_n = _n + [EASTSP];
+_d = _d + [localize "STR_WF_MAIN_ServicePoint"];
+_c = _c + [700];
+_t = _t + [if (WF_Debug) then {1} else {70}];
+_s = _s + ["SmallSite"];
+_dis = _dis + [21];
+_dir = _dir + [90];
+
+if (paramAARadar) then {
+ _v = _v + ["AARadar"];
+ _n = _n + [EASTAAR];
+ _d = _d + [getText (configFile >> "CfgVehicles" >> (_n select (count _n - 1)) >> "displayName")];
+ _c = _c + [3200];
+ _t = _t + [if (WF_Debug) then {1} else {280}];
+ _s = _s + ["MediumSite"];
+ _dis = _dis + [21];
+ _dir = _dir + [90];
+};
+
+for [{_count = count _v - 1},{_count >= 0},{_count = _count - 1}] do {
+ [Format["WFBE_EAST%1TYPE",_v select _count],_count,true] Call SetNamespace;
+};
+
+['WFBE_EASTMHQNAME','BTR90_HQ',true] Call SetNamespace;
+
+['WFBE_EASTSTRUCTURES',_v,true] Call SetNamespace;
+['WFBE_EASTSTRUCTURENAMES',_n,true] Call SetNamespace;
+['WFBE_EASTSTRUCTUREDESCRIPTIONS',_d,true] Call SetNamespace;
+['WFBE_EASTSTRUCTURECOSTS',_c,true] Call SetNamespace;
+['WFBE_EASTSTRUCTURETIMES',_t,true] Call SetNamespace;
+['WFBE_EASTSTRUCTUREDISTANCES',_dis,true] Call SetNamespace;
+['WFBE_EASTSTRUCTUREDIRECTIONS',_dir,true] Call SetNamespace;
+['WFBE_EASTSTRUCTURESCRIPTS',_s,true] Call SetNamespace;
+
+/* Defenses */
+_n = ["RU_WarfareBMGNest_PK"];
+_n = _n + ["SearchLight_TK_EP1"];
+_n = _n + ["KORD_TK_EP1"];
+_n = _n + ["KORD_high_TK_EP1"];
+_n = _n + ["AGS_TK_EP1"];
+_n = _n + ["SPG9_TK_INS_EP1"];
+_n = _n + ["Metis_TK_EP1"];
+_n = _n + ["Igla_AA_pod_TK_EP1"];
+_n = _n + ["ZU23_TK_EP1"];
+_n = _n + ["2b14_82mm_TK_EP1"];
+_n = _n + ["D30_TK_EP1"];
+_n = _n + ["Land_HBarrier3"];
+_n = _n + ["Land_HBarrier5"];
+_n = _n + ["Land_HBarrier_large"];
+_n = _n + ["TK_WarfareBBarrier5x_EP1"];
+_n = _n + ["TK_WarfareBBarrier10x_EP1"];
+_n = _n + ["TK_WarfareBBarrier10xTall_EP1"];
+_n = _n + ["MASH_EP1"];
+_n = _n + ["Land_fort_bagfence_long"];
+_n = _n + ["Land_fort_bagfence_corner"];
+_n = _n + ["Land_fort_bagfence_round"];
+_n = _n + [if (WF_Camo) then {"Land_fortified_nest_small"} else {"Land_fortified_nest_small_EP1"}];
+_n = _n + [if (WF_Camo) then {"Land_fort_rampart"} else {"Land_fort_rampart_EP1"}];
+_n = _n + [if (WF_Camo) then {"Land_fort_artillery_nest"} else {"Land_fort_artillery_nest_EP1"}];
+_n = _n + ["Hhedgehog_concreteBig"];
+_n = _n + ["Hedgehog_EP1"];
+_n = _n + [if (WF_Camo) then {"Land_CamoNet_EAST"} else {"Land_CamoNet_EAST_EP1"}];
+_n = _n + [if (WF_Camo) then {"Land_CamoNetVar_EAST"} else {"Land_CamoNetVar_EAST_EP1"}];
+_n = _n + [if (WF_Camo) then {"Land_CamoNetB_EAST"} else {"Land_CamoNetB_EAST_EP1"}];
+_n = _n + ["Sign_Danger"];
+_n = _n + ["HeliH"];
+_n = _n + ["Fort_RazorWire"];
+_n = _n + ["Land_Ind_IlluminantTower"];
+_n = _n + ["Concrete_Wall_EP1"];
+_n = _n + ["Land_Campfire"];
+_n = _n + ["RUOrdnanceBox"];
+_n = _n + ["RUVehicleBox"];
+_n = _n + ["RUBasicAmmunitionBox"];
+_n = _n + ["RUBasicWeaponsBox"];
+_n = _n + ["RULaunchersBox"];
+_n = _n + ["RUSpecialWeaponsBox"];
+
+/* Class used for AI, AI will attempt to build those */
+['WFBE_EASTDEFENSES_MG',['KORD_high_TK_EP1'],true] Call SetNamespace;
+['WFBE_EASTDEFENSES_GL',['AGS_TK_EP1'],true] Call SetNamespace;
+['WFBE_EASTDEFENSES_AAPOD',['Igla_AA_pod_TK_EP1','ZU23_TK_EP1'],true] Call SetNamespace;
+['WFBE_EASTDEFENSES_ATPOD',['Metis_TK_EP1','SPG9_TK_INS_EP1'],true] Call SetNamespace;
+['WFBE_EASTDEFENSES_CANNON',['D30_TK_EP1'],true] Call SetNamespace;
+['WFBE_EASTDEFENSES_MASH',['MASH_EP1'],true] Call SetNamespace;
+
+['WFBE_EASTDEFENSENAMES',_n,true] Call SetNamespace; \ No newline at end of file
diff --git a/Common/Config/Core_Structures/CombinedOps/Structures_US.sqf b/Common/Config/Core_Structures/CombinedOps/Structures_US.sqf
new file mode 100644
index 0000000..d2071ab
--- /dev/null
+++ b/Common/Config/Core_Structures/CombinedOps/Structures_US.sqf
@@ -0,0 +1,167 @@
+Private ['_c','_count','_d','_dir','_dis','_n','_s','_t','_v'];
+
+/* Root Definition */
+WESTHQ = if (WF_Camo) then {"LAV25_HQ_unfolded"} else {"M1130_HQ_unfolded_EP1"};
+WESTBAR = if (WF_Camo) then {"USMC_WarfareBBarracks"} else {"US_WarfareBBarracks_EP1"};
+WESTLVF = if (WF_Camo) then {"USMC_WarfareBLightFactory"} else {"US_WarfareBLightFactory_EP1"};
+WESTCC = if (WF_Camo) then {"USMC_WarfareBUAVterminal"} else {"US_WarfareBUAVterminal_EP1"};
+WESTHEAVY = if (WF_Camo) then {"USMC_WarfareBHeavyFactory"} else {"US_WarfareBHeavyFactory_EP1"};
+WESTAIR = if (WF_Camo) then {"USMC_WarfareBAircraftFactory"} else {"US_WarfareBAircraftFactory_EP1"};
+WESTSP = if (WF_Camo) then {"USMC_WarfareBVehicleServicePoint"} else {"US_WarfareBVehicleServicePoint_EP1"};
+WESTAAR = if (WF_Camo) then {"USMC_WarfareBAntiAirRadar"} else {"US_WarfareBAntiAirRadar_EP1"};
+
+/* Flag Textures */
+['WFBE_WESTFLAG','\Ca\ca_e\Data\flag_us_co.paa',true] Call SetNamespace;
+
+/* Mash used after being deployed */
+['WFBE_WESTFARP','Camp_EP1',true] Call SetNamespace;
+
+/* Construction Crates */
+['WFBE_WESTCONSTRUCTIONSITE','US_WarfareBContructionSite_EP1',true] Call SetNamespace;
+
+/* Structures */
+_v = ["Headquarters"];
+_n = [WESTHQ];
+_d = [getText (configFile >> "CfgVehicles" >> (_n select (count _n - 1)) >> "displayName")];
+_c = [('WFBE_HQDEPLOYPRICE' Call GetNamespace)];
+_t = [if (WF_Debug) then {1} else {30}];
+_s = ["HQSite"];
+_dis = [15];
+_dir = [0];
+
+_v = _v + ["Barracks"];
+_n = _n + [WESTBAR];
+_d = _d + [getText (configFile >> "CfgVehicles" >> (_n select (count _n - 1)) >> "displayName")];
+_c = _c + [200];
+_t = _t + [if (WF_Debug) then {1} else {70}];
+_s = _s + ["SmallSite"];
+_dis = _dis + [18];
+_dir = _dir + [90];
+
+_v = _v + ["Light"];
+_n = _n + [WESTLVF];
+_d = _d + [getText (configFile >> "CfgVehicles" >> (_n select (count _n - 1)) >> "displayName")];
+_c = _c + [600];
+_t = _t + [if (WF_Debug) then {1} else {90}];
+_s = _s + ["MediumSite"];
+_dis = _dis + [25];
+_dir = _dir + [90];
+
+_v = _v + ["CommandCenter"];
+_n = _n + [WESTCC];
+_d = _d + [localize "STR_WF_CommandCenter_USMC"];
+_c = _c + [1200];
+_t = _t + [if (WF_Debug) then {1} else {110}];
+_s = _s + ["SmallSite"];
+_dis = _dis + [20];
+_dir = _dir + [90];
+
+_v = _v + ["Heavy"];
+_n = _n + [WESTHEAVY];
+_d = _d + [getText (configFile >> "CfgVehicles" >> (_n select (count _n - 1)) >> "displayName")];
+_c = _c + [2800];
+_t = _t + [if (WF_Debug) then {1} else {130}];
+_s = _s + ["MediumSite"];
+_dis = _dis + [25];
+_dir = _dir + [90];
+
+_v = _v + ["Aircraft"];
+_n = _n + [WESTAIR];
+_d = _d + [localize "STR_WF_AircraftFactory"];
+_c = _c + [4400];
+_t = _t + [if (WF_Debug) then {1} else {150}];
+_s = _s + ["SmallSite"];
+_dis = _dis + [31];
+_dir = _dir + [90];
+
+_v = _v + ["ServicePoint"];
+_n = _n + [WESTSP];
+_d = _d + [localize "STR_WF_MAIN_ServicePoint"];
+_c = _c + [700];
+_t = _t + [if (WF_Debug) then {1} else {70}];
+_s = _s + ["SmallSite"];
+_dis = _dis + [21];
+_dir = _dir + [90];
+
+if (paramAARadar) then {
+ _v = _v + ["AARadar"];
+ _n = _n + [WESTAAR];
+ _d = _d + [getText (configFile >> "CfgVehicles" >> (_n select (count _n - 1)) >> "displayName")];
+ _c = _c + [3200];
+ _t = _t + [if (WF_Debug) then {1} else {280}];
+ _s = _s + ["MediumSite"];
+ _dis = _dis + [21];
+ _dir = _dir + [90];
+};
+
+for [{_count = count _v - 1},{_count >= 0},{_count = _count - 1}] do {
+ [Format["WFBE_WEST%1TYPE",_v select _count],_count,true] Call SetNamespace;
+};
+
+['WFBE_WESTMHQNAME',if (WF_Camo) then {'LAV25_HQ'} else {'M1130_CV_EP1'},true] Call SetNamespace;
+
+['WFBE_WESTSTRUCTURES',_v,true] Call SetNamespace;
+['WFBE_WESTSTRUCTURENAMES',_n,true] Call SetNamespace;
+['WFBE_WESTSTRUCTUREDESCRIPTIONS',_d,true] Call SetNamespace;
+['WFBE_WESTSTRUCTURECOSTS',_c,true] Call SetNamespace;
+['WFBE_WESTSTRUCTURETIMES',_t,true] Call SetNamespace;
+['WFBE_WESTSTRUCTUREDISTANCES',_dis,true] Call SetNamespace;
+['WFBE_WESTSTRUCTUREDIRECTIONS',_dir,true] Call SetNamespace;
+['WFBE_WESTSTRUCTURESCRIPTS',_s,true] Call SetNamespace;
+
+/* Defenses */
+_n = ["WarfareBMGNest_M240_US_EP1"];
+_n = _n + ["M2HD_mini_TriPod_US_EP1"];
+_n = _n + ["SearchLight_US_EP1"];
+_n = _n + ["M2StaticMG_US_EP1"];
+if (paramDLCBAF) then {
+ _n = _n + ["BAF_GPMG_Minitripod_W"];
+ _n = _n + ["BAF_GMG_Tripod_W"];
+ _n = _n + ["BAF_L2A1_Minitripod_W"];
+ _n = _n + ["BAF_L2A1_Tripod_W"];
+};
+_n = _n + ["MK19_TriPod_US_EP1"];
+_n = _n + ["TOW_TriPod_US_EP1"];
+_n = _n + ["Stinger_Pod_US_EP1"];
+_n = _n + ["M252_US_EP1"];
+_n = _n + ["M119_US_EP1"];
+_n = _n + ["Land_HBarrier3"];
+_n = _n + ["Land_HBarrier5"];
+_n = _n + ["Land_HBarrier_large"];
+_n = _n + ["US_WarfareBBarrier5x_EP1"];
+_n = _n + ["US_WarfareBBarrier10x_EP1"];
+_n = _n + ["US_WarfareBBarrier10xTall_EP1"];
+_n = _n + ["MASH_EP1"];
+_n = _n + ["Land_fort_bagfence_long"];
+_n = _n + ["Land_fort_bagfence_corner"];
+_n = _n + ["Land_fort_bagfence_round"];
+_n = _n + [if (WF_Camo) then {"Land_fortified_nest_small"} else {"Land_fortified_nest_small_EP1"}];
+_n = _n + [if (WF_Camo) then {"Land_fort_rampart"} else {"Land_fort_rampart_EP1"}];
+_n = _n + [if (WF_Camo) then {"Land_fort_artillery_nest"} else {"Land_fort_artillery_nest_EP1"}];
+_n = _n + ["Hhedgehog_concreteBig"];
+_n = _n + ["Hedgehog_EP1"];
+_n = _n + [if (WF_Camo) then {"Land_CamoNet_NATO"} else {"Land_CamoNet_NATO_EP1"}];
+_n = _n + [if (WF_Camo) then {"Land_CamoNetVar_NATO"} else {"Land_CamoNetVar_NATO_EP1"}];
+_n = _n + [if (WF_Camo) then {"Land_CamoNetB_NATO"} else {"Land_CamoNetB_NATO_EP1"}];
+_n = _n + ["Sign_Danger"];
+_n = _n + ["HeliH"];
+_n = _n + ["Fort_RazorWire"];
+_n = _n + ["Land_Ind_IlluminantTower"];
+_n = _n + ["Concrete_Wall_EP1"];
+_n = _n + ["Land_Campfire"];
+_n = _n + ["USOrdnanceBox_EP1"];
+_n = _n + ["USVehicleBox_EP1"];
+_n = _n + ["USBasicAmmunitionBox_EP1"];
+_n = _n + ["USBasicWeapons_EP1"];
+_n = _n + ["USLaunchers_EP1"];
+_n = _n + ["USSpecialWeapons_EP1"];
+
+/* Class used for AI, AI will attempt to build those */
+['WFBE_WESTDEFENSES_MG',['M2StaticMG_US_EP1'],true] Call SetNamespace;
+['WFBE_WESTDEFENSES_GL',['MK19_TriPod_US_EP1'],true] Call SetNamespace;
+['WFBE_WESTDEFENSES_AAPOD',['Stinger_Pod_US_EP1'],true] Call SetNamespace;
+['WFBE_WESTDEFENSES_ATPOD',['TOW_TriPod_US_EP1'],true] Call SetNamespace;
+['WFBE_WESTDEFENSES_CANNON',['M119_US_EP1'],true] Call SetNamespace;
+['WFBE_WESTDEFENSES_MASH',['MASH_EP1'],true] Call SetNamespace;
+
+['WFBE_WESTDEFENSENAMES',_n,true] Call SetNamespace; \ No newline at end of file
diff --git a/Common/Config/Core_Structures/Vanilla/Structures_CDF.sqf b/Common/Config/Core_Structures/Vanilla/Structures_CDF.sqf
new file mode 100644
index 0000000..180aed1
--- /dev/null
+++ b/Common/Config/Core_Structures/Vanilla/Structures_CDF.sqf
@@ -0,0 +1,162 @@
+Private ['_c','_count','_d','_dir','_dis','_n','_s','_t','_v'];
+
+/* Root Definition */
+WESTHQ = "BMP2_HQ_CDF_unfolded";
+WESTBAR = "CDF_WarfareBBarracks";
+WESTLVF = "CDF_WarfareBLightFactory";
+WESTCC = "CDF_WarfareBUAVterminal";
+WESTHEAVY = "CDF_WarfareBHeavyFactory";
+WESTAIR = "CDF_WarfareBAircraftFactory";
+WESTSP = "CDF_WarfareBVehicleServicePoint";
+WESTAAR = "CDF_WarfareBAntiAirRadar";
+
+/* Flag Textures */
+['WFBE_WESTFLAG','\Ca\Data\flag_chernarus_co.paa',true] Call SetNamespace;
+
+/* Mash used after being deployed */
+['WFBE_WESTFARP','Camp',true] Call SetNamespace;
+
+/* Construction Crates */
+['WFBE_WESTCONSTRUCTIONSITE','CDF_WarfareBContructionSite',true] Call SetNamespace;
+
+/* Structures */
+_v = ["Headquarters"];
+_n = [WESTHQ];
+_d = [getText (configFile >> "CfgVehicles" >> (_n select (count _n - 1)) >> "displayName")];
+_c = [('WFBE_HQDEPLOYPRICE' Call GetNamespace)];
+_t = [if (WF_Debug) then {1} else {30}];
+_s = ["HQSite"];
+_dis = [15];
+_dir = [0];
+
+_v = _v + ["Barracks"];
+_n = _n + [WESTBAR];
+_d = _d + [getText (configFile >> "CfgVehicles" >> (_n select (count _n - 1)) >> "displayName")];
+_c = _c + [200];
+_t = _t + [if (WF_Debug) then {1} else {70}];
+_s = _s + ["SmallSite"];
+_dis = _dis + [18];
+_dir = _dir + [90];
+
+_v = _v + ["Light"];
+_n = _n + [WESTLVF];
+_d = _d + [getText (configFile >> "CfgVehicles" >> (_n select (count _n - 1)) >> "displayName")];
+_c = _c + [600];
+_t = _t + [if (WF_Debug) then {1} else {90}];
+_s = _s + ["MediumSite"];
+_dis = _dis + [25];
+_dir = _dir + [90];
+
+_v = _v + ["CommandCenter"];
+_n = _n + [WESTCC];
+_d = _d + [localize "STR_WF_CommandCenter_USMC"];
+_c = _c + [1200];
+_t = _t + [if (WF_Debug) then {1} else {110}];
+_s = _s + ["SmallSite"];
+_dis = _dis + [20];
+_dir = _dir + [90];
+
+_v = _v + ["Heavy"];
+_n = _n + [WESTHEAVY];
+_d = _d + [getText (configFile >> "CfgVehicles" >> (_n select (count _n - 1)) >> "displayName")];
+_c = _c + [2800];
+_t = _t + [if (WF_Debug) then {1} else {130}];
+_s = _s + ["MediumSite"];
+_dis = _dis + [25];
+_dir = _dir + [90];
+
+_v = _v + ["Aircraft"];
+_n = _n + [WESTAIR];
+_d = _d + [getText (configFile >> "CfgVehicles" >> (_n select (count _n - 1)) >> "displayName")];
+_c = _c + [4400];
+_t = _t + [if (WF_Debug) then {1} else {150}];
+_s = _s + ["SmallSite"];
+_dis = _dis + [31];
+_dir = _dir + [90];
+
+_v = _v + ["ServicePoint"];
+_n = _n + [WESTSP];
+_d = _d + [getText (configFile >> "CfgVehicles" >> (_n select (count _n - 1)) >> "displayName")];
+_c = _c + [700];
+_t = _t + [if (WF_Debug) then {1} else {70}];
+_s = _s + ["SmallSite"];
+_dis = _dis + [21];
+_dir = _dir + [90];
+
+if (paramAARadar) then {
+ _v = _v + ["AARadar"];
+ _n = _n + [WESTAAR];
+ _d = _d + [getText (configFile >> "CfgVehicles" >> (_n select (count _n - 1)) >> "displayName")];
+ _c = _c + [3200];
+ _t = _t + [if (WF_Debug) then {1} else {280}];
+ _s = _s + ["MediumSite"];
+ _dis = _dis + [21];
+ _dir = _dir + [90];
+};
+
+for [{_count = count _v - 1},{_count >= 0},{_count = _count - 1}] do {
+ [Format["WFBE_WEST%1TYPE",_v select _count],_count,true] Call SetNamespace;
+};
+
+['WFBE_WESTMHQNAME','BMP2_HQ_CDF',true] Call SetNamespace;
+
+['WFBE_WESTSTRUCTURES',_v,true] Call SetNamespace;
+['WFBE_WESTSTRUCTURENAMES',_n,true] Call SetNamespace;
+['WFBE_WESTSTRUCTUREDESCRIPTIONS',_d,true] Call SetNamespace;
+['WFBE_WESTSTRUCTURECOSTS',_c,true] Call SetNamespace;
+['WFBE_WESTSTRUCTURETIMES',_t,true] Call SetNamespace;
+['WFBE_WESTSTRUCTUREDISTANCES',_dis,true] Call SetNamespace;
+['WFBE_WESTSTRUCTUREDIRECTIONS',_dir,true] Call SetNamespace;
+['WFBE_WESTSTRUCTURESCRIPTS',_s,true] Call SetNamespace;
+
+/* Defenses */
+_n = ["CDF_WarfareBMGNest_PK"];
+_n = _n + ["DSHkM_Mini_TriPod_CDF"];
+_n = _n + ["DSHKM_CDF"];
+_n = _n + ["SearchLight_CDF"];
+_n = _n + ["AGS_CDF"];
+_n = _n + ["SPG9_CDF"];
+_n = _n + ["ZU23_CDF"];
+_n = _n + ["2b14_82mm_CDF"];
+_n = _n + ["D30_CDF"];
+_n = _n + ["Land_HBarrier3"];
+_n = _n + ["Land_HBarrier5"];
+_n = _n + ["Land_HBarrier_large"];
+_n = _n + ["Base_WarfareBBarrier5x"];
+_n = _n + ["Base_WarfareBBarrier10x"];
+_n = _n + ["Base_WarfareBBarrier10xTall"];
+_n = _n + ["MASH"];
+_n = _n + ["Land_fort_bagfence_long"];
+_n = _n + ["Land_fort_bagfence_corner"];
+_n = _n + ["Land_fort_bagfence_round"];
+_n = _n + ["Land_fortified_nest_small"];
+_n = _n + ["Land_fortified_nest_big"];
+_n = _n + ["Land_Fort_Watchtower"];
+_n = _n + ["Land_fort_rampart"];
+_n = _n + ["Land_fort_artillery_nest"];
+_n = _n + ["Hhedgehog_concreteBig"];
+_n = _n + ["Hedgehog"];
+_n = _n + ["Land_CamoNet_NATO"];
+_n = _n + ["Land_CamoNetVar_NATO"];
+_n = _n + ["Land_CamoNetB_NATO"];
+_n = _n + ["Sign_Danger"];
+_n = _n + ["HeliH"];
+_n = _n + ["Fort_RazorWire"];
+_n = _n + ["Land_Ind_IlluminantTower"];
+_n = _n + ["Land_Campfire"];
+_n = _n + ["RUOrdnanceBox"];
+_n = _n + ["RUVehicleBox"];
+_n = _n + ["RUBasicAmmunitionBox"];
+_n = _n + ["RUBasicWeaponsBox"];
+_n = _n + ["RULaunchersBox"];
+_n = _n + ["RUSpecialWeaponsBox"];
+
+/* Class used for AI, AI will attempt to build those */
+['WFBE_WESTDEFENSES_MG',['DSHKM_CDF'],true] Call SetNamespace;
+['WFBE_WESTDEFENSES_GL',['AGS_CDF'],true] Call SetNamespace;
+['WFBE_WESTDEFENSES_AAPOD',['ZU23_CDF'],true] Call SetNamespace;
+['WFBE_WESTDEFENSES_ATPOD',['SPG9_CDF'],true] Call SetNamespace;
+['WFBE_WESTDEFENSES_CANNON',['D30_CDF'],true] Call SetNamespace;
+['WFBE_WESTDEFENSES_MASH',['MASH'],true] Call SetNamespace;
+
+['WFBE_WESTDEFENSENAMES',_n,true] Call SetNamespace; \ No newline at end of file
diff --git a/Common/Config/Core_Structures/Vanilla/Structures_INS.sqf b/Common/Config/Core_Structures/Vanilla/Structures_INS.sqf
new file mode 100644
index 0000000..edfdf5d
--- /dev/null
+++ b/Common/Config/Core_Structures/Vanilla/Structures_INS.sqf
@@ -0,0 +1,163 @@
+Private ['_c','_count','_d','_dir','_dis','_n','_s','_t','_v'];
+
+/* Root Definition */
+EASTHQ = "BMP2_HQ_INS_unfolded";
+EASTBAR = "Ins_WarfareBBarracks";
+EASTLVF = "Ins_WarfareBLightFactory";
+EASTCC = "INS_WarfareBUAVterminal";
+EASTHEAVY = "Ins_WarfareBHeavyFactory";
+EASTAIR = "INS_WarfareBAircraftFactory";
+EASTSP = "INS_WarfareBVehicleServicePoint";
+EASTAAR = "INS_WarfareBAntiAirRadar";
+
+/* Flag Textures */
+['WFBE_EASTFLAG','\Ca\Data\flag_chdkz_co.paa',true] Call SetNamespace;
+
+/* Mash used after being deployed */
+['WFBE_EASTFARP','CampEast',true] Call SetNamespace;
+
+/* Construction Crates */
+['WFBE_EASTCONSTRUCTIONSITE','Ins_WarfareBContructionSite',true] Call SetNamespace;
+
+/* Structures */
+_v = ["Headquarters"];
+_n = [EASTHQ];
+_d = [getText (configFile >> "CfgVehicles" >> (_n select (count _n - 1)) >> "displayName")];
+_c = [('WFBE_HQDEPLOYPRICE' Call GetNamespace)];
+_t = [if (WF_Debug) then {1} else {30}];
+_s = ["HQSite"];
+_dis = [15];
+_dir = [0];
+
+_v = _v + ["Barracks"];
+_n = _n + [EASTBAR];
+_d = _d + [getText (configFile >> "CfgVehicles" >> (_n select (count _n - 1)) >> "displayName")];
+_c = _c + [200];
+_t = _t + [if (WF_Debug) then {1} else {70}];
+_s = _s + ["SmallSite"];
+_dis = _dis + [18];
+_dir = _dir + [90];
+
+_v = _v + ["Light"];
+_n = _n + [EASTLVF];
+_d = _d + [getText (configFile >> "CfgVehicles" >> (_n select (count _n - 1)) >> "displayName")];
+_c = _c + [600];
+_t = _t + [if (WF_Debug) then {1} else {90}];
+_s = _s + ["MediumSite"];
+_dis = _dis + [25];
+_dir = _dir + [90];
+
+_v = _v + ["CommandCenter"];
+_n = _n + [EASTCC];
+_d = _d + [localize "STR_WF_CommandCenter_RU"];
+_c = _c + [1200];
+_t = _t + [if (WF_Debug) then {1} else {110}];
+_s = _s + ["SmallSite"];
+
+_dis = _dis + [20];
+_dir = _dir + [90];
+
+_v = _v + ["Heavy"];
+_n = _n + [EASTHEAVY];
+_d = _d + [getText (configFile >> "CfgVehicles" >> (_n select (count _n - 1)) >> "displayName")];
+_c = _c + [2800];
+_t = _t + [if (WF_Debug) then {1} else {130}];
+_s = _s + ["MediumSite"];
+_dis = _dis + [25];
+_dir = _dir + [90];
+
+_v = _v + ["Aircraft"];
+_n = _n + [EASTAIR];
+_d = _d + [getText (configFile >> "CfgVehicles" >> (_n select (count _n - 1)) >> "displayName")];
+_c = _c + [4400];
+_t = _t + [if (WF_Debug) then {1} else {150}];
+_s = _s + ["SmallSite"];
+_dis = _dis + [21];
+_dir = _dir + [90];
+
+_v = _v + ["ServicePoint"];
+_n = _n + [EASTSP];
+_d = _d + [getText (configFile >> "CfgVehicles" >> (_n select (count _n - 1)) >> "displayName")];
+_c = _c + [700];
+_t = _t + [if (WF_Debug) then {1} else {70}];
+_s = _s + ["SmallSite"];
+_dis = _dis + [21];
+_dir = _dir + [90];
+
+if (paramAARadar) then {
+ _v = _v + ["AARadar"];
+ _n = _n + [EASTAAR];
+ _d = _d + [getText (configFile >> "CfgVehicles" >> (_n select (count _n - 1)) >> "displayName")];
+ _c = _c + [3200];
+ _t = _t + [if (WF_Debug) then {1} else {280}];
+ _s = _s + ["MediumSite"];
+ _dis = _dis + [21];
+ _dir = _dir + [90];
+};
+
+for [{_count = count _v - 1},{_count >= 0},{_count = _count - 1}] do {
+ [Format["WFBE_EAST%1TYPE",_v select _count],_count,true] Call SetNamespace;
+};
+
+['WFBE_EASTMHQNAME','BMP2_HQ_INS',true] Call SetNamespace;
+
+['WFBE_EASTSTRUCTURES',_v,true] Call SetNamespace;
+['WFBE_EASTSTRUCTURENAMES',_n,true] Call SetNamespace;
+['WFBE_EASTSTRUCTUREDESCRIPTIONS',_d,true] Call SetNamespace;
+['WFBE_EASTSTRUCTURECOSTS',_c,true] Call SetNamespace;
+['WFBE_EASTSTRUCTURETIMES',_t,true] Call SetNamespace;
+['WFBE_EASTSTRUCTUREDISTANCES',_dis,true] Call SetNamespace;
+['WFBE_EASTSTRUCTUREDIRECTIONS',_dir,true] Call SetNamespace;
+['WFBE_EASTSTRUCTURESCRIPTS',_s,true] Call SetNamespace;
+
+/* Defenses */
+_n = ["Ins_WarfareBMGNest_PK"];
+_n = _n + ["SearchLight_INS"];
+_n = _n + ["DSHkM_Mini_TriPod"];
+_n = _n + ["DSHKM_Ins"];
+_n = _n + ["AGS_Ins"];
+_n = _n + ["SPG9_Ins"];
+_n = _n + ["ZU23_Ins"];
+_n = _n + ["2b14_82mm_INS"];
+_n = _n + ["D30_Ins"];
+_n = _n + ["Land_HBarrier3"];
+_n = _n + ["Land_HBarrier5"];
+_n = _n + ["Land_HBarrier_large"];
+_n = _n + ["Base_WarfareBBarrier5x"];
+_n = _n + ["Base_WarfareBBarrier10x"];
+_n = _n + ["Base_WarfareBBarrier10xTall"];
+_n = _n + ["MASH"];
+_n = _n + ["Land_fort_bagfence_long"];
+_n = _n + ["Land_fort_bagfence_corner"];
+_n = _n + ["Land_fort_bagfence_round"];
+_n = _n + ["Land_fortified_nest_small"];
+_n = _n + ["Land_fortified_nest_big"];
+_n = _n + ["Land_Fort_Watchtower"];
+_n = _n + ["Land_fort_rampart"];
+_n = _n + ["Land_fort_artillery_nest"];
+_n = _n + ["Hhedgehog_concreteBig"];
+_n = _n + ["Hedgehog"];
+_n = _n + ["Land_CamoNet_EAST"];
+_n = _n + ["Land_CamoNetVar_EAST"];
+_n = _n + ["Land_CamoNetB_EAST"];
+_n = _n + ["Sign_Danger"];
+_n = _n + ["HeliH"];
+_n = _n + ["Fort_RazorWire"];
+_n = _n + ["Land_Ind_IlluminantTower"];
+_n = _n + ["Land_Campfire"];
+_n = _n + ["RUOrdnanceBox"];
+_n = _n + ["RUVehicleBox"];
+_n = _n + ["RUBasicAmmunitionBox"];
+_n = _n + ["RUBasicWeaponsBox"];
+_n = _n + ["RULaunchersBox"];
+_n = _n + ["RUSpecialWeaponsBox"];
+
+/* Class used for AI, AI will attempt to build those */
+['WFBE_EASTDEFENSES_MG',['DSHKM_Ins'],true] Call SetNamespace;
+['WFBE_EASTDEFENSES_GL',['AGS_Ins'],true] Call SetNamespace;
+['WFBE_EASTDEFENSES_AAPOD',['ZU23_Ins'],true] Call SetNamespace;
+['WFBE_EASTDEFENSES_ATPOD',['SPG9_Ins'],true] Call SetNamespace;
+['WFBE_EASTDEFENSES_CANNON',['D30_Ins'],true] Call SetNamespace;
+['WFBE_EASTDEFENSES_MASH',['MASH'],true] Call SetNamespace;
+
+['WFBE_EASTDEFENSENAMES',_n,true] Call SetNamespace; \ No newline at end of file
diff --git a/Common/Config/Core_Structures/Vanilla/Structures_RU.sqf b/Common/Config/Core_Structures/Vanilla/Structures_RU.sqf
new file mode 100644
index 0000000..c0d32f5
--- /dev/null
+++ b/Common/Config/Core_Structures/Vanilla/Structures_RU.sqf
@@ -0,0 +1,165 @@
+Private ['_c','_count','_d','_dir','_dis','_n','_s','_t','_v'];
+
+/* Root Definition */
+EASTHQ = "BTR90_HQ_unfolded";
+EASTBAR = "RU_WarfareBBarracks";
+EASTLVF = "RU_WarfareBLightFactory";
+EASTCC = "RU_WarfareBUAVterminal";
+EASTHEAVY = "RU_WarfareBHeavyFactory";
+EASTAIR = "RU_WarfareBAircraftFactory";
+EASTSP = "RU_WarfareBVehicleServicePoint";
+EASTAAR = "RU_WarfareBAntiAirRadar";
+
+/* Flag Textures */
+['WFBE_EASTFLAG','\Ca\Data\flag_rus_co.paa',true] Call SetNamespace;
+
+/* Mash used after being deployed */
+['WFBE_EASTFARP','CampEast',true] Call SetNamespace;
+
+/* Construction Crates */
+['WFBE_EASTCONSTRUCTIONSITE','RU_WarfareBContructionSite',true] Call SetNamespace;
+
+/* Structures */
+_v = ["Headquarters"];
+_n = [EASTHQ];
+_d = [getText (configFile >> "CfgVehicles" >> (_n select (count _n - 1)) >> "displayName")];
+_c = [('WFBE_HQDEPLOYPRICE' Call GetNamespace)];
+_t = [if (WF_Debug) then {1} else {30}];
+_s = ["HQSite"];
+_dis = [15];
+_dir = [0];
+
+_v = _v + ["Barracks"];
+_n = _n + [EASTBAR];
+_d = _d + [getText (configFile >> "CfgVehicles" >> (_n select (count _n - 1)) >> "displayName")];
+_c = _c + [200];
+_t = _t + [if (WF_Debug) then {1} else {70}];
+_s = _s + ["SmallSite"];
+_dis = _dis + [18];
+_dir = _dir + [90];
+
+_v = _v + ["Light"];
+_n = _n + [EASTLVF];
+_d = _d + [getText (configFile >> "CfgVehicles" >> (_n select (count _n - 1)) >> "displayName")];
+_c = _c + [600];
+_t = _t + [if (WF_Debug) then {1} else {90}];
+_s = _s + ["MediumSite"];
+_dis = _dis + [25];
+_dir = _dir + [90];
+
+_v = _v + ["CommandCenter"];
+_n = _n + [EASTCC];
+_d = _d + [localize "STR_WF_CommandCenter_RU"];
+_c = _c + [1200];
+_t = _t + [if (WF_Debug) then {1} else {110}];
+_s = _s + ["SmallSite"];
+
+_dis = _dis + [20];
+_dir = _dir + [90];
+
+_v = _v + ["Heavy"];
+_n = _n + [EASTHEAVY];
+_d = _d + [getText (configFile >> "CfgVehicles" >> (_n select (count _n - 1)) >> "displayName")];
+_c = _c + [2800];
+_t = _t + [if (WF_Debug) then {1} else {130}];
+_s = _s + ["MediumSite"];
+_dis = _dis + [25];
+_dir = _dir + [90];
+
+_v = _v + ["Aircraft"];
+_n = _n + [EASTAIR];
+_d = _d + [getText (configFile >> "CfgVehicles" >> (_n select (count _n - 1)) >> "displayName")];
+_c = _c + [4400];
+_t = _t + [if (WF_Debug) then {1} else {150}];
+_s = _s + ["SmallSite"];
+_dis = _dis + [21];
+_dir = _dir + [90];
+
+_v = _v + ["ServicePoint"];
+_n = _n + [EASTSP];
+_d = _d + [getText (configFile >> "CfgVehicles" >> (_n select (count _n - 1)) >> "displayName")];
+_c = _c + [700];
+_t = _t + [if (WF_Debug) then {1} else {70}];
+_s = _s + ["SmallSite"];
+_dis = _dis + [21];
+_dir = _dir + [90];
+
+if (paramAARadar) then {
+ _v = _v + ["AARadar"];
+ _n = _n + [EASTAAR];
+ _d = _d + [getText (configFile >> "CfgVehicles" >> (_n select (count _n - 1)) >> "displayName")];
+ _c = _c + [3200];
+ _t = _t + [if (WF_Debug) then {1} else {280}];
+ _s = _s + ["MediumSite"];
+ _dis = _dis + [21];
+ _dir = _dir + [90];
+};
+
+for [{_count = count _v - 1},{_count >= 0},{_count = _count - 1}] do {
+ [Format["WFBE_EAST%1TYPE",_v select _count],_count,true] Call SetNamespace;
+};
+
+['WFBE_EASTMHQNAME','BTR90_HQ',true] Call SetNamespace;
+
+['WFBE_EASTSTRUCTURES',_v,true] Call SetNamespace;
+['WFBE_EASTSTRUCTURENAMES',_n,true] Call SetNamespace;
+['WFBE_EASTSTRUCTUREDESCRIPTIONS',_d,true] Call SetNamespace;
+['WFBE_EASTSTRUCTURECOSTS',_c,true] Call SetNamespace;
+['WFBE_EASTSTRUCTURETIMES',_t,true] Call SetNamespace;
+['WFBE_EASTSTRUCTUREDISTANCES',_dis,true] Call SetNamespace;
+['WFBE_EASTSTRUCTUREDIRECTIONS',_dir,true] Call SetNamespace;
+['WFBE_EASTSTRUCTURESCRIPTS',_s,true] Call SetNamespace;
+
+/* Defenses */
+_n = ["RU_WarfareBMGNest_PK"];
+_n = _n + ["SearchLight_RUS"];
+_n = _n + ["KORD"];
+_n = _n + ["KORD_high"];
+_n = _n + ["AGS_RU"];
+_n = _n + ["SPG9_Ins"];
+_n = _n + ["Metis"];
+_n = _n + ["Igla_AA_pod_East"];
+_n = _n + ["ZU23_Ins"];
+_n = _n + ["2b14_82mm"];
+_n = _n + ["D30_RU"];
+_n = _n + ["Land_HBarrier3"];
+_n = _n + ["Land_HBarrier5"];
+_n = _n + ["Land_HBarrier_large"];
+_n = _n + ["Base_WarfareBBarrier5x"];
+_n = _n + ["Base_WarfareBBarrier10x"];
+_n = _n + ["Base_WarfareBBarrier10xTall"];
+_n = _n + ["MASH"];
+_n = _n + ["Land_fort_bagfence_long"];
+_n = _n + ["Land_fort_bagfence_corner"];
+_n = _n + ["Land_fort_bagfence_round"];
+_n = _n + ["Land_fortified_nest_small"];
+_n = _n + ["Land_fortified_nest_big"];
+_n = _n + ["Land_Fort_Watchtower"];
+_n = _n + ["Land_fort_rampart"];
+_n = _n + ["Land_fort_artillery_nest"];
+_n = _n + ["Hhedgehog_concreteBig"];
+_n = _n + ["Hedgehog"];
+_n = _n + ["Land_CamoNet_EAST"];
+_n = _n + ["Land_CamoNetVar_EAST"];
+_n = _n + ["Land_CamoNetB_EAST"];
+_n = _n + ["Sign_Danger"];
+_n = _n + ["HeliH"];
+_n = _n + ["Fort_RazorWire"];
+_n = _n + ["Land_Ind_IlluminantTower"];
+_n = _n + ["Land_Campfire"];
+_n = _n + ["RUOrdnanceBox"];
+_n = _n + ["RUVehicleBox"];
+_n = _n + ["RUBasicAmmunitionBox"];
+_n = _n + ["RUBasicWeaponsBox"];
+_n = _n + ["RULaunchersBox"];
+_n = _n + ["RUSpecialWeaponsBox"];
+
+/* Class used for AI, AI will attempt to build those */
+['WFBE_EASTDEFENSES_MG',['KORD_high'],true] Call SetNamespace;
+['WFBE_EASTDEFENSES_GL',['AGS_RU'],true] Call SetNamespace;
+['WFBE_EASTDEFENSES_AAPOD',['Igla_AA_pod_East','ZU23_Ins'],true] Call SetNamespace;
+['WFBE_EASTDEFENSES_ATPOD',['Metis','SPG9_Ins'],true] Call SetNamespace;
+['WFBE_EASTDEFENSES_CANNON',['D30_RU'],true] Call SetNamespace;
+['WFBE_EASTDEFENSES_MASH',['MASH'],true] Call SetNamespace;
+
+['WFBE_EASTDEFENSENAMES',_n,true] Call SetNamespace; \ No newline at end of file
diff --git a/Common/Config/Core_Structures/Vanilla/Structures_USMC.sqf b/Common/Config/Core_Structures/Vanilla/Structures_USMC.sqf
new file mode 100644
index 0000000..16ad994
--- /dev/null
+++ b/Common/Config/Core_Structures/Vanilla/Structures_USMC.sqf
@@ -0,0 +1,162 @@
+Private ['_c','_count','_d','_dir','_dis','_n','_s','_t','_v'];
+
+/* Root Definition */
+WESTHQ = "LAV25_HQ_unfolded";
+WESTBAR = "USMC_WarfareBBarracks";
+WESTLVF = "USMC_WarfareBLightFactory";
+WESTCC = "USMC_WarfareBUAVterminal";
+WESTHEAVY = "USMC_WarfareBHeavyFactory";
+WESTAIR = "USMC_WarfareBAircraftFactory";
+WESTSP = "USMC_WarfareBVehicleServicePoint";
+WESTAAR = "USMC_WarfareBAntiAirRadar";
+
+/* Flag Textures */
+['WFBE_WESTFLAG','\Ca\Data\flag_usa_co.paa',true] Call SetNamespace;
+
+/* Mash used after being deployed */
+['WFBE_WESTFARP','Camp',true] Call SetNamespace;
+
+/* Construction Crates */
+['WFBE_WESTCONSTRUCTIONSITE','USMC_WarfareBContructionSite',true] Call SetNamespace;
+
+/* Structures */
+_v = ["Headquarters"];
+_n = [WESTHQ];
+_d = [getText (configFile >> "CfgVehicles" >> (_n select (count _n - 1)) >> "displayName")];
+_c = [('WFBE_HQDEPLOYPRICE' Call GetNamespace)];
+_t = [if (WF_Debug) then {1} else {30}];
+_s = ["HQSite"];
+_dis = [15];
+_dir = [0];
+
+_v = _v + ["Barracks"];
+_n = _n + [WESTBAR];
+_d = _d + [getText (configFile >> "CfgVehicles" >> (_n select (count _n - 1)) >> "displayName")];
+_c = _c + [200];
+_t = _t + [if (WF_Debug) then {1} else {70}];
+_s = _s + ["SmallSite"];
+_dis = _dis + [18];
+_dir = _dir + [90];
+
+_v = _v + ["Light"];
+_n = _n + [WESTLVF];
+_d = _d + [getText (configFile >> "CfgVehicles" >> (_n select (count _n - 1)) >> "displayName")];
+_c = _c + [600];
+_t = _t + [if (WF_Debug) then {1} else {90}];
+_s = _s + ["MediumSite"];
+_dis = _dis + [25];
+_dir = _dir + [90];
+
+_v = _v + ["CommandCenter"];
+_n = _n + [WESTCC];
+_d = _d + [localize "STR_WF_CommandCenter_USMC"];
+_c = _c + [1200];
+_t = _t + [if (WF_Debug) then {1} else {110}];
+_s = _s + ["SmallSite"];
+_dis = _dis + [20];
+_dir = _dir + [90];
+
+_v = _v + ["Heavy"];
+_n = _n + [WESTHEAVY];
+_d = _d + [getText (configFile >> "CfgVehicles" >> (_n select (count _n - 1)) >> "displayName")];
+_c = _c + [2800];
+_t = _t + [if (WF_Debug) then {1} else {130}];
+_s = _s + ["MediumSite"];
+_dis = _dis + [25];
+_dir = _dir + [90];
+
+_v = _v + ["Aircraft"];
+_n = _n + [WESTAIR];
+_d = _d + [getText (configFile >> "CfgVehicles" >> (_n select (count _n - 1)) >> "displayName")];
+_c = _c + [4400];
+_t = _t + [if (WF_Debug) then {1} else {150}];
+_s = _s + ["SmallSite"];
+_dis = _dis + [31];
+_dir = _dir + [90];
+
+_v = _v + ["ServicePoint"];
+_n = _n + [WESTSP];
+_d = _d + [getText (configFile >> "CfgVehicles" >> (_n select (count _n - 1)) >> "displayName")];
+_c = _c + [700];
+_t = _t + [if (WF_Debug) then {1} else {70}];
+_s = _s + ["SmallSite"];
+_dis = _dis + [21];
+_dir = _dir + [90];
+
+if (paramAARadar) then {
+ _v = _v + ["AARadar"];
+ _n = _n + [WESTAAR];
+ _d = _d + [getText (configFile >> "CfgVehicles" >> (_n select (count _n - 1)) >> "displayName")];
+ _c = _c + [3200];
+ _t = _t + [if (WF_Debug) then {1} else {280}];
+ _s = _s + ["MediumSite"];
+ _dis = _dis + [21];
+ _dir = _dir + [90];
+};
+
+for [{_count = count _v - 1},{_count >= 0},{_count = _count - 1}] do {
+ [Format["WFBE_WEST%1TYPE",_v select _count],_count,true] Call SetNamespace;
+};
+
+['WFBE_WESTMHQNAME','LAV25_HQ',true] Call SetNamespace;
+
+['WFBE_WESTSTRUCTURES',_v,true] Call SetNamespace;
+['WFBE_WESTSTRUCTURENAMES',_n,true] Call SetNamespace;
+['WFBE_WESTSTRUCTUREDESCRIPTIONS',_d,true] Call SetNamespace;
+['WFBE_WESTSTRUCTURECOSTS',_c,true] Call SetNamespace;
+['WFBE_WESTSTRUCTURETIMES',_t,true] Call SetNamespace;
+['WFBE_WESTSTRUCTUREDISTANCES',_dis,true] Call SetNamespace;
+['WFBE_WESTSTRUCTUREDIRECTIONS',_dir,true] Call SetNamespace;
+['WFBE_WESTSTRUCTURESCRIPTS',_s,true] Call SetNamespace;
+
+/* Defenses */
+_n = ["USMC_WarfareBMGNest_M240"];
+_n = _n + ["M2HD_mini_TriPod"];
+_n = _n + ["M2StaticMG"];
+_n = _n + ["SearchLight"];
+_n = _n + ["MK19_TriPod"];
+_n = _n + ["TOW_TriPod"];
+_n = _n + ["Stinger_Pod"];
+_n = _n + ["M252"];
+_n = _n + ["M119"];
+_n = _n + ["Land_HBarrier3"];
+_n = _n + ["Land_HBarrier5"];
+_n = _n + ["Land_HBarrier_large"];
+_n = _n + ["Base_WarfareBBarrier5x"];
+_n = _n + ["Base_WarfareBBarrier10x"];
+_n = _n + ["Base_WarfareBBarrier10xTall"];
+_n = _n + ["MASH"];
+_n = _n + ["Land_fort_bagfence_long"];
+_n = _n + ["Land_fort_bagfence_corner"];
+_n = _n + ["Land_fort_bagfence_round"];
+_n = _n + ["Land_fortified_nest_small"];
+_n = _n + ["Land_fortified_nest_big"];
+_n = _n + ["Land_Fort_Watchtower"];
+_n = _n + ["Land_fort_rampart"];
+_n = _n + ["Land_fort_artillery_nest"];
+_n = _n + ["Hhedgehog_concreteBig"];
+_n = _n + ["Hedgehog"];
+_n = _n + ["Land_CamoNet_NATO"];
+_n = _n + ["Land_CamoNetVar_NATO"];
+_n = _n + ["Land_CamoNetB_NATO"];
+_n = _n + ["Sign_Danger"];
+_n = _n + ["HeliH"];
+_n = _n + ["Fort_RazorWire"];
+_n = _n + ["Land_Ind_IlluminantTower"];
+_n = _n + ["Land_Campfire"];
+_n = _n + ["USOrdnanceBox"];
+_n = _n + ["USVehicleBox"];
+_n = _n + ["USBasicAmmunitionBox"];
+_n = _n + ["USBasicWeaponsBox"];
+_n = _n + ["USLaunchersBox"];
+_n = _n + ["USSpecialWeaponsBox"];
+
+/* Class used for AI, AI will attempt to build those */
+['WFBE_WESTDEFENSES_MG',['M2StaticMG'],true] Call SetNamespace;
+['WFBE_WESTDEFENSES_GL',['MK19_TriPod'],true] Call SetNamespace;
+['WFBE_WESTDEFENSES_AAPOD',['Stinger_Pod'],true] Call SetNamespace;
+['WFBE_WESTDEFENSES_ATPOD',['TOW_TriPod'],true] Call SetNamespace;
+['WFBE_WESTDEFENSES_CANNON',['M119'],true] Call SetNamespace;
+['WFBE_WESTDEFENSES_MASH',['MASH'],true] Call SetNamespace;
+
+['WFBE_WESTDEFENSENAMES',_n,true] Call SetNamespace; \ No newline at end of file
diff --git a/Common/Config/Core_Units/Arrowhead/Units_Aircraft_TK.sqf b/Common/Config/Core_Units/Arrowhead/Units_Aircraft_TK.sqf
new file mode 100644
index 0000000..88c6e33
--- /dev/null
+++ b/Common/Config/Core_Units/Arrowhead/Units_Aircraft_TK.sqf
@@ -0,0 +1,20 @@
+Private ['_r','_u'];
+
+_r = 'WFBE_RESTRICTIONADVAIR' Call GetNamespace;
+
+/* Overall Configuration */
+['WFBE_EASTPILOT','TK_Soldier_Pilot_EP1',false] Call SetNamespace;
+
+/* Takistan Aircraft Vehicles */
+_u = ['Mi17_TK_EP1'];
+_u = _u + ['UH1H_TK_EP1'];
+if (_r == 0 ||_r == 1) then {
+ _u = _u + ['Mi24_D_TK_EP1'];
+};
+if (_r == 0) then {
+ _u = _u + ['An2_TK_EP1'];
+ _u = _u + ['L39_TK_EP1'];
+ _u = _u + ['Su25_TK_EP1'];
+};
+
+_u \ No newline at end of file
diff --git a/Common/Config/Core_Units/Arrowhead/Units_Aircraft_TKA.sqf b/Common/Config/Core_Units/Arrowhead/Units_Aircraft_TKA.sqf
new file mode 100644
index 0000000..3bdd836
--- /dev/null
+++ b/Common/Config/Core_Units/Arrowhead/Units_Aircraft_TKA.sqf
@@ -0,0 +1,17 @@
+Private ['_r','_u'];
+
+_r = 'WFBE_RESTRICTIONADVAIR' Call GetNamespace;
+
+//--- Takistan Aircraft Vehicles.
+_u = ['Mi17_TK_EP1'];
+_u = _u + ['UH1H_TK_EP1'];
+if (_r == 0 ||_r == 1) then {
+ _u = _u + ['Mi24_D_TK_EP1'];
+};
+if (_r == 0) then {
+ _u = _u + ['An2_TK_EP1'];
+ _u = _u + ['L39_TK_EP1'];
+ _u = _u + ['Su25_TK_EP1'];
+};
+
+_u \ No newline at end of file
diff --git a/Common/Config/Core_Units/Arrowhead/Units_Aircraft_US.sqf b/Common/Config/Core_Units/Arrowhead/Units_Aircraft_US.sqf
new file mode 100644
index 0000000..3bc2ef5
--- /dev/null
+++ b/Common/Config/Core_Units/Arrowhead/Units_Aircraft_US.sqf
@@ -0,0 +1,27 @@
+Private ['_r','_u'];
+
+_r = 'WFBE_RESTRICTIONADVAIR' Call GetNamespace;
+
+//--- US Aircraft Vehicles.
+_u = ['MH6J_EP1'];
+_u = _u + ['UH60M_EP1'];
+_u = _u + ['UH60M_MEV_EP1'];
+_u = _u + ['CH_47F_EP1'];
+if (_r == 0 || _r == 1) then {
+ _u = _u + ['AH6J_EP1'];
+ _u = _u + ['AH64D_EP1'];
+};
+if (_r == 0) then {
+ _u = _u + ['C130J_US_EP1'];
+ _u = _u + ['A10_US_EP1'];
+};
+if (paramDLCBAF) then {
+ _u = _u + ['BAF_Merlin_HC3_D'];
+ _u = _u + ['CH_47F_BAF'];
+ if (_r == 0 || _r == 1) then {
+ _u = _u + ['AW159_Lynx_BAF'];
+ _u = _u + ['BAF_Apache_AH1_D'];
+ };
+};
+
+_u \ No newline at end of file
diff --git a/Common/Config/Core_Units/Arrowhead/Units_Airport_TK.sqf b/Common/Config/Core_Units/Arrowhead/Units_Airport_TK.sqf
new file mode 100644
index 0000000..6af99f5
--- /dev/null
+++ b/Common/Config/Core_Units/Arrowhead/Units_Airport_TK.sqf
@@ -0,0 +1,13 @@
+Private ['_r','_u'];
+
+_r = 'WFBE_RESTRICTIONADVAIR' Call GetNamespace;
+
+/* Takistan Airport Vehicles */
+_u = [];
+if (_r == 0) then {
+ _u = _u + ['An2_TK_EP1'];
+ _u = _u + ['L39_TK_EP1'];
+ _u = _u + ['Su25_TK_EP1'];
+};
+
+_u \ No newline at end of file
diff --git a/Common/Config/Core_Units/Arrowhead/Units_Airport_TKA.sqf b/Common/Config/Core_Units/Arrowhead/Units_Airport_TKA.sqf
new file mode 100644
index 0000000..6af99f5
--- /dev/null
+++ b/Common/Config/Core_Units/Arrowhead/Units_Airport_TKA.sqf
@@ -0,0 +1,13 @@
+Private ['_r','_u'];
+
+_r = 'WFBE_RESTRICTIONADVAIR' Call GetNamespace;
+
+/* Takistan Airport Vehicles */
+_u = [];
+if (_r == 0) then {
+ _u = _u + ['An2_TK_EP1'];
+ _u = _u + ['L39_TK_EP1'];
+ _u = _u + ['Su25_TK_EP1'];
+};
+
+_u \ No newline at end of file
diff --git a/Common/Config/Core_Units/Arrowhead/Units_Airport_US.sqf b/Common/Config/Core_Units/Arrowhead/Units_Airport_US.sqf
new file mode 100644
index 0000000..a58e6a0
--- /dev/null
+++ b/Common/Config/Core_Units/Arrowhead/Units_Airport_US.sqf
@@ -0,0 +1,12 @@
+Private ['_r','_u'];
+
+_r = 'WFBE_RESTRICTIONADVAIR' Call GetNamespace;
+
+/* US Airport Vehicles */
+_u = [];
+if (_r == 0) then {
+ _u = _u + ['C130J_US_EP1'];
+ _u = _u + ['A10_US_EP1'];
+};
+
+_u \ No newline at end of file
diff --git a/Common/Config/Core_Units/Arrowhead/Units_Barracks_TK.sqf b/Common/Config/Core_Units/Arrowhead/Units_Barracks_TK.sqf
new file mode 100644
index 0000000..7ebe052
--- /dev/null
+++ b/Common/Config/Core_Units/Arrowhead/Units_Barracks_TK.sqf
@@ -0,0 +1,33 @@
+Private ['_tiMode','_u'];
+
+/* Overall Configuration */
+['WFBE_EASTSOLDIER','TK_Soldier_EP1',false] Call SetNamespace;
+
+_tiMode = 'WFBE_THERMALIMAGING' Call GetNamespace;
+_tiMode = if (_tiMode == 1 || _tiMode == 3) then {true} else {false};
+
+/* Takistan Troops */
+_u = ['TK_Soldier_EP1'];
+_u = _u + ['TK_Soldier_B_EP1'];
+if (_tiMode) then {
+ _u = _u + ['TK_Soldier_TWS_EP1'];
+};
+_u = _u + ['TK_Soldier_Engineer_EP1'];
+_u = _u + ['TK_Soldier_LAT_EP1'];
+_u = _u + ['TK_Soldier_AT_EP1'];
+_u = _u + ['TK_Soldier_HAT_EP1'];
+_u = _u + ['TK_Soldier_AA_EP1'];
+_u = _u + ['TK_Soldier_AR_EP1'];
+_u = _u + ['TK_Soldier_MG_EP1'];
+_u = _u + ['TK_Soldier_GL_EP1'];
+_u = _u + ['TK_Soldier_Spotter_EP1'];
+_u = _u + ['TK_Soldier_Medic_EP1'];
+_u = _u + ['TK_Special_Forces_EP1'];
+_u = _u + ['TK_Special_Forces_TL_EP1'];
+_u = _u + ['TK_Special_Forces_MG_EP1'];
+_u = _u + ['TK_Soldier_Crew_EP1'];
+_u = _u + ['TK_Soldier_Pilot_EP1'];
+_u = _u + ['TK_Soldier_SL_EP1'];
+_u = _u + ['TK_Soldier_Officer_EP1'];
+
+_u \ No newline at end of file
diff --git a/Common/Config/Core_Units/Arrowhead/Units_Barracks_TKA.sqf b/Common/Config/Core_Units/Arrowhead/Units_Barracks_TKA.sqf
new file mode 100644
index 0000000..c8533b0
--- /dev/null
+++ b/Common/Config/Core_Units/Arrowhead/Units_Barracks_TKA.sqf
@@ -0,0 +1,34 @@
+Private ['_tiMode','_u'];
+
+_tiMode = 'WFBE_THERMALIMAGING' Call GetNamespace;
+_tiMode = if (_tiMode == 1 || _tiMode == 3) then {true} else {false};
+
+//--- Takistan Army Troops.
+_u = ['TK_Soldier_EP1'];
+_u = _u + ['TK_Soldier_B_EP1'];
+if (_tiMode) then {
+ _u = _u + ['TK_Soldier_TWS_EP1'];
+};
+_u = _u + ['TK_Soldier_Engineer_EP1'];
+_u = _u + ['TK_Soldier_LAT_EP1'];
+_u = _u + ['TK_Soldier_AAT_EP1'];
+_u = _u + ['TK_Soldier_AT_EP1'];
+_u = _u + ['TK_Soldier_HAT_EP1'];
+_u = _u + ['TK_Soldier_AA_EP1'];
+_u = _u + ['TK_Soldier_AR_EP1'];
+_u = _u + ['TK_Soldier_AMG_EP1'];
+_u = _u + ['TK_Soldier_MG_EP1'];
+_u = _u + ['TK_Soldier_GL_EP1'];
+_u = _u + ['TK_Soldier_Spotter_EP1'];
+_u = _u + ['TK_Soldier_Sniper_EP1'];
+_u = _u + ['TK_Soldier_SniperH_EP1'];
+_u = _u + ['TK_Soldier_Medic_EP1'];
+_u = _u + ['TK_Special_Forces_EP1'];
+_u = _u + ['TK_Special_Forces_TL_EP1'];
+_u = _u + ['TK_Special_Forces_MG_EP1'];
+_u = _u + ['TK_Soldier_Crew_EP1'];
+_u = _u + ['TK_Soldier_Pilot_EP1'];
+_u = _u + ['TK_Soldier_SL_EP1'];
+_u = _u + ['TK_Soldier_Officer_EP1'];
+
+_u \ No newline at end of file
diff --git a/Common/Config/Core_Units/Arrowhead/Units_Barracks_TKGUE.sqf b/Common/Config/Core_Units/Arrowhead/Units_Barracks_TKGUE.sqf
new file mode 100644
index 0000000..af2038e
--- /dev/null
+++ b/Common/Config/Core_Units/Arrowhead/Units_Barracks_TKGUE.sqf
@@ -0,0 +1,20 @@
+Private ['_u'];
+
+/* Takistan Guerilla Troops */
+_u = ['TK_GUE_Soldier_EP1'];
+_u = _u + ['TK_GUE_Soldier_2_EP1'];
+_u = _u + ['TK_GUE_Soldier_3_EP1'];
+_u = _u + ['TK_GUE_Soldier_4_EP1'];
+_u = _u + ['TK_GUE_Soldier_5_EP1'];
+_u = _u + ['TK_GUE_Soldier_AT_EP1'];
+_u = _u + ['TK_GUE_Soldier_AAT_EP1'];
+_u = _u + ['TK_GUE_Soldier_AA_EP1'];
+_u = _u + ['TK_GUE_Soldier_AR_EP1'];
+_u = _u + ['TK_GUE_Soldier_MG_EP1'];
+_u = _u + ['TK_GUE_Soldier_Sniper_EP1'];
+_u = _u + ['TK_GUE_Bonesetter_EP1'];
+_u = _u + ['TK_GUE_Soldier_HAT_EP1'];
+_u = _u + ['TK_GUE_Soldier_TL_EP1'];
+_u = _u + ['TK_GUE_Warlord_EP1'];
+
+_u \ No newline at end of file
diff --git a/Common/Config/Core_Units/Arrowhead/Units_Barracks_US.sqf b/Common/Config/Core_Units/Arrowhead/Units_Barracks_US.sqf
new file mode 100644
index 0000000..ee77cc0
--- /dev/null
+++ b/Common/Config/Core_Units/Arrowhead/Units_Barracks_US.sqf
@@ -0,0 +1,132 @@
+Private ['_u'];
+
+//--- US Troops.
+_u = ['US_Soldier_Light_EP1'];
+_u = _u + ['US_Soldier_EP1'];
+_u = _u + ['US_Soldier_B_EP1'];
+_u = _u + ['US_Soldier_LAT_EP1'];
+_u = _u + ['US_Soldier_AT_EP1'];
+_u = _u + ['US_Soldier_HAT_EP1'];
+_u = _u + ['US_Soldier_AA_EP1'];
+_u = _u + ['US_Soldier_AR_EP1'];
+_u = _u + ['US_Soldier_MG_EP1'];
+_u = _u + ['US_Soldier_GL_EP1'];
+_u = _u + ['US_Soldier_Sniper_EP1'];
+_u = _u + ['US_Soldier_SniperH_EP1'];
+_u = _u + ['US_Soldier_Sniper_NV_EP1'];
+_u = _u + ['US_Soldier_Marksman_EP1'];
+_u = _u + ['US_Soldier_Medic_EP1'];
+_u = _u + ['US_Soldier_Engineer_EP1'];
+_u = _u + ['US_Soldier_AMG_EP1'];
+_u = _u + ['US_Soldier_AAR_EP1'];
+_u = _u + ['US_Soldier_AHAT_EP1'];
+_u = _u + ['US_Soldier_AAT_EP1'];
+_u = _u + ['US_Soldier_Spotter_EP1'];
+_u = _u + ['US_Soldier_TL_EP1'];
+_u = _u + ['US_Soldier_SL_EP1'];
+_u = _u + ['US_Soldier_Officer_EP1'];
+_u = _u + ['US_Soldier_Crew_EP1'];
+_u = _u + ['US_Soldier_Pilot_EP1'];
+_u = _u + ['US_Delta_Force_EP1'];
+_u = _u + ['US_Delta_Force_TL_EP1'];
+_u = _u + ['US_Delta_Force_Medic_EP1'];
+_u = _u + ['US_Delta_Force_Assault_EP1'];
+_u = _u + ['US_Delta_Force_SD_EP1'];
+_u = _u + ['US_Delta_Force_MG_EP1'];
+_u = _u + ['US_Delta_Force_AR_EP1'];
+_u = _u + ['US_Delta_Force_Night_EP1'];
+_u = _u + ['US_Delta_Force_Marksman_EP1'];
+_u = _u + ['US_Delta_Force_M14_EP1'];
+_u = _u + ['US_Delta_Force_Air_Controller_EP1'];
+if (paramDLCBAF) then {
+ //--- BAF MTP Camo.
+ _u = _u + ['BAF_Soldier_AA_MTP'];
+ _u = _u + ['BAF_Soldier_AAA_MTP'];
+ _u = _u + ['BAF_Soldier_AAT_MTP'];
+ _u = _u + ['BAF_Soldier_AHAT_MTP'];
+ _u = _u + ['BAF_Soldier_AAR_MTP'];
+ _u = _u + ['BAF_Soldier_AMG_MTP'];
+ _u = _u + ['BAF_Soldier_AT_MTP'];
+ _u = _u + ['BAF_Soldier_HAT_MTP'];
+ _u = _u + ['BAF_Soldier_AR_MTP'];
+ _u = _u + ['BAF_crewman_MTP'];
+ _u = _u + ['BAF_Soldier_EN_MTP'];
+ _u = _u + ['BAF_Soldier_GL_MTP'];
+ _u = _u + ['BAF_Soldier_FAC_MTP'];
+ _u = _u + ['BAF_Soldier_MG_MTP'];
+ _u = _u + ['BAF_Soldier_scout_MTP'];
+ _u = _u + ['BAF_Soldier_Marksman_MTP'];
+ _u = _u + ['BAF_Soldier_Medic_MTP'];
+ _u = _u + ['BAF_Soldier_Officer_MTP'];
+ _u = _u + ['BAF_Pilot_MTP'];
+ _u = _u + ['BAF_Soldier_MTP'];
+ _u = _u + ['BAF_ASoldier_MTP'];
+ _u = _u + ['BAF_Soldier_L_MTP'];
+ _u = _u + ['BAF_Soldier_N_MTP'];
+ _u = _u + ['BAF_Soldier_SL_MTP'];
+ _u = _u + ['BAF_Soldier_SniperN_MTP'];
+ _u = _u + ['BAF_Soldier_SniperH_MTP'];
+ _u = _u + ['BAF_Soldier_Sniper_MTP'];
+ _u = _u + ['BAF_Soldier_spotter_MTP'];
+ _u = _u + ['BAF_Soldier_spotterN_MTP'];
+ _u = _u + ['BAF_Soldier_TL_MTP'];
+ //--- BAF Woodland Camo
+ _u = _u + ['BAF_Soldier_AA_W'];
+ _u = _u + ['BAF_Soldier_AAA_W'];
+ _u = _u + ['BAF_Soldier_AAT_W'];
+ _u = _u + ['BAF_Soldier_AHAT_W'];
+ _u = _u + ['BAF_Soldier_AAR_W'];
+ _u = _u + ['BAF_Soldier_AMG_W'];
+ _u = _u + ['BAF_Soldier_AT_W'];
+ _u = _u + ['BAF_Soldier_HAT_W'];
+ _u = _u + ['BAF_Soldier_AR_W'];
+ _u = _u + ['BAF_crewman_W'];
+ _u = _u + ['BAF_Soldier_EN_W'];
+ _u = _u + ['BAF_Soldier_GL_W'];
+ _u = _u + ['BAF_Soldier_FAC_W'];
+ _u = _u + ['BAF_Soldier_MG_W'];
+ _u = _u + ['BAF_Soldier_scout_W'];
+ _u = _u + ['BAF_Soldier_Marksman_W'];
+ _u = _u + ['BAF_Soldier_Medic_W'];
+ _u = _u + ['BAF_Soldier_Officer_W'];
+ _u = _u + ['BAF_Pilot_W'];
+ _u = _u + ['BAF_Soldier_W'];
+ _u = _u + ['BAF_ASoldier_W'];
+ _u = _u + ['BAF_Soldier_L_W'];
+ _u = _u + ['BAF_Soldier_N_W'];
+ _u = _u + ['BAF_Soldier_SL_W'];
+ _u = _u + ['BAF_Soldier_SniperN_W'];
+ _u = _u + ['BAF_Soldier_SniperH_W'];
+ _u = _u + ['BAF_Soldier_Sniper_W'];
+ _u = _u + ['BAF_Soldier_spotter_W'];
+ _u = _u + ['BAF_Soldier_spotterN_W'];
+ _u = _u + ['BAF_Soldier_TL_W'];
+ //--- BAF Desert Camo
+ _u = _u + ['BAF_Soldier_AA_DDPM'];
+ _u = _u + ['BAF_Soldier_AAA_DDPM'];
+ _u = _u + ['BAF_Soldier_AAT_DDPM'];
+ _u = _u + ['BAF_Soldier_AHAT_DDPM'];
+ _u = _u + ['BAF_Soldier_AAR_DDPM'];
+ _u = _u + ['BAF_Soldier_AMG_DDPM'];
+ _u = _u + ['BAF_Soldier_AT_DDPM'];
+ _u = _u + ['BAF_Soldier_HAT_DDPM'];
+ _u = _u + ['BAF_Soldier_AR_DDPM'];
+ _u = _u + ['BAF_crewman_DDPM'];
+ _u = _u + ['BAF_Soldier_EN_DDPM'];
+ _u = _u + ['BAF_Soldier_GL_DDPM'];
+ _u = _u + ['BAF_Soldier_FAC_DDPM'];
+ _u = _u + ['BAF_Soldier_MG_DDPM'];
+ _u = _u + ['BAF_Soldier_scout_DDPM'];
+ _u = _u + ['BAF_Soldier_Marksman_DDPM'];
+ _u = _u + ['BAF_Soldier_Medic_DDPM'];
+ _u = _u + ['BAF_Soldier_Officer_DDPM'];
+ _u = _u + ['BAF_Pilot_DDPM'];
+ _u = _u + ['BAF_Soldier_DDPM'];
+ _u = _u + ['BAF_ASoldier_DDPM'];
+ _u = _u + ['BAF_Soldier_L_DDPM'];
+ _u = _u + ['BAF_Soldier_N_DDPM'];
+ _u = _u + ['BAF_Soldier_SL_DDPM'];
+ _u = _u + ['BAF_Soldier_TL_DDPM'];
+};
+
+_u \ No newline at end of file
diff --git a/Common/Config/Core_Units/Arrowhead/Units_Depot_TK.sqf b/Common/Config/Core_Units/Arrowhead/Units_Depot_TK.sqf
new file mode 100644
index 0000000..c4ce1d1
--- /dev/null
+++ b/Common/Config/Core_Units/Arrowhead/Units_Depot_TK.sqf
@@ -0,0 +1,15 @@
+Private ['_u'];
+
+/* Takistan Depot Vehicles */
+_u = ["Old_bike_TK_CIV_EP1"];
+_u = _u + ["TT650_TK_CIV_EP1"];
+_u = _u + ["Lada2_TK_CIV_EP1"];
+_u = _u + ["VolhaLimo_TK_CIV_EP1"];
+_u = _u + ["Volha_2_TK_CIV_EP1"];
+_u = _u + ["Ural_TK_CIV_EP1"];
+_u = _u + ["S1203_TK_CIV_EP1"];
+if (paramPurchaseInfDepot) then {
+ _u = _u + ['WFBE_EASTSOLDIER' Call GetNamespace];
+};
+
+_u \ No newline at end of file
diff --git a/Common/Config/Core_Units/Arrowhead/Units_Depot_TKA.sqf b/Common/Config/Core_Units/Arrowhead/Units_Depot_TKA.sqf
new file mode 100644
index 0000000..c4ce1d1
--- /dev/null
+++ b/Common/Config/Core_Units/Arrowhead/Units_Depot_TKA.sqf
@@ -0,0 +1,15 @@
+Private ['_u'];
+
+/* Takistan Depot Vehicles */
+_u = ["Old_bike_TK_CIV_EP1"];
+_u = _u + ["TT650_TK_CIV_EP1"];
+_u = _u + ["Lada2_TK_CIV_EP1"];
+_u = _u + ["VolhaLimo_TK_CIV_EP1"];
+_u = _u + ["Volha_2_TK_CIV_EP1"];
+_u = _u + ["Ural_TK_CIV_EP1"];
+_u = _u + ["S1203_TK_CIV_EP1"];
+if (paramPurchaseInfDepot) then {
+ _u = _u + ['WFBE_EASTSOLDIER' Call GetNamespace];
+};
+
+_u \ No newline at end of file
diff --git a/Common/Config/Core_Units/Arrowhead/Units_Depot_US.sqf b/Common/Config/Core_Units/Arrowhead/Units_Depot_US.sqf
new file mode 100644
index 0000000..1d794c9
--- /dev/null
+++ b/Common/Config/Core_Units/Arrowhead/Units_Depot_US.sqf
@@ -0,0 +1,15 @@
+Private ['_u'];
+
+/* US Depot Vehicles */
+_u = ["Old_bike_TK_CIV_EP1"];
+_u = _u + ["Old_moto_TK_Civ_EP1"];
+_u = _u + ["Lada1_TK_CIV_EP1"];
+_u = _u + ["Volha_1_TK_CIV_EP1"];
+_u = _u + ["LandRover_TK_CIV_EP1"];
+_u = _u + ["V3S_Open_TK_CIV_EP1"];
+_u = _u + ["Ikarus_TK_CIV_EP1"];
+if (paramPurchaseInfDepot) then {
+ _u = _u + ['WFBE_WESTSOLDIER' Call GetNamespace];
+};
+
+_u \ No newline at end of file
diff --git a/Common/Config/Core_Units/Arrowhead/Units_Heavy_TK.sqf b/Common/Config/Core_Units/Arrowhead/Units_Heavy_TK.sqf
new file mode 100644
index 0000000..56a50ab
--- /dev/null
+++ b/Common/Config/Core_Units/Arrowhead/Units_Heavy_TK.sqf
@@ -0,0 +1,14 @@
+Private ['_u'];
+
+/* Overall Configuration */
+['WFBE_EASTCREW','TK_Soldier_Crew_EP1',false] Call SetNamespace;
+
+/* Takistan Heavy Vehicles */
+_u = ['M113_TK_EP1'];
+_u = _u + ['BMP2_TK_EP1'];
+_u = _u + ['ZSU_TK_EP1'];
+_u = _u + ['T34_TK_EP1'];
+_u = _u + ['T55_TK_EP1'];
+_u = _u + ['T72_TK_EP1'];
+
+_u \ No newline at end of file
diff --git a/Common/Config/Core_Units/Arrowhead/Units_Heavy_TKA.sqf b/Common/Config/Core_Units/Arrowhead/Units_Heavy_TKA.sqf
new file mode 100644
index 0000000..96e02cd
--- /dev/null
+++ b/Common/Config/Core_Units/Arrowhead/Units_Heavy_TKA.sqf
@@ -0,0 +1,11 @@
+Private ['_u'];
+
+//--- Takistan Heavy Vehicles.
+_u = ['M113_TK_EP1'];
+_u = _u + ['BMP2_TK_EP1'];
+_u = _u + ['ZSU_TK_EP1'];
+_u = _u + ['T34_TK_EP1'];
+_u = _u + ['T55_TK_EP1'];
+_u = _u + ['T72_TK_EP1'];
+
+_u \ No newline at end of file
diff --git a/Common/Config/Core_Units/Arrowhead/Units_Heavy_TKGUE.sqf b/Common/Config/Core_Units/Arrowhead/Units_Heavy_TKGUE.sqf
new file mode 100644
index 0000000..5be4eaa
--- /dev/null
+++ b/Common/Config/Core_Units/Arrowhead/Units_Heavy_TKGUE.sqf
@@ -0,0 +1,7 @@
+Private ['_u'];
+
+/* Takistan Guerilla Heavy Vehicles */
+_u = ['T34_TK_GUE_EP1'];
+_u = _u + ['T55_TK_GUE_EP1'];
+
+_u \ No newline at end of file
diff --git a/Common/Config/Core_Units/Arrowhead/Units_Heavy_US.sqf b/Common/Config/Core_Units/Arrowhead/Units_Heavy_US.sqf
new file mode 100644
index 0000000..317afe0
--- /dev/null
+++ b/Common/Config/Core_Units/Arrowhead/Units_Heavy_US.sqf
@@ -0,0 +1,21 @@
+Private ['_u'];
+
+//--- US Heavy Vehicles.
+_u = ['M1126_ICV_M2_EP1'];
+_u = _u + ['M1126_ICV_mk19_EP1'];
+_u = _u + ['M1129_MC_EP1'];
+_u = _u + ['M1135_ATGMV_EP1'];
+_u = _u + ['M1128_MGS_EP1'];
+_u = _u + ['M1133_MEV_EP1'];
+_u = _u + ['M2A2_EP1'];
+_u = _u + ['M2A3_EP1'];
+_u = _u + ['M1A1_US_DES_EP1'];
+_u = _u + ['MLRS_DES_EP1'];
+_u = _u + ['M1A2_US_TUSK_MG_EP1'];
+_u = _u + ['M6_EP1'];
+if (paramDLCBAF) then {
+ _u = _u + ['BAF_FV510_W'];
+ _u = _u + ['BAF_FV510_D'];
+};
+
+_u \ No newline at end of file
diff --git a/Common/Config/Core_Units/Arrowhead/Units_Light_TK.sqf b/Common/Config/Core_Units/Arrowhead/Units_Light_TK.sqf
new file mode 100644
index 0000000..3e7032c
--- /dev/null
+++ b/Common/Config/Core_Units/Arrowhead/Units_Light_TK.sqf
@@ -0,0 +1,29 @@
+Private ['_u'];
+
+/* Overall Configuration */
+['WFBE_EASTREPAIRTRUCK','UralRepair_TK_EP1',false] Call SetNamespace;
+['WFBE_EASTSUPPLYTRUCK','UralSupply_TK_EP1',false] Call SetNamespace;
+
+/* Takistan Light Vehicles */
+_u = ['TT650_TK_EP1'];
+_u = _u + ['UAZ_Unarmed_TK_EP1'];
+_u = _u + ['SUV_TK_EP1'];
+_u = _u + ['UAZ_MG_TK_EP1'];
+_u = _u + ['UAZ_AGS30_TK_EP1'];
+_u = _u + ['LandRover_MG_TK_EP1'];
+_u = _u + ['LandRover_SPG9_TK_EP1'];
+_u = _u + ['V3S_TK_EP1'];
+_u = _u + ['V3S_Open_TK_EP1'];
+_u = _u + ['UralRepair_TK_EP1'];
+_u = _u + ['UralReammo_TK_EP1'];
+_u = _u + ['UralRefuel_TK_EP1'];
+_u = _u + ['UralSalvage_TK_EP1'];
+if (('WFBE_SUPPLYSYSTEM' Call GetNamespace) == 0) then {_u = _u + ['UralSupply_TK_EP1']};
+_u = _u + ['M113Ambul_TK_EP1'];
+_u = _u + ['BRDM2_TK_EP1'];
+_u = _u + ['BRDM2_ATGM_TK_EP1'];
+_u = _u + ['BTR60_TK_EP1'];
+_u = _u + ['Ural_ZU23_TK_EP1'];
+_u = _u + ['GRAD_TK_EP1'];
+
+_u \ No newline at end of file
diff --git a/Common/Config/Core_Units/Arrowhead/Units_Light_TKA.sqf b/Common/Config/Core_Units/Arrowhead/Units_Light_TKA.sqf
new file mode 100644
index 0000000..5021e16
--- /dev/null
+++ b/Common/Config/Core_Units/Arrowhead/Units_Light_TKA.sqf
@@ -0,0 +1,25 @@
+Private ['_u'];
+
+//--- Takistan Light Vehicles.
+_u = ['TT650_TK_EP1'];
+_u = _u + ['UAZ_Unarmed_TK_EP1'];
+_u = _u + ['SUV_TK_EP1'];
+_u = _u + ['UAZ_MG_TK_EP1'];
+_u = _u + ['UAZ_AGS30_TK_EP1'];
+_u = _u + ['LandRover_MG_TK_EP1'];
+_u = _u + ['LandRover_SPG9_TK_EP1'];
+_u = _u + ['V3S_TK_EP1'];
+_u = _u + ['V3S_Open_TK_EP1'];
+_u = _u + ['UralRepair_TK_EP1'];
+_u = _u + ['UralReammo_TK_EP1'];
+_u = _u + ['UralRefuel_TK_EP1'];
+_u = _u + ['UralSalvage_TK_EP1'];
+if (('WFBE_SUPPLYSYSTEM' Call GetNamespace) == 0) then {_u = _u + ['UralSupply_TK_EP1']};
+_u = _u + ['M113Ambul_TK_EP1'];
+_u = _u + ['BRDM2_TK_EP1'];
+_u = _u + ['BRDM2_ATGM_TK_EP1'];
+_u = _u + ['BTR60_TK_EP1'];
+_u = _u + ['Ural_ZU23_TK_EP1'];
+_u = _u + ['GRAD_TK_EP1'];
+
+_u \ No newline at end of file
diff --git a/Common/Config/Core_Units/Arrowhead/Units_Light_TKGUE.sqf b/Common/Config/Core_Units/Arrowhead/Units_Light_TKGUE.sqf
new file mode 100644
index 0000000..00736e9
--- /dev/null
+++ b/Common/Config/Core_Units/Arrowhead/Units_Light_TKGUE.sqf
@@ -0,0 +1,13 @@
+Private ['_u'];
+
+/* Takistan Guerilla Light Vehicles */
+_u = ['V3S_TK_GUE_EP1'];
+_u = _u + ['Pickup_PK_TK_GUE_EP1'];
+_u = _u + ['Offroad_DSHKM_TK_GUE_EP1'];
+_u = _u + ['Offroad_SPG9_TK_GUE_EP1'];
+_u = _u + ['BRDM2_TK_GUE_EP1'];
+_u = _u + ['BTR40_TK_GUE_EP1'];
+_u = _u + ['BTR40_MG_TK_GUE_EP1'];
+_u = _u + ['Ural_ZU23_TK_GUE_EP1'];
+
+_u \ No newline at end of file
diff --git a/Common/Config/Core_Units/Arrowhead/Units_Light_US.sqf b/Common/Config/Core_Units/Arrowhead/Units_Light_US.sqf
new file mode 100644
index 0000000..8e5def5
--- /dev/null
+++ b/Common/Config/Core_Units/Arrowhead/Units_Light_US.sqf
@@ -0,0 +1,34 @@
+Private ['_u'];
+
+//--- US Light Vehicles.
+_u = ['M1030_US_DES_EP1'];
+_u = _u + ['ATV_US_EP1'];
+_u = _u + ['HMMWV_DES_EP1'];
+_u = _u + ['HMMWV_M1035_DES_EP1'];
+_u = _u + ['HMMWV_Terminal_EP1'];
+_u = _u + ['HMMWV_MK19_DES_EP1'];
+_u = _u + ['HMMWV_M998A2_SOV_DES_EP1'];
+_u = _u + ['HMMWV_M1151_M2_DES_EP1'];
+_u = _u + ['HMMWV_M998_crows_M2_DES_EP1'];
+_u = _u + ['HMMWV_M998_crows_MK19_DES_EP1'];
+_u = _u + ['HMMWV_TOW_DES_EP1'];
+_u = _u + ['HMMWV_Avenger_DES_EP1'];
+_u = _u + ['HMMWV_Ambulance_DES_EP1'];
+_u = _u + ['MTVR_DES_EP1'];
+_u = _u + ['MtvrRepair_DES_EP1'];
+_u = _u + ['MtvrReammo_DES_EP1'];
+_u = _u + ['MtvrRefuel_DES_EP1'];
+_u = _u + ['MtvrSalvage_DES_EP1'];
+if (('WFBE_SUPPLYSYSTEM' Call GetNamespace) == 0) then {_u = _u + ['MtvrSupply_DES_EP1']};
+if (paramDLCBAF) then {
+ _u = _u + ['BAF_ATV_W'];
+ _u = _u + ['BAF_Offroad_W'];
+ _u = _u + ['BAF_Jackal2_GMG_W'];
+ _u = _u + ['BAF_Jackal2_L2A1_W'];
+ _u = _u + ['BAF_ATV_D'];
+ _u = _u + ['BAF_Offroad_D'];
+ _u = _u + ['BAF_Jackal2_GMG_D'];
+ _u = _u + ['BAF_Jackal2_L2A1_D'];
+};
+
+_u \ No newline at end of file
diff --git a/Common/Config/Core_Units/Arrowhead/Units_Special_TKA.sqf b/Common/Config/Core_Units/Arrowhead/Units_Special_TKA.sqf
new file mode 100644
index 0000000..379beb7
--- /dev/null
+++ b/Common/Config/Core_Units/Arrowhead/Units_Special_TKA.sqf
@@ -0,0 +1,70 @@
+//--- Radio Announcer.
+['WFBE_EASTANNOUNCERS',['WFHQ_TK0_EP1','WFHQ_TK1_EP1','WFHQ_TK2_EP1','WFHQ_TK3_EP1','WFHQ_TK4_EP1'],true] Call SetNamespace;
+
+//--- Crew model.
+['WFBE_EASTCREW','TK_Soldier_Crew_EP1',true] Call SetNamespace;
+
+//--- Pilot model.
+['WFBE_EASTPILOT','TK_Soldier_Pilot_EP1',true] Call SetNamespace;
+
+//--- Soldier model.
+['WFBE_EASTSOLDIER','TK_Soldier_EP1',true] Call SetNamespace;
+
+//--- Ambulances.
+['WFBE_EASTAMBULANCES',['M113Ambul_TK_EP1'],true] Call SetNamespace;
+
+//--- Repair Trucks.
+['WFBE_EASTREPAIRTRUCKS',['UralRepair_TK_EP1'],true] Call SetNamespace;
+
+//--- Salvage Trucks.
+['WFBE_EASTSALVAGETRUCK',['UralSalvage_TK_EP1'],true] Call SetNamespace;
+
+//--- Supply Trucks.
+['WFBE_EASTSUPPLYTRUCKS',['UralSupply_TK_EP1'],true] Call SetNamespace;
+
+//--- UAV.
+['WFBE_EASTUAV','',true] Call SetNamespace;
+
+if (isServer) then {
+ //--- Base Patrols.
+ if (paramBasePatrols) then {
+ ['WFBE_EASTBASEPATROLS_0',['TK_Soldier_SL_EP1','TK_Soldier_EP1','TK_Soldier_EP1','TK_Soldier_AR_EP1','TK_Soldier_GL_EP1','TK_Soldier_MG_EP1'],true] Call SetNamespace;
+ ['WFBE_EASTBASEPATROLS_1',['TK_Soldier_SL_EP1','TK_Soldier_EP1','TK_Soldier_EP1','TK_Soldier_MG_EP1','TK_Soldier_LAT_EP1','TK_Soldier_Medic_EP1'],true] Call SetNamespace;
+ ['WFBE_EASTBASEPATROLS_2',['TK_Soldier_SL_EP1','TK_Soldier_EP1','TK_Soldier_EP1','TK_Soldier_AT_EP1','TK_Soldier_AA_EP1','TK_Soldier_Spotter_EP1'],true] Call SetNamespace;
+ ['WFBE_EASTBASEPATROLS_3',['TK_Soldier_SL_EP1','TK_Soldier_EP1','TK_Soldier_AR_EP1','TK_Soldier_HAT_EP1','TK_Soldier_LAT_EP1','TK_Soldier_GL_EP1'],true] Call SetNamespace;
+ };
+
+ //--- Paratroopers.
+ ['WFBE_EASTPARACHUTELEVEL1',['TK_Soldier_SL_EP1','TK_Soldier_LAT_EP1','TK_Soldier_EP1','TK_Soldier_LAT_EP1','TK_Soldier_AR_EP1','TK_Soldier_Medic_EP1'],true] Call SetNamespace;
+ ['WFBE_EASTPARACHUTELEVEL2',['TK_Soldier_SL_EP1','TK_Soldier_AT_EP1','TK_Soldier_AT_EP1','TK_Soldier_AT_EP1','TK_Soldier_AA_EP1','TK_Soldier_MG_EP1','TK_Soldier_Medic_EP1','TK_Soldier_Sniper_EP1','TK_Soldier_Spotter_EP1'],true] Call SetNamespace;
+ ['WFBE_EASTPARACHUTELEVEL3',['TK_Special_Forces_TL_EP1','TK_Soldier_HAT_EP1','TK_Soldier_HAT_EP1','TK_Soldier_HAT_EP1','TK_Soldier_HAT_EP1','TK_Soldier_HAT_EP1','TK_Soldier_AA_EP1','TK_Soldier_AA_EP1','TK_Special_Forces_MG_EP1','TK_Special_Forces_EP1','TK_Special_Forces_EP1','TK_Special_Forces_EP1'],true] Call SetNamespace;
+
+ //--- Paratroopers, Vehicle.
+ ['WFBE_EASTPARACARGO','Mi17_TK_EP1',true] Call SetNamespace;
+
+ //--- Repair Truck model.
+ ['WFBE_EASTREPAIRTRUCK','UralRepair_TK_EP1',true] Call SetNamespace;
+
+ //--- Starting Vehicles.
+ ['WFBE_EASTSTARTINGVEHICLES',['M113Ambul_TK_EP1','V3S_TK_EP1'],true] Call SetNamespace;
+
+ //--- Supply Paradropping, Dropped Ammunition.
+ ['WFBE_EASTPARAAMMO',['TKBasicAmmunitionBox_EP1','TKBasicWeapons_EP1','TKLaunchers_EP1'],true] Call SetNamespace;
+
+ //--- Supply Paradropping, Dropped Vehicle.
+ ['WFBE_EASTPARAVEHICARGO','UAZ_Unarmed_TK_EP1',true] Call SetNamespace;
+
+ //--- Supply Paradropping, Vehicle.
+ ['WFBE_EASTPARAVEHI','Mi17_TK_EP1',true] Call SetNamespace;
+
+ //--- Supply Paradropping, Parachute Model.
+ ['WFBE_EASTPARACHUTE','ParachuteMediumEast_EP1',true] Call SetNamespace;
+
+ //--- Supply Truck model.
+ ['WFBE_EASTSUPPLYTRUCK','UralSupply_TK_EP1',true] Call SetNamespace;
+};
+
+if (local player) then {
+ //--- Default Faction (Buy Menu), this is the faction name defined in core_xxx.sqf files.
+ ['WFBE_EASTDEFAULTFACTION','Takistani Army',true] Call SetNamespace;
+}; \ No newline at end of file
diff --git a/Common/Config/Core_Units/Arrowhead/Units_Special_US.sqf b/Common/Config/Core_Units/Arrowhead/Units_Special_US.sqf
new file mode 100644
index 0000000..5ed76c1
--- /dev/null
+++ b/Common/Config/Core_Units/Arrowhead/Units_Special_US.sqf
@@ -0,0 +1,70 @@
+//--- Radio Announcer.
+['WFBE_WESTANNOUNCERS',['WFHQ_EN0_EP1','WFHQ_EN1_EP1','WFHQ_EN2_EP1','WFHQ_EN3_EP1','WFHQ_EN4_EP1','WFHQ_EN5_EP1'],true] Call SetNamespace;
+
+//--- Crew model.
+['WFBE_WESTCREW','US_Soldier_Crew_EP1',true] Call SetNamespace;
+
+//--- Pilot model.
+['WFBE_WESTPILOT','US_Soldier_Pilot_EP1',true] Call SetNamespace;
+
+//--- Soldier model.
+['WFBE_WESTSOLDIER','US_Soldier_EP1',true] Call SetNamespace;
+
+//--- Ambulances.
+['WFBE_WESTAMBULANCES',['HMMWV_Ambulance_DES_EP1','M1133_MEV_EP1'],true] Call SetNamespace;
+
+//--- Repair Trucks.
+['WFBE_WESTREPAIRTRUCKS',['MtvrRepair_DES_EP1'],true] Call SetNamespace;
+
+//--- Salvage Trucks.
+['WFBE_WESTSALVAGETRUCK',['MtvrSalvage_DES_EP1'],true] Call SetNamespace;
+
+//--- Supply Trucks.
+['WFBE_WESTSUPPLYTRUCKS',['MtvrSupply_DES_EP1'],true] Call SetNamespace;
+
+//--- UAV.
+['WFBE_WESTUAV','MQ9PredatorB_US_EP1',true] Call SetNamespace;
+
+if (isServer) then {
+ //--- Base Patrols.
+ if (paramBasePatrols) then {
+ ['WFBE_WESTBASEPATROLS_0',['US_Soldier_SL_EP1','US_Soldier_EP1','US_Soldier_EP1','US_Soldier_AR_EP1','US_Soldier_GL_EP1','US_Soldier_MG_EP1'],true] Call SetNamespace;
+ ['WFBE_WESTBASEPATROLS_1',['US_Soldier_SL_EP1','US_Soldier_EP1','US_Soldier_EP1','US_Soldier_MG_EP1','US_Soldier_LAT_EP1','US_Soldier_Medic_EP1'],true] Call SetNamespace;
+ ['WFBE_WESTBASEPATROLS_2',['US_Soldier_SL_EP1','US_Soldier_EP1','US_Soldier_EP1','US_Soldier_AT_EP1','US_Soldier_AA_EP1','US_Soldier_Sniper_EP1'],true] Call SetNamespace;
+ ['WFBE_WESTBASEPATROLS_3',['US_Soldier_SL_EP1','US_Soldier_EP1','US_Soldier_AR_EP1','US_Soldier_HAT_EP1','US_Soldier_LAT_EP1','US_Soldier_GL_EP1'],true] Call SetNamespace;
+ };
+
+ //--- Paratroopers.
+ ['WFBE_WESTPARACHUTELEVEL1',['US_Soldier_SL_EP1','US_Soldier_LAT_EP1','US_Soldier_EP1','US_Soldier_EP1','US_Soldier_AR_EP1','US_Soldier_Medic_EP1'],true] Call SetNamespace;
+ ['WFBE_WESTPARACHUTELEVEL2',['US_Soldier_SL_EP1','US_Soldier_AT_EP1','US_Soldier_AT_EP1','US_Soldier_AT_EP1','US_Soldier_AA_EP1','US_Soldier_MG_EP1','US_Soldier_Medic_EP1','US_Soldier_Spotter_EP1','US_Soldier_Sniper_EP1'],true] Call SetNamespace;
+ ['WFBE_WESTPARACHUTELEVEL3',['US_Delta_Force_TL_EP1','US_Soldier_HAT_EP1','US_Soldier_HAT_EP1','US_Soldier_HAT_EP1','US_Soldier_HAT_EP1','US_Soldier_AA_EP1','US_Soldier_AA_EP1','US_Delta_Force_AR_EP1','US_Delta_Force_Assault_EP1','US_Soldier_Medic_EP1','US_Delta_Force_M14_EP1','US_Soldier_AT_EP1','US_Soldier_Marksman_EP1'],true] Call SetNamespace;
+
+ //--- Paratroopers, Vehicle.
+ ['WFBE_WESTPARACARGO','C130J_US_EP1',true] Call SetNamespace;
+
+ //--- Repair Truck model.
+ ['WFBE_WESTREPAIRTRUCK','MtvrRepair_DES_EP1',true] Call SetNamespace;
+
+ //--- Starting Vehicles.
+ ['WFBE_WESTSTARTINGVEHICLES',['HMMWV_Ambulance_DES_EP1','MTVR_DES_EP1'],true] Call SetNamespace;
+
+ //--- Supply Paradropping, Dropped Ammunition.
+ ['WFBE_WESTPARAAMMO',['USBasicAmmunitionBox_EP1','USBasicWeapons_EP1','USLaunchers_EP1'],true] Call SetNamespace;
+
+ //--- Supply Paradropping, Dropped Vehicle.
+ ['WFBE_WESTPARAVEHICARGO','HMMWV_DES_EP1',true] Call SetNamespace;
+
+ //--- Supply Paradropping, Vehicle.
+ ['WFBE_WESTPARAVEHI','CH_47F_EP1',true] Call SetNamespace;
+
+ //--- Supply Paradropping, Parachute Model.
+ ['WFBE_WESTPARACHUTE','ParachuteMediumWest_EP1',true] Call SetNamespace;
+
+ //--- Supply Truck model.
+ ['WFBE_WESTSUPPLYTRUCK','MtvrSupply_DES_EP1',true] Call SetNamespace;
+};
+
+if (local player) then {
+ //--- Default Faction (Buy Menu), this is the faction name defined in core_xxx.sqf files.
+ ['WFBE_WESTDEFAULTFACTION','US',true] Call SetNamespace;
+}; \ No newline at end of file
diff --git a/Common/Config/Core_Units/CombinedOps/Units_Aircraft_RU.sqf b/Common/Config/Core_Units/CombinedOps/Units_Aircraft_RU.sqf
new file mode 100644
index 0000000..3ae1dd9
--- /dev/null
+++ b/Common/Config/Core_Units/CombinedOps/Units_Aircraft_RU.sqf
@@ -0,0 +1,28 @@
+Private ['_r','_u'];
+
+_r = 'WFBE_RESTRICTIONADVAIR' Call GetNamespace;
+
+//--- Russian Aircraft Vehicles.
+_u = ['Mi17_Ins'];
+_u = _u + ['UH1H_TK_EP1'];
+if (_r == 0 ||_r == 1) then {
+ _u = _u + ['Mi17_medevac_RU'];
+ _u = _u + ['Mi17_rockets_RU'];
+ _u = _u + ['Mi24_V'];
+ _u = _u + ['Mi24_D_TK_EP1'];
+ _u = _u + ['Mi24_P'];
+ if !(paramRestrictionKamov) then {
+ _u = _u + ['Ka52'];
+ _u = _u + ['Ka52Black'];
+ };
+};
+if (_r == 0) then {
+ _u = _u + ['An2_TK_EP1'];
+ _u = _u + ['L39_TK_EP1'];
+ _u = _u + ['Su34'];
+ _u = _u + ['Su25_TK_EP1'];
+ _u = _u + ['Su25_Ins'];
+ _u = _u + ['Su39'];
+};
+
+_u \ No newline at end of file
diff --git a/Common/Config/Core_Units/CombinedOps/Units_Aircraft_US.sqf b/Common/Config/Core_Units/CombinedOps/Units_Aircraft_US.sqf
new file mode 100644
index 0000000..d086a00
--- /dev/null
+++ b/Common/Config/Core_Units/CombinedOps/Units_Aircraft_US.sqf
@@ -0,0 +1,38 @@
+Private ['_r','_u'];
+
+_r = 'WFBE_RESTRICTIONADVAIR' Call GetNamespace;
+
+//--- US Aircraft Vehicles.
+_u = ['MH6J_EP1'];
+_u = _u + ['MH60S'];
+_u = _u + ['UH60M_EP1'];
+_u = _u + ['UH60M_MEV_EP1'];
+_u = _u + ['CH_47F_EP1'];
+if (_r == 0 || _r == 1) then {
+ _u = _u + ['UH1Y'];
+ _u = _u + ['AH6J_EP1'];
+ if (WF_ACE) then {
+ _u = _u + ['ACE_AH6_GAU19_FLIR'];
+ _u = _u + ['ACE_AH6J_DAGR_FLIR'];
+ };
+ _u = _u + ['AH1Z'];
+ _u = _u + ['AH64D_EP1'];
+};
+if (_r == 0) then {
+ _u = _u + ['MV22'];
+ _u = _u + ['C130J_US_EP1'];
+ _u = _u + ['F35B'];
+ _u = _u + ['AV8B'];
+ _u = _u + ['AV8B2'];
+ _u = _u + ['A10_US_EP1'];
+};
+if (paramDLCBAF) then {
+ _u = _u + ['BAF_Merlin_HC3_D'];
+ _u = _u + ['CH_47F_BAF'];
+ if (_r == 0 || _r == 1) then {
+ _u = _u + ['AW159_Lynx_BAF'];
+ _u = _u + ['BAF_Apache_AH1_D'];
+ };
+};
+
+_u \ No newline at end of file
diff --git a/Common/Config/Core_Units/CombinedOps/Units_Airport_RU.sqf b/Common/Config/Core_Units/CombinedOps/Units_Airport_RU.sqf
new file mode 100644
index 0000000..1f3f911
--- /dev/null
+++ b/Common/Config/Core_Units/CombinedOps/Units_Airport_RU.sqf
@@ -0,0 +1,16 @@
+Private ['_r','_u'];
+
+_r = 'WFBE_RESTRICTIONADVAIR' Call GetNamespace;
+
+/* RU Airport Vehicles */
+_u = [];
+if (_r == 0) then {
+ _u = _u + ['An2_TK_EP1'];
+ _u = _u + ['L39_TK_EP1'];
+ _u = _u + ['Su34'];
+ _u = _u + ['Su25_TK_EP1'];
+ _u = _u + ['Su25_Ins'];
+ _u = _u + ['Su39'];
+};
+
+_u \ No newline at end of file
diff --git a/Common/Config/Core_Units/CombinedOps/Units_Airport_US.sqf b/Common/Config/Core_Units/CombinedOps/Units_Airport_US.sqf
new file mode 100644
index 0000000..dd1caf9
--- /dev/null
+++ b/Common/Config/Core_Units/CombinedOps/Units_Airport_US.sqf
@@ -0,0 +1,16 @@
+Private ['_r','_u'];
+
+_r = 'WFBE_RESTRICTIONADVAIR' Call GetNamespace;
+
+/* US Airport Vehicles */
+_u = [];
+if (_r == 0) then {
+ _u = _u + ['MV22'];
+ _u = _u + ['C130J_US_EP1'];
+ _u = _u + ['F35B'];
+ _u = _u + ['AV8B'];
+ _u = _u + ['AV8B2'];
+ _u = _u + ['A10_US_EP1'];
+};
+
+_u \ No newline at end of file
diff --git a/Common/Config/Core_Units/CombinedOps/Units_Barracks_GUE.sqf b/Common/Config/Core_Units/CombinedOps/Units_Barracks_GUE.sqf
new file mode 100644
index 0000000..96b2f76
--- /dev/null
+++ b/Common/Config/Core_Units/CombinedOps/Units_Barracks_GUE.sqf
@@ -0,0 +1,42 @@
+Private ['_u'];
+
+/* Guerilla Troops */
+_u = ['GUE_Soldier_1'];
+_u = _u + ['GUE_Soldier_2'];
+_u = _u + ['GUE_Soldier_3'];
+_u = _u + ['GUE_Soldier_GL'];
+_u = _u + ['GUE_Soldier_AT'];
+_u = _u + ['GUE_Soldier_AA'];
+_u = _u + ['GUE_Soldier_AR'];
+_u = _u + ['GUE_Soldier_MG'];
+_u = _u + ['GUE_Soldier_Sniper'];
+_u = _u + ['GUE_Soldier_Medic'];
+_u = _u + ['GUE_Soldier_Crew'];
+_u = _u + ['GUE_Soldier_Pilot'];
+_u = _u + ['GUE_Soldier_Scout'];
+_u = _u + ['GUE_Soldier_Sab'];
+_u = _u + ['GUE_Commander'];
+_u = _u + ['GUE_Worker2'];
+_u = _u + ['GUE_Woodlander3'];
+_u = _u + ['GUE_Villager3'];
+_u = _u + ['GUE_Woodlander2'];
+_u = _u + ['GUE_Woodlander1'];
+_u = _u + ['GUE_Villager4'];
+/* Takistan Guerilla Troops */
+_u = _u + ['TK_GUE_Soldier_EP1'];
+_u = _u + ['TK_GUE_Soldier_2_EP1'];
+_u = _u + ['TK_GUE_Soldier_3_EP1'];
+_u = _u + ['TK_GUE_Soldier_4_EP1'];
+_u = _u + ['TK_GUE_Soldier_5_EP1'];
+_u = _u + ['TK_GUE_Soldier_AT_EP1'];
+_u = _u + ['TK_GUE_Soldier_AAT_EP1'];
+_u = _u + ['TK_GUE_Soldier_AA_EP1'];
+_u = _u + ['TK_GUE_Soldier_AR_EP1'];
+_u = _u + ['TK_GUE_Soldier_MG_EP1'];
+_u = _u + ['TK_GUE_Soldier_Sniper_EP1'];
+_u = _u + ['TK_GUE_Bonesetter_EP1'];
+_u = _u + ['TK_GUE_Soldier_HAT_EP1'];
+_u = _u + ['TK_GUE_Soldier_TL_EP1'];
+_u = _u + ['TK_GUE_Warlord_EP1'];
+
+_u \ No newline at end of file
diff --git a/Common/Config/Core_Units/CombinedOps/Units_Barracks_RU.sqf b/Common/Config/Core_Units/CombinedOps/Units_Barracks_RU.sqf
new file mode 100644
index 0000000..bcdc317
--- /dev/null
+++ b/Common/Config/Core_Units/CombinedOps/Units_Barracks_RU.sqf
@@ -0,0 +1,65 @@
+Private ['_tiMode','_u'];
+
+_tiMode = 'WFBE_THERMALIMAGING' Call GetNamespace;
+_tiMode = if (_tiMode == 1 || _tiMode == 3) then {true} else {false};
+
+//--- Russian Troops.
+_u = ['RU_Soldier'];
+_u = _u + ['RU_Soldier2'];
+_u = _u + ['RU_Soldier_LAT'];
+_u = _u + ['RU_Soldier_AT'];
+_u = _u + ['RU_Soldier_HAT'];
+_u = _u + ['RU_Soldier_AA'];
+_u = _u + ['RU_Soldier_AR'];
+_u = _u + ['RU_Soldier_MG'];
+_u = _u + ['RU_Soldier_GL'];
+_u = _u + ['RU_Soldier_Marksman'];
+_u = _u + ['RU_Soldier_Spotter'];
+_u = _u + ['RU_Soldier_Sniper'];
+_u = _u + ['RU_Soldier_SniperH'];
+_u = _u + ['RU_Soldier_Medic'];
+_u = _u + ['RU_Soldier_TL'];
+_u = _u + ['RU_Soldier_SL'];
+_u = _u + ['RU_Soldier_Crew'];
+_u = _u + ['RU_Soldier_Pilot'];
+_u = _u + ['RUS_Soldier1'];
+_u = _u + ['RUS_Soldier2'];
+_u = _u + ['RUS_Soldier_GL'];
+_u = _u + ['RUS_Soldier_Marksman'];
+_u = _u + ['RUS_Soldier3'];
+_u = _u + ['RUS_Soldier_TL'];
+_u = _u + ['MVD_Soldier_GL'];
+_u = _u + ['MVD_Soldier_MG'];
+_u = _u + ['MVD_Soldier_Marksman'];
+_u = _u + ['MVD_Soldier_AT'];
+_u = _u + ['MVD_Soldier_Sniper'];
+_u = _u + ['MVD_Soldier_TL'];
+//--- Takistan Troops.
+_u = _u + ['TK_Soldier_EP1'];
+_u = _u + ['TK_Soldier_B_EP1'];
+if (_tiMode) then {
+ _u = _u + ['TK_Soldier_TWS_EP1'];
+};
+_u = _u + ['TK_Soldier_Engineer_EP1'];
+_u = _u + ['TK_Soldier_LAT_EP1'];
+_u = _u + ['TK_Soldier_AAT_EP1'];
+_u = _u + ['TK_Soldier_AT_EP1'];
+_u = _u + ['TK_Soldier_HAT_EP1'];
+_u = _u + ['TK_Soldier_AA_EP1'];
+_u = _u + ['TK_Soldier_AR_EP1'];
+_u = _u + ['TK_Soldier_AMG_EP1'];
+_u = _u + ['TK_Soldier_MG_EP1'];
+_u = _u + ['TK_Soldier_GL_EP1'];
+_u = _u + ['TK_Soldier_Spotter_EP1'];
+_u = _u + ['TK_Soldier_Sniper_EP1'];
+_u = _u + ['TK_Soldier_SniperH_EP1'];
+_u = _u + ['TK_Soldier_Medic_EP1'];
+_u = _u + ['TK_Special_Forces_EP1'];
+_u = _u + ['TK_Special_Forces_TL_EP1'];
+_u = _u + ['TK_Special_Forces_MG_EP1'];
+_u = _u + ['TK_Soldier_Crew_EP1'];
+_u = _u + ['TK_Soldier_Pilot_EP1'];
+_u = _u + ['TK_Soldier_SL_EP1'];
+_u = _u + ['TK_Soldier_Officer_EP1'];
+
+_u \ No newline at end of file
diff --git a/Common/Config/Core_Units/CombinedOps/Units_Barracks_US.sqf b/Common/Config/Core_Units/CombinedOps/Units_Barracks_US.sqf
new file mode 100644
index 0000000..3a83086
--- /dev/null
+++ b/Common/Config/Core_Units/CombinedOps/Units_Barracks_US.sqf
@@ -0,0 +1,163 @@
+Private ['_u'];
+
+//--- US Troops.
+_u = ['US_Soldier_Light_EP1'];
+_u = _u + ['US_Soldier_EP1'];
+_u = _u + ['US_Soldier_B_EP1'];
+_u = _u + ['US_Soldier_LAT_EP1'];
+_u = _u + ['US_Soldier_AT_EP1'];
+_u = _u + ['US_Soldier_HAT_EP1'];
+_u = _u + ['US_Soldier_AA_EP1'];
+_u = _u + ['US_Soldier_AR_EP1'];
+_u = _u + ['US_Soldier_MG_EP1'];
+_u = _u + ['US_Soldier_GL_EP1'];
+_u = _u + ['US_Soldier_Sniper_EP1'];
+_u = _u + ['US_Soldier_SniperH_EP1'];
+_u = _u + ['US_Soldier_Sniper_NV_EP1'];
+_u = _u + ['US_Soldier_Marksman_EP1'];
+_u = _u + ['US_Soldier_Medic_EP1'];
+_u = _u + ['US_Soldier_Engineer_EP1'];
+_u = _u + ['US_Soldier_AMG_EP1'];
+_u = _u + ['US_Soldier_AAR_EP1'];
+_u = _u + ['US_Soldier_AHAT_EP1'];
+_u = _u + ['US_Soldier_AAT_EP1'];
+_u = _u + ['US_Soldier_Spotter_EP1'];
+_u = _u + ['US_Soldier_TL_EP1'];
+_u = _u + ['US_Soldier_SL_EP1'];
+_u = _u + ['US_Soldier_Officer_EP1'];
+_u = _u + ['US_Soldier_Crew_EP1'];
+_u = _u + ['US_Soldier_Pilot_EP1'];
+_u = _u + ['US_Delta_Force_EP1'];
+_u = _u + ['US_Delta_Force_TL_EP1'];
+_u = _u + ['US_Delta_Force_Medic_EP1'];
+_u = _u + ['US_Delta_Force_Assault_EP1'];
+_u = _u + ['US_Delta_Force_SD_EP1'];
+_u = _u + ['US_Delta_Force_MG_EP1'];
+_u = _u + ['US_Delta_Force_AR_EP1'];
+_u = _u + ['US_Delta_Force_Night_EP1'];
+_u = _u + ['US_Delta_Force_Marksman_EP1'];
+_u = _u + ['US_Delta_Force_M14_EP1'];
+_u = _u + ['US_Delta_Force_Air_Controller_EP1'];
+//--- USMC Troops.
+_u = _u + ['USMC_Soldier'];
+_u = _u + ['USMC_Soldier2'];
+_u = _u + ['USMC_Soldier_LAT'];
+_u = _u + ['USMC_Soldier_AT'];
+_u = _u + ['USMC_Soldier_HAT'];
+_u = _u + ['USMC_Soldier_AA'];
+_u = _u + ['USMC_Soldier_AR'];
+_u = _u + ['USMC_Soldier_MG'];
+_u = _u + ['USMC_Soldier_GL'];
+_u = _u + ['USMC_SoldierS_Sniper'];
+_u = _u + ['USMC_SoldierS_SniperH'];
+_u = _u + ['USMC_SoldierM_Marksman'];
+_u = _u + ['USMC_Soldier_Medic'];
+_u = _u + ['USMC_SoldierS_Engineer'];
+_u = _u + ['USMC_SoldierS'];
+_u = _u + ['USMC_SoldierS_Spotter'];
+_u = _u + ['USMC_Soldier_TL'];
+_u = _u + ['USMC_Soldier_SL'];
+_u = _u + ['USMC_Soldier_Crew'];
+_u = _u + ['USMC_Soldier_Pilot'];
+_u = _u + ['FR_GL'];
+_u = _u + ['FR_Corpsman'];
+_u = _u + ['FR_TL'];
+_u = _u + ['FR_Assault_R'];
+_u = _u + ['FR_Assault_GL'];
+_u = _u + ['FR_AR'];
+_u = _u + ['FR_R'];
+_u = _u + ['FR_Sapper'];
+_u = _u + ['FR_AC'];
+_u = _u + ['FR_Marksman'];
+if (paramDLCBAF) then {
+ //--- BAF MTP Camo.
+ _u = _u + ['BAF_Soldier_AA_MTP'];
+ _u = _u + ['BAF_Soldier_AAA_MTP'];
+ _u = _u + ['BAF_Soldier_AAT_MTP'];
+ _u = _u + ['BAF_Soldier_AHAT_MTP'];
+ _u = _u + ['BAF_Soldier_AAR_MTP'];
+ _u = _u + ['BAF_Soldier_AMG_MTP'];
+ _u = _u + ['BAF_Soldier_AT_MTP'];
+ _u = _u + ['BAF_Soldier_HAT_MTP'];
+ _u = _u + ['BAF_Soldier_AR_MTP'];
+ _u = _u + ['BAF_crewman_MTP'];
+ _u = _u + ['BAF_Soldier_EN_MTP'];
+ _u = _u + ['BAF_Soldier_GL_MTP'];
+ _u = _u + ['BAF_Soldier_FAC_MTP'];
+ _u = _u + ['BAF_Soldier_MG_MTP'];
+ _u = _u + ['BAF_Soldier_scout_MTP'];
+ _u = _u + ['BAF_Soldier_Marksman_MTP'];
+ _u = _u + ['BAF_Soldier_Medic_MTP'];
+ _u = _u + ['BAF_Soldier_Officer_MTP'];
+ _u = _u + ['BAF_Pilot_MTP'];
+ _u = _u + ['BAF_Soldier_MTP'];
+ _u = _u + ['BAF_ASoldier_MTP'];
+ _u = _u + ['BAF_Soldier_L_MTP'];
+ _u = _u + ['BAF_Soldier_N_MTP'];
+ _u = _u + ['BAF_Soldier_SL_MTP'];
+ _u = _u + ['BAF_Soldier_SniperN_MTP'];
+ _u = _u + ['BAF_Soldier_SniperH_MTP'];
+ _u = _u + ['BAF_Soldier_Sniper_MTP'];
+ _u = _u + ['BAF_Soldier_spotter_MTP'];
+ _u = _u + ['BAF_Soldier_spotterN_MTP'];
+ _u = _u + ['BAF_Soldier_TL_MTP'];
+ //--- BAF Woodland Camo.
+ _u = _u + ['BAF_Soldier_AA_W'];
+ _u = _u + ['BAF_Soldier_AAA_W'];
+ _u = _u + ['BAF_Soldier_AAT_W'];
+ _u = _u + ['BAF_Soldier_AHAT_W'];
+ _u = _u + ['BAF_Soldier_AAR_W'];
+ _u = _u + ['BAF_Soldier_AMG_W'];
+ _u = _u + ['BAF_Soldier_AT_W'];
+ _u = _u + ['BAF_Soldier_HAT_W'];
+ _u = _u + ['BAF_Soldier_AR_W'];
+ _u = _u + ['BAF_crewman_W'];
+ _u = _u + ['BAF_Soldier_EN_W'];
+ _u = _u + ['BAF_Soldier_GL_W'];
+ _u = _u + ['BAF_Soldier_FAC_W'];
+ _u = _u + ['BAF_Soldier_MG_W'];
+ _u = _u + ['BAF_Soldier_scout_W'];
+ _u = _u + ['BAF_Soldier_Marksman_W'];
+ _u = _u + ['BAF_Soldier_Medic_W'];
+ _u = _u + ['BAF_Soldier_Officer_W'];
+ _u = _u + ['BAF_Pilot_W'];
+ _u = _u + ['BAF_Soldier_W'];
+ _u = _u + ['BAF_ASoldier_W'];
+ _u = _u + ['BAF_Soldier_L_W'];
+ _u = _u + ['BAF_Soldier_N_W'];
+ _u = _u + ['BAF_Soldier_SL_W'];
+ _u = _u + ['BAF_Soldier_SniperN_W'];
+ _u = _u + ['BAF_Soldier_SniperH_W'];
+ _u = _u + ['BAF_Soldier_Sniper_W'];
+ _u = _u + ['BAF_Soldier_spotter_W'];
+ _u = _u + ['BAF_Soldier_spotterN_W'];
+ _u = _u + ['BAF_Soldier_TL_W'];
+ //--- BAF Desert Camo.
+ _u = _u + ['BAF_Soldier_AA_DDPM'];
+ _u = _u + ['BAF_Soldier_AAA_DDPM'];
+ _u = _u + ['BAF_Soldier_AAT_DDPM'];
+ _u = _u + ['BAF_Soldier_AHAT_DDPM'];
+ _u = _u + ['BAF_Soldier_AAR_DDPM'];
+ _u = _u + ['BAF_Soldier_AMG_DDPM'];
+ _u = _u + ['BAF_Soldier_AT_DDPM'];
+ _u = _u + ['BAF_Soldier_HAT_DDPM'];
+ _u = _u + ['BAF_Soldier_AR_DDPM'];
+ _u = _u + ['BAF_crewman_DDPM'];
+ _u = _u + ['BAF_Soldier_EN_DDPM'];
+ _u = _u + ['BAF_Soldier_GL_DDPM'];
+ _u = _u + ['BAF_Soldier_FAC_DDPM'];
+ _u = _u + ['BAF_Soldier_MG_DDPM'];
+ _u = _u + ['BAF_Soldier_scout_DDPM'];
+ _u = _u + ['BAF_Soldier_Marksman_DDPM'];
+ _u = _u + ['BAF_Soldier_Medic_DDPM'];
+ _u = _u + ['BAF_Soldier_Officer_DDPM'];
+ _u = _u + ['BAF_Pilot_DDPM'];
+ _u = _u + ['BAF_Soldier_DDPM'];
+ _u = _u + ['BAF_ASoldier_DDPM'];
+ _u = _u + ['BAF_Soldier_L_DDPM'];
+ _u = _u + ['BAF_Soldier_N_DDPM'];
+ _u = _u + ['BAF_Soldier_SL_DDPM'];
+ _u = _u + ['BAF_Soldier_TL_DDPM'];
+};
+
+_u \ No newline at end of file
diff --git a/Common/Config/Core_Units/CombinedOps/Units_Depot_RU.sqf b/Common/Config/Core_Units/CombinedOps/Units_Depot_RU.sqf
new file mode 100644
index 0000000..d62c895
--- /dev/null
+++ b/Common/Config/Core_Units/CombinedOps/Units_Depot_RU.sqf
@@ -0,0 +1,21 @@
+Private ['_u'];
+
+/* Russian Depot Vehicles */
+_u = ["MMT_Civ"];
+_u = _u + ["Old_bike_TK_CIV_EP1"];
+_u = _u + ["TT650_Civ"];
+_u = _u + ["Tractor"];
+_u = _u + ["Lada2_TK_CIV_EP1"];
+_u = _u + ["SkodaRed"];
+_u = _u + ["VolhaLimo_TK_CIV_EP1"];
+_u = _u + ["Volha_2_TK_CIV_EP1"];
+_u = _u + ["VWGolf"];
+_u = _u + ["datsun1_civil_2_covered"];
+_u = _u + ["hilux1_civil_2_covered"];
+_u = _u + ["S1203_TK_CIV_EP1"];
+_u = _u + ["Ural_TK_CIV_EP1"];
+if (paramPurchaseInfDepot) then {
+ _u = _u + ['WFBE_EASTSOLDIER' Call GetNamespace];
+};
+
+_u \ No newline at end of file
diff --git a/Common/Config/Core_Units/CombinedOps/Units_Depot_US.sqf b/Common/Config/Core_Units/CombinedOps/Units_Depot_US.sqf
new file mode 100644
index 0000000..fa33d8f
--- /dev/null
+++ b/Common/Config/Core_Units/CombinedOps/Units_Depot_US.sqf
@@ -0,0 +1,22 @@
+Private ['_u'];
+
+/* US Depot Vehicles */
+_u = ["Old_bike_TK_CIV_EP1"];
+_u = _u + ["MMT_Civ"];
+_u = _u + ["Old_moto_TK_Civ_EP1"];
+_u = _u + ["Lada1_TK_CIV_EP1"];
+_u = _u + ["SkodaBlue"];
+_u = _u + ["car_sedan"];
+_u = _u + ["car_hatchback"];
+_u = _u + ["Volha_1_TK_CIV_EP1"];
+_u = _u + ["datsun1_civil_1_open"];
+_u = _u + ["datsun1_civil_3_open"];
+_u = _u + ["hilux1_civil_1_open"];
+_u = _u + ["LandRover_TK_CIV_EP1"];
+_u = _u + ["V3S_Open_TK_CIV_EP1"];
+_u = _u + ["Ikarus_TK_CIV_EP1"];
+if (paramPurchaseInfDepot) then {
+ _u = _u + ['WFBE_WESTSOLDIER' Call GetNamespace];
+};
+
+_u \ No newline at end of file
diff --git a/Common/Config/Core_Units/CombinedOps/Units_Heavy_GUE.sqf b/Common/Config/Core_Units/CombinedOps/Units_Heavy_GUE.sqf
new file mode 100644
index 0000000..c102bce
--- /dev/null
+++ b/Common/Config/Core_Units/CombinedOps/Units_Heavy_GUE.sqf
@@ -0,0 +1,9 @@
+Private ['_u'];
+
+/* Guerilla Heavy Vehicles */
+_u = ['BMP2_Gue'];
+_u = _u + ['T72_Gue'];
+_u = _u + ['T34_TK_GUE_EP1'];
+_u = _u + ['T55_TK_GUE_EP1'];
+
+_u \ No newline at end of file
diff --git a/Common/Config/Core_Units/CombinedOps/Units_Heavy_RU.sqf b/Common/Config/Core_Units/CombinedOps/Units_Heavy_RU.sqf
new file mode 100644
index 0000000..1a11602
--- /dev/null
+++ b/Common/Config/Core_Units/CombinedOps/Units_Heavy_RU.sqf
@@ -0,0 +1,25 @@
+Private ['_u'];
+
+//--- Russian Heavy Vehicles.
+_u = ['M113_TK_EP1'];
+_u = _u + ['BMP2_INS'];
+_u = _u + ['BMP2_TK_EP1'];
+_u = _u + ['BMP3'];
+_u = _u + ['ZSU_INS'];
+_u = _u + ['ZSU_TK_EP1'];
+_u = _u + ['T34_TK_EP1'];
+_u = _u + ['T55_TK_EP1'];
+_u = _u + ['T72_RU'];
+_u = _u + ['T72_TK_EP1'];
+_u = _u + ['2S6M_Tunguska'];
+
+if (WF_ACE) then
+{
+ _u = _u + ["ACE_T90A"];
+}
+else
+{
+ _u = _u + ['T90'];
+};
+
+_u \ No newline at end of file
diff --git a/Common/Config/Core_Units/CombinedOps/Units_Heavy_US.sqf b/Common/Config/Core_Units/CombinedOps/Units_Heavy_US.sqf
new file mode 100644
index 0000000..ae83933
--- /dev/null
+++ b/Common/Config/Core_Units/CombinedOps/Units_Heavy_US.sqf
@@ -0,0 +1,52 @@
+Private ['_u'];
+
+//--- US Heavy Vehicles.
+_u = ['AAV'];
+_u = _u + ['M1126_ICV_M2_EP1'];
+_u = _u + ['M1126_ICV_mk19_EP1'];
+_u = _u + ['M1129_MC_EP1'];
+_u = _u + ['M1135_ATGMV_EP1'];
+_u = _u + ['M1133_MEV_EP1'];
+_u = _u + ['M2A2_EP1'];
+_u = _u + ['M2A3_EP1'];
+_u = _u + ['M1A1'];
+_u = _u + ['M1A1_US_DES_EP1'];
+_u = _u + ['MLRS'];
+_u = _u + ['MLRS_DES_EP1'];
+_u = _u + ['M1A2_TUSK_MG'];
+_u = _u + ['M1A2_US_TUSK_MG_EP1'];
+_u = _u + ['M6_EP1'];
+if (paramDLCBAF) then {
+ _u = _u + ['BAF_FV510_W'];
+ _u = _u + ['BAF_FV510_D'];
+};
+if (WF_ACE) then {
+ _u = _u + ['ACE_Stryker_RV_SLAT_D'];
+ _u = _u + ['ACE_M1A1HA_TUSK_DESERT'];
+ _u = _u + ['ACE_M1A1HA_TUSK_CSAMM_DESERT'];
+ _u = _u + ['ACE_Stryker_ICV_M2_SLAT'];
+ _u = _u + ['ACE_Stryker_RV_SLAT'];
+ _u = _u + ['ACE_Stryker_ICV_MK19_SLAT'];
+ _u = _u + ['ACE_Stryker_TOW_MG_Slat'];
+ _u = _u + ['ACE_Stryker_MGS_Slat'];
+ _u = _u + ['ACE_M113A3_Ambul'];
+ _u = _u + ['ACE_Vulcan'];
+ _u = _u + ['ACE_M113A3'];
+ _u = _u + ['ACE_M2A2_W'];
+ _u = _u + ['ACE_M2A3_W'];
+ _u = _u + ['ACE_M1A1_NATO'];
+ _u = _u + ['ACE_M1A1HA_TUSK'];
+ _u = _u + ['ACE_M1A1HA_TUSK_CSAMM'];
+ _u = _u + ['ACE_M6A1_W'];
+};
+
+if (WF_ACE) then
+{
+ _u = _u + ['ACE_Stryker_MGS_Slat'];
+}
+else
+{
+ _u = _u + ['M1128_MGS_EP1'];
+};
+
+_u \ No newline at end of file
diff --git a/Common/Config/Core_Units/CombinedOps/Units_Light_GUE.sqf b/Common/Config/Core_Units/CombinedOps/Units_Light_GUE.sqf
new file mode 100644
index 0000000..c5910dc
--- /dev/null
+++ b/Common/Config/Core_Units/CombinedOps/Units_Light_GUE.sqf
@@ -0,0 +1,20 @@
+Private ['_u'];
+
+/* Guerilla Light Vehicles */
+_u = ['V3S_TK_GUE_EP1'];
+_u = _u + ['Pickup_PK_TK_GUE_EP1'];
+_u = _u + ['Offroad_DSHKM_TK_GUE_EP1'];
+_u = _u + ['Offroad_SPG9_TK_GUE_EP1'];
+_u = _u + ['BRDM2_TK_GUE_EP1'];
+_u = _u + ['BTR40_TK_GUE_EP1'];
+_u = _u + ['BTR40_MG_TK_GUE_EP1'];
+_u = _u + ['Ural_ZU23_TK_GUE_EP1'];
+_u = _u + ['TT650_Gue'];
+_u = _u + ['V3S_Gue'];
+_u = _u + ['Pickup_PK_GUE'];
+_u = _u + ['Offroad_DSHKM_Gue'];
+_u = _u + ['Offroad_SPG9_Gue'];
+_u = _u + ['BRDM2_Gue'];
+_u = _u + ['Ural_ZU23_Gue'];
+
+_u \ No newline at end of file
diff --git a/Common/Config/Core_Units/CombinedOps/Units_Light_RU.sqf b/Common/Config/Core_Units/CombinedOps/Units_Light_RU.sqf
new file mode 100644
index 0000000..1705b99
--- /dev/null
+++ b/Common/Config/Core_Units/CombinedOps/Units_Light_RU.sqf
@@ -0,0 +1,50 @@
+Private ['_u'];
+
+//--- Russian Light Vehicles.
+_u = ['MMT_Civ'];
+_u = _u + ['TT650_Ins'];
+_u = _u + ['UAZ_Unarmed_TK_EP1'];
+_u = _u + ['UAZ_MG_TK_EP1'];
+_u = _u + ['UAZ_AGS30_TK_EP1'];
+_u = _u + ['UAZ_RU'];
+_u = _u + ['PBX'];
+_u = _u + ['UAZ_MG_INS'];
+_u = _u + ['UAZ_AGS30_RU'];
+_u = _u + ['UAZ_SPG9_INS'];
+_u = _u + ['LandRover_MG_TK_EP1'];
+_u = _u + ['LandRover_SPG9_TK_EP1'];
+_u = _u + ['SUV_TK_EP1'];
+_u = _u + ['Kamaz'];
+_u = _u + ['V3S_TK_EP1'];
+_u = _u + ['V3S_Open_TK_EP1'];
+_u = _u + ['UralRepair_TK_EP1'];
+_u = _u + ['UralReammo_TK_EP1'];
+_u = _u + ['UralRefuel_TK_EP1'];
+_u = _u + ['UralSalvage_TK_EP1'];
+if (('WFBE_SUPPLYSYSTEM' Call GetNamespace) == 0) then {_u = _u + ['UralSupply_TK_EP1']};
+_u = _u + ['KamazRepair'];
+_u = _u + ['WarfareReammoTruck_RU'];
+_u = _u + ['KamazRefuel'];
+_u = _u + ['WarfareSalvageTruck_RU'];
+if (('WFBE_SUPPLYSYSTEM' Call GetNamespace) == 0) then {_u = _u + ['WarfareSupplyTruck_RU']};
+_u = _u + ['M113Ambul_TK_EP1'];
+_u = _u + ['GAZ_Vodnik_MedEvac'];
+_u = _u + ['BRDM2_TK_EP1'];
+_u = _u + ['BRDM2_ATGM_TK_EP1'];
+_u = _u + ['BRDM2_INS'];
+_u = _u + ['BRDM2_ATGM_INS'];
+_u = _u + ['GAZ_Vodnik'];
+_u = _u + ['GAZ_Vodnik_HMG'];
+_u = _u + ['BTR60_TK_EP1'];
+_u = _u + ['Ural_ZU23_TK_EP1'];
+_u = _u + ['Ural_ZU23_INS'];
+_u = _u + ['BTR90'];
+_u = _u + ['GRAD_TK_EP1'];
+_u = _u + ['GRAD_RU'];
+
+if (paramDLCPMC) then
+{
+ _u = _u + ['ArmoredSUV_PMC'];
+};
+
+_u \ No newline at end of file
diff --git a/Common/Config/Core_Units/CombinedOps/Units_Light_US.sqf b/Common/Config/Core_Units/CombinedOps/Units_Light_US.sqf
new file mode 100644
index 0000000..23ac57e
--- /dev/null
+++ b/Common/Config/Core_Units/CombinedOps/Units_Light_US.sqf
@@ -0,0 +1,75 @@
+Private ['_u'];
+
+//--- US Light Vehicles.
+_u = ['MMT_USMC'];
+_u = _u + ['M1030'];
+_u = _u + ['M1030_US_DES_EP1'];
+_u = _u + ['ATV_US_EP1'];
+_u = _u + ['Zodiac'];
+_u = _u + ['HMMWV_DES_EP1'];
+_u = _u + ['HMMWV_M1035_DES_EP1'];
+_u = _u + ['HMMWV_Terminal_EP1'];
+_u = _u + ['HMMWV_MK19_DES_EP1'];
+_u = _u + ['HMMWV_M998A2_SOV_DES_EP1'];
+_u = _u + ['HMMWV_M1151_M2_DES_EP1'];
+_u = _u + ['HMMWV_M998_crows_M2_DES_EP1'];
+_u = _u + ['HMMWV_M998_crows_MK19_DES_EP1'];
+_u = _u + ['HMMWV_TOW_DES_EP1'];
+_u = _u + ['HMMWV_Avenger_DES_EP1'];
+_u = _u + ['HMMWV_Ambulance_DES_EP1'];
+_u = _u + ['HMMWV'];
+_u = _u + ['HMMWV_M2'];
+_u = _u + ['HMMWV_Armored'];
+_u = _u + ['HMMWV_MK19'];
+_u = _u + ['HMMWV_TOW'];
+_u = _u + ['HMMWV_Avenger'];
+_u = _u + ['HMMWV_Ambulance'];
+_u = _u + ['MTVR_DES_EP1'];
+_u = _u + ['MtvrRepair_DES_EP1'];
+_u = _u + ['MtvrReammo_DES_EP1'];
+_u = _u + ['MtvrRefuel_DES_EP1'];
+_u = _u + ['MtvrSalvage_DES_EP1'];
+if (('WFBE_SUPPLYSYSTEM' Call GetNamespace) == 0) then {_u = _u + ['MtvrSupply_DES_EP1']};
+_u = _u + ['MTVR'];
+_u = _u + ['MtvrRepair'];
+_u = _u + ['WarfareReammoTruck_USMC'];
+_u = _u + ['MtvrRefuel'];
+_u = _u + ['WarfareSalvageTruck_USMC'];
+if (('WFBE_SUPPLYSYSTEM' Call GetNamespace) == 0) then {_u = _u + ['WarfareSupplyTruck_USMC']};
+_u = _u + ['RHIB'];
+_u = _u + ['RHIB2Turret'];
+_u = _u + ['LAV25'];
+if (paramDLCBAF) then {
+ _u = _u + ['BAF_ATV_W'];
+ _u = _u + ['BAF_Offroad_W'];
+ _u = _u + ['BAF_Jackal2_GMG_W'];
+ _u = _u + ['BAF_Jackal2_L2A1_W'];
+ _u = _u + ['BAF_ATV_D'];
+ _u = _u + ['BAF_Offroad_D'];
+ _u = _u + ['BAF_Jackal2_GMG_D'];
+ _u = _u + ['BAF_Jackal2_L2A1_D'];
+};
+if (WF_ACE) then {
+ _u = _u + ['ACE_ATV_Honda'];
+ _u = _u + ['ACE_HMMWV_MK19_USARMY'];
+ _u = _u + ['ACE_HMMWV_USARMY'];
+ _u = _u + ['ACE_HMMWV_GMV'];
+ _u = _u + ['ACE_HMMWV_GMV_MK19'];
+ _u = _u + ['ACE_HMMWV_M2_USARMY'];
+ _u = _u + ['ACE_HMMWV_TOW_USARMY'];
+ _u = _u + ['ACE_HMMWV_Ambulance_USARMY'];
+ _u = _u + ['ACE_Truck5tOpen'];
+ _u = _u + ['ACE_Truck5t'];
+ _u = _u + ['ACE_Truck5tMGOpen'];
+ _u = _u + ['ACE_Truck5tMG'];
+ _u = _u + ['ACE_Truck5tRepair'];
+ _u = _u + ['ACE_Truck5tReammo'];
+ _u = _u + ['ACE_Truck5tRefuel'];
+};
+
+if (paramDLCPMC) then
+{
+ _u = _u + ['ArmoredSUV_PMC'];
+};
+
+_u \ No newline at end of file
diff --git a/Common/Config/Core_Units/CombinedOps/Units_Special_RU.sqf b/Common/Config/Core_Units/CombinedOps/Units_Special_RU.sqf
new file mode 100644
index 0000000..7ec794f
--- /dev/null
+++ b/Common/Config/Core_Units/CombinedOps/Units_Special_RU.sqf
@@ -0,0 +1,70 @@
+//--- Radio Announcer (Vanilla worlds).
+['WFBE_EASTANNOUNCERS',['WFHQ_RU0','WFHQ_RU1','WFHQ_RU2'],true] Call SetNamespace;
+
+//--- Crew model.
+['WFBE_EASTCREW','RU_Soldier_Crew',false] Call SetNamespace;
+
+//--- Pilot model.
+['WFBE_EASTPILOT','RU_Soldier_Pilot',false] Call SetNamespace;
+
+//--- Soldier model.
+['WFBE_EASTSOLDIER','RU_Soldier',false] Call SetNamespace;
+
+//--- Ambulances.
+['WFBE_EASTAMBULANCES',['GAZ_Vodnik_MedEvac','M113Ambul_TK_EP1','Mi17_medevac_RU','M113Ambul_TK_EP1'],true] Call SetNamespace;
+
+//--- Repair Trucks.
+['WFBE_EASTREPAIRTRUCKS',['KamazRepair','UralRepair_TK_EP1'],true] Call SetNamespace;
+
+//--- Salvage Trucks.
+['WFBE_EASTSALVAGETRUCK',['WarfareSalvageTruck_RU','UralSalvage_TK_EP1'],true] Call SetNamespace;
+
+//--- Supply Trucks.
+['WFBE_EASTSUPPLYTRUCKS',['WarfareSupplyTruck_RU','UralSupply_TK_EP1'],true] Call SetNamespace;
+
+//--- UAV.
+['WFBE_EASTUAV','Pchela1T',true] Call SetNamespace;
+
+if (isServer) then {
+ //--- Base Patrols.
+ if (paramBasePatrols) then {
+ ['WFBE_EASTBASEPATROLS_0',['RU_Soldier_SL','RU_Soldier','RU_Soldier','RU_Soldier_AR','RU_Soldier_GL','RU_Soldier_MG'],true] Call SetNamespace;
+ ['WFBE_EASTBASEPATROLS_1',['RU_Soldier_SL','RU_Soldier','RU_Soldier','RU_Soldier_MG','RU_Soldier_LAT','RU_Soldier_Medic'],true] Call SetNamespace;
+ ['WFBE_EASTBASEPATROLS_2',['RU_Soldier_SL','RU_Soldier','RU_Soldier','RU_Soldier_AT','RU_Soldier_AA','RU_Soldier_Marksman'],true] Call SetNamespace;
+ ['WFBE_EASTBASEPATROLS_3',['RU_Soldier_SL','RU_Soldier','RU_Soldier_AR','RU_Soldier_HAT','RU_Soldier_LAT','RU_Soldier_GL'],true] Call SetNamespace;
+ };
+
+ //--- Paratroopers.
+ ['WFBE_EASTPARACHUTELEVEL1',['RU_Soldier_SL','RU_Soldier_LAT','RU_Soldier','RU_Soldier2','RU_Soldier_AR','RU_Soldier_Medic'],true] Call SetNamespace;
+ ['WFBE_EASTPARACHUTELEVEL2',['RU_Soldier_SL','RU_Soldier_AT','RU_Soldier_AT','RU_Soldier_AT','RU_Soldier_AA','RU_Soldier_MG','RU_Soldier_Medic','RU_Soldier_Marksman','RUS_Soldier_Marksman'],true] Call SetNamespace;
+ ['WFBE_EASTPARACHUTELEVEL3',['MVD_Soldier_TL','RU_Soldier_HAT','RU_Soldier_HAT','RU_Soldier_HAT','RU_Soldier_HAT','RU_Soldier_HAT','RU_Soldier_AA','RU_Soldier_AA','MVD_Soldier_MG','RUS_Commander','MVD_Soldier_Sniper','RUS_Soldier_Marksman'],true] Call SetNamespace;
+
+ //--- Paratroopers, Vehicle.
+ ['WFBE_EASTPARACARGO','Mi17_Ins',true] Call SetNamespace;
+
+ //--- Repair Truck model.
+ ['WFBE_EASTREPAIRTRUCK','KamazRepair',false] Call SetNamespace;
+
+ //--- Starting Vehicles.
+ ['WFBE_EASTSTARTINGVEHICLES',if (WF_Camo) then {['GAZ_Vodnik_MedEvac','Kamaz']} else {['M113Ambul_TK_EP1','V3S_TK_EP1']},true] Call SetNamespace;
+
+ //--- Supply Paradropping, Dropped Ammunition.
+ ['WFBE_EASTPARAAMMO',['RUBasicAmmunitionBox','RUBasicWeaponsBox','RULaunchersBox'],true] Call SetNamespace;
+
+ //--- Supply Paradropping, Dropped Vehicle.
+ ['WFBE_EASTPARAVEHICARGO',if (WF_Camo) then {'UAZ_RU'} else {'UAZ_Unarmed_TK_EP1'},true] Call SetNamespace;
+
+ //--- Supply Paradropping, Vehicle.
+ ['WFBE_EASTPARAVEHI','Mi17_Ins',true] Call SetNamespace;
+
+ //--- Supply Paradropping, Parachute Model.
+ ['WFBE_EASTPARACHUTE','ParachuteMediumEast_EP1',true] Call SetNamespace;
+
+ //--- Supply Truck model.
+ ['WFBE_EASTSUPPLYTRUCK','WarfareSupplyTruck_RU',false] Call SetNamespace;
+};
+
+if (local player) then {
+ //--- Default Faction (Buy Menu), this is the faction name defined in core_xxx.sqf files.
+ ['WFBE_EASTDEFAULTFACTION','Russians',true] Call SetNamespace;
+}; \ No newline at end of file
diff --git a/Common/Config/Core_Units/CombinedOps/Units_Special_US.sqf b/Common/Config/Core_Units/CombinedOps/Units_Special_US.sqf
new file mode 100644
index 0000000..057a602
--- /dev/null
+++ b/Common/Config/Core_Units/CombinedOps/Units_Special_US.sqf
@@ -0,0 +1,74 @@
+//--- Radio Announcer (Vanilla worlds).
+if (worldName in ('WFBE_WORLDWHITELISTVA' Call GetNamespace)) then {
+ ['WFBE_WESTANNOUNCERS',['WFHQ_EN0','WFHQ_EN1','WFHQ_EN2'],true] Call SetNamespace;
+} else {
+ ['WFBE_WESTANNOUNCERS',['WFHQ_EN0_EP1','WFHQ_EN1_EP1','WFHQ_EN2_EP1','WFHQ_EN3_EP1','WFHQ_EN4_EP1','WFHQ_EN5_EP1'],true] Call SetNamespace;
+};
+
+//--- Crew model.
+['WFBE_WESTCREW',if (WF_Camo) then {'USMC_Soldier_Crew'} else {'US_Soldier_Crew_EP1'},false] Call SetNamespace;
+
+//--- Pilot model.
+['WFBE_WESTPILOT',if (WF_Camo) then {'USMC_Soldier_Pilot'} else {'US_Soldier_Pilot_EP1'},false] Call SetNamespace;
+
+//--- Soldier model.
+['WFBE_WESTSOLDIER',if (WF_Camo) then {'USMC_Soldier'} else {'US_Soldier_EP1'},false] Call SetNamespace;
+
+//--- Ambulances.
+['WFBE_WESTAMBULANCES',['HMMWV_Ambulance','HMMWV_Ambulance_DES_EP1','UH60M_MEV_EP1','M1133_MEV_EP1'],true] Call SetNamespace;
+
+//--- Repair Trucks.
+['WFBE_WESTREPAIRTRUCKS',['MtvrRepair','MtvrRepair_DES_EP1'],true] Call SetNamespace;
+
+//--- Salvage Trucks.
+['WFBE_WESTSALVAGETRUCK',['WarfareSalvageTruck_USMC','MtvrSalvage_DES_EP1'],true] Call SetNamespace;
+
+//--- Supply Trucks.
+['WFBE_WESTSUPPLYTRUCKS',['WarfareSupplyTruck_USMC','MtvrSupply_DES_EP1'],true] Call SetNamespace;
+
+//--- UAV.
+['WFBE_WESTUAV','MQ9PredatorB_US_EP1',true] Call SetNamespace;
+
+if (isServer) then {
+ //--- Base Patrols.
+ if (paramBasePatrols) then {
+ ['WFBE_WESTBASEPATROLS_0',['US_Soldier_SL_EP1','US_Soldier_EP1','US_Soldier_EP1','US_Soldier_AR_EP1','US_Soldier_GL_EP1','US_Soldier_MG_EP1'],true] Call SetNamespace;
+ ['WFBE_WESTBASEPATROLS_1',['US_Soldier_SL_EP1','US_Soldier_EP1','US_Soldier_EP1','US_Soldier_MG_EP1','US_Soldier_LAT_EP1','US_Soldier_Medic_EP1'],true] Call SetNamespace;
+ ['WFBE_WESTBASEPATROLS_2',['US_Soldier_SL_EP1','US_Soldier_EP1','US_Soldier_EP1','US_Soldier_AT_EP1','US_Soldier_AA_EP1','US_Soldier_Sniper_EP1'],true] Call SetNamespace;
+ ['WFBE_WESTBASEPATROLS_3',['US_Soldier_SL_EP1','US_Soldier_EP1','US_Soldier_AR_EP1','US_Soldier_HAT_EP1','US_Soldier_LAT_EP1','US_Soldier_GL_EP1'],true] Call SetNamespace;
+ };
+
+ //--- Paratroopers.
+ ['WFBE_WESTPARACHUTELEVEL1',['US_Soldier_SL_EP1','US_Soldier_LAT_EP1','US_Soldier_EP1','US_Soldier_EP1','US_Soldier_AR_EP1','US_Soldier_Medic_EP1'],true] Call SetNamespace;
+ ['WFBE_WESTPARACHUTELEVEL2',['US_Soldier_SL_EP1','US_Soldier_AT_EP1','US_Soldier_AT_EP1','US_Soldier_AT_EP1','US_Soldier_AA_EP1','US_Soldier_MG_EP1','US_Soldier_Medic_EP1','US_Soldier_Spotter_EP1','US_Soldier_Sniper_EP1'],true] Call SetNamespace;
+ ['WFBE_WESTPARACHUTELEVEL3',['US_Delta_Force_TL_EP1','US_Soldier_HAT_EP1','US_Soldier_HAT_EP1','US_Soldier_HAT_EP1','US_Soldier_HAT_EP1','US_Soldier_AA_EP1','US_Soldier_AA_EP1','US_Delta_Force_AR_EP1','US_Delta_Force_Assault_EP1','US_Soldier_Medic_EP1','US_Delta_Force_M14_EP1','US_Soldier_AT_EP1','US_Soldier_Marksman_EP1'],true] Call SetNamespace;
+
+ //--- Paratroopers, Vehicle.
+ ['WFBE_WESTPARACARGO','C130J_US_EP1',true] Call SetNamespace;
+
+ //--- Repair Truck model.
+ ['WFBE_WESTREPAIRTRUCK',if (WF_Camo) then {'MtvrRepair'} else {'MtvrRepair_DES_EP1'},false] Call SetNamespace;
+
+ //--- Starting Vehicles.
+ ['WFBE_WESTSTARTINGVEHICLES',if (WF_Camo) then {['HMMWV_Ambulance','MTVR']} else {['HMMWV_Ambulance_DES_EP1','MTVR_DES_EP1']},true] Call SetNamespace;
+
+ //--- Supply Paradropping, Dropped Ammunition.
+ ['WFBE_WESTPARAAMMO',['USBasicAmmunitionBox_EP1','USBasicWeapons_EP1','USLaunchers_EP1'],true] Call SetNamespace;
+
+ //--- Supply Paradropping, Dropped Vehicle.
+ ['WFBE_WESTPARAVEHICARGO','HMMWV_DES_EP1',true] Call SetNamespace;
+
+ //--- Supply Paradropping, Vehicle.
+ ['WFBE_WESTPARAVEHI','CH_47F_EP1',true] Call SetNamespace;
+
+ //--- Supply Paradropping, Parachute Model.
+ ['WFBE_WESTPARACHUTE','ParachuteMediumWest_EP1',true] Call SetNamespace;
+
+ //--- Supply Truck model.
+ ['WFBE_WESTSUPPLYTRUCK',if (WF_Camo) then {'WarfareSupplyTruck_USMC'} else {'MtvrSupply_DES_EP1'},false] Call SetNamespace;
+};
+
+if (local player) then {
+ //--- Default Faction (Buy Menu), this is the faction name defined in core_xxx.sqf files.
+ ['WFBE_WESTDEFAULTFACTION',if (WF_Camo) then {'USMC'} else {'US'},true] Call SetNamespace;
+}; \ No newline at end of file
diff --git a/Common/Config/Core_Units/Vanilla/Units_Aircraft_CDF.sqf b/Common/Config/Core_Units/Vanilla/Units_Aircraft_CDF.sqf
new file mode 100644
index 0000000..95b5765
--- /dev/null
+++ b/Common/Config/Core_Units/Vanilla/Units_Aircraft_CDF.sqf
@@ -0,0 +1,15 @@
+Private ['_r','_u'];
+
+_r = 'WFBE_RESTRICTIONADVAIR' Call GetNamespace;
+
+/* Chernarus Aircraft Vehicles */
+_u = ['Mi17_CDF'];
+_u = _u + ['Mi17_medevac_CDF'];
+if (_r == 0 ||_r == 1) then {
+ _u = _u + ['Mi24_D'];
+};
+if (_r == 0) then {
+ _u = _u + ['Su25_CDF'];
+};
+
+_u \ No newline at end of file
diff --git a/Common/Config/Core_Units/Vanilla/Units_Aircraft_INS.sqf b/Common/Config/Core_Units/Vanilla/Units_Aircraft_INS.sqf
new file mode 100644
index 0000000..6af3759
--- /dev/null
+++ b/Common/Config/Core_Units/Vanilla/Units_Aircraft_INS.sqf
@@ -0,0 +1,15 @@
+Private ['_r','_u'];
+
+_r = 'WFBE_RESTRICTIONADVAIR' Call GetNamespace;
+
+//--- Insurgent Aircraft Vehicles.
+_u = ['Mi17_Ins'];
+_u = _u + ['Mi17_medevac_Ins'];
+if (_r == 0 ||_r == 1) then {
+ _u = _u + ['Mi24_V'];
+};
+if (_r == 0) then {
+ _u = _u + ['Su25_Ins'];
+};
+
+_u \ No newline at end of file
diff --git a/Common/Config/Core_Units/Vanilla/Units_Aircraft_RU.sqf b/Common/Config/Core_Units/Vanilla/Units_Aircraft_RU.sqf
new file mode 100644
index 0000000..5c4c6da
--- /dev/null
+++ b/Common/Config/Core_Units/Vanilla/Units_Aircraft_RU.sqf
@@ -0,0 +1,23 @@
+Private ['_r','_u'];
+
+_r = 'WFBE_RESTRICTIONADVAIR' Call GetNamespace;
+
+//--- Russian Aircraft Vehicles.
+_u = ['Mi17_Ins'];
+_u = _u + ['Mi17_medevac_RU'];
+if (_r == 0 ||_r == 1) then {
+ _u = _u + ['Mi17_rockets_RU'];
+ _u = _u + ['Mi24_V'];
+ _u = _u + ['Mi24_P'];
+ if !(paramRestrictionKamov) then {
+ _u = _u + ['Ka52'];
+ _u = _u + ['Ka52Black'];
+ };
+};
+if (_r == 0) then {
+ _u = _u + ['Su34'];
+ _u = _u + ['Su25_Ins'];
+ _u = _u + ['Su39'];
+};
+
+_u \ No newline at end of file
diff --git a/Common/Config/Core_Units/Vanilla/Units_Aircraft_USMC.sqf b/Common/Config/Core_Units/Vanilla/Units_Aircraft_USMC.sqf
new file mode 100644
index 0000000..a979ff6
--- /dev/null
+++ b/Common/Config/Core_Units/Vanilla/Units_Aircraft_USMC.sqf
@@ -0,0 +1,21 @@
+Private ['_r','_u'];
+
+_r = 'WFBE_RESTRICTIONADVAIR' Call GetNamespace;
+
+//--- USMC Aircraft Vehicles.
+_u = ['MH60S'];
+if (_r == 0 || _r == 1) then {
+ _u = _u + ['UH1Y'];
+ _u = _u + ['AH1Z'];
+ _u = _u + ['AH64D'];
+};
+if (_r == 0) then {
+ _u = _u + ['MV22'];
+ _u = _u + ['C130J'];
+ _u = _u + ['F35B'];
+ _u = _u + ['AV8B'];
+ _u = _u + ['AV8B2'];
+ _u = _u + ['A10'];
+};
+
+_u \ No newline at end of file
diff --git a/Common/Config/Core_Units/Vanilla/Units_Airport_CDF.sqf b/Common/Config/Core_Units/Vanilla/Units_Airport_CDF.sqf
new file mode 100644
index 0000000..8734067
--- /dev/null
+++ b/Common/Config/Core_Units/Vanilla/Units_Airport_CDF.sqf
@@ -0,0 +1,11 @@
+Private ['_r','_u'];
+
+_r = 'WFBE_RESTRICTIONADVAIR' Call GetNamespace;
+
+/* CDF Airport Vehicles */
+_u = [];
+if (_r == 0) then {
+ _u = _u + ['Mi24_D'];
+};
+
+_u \ No newline at end of file
diff --git a/Common/Config/Core_Units/Vanilla/Units_Airport_INS.sqf b/Common/Config/Core_Units/Vanilla/Units_Airport_INS.sqf
new file mode 100644
index 0000000..dfcb0e2
--- /dev/null
+++ b/Common/Config/Core_Units/Vanilla/Units_Airport_INS.sqf
@@ -0,0 +1,11 @@
+Private ['_r','_u'];
+
+_r = 'WFBE_RESTRICTIONADVAIR' Call GetNamespace;
+
+/* Insurgent Airport Vehicles */
+_u = [];
+if (_r == 0) then {
+ _u = _u + ['Su25_Ins'];
+};
+
+_u \ No newline at end of file
diff --git a/Common/Config/Core_Units/Vanilla/Units_Airport_RU.sqf b/Common/Config/Core_Units/Vanilla/Units_Airport_RU.sqf
new file mode 100644
index 0000000..5ed7db0
--- /dev/null
+++ b/Common/Config/Core_Units/Vanilla/Units_Airport_RU.sqf
@@ -0,0 +1,13 @@
+Private ['_r','_u'];
+
+_r = 'WFBE_RESTRICTIONADVAIR' Call GetNamespace;
+
+/* RU Airport Vehicles */
+_u = [];
+if (_r == 0) then {
+ _u = _u + ['Su34'];
+ _u = _u + ['Su25_Ins'];
+ _u = _u + ['Su39'];
+};
+
+_u \ No newline at end of file
diff --git a/Common/Config/Core_Units/Vanilla/Units_Airport_USMC.sqf b/Common/Config/Core_Units/Vanilla/Units_Airport_USMC.sqf
new file mode 100644
index 0000000..495e939
--- /dev/null
+++ b/Common/Config/Core_Units/Vanilla/Units_Airport_USMC.sqf
@@ -0,0 +1,16 @@
+Private ['_r','_u'];
+
+_r = 'WFBE_RESTRICTIONADVAIR' Call GetNamespace;
+
+//--- USMC Airport Vehicles.
+_u = [];
+if (_r == 0) then {
+ _u = _u + ['MV22'];
+ _u = _u + ['C130J'];
+ _u = _u + ['F35B'];
+ _u = _u + ['AV8B'];
+ _u = _u + ['AV8B2'];
+ _u = _u + ['A10'];
+};
+
+_u \ No newline at end of file
diff --git a/Common/Config/Core_Units/Vanilla/Units_Barracks_CDF.sqf b/Common/Config/Core_Units/Vanilla/Units_Barracks_CDF.sqf
new file mode 100644
index 0000000..d85f848
--- /dev/null
+++ b/Common/Config/Core_Units/Vanilla/Units_Barracks_CDF.sqf
@@ -0,0 +1,23 @@
+Private ['_u'];
+
+//--- Chernarus Defense Forces Troops.
+_u = ['CDF_Soldier'];
+_u = _u + ['CDF_Soldier_Engineer'];
+_u = _u + ['CDF_Soldier_Light'];
+_u = _u + ['CDF_Soldier_GL'];
+_u = _u + ['CDF_Soldier_Militia'];
+_u = _u + ['CDF_Soldier_Medic'];
+_u = _u + ['CDF_Soldier_Sniper'];
+_u = _u + ['CDF_Soldier_Spotter'];
+_u = _u + ['CDF_Soldier_Marksman'];
+_u = _u + ['CDF_Soldier_RPG'];
+_u = _u + ['CDF_Soldier_Strela'];
+_u = _u + ['CDF_Soldier_AR'];
+_u = _u + ['CDF_Soldier_MG'];
+_u = _u + ['CDF_Soldier_TL'];
+_u = _u + ['CDF_Soldier_Officer'];
+_u = _u + ['CDF_Commander'];
+_u = _u + ['CDF_Soldier_Pilot'];
+_u = _u + ['CDF_Soldier_Crew'];
+
+_u \ No newline at end of file
diff --git a/Common/Config/Core_Units/Vanilla/Units_Barracks_GUE.sqf b/Common/Config/Core_Units/Vanilla/Units_Barracks_GUE.sqf
new file mode 100644
index 0000000..18b6c5b
--- /dev/null
+++ b/Common/Config/Core_Units/Vanilla/Units_Barracks_GUE.sqf
@@ -0,0 +1,26 @@
+Private ['_u'];
+
+/* Guerilla Troops */
+_u = ['GUE_Soldier_1'];
+_u = _u + ['GUE_Soldier_2'];
+_u = _u + ['GUE_Soldier_3'];
+_u = _u + ['GUE_Soldier_GL'];
+_u = _u + ['GUE_Soldier_AT'];
+_u = _u + ['GUE_Soldier_AA'];
+_u = _u + ['GUE_Soldier_AR'];
+_u = _u + ['GUE_Soldier_MG'];
+_u = _u + ['GUE_Soldier_Sniper'];
+_u = _u + ['GUE_Soldier_Medic'];
+_u = _u + ['GUE_Soldier_Crew'];
+_u = _u + ['GUE_Soldier_Pilot'];
+_u = _u + ['GUE_Soldier_Scout'];
+_u = _u + ['GUE_Soldier_Sab'];
+_u = _u + ['GUE_Commander'];
+_u = _u + ['GUE_Worker2'];
+_u = _u + ['GUE_Woodlander3'];
+_u = _u + ['GUE_Villager3'];
+_u = _u + ['GUE_Woodlander2'];
+_u = _u + ['GUE_Woodlander1'];
+_u = _u + ['GUE_Villager4'];
+
+_u \ No newline at end of file
diff --git a/Common/Config/Core_Units/Vanilla/Units_Barracks_INS.sqf b/Common/Config/Core_Units/Vanilla/Units_Barracks_INS.sqf
new file mode 100644
index 0000000..1765046
--- /dev/null
+++ b/Common/Config/Core_Units/Vanilla/Units_Barracks_INS.sqf
@@ -0,0 +1,20 @@
+Private ['_u'];
+
+//--- Insurgent Troops.
+_u = ['Ins_Soldier_1'];
+_u = _u + ['Ins_Soldier_2'];
+_u = _u + ['Ins_Soldier_GL'];
+_u = _u + ['Ins_Soldier_CO'];
+_u = _u + ['Ins_Commander'];
+_u = _u + ['Ins_Soldier_Medic'];
+_u = _u + ['Ins_Soldier_AR'];
+_u = _u + ['Ins_Soldier_MG'];
+_u = _u + ['Ins_Soldier_AT'];
+_u = _u + ['Ins_Soldier_AA'];
+_u = _u + ['Ins_Soldier_Sniper'];
+_u = _u + ['Ins_Soldier_Sapper'];
+_u = _u + ['Ins_Soldier_Sab'];
+_u = _u + ['Ins_Soldier_Pilot'];
+_u = _u + ['Ins_Soldier_Crew'];
+
+_u \ No newline at end of file
diff --git a/Common/Config/Core_Units/Vanilla/Units_Barracks_RU.sqf b/Common/Config/Core_Units/Vanilla/Units_Barracks_RU.sqf
new file mode 100644
index 0000000..eb1be50
--- /dev/null
+++ b/Common/Config/Core_Units/Vanilla/Units_Barracks_RU.sqf
@@ -0,0 +1,35 @@
+Private ['_u'];
+
+//--- Russian Troops.
+_u = ['RU_Soldier'];
+_u = _u + ['RU_Soldier2'];
+_u = _u + ['RU_Soldier_LAT'];
+_u = _u + ['RU_Soldier_AT'];
+_u = _u + ['RU_Soldier_HAT'];
+_u = _u + ['RU_Soldier_AA'];
+_u = _u + ['RU_Soldier_AR'];
+_u = _u + ['RU_Soldier_MG'];
+_u = _u + ['RU_Soldier_GL'];
+_u = _u + ['RU_Soldier_Marksman'];
+_u = _u + ['RU_Soldier_Spotter'];
+_u = _u + ['RU_Soldier_Sniper'];
+_u = _u + ['RU_Soldier_SniperH'];
+_u = _u + ['RU_Soldier_Medic'];
+_u = _u + ['RU_Soldier_TL'];
+_u = _u + ['RU_Soldier_SL'];
+_u = _u + ['RU_Soldier_Crew'];
+_u = _u + ['RU_Soldier_Pilot'];
+_u = _u + ['RUS_Soldier1'];
+_u = _u + ['RUS_Soldier2'];
+_u = _u + ['RUS_Soldier_GL'];
+_u = _u + ['RUS_Soldier_Marksman'];
+_u = _u + ['RUS_Soldier3'];
+_u = _u + ['RUS_Soldier_TL'];
+_u = _u + ['MVD_Soldier_GL'];
+_u = _u + ['MVD_Soldier_MG'];
+_u = _u + ['MVD_Soldier_Marksman'];
+_u = _u + ['MVD_Soldier_AT'];
+_u = _u + ['MVD_Soldier_Sniper'];
+_u = _u + ['MVD_Soldier_TL'];
+
+_u \ No newline at end of file
diff --git a/Common/Config/Core_Units/Vanilla/Units_Barracks_USMC.sqf b/Common/Config/Core_Units/Vanilla/Units_Barracks_USMC.sqf
new file mode 100644
index 0000000..4597ec8
--- /dev/null
+++ b/Common/Config/Core_Units/Vanilla/Units_Barracks_USMC.sqf
@@ -0,0 +1,35 @@
+Private ['_u'];
+
+//--- USMC Troops.
+_u = ['USMC_Soldier'];
+_u = _u + ['USMC_Soldier2'];
+_u = _u + ['USMC_Soldier_LAT'];
+_u = _u + ['USMC_Soldier_AT'];
+_u = _u + ['USMC_Soldier_HAT'];
+_u = _u + ['USMC_Soldier_AA'];
+_u = _u + ['USMC_Soldier_AR'];
+_u = _u + ['USMC_Soldier_MG'];
+_u = _u + ['USMC_Soldier_GL'];
+_u = _u + ['USMC_SoldierS_Sniper'];
+_u = _u + ['USMC_SoldierS_SniperH'];
+_u = _u + ['USMC_SoldierM_Marksman'];
+_u = _u + ['USMC_Soldier_Medic'];
+_u = _u + ['USMC_SoldierS_Engineer'];
+_u = _u + ['USMC_SoldierS'];
+_u = _u + ['USMC_SoldierS_Spotter'];
+_u = _u + ['USMC_Soldier_TL'];
+_u = _u + ['USMC_Soldier_SL'];
+_u = _u + ['USMC_Soldier_Crew'];
+_u = _u + ['USMC_Soldier_Pilot'];
+_u = _u + ['FR_GL'];
+_u = _u + ['FR_Corpsman'];
+_u = _u + ['FR_Assault_R'];
+_u = _u + ['FR_Assault_GL'];
+_u = _u + ['FR_AR'];
+_u = _u + ['FR_TL'];
+_u = _u + ['FR_R'];
+_u = _u + ['FR_Sapper'];
+_u = _u + ['FR_AC'];
+_u = _u + ['FR_Marksman'];
+
+_u \ No newline at end of file
diff --git a/Common/Config/Core_Units/Vanilla/Units_Depot_CDF.sqf b/Common/Config/Core_Units/Vanilla/Units_Depot_CDF.sqf
new file mode 100644
index 0000000..994c144
--- /dev/null
+++ b/Common/Config/Core_Units/Vanilla/Units_Depot_CDF.sqf
@@ -0,0 +1,15 @@
+Private ['_u'];
+
+/* CDF Depot Vehicles */
+_u = ["MMT_Civ"];
+_u = _u + ["TT650_Civ"];
+_u = _u + ["Lada1"];
+_u = _u + ["SkodaBlue"];
+_u = _u + ["car_hatchback"];
+_u = _u + ["datsun1_civil_1_open"];
+_u = _u + ["V3S_Civ"];
+if (paramPurchaseInfDepot) then {
+ _u = _u + ['WFBE_WESTSOLDIER' Call GetNamespace];
+};
+
+_u \ No newline at end of file
diff --git a/Common/Config/Core_Units/Vanilla/Units_Depot_INS.sqf b/Common/Config/Core_Units/Vanilla/Units_Depot_INS.sqf
new file mode 100644
index 0000000..c5f7288
--- /dev/null
+++ b/Common/Config/Core_Units/Vanilla/Units_Depot_INS.sqf
@@ -0,0 +1,15 @@
+Private ['_u'];
+
+/* Insurgent Depot Vehicles */
+_u = ["MMT_Civ"];
+_u = _u + ["TT650_Civ"];
+_u = _u + ["Lada2"];
+_u = _u + ["LadaLM"];
+_u = _u + ["SkodaRed"];
+_u = _u + ["datsun1_civil_2_covered"];
+_u = _u + ["UralCivil"];
+if (paramPurchaseInfDepot) then {
+ _u = _u + ['WFBE_EASTSOLDIER' Call GetNamespace];
+};
+
+_u \ No newline at end of file
diff --git a/Common/Config/Core_Units/Vanilla/Units_Depot_RU.sqf b/Common/Config/Core_Units/Vanilla/Units_Depot_RU.sqf
new file mode 100644
index 0000000..716d071
--- /dev/null
+++ b/Common/Config/Core_Units/Vanilla/Units_Depot_RU.sqf
@@ -0,0 +1,18 @@
+Private ['_u'];
+
+/* Russian Depot Vehicles */
+_u = ["MMT_Civ"];
+_u = _u + ["TT650_Civ"];
+_u = _u + ["Tractor"];
+_u = _u + ["Lada2"];
+_u = _u + ["LadaLM"];
+_u = _u + ["SkodaRed"];
+_u = _u + ["VWGolf"];
+_u = _u + ["datsun1_civil_2_covered"];
+_u = _u + ["hilux1_civil_2_covered"];
+_u = _u + ["UralCivil"];
+if (paramPurchaseInfDepot) then {
+ _u = _u + ['WFBE_EASTSOLDIER' Call GetNamespace];
+};
+
+_u \ No newline at end of file
diff --git a/Common/Config/Core_Units/Vanilla/Units_Depot_USMC.sqf b/Common/Config/Core_Units/Vanilla/Units_Depot_USMC.sqf
new file mode 100644
index 0000000..f5f99d6
--- /dev/null
+++ b/Common/Config/Core_Units/Vanilla/Units_Depot_USMC.sqf
@@ -0,0 +1,19 @@
+Private ['_u'];
+
+//--- USMC Depot Vehicles.
+_u = ["MMT_Civ"];
+_u = _u + ["TT650_Civ"];
+_u = _u + ["Lada1"];
+_u = _u + ["SkodaBlue"];
+_u = _u + ["car_sedan"];
+_u = _u + ["car_hatchback"];
+_u = _u + ["datsun1_civil_1_open"];
+_u = _u + ["datsun1_civil_3_open"];
+_u = _u + ["hilux1_civil_1_open"];
+_u = _u + ["V3S_Civ"];
+_u = _u + ["Ikarus"];
+if (paramPurchaseInfDepot) then {
+ _u = _u + ['WFBE_WESTSOLDIER' Call GetNamespace];
+};
+
+_u \ No newline at end of file
diff --git a/Common/Config/Core_Units/Vanilla/Units_Heavy_CDF.sqf b/Common/Config/Core_Units/Vanilla/Units_Heavy_CDF.sqf
new file mode 100644
index 0000000..b985cee
--- /dev/null
+++ b/Common/Config/Core_Units/Vanilla/Units_Heavy_CDF.sqf
@@ -0,0 +1,9 @@
+Private ['_u'];
+
+/* Chernarus Heavy Vehicles */
+_u = ['BMP2_Ambul_CDF'];
+_u = _u + ['ZSU_CDF'];
+_u = _u + ['BMP2_CDF'];
+_u = _u + ['T72_CDF'];
+
+_u \ No newline at end of file
diff --git a/Common/Config/Core_Units/Vanilla/Units_Heavy_GUE.sqf b/Common/Config/Core_Units/Vanilla/Units_Heavy_GUE.sqf
new file mode 100644
index 0000000..fa5caed
--- /dev/null
+++ b/Common/Config/Core_Units/Vanilla/Units_Heavy_GUE.sqf
@@ -0,0 +1,7 @@
+Private ['_u'];
+
+/* Guerilla Heavy Vehicles */
+_u = ['BMP2_Gue'];
+_u = _u + ['T72_Gue'];
+
+_u \ No newline at end of file
diff --git a/Common/Config/Core_Units/Vanilla/Units_Heavy_INS.sqf b/Common/Config/Core_Units/Vanilla/Units_Heavy_INS.sqf
new file mode 100644
index 0000000..478320c
--- /dev/null
+++ b/Common/Config/Core_Units/Vanilla/Units_Heavy_INS.sqf
@@ -0,0 +1,9 @@
+Private ['_u'];
+
+//--- Insurgent Heavy Vehicles.
+_u = ['BMP2_Ambul_INS'];
+_u = _u + ['ZSU_INS'];
+_u = _u + ['BMP2_INS'];
+_u = _u + ['T72_INS'];
+
+_u \ No newline at end of file
diff --git a/Common/Config/Core_Units/Vanilla/Units_Heavy_RU.sqf b/Common/Config/Core_Units/Vanilla/Units_Heavy_RU.sqf
new file mode 100644
index 0000000..259de6b
--- /dev/null
+++ b/Common/Config/Core_Units/Vanilla/Units_Heavy_RU.sqf
@@ -0,0 +1,11 @@
+Private ['_u'];
+
+//--- Russian Heavy Vehicles.
+_u = ['BMP2_INS'];
+_u = _u + ['BMP3'];
+_u = _u + ['ZSU_INS'];
+_u = _u + ['T72_RU'];
+_u = _u + ['T90'];
+_u = _u + ['2S6M_Tunguska'];
+
+_u \ No newline at end of file
diff --git a/Common/Config/Core_Units/Vanilla/Units_Heavy_USMC.sqf b/Common/Config/Core_Units/Vanilla/Units_Heavy_USMC.sqf
new file mode 100644
index 0000000..bea50ed
--- /dev/null
+++ b/Common/Config/Core_Units/Vanilla/Units_Heavy_USMC.sqf
@@ -0,0 +1,9 @@
+Private ['_u'];
+
+//--- USMC Heavy Vehicles.
+_u = ['AAV'];
+_u = _u + ['M1A1'];
+_u = _u + ['MLRS'];
+_u = _u + ['M1A2_TUSK_MG'];
+
+_u \ No newline at end of file
diff --git a/Common/Config/Core_Units/Vanilla/Units_Light_CDF.sqf b/Common/Config/Core_Units/Vanilla/Units_Light_CDF.sqf
new file mode 100644
index 0000000..6bba7de
--- /dev/null
+++ b/Common/Config/Core_Units/Vanilla/Units_Light_CDF.sqf
@@ -0,0 +1,18 @@
+Private ['_u'];
+
+/* Chernarus Light Vehicles */
+_u = ['UAZ_CDF'];
+_u = _u + ['Ural_CDF'];
+_u = _u + ['WarfareSalvageTruck_CDF'];
+_u = _u + ['UralRepair_CDF'];
+_u = _u + ['UralReammo_CDF'];
+_u = _u + ['UralRefuel_CDF'];
+_u = _u + ['WarfareSupplyTruck_CDF'];
+_u = _u + ['UAZ_MG_CDF'];
+_u = _u + ['UAZ_AGS30_CDF'];
+_u = _u + ['BRDM2_CDF'];
+_u = _u + ['BRDM2_ATGM_CDF'];
+_u = _u + ['Ural_ZU23_CDF'];
+_u = _u + ['GRAD_CDF'];
+
+_u \ No newline at end of file
diff --git a/Common/Config/Core_Units/Vanilla/Units_Light_GUE.sqf b/Common/Config/Core_Units/Vanilla/Units_Light_GUE.sqf
new file mode 100644
index 0000000..d84b89e
--- /dev/null
+++ b/Common/Config/Core_Units/Vanilla/Units_Light_GUE.sqf
@@ -0,0 +1,12 @@
+Private ['_u'];
+
+/* Guerilla Light Vehicles */
+_u = ['TT650_Gue'];
+_u = _u + ['V3S_Gue'];
+_u = _u + ['Pickup_PK_GUE'];
+_u = _u + ['Offroad_DSHKM_Gue'];
+_u = _u + ['Offroad_SPG9_Gue'];
+_u = _u + ['BRDM2_Gue'];
+_u = _u + ['Ural_ZU23_Gue'];
+
+_u \ No newline at end of file
diff --git a/Common/Config/Core_Units/Vanilla/Units_Light_INS.sqf b/Common/Config/Core_Units/Vanilla/Units_Light_INS.sqf
new file mode 100644
index 0000000..009441b
--- /dev/null
+++ b/Common/Config/Core_Units/Vanilla/Units_Light_INS.sqf
@@ -0,0 +1,19 @@
+Private ['_u'];
+
+//--- Insurgent Light Vehicles.
+_u = ['UAZ_INS'];
+_u = _u + ['Ural_INS'];
+_u = _u + ['WarfareSalvageTruck_INS'];
+_u = _u + ['UralRepair_INS'];
+_u = _u + ['UralReammo_INS'];
+_u = _u + ['UralRefuel_INS'];
+_u = _u + ['WarfareSupplyTruck_INS'];
+_u = _u + ['UAZ_MG_INS'];
+_u = _u + ['UAZ_AGS30_INS'];
+_u = _u + ['UAZ_SPG9_INS'];
+_u = _u + ['BRDM2_INS'];
+_u = _u + ['BRDM2_ATGM_INS'];
+_u = _u + ['Ural_ZU23_INS'];
+_u = _u + ['GRAD_INS'];
+
+_u \ No newline at end of file
diff --git a/Common/Config/Core_Units/Vanilla/Units_Light_RU.sqf b/Common/Config/Core_Units/Vanilla/Units_Light_RU.sqf
new file mode 100644
index 0000000..6596f1e
--- /dev/null
+++ b/Common/Config/Core_Units/Vanilla/Units_Light_RU.sqf
@@ -0,0 +1,26 @@
+Private ['_u'];
+
+//--- Russian Light Vehicles.
+_u = ['MMT_Civ'];
+_u = _u + ['TT650_Ins'];
+_u = _u + ['UAZ_RU'];
+_u = _u + ['PBX'];
+_u = _u + ['UAZ_MG_INS'];
+_u = _u + ['UAZ_AGS30_RU'];
+_u = _u + ['UAZ_SPG9_INS'];
+_u = _u + ['Kamaz'];
+_u = _u + ['KamazRepair'];
+_u = _u + ['WarfareReammoTruck_RU'];
+_u = _u + ['KamazRefuel'];
+_u = _u + ['WarfareSalvageTruck_RU'];
+if (('WFBE_SUPPLYSYSTEM' Call GetNamespace) == 0) then {_u = _u + ['WarfareSupplyTruck_RU']};
+_u = _u + ['GAZ_Vodnik_MedEvac'];
+_u = _u + ['BRDM2_INS'];
+_u = _u + ['BRDM2_ATGM_INS'];
+_u = _u + ['GAZ_Vodnik'];
+_u = _u + ['GAZ_Vodnik_HMG'];
+_u = _u + ['Ural_ZU23_INS'];
+_u = _u + ['BTR90'];
+_u = _u + ['GRAD_RU'];
+
+_u \ No newline at end of file
diff --git a/Common/Config/Core_Units/Vanilla/Units_Light_USMC.sqf b/Common/Config/Core_Units/Vanilla/Units_Light_USMC.sqf
new file mode 100644
index 0000000..13133c6
--- /dev/null
+++ b/Common/Config/Core_Units/Vanilla/Units_Light_USMC.sqf
@@ -0,0 +1,24 @@
+Private ['_u'];
+
+//--- USMC Light Vehicles.
+_u = ['MMT_USMC'];
+_u = _u + ['M1030'];
+_u = _u + ['HMMWV'];
+_u = _u + ['Zodiac'];
+_u = _u + ['HMMWV_M2'];
+_u = _u + ['HMMWV_Armored'];
+_u = _u + ['HMMWV_MK19'];
+_u = _u + ['HMMWV_TOW'];
+_u = _u + ['HMMWV_Avenger'];
+_u = _u + ['HMMWV_Ambulance'];
+_u = _u + ['MTVR'];
+_u = _u + ['MtvrRepair'];
+_u = _u + ['WarfareReammoTruck_USMC'];
+_u = _u + ['MtvrRefuel'];
+_u = _u + ['WarfareSalvageTruck_USMC'];
+if (('WFBE_SUPPLYSYSTEM' Call GetNamespace) == 0) then {_u = _u + ['WarfareSupplyTruck_USMC']};
+_u = _u + ['RHIB'];
+_u = _u + ['RHIB2Turret'];
+_u = _u + ['LAV25'];
+
+_u \ No newline at end of file
diff --git a/Common/Config/Core_Units/Vanilla/Units_Special_CDF.sqf b/Common/Config/Core_Units/Vanilla/Units_Special_CDF.sqf
new file mode 100644
index 0000000..e0c42f5
--- /dev/null
+++ b/Common/Config/Core_Units/Vanilla/Units_Special_CDF.sqf
@@ -0,0 +1,70 @@
+//--- Radio Announcer.
+['WFBE_WESTANNOUNCERS',['WFHQ_RU0','WFHQ_RU1','WFHQ_RU2'],true] Call SetNamespace;
+
+//--- Crew model.
+['WFBE_WESTCREW','CDF_Soldier_Crew',true] Call SetNamespace;
+
+//--- Pilot model.
+['WFBE_WESTPILOT','CDF_Soldier_Pilot',true] Call SetNamespace;
+
+//--- Soldier model.
+['WFBE_WESTSOLDIER','CDF_Soldier',true] Call SetNamespace;
+
+//--- Ambulances.
+['WFBE_WESTAMBULANCES',['BMP2_Ambul_CDF'],true] Call SetNamespace;
+
+//--- Repair Trucks.
+['WFBE_WESTREPAIRTRUCKS',['UralRepair_CDF'],true] Call SetNamespace;
+
+//--- Salvage Trucks.
+['WFBE_WESTSALVAGETRUCK',['WarfareSalvageTruck_CDF'],true] Call SetNamespace;
+
+//--- Supply Trucks.
+['WFBE_WESTSUPPLYTRUCKS',['WarfareSupplyTruck_CDF'],true] Call SetNamespace;
+
+//--- UAV.
+['WFBE_WESTUAV','MQ9PredatorB',true] Call SetNamespace;
+
+if (isServer) then {
+ //--- Base Patrols.
+ if (paramBasePatrols) then {
+ ['WFBE_WESTBASEPATROLS_0',['CDF_Soldier_TL','CDF_Soldier','CDF_Soldier','CDF_Soldier_AR','CDF_Soldier_GL','CDF_Soldier_MG'],true] Call SetNamespace;
+ ['WFBE_WESTBASEPATROLS_1',['CDF_Soldier_TL','CDF_Soldier','CDF_Soldier','CDF_Soldier_MG','CDF_Soldier_RPG','CDF_Soldier_Medic'],true] Call SetNamespace;
+ ['WFBE_WESTBASEPATROLS_2',['CDF_Soldier_TL','CDF_Soldier','CDF_Soldier','CDF_Soldier_Marksman','CDF_Soldier_Strela','CDF_Soldier_Sniper'],true] Call SetNamespace;
+ ['WFBE_WESTBASEPATROLS_3',['CDF_Soldier_TL','CDF_Soldier','CDF_Soldier_AR','CDF_Soldier_RPG','CDF_Soldier_RPG','CDF_Soldier_GL'],true] Call SetNamespace;
+ };
+
+ //--- Paratroopers.
+ ['WFBE_WESTPARACHUTELEVEL1',['CDF_Soldier_TL','CDF_Soldier_RPG','CDF_Soldier','CDF_Soldier','CDF_Soldier_AR','CDF_Soldier_Medic'],true] Call SetNamespace;
+ ['WFBE_WESTPARACHUTELEVEL2',['CDF_Soldier_TL','CDF_Soldier_RPG','CDF_Soldier_RPG','CDF_Soldier_RPG','CDF_Soldier_Strela','CDF_Soldier_MG','CDF_Soldier_Medic','CDF_Soldier_Spotter','CDF_Soldier_Sniper'],true] Call SetNamespace;
+ ['WFBE_WESTPARACHUTELEVEL3',['CDF_Soldier_TL','CDF_Soldier_RPG','CDF_Soldier_RPG','CDF_Soldier_RPG','CDF_Soldier_RPG','CDF_Soldier_Strela','CDF_Soldier_Strela','CDF_Soldier','CDF_Soldier_GL','CDF_Soldier_Medic','CDF_Soldier_Sniper','CDF_Soldier','CDF_Soldier_Marksman'],true] Call SetNamespace;
+
+ //--- Paratroopers, Vehicle.
+ ['WFBE_WESTPARACARGO','Mi17_CDF',true] Call SetNamespace;
+
+ //--- Repair Truck model.
+ ['WFBE_WESTREPAIRTRUCK','UralRepair_CDF',true] Call SetNamespace;
+
+ //--- Starting Vehicles.
+ ['WFBE_WESTSTARTINGVEHICLES',['BMP2_Ambul_CDF','Ural_CDF'],true] Call SetNamespace;
+
+ //--- Supply Paradropping, Dropped Ammunition.
+ ['WFBE_WESTPARAAMMO',['RUBasicAmmunitionBox','RUBasicWeaponsBox','RULaunchersBox'],true] Call SetNamespace;
+
+ //--- Supply Paradropping, Dropped Vehicle.
+ ['WFBE_WESTPARAVEHICARGO','BRDM2_CDF',true] Call SetNamespace;
+
+ //--- Supply Paradropping, Vehicle.
+ ['WFBE_WESTPARAVEHI','Mi17_CDF',true] Call SetNamespace;
+
+ //--- Supply Paradropping, Parachute Model.
+ ['WFBE_WESTPARACHUTE','ParachuteMediumWest',true] Call SetNamespace;
+
+ //--- Supply Truck model.
+ ['WFBE_WESTSUPPLYTRUCK','WarfareSupplyTruck_CDF',true] Call SetNamespace;
+};
+
+if (local player) then {
+ //--- Default Faction (Buy Menu), this is the faction name defined in core_xxx.sqf files.
+ ['WFBE_WESTDEFAULTFACTION','CDF',true] Call SetNamespace;
+}; \ No newline at end of file
diff --git a/Common/Config/Core_Units/Vanilla/Units_Special_INS.sqf b/Common/Config/Core_Units/Vanilla/Units_Special_INS.sqf
new file mode 100644
index 0000000..1ac66a9
--- /dev/null
+++ b/Common/Config/Core_Units/Vanilla/Units_Special_INS.sqf
@@ -0,0 +1,70 @@
+//--- Radio Announcer.
+['WFBE_EASTANNOUNCERS',['WFHQ_CZ0','WFHQ_CZ1','WFHQ_CZ2'],true] Call SetNamespace;
+
+//--- Crew model.
+['WFBE_EASTCREW','Ins_Soldier_Crew',true] Call SetNamespace;
+
+//--- Pilot model.
+['WFBE_EASTPILOT','Ins_Soldier_Pilot',true] Call SetNamespace;
+
+//--- Soldier model.
+['WFBE_EASTSOLDIER','Ins_Soldier_1',true] Call SetNamespace;
+
+//--- Ambulances.
+['WFBE_EASTAMBULANCES',['BMP2_Ambul_INS'],true] Call SetNamespace;
+
+//--- Repair Trucks.
+['WFBE_EASTREPAIRTRUCKS',['UralRepair_INS'],true] Call SetNamespace;
+
+//--- Salvage Trucks.
+['WFBE_EASTSALVAGETRUCK',['WarfareSalvageTruck_INS'],true] Call SetNamespace;
+
+//--- Supply Trucks.
+['WFBE_EASTSUPPLYTRUCKS',['WarfareSupplyTruck_INS'],true] Call SetNamespace;
+
+//--- UAV.
+['WFBE_EASTUAV','Pchela1T',true] Call SetNamespace;
+
+if (isServer) then {
+ //--- Base Patrols.
+ if (paramBasePatrols) then {
+ ['WFBE_EASTBASEPATROLS_0',['Ins_Soldier_CO','Ins_Soldier_1','Ins_Soldier_2','Ins_Soldier_AR','Ins_Soldier_GL','Ins_Soldier_MG'],true] Call SetNamespace;
+ ['WFBE_EASTBASEPATROLS_1',['Ins_Soldier_CO','Ins_Soldier_1','Ins_Soldier_2','Ins_Soldier_MG','Ins_Soldier_AT','Ins_Soldier_Medic'],true] Call SetNamespace;
+ ['WFBE_EASTBASEPATROLS_2',['Ins_Soldier_CO','Ins_Soldier_1','Ins_Soldier_2','Ins_Soldier_AT','Ins_Soldier_AA','Ins_Soldier_Sniper'],true] Call SetNamespace;
+ ['WFBE_EASTBASEPATROLS_3',['Ins_Soldier_CO','Ins_Soldier_1','Ins_Soldier_AR','Ins_Soldier_AT','Ins_Soldier_AT','Ins_Soldier_GL'],true] Call SetNamespace;
+ };
+
+ //--- Paratroopers.
+ ['WFBE_EASTPARACHUTELEVEL1',['Ins_Soldier_CO','Ins_Soldier_AT','Ins_Soldier_1','Ins_Soldier_2','Ins_Soldier_AR','Ins_Soldier_Medic'],true] Call SetNamespace;
+ ['WFBE_EASTPARACHUTELEVEL2',['Ins_Soldier_CO','Ins_Soldier_AT','Ins_Soldier_AT','Ins_Soldier_AT','Ins_Soldier_AA','Ins_Soldier_MG','Ins_Soldier_Medic','Ins_Soldier_Sapper','Ins_Soldier_Sniper'],true] Call SetNamespace;
+ ['WFBE_EASTPARACHUTELEVEL3',['Ins_Soldier_CO','Ins_Soldier_AT','Ins_Soldier_AT','Ins_Soldier_AT','Ins_Soldier_AT','Ins_Soldier_Sapper','Ins_Soldier_AA','Ins_Soldier_AA','Ins_Soldier_MG','Ins_Soldier_Sab','Ins_Soldier_Sniper','Ins_Soldier_Sniper'],true] Call SetNamespace;
+
+ //--- Paratroopers, Vehicle.
+ ['WFBE_EASTPARACARGO','Mi17_Ins',true] Call SetNamespace;
+
+ //--- Repair Truck model.
+ ['WFBE_EASTREPAIRTRUCK','UralRepair_INS',true] Call SetNamespace;
+
+ //--- Starting Vehicles.
+ ['WFBE_EASTSTARTINGVEHICLES',['BMP2_Ambul_INS','Ural_INS'],true] Call SetNamespace;
+
+ //--- Supply Paradropping, Dropped Ammunition.
+ ['WFBE_EASTPARAAMMO',['RUBasicAmmunitionBox','RUBasicWeaponsBox','RULaunchersBox'],true] Call SetNamespace;
+
+ //--- Supply Paradropping, Dropped Vehicle.
+ ['WFBE_EASTPARAVEHICARGO','BRDM2_INS',true] Call SetNamespace;
+
+ //--- Supply Paradropping, Vehicle.
+ ['WFBE_EASTPARAVEHI','Mi17_Ins',true] Call SetNamespace;
+
+ //--- Supply Paradropping, Parachute Model.
+ ['WFBE_EASTPARACHUTE','ParachuteMediumEast',true] Call SetNamespace;
+
+ //--- Supply Truck model.
+ ['WFBE_EASTSUPPLYTRUCK','WarfareSupplyTruck_INS',true] Call SetNamespace;
+};
+
+if (local player) then {
+ //--- Default Faction (Buy Menu), this is the faction name defined in core_xxx.sqf files.
+ ['WFBE_EASTDEFAULTFACTION','Insurgents',true] Call SetNamespace;
+}; \ No newline at end of file
diff --git a/Common/Config/Core_Units/Vanilla/Units_Special_RU.sqf b/Common/Config/Core_Units/Vanilla/Units_Special_RU.sqf
new file mode 100644
index 0000000..c0362ba
--- /dev/null
+++ b/Common/Config/Core_Units/Vanilla/Units_Special_RU.sqf
@@ -0,0 +1,70 @@
+//--- Radio Announcer.
+['WFBE_EASTANNOUNCERS',['WFHQ_RU0','WFHQ_RU1','WFHQ_RU2'],true] Call SetNamespace;
+
+//--- Crew model.
+['WFBE_EASTCREW','RU_Soldier_Crew',true] Call SetNamespace;
+
+//--- Pilot model.
+['WFBE_EASTPILOT','RU_Soldier_Pilot',true] Call SetNamespace;
+
+//--- Soldier model.
+['WFBE_EASTSOLDIER','RU_Soldier',true] Call SetNamespace;
+
+//--- Ambulances.
+['WFBE_EASTAMBULANCES',['GAZ_Vodnik_MedEvac'],true] Call SetNamespace;
+
+//--- Repair Trucks.
+['WFBE_EASTREPAIRTRUCKS',['KamazRepair'],true] Call SetNamespace;
+
+//--- Salvage Trucks.
+['WFBE_EASTSALVAGETRUCK',['WarfareSalvageTruck_RU'],true] Call SetNamespace;
+
+//--- Supply Trucks.
+['WFBE_EASTSUPPLYTRUCKS',['WarfareSupplyTruck_RU'],true] Call SetNamespace;
+
+//--- UAV.
+['WFBE_EASTUAV','Pchela1T',true] Call SetNamespace;
+
+if (isServer) then {
+ //--- Base Patrols.
+ if (paramBasePatrols) then {
+ ['WFBE_EASTBASEPATROLS_0',['RU_Soldier_SL','RU_Soldier','RU_Soldier','RU_Soldier_AR','RU_Soldier_GL','RU_Soldier_MG'],true] Call SetNamespace;
+ ['WFBE_EASTBASEPATROLS_1',['RU_Soldier_SL','RU_Soldier','RU_Soldier','RU_Soldier_MG','RU_Soldier_LAT','RU_Soldier_Medic'],true] Call SetNamespace;
+ ['WFBE_EASTBASEPATROLS_2',['RU_Soldier_SL','RU_Soldier','RU_Soldier','RU_Soldier_AT','RU_Soldier_AA','RU_Soldier_Marksman'],true] Call SetNamespace;
+ ['WFBE_EASTBASEPATROLS_3',['RU_Soldier_SL','RU_Soldier','RU_Soldier_AR','RU_Soldier_HAT','RU_Soldier_LAT','RU_Soldier_GL'],true] Call SetNamespace;
+ };
+
+ //--- Paratroopers.
+ ['WFBE_EASTPARACHUTELEVEL1',['RU_Soldier_SL','RU_Soldier_LAT','RU_Soldier','RU_Soldier2','RU_Soldier_AR','RU_Soldier_Medic'],true] Call SetNamespace;
+ ['WFBE_EASTPARACHUTELEVEL2',['RU_Soldier_SL','RU_Soldier_AT','RU_Soldier_AT','RU_Soldier_AT','RU_Soldier_AA','RU_Soldier_MG','RU_Soldier_Medic','RU_Soldier_Marksman','RUS_Soldier_Marksman'],true] Call SetNamespace;
+ ['WFBE_EASTPARACHUTELEVEL3',['MVD_Soldier_TL','RU_Soldier_HAT','RU_Soldier_HAT','RU_Soldier_HAT','RU_Soldier_HAT','RU_Soldier_HAT','RU_Soldier_AA','RU_Soldier_AA','MVD_Soldier_MG','RUS_Commander','MVD_Soldier_Sniper','RUS_Soldier_Marksman'],true] Call SetNamespace;
+
+ //--- Paratroopers, Vehicle.
+ ['WFBE_EASTPARACARGO','Mi17_Ins',true] Call SetNamespace;
+
+ //--- Repair Truck model.
+ ['WFBE_EASTREPAIRTRUCK','KamazRepair',true] Call SetNamespace;
+
+ //--- Starting Vehicles.
+ ['WFBE_EASTSTARTINGVEHICLES',['GAZ_Vodnik_MedEvac','Kamaz'],true] Call SetNamespace;
+
+ //--- Supply Paradropping, Dropped Ammunition.
+ ['WFBE_EASTPARAAMMO',['RUBasicAmmunitionBox','RUBasicWeaponsBox','RULaunchersBox'],true] Call SetNamespace;
+
+ //--- Supply Paradropping, Dropped Vehicle.
+ ['WFBE_EASTPARAVEHICARGO','UAZ_RU',true] Call SetNamespace;
+
+ //--- Supply Paradropping, Vehicle.
+ ['WFBE_EASTPARAVEHI','Mi17_Ins',true] Call SetNamespace;
+
+ //--- Supply Paradropping, Parachute Model.
+ ['WFBE_EASTPARACHUTE','ParachuteMediumEast',true] Call SetNamespace;
+
+ //--- Supply Truck model.
+ ['WFBE_EASTSUPPLYTRUCK','WarfareSupplyTruck_RU',true] Call SetNamespace;
+};
+
+if (local player) then {
+ //--- Default Faction (Buy Menu), this is the faction name defined in core_xxx.sqf files.
+ ['WFBE_EASTDEFAULTFACTION','Russians',true] Call SetNamespace;
+}; \ No newline at end of file
diff --git a/Common/Config/Core_Units/Vanilla/Units_Special_USMC.sqf b/Common/Config/Core_Units/Vanilla/Units_Special_USMC.sqf
new file mode 100644
index 0000000..a5ac193
--- /dev/null
+++ b/Common/Config/Core_Units/Vanilla/Units_Special_USMC.sqf
@@ -0,0 +1,70 @@
+//--- Radio Announcer.
+['WFBE_WESTANNOUNCERS',['WFHQ_EN0','WFHQ_EN1','WFHQ_EN2'],true] Call SetNamespace;
+
+//--- Crew model.
+['WFBE_WESTCREW','USMC_Soldier_Crew',true] Call SetNamespace;
+
+//--- Pilot model.
+['WFBE_WESTPILOT','USMC_Soldier_Pilot',true] Call SetNamespace;
+
+//--- Soldier model.
+['WFBE_WESTSOLDIER','USMC_Soldier',true] Call SetNamespace;
+
+//--- Ambulances.
+['WFBE_WESTAMBULANCES',['HMMWV_Ambulance'],true] Call SetNamespace;
+
+//--- Repair Trucks.
+['WFBE_WESTREPAIRTRUCKS',['MtvrRepair'],true] Call SetNamespace;
+
+//--- Salvage Trucks.
+['WFBE_WESTSALVAGETRUCK',['WarfareSalvageTruck_USMC'],true] Call SetNamespace;
+
+//--- Supply Trucks.
+['WFBE_WESTSUPPLYTRUCKS',['WarfareSupplyTruck_USMC'],true] Call SetNamespace;
+
+//--- UAV.
+['WFBE_WESTUAV','MQ9PredatorB',true] Call SetNamespace;
+
+if (isServer) then {
+ //--- Base Patrols.
+ if (paramBasePatrols) then {
+ ['WFBE_WESTBASEPATROLS_0',['USMC_Soldier_SL','USMC_Soldier','USMC_Soldier','USMC_Soldier_AR','USMC_Soldier_GL','USMC_Soldier_MG'],true] Call SetNamespace;
+ ['WFBE_WESTBASEPATROLS_1',['USMC_Soldier_SL','USMC_Soldier','USMC_Soldier','USMC_Soldier_MG','USMC_Soldier_LAT','USMC_Soldier_Medic'],true] Call SetNamespace;
+ ['WFBE_WESTBASEPATROLS_2',['USMC_Soldier_SL','USMC_Soldier','USMC_Soldier','USMC_Soldier_AT','USMC_Soldier_AA','USMC_SoldierS_Sniper'],true] Call SetNamespace;
+ ['WFBE_WESTBASEPATROLS_3',['USMC_Soldier_SL','USMC_Soldier','USMC_Soldier_AR','USMC_Soldier_HAT','USMC_Soldier_LAT','USMC_Soldier_GL'],true] Call SetNamespace;
+ };
+
+ //--- Paratroopers.
+ ['WFBE_WESTPARACHUTELEVEL1',['USMC_Soldier_SL','USMC_Soldier_LAT','USMC_Soldier','USMC_Soldier2','USMC_Soldier_AR','USMC_Soldier_Medic'],true] Call SetNamespace;
+ ['WFBE_WESTPARACHUTELEVEL2',['USMC_Soldier_SL','USMC_Soldier_AT','USMC_Soldier_AT','USMC_Soldier_AT','USMC_Soldier_AA','USMC_Soldier_MG','USMC_Soldier_Medic','USMC_SoldierS_Spotter','USMC_SoldierS_Sniper'],true] Call SetNamespace;
+ ['WFBE_WESTPARACHUTELEVEL3',['FR_Assault_R','USMC_Soldier_HAT','USMC_Soldier_HAT','USMC_Soldier_HAT','USMC_Soldier_HAT','USMC_Soldier_AA','USMC_Soldier_AA','FR_AR','FR_AC','USMC_Soldier_Medic','FR_Marksman','USMC_Soldier_AT','USMC_SoldierS_Sniper'],true] Call SetNamespace;
+
+ //--- Paratroopers, Vehicle.
+ ['WFBE_WESTPARACARGO','C130J',true] Call SetNamespace;
+
+ //--- Repair Truck model.
+ ['WFBE_WESTREPAIRTRUCK','MtvrRepair',true] Call SetNamespace;
+
+ //--- Starting Vehicles.
+ ['WFBE_WESTSTARTINGVEHICLES',['HMMWV_Ambulance','MTVR'],true] Call SetNamespace;
+
+ //--- Supply Paradropping, Dropped Ammunition.
+ ['WFBE_WESTPARAAMMO',['USBasicAmmunitionBox','USBasicWeaponsBox','USLaunchersBox'],true] Call SetNamespace;
+
+ //--- Supply Paradropping, Dropped Vehicle.
+ ['WFBE_WESTPARAVEHICARGO','HMMWV',true] Call SetNamespace;
+
+ //--- Supply Paradropping, Vehicle.
+ ['WFBE_WESTPARAVEHI','MH60S',true] Call SetNamespace;
+
+ //--- Supply Paradropping, Parachute Model.
+ ['WFBE_WESTPARACHUTE','ParachuteMediumWest',true] Call SetNamespace;
+
+ //--- Supply Truck model.
+ ['WFBE_WESTSUPPLYTRUCK','WarfareSupplyTruck_USMC',true] Call SetNamespace;
+};
+
+if (local player) then {
+ //--- Default Faction (Buy Menu), this is the faction name defined in core_xxx.sqf files.
+ ['WFBE_WESTDEFAULTFACTION','USMC',true] Call SetNamespace;
+}; \ No newline at end of file
diff --git a/Common/Config/readme.txt b/Common/Config/readme.txt
new file mode 100644
index 0000000..b5fdfa5
--- /dev/null
+++ b/Common/Config/readme.txt
@@ -0,0 +1,38 @@
+### CORE SYSTEM GENERAL FACT:
+- Most of the core are defined from Init_Common.sqf
+- All units or weapons used HAVE TO be defined within Core or Core_Gear in order to be used properly.
+- Duplicated items or Wrong classname are not an issue as there is a protection in the core files.
+- arma2.rpt / arma2oa.rpt contains the results of the core system initialization after lauching the game, missing or faulty classes will be shown there.
+
+
+### CORE FOLDERS
+# Core:
+ Contains the Units definitions such as the label, the cost... Any new units shall be defined in this folder.
+
+# Core_Gear:
+ Contains the Loadout definitions such as the label, the cost... Any new weapons or magazine shall be defined in this folder.
+
+# Core_Loadout:
+ Contains the Loadout classname, gear menu weapons are defined there after being delcared in the "Core_Gear" folder.
+
+# Core_Units:
+ Contains the units classname, this folder is used depending on the gamemode to run (Vanilla, Arrowhead...),
+ if you want to add units in a factory, add the units classname here after declaring it in the "Core" folder.
+
+# Core_Squads:
+ This folder contains the AI Units Templates depending on the current running gamemode.
+
+# Core_Resistance:
+ This folder contains the AI Resistance Units templates to use depending on the current running gamemode.
+
+# Core_Occupation:
+ This folder contains the AI Occupation Units templates to use depending on the current running gamemode.
+
+# Core_Structures:
+ This folder contains the Structures used by both players and AI, the defenses are also included here.
+
+# Core_Artillery:
+ Contains the artillery definition per faction.
+
+# Core_Definition:
+ Contains the Team vs Team definition (CDF vs INS, US vs INS...). \ No newline at end of file
diff --git a/Common/Functions/Common_BackpackHasSpace.sqf b/Common/Functions/Common_BackpackHasSpace.sqf
new file mode 100644
index 0000000..7e90dd6
--- /dev/null
+++ b/Common/Functions/Common_BackpackHasSpace.sqf
@@ -0,0 +1,16 @@
+private ["_backpackHasRoom","_bp","_bpContent","_bpItem","_max","_space","_type"];
+_bp = _this select 0;
+_bpContent = _this select 1;
+_bpItem = _this select 2;
+
+_type = _bp;
+if (typeName _bp == 'OBJECT') then {_type = typeOf _bp};
+_max = getNumber(configFile >> 'CfgVehicles' >> _type >> 'transportMaxMagazines');
+
+_space = 0;
+for '_u' from 0 to count(_bpContent select 0)-1 do {
+ _space = _space + (ceil (getNumber(configFile >> 'CfgMagazines' >> ((_bpContent select 0) select _u) >> 'type') / 256)) * ((_bpContent select 1) select _u);
+};
+
+_backpackHasRoom = if ((ceil(getNumber(configFile >> 'CfgMagazines' >> _bpItem >> 'type') / 256)) + _space > _max) then {false} else {true};
+_backpackHasRoom \ No newline at end of file
diff --git a/Common/Functions/Common_BalanceInit.sqf b/Common/Functions/Common_BalanceInit.sqf
new file mode 100644
index 0000000..befed3b
--- /dev/null
+++ b/Common/Functions/Common_BalanceInit.sqf
@@ -0,0 +1,48 @@
+Private ["_unit"];
+_unit = _this select 0;
+
+switch (typeOf _unit) do {
+ case "HMMWV_Avenger": {
+ if (WF_A2_Vanilla) then {
+ _unit removeWeapon "SidewinderLaucher_AH1Z";
+ _unit removeWeapon "StingerLaucher";
+ _unit addMagazine "2Rnd_Sidewinder_AH1Z";
+ _unit addMagazine "2Rnd_Sidewinder_AH1Z";
+ _unit addMagazine "2Rnd_Sidewinder_AH1Z";
+ _unit addMagazine "2Rnd_Sidewinder_AH1Z";
+ _unit addMagazine "2Rnd_Sidewinder_AH1Z";
+ _unit addMagazine "2Rnd_Sidewinder_AH1Z";
+ _unit addMagazine "2Rnd_Sidewinder_AH1Z";
+ _unit addMagazine "2Rnd_Sidewinder_AH1Z";
+ _unit addWeapon "SidewinderLaucher_AH1Z";
+ };
+ };
+ case "M6_EP1": {
+ _unit removeWeapon "StingerLaucher_4x";
+ _unit addMagazine "8Rnd_9M311";
+ _unit addWeapon "9M311Laucher";
+ };
+ case "Ka52": {
+ _unit removeWeapon "AT9Launcher";
+ _unit removeWeapon "VikhrLauncher";
+ _unit addMagazine "4Rnd_AT9_Mi24P";
+ _unit addMagazine "4Rnd_AT9_Mi24P";
+ _unit addweapon "AT9Launcher";
+ _unit addMagazine "4Rnd_R73";
+ _unit addweapon "R73Launcher";
+ };
+ case "Ka52Black": {
+ _unit removeWeapon "AT9Launcher";
+ _unit removeWeapon "VikhrLauncher";
+ _unit addMagazine "4Rnd_AT9_Mi24P";
+ _unit addMagazine "4Rnd_AT9_Mi24P";
+ _unit addweapon "AT9Launcher";
+ _unit addMagazine "4Rnd_R73";
+ _unit addweapon "R73Launcher";
+ };
+ case "An2_TK_EP1": {
+ _unit addMagazine "500Rnd_TwinVickers";
+ _unit addMagazine "500Rnd_TwinVickers";
+ _unit addweapon "TwinVickers";
+ };
+}; \ No newline at end of file
diff --git a/Common/Functions/Common_BuildingInRange.sqf b/Common/Functions/Common_BuildingInRange.sqf
new file mode 100644
index 0000000..49eb893
--- /dev/null
+++ b/Common/Functions/Common_BuildingInRange.sqf
@@ -0,0 +1,17 @@
+Private ['_buildings','_buildingType','_checks','_closest','_range','_side','_sorted','_unit'];
+_buildingType = _this select 0;
+_buildings = _this select 1;
+_range = _this select 2;
+_side = _this select 3;
+_unit = _this select 4;
+
+_closest = objNull;
+
+_checks = [_side,Format ["WFBE_%1%2",str _side,_buildingType] Call GetNamespace,_buildings] Call GetFactories;
+if (count _checks > 0) then {
+ _sorted = [_unit,_checks] Call SortByDistance;
+ _closest = _sorted select 0;
+ if (_unit distance _closest > _range) then {_closest = objNull};
+};
+
+_closest \ No newline at end of file
diff --git a/Common/Functions/Common_ChangeClientFunds.sqf b/Common/Functions/Common_ChangeClientFunds.sqf
new file mode 100644
index 0000000..17d840f
--- /dev/null
+++ b/Common/Functions/Common_ChangeClientFunds.sqf
@@ -0,0 +1,7 @@
+private ["_id","_side","_amount"];
+
+_amount = _this Select 0;
+_side = _this Select 1;
+_id = _this Select 2;
+
+Call Compile Format ["%1Funds%2 = %1Funds%2 + %3; publicVariable '%1Funds%2';",str _side,_id,_amount]; \ No newline at end of file
diff --git a/Common/Functions/Common_ChangeSideSupply.sqf b/Common/Functions/Common_ChangeSideSupply.sqf
new file mode 100644
index 0000000..6bcdc91
--- /dev/null
+++ b/Common/Functions/Common_ChangeSideSupply.sqf
@@ -0,0 +1,11 @@
+Private ['_amount','_change','_currentSupply','_side'];
+
+_side = _this select 0;
+_amount = _this select 1;
+
+_currentSupply = (_side) Call GetSideSupply;
+if (isNil '_currentSupply') then {_currentSupply = 0};
+_change = _currentSupply + _amount;
+if (_change < 0) then {_change = _currentSupply - _amount};
+
+WF_Logic setVariable [Format["%1Supplies",_side],_change,true]; \ No newline at end of file
diff --git a/Common/Functions/Common_ChangeTeamFunds.sqf b/Common/Functions/Common_ChangeTeamFunds.sqf
new file mode 100644
index 0000000..f0d8ef0
--- /dev/null
+++ b/Common/Functions/Common_ChangeTeamFunds.sqf
@@ -0,0 +1,8 @@
+Private['_amount','_team'];
+
+_team = _this select 0;
+_amount = _this select 1;
+
+if (isNull _team) exitWith {};
+
+Call Compile Format ["%1Funds = %1Funds + _amount; publicVariable '%1Funds';",_team getVariable 'identification']; \ No newline at end of file
diff --git a/Common/Functions/Common_CivilianKilled.sqf b/Common/Functions/Common_CivilianKilled.sqf
new file mode 100644
index 0000000..3086451
--- /dev/null
+++ b/Common/Functions/Common_CivilianKilled.sqf
@@ -0,0 +1,29 @@
+Private ["_killed","_killer","_killerTeam","_sideKiller"];
+_killed = _this select 0;
+_killer = _this select 1;
+_sideKiller = side _killer;
+_killerTeam = group _killer;
+
+//--- Renegade.
+if (_sideKiller == sideEnemy) then {
+ if (_killer isKindOf westSoldierBaseClass) then {_sideKiller = west};
+ if (_killer isKindOf eastSoldierBaseClass) then {_sideKiller = east};
+};
+
+//--- Benny's Garbage Collector.
+if (WF_A2_Vanilla) then {
+ trashQueu = trashQueu + [_killed];
+ _killed Spawn TrashObject;
+};
+
+sleep random(2)+random(4);
+
+//--- Civilian's death.
+if (!isNull _killerTeam && (_sideKiller == west) || (_sideKiller == east)) then {
+ if (isPlayer (leader _killerTeam)) then {
+ /* Penalty */
+ WFBE_Penalty = [vehicleVarName (leader _killerTeam),'CLTFNCPENALTY'];
+ publicVariable 'WFBE_Penalty';
+ if (isHostedServer) then {[vehicleVarName (leader _killerTeam),'CLTFNCPENALTY'] Spawn HandlePVF};
+ };
+}; \ No newline at end of file
diff --git a/Common/Functions/Common_CreateUnit.sqf b/Common/Functions/Common_CreateUnit.sqf
new file mode 100644
index 0000000..8a42df6
--- /dev/null
+++ b/Common/Functions/Common_CreateUnit.sqf
@@ -0,0 +1,28 @@
+Private ["_get","_position","_side","_skill","_team","_type","_unit"];
+_type = _this select 0;
+_team = _this select 1;
+_position = _this select 2;
+_side = _this select 3;
+
+_get = _type Call GetNamespace;
+_skill = if !(isNil '_get') then {_get select QUERYUNITSKILL} else {'WFBE_AISKILL' Call GetNamespace};
+_unit = _team createUnit [_type,_position,[],0,"FORM"];
+_unit setSkill _skill;
+if (_side != resistance) then {
+ if (paramTrackAI) then {
+ _unit setVehicleInit Format["[this,%1] ExecVM 'Common\Common_InitUnit.sqf';",_side];
+ processInitCommands;
+ } else {
+ if (isPlayer leader _team) then {[_unit,_side] ExecVM 'Common\Common_InitUnit.sqf'};
+ };
+ Call Compile Format ["_unit addEventHandler ['Killed',{[_this select 0,_this select 1,%1] Spawn UnitKilled}];",_side];
+} else {
+ //--- Note To be optimized, 1.03 BIS BUG, cannot add resistance side via call compile format.
+ _unit addEventHandler ['Killed',{[_this select 0,_this select 1,resistance] Spawn UnitKilled}];
+};
+
+if (('WFBE_ISIS' Call GetNamespace) == 2) then {_unit addEventHandler['handleDamage',{_this Call ISIS_Wound}]};
+
+diag_log Format["[WFBE (INFORMATION)][frameno:%5 | ticktime:%6] Common_CreateUnit: A '%1' unit was created (position: %2) and has joined the %3 %4 Team",_type,_position,str _side,_team,diag_frameno,diag_tickTime];
+
+_unit \ No newline at end of file
diff --git a/Common/Functions/Common_CreateVehicle.sqf b/Common/Functions/Common_CreateVehicle.sqf
new file mode 100644
index 0000000..b110416
--- /dev/null
+++ b/Common/Functions/Common_CreateVehicle.sqf
@@ -0,0 +1,20 @@
+Private ["_lock","_position","_side","_type","_vehicle"];
+_type = _this select 0;
+_position = _this select 1;
+_side = _this select 2;
+_lock = _this select 3;
+
+_vehicle = _type createVehicle _position;
+if (_side != resistance) then {
+ _vehicle SetVehicleInit Format["[this,%1] ExecVM 'Common\Common_InitUnit.sqf';",_side];
+ ProcessInitCommands;
+ Call Compile Format ["_vehicle addEventHandler ['Killed',{[_this select 0,_this select 1,%1] Spawn UnitKilled}]",_side];
+} else {
+ //--- Note To be optimized, 1.03 BIS BUG, cannot add resistance side via call compile format? which still isn't fixed in OA 1.59...
+ _vehicle addEventHandler ["Killed",{[_this select 0,_this select 1,resistance] Spawn UnitKilled}];
+};
+_vehicle lock _lock;
+
+diag_log Format["[WFBE (INFORMATION)][frameno:%4 | ticktime:%5] Common_CreateVehicle: A %1 '%2' vehicle has been created (position: %3)",str _side,_type,_position,diag_frameno,diag_tickTime];
+
+_vehicle \ No newline at end of file
diff --git a/Common/Functions/Common_EquipArtillery.sqf b/Common/Functions/Common_EquipArtillery.sqf
new file mode 100644
index 0000000..fc1d315
--- /dev/null
+++ b/Common/Functions/Common_EquipArtillery.sqf
@@ -0,0 +1,19 @@
+Private ['_ammo','_currentUpgrades','_extMagUpgr','_i','_index','_side','_unit'];
+_unit = _this select 0;
+_index = _this select 1;
+_side = _this select 2;
+
+//--- Browse for extended Mags (WP, SADARM... )
+_ammo = (Format['WFBE_%1_ARTILLERY_EXTENDED_MAGS',_side] Call GetNamespace) select _index;
+if (count _ammo == 0) exitWith {};
+
+_extMagUpgr = Format['WFBE_%1_ARTILLERY_EXTENDED_MAGS_UPGRD',_side] Call GetNamespace;
+
+//--- Retrieve the Artillery upgrade level.
+_currentUpgrades = ((str _side) Call GetSideUpgrades) select 17;
+
+for [{_i = 0},{_i < count(_ammo)},{_i = _i + 1}] do {
+ if (_currentUpgrades >= ((_extMagUpgr select _index) select _i)) then {
+ _unit addMagazine (_ammo select _i);
+ };
+}; \ No newline at end of file
diff --git a/Common/Functions/Common_EquipBackpack.sqf b/Common/Functions/Common_EquipBackpack.sqf
new file mode 100644
index 0000000..27293ef
--- /dev/null
+++ b/Common/Functions/Common_EquipBackpack.sqf
@@ -0,0 +1,9 @@
+private ["_bp","_bpItems"];
+_bp = _this select 0;
+_bpItems = _this select 1;
+
+clearMagazineCargo _bp;
+
+for '_u' from 0 to count(_bpItems select 0)-1 do {
+ _bp addMagazineCargo [(_bpItems select 0) select _u, (_bpItems select 1) select _u];
+}; \ No newline at end of file
diff --git a/Common/Functions/Common_EquipLoadout.sqf b/Common/Functions/Common_EquipLoadout.sqf
new file mode 100644
index 0000000..d14b136
--- /dev/null
+++ b/Common/Functions/Common_EquipLoadout.sqf
@@ -0,0 +1,26 @@
+Private['_ammo','_unit','_use','_weapon','_weapons'];
+
+_unit = _this select 0;
+_weapons = _this select 1;
+_ammo = _this select 2;
+
+removeAllWeapons _unit;
+removeAllItems _unit;
+
+{_unit addMagazine _x} forEach _ammo;
+{_unit addWeapon _x} forEach _weapons;
+
+_use = primaryWeapon _unit;
+if (_use == "") then {
+ Private ["_kind"];
+ {
+ _kind = getNumber(configFile >> 'CfgWeapons' >> _x >> "type");
+ if (_kind in [1,2,4,5]) exitWith {_use = _x};
+ } forEach _weapons;
+};
+
+if (_use != "") then {
+ Private ["_muzzles"];
+ _muzzles = getArray (configFile >> "CfgWeapons" >> _use >> "muzzles");
+ if !("this" in _muzzles) then {_unit selectWeapon (_muzzles select 0)} else {_unit selectWeapon _use};
+}; \ No newline at end of file
diff --git a/Common/Functions/Common_FireArtillery.sqf b/Common/Functions/Common_FireArtillery.sqf
new file mode 100644
index 0000000..87a8367
--- /dev/null
+++ b/Common/Functions/Common_FireArtillery.sqf
@@ -0,0 +1,65 @@
+Private["_ammo","_angle","_artillery","_burst","_destination","_dispersion","_direction","_distance","_FEH","_gunner","_i","_index","_minRange","_maxRange","_position","_radius","_reloadTime","_side","_type","_velocity","_watchPosition","_weapon","_xcoord","_ycoord"];
+
+_artillery = _this select 0;
+_destination = _this select 1;
+_side = _this select 2;
+_radius = _this select 3;
+_index = _this select 4;
+
+_gunner = gunner _artillery;
+if (_index == -1) exitWith {diag_log Format ["[WFBE (INFORMATION)][frameno:%2 | ticktime:%3] Common_FireArtillery.sqf: No artillery types were found for '%1'.",_artillery,diag_frameno,diag_tickTime]};
+if (isNull _gunner) exitWith {diag_log Format ["[WFBE (INFORMATION)][frameno:%2 | ticktime:%3] Common_FireArtillery.sqf: Artillery '%1' gunner is null.",_artillery,diag_frameno,diag_tickTime]};
+if (isPlayer _gunner) exitWith {diag_log Format ["[WFBE (INFORMATION)][frameno:%2 | ticktime:%3] Common_FireArtillery.sqf: Artillery '%1' gunner is player.",_artillery,diag_frameno,diag_tickTime]};
+
+_minRange = (Format ["WFBE_%1_ARTILLERY_MINRANGES",_side] Call GetNamespace) select _index;
+_maxRange = (Format ["WFBE_%1_ARTILLERY_MAXRANGES",_side] Call GetNamespace) select _index;
+_weapon = (Format ["WFBE_%1_ARTILLERY_WEAPONS",_side] Call GetNamespace) select _index;
+_ammo = (Format ["WFBE_%1_ARTILLERY_AMMOS",_side] Call GetNamespace) select _index;
+_velocity = (Format ["WFBE_%1_ARTILLERY_VELOCITIES",_side] Call GetNamespace) select _index;
+_dispersion = (Format ["WFBE_%1_ARTILLERY_DISPERSIONS",_side] Call GetNamespace) select _index;
+
+//--- Move function to global later on.
+if (local player) then {[_artillery] Call ARTY_Prep};
+
+//--- Artillery Calculations.
+_position = getPos _artillery;
+_xcoord = (_destination select 0) - (_position select 0);
+_ycoord = (_destination select 1) - (_position select 1);
+_direction = -(((_ycoord atan2 _xcoord) + 270) % 360);
+if (_direction < 0) then {_direction = _direction + 360};
+_distance = sqrt (((_xcoord ^ 2) + (_ycoord ^ 2))) - _minRange;
+_angle = _distance / (_maxRange - _minRange) * 100 + 15;
+if (_angle > 70) then {_angle = 70};
+if (_distance < 0 || _distance + _minRange > _maxRange) exitWith {};
+
+_FEH = Call Compile Format ["_artillery addEventHandler ['Fired',{[_this select 4,_this select 6,%1,%2,%3,%4,%5,%6,%7,%8,%9] Spawn HandleArtillery}];",_ammo,_destination,_velocity,_dispersion,getPos _artillery,_distance,_radius,_maxRange,sideJoinedText];
+
+{_gunner disableAI _x} forEach ['ANIM','MOVE','TARGET','AUTOTARGET'];
+_watchPosition = [_destination select 0, _destination select 1, (_artillery distance _destination)/(tan(90-_angle))];
+(_gunner) doWatch _watchPosition;
+
+sleep 10;
+if !(alive (_gunner)) exitWith {if !(isNull _artillery) then {_artillery removeEventHandler ['Fired',_FEH]}};
+if !(alive _artillery) exitWith {
+ if (alive (_gunner)) then {{_gunner enableAI _x} forEach ['ANIM','MOVE','TARGET','AUTOTARGET']};
+};
+
+_reloadTime = (Format ["WFBE_%1_ARTILLERY_RELOADTIME",_side] Call GetNamespace) select _index;
+_burst = (Format ["WFBE_%1_ARTILLERY_BURST",_side] Call GetNamespace) select _index;
+
+for [{_i = 0},{_i < _burst},{_i = _i + 1}] do {
+ sleep _reloadTime;
+ if (!alive (_gunner) || !alive _artillery) exitWith {};
+
+ _artillery fire _weapon;
+};
+
+sleep 1;
+
+if !(isNull _artillery) then {_artillery removeEventHandler ['Fired',_FEH]};
+
+sleep _reloadTime;
+
+if (alive (_gunner)) then {{_gunner enableAI _x} forEach ['ANIM','MOVE','TARGET','AUTOTARGET']};
+
+if (local player) then {[_artillery] Call ARTY_Finish}; \ No newline at end of file
diff --git a/Common/Functions/Common_GetAIDigit.sqf b/Common/Functions/Common_GetAIDigit.sqf
new file mode 100644
index 0000000..935b372
--- /dev/null
+++ b/Common/Functions/Common_GetAIDigit.sqf
@@ -0,0 +1,21 @@
+Private ["_i","_split","_unit","_yield"];
+
+_unit = _this;
+
+if (_unit == leader (group _unit)) exitWith {"Leader"};
+
+_split = toArray(str _unit);
+
+_find = _split find 58;
+_yield = [];
+
+if (_find != -1) then {
+ for '_i' from (_find+1) to count(_split)-1 do {
+ if ((_split select _i) == 65 || (_split select _i) == 32) exitWith {};
+ _yield = _yield + [_split select _i];
+ };
+};
+
+if (count _yield == 0) exitWith {"0"};
+
+toString(_yield) \ No newline at end of file
diff --git a/Common/Functions/Common_GetClientID.sqf b/Common/Functions/Common_GetClientID.sqf
new file mode 100644
index 0000000..54fc0c3
--- /dev/null
+++ b/Common/Functions/Common_GetClientID.sqf
@@ -0,0 +1,6 @@
+Private["_index"];
+
+_index = ('WFBE_EASTSLOTNAMES' Call GetNamespace) find (vehicleVarName _this);
+if (_index < 0) then {_index = ('WFBE_WESTSLOTNAMES' Call GetNamespace) find (vehicleVarName _this)};
+
+_index + 1 \ No newline at end of file
diff --git a/Common/Functions/Common_GetClientIDFromTeam.sqf b/Common/Functions/Common_GetClientIDFromTeam.sqf
new file mode 100644
index 0000000..dd732a7
--- /dev/null
+++ b/Common/Functions/Common_GetClientIDFromTeam.sqf
@@ -0,0 +1,11 @@
+Private ['_index','_team'];
+
+_team = _this;
+
+if (isNil '_team') exitWith {0};
+if (isNull _team) exitWith {0};
+
+_index = (Format["WFBE_%1TEAMS",str (side _team)] Call GetNamespace) find _team;
+if (_index < 0) exitWith {0};
+
+_index+1 \ No newline at end of file
diff --git a/Common/Functions/Common_GetClientTeam.sqf b/Common/Functions/Common_GetClientTeam.sqf
new file mode 100644
index 0000000..3212017
--- /dev/null
+++ b/Common/Functions/Common_GetClientTeam.sqf
@@ -0,0 +1,7 @@
+Private["_ID","_side","_team"];
+
+_side = _this Select 0;
+_ID = _this Select 1;
+
+_team = ((Format["WFBE_%1TEAMS",str _side]) Call GetNamespace) select (_ID - 1);
+_team \ No newline at end of file
diff --git a/Common/Functions/Common_GetClosestLocation.sqf b/Common/Functions/Common_GetClosestLocation.sqf
new file mode 100644
index 0000000..63b6c59
--- /dev/null
+++ b/Common/Functions/Common_GetClosestLocation.sqf
@@ -0,0 +1,5 @@
+Private["_object"];
+
+_object = _this select 0;
+
+([_object,towns] Call SortByDistance) select 0; \ No newline at end of file
diff --git a/Common/Functions/Common_GetClosestLocationBySide.sqf b/Common/Functions/Common_GetClosestLocationBySide.sqf
new file mode 100644
index 0000000..ec76f29
--- /dev/null
+++ b/Common/Functions/Common_GetClosestLocationBySide.sqf
@@ -0,0 +1,21 @@
+Private["_enemyTowns","_object","_nearest","_side"];
+
+_object = _this select 0;
+_side = _this select 1;
+_cvar = if (count _this > 2) then {_this select 2} else {""};
+
+_enemyTowns = towns - ((_side) Call GetSideTowns);
+_nearest = objNull;
+
+if (count _enemyTowns > 0) then {
+ _nearests = [_object,_enemyTowns] Call SortByDistance;
+ if (_cvar != "") then {
+ for '_i' from 0 to count(_nearests)-1 do {
+ if ((_nearests select _i) getVariable _cvar) exitWith{_nearest = (_nearests select _i)};
+ };
+ } else {
+ _nearest = _nearests select 0;
+ }
+};
+
+_nearest \ No newline at end of file
diff --git a/Common/Functions/Common_GetCommanderFromVotes.sqf b/Common/Functions/Common_GetCommanderFromVotes.sqf
new file mode 100644
index 0000000..c0210f6
--- /dev/null
+++ b/Common/Functions/Common_GetCommanderFromVotes.sqf
@@ -0,0 +1,36 @@
+Private["_AI","_commander","_count","_highest","_highestTeam","_side","_teams","_tie","_total","_vote","_votes"];
+
+_side = _this Select 0;
+
+_AI = 0;
+_teams = (Format["WFBE_%1TEAMS",str _side] Call GetNamespace);
+_total = Count _teams;
+
+_votes = [];
+for [{_count = 0},{_count < _total},{_count = _count + 1}] do {_votes = _votes + [0]};
+
+//Count votes.
+for [{_count = 0},{_count < _total},{_count = _count + 1}] do {
+ if (isPlayer (leader (_teams Select _count))) then {
+ _vote = Call Compile Format ["%1Team%2Vote",Str _side,_count + 1];
+ if (_vote != -1) then {
+ _votes Set[_vote,(_votes Select _vote) + 1];
+ } else {
+ _AI = _AI + 1;
+ };
+ };
+};
+
+_count = 0;
+_highest = 0;
+_highestTeam = -1;
+_tie = false;
+{if (_x == _highest && _x > 0) then {_tie = true};if (_x > _highest) then {_highestTeam = _count;_highest = _x;_tie = false};_count = _count + 1} ForEach _votes;
+
+_commander = ObjNull;
+
+if (!_tie && _highest > _AI && _highestTeam != -1) then {
+ _commander = _teams select _highestTeam;
+};
+
+_commander \ No newline at end of file
diff --git a/Common/Functions/Common_GetCommanderTeam.sqf b/Common/Functions/Common_GetCommanderTeam.sqf
new file mode 100644
index 0000000..7de4fec
--- /dev/null
+++ b/Common/Functions/Common_GetCommanderTeam.sqf
@@ -0,0 +1,7 @@
+Private ["_cmdrTeam","_side"];
+_side = _this;
+
+_cmdrTeam = WF_Logic getVariable Format ["%1CommanderTeam",str _side];
+if (isNil "_cmdrTeam") then {_cmdrTeam = objNull};
+
+_cmdrTeam \ No newline at end of file
diff --git a/Common/Functions/Common_GetCommanderVotes.sqf b/Common/Functions/Common_GetCommanderVotes.sqf
new file mode 100644
index 0000000..054f363
--- /dev/null
+++ b/Common/Functions/Common_GetCommanderVotes.sqf
@@ -0,0 +1,19 @@
+Private["_count","_side","_teams","_total","_vote","_votes"];
+
+_side = _this Select 0;
+
+_teams = (Format["WFBE_%1TEAMS",str _side] Call GetNamespace);
+_total = Count _teams + 1;
+
+_votes = [];
+for [{_count = 0},{_count < _total},{_count = _count + 1}] do {_votes = _votes + [0]};
+
+//Count votes.
+for [{_count = 1},{_count < _total},{_count = _count + 1}] do {
+ if (isPlayer (leader (_teams Select (_count - 1)))) then {
+ _vote = (Call Compile Format ["%1Team%2Vote",Str _side,_count]) + 1;
+ _votes Set[_vote,(_votes Select _vote) + 1];
+ };
+};
+
+_votes
diff --git a/Common/Functions/Common_GetConfigInfo.sqf b/Common/Functions/Common_GetConfigInfo.sqf
new file mode 100644
index 0000000..ce83cad
--- /dev/null
+++ b/Common/Functions/Common_GetConfigInfo.sqf
@@ -0,0 +1,8 @@
+Private ['_element','_from','_object'];
+_object = _this select 0;
+_element = _this select 1;
+_from = if (count _this > 2) then {_this select 2} else {'CfgVehicles'};
+
+if (typeName _object == 'OBJECT') then {_object = typeOf(_object)};
+
+getText (configFile >> _from >> _object >> _element) \ No newline at end of file
diff --git a/Common/Functions/Common_GetConfigVehicleCrewSlot.sqf b/Common/Functions/Common_GetConfigVehicleCrewSlot.sqf
new file mode 100644
index 0000000..6039ff7
--- /dev/null
+++ b/Common/Functions/Common_GetConfigVehicleCrewSlot.sqf
@@ -0,0 +1,21 @@
+/* Adapted from BIS turret's function. */
+private ['_entry','_turrestcount','_turrets'];
+_entry = configFile >> 'CfgVehicles' >> _this >> 'Turrets';
+
+vhasCommander = false;
+vhasGunner = false;
+_turrets = [_entry] Call Compile preprocessFile "Common\Functions\Common_GetConfigVehicleTurretsReturn.sqf";
+
+tmp_overall = [];
+
+if (count _turrets > 0) then {
+ [_turrets, []] Call Compile preprocessFile "Common\Functions\Common_GetConfigVehicleTurrets.sqf";
+};
+
+_turrestcount = count(tmp_overall);
+if (vhasGunner) then {_turrestcount = _turrestcount - 1};
+if (vhasCommander) then {_turrestcount = _turrestcount - 1};
+
+// diag_log format ["%1 %2",_entry,tmp_overall];
+
+[[vhasCommander,vhasGunner,count(tmp_overall)+1,_turrestcount], tmp_overall] \ No newline at end of file
diff --git a/Common/Functions/Common_GetConfigVehicleTurrets.sqf b/Common/Functions/Common_GetConfigVehicleTurrets.sqf
new file mode 100644
index 0000000..f060f7a
--- /dev/null
+++ b/Common/Functions/Common_GetConfigVehicleTurrets.sqf
@@ -0,0 +1,16 @@
+private ["_turrets", "_i", "_path"];
+_turrets = _this select 0;
+_path = _this select 1;
+_i = 0;
+
+while {_i < (count _turrets)} do {
+ private ["_turretIndex", "_thisTurret"];
+ _turretIndex = _turrets select _i;
+ _thisTurret = _path + [_turretIndex];
+
+ tmp_overall = tmp_overall + [_thisTurret];
+
+ [([_turrets select (_i + 1), _thisTurret] Call Compile preprocessFile "Common\Functions\Common_GetConfigVehicleTurrets.sqf")];
+
+ _i = _i + 2;
+}; \ No newline at end of file
diff --git a/Common/Functions/Common_GetConfigVehicleTurretsReturn.sqf b/Common/Functions/Common_GetConfigVehicleTurretsReturn.sqf
new file mode 100644
index 0000000..c0901d5
--- /dev/null
+++ b/Common/Functions/Common_GetConfigVehicleTurretsReturn.sqf
@@ -0,0 +1,54 @@
+if ((count _this) < 1) exitWith {debugLog "Log: [returnVehicleTurrets] Function requires at least 1 parameter!"; []};
+
+private ["_entry"];
+_entry = _this select 0;
+
+//Validate parameters
+if ((typeName _entry) != (typeName configFile)) exitWith {debugLog "Log: [returnVehicleTurrets] Entry (0) must be a Config!"; []};
+
+private ["_turrets", "_turretIndex"];
+_turrets = [];
+_turretIndex = 0;
+
+//Explore all turrets and sub-turrets recursively.
+for "_i" from 0 to ((count _entry) - 1) do
+{
+ private ["_subEntry"];
+ _subEntry = _entry select _i;
+
+ if (isClass _subEntry) then
+ {
+ private ["_hasGunner","_isset","_pcom","_pgun"];
+ _hasGunner = [_subEntry, "hasGunner"] Call BIS_fnc_returnConfigEntry;
+
+ _pgun = [_subEntry, "primaryGunner"] Call BIS_fnc_returnConfigEntry;
+ _pcom = [_subEntry, "primaryObserver"] Call BIS_fnc_returnConfigEntry;
+
+ _isset = false;
+ if (_pgun == 1 && !vhasGunner) then {vhasGunner = true;_isset = true};
+ if (_pcom == 1 && !vhasCommander && !_isset) then {vhasCommander = true};
+
+ //Make sure the entry was found.
+ if !(isNil "_hasGunner") then
+ {
+ if (_hasGunner == 1) then
+ {
+ _turrets = _turrets + [_turretIndex];
+
+ //Include sub-turrets, if present.
+ if (isClass (_subEntry >> "Turrets")) then
+ {
+ _turrets = _turrets + [[_subEntry >> "Turrets"] Call Compile preprocessFile "Common\Functions\Common_GetConfigVehicleTurretsReturn.sqf"];
+ }
+ else
+ {
+ _turrets = _turrets + [[]];
+ };
+ };
+ };
+
+ _turretIndex = _turretIndex + 1;
+ };
+};
+
+_turrets \ No newline at end of file
diff --git a/Common/Functions/Common_GetFactories.sqf b/Common/Functions/Common_GetFactories.sqf
new file mode 100644
index 0000000..39c7ffc
--- /dev/null
+++ b/Common/Functions/Common_GetFactories.sqf
@@ -0,0 +1,10 @@
+Private ["_buildings","_kind","_list","_side","_type"];
+_side = _this select 0;
+_kind = _this select 1;
+_buildings = _this select 2;
+
+_list = [];
+_type = (Format["WFBE_%1STRUCTURENAMES",str _side] Call GetNamespace) select _kind;
+{if (typeOf _x == _type && alive _x) then {_list = _list + [_x]}} forEach _buildings;
+
+_list \ No newline at end of file
diff --git a/Common/Functions/Common_GetFriendlyCamps.sqf b/Common/Functions/Common_GetFriendlyCamps.sqf
new file mode 100644
index 0000000..cebe329
--- /dev/null
+++ b/Common/Functions/Common_GetFriendlyCamps.sqf
@@ -0,0 +1,14 @@
+private ["_camps","_friendlyCamps","_side","_sideID","_town"];
+
+_town = _this Select 0;
+_side = _this Select 1;
+
+_sideID = _side Call GetSideID;
+_camps = _town getVariable "camps";
+_friendlyCamps = [];
+
+{
+ if ((_x getVariable "sideID") == _sideID) then {_friendlyCamps = _friendlyCamps + [_x]};
+} forEach _camps;
+
+_friendlyCamps \ No newline at end of file
diff --git a/Common/Functions/Common_GetGroupFromConfig.sqf b/Common/Functions/Common_GetGroupFromConfig.sqf
new file mode 100644
index 0000000..5427057
--- /dev/null
+++ b/Common/Functions/Common_GetGroupFromConfig.sqf
@@ -0,0 +1,23 @@
+Private ['_config','_faction','_group','_kind','_side','_type'];
+_side = _this select 0;
+_faction = _this select 1;
+_kind = _this select 2;
+_type = _this select 3;
+
+_config = configFile >> "CfgGroups" >> _side >> _faction >> _kind >> _type;
+_group = [];
+
+if (isClass _config) then {
+ for "_j" from 0 to ((count _config) - 1) do {
+ private ["_mclass"];
+ _mclass = _config select _j;
+
+ if (isClass (_mclass)) then {
+ _group = _group + [getText(_mclass >> "vehicle")];
+ };
+ };
+} else {
+ diag_log Format ["[WFBE (ERROR)][frameno:%1 | ticktime:%2] Common_GetGroupFromConfig: Entry (configFile >> 'CfgGroups' >> '%3' >> '%4' >> '%5' >> '%6') is not a valid group config.",diag_frameno,diag_tickTime,_side,_faction,_kind,_type];
+};
+
+_group \ No newline at end of file
diff --git a/Common/Functions/Common_GetHostilesInArea.sqf b/Common/Functions/Common_GetHostilesInArea.sqf
new file mode 100644
index 0000000..eef2647
--- /dev/null
+++ b/Common/Functions/Common_GetHostilesInArea.sqf
@@ -0,0 +1,18 @@
+Private ['_hostiles','_object','_objects','_safeFromSide','_within'];
+_object = _this select 0;
+_safeFromSide = _this select 1;
+_within = if (count _this > 2) then {_this select 2} else {50};
+
+_objects = _object nearEntities[[eastSoldierBaseClass,westSoldierBaseClass,resistanceSoldierBaseClass,"Car","Motorcycle","Tank","Air"],_within];
+_hostiles = 0;
+
+if (typeName _safeFromSide == 'ARRAY') then {
+ {
+ _hostiles = _hostiles + (_x countSide _objects);
+ } forEach _safeFromSide;
+};
+if (typeName _safeFromSide == 'SIDE') then {
+ _hostiles = _hostiles + (_safeFromSide countSide _objects);
+};
+
+_hostiles \ No newline at end of file
diff --git a/Common/Functions/Common_GetLiveUnits.sqf b/Common/Functions/Common_GetLiveUnits.sqf
new file mode 100644
index 0000000..5909c82
--- /dev/null
+++ b/Common/Functions/Common_GetLiveUnits.sqf
@@ -0,0 +1,8 @@
+Private["_liveUnits","_units"];
+
+_units = _this;
+
+_liveUnits = [];
+
+{if (alive _x) then {_liveUnits = _liveUnits + [_x]}} forEach _units;
+_liveUnits
diff --git a/Common/Functions/Common_GetNameSpace.sqf b/Common/Functions/Common_GetNameSpace.sqf
new file mode 100644
index 0000000..589da00
--- /dev/null
+++ b/Common/Functions/Common_GetNameSpace.sqf
@@ -0,0 +1,5 @@
+Private ['_variable'];
+
+_variable = _this;
+
+missionNamespace getVariable _variable \ No newline at end of file
diff --git a/Common/Functions/Common_GetPositionFrom.sqf b/Common/Functions/Common_GetPositionFrom.sqf
new file mode 100644
index 0000000..a695b6b
--- /dev/null
+++ b/Common/Functions/Common_GetPositionFrom.sqf
@@ -0,0 +1,11 @@
+private ["_distance","_direction","_position"];
+
+_position = _this Select 0;
+if (TypeName _position != "ARRAY") then {_position = Position _position};
+
+_distance = _this Select 1;
+
+_direction = _this Select 2;
+if (TypeName _direction != "SCALAR") then {_direction = [_position,_direction] Call GetDirTo};
+
+[(_position Select 0)+((sin _direction)*_distance),(_position Select 1)+((cos _direction)*_distance),(_position Select 2)] \ No newline at end of file
diff --git a/Common/Functions/Common_GetRandomPosition.sqf b/Common/Functions/Common_GetRandomPosition.sqf
new file mode 100644
index 0000000..a5e41ea
--- /dev/null
+++ b/Common/Functions/Common_GetRandomPosition.sqf
@@ -0,0 +1,12 @@
+Private["_position","_radius","_direction","_maxRadius","_minRadius"];
+
+_position = _this select 0;
+_minRadius = _this select 1;
+_maxRadius = _this select 2;
+_direction = random 360;
+
+_radius = (random (_maxRadius - _minRadius)) + _minRadius;
+_position = [(_position select 0)+((sin _direction)*_radius),(_position select 1)+((cos _direction)*_radius),(_position select 2)];
+while {surfaceIsWater _position}do {_direction = random 360;_radius = (random (_maxRadius - _minRadius)) + _minRadius;_position = [(_position select 0)+((sin _direction)*_radius),(_position select 1)+((cos _direction)*_radius),(_position select 2)]};
+
+_position \ No newline at end of file
diff --git a/Common/Functions/Common_GetRespawnCamps.sqf b/Common/Functions/Common_GetRespawnCamps.sqf
new file mode 100644
index 0000000..4c8f2ed
--- /dev/null
+++ b/Common/Functions/Common_GetRespawnCamps.sqf
@@ -0,0 +1,14 @@
+Private ['_availableSpawn','_camps','_closestCamp','_deathLoc','_enemySide','_get','_hostiles','_nearestCamps','_respawnCampsMode','_respawnCampsRuleMode','_respawnMinRange','_side','_town','_townSID'],; _deathLoc = _this select 0;
+_side = _this select 1;
+_availableSpawn = [];
+_respawnCampsMode = 'WFBE_RESPAWNCAMPSMODE' Call GetNamespace;
+_respawnCampsRuleMode = 'WFBE_RESPAWNCAMPSRULEMODE' Call GetNamespace;
+_respawnMinRange = 'WFBE_RESPAWNMINRANGE' Call GetNamespace;
+
+ switch (_respawnCampsMode) do { case 1: { /* Classic Respawn */ _town = [_deathLoc] Call GetClosestLocation; if !(isNull _town) then { if (_town distance _deathLoc < ('WFBE_RESPAWNRANGE' Call GetNamespace)) then { _camps = [_town,_side] Call GetFriendlyCamps; if (count _camps > 0) then { if (_respawnCampsRuleMode > 0) then { _closestCamp = ([_deathLoc,_camps] Call SortByDistance) select 0; _enemySide = if (_side == west) then {[east]} else {[west]}; if (_respawnCampsRuleMode == 2) then {_enemySide = _enemySide + [resistance]}; _hostiles = [_closestCamp,_enemySide,_respawnMinRange] Call GetHostilesInArea; if (_deathLoc distance _closestCamp < _respawnMinRange && _hostiles > 0) then {_camps = _camps - [_closestCamp]}; }; _availableSpawn = _availableSpawn + _camps; }; };
+ };
+ };
+ case 2: { /* Enhanced Respawn - Get the camps around the unit */ _nearestCamps = nearestObjects [_deathLoc, WFCAMP, ('WFBE_RESPAWNRANGE' Call GetNamespace)]; { _get = _x getVariable 'sideID'; if !(isNil '_get') then { if ((_side Call GetSideID) == _get) then { if (_respawnCampsRuleMode > 0) then { if (_deathLoc distance _x < _respawnMinRange) then { _enemySide = if (_side == west) then {[east]} else {[west]}; if (_respawnCampsRuleMode == 2) then {_enemySide = _enemySide + [resistance]}; _hostiles = [_x,_enemySide,_respawnMinRange] Call GetHostilesInArea; if (_hostiles == 0) then {_availableSpawn = _availableSpawn + [_x]}; } else { _availableSpawn = _availableSpawn + [_x]; }; } else { _availableSpawn = _availableSpawn + [_x]; }; }; }; } forEach _nearestCamps; }; case 3: { /* Defender Only Respawn - Get the camps around the unit only if the town is friendly to the unit. */ _nearestCamps = nearestObjects [_deathLoc, WFCAMP, ('WFBE_RESPAWNRANGE' Call GetNamespace)]; { _get = _x getVariable 'sideID'; if !(isNil '_get') then { _town = _x getVariable 'town'; _townSID = _town getVariable 'sideID'; if ((_side Call GetSideID) == _townSID && _get == _townSID) then {
+ if (_respawnCampsRuleMode > 0) then { if (_deathLoc distance _x < _respawnMinRange) then { _enemySide = if (_side == west) then {[east]} else {[west]}; if (_respawnCampsRuleMode == 2) then {_enemySide = _enemySide + [resistance]}; _hostiles = [_x,_enemySide,_respawnMinRange] Call GetHostilesInArea; if (_hostiles == 0) then {_availableSpawn = _availableSpawn + [_x]}; } else { _availableSpawn = _availableSpawn + [_x]; }; } else { _availableSpawn = _availableSpawn + [_x]; }; }; }; } forEach _nearestCamps; }; };
+
+/* Return the available camps */ _availableSpawn \ No newline at end of file
diff --git a/Common/Functions/Common_GetSafePlace.sqf b/Common/Functions/Common_GetSafePlace.sqf
new file mode 100644
index 0000000..fe0024c
--- /dev/null
+++ b/Common/Functions/Common_GetSafePlace.sqf
@@ -0,0 +1,27 @@
+Private["_count","_currentPosition","_direction","_obstacles","_placed","_position","_radius","_retPos","_vehicles"];
+scopeName "PlaceSafe";
+
+_position = _this select 0;
+_radius = if (count _this > 1) then {_this select 1} else {35};
+_retPos = [];
+
+_currentPosition = _position;
+_placed = false;
+_direction = 0;
+
+for [{_count = 0},{_count < 30 && !_placed},{_count = _count + 1}] do {
+ _obstacles = nearestObjects [_currentPosition, ["Building"], 15];
+ _vehicles = _currentPosition nearEntities [["Building","Car","Tank","Air"], 7];
+
+ if (count _obstacles > 0 || count _vehicles > 0 || surfaceIsWater _currentPosition) then {
+ _currentPosition = [(_position select 0)+((sin _direction)*_radius),(_position select 1)+((cos _direction)*_radius),0];
+ _direction = _direction + 36;
+ if (_count > 15) then {_radius = _radius + 25};
+ } else {
+ _retPos = _currentPosition;
+ _placed = true;
+ breakTo "PlaceSafe";
+ };
+};
+
+_retPos \ No newline at end of file
diff --git a/Common/Functions/Common_GetSideFromID.sqf b/Common/Functions/Common_GetSideFromID.sqf
new file mode 100644
index 0000000..3d549b7
--- /dev/null
+++ b/Common/Functions/Common_GetSideFromID.sqf
@@ -0,0 +1,7 @@
+Private["_side"];
+
+_side = Resistance;
+if (_this == EASTID) then {_side = East};
+if (_this == WESTID) then {_side = West};
+
+_side \ No newline at end of file
diff --git a/Common/Functions/Common_GetSideHQ.sqf b/Common/Functions/Common_GetSideHQ.sqf
new file mode 100644
index 0000000..6c1fab8
--- /dev/null
+++ b/Common/Functions/Common_GetSideHQ.sqf
@@ -0,0 +1 @@
+Call Compile Format ["%1MHQ",_this] \ No newline at end of file
diff --git a/Common/Functions/Common_GetSideHQDeployed.sqf b/Common/Functions/Common_GetSideHQDeployed.sqf
new file mode 100644
index 0000000..9b06dbd
--- /dev/null
+++ b/Common/Functions/Common_GetSideHQDeployed.sqf
@@ -0,0 +1 @@
+Call Compile Format ["%1MHQDeployed",_this] \ No newline at end of file
diff --git a/Common/Functions/Common_GetSideID.sqf b/Common/Functions/Common_GetSideID.sqf
new file mode 100644
index 0000000..a7b2053
--- /dev/null
+++ b/Common/Functions/Common_GetSideID.sqf
@@ -0,0 +1,7 @@
+Private["_ID"];
+
+_ID = RESISTANCEID;
+if (_this == east) then {_ID = EASTID};
+if (_this == west) then {_ID = WESTID};
+
+_ID \ No newline at end of file
diff --git a/Common/Functions/Common_GetSideStructures.sqf b/Common/Functions/Common_GetSideStructures.sqf
new file mode 100644
index 0000000..50a503f
--- /dev/null
+++ b/Common/Functions/Common_GetSideStructures.sqf
@@ -0,0 +1 @@
+Call Compile Format ["%1BaseStructures",_this] \ No newline at end of file
diff --git a/Common/Functions/Common_GetSideSupply.sqf b/Common/Functions/Common_GetSideSupply.sqf
new file mode 100644
index 0000000..a23b240
--- /dev/null
+++ b/Common/Functions/Common_GetSideSupply.sqf
@@ -0,0 +1 @@
+WF_Logic getVariable Format["%1Supplies",_this] \ No newline at end of file
diff --git a/Common/Functions/Common_GetSideTowns.sqf b/Common/Functions/Common_GetSideTowns.sqf
new file mode 100644
index 0000000..211ce4c
--- /dev/null
+++ b/Common/Functions/Common_GetSideTowns.sqf
@@ -0,0 +1,10 @@
+Private ['_sideID','_towns'];
+
+_sideID = (_this) Call GetSideID;
+_towns = [];
+
+{
+ if ((_x getVariable 'sideID') == _sideID) then {_towns = _towns + [_x]};
+} forEach towns;
+
+_towns \ No newline at end of file
diff --git a/Common/Functions/Common_GetSideUpgrades.sqf b/Common/Functions/Common_GetSideUpgrades.sqf
new file mode 100644
index 0000000..dab2428
--- /dev/null
+++ b/Common/Functions/Common_GetSideUpgrades.sqf
@@ -0,0 +1 @@
+Call Compile Format ["%1Upgrades",_this] \ No newline at end of file
diff --git a/Common/Functions/Common_GetSleepFPS.sqf b/Common/Functions/Common_GetSleepFPS.sqf
new file mode 100644
index 0000000..82b5bc4
--- /dev/null
+++ b/Common/Functions/Common_GetSleepFPS.sqf
@@ -0,0 +1,11 @@
+Private ["_delay"];
+
+_delay = _this;
+
+if (diag_fps > 15) exitWith {_delay};
+if (diag_fps <= 15 && diag_fps > 10) exitWith {_delay * 0.85};
+if (diag_fps <= 10 && diag_fps > 7) exitWith {_delay * 0.75};
+if (diag_fps <= 7 && diag_fps > 5) exitWith {_delay * 0.70};
+if (diag_fps <= 5) exitWith {_delay * 0.50};
+
+_delay \ No newline at end of file
diff --git a/Common/Functions/Common_GetTeamArtillery.sqf b/Common/Functions/Common_GetTeamArtillery.sqf
new file mode 100644
index 0000000..3bc97d7
--- /dev/null
+++ b/Common/Functions/Common_GetTeamArtillery.sqf
@@ -0,0 +1,32 @@
+Private["_artillery","_artyTypes","_artyWeapons","_count","_ignoreAmmo","_index","_position","_search","_side","_team","_units","_vehicle","_weapon","_x","_y"];
+
+_team = _this select 0;
+_ignoreAmmo = _this select 1;
+_index = _this select 2;
+_side = _this select 3;
+
+if (_index < 0) exitWith {[]};
+
+_units = units _team;
+_artyTypes = (Format ["WFBE_%1_ARTILLERY_NAMES",_side] Call GetNamespace) select _index;
+_artyWeapons = Format ["WFBE_%1_ARTILLERY_WEAPONS",_side] Call GetNamespace;
+
+_artillery = [];
+
+{
+ _vehicle = vehicle _x;
+
+ if (typeOf(_vehicle) in _artyTypes) then {
+ if (!(isNull(gunner _vehicle)) && !(_vehicle in _artillery) && !(isPlayer(gunner _vehicle))) then {
+ if !(isPlayer(gunner _vehicle)) then {
+ _weapon = _artyWeapons select _index;
+
+ if (_ignoreAmmo || (_vehicle ammo _weapon > 0)) then {
+ _artillery = _artillery + [_vehicle];
+ };
+ };
+ };
+ };
+} forEach _units;
+
+_artillery \ No newline at end of file
diff --git a/Common/Functions/Common_GetTeamAutonomous.sqf b/Common/Functions/Common_GetTeamAutonomous.sqf
new file mode 100644
index 0000000..9c14c75
--- /dev/null
+++ b/Common/Functions/Common_GetTeamAutonomous.sqf
@@ -0,0 +1,3 @@
+if (isNull _this) exitWith {false};
+
+Call Compile Format ["%1Autonomous",_this getVariable 'identification'] \ No newline at end of file
diff --git a/Common/Functions/Common_GetTeamFunds.sqf b/Common/Functions/Common_GetTeamFunds.sqf
new file mode 100644
index 0000000..a203147
--- /dev/null
+++ b/Common/Functions/Common_GetTeamFunds.sqf
@@ -0,0 +1,7 @@
+Private ["_funds"];
+
+if (isNull _this) exitWith {0};
+
+_funds = Call Compile Format ["%1Funds",_this getVariable 'identification'];
+if (isNil '_funds') exitWith {0};
+_funds \ No newline at end of file
diff --git a/Common/Functions/Common_GetTeamMoveMode.sqf b/Common/Functions/Common_GetTeamMoveMode.sqf
new file mode 100644
index 0000000..5860877
--- /dev/null
+++ b/Common/Functions/Common_GetTeamMoveMode.sqf
@@ -0,0 +1,3 @@
+if (isNull _this) exitWith {"towns"};
+
+Call Compile Format ["%1MoveMode",_this getVariable 'identification'] \ No newline at end of file
diff --git a/Common/Functions/Common_GetTeamMovePos.sqf b/Common/Functions/Common_GetTeamMovePos.sqf
new file mode 100644
index 0000000..c54ea5e
--- /dev/null
+++ b/Common/Functions/Common_GetTeamMovePos.sqf
@@ -0,0 +1,3 @@
+if (isNull _this) exitWith {[0,0,0]};
+
+Call Compile Format ["%1MovePos",_this getVariable 'identification'] \ No newline at end of file
diff --git a/Common/Functions/Common_GetTeamRespawn.sqf b/Common/Functions/Common_GetTeamRespawn.sqf
new file mode 100644
index 0000000..4625e2a
--- /dev/null
+++ b/Common/Functions/Common_GetTeamRespawn.sqf
@@ -0,0 +1,3 @@
+if (isNull _this) exitWith {""};
+
+Call Compile Format ["%1Respawn",_this getVariable 'identification'] \ No newline at end of file
diff --git a/Common/Functions/Common_GetTeamType.sqf b/Common/Functions/Common_GetTeamType.sqf
new file mode 100644
index 0000000..66932c1
--- /dev/null
+++ b/Common/Functions/Common_GetTeamType.sqf
@@ -0,0 +1,3 @@
+if (isNull _this) exitWith {0};
+
+Call Compile Format ["%1Types",_this getVariable 'identification'] \ No newline at end of file
diff --git a/Common/Functions/Common_GetTeamVehicles.sqf b/Common/Functions/Common_GetTeamVehicles.sqf
new file mode 100644
index 0000000..713fe89
--- /dev/null
+++ b/Common/Functions/Common_GetTeamVehicles.sqf
@@ -0,0 +1,30 @@
+private ["_canMove","_crew","_ignoreOwnerConflict","_member","_ownerConflict","_range","_team","_teamVehicles","_units","_vehicle"];
+
+_team = _this select 0;
+_canMove = _this select 1;
+
+_member = objNull;
+_range = 150;
+if (count _this > 2) then {_member = _this select 2};
+if (count _this > 3) then {_range = _this select 3};
+
+_ignoreOwnerConflict = false;
+if (count _this > 4) then {_ignoreOwnerConflict = _this select 4};
+
+_teamVehicles = [];
+_units = units _team;
+
+ {
+ _vehicle = vehicle _x;
+
+ if (_x != _vehicle && !(_vehicle in _teamVehicles)) then {_teamVehicles = _teamVehicles + [_vehicle]};
+ if (_canMove && !canMove _vehicle) then {_teamVehicles = _teamVehicles - [_vehicle]};
+ if (!IsNull _member && _member distance _vehicle > _range) then {_teamVehicles = _teamVehicles - [_vehicle]};
+
+ _ownerConflict = false;
+ _crew = crew _vehicle;
+ {if (_x != leader _team && isPlayer _x) then {_ownerConflict = true}} forEach _crew;
+ if (!_ignoreOwnerConflict && _ownerConflict) then {_teamVehicles = _teamVehicles - [_vehicle]};
+ } forEach _units;
+
+_teamVehicles \ No newline at end of file
diff --git a/Common/Functions/Common_GetTotalCamps.sqf b/Common/Functions/Common_GetTotalCamps.sqf
new file mode 100644
index 0000000..407dbf6
--- /dev/null
+++ b/Common/Functions/Common_GetTotalCamps.sqf
@@ -0,0 +1,7 @@
+Private ['_camps'];
+
+_camps = _this getVariable "camps";
+if (isNil '_camps') exitWith {1};
+if (count _camps == 0) exitWith {1};
+
+count _camps \ No newline at end of file
diff --git a/Common/Functions/Common_GetTotalCampsOnSide.sqf b/Common/Functions/Common_GetTotalCampsOnSide.sqf
new file mode 100644
index 0000000..10619dc
--- /dev/null
+++ b/Common/Functions/Common_GetTotalCampsOnSide.sqf
@@ -0,0 +1,15 @@
+Private["_camps","_side","_sideID","_total","_town"];
+
+_town = _this select 0;
+_side = _this select 1;
+
+_sideID = _side Call GetSideID;
+
+_camps = _town getVariable "camps";
+if (isNil '_camps') exitWith {1};
+if (count _camps == 0) exitWith {1};
+_total = 0;
+
+{if ((_x getVariable "sideID") == _sideID) then {_total = _total + 1}} forEach _camps;
+
+_total \ No newline at end of file
diff --git a/Common/Functions/Common_GetTotalSupplyValue.sqf b/Common/Functions/Common_GetTotalSupplyValue.sqf
new file mode 100644
index 0000000..2504011
--- /dev/null
+++ b/Common/Functions/Common_GetTotalSupplyValue.sqf
@@ -0,0 +1,13 @@
+Private["_side","_sideID","_totalSupply"];
+
+_side = _this;
+_sideID = _side Call GetSideID;
+_totalSupply = 0;
+
+{
+ if ((_x getVariable "sideID") == _sideID) then {
+ _totalSupply = _totalSupply + (_x getVariable "supplyValue");
+ };
+} forEach towns;
+
+_totalSupply \ No newline at end of file
diff --git a/Common/Functions/Common_GetTownsHeld.sqf b/Common/Functions/Common_GetTownsHeld.sqf
new file mode 100644
index 0000000..e992252
--- /dev/null
+++ b/Common/Functions/Common_GetTownsHeld.sqf
@@ -0,0 +1,8 @@
+private ["_held","_sideID"];
+
+_held = 0;
+_sideID = _this Call GetSideID;
+
+{if ((_x getVariable 'sideID') == _sideID) then {_held = _held + 1}} forEach towns;
+
+_held \ No newline at end of file
diff --git a/Common/Functions/Common_GetTownsIncome.sqf b/Common/Functions/Common_GetTownsIncome.sqf
new file mode 100644
index 0000000..df5bf43
--- /dev/null
+++ b/Common/Functions/Common_GetTownsIncome.sqf
@@ -0,0 +1,18 @@
+Private ["_income","_incomeCoef","_incomeSystem","_side"];
+_side = (_this) Call GetSideID;
+
+_income = 0;
+_incomeSystem = 'WFBE_INCOMESYSTEM' Call GetNamespace;
+_incomeCoef = 0;
+if (_incomeSystem == 3) then {_incomeCoef = 'WFBE_INC_COEFFICIENT' Call GetNamespace};
+
+{
+ if ((_x getVariable "sideID") == _side) then {
+ switch (_incomeSystem) do {
+ case 3: {_income = _income + ((_x getVariable "supplyValue")*_incomeCoef)};
+ default {_income = _income + (_x getVariable "supplyValue")};
+ };
+ };
+} forEach towns;
+
+_income \ No newline at end of file
diff --git a/Common/Functions/Common_GetTurretsMags.sqf b/Common/Functions/Common_GetTurretsMags.sqf
new file mode 100644
index 0000000..f226567
--- /dev/null
+++ b/Common/Functions/Common_GetTurretsMags.sqf
@@ -0,0 +1,42 @@
+/* Adapted from BIS turret's function. */
+private ['_entry','_turrets','_turretIndex'];
+_entry = _this select 0;
+
+_turrets = [];
+_turretIndex = 0;
+
+//Explore all turrets and sub-turrets recursively.
+for '_i' from 0 to ((count _entry) - 1) do
+{
+ private ['_subEntry'];
+ _subEntry = _entry select _i;
+
+ if (isClass _subEntry) then
+ {
+ private ['_hasGunner'];
+ _hasGunner = [_subEntry, 'hasGunner'] call BIS_fnc_returnConfigEntry;
+
+ //Make sure the entry was found.
+ if !(isNil '_hasGunner') then
+ {
+ if (_hasGunner == 1) then
+ {
+ _turrets = _turrets + [[_turretIndex],getArray(_subEntry >> 'magazines')];
+
+ //Include sub-turrets, if present.
+ if (isClass (_subEntry >> 'Turrets')) then
+ {
+ _turrets = _turrets + [[_subEntry >> 'Turrets'] call GetTurretsMags];
+ }
+ else
+ {
+ _turrets = _turrets + [[]];
+ };
+ };
+ };
+
+ _turretIndex = _turretIndex + 1;
+ };
+};
+
+_turrets \ No newline at end of file
diff --git a/Common/Functions/Common_GetUnitVehicle.sqf b/Common/Functions/Common_GetUnitVehicle.sqf
new file mode 100644
index 0000000..f7ba300
--- /dev/null
+++ b/Common/Functions/Common_GetUnitVehicle.sqf
@@ -0,0 +1,6 @@
+Private['_unit','_return'];
+_unit = _this;
+
+_return = if (_unit != vehicle _unit) then {vehicle _unit} else {_unit};
+
+_return \ No newline at end of file
diff --git a/Common/Functions/Common_GetUnitsBelowHeight.sqf b/Common/Functions/Common_GetUnitsBelowHeight.sqf
new file mode 100644
index 0000000..1232042
--- /dev/null
+++ b/Common/Functions/Common_GetUnitsBelowHeight.sqf
@@ -0,0 +1,11 @@
+Private["_belowUnits","_height","_min","_units","_z"];
+
+_units = _this Select 0;
+_height = _this Select 1;
+_min = if (count _this > 2) then {_this select 2} else {-10};
+
+_belowUnits = [];
+
+{_z = getPos _x select 2;if (_z < _height && _z >= _min) then {_belowUnits = _belowUnits + [_x]}} ForEach _units;
+
+_belowUnits \ No newline at end of file
diff --git a/Common/Functions/Common_GetVehicleMags.sqf b/Common/Functions/Common_GetVehicleMags.sqf
new file mode 100644
index 0000000..bb690a4
--- /dev/null
+++ b/Common/Functions/Common_GetVehicleMags.sqf
@@ -0,0 +1,4 @@
+private ["_entry"];
+_entry = _this select 0;
+
+getArray(_entry >> 'magazines') \ No newline at end of file
diff --git a/Common/Functions/Common_HandleArtillery.sqf b/Common/Functions/Common_HandleArtillery.sqf
new file mode 100644
index 0000000..be8e243
--- /dev/null
+++ b/Common/Functions/Common_HandleArtillery.sqf
@@ -0,0 +1,104 @@
+/* Handle artillery Fired EH */
+Private ['_ammo','_ammoList','_cannon','_destination','_direction','_dispersion','_distance','_keepShellAlive','_landDestination','_maxRange','_nearLaser','_percent','_projectile','_radius','_shellpos','_side','_smoke','_smokeOnImpact','_velocity','_xcoord','_ycoord'];
+
+_ammo = _this select 0;
+_ammoList = _this select 2;
+
+//--- Only Catch allowed ammo.
+if (_ammo in _ammoList) then {
+
+ //--- Retrieve the parameters.
+ _projectile = _this select 1;
+ _destination = _this select 3;
+ _velocity = _this select 4;
+ _dispersion = _this select 5;
+ _cannon = _this select 6;
+ _distance = _this select 7;
+ _radius = _this select 8;
+ _maxRange = _this select 9;
+ _side = _this select 10;
+
+ //--- Do we have smoke on impact?
+ _smokeOnImpact = false;
+
+ //--- Randomize Land Area.
+ _distance = random (_distance / _maxRange * 100) + random _radius;
+ _direction = random 360;
+
+ //--- Default Position.
+ _landDestination = [((_destination select 0)+((sin _direction)*_distance))+(random _dispersion)-(random _dispersion),(_destination select 1)+((cos _direction)*_distance)+(random _dispersion)-(random _dispersion),0];
+ _keepShellAlive = true;
+
+ //--- SADARM Rounds.
+ if (_ammo in (Format ["WFBE_%1_ARTILLERY_AMMO_SADARM",_side] Call GetNamespace)) then {
+ [_projectile,_landDestination,_velocity] Spawn ARTY_HandleSADARM;
+ //--- SADARM Destroy the original round.
+ _keepShellAlive = false;
+ };
+
+ //--- ILLUM Rounds.
+ if (_ammo in (Format ["WFBE_%1_ARTILLERY_AMMO_ILLUMN",_side] Call GetNamespace)) then {
+ [_projectile,_landDestination,_velocity] Spawn ARTY_HandleILLUM;
+ //--- ILLUM Destroy the original round.
+ _keepShellAlive = false;
+ };
+
+ //--- Some rounds remove the projectile, make sure that it's not removed or anything.
+ if (_keepShellAlive) then {
+ //--- LASER Rounds.
+ if (_ammo in (Format ["WFBE_%1_ARTILLERY_AMMO_LASER",_side] Call GetNamespace)) then {
+ _nearLaser = _destination nearEntities ['LaserTarget','WFBE_ARTILLERYAMMOLASERRANGE' Call GetNamespace];
+ if (count _nearLaser > 0) then {
+ _nearLaser = getPos (([_destination,_nearLaser] Call SortByDistance) select 0);
+ _landDestination = [(_nearLaser select 0)+(((random _dispersion)-(random _dispersion))/4),(((_nearLaser select 1)+(random _dispersion)-(random _dispersion))/4),0];
+ };
+ };
+
+ //--- Calculate the shell estimated spawn area.
+ _distance = _landDestination distance _cannon;
+ _percent = ((500 * 100 / _distance) / 100);
+ _xcoord = (_landDestination select 0) + _percent * ((_cannon select 0) - (_landDestination select 0));
+ _ycoord = (_landDestination select 1) + _percent * ((_cannon select 1) - (_landDestination select 1));
+ _shellpos = [_xcoord,_ycoord,1000];
+
+ //--- Calculate the direction
+ _xcoord = (_landDestination select 0) - (_cannon select 0);
+ _ycoord = (_landDestination select 1) - (_cannon select 1);
+ _direction = -(((_ycoord atan2 _xcoord) + 270) % 360);
+ if (_direction < 0) then {_direction = _direction + 360};
+
+ //--- Track the shell (FX)?
+ _smokeOnImpact = if (_ammo in (Format ["WFBE_%1_ARTILLERY_DEPLOY_SMOKE",_side] Call GetNamespace)) then {true} else {false};
+
+ //--- Release the shell.
+ if !(isNull _projectile) then {
+ _projectile setPos _shellpos;
+ _projectile setVelocity [(sin _direction*_velocity),(cos _direction*_velocity),((_velocity * 2.03) * -1)];
+
+ if (WF_A2_Vanilla) then {
+ //---- MLRS ammo has some weird config problems on vanilla.
+ if (_ammo == "R_MLRS" || _ammo == "ARTY_R_227mm_HE_Rocket") then {
+ _projectile setPos _landDestination;
+ };
+ };
+ };
+ };
+
+ //--- Release smoke on an impact.
+ if (_smokeOnImpact) then {
+ _shellPos = [];
+
+ //--- Wait for the last known position.
+ while {!isNull _projectile} do {
+ _shellPos = getPos _projectile;
+ sleep 0.02;
+ };
+
+ //--- If we have it, release it.
+ if (count _shellPos > 0) then {
+ _shellPos set [2,0];
+ _smoke = "ARTY_SmokeShellWhite" createVehicle _shellPos;
+ _smoke setPos _shellPos;
+ };
+ };
+}; \ No newline at end of file
diff --git a/Common/Functions/Common_HandleIncomingMissile.sqf b/Common/Functions/Common_HandleIncomingMissile.sqf
new file mode 100644
index 0000000..8318f4c
--- /dev/null
+++ b/Common/Functions/Common_HandleIncomingMissile.sqf
@@ -0,0 +1,22 @@
+Private ["_ammo","_irLock","_missile","_source","_unit"];
+_unit = _this select 0;
+_ammo = _this select 1;
+_source = _this select 2;
+
+_missile = nearestObject [_source,_ammo];
+if (isNull _missile) exitWith {};
+
+//--- Get the ammo type.
+_irLock = getNumber(configFile >> "CfgAmmo" >> _ammo >> "irLock");
+
+//--- IR Lock is affected
+if (_irLock == 1) then {
+ _distance = _unit distance _source;
+
+ _limit = 'WFBE_INCOMINGMISSILEMAXRANGE' Call GetNamespace;
+
+ if (_distance > _limit) then {
+ waitUntil {_missile distance _source > _limit};
+ deleteVehicle _missile;
+ };
+}; \ No newline at end of file
diff --git a/Common/Functions/Common_IsArtillery.sqf b/Common/Functions/Common_IsArtillery.sqf
new file mode 100644
index 0000000..28b97ba
--- /dev/null
+++ b/Common/Functions/Common_IsArtillery.sqf
@@ -0,0 +1,12 @@
+Private ['_artyNames','_i','_retVal','_side','_unit'];
+_unit = _this select 0;
+_side = _this select 1;
+
+_retVal = -1;
+_artyNames = Format ["WFBE_%1_ARTILLERY_NAMES",_side] Call GetNamespace;
+
+for [{_i = 0},{_i < count(_artyNames)},{_i = _i + 1}] do {
+ if (_unit in (_artyNames select _i)) exitWith {_retVal = _i};
+};
+
+_retVal \ No newline at end of file
diff --git a/Common/Functions/Common_PlaceNear.sqf b/Common/Functions/Common_PlaceNear.sqf
new file mode 100644
index 0000000..99f9b75
--- /dev/null
+++ b/Common/Functions/Common_PlaceNear.sqf
@@ -0,0 +1,34 @@
+Private["_destination","_direction","_faceAway","_maxRadius","_minRadius","_object","_placeSafe","_position","_radius","_randomDirection","_safeRadius"];
+
+_object = _this Select 0;
+_position = _this Select 1;
+_minRadius = _this Select 2;
+_maxRadius = _this Select 3;
+
+_faceAway = true;
+if (Count _this > 4) then {_faceAway = _this Select 4};
+
+_randomDirection = true;
+if (Count _this > 5) then {_randomDirection = _this Select 5};
+
+_placeSafe = false;
+if (Count _this > 6) then {_placeSafe = _this Select 6};
+
+_direction = Random 360;
+_radius = (Random (_maxRadius - _minRadius)) + _minRadius;
+
+if (_placeSafe) then {
+ _safeRadius = (_maxRadius - _minRadius) / 2;
+ if (_safeRadius < 5) then {_safeRadius = 5};
+ _destination = [(_position Select 0)+((sin _direction)*_radius),(_position Select 1)+((cos _direction)*_radius),(_position Select 2)+0.5];
+ [_object,_destination,_safeRadius] Call PlaceSafe;
+} else {
+ _object SetPos [(_position Select 0)+((sin _direction)*_radius),(_position Select 1)+((cos _direction)*_radius),(_position Select 2)+0.5];
+};
+
+if (_randomDirection) then {_object SetDir Random 360};
+
+if (_faceAway) then {
+ _destination = GetPos _object;
+ _object SetDir -((((_destination Select 1) - (_position Select 1)) atan2 ((_destination Select 0) - (_position Select 0))) - 90);
+}; \ No newline at end of file
diff --git a/Common/Functions/Common_PlaceSafe.sqf b/Common/Functions/Common_PlaceSafe.sqf
new file mode 100644
index 0000000..45176c2
--- /dev/null
+++ b/Common/Functions/Common_PlaceSafe.sqf
@@ -0,0 +1,28 @@
+Private["_count","_currentPosition","_direction","_object","_obstacles","_placed","_position","_radius","_vehicles"];
+scopeName "PlaceSafe";
+
+_object = _this select 0;
+_position = _this select 1;
+_radius = if (count _this > 2) then {_this select 2} else {35};
+
+_currentPosition = _position;
+_placed = false;
+_direction = 0;
+
+for [{_count = 0},{_count < 30 && !_placed},{_count = _count + 1}] do {
+ _obstacles = nearestObjects [_currentPosition, ["Building"], 15];
+ _vehicles = _currentPosition nearEntities [["Building","Car","Tank","Air"], 7];
+
+ if (count _obstacles > 0 || count _vehicles > 0 || surfaceIsWater _currentPosition) then {
+ _currentPosition = [(_position select 0)+((sin _direction)*_radius),(_position select 1)+((cos _direction)*_radius),0];
+ _direction = _direction + 36;
+ if (_count > 15) then {_radius = _radius + 25};
+ } else {
+ _object setPos _currentPosition;
+ _object setVelocity [0,0,-0.5];
+ _placed = true;
+ breakTo "PlaceSafe";
+ };
+};
+
+if (!_placed) then {_object setPos _position;_object setVelocity [0,0,-0.5]};
diff --git a/Common/Functions/Common_RearmVehicle.sqf b/Common/Functions/Common_RearmVehicle.sqf
new file mode 100644
index 0000000..58ed35c
--- /dev/null
+++ b/Common/Functions/Common_RearmVehicle.sqf
@@ -0,0 +1,39 @@
+Private["_amount","_get","_isAir","_isArtillery","_magazines","_side","_type","_vehicle"];
+
+_vehicle = _this select 0;
+_side = _this select 1;
+_type = typeOf _vehicle;
+_isAir = if (_vehicle isKindOf "Air") then {true} else {false};
+
+//rearming turrets.
+{_vehicle removeMagazine _x} forEach magazines _vehicle;
+
+_magazines = getArray (configFile >> "CfgVehicles" >> typeOf _vehicle >> "Turrets" >> "MainTurret" >> "Magazines");
+_magazines = _magazines + getArray (configFile >> "CfgVehicles" >> typeOf _vehicle >> "Magazines");
+
+{_vehicle addMagazine _x} forEach _magazines;
+
+/* CM Parameter */
+if (paramCounterMeasures && _isAir) then {
+ _amount = if (_vehicle isKindOf "Plane") then {'WFBE_COUNTERMEASUREPLANES' Call GetNamespace} else {'WFBE_COUNTERMEASURECHOPPERS' Call GetNamespace};
+ _vehicle setVariable ["FlareCount", _amount];
+};
+
+_vehicle setVehicleAmmo 1;
+reload _vehicle;
+
+/* Are we dealing with an artillery unit ? */
+_isArtillery = -1;
+if (_side == west || _side == east) then {_isArtillery = [_type,_side] Call IsArtillery};
+if (_isArtillery != -1) then {[_vehicle,_isArtillery,_side] Call EquipArtillery};
+
+/* Balanced Unit */
+if (_type in ('WFBE_BALANCEDUNITS' Call GetNamespace) && paramBalancing) then {[_vehicle] Call BalanceInit};
+
+/* EASA Module */
+if (paramEASA) then {
+ if (_type in ('WFBE_EASA_Vehicles' Call GetNamespace)) then {
+ _get = _vehicle getVariable 'WFBE_EASA_Setup';
+ if !(isNil '_get') then {[_vehicle,0] Call EASA_Equip};
+ };
+};
diff --git a/Common/Functions/Common_RearmVehicleOA.sqf b/Common/Functions/Common_RearmVehicleOA.sqf
new file mode 100644
index 0000000..9537b90
--- /dev/null
+++ b/Common/Functions/Common_RearmVehicleOA.sqf
@@ -0,0 +1,51 @@
+Private['_amount','_config','_get','_isAir','_isArtillery','_magazines','_side','_turrets','_type','_vehicle'];
+
+_vehicle = _this select 0;
+_side = _this select 1;
+_type = typeOf _vehicle;
+_isAir = if (_vehicle isKindOf "Air") then {true} else {false};
+
+/* Clear the vehicle */
+_vehicle setVehicleAmmo 0;
+
+/* Reload all turrets */
+_turrets = [];
+_config = configFile >> 'CfgVehicles' >> typeOf _vehicle >> 'Turrets';
+_turrets = [_config] call GetTurretsMags;
+[_vehicle,_turrets] Call SetTurretsMags;
+/* Reload the driver (Special) */
+_magazines = [configFile >> 'CfgVehicles' >> typeOf _vehicle] call GetVehicleMags;
+{_vehicle addMagazineTurret[_x,[-1]]} forEach _magazines;
+
+reload _vehicle;
+
+/* CM Parameter */
+if (paramCounterMeasures && _vehicle isKindOf 'Air') then {
+ _amount = if (_vehicle isKindOf 'Plane') then {'WFBE_COUNTERMEASUREPLANES' Call GetNamespace} else {'WFBE_COUNTERMEASURECHOPPERS' Call GetNamespace};
+ _vehicle setVariable ['FlareCount', _amount];
+};
+
+/* Are we dealing with an artillery unit ? */
+_isArtillery = -1;
+if (_side == west || _side == east) then {_isArtillery = [_type,_side] Call IsArtillery};
+if (_isArtillery != -1) then {[_vehicle,_isArtillery,_side] Call EquipArtillery};
+
+/* Balanced Unit */
+if (_type in ('WFBE_BALANCEDUNITS' Call GetNamespace) && paramBalancing) then {[_vehicle] Call BalanceInit};
+
+/* EASA Module */
+if (paramEASA) then {
+ if (_type in ('WFBE_EASA_Vehicles' Call GetNamespace)) then {
+ _get = _vehicle getVariable 'WFBE_EASA_Setup';
+ if !(isNil '_get') then {[_vehicle,0] Call EASA_Equip};
+ };
+};
+
+/* Mando Missiles - Reload Flares */
+if (paramMandoMissiles && _isAir) then {
+ _var = _vehicle getVariable "mando_maxflares";
+ if !(isNil "_var") then {
+ _vehicle setVariable ["mando_flaresleft", _var, true];
+ call mando_update_flares;
+ };
+}; \ No newline at end of file
diff --git a/Common/Functions/Common_RevealArea.sqf b/Common/Functions/Common_RevealArea.sqf
new file mode 100644
index 0000000..3a94c95
--- /dev/null
+++ b/Common/Functions/Common_RevealArea.sqf
@@ -0,0 +1,11 @@
+Private ["_pos","_range","_reveal","_team","_unit"];
+
+_unit = _this select 0;
+_range = _this select 1;
+_pos = _this select 2;
+
+{
+ _reveal = [_x];
+ if (_x != vehicle _x) then {_reveal = _reveal + (crew _x)};
+ {_unit reveal _x} forEach _reveal;
+} forEach (_pos nearEntities _range); \ No newline at end of file
diff --git a/Common/Functions/Common_SetCommanderVotes.sqf b/Common/Functions/Common_SetCommanderVotes.sqf
new file mode 100644
index 0000000..48a41c0
--- /dev/null
+++ b/Common/Functions/Common_SetCommanderVotes.sqf
@@ -0,0 +1,14 @@
+Private["_count","_side","_teams","_total","_value"];
+
+_side = _this Select 0;
+_value = _this Select 1;
+
+_teams = (Format["WFBE_%1TEAMS",str _side] Call GetNamespace);
+_total = Count _teams + 1;
+
+//Count votes.
+for [{_count = 1},{_count < _total},{_count = _count + 1}] do {
+ if (isPlayer (leader (_teams Select (_count - 1)))) then {
+ Call Compile Format["if (%1Team%2Vote != _value) then {%1Team%2Vote = _value;PublicVariable '%1Team%2Vote'};",str _side,_count];
+ };
+}; \ No newline at end of file
diff --git a/Common/Functions/Common_SetNamespace.sqf b/Common/Functions/Common_SetNamespace.sqf
new file mode 100644
index 0000000..aaf20f2
--- /dev/null
+++ b/Common/Functions/Common_SetNamespace.sqf
@@ -0,0 +1,15 @@
+Private ['_get','_override','_variable','_value'];
+
+_variable = _this select 0;
+_value = _this select 1;
+_override = if (count _this > 2) then {_this select 2} else {false};
+
+//--- BIS Bug, typename doesn't work properly with nil.
+if !(_override) then {
+ _get = _variable Call GetNamespace;
+ if (isNil '_get') then {
+ missionNamespace setVariable [_variable,_value];
+ };
+} else {
+ missionNamespace setVariable [_variable,_value];
+}; \ No newline at end of file
diff --git a/Common/Functions/Common_SetTeamAutonomous.sqf b/Common/Functions/Common_SetTeamAutonomous.sqf
new file mode 100644
index 0000000..e9d2add
--- /dev/null
+++ b/Common/Functions/Common_SetTeamAutonomous.sqf
@@ -0,0 +1,8 @@
+Private['_status','_team'];
+
+_team = _this select 0;
+_status = _this select 1;
+
+if (isNull _team) exitWith {};
+
+Call Compile Format ["%1Autonomous = _status; publicVariable '%1Autonomous';",_team getVariable 'identification']; \ No newline at end of file
diff --git a/Common/Functions/Common_SetTeamMoveMode.sqf b/Common/Functions/Common_SetTeamMoveMode.sqf
new file mode 100644
index 0000000..e83b940
--- /dev/null
+++ b/Common/Functions/Common_SetTeamMoveMode.sqf
@@ -0,0 +1,8 @@
+Private['_moveMode','_team'];
+
+_team = _this select 0;
+_moveMode = _this select 1;
+
+if (isNull _team) exitWith {};
+
+Call Compile Format ["%1MoveMode = _moveMode; publicVariable '%1MoveMode';",_team getVariable 'identification']; \ No newline at end of file
diff --git a/Common/Functions/Common_SetTeamMovePos.sqf b/Common/Functions/Common_SetTeamMovePos.sqf
new file mode 100644
index 0000000..7a45b8f
--- /dev/null
+++ b/Common/Functions/Common_SetTeamMovePos.sqf
@@ -0,0 +1,8 @@
+Private['_movePos','_team'];
+
+_team = _this select 0;
+_movePos = _this select 1;
+
+if (isNull _team) exitWith {};
+
+Call Compile Format ["%1MovePos = _movePos; publicVariable '%1MovePos';",_team getVariable 'identification']; \ No newline at end of file
diff --git a/Common/Functions/Common_SetTeamRespawn.sqf b/Common/Functions/Common_SetTeamRespawn.sqf
new file mode 100644
index 0000000..606f269
--- /dev/null
+++ b/Common/Functions/Common_SetTeamRespawn.sqf
@@ -0,0 +1,8 @@
+Private['_respawn','_team'];
+
+_team = _this select 0;
+_respawn = _this select 1;
+
+if (isNull _team) exitWith {};
+
+Call Compile Format ["%1Respawn = _respawn; publicVariable '%1Respawn';",_team getVariable 'identification']; \ No newline at end of file
diff --git a/Common/Functions/Common_SetTeamType.sqf b/Common/Functions/Common_SetTeamType.sqf
new file mode 100644
index 0000000..6d77a81
--- /dev/null
+++ b/Common/Functions/Common_SetTeamType.sqf
@@ -0,0 +1,8 @@
+Private['_idtype','_team'];
+
+_team = _this select 0;
+_idtype = _this select 1;
+
+if (isNull _team) exitWith {};
+
+Call Compile Format ["%1Types = _idtype; publicVariable '%1Types';",_team getVariable 'identification']; \ No newline at end of file
diff --git a/Common/Functions/Common_SetTurretsMags.sqf b/Common/Functions/Common_SetTurretsMags.sqf
new file mode 100644
index 0000000..7881ed9
--- /dev/null
+++ b/Common/Functions/Common_SetTurretsMags.sqf
@@ -0,0 +1,30 @@
+private ["_content","_cpt","_data","_dataRow","_tConstruct","_turretPath","_vehicle"];
+_vehicle = _this select 0;
+_data = _this select 1;
+_turretPath = if (count _this > 2) then {_this select 2} else {[]};
+_cpt = count _turretPath;
+
+for "_i" from 0 to ((count _data) - 1) do {
+ _dataRow = _data select _i;
+
+ if (count _dataRow > 0) then {
+ if (typeName _dataRow == 'ARRAY') then {
+ _content = _dataRow select 0;
+ //--- root.
+ if (typeName _content == 'SCALAR') then {
+ _turretPath set [_cpt,[_content]];
+ _tConstruct = [];
+ {_tConstruct = _tConstruct + _x} forEach _turretPath;
+ {
+ _vehicle addMagazineTurret [_x, _tConstruct];
+ } forEach (_data select (_i+1));
+ };
+ //--- go deeper.
+ if (typeName _content == 'ARRAY') then {
+ [_vehicle,_dataRow,_turretPath] Call SetTurretsMags;
+ _turretPath = [];
+ _cpt = 0;
+ };
+ };
+ };
+}; \ No newline at end of file
diff --git a/Common/Functions/Common_SortByDistance.sqf b/Common/Functions/Common_SortByDistance.sqf
new file mode 100644
index 0000000..a34680e
--- /dev/null
+++ b/Common/Functions/Common_SortByDistance.sqf
@@ -0,0 +1,24 @@
+Private["_count","_count1","_current","_distance","_nearest","_nearestDistance","_object","_objects","_sorted","_total"];
+
+_object = _this Select 0;
+_objects = +(_this Select 1);
+
+_sorted = [];
+
+_total = Count _objects;
+for [{_count = 0},{_count < _total},{_count = _count + 1}] do {
+ _nearest = ObjNull;
+ _nearestDistance = 100000;
+
+ for [{_count1 = Count _objects - 1},{_count1 >= 0},{_count1 = _count1 - 1}] do {
+ _current = _objects Select _count1;
+ _distance = _current Distance _object;
+
+ if (_distance < _nearestDistance) then {_nearest = _current;_nearestDistance = _distance};
+ };
+
+ _sorted = _sorted + [_nearest];
+ _objects = _objects - [_nearest];
+};
+
+_sorted \ No newline at end of file
diff --git a/Common/Functions/Common_SpawnTurrets.sqf b/Common/Functions/Common_SpawnTurrets.sqf
new file mode 100644
index 0000000..b9ae10e
--- /dev/null
+++ b/Common/Functions/Common_SpawnTurrets.sqf
@@ -0,0 +1,22 @@
+private ["_turrets", "_path", "_vehicle", "_crew", "_team", "_unit"];
+_turrets = _this select 0;
+_path = _this select 1;
+_vehicle = _this select 2;
+_crew = _this select 3;
+_team = _this select 4;
+private ["_i"];
+_i = 0;
+while {_i < (count _turrets)} do {
+ private ["_turretIndex", "_thisTurret"];
+ _turretIndex = _turrets select _i;
+ _thisTurret = _path + [_turretIndex];
+
+ if (isNull (_vehicle turretUnit _thisTurret)) then {
+ _unit = [_crew,_team,getPos _vehicle,side _team] Call CreateMan;
+ _unit moveInTurret [_vehicle, _thisTurret];
+ };
+
+ //Spawn units into subturrets.
+ [_turrets select (_i + 1), _thisTurret, _vehicle, _crew, _team] call SpawnTurrets;
+ _i = _i + 2;
+}; \ No newline at end of file
diff --git a/Common/Functions/Common_UnitKilled.sqf b/Common/Functions/Common_UnitKilled.sqf
new file mode 100644
index 0000000..dbf11df
--- /dev/null
+++ b/Common/Functions/Common_UnitKilled.sqf
@@ -0,0 +1,196 @@
+Private ["_bounty","_crew","_get","_group","_isAIControlled","_iskilledplayer","_iskillerplayer","_isMan","_killed","_killedname","_killeduid","_killer","_killerID","_killername","_killerTeam","_killerVehName","_killertype","_killeruid","_lost","_objects","_objectType","_side","_sideKiller","_sideVictim","_sta","_uid","_vehicle"];
+_killed = _this select 0;
+_killer = _this select 1;
+_sideVictim = _this select 2;
+_sideKiller = side _killer;
+
+_group = group _killed;
+_killerTeam = group _killer;
+_killerVehName = vehicleVarName (leader _killerTeam);
+_vehicle = vehicle _killer;
+_objectType = typeOf _killed;
+_killertype = "";
+_killeruid = "";
+_killername = "";
+_killeduid = "";
+_killedname = "";
+_iskilledplayer = false;
+
+_isMan = if (_killed isKindOf "Man") then {true} else {false};
+
+_iskillerplayer = if (isPlayer _killer) then {true} else {false};
+if (mysql) then {
+ _killertype = typeOf _killer;
+ _iskilledplayer = if (isPlayer _killed) then {true} else {false};
+ _killeruid = if (_iskillerplayer) then {getPlayerUID(_killer)} else {"0"};
+ _killeduid = if (_iskilledplayer) then {getPlayerUID(_killed)} else {"0"};
+ _killername = if (_iskillerplayer) then {name _killer} else {"nil"};
+ _killedname = if (_iskilledplayer) then {name _killed} else {"nil"};
+};
+
+//--- Renegade.
+if (_sideKiller == sideEnemy) then {
+ if (_killer isKindOf westSoldierBaseClass) then {_sideKiller = west};
+ if (_killer isKindOf eastSoldierBaseClass) then {_sideKiller = east};
+};
+if (_sideVictim == sideEnemy) then {
+ if (_killed isKindOf westSoldierBaseClass) then {_sideVictim = west};
+ if (_killed isKindOf eastSoldierBaseClass) then {_sideVictim = east};
+};
+
+//--- Benny's Garbage Collector.
+if (WF_A2_Vanilla) then {
+ /* Vanilla use the old garbage system */
+ if (!(isServer) || local player) then {
+ _objects = (WF_Logic getVariable "trash") + [_killed];
+ WF_Logic setVariable ["trash",_objects,true];
+ } else {
+ trashQueu = trashQueu + [_killed];
+ _killed Spawn TrashObject;
+ };
+} else {
+ /* OA use the evolved system which no longer require network variables */
+ if (isServer) then {
+ trashQueu = trashQueu + [_killed];
+ _killed Spawn TrashObject;
+ };
+};
+
+sleep (random 3);
+
+if (_isMan && (_sideVictim == west || _sideVictim == east)) then {[str _sideVictim,'Casualties',1] Call UpdateStatistics};
+if (!_isMan && (_sideVictim == west || _sideVictim == east)) then {[str _sideVictim,'VehiclesLost',1] Call UpdateStatistics};
+
+_killerID = (leader _killerTeam) Call GetClientID;
+_get = _objectType Call GetNamespace;
+
+_isAIControlled = true;
+if (_killerID > 0) then {_isAIControlled = if (isPlayer (leader _killerTeam)) then {false} else {true}};
+
+//--- Normal kill.
+if (!isNull _killerTeam && !isNil '_get' && (_sideKiller != sideEnemy) && (_sideKiller != _sideVictim) && (_sideKiller != Civilian)) then {
+ if (_killerID > 0 && !_isAIControlled) then {
+ /* Bounty */
+ if (paramBounty) then {
+ WFBE_AwardBounty = [_killerVehName,'CLTFNCAWARDBOUNTY',[_objectType, false]];
+ publicVariable 'WFBE_AwardBounty';
+ if (isHostedServer) then {[_killerVehName,'CLTFNCAWARDBOUNTY',[_objectType, false]] Spawn HandlePVF};
+
+ //--- Kill Assist.
+ if (!(_vehicle isKindOf 'Man') && alive _vehicle) then {
+ _crew = [driver _vehicle, gunner _vehicle, commander _vehicle] - [_killer, player];
+ {
+ if !(isNull _x) then {
+ if (isPlayer _x && group _x != _killerTeam) then {
+ WFBE_AwardBounty = [vehicleVarName _x,'CLTFNCAWARDBOUNTY',[_objectType, true]];
+ publicVariable 'WFBE_AwardBounty';
+ if (isHostedServer) then {[vehicleVarName _x,'CLTFNCAWARDBOUNTY',[_objectType, true]] Spawn HandlePVF};
+ };
+ };
+ } forEach _crew;
+ };
+ };
+
+ /* AI Score */
+ if !(_iskillerplayer) then {
+ [_objectType,leader _killerTeam] Spawn {
+ Private ['_player','_point','_type'];
+ _type = _this select 0;
+ _player = _this select 1;
+
+ _point = switch (true) do {
+ case (_type isKindOf "Infantry"): {1};
+ case (_type isKindOf "Car"): {2};
+ case (_type isKindOf "Ship"): {4};
+ case (_type isKindOf "Motorcycle"): {1};
+ case (_type isKindOf "Tank"): {4};
+ case (_type isKindOf "Helicopter"): {4};
+ case (_type isKindOf "Plane"): {6};
+ case (_type isKindOf "StaticWeapon"): {2};
+ case (_type isKindOf "Building"): {2};
+ default {1};
+ };
+
+ sleep random(3);
+
+ if (isServer) then {
+ ['SRVFNCREQUESTCHANGESCORE',[_player,score _player + _point]] Spawn HandleSPVF;
+ } else {
+ WFBE_RequestChangeScore = ['SRVFNCREQUESTCHANGESCORE',[_player,score _player + _point]];
+ publicVariable 'WFBE_RequestChangeScore';
+ if (isHostedServer) then {['SRVFNCREQUESTCHANGESCORE',[_player,score _player + _point]] Spawn HandleSPVF};
+ };
+ };
+ };
+
+ /* MySQL */
+ if (mysql) then {
+ _sta = switch (true) do {
+ case (_objectType isKindOf "Infantry"): {1};
+ case (_objectType isKindOf "Car"): {2};
+ case (_objectType isKindOf "Ship"): {2};
+ case (_objectType isKindOf "Motorcycle"): {1};
+ case (_objectType isKindOf "Tank"): {4};
+ case (_objectType isKindOf "Helicopter"): {6};
+ case (_objectType isKindOf "Plane"): {8};
+ case (_objectType isKindOf "StaticWeapon"): {3};
+ case (_objectType isKindOf "Building"): {3};
+ default {1};
+ };
+ if (isServer) then {
+ if (_iskilledplayer) then {
+ WF_Logic setVariable ["WF_MYSQL_SERVER",(WF_Logic getVariable "WF_MYSQL_SERVER") + [Format ["MYSQLDATA?WFBE_InsertOrUpdate_PKP?%1?%2?%3?%4?%5",_killeduid,_killedname,_killeruid,_killername,worldName]]];
+ WF_Logic setVariable ["WF_MYSQL_SERVER",(WF_Logic getVariable "WF_MYSQL_SERVER") + [Format ["MYSQLDATA?WFBE_InsertOrUpdate_PKAI?%1?%2?%3?%4?%5?%6",_killertype,_killeduid,_killedname,"killedby",_sta,worldName]]];
+ } else {
+ WF_Logic setVariable ["WF_MYSQL_SERVER",(WF_Logic getVariable "WF_MYSQL_SERVER") + [Format ["MYSQLDATA?WFBE_InsertOrUpdate_PKAI?%1?%2?%3?%4?%5?%6",_objectType,_killeruid,_killername,"killed",_sta,worldName]]];
+ };
+ } else {
+ if (_iskilledplayer) then {
+ WF_Logic setVariable ["WF_MYSQL_CLIENT",(WF_Logic getVariable "WF_MYSQL_CLIENT") + [Format ["MYSQLDATA?WFBE_InsertOrUpdate_PKP?%1?%2?%3?%4?%5",_killeduid,_killedname,_killeruid,_killername,worldName]],true];
+ WF_Logic setVariable ["WF_MYSQL_CLIENT",(WF_Logic getVariable "WF_MYSQL_CLIENT") + [Format ["MYSQLDATA?WFBE_InsertOrUpdate_PKAI?%1?%2?%3?%4?%5?%6",_killertype,_killeduid,_killedname,"killedby",_sta,worldName]],true];
+ } else {
+ WF_Logic setVariable ["WF_MYSQL_CLIENT",(WF_Logic getVariable "WF_MYSQL_CLIENT") + [Format ["MYSQLDATA?WFBE_InsertOrUpdate_PKAI?%1?%2?%3?%4?%5?%6",_objectType,_killeruid,_killername,"killed",_sta,worldName]],true];
+ };
+ };
+ };
+ };
+
+ if (mysql) then {
+ if (_isAIControlled) then {
+ if (isServer) then {
+ if (mysql && _iskilledplayer) then {
+ WF_Logic setVariable ["WF_MYSQL_SERVER",(WF_Logic getVariable "WF_MYSQL_SERVER") + [Format ["MYSQLDATA?WFBE_InsertOrUpdate_PKAI?%1?%2?%3?%4?0?%5",_killertype,_killeduid,_killedname,"killedby",worldName]]];
+ };
+ } else {
+ if (mysql && _iskilledplayer) then {
+ WF_Logic setVariable ["WF_MYSQL_CLIENT",(WF_Logic getVariable "WF_MYSQL_CLIENT") + [Format ["MYSQLDATA?WFBE_InsertOrUpdate_PKAI?%1?%2?%3?%4?0?%5",_killertype,_killeduid,_killedname,"killedby",worldName]],true];
+ };
+ };
+ };
+ };
+
+ /* Playable AI Kill */
+ if (paramAI && _killerID > 0 && _isAIControlled) then {
+ if (isServer) then {
+ _bounty = (_get select QUERYUNITPRICE) * ('WFBE_BOUNTYMODIFIER' Call GetNamespace);
+ _bounty = _bounty - (_bounty % 1);
+ [_killerTeam,_bounty] Call ChangeTeamFunds;
+ };
+ };
+};
+
+//--- Teamkill.
+if (!isNull _killerTeam && !isNil '_get' && (_sideKiller != sideEnemy) && (_sideKiller == _sideVictim) && (_sideKiller != Civilian) && _isMan) then {
+ if (_killerID > 0 && !_isAIControlled) then {
+ WFBE_LocalizeMessage = [_killerVehName,'CLTFNCLOCALIZEMESSAGE',['Teamkill']];
+ publicVariable 'WFBE_LocalizeMessage';
+ if (isHostedServer) then {[_killerVehName,'CLTFNCLOCALIZEMESSAGE',['Teamkill']] Spawn HandlePVF};
+ if (mysql) then {
+ if (isServer) then {
+ WF_Logic setVariable ["WF_MYSQL_SERVER",(WF_Logic getVariable "WF_MYSQL_SERVER") + [Format ["MYSQLDATA?WFBE_Update?%1?%2?teamkill?%3",_killeruid,_killername,worldName]]];
+ } else {
+ WF_Logic setVariable ["WF_MYSQL_CLIENT",(WF_Logic getVariable "WF_MYSQL_CLIENT") + [Format ["MYSQLDATA?WFBE_Update?%1?%2?teamkill?%3",_killeruid,_killername,worldName]],true];
+ };
+ };
+ };
+};
diff --git a/Common/Functions/Common_UpdateStatistics.sqf b/Common/Functions/Common_UpdateStatistics.sqf
new file mode 100644
index 0000000..5fd0ef6
--- /dev/null
+++ b/Common/Functions/Common_UpdateStatistics.sqf
@@ -0,0 +1 @@
+Private ['_side','_val','_var']; _side = _this select 0; _var = _this select 1; _val = _this select 2; WF_Logic setVariable [Format["%1%2",_side,_var],((WF_Logic getVariable Format["%1%2",_side,_var]) + _val),true]; \ No newline at end of file
diff --git a/Common/Functions/Common_UseStationaryDefense.sqf b/Common/Functions/Common_UseStationaryDefense.sqf
new file mode 100644
index 0000000..6f90f09
--- /dev/null
+++ b/Common/Functions/Common_UseStationaryDefense.sqf
@@ -0,0 +1,32 @@
+Private["_count","_defense","_defenses","_defenseTypes","_emptyDefenses","_range","_total","_totalDefenses","_unit","_units"];
+
+_units = _this select 0;
+_range = _this select 1;
+
+_total = count _units;
+if (_total < 1) exitWith {diag_log Format["[WFBE (ERROR)][frameno:%1 | ticktime:%2] Common_UseStationaryDefense.sqf: No units were specified",diag_frameno,diag_tickTime]};
+
+_defenseTypes = Format["WFBE_%1DEFENSENAMES",side leader group (_units select 0)] Call GetNamespace;
+_defenses = (leader group (_units select 0)) nearEntities[_defenseTypes,_range];
+
+_emptyDefenses = [];
+
+{if (_x EmptyPositions "gunner" > 0) then {_emptyDefenses = _emptyDefenses + [_x]}} forEach _defenses;
+
+for [{_count = 0},{_count < _total},{_count = _count + 1}] do
+{
+ _unit = _units select _count;
+
+ _totalDefenses = count _emptyDefenses;
+ if (_totalDefenses < 1) exitWith {};
+
+ //If not in a vehicle then check for available defense.
+ if (alive _unit && _unit == vehicle _unit) then
+ {
+ _defense = _emptyDefenses select (_totalDefenses - 1);
+
+ [_unit] allowGetIn true;
+ _unit assignAsGunner _defense;
+ _emptyDefenses = _emptyDefenses - [_defense];
+ };
+}; \ No newline at end of file
diff --git a/Common/Init/Init_Airfield.sqf b/Common/Init/Init_Airfield.sqf
new file mode 100644
index 0000000..14f56e8
--- /dev/null
+++ b/Common/Init/Init_Airfield.sqf
@@ -0,0 +1,9 @@
+Private ["_location"];
+_location = _this select 0;
+
+waitUntil {commonInitComplete};
+
+if (isNil "Airfields") then {Airfields = []};
+Airfields = Airfields + [_location];
+
+diag_log Format["[WFBE (INIT)][frameno:%4 | ticktime:%5] Init_Airfield: Airfield initialization (position: %1 - item: %2 (%3)) - [Done]",getPos _location,_location,typeOf _location,diag_frameno,diag_tickTime]; \ No newline at end of file
diff --git a/Common/Init/Init_Boundaries.sqf b/Common/Init/Init_Boundaries.sqf
new file mode 100644
index 0000000..9f55ba7
--- /dev/null
+++ b/Common/Init/Init_Boundaries.sqf
@@ -0,0 +1,38 @@
+Private ['_boundariesXY'];
+_boundariesXY = -1;
+
+switch (toLower(worldName)) do {
+ case 'chernarus': {_boundariesXY = 15360};
+ case 'eden': {_boundariesXY = 12800};
+ case 'fallujah': {_boundariesXY = 10240};
+ case 'isladuala': {_boundariesXY = 10240};
+ case 'panthera2': {_boundariesXY = 10240};
+ case 'queshkibrul': {_boundariesXY = 5120};
+ case 'sara': {_boundariesXY = 20480};
+ case 'saraLite': {_boundariesXY = 10240};
+ case 'takistan': {_boundariesXY = 12800};
+ case 'utes': {_boundariesXY = 5120};
+ case 'yapal': {_boundariesXY = 5120};
+ case 'zargabad': {_boundariesXY = 8192};
+};
+
+if (paramBoundaries) then {
+ if (_boundariesXY == -1) then {
+ paramBoundaries = false;
+ if (local player) then {
+ BoundariesIsOnMap = nil;
+ BoundariesHandleOnMap = nil;
+ };
+ diag_log Format["[WFBE (INFORMATION)][frameno:%2 | ticktime:%3] Init_Boundaries: There is no proper boundaries set for the island '%1'",worldName,diag_frameno,diag_tickTime];
+ } else {
+ ['WFBE_BOUNDARIESXY',_boundariesXY,true] Call SetNamespace;
+ diag_log Format["[WFBE (INIT)][frameno:%3 | ticktime:%4] Init_Boundaries: Boundaries found for the island '%1' %2",worldName,_boundariesXY,diag_frameno,diag_tickTime];
+ };
+} else {
+ if (_boundariesXY == -1) then {
+ diag_log Format["[WFBE (INFORMATION)][frameno:%2 | ticktime:%3] Init_Boundaries: There is no proper boundaries set for the island '%1'",worldName,diag_frameno,diag_tickTime];
+ } else {
+ ['WFBE_BOUNDARIESXY',_boundariesXY,true] Call SetNamespace;
+ diag_log Format["[WFBE (INIT)][frameno:%3 | ticktime:%4] Init_Boundaries: Boundaries found for the island '%1' %2 [Boundaries parameter is disabled]",worldName,_boundariesXY,diag_frameno,diag_tickTime];
+ };
+}; \ No newline at end of file
diff --git a/Common/Init/Init_Camp.sqf b/Common/Init/Init_Camp.sqf
new file mode 100644
index 0000000..9a31709
--- /dev/null
+++ b/Common/Init/Init_Camp.sqf
@@ -0,0 +1,85 @@
+Private ['_camp','_camps','_flagPole','_index','_marker','_supplyValue','_town'];
+
+_camp = _this select 0;
+_town = _this select 1;
+
+waitUntil {townModeSet};
+if (isNull _town && !isNull _camp) exitWith {
+ if (isServer) then {
+ if (isNil 'EastMHQ' || isNil 'WestMHQ') exitWith {};
+ (getPos _camp) Spawn {
+ Private ["_defenses"];
+ waitUntil {commonInitComplete};
+ _defenses = _this nearEntities[('WFBE_RESISTANCEDEFENSENAMES' Call GetNamespace),250];
+ {deleteVehicle _x} forEach _defenses;
+ };
+ deleteVehicle _camp;
+ };
+};
+if ((str _town) in TownTemplate) exitWith {
+ if (isServer) then {
+ if (isNil 'EastMHQ' || isNil 'WestMHQ') exitWith {};
+ diag_log Format ["[WFBE (INIT)][frameno:%3 | ticktime:%4] Init_Camp: Removing camp %1 (%2) since the town is removed in the towns templates.",_camp,str _town,diag_frameno,diag_tickTime];
+ (getPos _camp) Spawn {
+ Private ["_defenses"];
+ waitUntil {commonInitComplete};
+ _defenses = _this nearEntities[('WFBE_RESISTANCEDEFENSENAMES' Call GetNamespace),250];
+ {deleteVehicle _x} forEach _defenses;
+ };
+ deleteVehicle _camp;
+ };
+};
+
+waitUntil{initJIP};
+if !(paramKeepCamps) exitWith{
+ diag_log Format["[WFBE (INIT)][frameno:%1 | ticktime:%2] Init_Camp: Removing camp %3 due to a parameter (Town: %4) - [Done]",diag_frameno,diag_tickTime,_camp,_town];
+ (getPos _camp) Spawn {
+ Private ["_defenses"];
+ waitUntil {commonInitComplete};
+ _defenses = _this nearEntities[('WFBE_RESISTANCEDEFENSENAMES' Call GetNamespace),250];
+ {deleteVehicle _x} forEach _defenses;
+ };
+ deleteVehicle _camp;
+};
+
+if (isNull _camp) exitWith {diag_log Format["[WFBE (INIT)][frameno:%1 | ticktime:%2] Init_Camp: Camp removed (Town is null) - [Done]",diag_frameno,diag_tickTime];};
+
+_camps = _town getVariable "camps";
+if (isNil "_camps") then {_town setVariable ["camps",[]]};
+_camps = _town getVariable "camps";
+_camps = _camps + [_camp];
+_town setVariable ["camps",_camps];
+_camp setVariable ['town',_town];
+
+diag_log Format["[WFBE (INIT)][frameno:%3 | ticktime:%4] Init_Camp: Camp '%1' of town '%2' initialization - [Done]",str _camp,str _town,diag_frameno,diag_tickTime];
+
+waitUntil {commonInitComplete};
+
+if (local player) then {
+ waitUntil {clientInitComplete};
+
+ _index = _camps find _camp;
+ _marker = Format["%1Camp%2",str _town,_index];
+ createMarkerLocal [_marker,getPos _camp];
+ _marker setMarkerTypeLocal "Strongpoint";
+ _marker setMarkerSizeLocal [0.5,0.5];
+ _marker setMarkerColorLocal ("Resistance" Call GetMarkerColoration);
+};
+
+if (isServer) then {
+ if (isNil 'EastMHQ' || isNil 'WestMHQ') exitWith {};
+
+ sleep 10;
+
+ _supplyValue = 0;
+ if (isNil {_camp getVariable "sideID"}) then {_camp setVariable ["sideID",RESISTANCEID,true]};
+ /* OA Camps are made of kryptonite */
+ if (WF_A2_Arrowhead || WF_A2_CombinedOps) then {_camp addEventHandler ['handleDamage',{false}]};
+ if (isNil {_camp getVariable "supplyValue"}) then {
+ waitUntil {_supplyValue = _town getVariable "supplyValue"; !isNil "_supplyValue"};
+ _camp setVariable ["supplyValue",_supplyValue,true];
+ _flagPole = WFFLAG createVehicle getPos _camp;
+ waitUntil {serverInitComplete && townInit};
+ [_camp,_town,_flagPole] ExecFSM 'Server\FSM\updatecamp.fsm';
+ };
+}; \ No newline at end of file
diff --git a/Common/Init/Init_Common.sqf b/Common/Init/Init_Common.sqf
new file mode 100644
index 0000000..abb5787
--- /dev/null
+++ b/Common/Init/Init_Common.sqf
@@ -0,0 +1,285 @@
+private ['_count'];
+diag_log Format["[WFBE (INIT)][frameno:%2 | ticktime:%3] Init_Common: Init Start at %1",time,diag_frameno,diag_tickTime];
+
+Private ['_count'];
+
+if (paramBalancing) then {BalanceInit = Compile preprocessFile "Common\Functions\Common_BalanceInit.sqf"};
+if !(WF_A2_Vanilla) then {
+ BackpackHasSpace = Compile preprocessFile "Common\Functions\Common_BackpackHasSpace.sqf";
+ EquipBackpack = Compile preprocessFile "Common\Functions\Common_EquipBackpack.sqf";
+};
+BuildingInRange = Compile preprocessFile "Common\Functions\Common_BuildingInRange.sqf";
+ChangeSideSupply = Compile preprocessFile "Common\Functions\Common_ChangeSideSupply.sqf";
+ChangeTeamFunds = Compile preprocessFile "Common\Functions\Common_ChangeTeamFunds.sqf";
+CreateMan = Compile preprocessFile "Common\Functions\Common_CreateUnit.sqf";
+CreateVehi = Compile preprocessFile "Common\Functions\Common_CreateVehicle.sqf";
+EquipArtillery = Compile preprocessFile "Common\Functions\Common_EquipArtillery.sqf";
+EquipLoadout = Compile preprocessFile "Common\Functions\Common_EquipLoadout.sqf";
+FireArtillery = Compile preprocessFile "Common\Functions\Common_FireArtillery.sqf";
+GetAIDigit = Compile preprocessFile "Common\Functions\Common_GetAIDigit.sqf";
+GetClientID = Compile preprocessFile "Common\Functions\Common_GetClientID.sqf";
+GetClientTeam = Compile preprocessFile "Common\Functions\Common_GetClientTeam.sqf";
+GetClosestLocation = Compile preprocessFile "Common\Functions\Common_GetClosestLocation.sqf";
+GetClosestLocationBySide = Compile preprocessFile "Common\Functions\Common_GetClosestLocationBySide.sqf";
+GetCommanderFromVotes = Compile preprocessFile "Common\Functions\Common_GetCommanderFromVotes.sqf";
+GetCommanderTeam = Compile preprocessFile "Common\Functions\Common_GetCommanderTeam.sqf";
+GetCommanderVotes = Compile preprocessFile "Common\Functions\Common_GetCommanderVotes.sqf";
+GetConfigInfo = Compile preprocessFile "Common\Functions\Common_GetConfigInfo.sqf";
+GetFactories = Compile preprocessFile "Common\Functions\Common_GetFactories.sqf";
+GetFriendlyCamps = Compile preprocessFile "Common\Functions\Common_GetFriendlyCamps.sqf";
+GetGroupFromConfig = Compile preprocessFile "Common\Functions\Common_GetGroupFromConfig.sqf";
+GetHostilesInArea = Compile preprocessFile "Common\Functions\Common_GetHostilesInArea.sqf";
+GetLiveUnits = Compile preprocessFile "Common\Functions\Common_GetLiveUnits.sqf";
+GetNamespace = Compile preprocessFile "Common\Functions\Common_GetNamespace.sqf";
+GetPositionFrom = Compile preprocessFile "Common\Functions\Common_GetPositionFrom.sqf";
+GetRandomPosition = Compile preprocessFile "Common\Functions\Common_GetRandomPosition.sqf";
+GetRespawnCamps = Compile preprocessFile "Common\Functions\Common_GetRespawnCamps.sqf";
+GetSafePlace = Compile preprocessFile "Common\Functions\Common_GetSafePlace.sqf";
+GetSideFromID = Compile preprocessFile "Common\Functions\Common_GetSideFromID.sqf";
+GetSideHQ = Compile preprocessFile "Common\Functions\Common_GetSideHQ.sqf";
+GetSideHQDeployed = Compile preprocessFile "Common\Functions\Common_GetSideHQDeployed.sqf";
+GetSideID = Compile preprocessFile "Common\Functions\Common_GetSideID.sqf";
+GetSideStructures = Compile preprocessFile "Common\Functions\Common_GetSideStructures.sqf";
+GetSideSupply = Compile preprocessFile "Common\Functions\Common_GetSideSupply.sqf";
+GetSideUpgrades = Compile preprocessFile "Common\Functions\Common_GetSideUpgrades.sqf";
+GetSideTowns = Compile preprocessFile "Common\Functions\Common_GetSideTowns.sqf";
+GetSleepFPS = Compile preprocessFile "Common\Functions\Common_GetSleepFPS.sqf";
+GetTeamArtillery = Compile preprocessFile "Common\Functions\Common_GetTeamArtillery.sqf";
+GetTeamAutonomous = Compile preprocessFile "Common\Functions\Common_GetTeamAutonomous.sqf";
+GetTeamFunds = Compile preprocessFile "Common\Functions\Common_GetTeamFunds.sqf";
+GetTeamMoveMode = Compile preprocessFile "Common\Functions\Common_GetTeamMoveMode.sqf";
+GetTeamMovePos = Compile preprocessFile "Common\Functions\Common_GetTeamMovePos.sqf";
+GetTeamRespawn = Compile preprocessFile "Common\Functions\Common_GetTeamRespawn.sqf";
+GetTeamType = Compile preprocessFile "Common\Functions\Common_GetTeamType.sqf";
+GetTeamVehicles = Compile preprocessFile "Common\Functions\Common_GetTeamVehicles.sqf";
+GetTotalCamps = Compile preprocessFile "Common\Functions\Common_GetTotalCamps.sqf";
+GetTotalCampsOnSide = Compile preprocessFile "Common\Functions\Common_GetTotalCampsOnSide.sqf";
+GetTotalSupplyValue = Compile preprocessFile "Common\Functions\Common_GetTotalSupplyValue.sqf";
+GetTownsHeld = Compile preprocessFile "Common\Functions\Common_GetTownsHeld.sqf";
+GetTownsIncome = Compile preprocessFile "Common\Functions\Common_GetTownsIncome.sqf";
+GetUnitsBelowHeight = Compile preprocessFile "Common\Functions\Common_GetUnitsBelowHeight.sqf";
+GetUnitVehicle = Compile preprocessFile "Common\Functions\Common_GetUnitVehicle.sqf";
+HandleArtillery = Compile preprocessFile "Common\Functions\Common_HandleArtillery.sqf";
+HandleIncomingMissile = Compile preprocessFile "Common\Functions\Common_HandleIncomingMissile.sqf";
+IsArtillery = Compile preprocessFile "Common\Functions\Common_IsArtillery.sqf";
+MarkerUpdate = Compile preprocessFile "Common\Common_MarkerUpdate.sqf";
+PlaceNear = Compile preprocessFile "Common\Functions\Common_PlaceNear.sqf";
+PlaceSafe = Compile preprocessFile "Common\Functions\Common_PlaceSafe.sqf";
+if !(WF_A2_Vanilla) then {
+ GetTurretsMags = Compile preprocessFile "Common\Functions\Common_GetTurretsMags.sqf";
+ GetVehicleMags = Compile preprocessFile "Common\Functions\Common_GetVehicleMags.sqf";
+ RearmVehicle = Compile preprocessFile "Common\Functions\Common_RearmVehicleOA.sqf";
+ SetTurretsMags = Compile preprocessFile "Common\Functions\Common_SetTurretsMags.sqf";
+} else {
+ RearmVehicle = Compile preprocessFile "Common\Functions\Common_RearmVehicle.sqf";
+};
+RevealArea = Compile preprocessFile "Common\Functions\Common_RevealArea.sqf";
+SetCommanderVotes = Compile preprocessFile "Common\Functions\Common_SetCommanderVotes.sqf";
+SetNamespace = Compile preprocessFile "Common\Functions\Common_SetNamespace.sqf";
+SetTeamAutonomous = Compile preprocessFile "Common\Functions\Common_SetTeamAutonomous.sqf";
+SetTeamRespawn = Compile preprocessFile "Common\Functions\Common_SetTeamRespawn.sqf";
+SetTeamMoveMode = Compile preprocessFile "Common\Functions\Common_SetTeamMoveMode.sqf";
+SetTeamMovePos = Compile preprocessFile "Common\Functions\Common_SetTeamMovePos.sqf";
+SetTeamType = Compile preprocessFile "Common\Functions\Common_SetTeamType.sqf";
+SpawnTurrets = Compile preprocessFile "Common\Functions\Common_SpawnTurrets.sqf";
+SortByDistance = Compile preprocessFile "Common\Functions\Common_SortByDistance.sqf";
+UnitKilled = Compile preprocessFile "Common\Functions\Common_UnitKilled.sqf";
+UpdateStatistics = Compile preprocessFile "Common\Functions\Common_UpdateStatistics.sqf";
+UseStationaryDefense = Compile preprocessFile "Common\Functions\Common_UseStationaryDefense.sqf";
+if (paramICBM) then {
+ NukeDammage = Compile preprocessFile "Client\Module\Nuke\damage.sqf";
+ NukeRadiation = Compile preprocessFile "Client\Module\Nuke\radzone.sqf";
+};
+
+diag_log Format["[WFBE (INIT)][frameno:%1 | ticktime:%2] Init_Common: Functions - [Done]",diag_frameno,diag_tickTime];
+
+varQueu = (random 10)+(random 100)+(random 1000);
+
+EastCommanderTeam = ObjNull;
+WestCommanderTeam = ObjNull;
+
+/* Starting Supply */
+if (isNil "EastSupplies") then {EastSupplies = if (WF_Debug) then {900000} else {1200}};
+if (isNil "WestSupplies") then {WestSupplies = if (WF_Debug) then {900000} else {1200}};
+
+diag_log Format["[WFBE (INIT)][frameno:%3 | ticktime:%4] Init_Common: Starting Supply (West: %1 East: %2) - [Done]",WestSupplies,EastSupplies,diag_frameno,diag_tickTime];
+
+/* Starting Money */
+['WFBE_EASTSTARTINGMONEY',if (WF_Debug) then {900000} else {800},false] Call SetNamespace;
+['WFBE_WESTSTARTINGMONEY',if (WF_Debug) then {900000} else {800},false] Call SetNamespace;
+
+diag_log Format["[WFBE (INIT)][frameno:%3 | ticktime:%4] Init_Common: Starting Funds (West: %1 East: %2) - [Done]",'WFBE_WESTSTARTINGMONEY' Call GetNamespace,'WFBE_EASTSTARTINGMONEY' Call GetNamespace,diag_frameno,diag_tickTime];
+
+/* Allies */
+if (('WFBE_ALLIES' Call GetNamespace) > 0) then {
+ westAlliesFunds = ('WFBE_WESTSTARTINGMONEY' Call GetNamespace)*5;
+ eastAlliesFunds = ('WFBE_EASTSTARTINGMONEY' Call GetNamespace)*5;
+
+ diag_log Format["[WFBE (INIT)][frameno:%3 | ticktime:%4] Init_Common: Allies Starting Funds (West: %1 East: %2) - [Done]",('WFBE_WESTSTARTINGMONEY' Call GetNamespace)*5,('WFBE_EASTSTARTINGMONEY' Call GetNamespace)*5,diag_frameno,diag_tickTime];
+};
+
+unitMarker = 0;
+
+for [{_count = 0},{_count < maxPlayers},{_count = _count + 1}] do {
+ Call Compile Format["if (IsNil 'EastTeam%1Vote') then {EastTeam%1Vote = -1}",_count + 1];
+ Call Compile Format["if (IsNil 'WestTeam%1Vote') then {WestTeam%1Vote = -1}",_count + 1];
+};
+
+/* Respawn Markers */
+createMarkerLocal ["respawn_east",getMarkerPos "EastTempRespawnMarker"];
+"respawn_east" setMarkerColorLocal "ColorGreen";
+"respawn_east" setMarkerShapeLocal "RECTANGLE";
+"respawn_east" setMarkerBrushLocal "BORDER";
+"respawn_east" setMarkerSizeLocal [15,15];
+"respawn_east" setMarkerAlphaLocal 0;
+createMarkerLocal ["respawn_west",getMarkerPos "WestTempRespawnMarker"];
+"respawn_west" setMarkerColorLocal "ColorGreen";
+"respawn_west" setMarkerShapeLocal "RECTANGLE";
+"respawn_west" setMarkerBrushLocal "BORDER";
+"respawn_west" setMarkerSizeLocal [15,15];
+"respawn_west" setMarkerAlphaLocal 0;
+
+/* Prepare the common constants */
+[] Call Compile preprocessFile "Common\Init\Init_CommonConstants.sqf";
+
+if (('WFBE_ISIS' Call GetNamespace) != 0) then {
+ ISIS_Heal = Compile preprocessFile "Client\Module\ISIS\ISIS_Heal.sqf";
+ ISIS_Wound = Compile preprocessFile "Client\Module\ISIS\ISIS_Wound.sqf";
+ ISIS_Wounded = Compile preprocessFile "Client\Module\ISIS\ISIS_Wounded.sqf";
+};
+
+/* Wait for BIS Module Init */
+waitUntil {!(isNil 'BIS_fnc_init')};
+waitUntil {BIS_fnc_init};
+
+/* CORE SYSTEM - Start
+ Different Core are added depending on the current ArmA Version running, add yours bellow.
+*/
+switch (true) do {
+ case WF_A2_Vanilla: {
+ /* Gear Core */
+ [] Call Compile preprocessFile 'Common\Config\Core_Gear\Core_Vanilla_G.sqf';
+ /* Class Core */
+ [] Call Compile preprocessFile 'Common\Config\Core\Core_CDF.sqf';
+ [] Call Compile preprocessFile 'Common\Config\Core\Core_CIV.sqf';
+ [] Call Compile preprocessFile 'Common\Config\Core\Core_FR.sqf';
+ [] Call Compile preprocessFile 'Common\Config\Core\Core_GUE.sqf';
+ [] Call Compile preprocessFile 'Common\Config\Core\Core_INS.sqf';
+ [] Call Compile preprocessFile 'Common\Config\Core\Core_MVD.sqf';
+ [] Call Compile preprocessFile 'Common\Config\Core\Core_RU.sqf';
+ [] Call Compile preprocessFile 'Common\Config\Core\Core_Spetsnaz.sqf';
+ [] Call Compile preprocessFile 'Common\Config\Core\Core_USMC.sqf';
+
+ /* Call in the teams template - Vanilla */
+ [] Call Compile preprocessFile 'Common\Config\Core_Definition\Vanilla\Definition_USMC_RU.sqf';
+ };
+ case WF_A2_Arrowhead: {
+ /* Gear Core */
+ [] Call Compile preprocessFile 'Common\Config\Core_Gear\Core_Arrowhead_G.sqf';
+ [] Call Compile preprocessFile 'Common\Config\Core_Gear\Core_BAF_G.sqf';
+ [] Call Compile preprocessFile 'Common\Config\Core_Gear\Core_PMC_G.sqf';
+ /* Class Core */
+ [] Call Compile preprocessFile 'Common\Config\Core\Core_ACR.sqf';
+ [] Call Compile preprocessFile 'Common\Config\Core\Core_BAF.sqf';
+ [] Call Compile preprocessFile 'Common\Config\Core\Core_BAFD.sqf';
+ [] Call Compile preprocessFile 'Common\Config\Core\Core_BAFW.sqf';
+ [] Call Compile preprocessFile 'Common\Config\Core\Core_DeltaForce.sqf';
+ [] Call Compile preprocessFile 'Common\Config\Core\Core_KSK.sqf';
+ [] Call Compile preprocessFile 'Common\Config\Core\Core_PMC.sqf';
+ [] Call Compile preprocessFile 'Common\Config\Core\Core_TKA.sqf';
+ [] Call Compile preprocessFile 'Common\Config\Core\Core_TKCIV.sqf';
+ [] Call Compile preprocessFile 'Common\Config\Core\Core_TKGUE.sqf';
+ [] Call Compile preprocessFile 'Common\Config\Core\Core_TKSF.sqf';
+ [] Call Compile preprocessFile 'Common\Config\Core\Core_US.sqf';
+
+ /* Call in the teams template - Arrowhead */
+ [] Call Compile preprocessFile 'Common\Config\Core_Definition\Arrowhead\Definition_US_TKA.sqf';
+ };
+ case WF_A2_CombinedOps: {
+ /* Gear Core */
+ [] Call Compile preprocessFile 'Common\Config\Core_Gear\Core_Vanilla_G.sqf';
+ [] Call Compile preprocessFile 'Common\Config\Core_Gear\Core_Arrowhead_G.sqf';
+ [] Call Compile preprocessFile 'Common\Config\Core_Gear\Core_BAF_G.sqf';
+ [] Call Compile preprocessFile 'Common\Config\Core_Gear\Core_PMC_G.sqf';
+ /* Class Core */
+ [] Call Compile preprocessFile 'Common\Config\Core\Core_ACR.sqf';
+ [] Call Compile preprocessFile 'Common\Config\Core\Core_BAF.sqf';
+ [] Call Compile preprocessFile 'Common\Config\Core\Core_BAFD.sqf';
+ [] Call Compile preprocessFile 'Common\Config\Core\Core_BAFW.sqf';
+ [] Call Compile preprocessFile 'Common\Config\Core\Core_CDF.sqf';
+ [] Call Compile preprocessFile 'Common\Config\Core\Core_CIV.sqf';
+ [] Call Compile preprocessFile 'Common\Config\Core\Core_DeltaForce.sqf';
+ [] Call Compile preprocessFile 'Common\Config\Core\Core_FR.sqf';
+ [] Call Compile preprocessFile 'Common\Config\Core\Core_GUE.sqf';
+ [] Call Compile preprocessFile 'Common\Config\Core\Core_INS.sqf';
+ [] Call Compile preprocessFile 'Common\Config\Core\Core_KSK.sqf';
+ [] Call Compile preprocessFile 'Common\Config\Core\Core_MVD.sqf';
+ [] Call Compile preprocessFile 'Common\Config\Core\Core_PMC.sqf';
+ [] Call Compile preprocessFile 'Common\Config\Core\Core_RU.sqf';
+ [] Call Compile preprocessFile 'Common\Config\Core\Core_Spetsnaz.sqf';
+ [] Call Compile preprocessFile 'Common\Config\Core\Core_TKA.sqf';
+ [] Call Compile preprocessFile 'Common\Config\Core\Core_TKCIV.sqf';
+ [] Call Compile preprocessFile 'Common\Config\Core\Core_TKGUE.sqf';
+ [] Call Compile preprocessFile 'Common\Config\Core\Core_TKSF.sqf';
+ [] Call Compile preprocessFile 'Common\Config\Core\Core_US.sqf';
+ [] Call Compile preprocessFile 'Common\Config\Core\Core_USMC.sqf';
+
+ /* Call in the teams template - Combined Operations */
+ [] Call Compile preprocessFile 'Common\Config\Core_Definition\CombinedOps\Definition_US_RU.sqf';
+
+ /* Mods */
+ if (WF_ACE) then {
+ [] Call Compile preprocessFile 'Common\Config\Core_Gear\Core_ACE_G.sqf';
+ [] Call Compile preprocessFile 'Common\Config\Core\Core_ACE_US_D.sqf';
+ [] Call Compile preprocessFile 'Common\Config\Core\Core_ACE_US_W.sqf';
+ };
+ };
+};
+/* CORE SYSTEM - End */
+
+diag_log Format["[WFBE (INIT)][frameno:%1 | ticktime:%2] Init_Common: Core Loading - [Done]",diag_frameno,diag_tickTime];
+
+//--- Common Exec.
+[] Call Compile preprocessFile "Common\Init\Init_PublicVariables.sqf";
+[] Call Compile preprocessFile "Common\Config\Config_Special.sqf";
+[] Call Compile preprocessFile "Common\Config\Config_Artillery.sqf";
+[] Call Compile preprocessFile "Common\Config\Config_Barracks.sqf";
+[] Call Compile preprocessFile "Common\Config\Config_LightFactory.sqf";
+[] Call Compile preprocessFile "Common\Config\Config_HeavyFactory.sqf";
+[] Call Compile preprocessFile "Common\Config\Config_AircraftFactory.sqf";
+[] Call Compile preprocessFile "Common\Config\Config_Airport.sqf";
+[] Call Compile preprocessFile "Common\Config\Config_Depot.sqf";
+[] Call Compile preprocessFile "Common\Config\Config_Structures.sqf";
+[] Call Compile preprocessFile "Common\Config\Config_Squads.sqf";
+[] Call Compile preprocessFile "Common\Config\Config_Loadouts.sqf";
+
+//--- Server Exec.
+if (isServer) then {
+ [] Call Compile preprocessFile "Common\Config\Config_Resistance.sqf";
+ [] Call Compile preprocessFile "Common\Config\Config_Occupation.sqf";
+
+ //--- Allies.
+ if (('WFBE_ALLIES' Call GetNamespace) > 0) then {[] Call Compile preprocessFile "Common\Config\Config_Allies.sqf"};
+};
+
+diag_log Format["[WFBE (INIT)][frameno:%1 | ticktime:%2] Init_Common: Config Loading - [Done]",diag_frameno,diag_tickTime];
+
+//--- Boundaries, use setPos to find the perfect spot on other islands and worldName to determine the island name (editor: diag_log worldName; player setPos [0,5120,0]; ).
+[] Call Compile preprocessFile "Common\Init\Init_Boundaries.sqf";
+diag_log Format["[WFBE (INIT)][frameno:%1 | ticktime:%2] Init_Common: Boundaries Loading - [Done]",diag_frameno,diag_tickTime];
+
+//--- Neighbors
+if (('WFBE_TOWNCONQUESTMODE' Call GetNamespace) > 0) then {[] Call Compile preprocessFile "Common\Init\Init_Neighbors.sqf"};
+
+//--- CIPHER Module - Functions.
+[] Call Compile preprocessFile "Common\Module\CIPHER\CIPHER_Init.sqf";
+
+//--- Common initilization is complete at this point.
+diag_log Format["[WFBE (INIT)][frameno:%2 | ticktime:%3] Init_Common: Init End at %1",time,diag_frameno,diag_tickTime];
+commonInitComplete = true;
+
+//--- Variable Destruction.
+{Call Compile Format ["%1 = nil",_x]} forEach ['WFBE_V_West_UnitsRootVersion','WFBE_V_East_UnitsRootVersion','WFBE_V_West_Faction',
+'WFBE_V_East_Faction','WFBE_V_East_SquadsFaction','WFBE_V_West_SquadsFaction','WFBE_V_East_SquadsRootVersion','WFBE_V_West_SquadsRootVersion','WFBE_V_East_Loadout',
+'WFBE_V_West_Loadout','WFBE_V_East_LoadoutRootVersion','WFBE_V_West_LoadoutRootVersion','WFBE_V_West_StructuresFaction','WFBE_V_East_StructuresFaction','WFBE_V_East_StructuresRootVersion',
+'WFBE_V_West_StructuresRootVersion','WFBE_V_West_ArtilleryRootVersion','WFBE_V_West_ArtilleryFaction','WFBE_V_East_ArtilleryRootVersion','WFBE_V_East_ArtilleryFaction']; \ No newline at end of file
diff --git a/Common/Init/Init_CommonConstants.sqf b/Common/Init/Init_CommonConstants.sqf
new file mode 100644
index 0000000..58cfc6c
--- /dev/null
+++ b/Common/Init/Init_CommonConstants.sqf
@@ -0,0 +1,492 @@
+Private ['_resType'];
+
+/* DO NOT CHANGE! */
+EASTID = 128;
+WESTID = 256;
+RESISTANCEID = 512;
+/* DO NOT CHANGE! */
+QUERYUNITLABEL = 0;
+QUERYUNITPICTURE = 1;
+QUERYUNITPRICE = 2;
+QUERYUNITTIME = 3;
+QUERYUNITCREW = 4;
+QUERYUNITUPGRADE = 5;
+QUERYUNITFACTORY = 6;
+QUERYUNITSKILL = 7;
+QUERYUNITFACTION = 8;
+QUERYUNITTURRETS = 9;
+/* DO NOT CHANGE! */
+QUERYGEARLABEL = 0;
+QUERYGEARPICTURE = 1;
+QUERYGEARCLASS = 2;
+QUERYGEARTYPE = 3;
+QUERYGEARCOST = 4;
+QUERYGEARUPGRADE = 5;
+QUERYGEARALLOWED = 6;
+QUERYGEARHANDGUNPOOL = 7;
+QUERYGEARMAGAZINES = 8;
+QUERYGEARSPACE = 9;
+QUERYGEARALLOWTWO = 10;
+
+/* IMPORTANT: New Getter/Setter, variable are stored into missionNamespace, the true/false variable define whether we shall override an existing variable or not */
+//--- How long a vehicle last empty before being sweeped.
+['WFBE_ABANDONVEHICLETIMER',1200,false] Call SetNamespace;
+//--- AI Commander will move the base after this laps of time if all conditions are met.
+['WFBE_AICOMMANDERMOVEINTERVAL',3600,true] Call SetNamespace;
+//--- Global AI Skill (only used over units not present in core).
+['WFBE_AISKILL',0.7,true] Call SetNamespace;
+//--- Maximum AIs that will be able to man defense within the barracks area.
+['WFBE_AIDEFENSE',30,false] Call SetNamespace;
+//--- Allies Parameters (0 Disabled, 1 West, 2 East, 3 both).
+['WFBE_ALLIES',0,false] Call SetNamespace;
+//--- Anti Air Radar Z offset detection.
+['WFBE_ANTIAIRRADARDETECTION',100,true] Call SetNamespace;
+//--- Artillery Computer (0: Disabled, 1: Enabled on Upgrade, 2: Enabled).
+['WFBE_ARTILLERYCOMPUTER',1,false] Call SetNamespace;
+//--- Artillery Range.
+['WFBE_ARTILLERYMAXRANGE',3,false] Call SetNamespace;
+//--- Artillery Laser Detection Range (Per Shell).
+['WFBE_ARTILLERYAMMOLASERRANGE',175,true] Call SetNamespace;
+//--- Artillery SADARM Detection Range (Distance from the core).
+['WFBE_ARTILLERYAMMOSADARMRANGE',200,true] Call SetNamespace;
+//--- Price Focus. (0: Default, 1: Infantry, 2: Tanks, 3: Air).
+['WFBE_BALANCEPRICE',0,false] Call SetNamespace;
+//--- Balanced units.
+['WFBE_BALANCEDUNITS',['HMMWV_Avenger','M6_EP1','Ka52','Ka52Black'],true] Call SetNamespace;
+//--- Base Area Limits.
+['WFBE_BASEAREARANGE',250,true] Call SetNamespace;
+['WFBE_BASEAREAMAX',2,false] Call SetNamespace;
+//--- Bounty Coefficient Modifier (Blood money).
+['WFBE_BOUNTYMODIFIER',0.25,true] Call SetNamespace;
+//--- Bounty Coefficient Modifier, Kill Assist (bounty = (Unit price * WFBE_BOUNTYMODIFIER) * WFBE_BOUNTYMODIFIERASSIST).
+['WFBE_BOUNTYMODIFIERASSIST',0.5,true] Call SetNamespace;
+//--- Building Damage Reduction (Current damage given / x, 1 = normal).
+['WFBE_BUILDINGDAMAGEREDUCTION',6,true] Call SetNamespace;
+//--- Building is sold after x seconds.
+['WFBE_BUILDINGSELLDELAY',240,true] Call SetNamespace;
+//--- Building Limits.
+['WFBE_BUILDINGMAXBARRACKS',3,false] Call SetNamespace;
+['WFBE_BUILDINGMAXLIGHT',3,false] Call SetNamespace;
+['WFBE_BUILDINGMAXCOMMANDCENTER',3,false] Call SetNamespace;
+['WFBE_BUILDINGMAXHEAVY',3,false] Call SetNamespace;
+['WFBE_BUILDINGMAXAIRCRAFT',3,false] Call SetNamespace;
+['WFBE_BUILDINGMAXSERVICEPOINT',6,false] Call SetNamespace;
+//--- Bounty received by player whenever he capture a camp.
+['WFBE_CAMPCAPTUREBOUNTY',100,true] Call SetNamespace;
+//--- Civilian Faction (first is nil).
+if (WF_A2_Vanilla) then {['WFBE_CIVILIANFACTIONS',['','Chernarus Civilians'],true] Call SetNamespace};
+if (WF_A2_Arrowhead) then {['WFBE_CIVILIANFACTIONS',['','Takistan Civilians'],true] Call SetNamespace};
+if (WF_A2_CombinedOps) then {['WFBE_CIVILIANFACTIONS',['','Takistan Civilians','Chernarus Civilians'],true] Call SetNamespace};
+['WFBE_CIVILIANFACTION',0,false] Call SetNamespace;
+//--- Killed Civilians bring a $xxx penalty to the player.
+['WFBE_CIVILIANPENALTY',2500,true] Call SetNamespace;
+//--- Command Center Range.
+['WFBE_COMMANDCENTERRANGE',50000,true] Call SetNamespace;
+//--- Commander bounties.
+['WFBE_COMMANDERBUILDSCORE',1,true] Call SetNamespace;
+['WFBE_COMMANDERTOWNCAPTURECOEF',30,true] Call SetNamespace;
+['WFBE_COMMANDERTOWNCAPTURESCORE',1,true] Call SetNamespace;
+['WFBE_COMMANDERUPGRADESCORE',1,true] Call SetNamespace;
+//--- Counter Measures.
+['WFBE_COUNTERMEASUREPLANES',64,true] Call SetNamespace;
+['WFBE_COUNTERMEASURECHOPPERS',32,true] Call SetNamespace;
+//--- Crew Cost.
+['WFBE_CREWCOST',120,true] Call SetNamespace;
+//--- Within 250 meters, units on defense mode will board defenses.
+['WFBE_DEFENSEMANRANGE',250,false] Call SetNamespace;
+//--- Supply Trucks (Clients) delivery range.
+['WFBE_DELIVERYRANGE',30,true] Call SetNamespace;
+//--- Patrolling Range Ratio.
+['WFBE_DETECTIONTOPATROLRANGERATIO',0.4,true] Call SetNamespace;
+//--- Fast Time skip time rate index.
+['WFBE_FASTTIMERATE',0,false] Call SetNamespace;
+//--- Fast time rates (Seconds = value * 60 * 60).
+['WFBE_FASTTIMERATES',[0,0.000555,0.000833,0.00111,0.00138,0.00277,0.00416,0.00555,0.00694,0.00833],true] Call SetNamespace;
+//--- Fast Travel (0 Disabled, 1 Free, 2 Fee).
+['WFBE_FASTTRAVEL',1,false] Call SetNamespace;
+['WFBE_FASTTRAVELMAXRANGE',3500,true] Call SetNamespace;
+['WFBE_FASTTRAVELPRICEKM',215,true] Call SetNamespace;
+['WFBE_FASTTRAVELRANGE',175,true] Call SetNamespace;
+['WFBE_FASTTRAVELTIMECOEF',1,true] Call SetNamespace;
+//--- Fire mission interval.
+['WFBE_FIREMISSIONTIMEOUT0',300,true] Call SetNamespace;
+['WFBE_FIREMISSIONTIMEOUT1',250,true] Call SetNamespace;
+['WFBE_FIREMISSIONTIMEOUT2',200,true] Call SetNamespace;
+['WFBE_FIREMISSIONTIMEOUT3',150,true] Call SetNamespace;
+//--- Coef per supply delivery.
+['WFBE_FUNDSPERSUPPLYPOINT',2,true] Call SetNamespace;
+//--- Distance above which units are able to perform an HALO jump.
+['WFBE_HALOJUMPHEIGHT',200,true] Call SetNamespace;
+//--- HQ Deploy / Mobilize Price.
+['WFBE_HQDEPLOYPRICE',100,false] Call SetNamespace;
+//--- MHQ Deploy Range.
+['WFBE_HQDEPLOYRANGE',120,false] Call SetNamespace;
+//--- Income Interval (Delay between each paycheck).
+['WFBE_INCOMEINTERVAL',60,false] Call SetNamespace;
+//--- Income System (1:Full, 2:Half (Half -> 120 SV Town = 60$ / 60SV), 3: Commander System, 4: Commander System: Full)
+['WFBE_INCOMESYSTEM',4,false] Call SetNamespace;
+//--- Incoming Guided missiles Range limit (0 = Disabled).
+['WFBE_INCOMINGMISSILEMAXRANGE',0,false] Call SetNamespace;
+//--- ISIS, Injury System (0: Disabled, 1: Leaders only, 2: All).
+['WFBE_ISIS',0,false] Call SetNamespace;
+//--- Map Coloration System (0: Default, 1: Nato).
+['WFBE_MAPCOLORATION',0,false] Call SetNamespace;
+//--- Time that a marker remain on a dead unit.
+['WFBE_MARKERDEADDELAY',60,true] Call SetNamespace;
+//--- Maximum spread area of artillery support.
+['WFBE_MAXARTILLERYAREA',300,true] Call SetNamespace;
+//--- Maximum rate of a camp's capture affecting a town.
+['WFBE_MAXCAMPCAPTURERATE',5,true] Call SetNamespace;
+//--- Maximum Client Group size.
+['WFBE_MAXGROUPSIZE',14,false] Call SetNamespace;
+['WFBE_MAXGROUPSIZEAI',10,false] Call SetNamespace;
+//--- Skill (Soldiers), have more units than the others.
+['WFBE_MAXGZBONUSSKILL',6,true] Call SetNamespace;
+//--- Maximum amount of supply truck per side (AI).
+['WFBE_MAXAISUPPLYTRUCKS',5,true] Call SetNamespace;
+//--- Maximum Clutter Distance (Grass).
+['WFBE_MAXCLUTTERDISTANCE',50,false] Call SetNamespace;
+//--- Maximum Supply per trucks.
+['WFBE_MAXSUPPLYTRUCKSSV0',5,true] Call SetNamespace;
+['WFBE_MAXSUPPLYTRUCKSSV1',7,true] Call SetNamespace;
+['WFBE_MAXSUPPLYTRUCKSSV2',10,true] Call SetNamespace;
+//--- Maximum Client Side View Distance.
+['WFBE_MAXVIEWDISTANCE',4000,false] Call SetNamespace;
+//--- HQ Building Range.
+['WFBE_MHQBUILDINGRANGE',120,true] Call SetNamespace;
+//--- HQ Repair Price.
+['WFBE_MHQREPAIRPRICE',if !(paramMoneyOnly) then {25000} else {50000},true] Call SetNamespace;
+//--- Occupation 'part' (faction) to be used, keep the alias (US..USMC) the same as the files in Core_Occupation.
+if (WF_A2_Vanilla) then {
+ ['WFBE_OCCUPATIONWESTFACTIONS',['CDF','USMC'],true] Call SetNamespace;
+ ['WFBE_OCCUPATIONEASTFACTIONS',['INS','RU'],true] Call SetNamespace;
+ ['WFBE_OCCUPATIONWESTFACTION',1,false] Call SetNamespace;
+ ['WFBE_OCCUPATIONEASTFACTION',1,false] Call SetNamespace;
+};
+if (WF_A2_Arrowhead) then {
+ ['WFBE_OCCUPATIONWESTFACTIONS',['US'],true] Call SetNamespace;
+ ['WFBE_OCCUPATIONEASTFACTIONS',['TKA'],true] Call SetNamespace;
+ ['WFBE_OCCUPATIONWESTFACTION',0,false] Call SetNamespace;
+ ['WFBE_OCCUPATIONEASTFACTION',0,false] Call SetNamespace;
+};
+if (WF_A2_CombinedOps) then {
+ ['WFBE_OCCUPATIONWESTFACTIONS',['CDF','US','USMC'],true] Call SetNamespace;
+ ['WFBE_OCCUPATIONEASTFACTIONS',['INS','RU','TKA'],true] Call SetNamespace;
+ ['WFBE_OCCUPATIONWESTFACTION',1,false] Call SetNamespace;
+ ['WFBE_OCCUPATIONEASTFACTION',1,false] Call SetNamespace;
+};
+//--- East or West Inactive period before being removed (town).
+['WFBE_OCCUPATIONINACTIVETIME',300,true] Call SetNamespace;
+//--- Maximum man-able defenses per town.
+['WFBE_OCCUPATIONMAXDEFENSES',20,true] Call SetNamespace;
+//--- Delay between each occupation reinforcement spawned in town.
+['WFBE_OCCUPATIONREINFORCEMENTDELAY',300,true] Call SetNamespace;
+//--- Town Occupation SV floor.
+['WFBE_OCCUPATIONTEAM1',20,true] Call SetNamespace;
+['WFBE_OCCUPATIONTEAM2',40,true] Call SetNamespace;
+['WFBE_OCCUPATIONTEAM3',60,true] Call SetNamespace;
+['WFBE_OCCUPATIONTEAM4',80,true] Call SetNamespace;
+['WFBE_OCCUPATIONTEAM5',100,true] Call SetNamespace;
+['WFBE_OCCUPATIONTEAM6',120,true] Call SetNamespace;
+//--- Town Occupation AA SV floor.
+['WFBE_OCCUPATIONAATEAM1',50,true] Call SetNamespace;
+['WFBE_OCCUPATIONAATEAM2',100,true] Call SetNamespace;
+//--- Maximum seconds off the map limits.
+['WFBE_OFFMAPMAXTIME',30,true] Call SetNamespace;
+//--- Paratroopers Call Interval.
+['WFBE_PARADELAY',1200,true] Call SetNamespace;
+//--- Unit Patrol Radius.
+['WFBE_PATROLRANGE',400,true] Call SetNamespace;
+//--- Purchase Unit Range.
+['WFBE_PURCHASEUNITSRANGE',150,true] Call SetNamespace;
+['WFBE_PURCHASEUNITSRANGEAIR',50,true] Call SetNamespace;
+//--- Purchase Gear Range.
+['WFBE_PURCHASEGEARRANGE',150,true] Call SetNamespace;
+//--- Repair truck repair range.
+['WFBE_REPAIRTRUCKRANGE',40,true] Call SetNamespace;
+//--- Resistance 'part' (faction) to be used, don't forget to define the types bellow for patrol & strikers, keep the alias (GUE..TKGUE) the same as the files in Core_Resistance.
+if (WF_A2_Vanilla) then {
+ ['WFBE_RESISTANCEFACTIONS',['GUE'],true] Call SetNamespace;
+ ['WFBE_RESISTANCEFACTION',0,false] Call SetNamespace;
+};
+if (WF_A2_Arrowhead) then {
+ ['WFBE_RESISTANCEFACTIONS',['PMC','TKGUE'],true] Call SetNamespace;
+ ['WFBE_RESISTANCEFACTION',1,false] Call SetNamespace;
+};
+if (WF_A2_CombinedOps) then {
+ ['WFBE_RESISTANCEFACTIONS',['GUE','PMC','TKGUE'],true] Call SetNamespace;
+ ['WFBE_RESISTANCEFACTION',2,false] Call SetNamespace;
+};
+//--- Resistance Inactive period before being removed (town).
+['WFBE_RESISTANCEINACTIVETIME',300,true] Call SetNamespace;
+//--- Delay between each resistance reinforcement spawned in town.
+['WFBE_RESISTANCEREINFORCEMENTDELAY',240,true] Call SetNamespace;
+//--- Respawn Camps (0: Disabled, 1: Classic [from town center], 2: Enhanced [from nearby camps]).
+['WFBE_RESPAWNCAMPSMODE',2,false] Call SetNamespace;
+//--- Respawn Camps Rule (0: Disabled, 1: West | East, 2: West | East | Resistance).
+['WFBE_RESPAWNCAMPSRULEMODE',2,false] Call SetNamespace;
+//--- Respawn Delay (Players/AI).
+['WFBE_RESPAWNDELAY',30,false] Call SetNamespace;
+//--- Respawn Penalty (0: None, 1: Remove All, 2: Pay full gear price, 3: Pay 1/2 gear price, 4: pay 1/4 gear price, 5: Charge on Mobile).
+['WFBE_RESPAWNPENALTY',5,false] Call SetNamespace;
+//--- How far a player need to be from a town to spawn at camps.
+['WFBE_RESPAWNRANGE',550,false] Call SetNamespace;
+['WFBE_RESPAWNMINRANGE',50,true] Call SetNamespace;
+//--- How far a player need to be from a mobile respawn in order to spawn on it.
+['WFBE_RESPAWNMOBILERANGE0',250,true] Call SetNamespace;
+['WFBE_RESPAWNMOBILERANGE1',350,true] Call SetNamespace;
+['WFBE_RESPAWNMOBILERANGE2',500,true] Call SetNamespace;
+//--- Advanced Aircraft restriction.
+['WFBE_RESTRICTIONADVAIR',0,false] Call SetNamespace;
+//--- Salvager Sell %.
+['WFBE_SALVAGERPERCENT',30,true] Call SetNamespace;
+//--- Salvager's Range.
+['WFBE_SALVAGERRANGE',20,true] Call SetNamespace;
+//--- Score Gained per town assist.
+['WFBE_SCOREASSISTCAPTURETOWN',5,true] Call SetNamespace;
+//--- Points Gained per camp captire.
+['WFBE_SCORECAPTURECAMP',1,true] Call SetNamespace;
+//--- Score Gained per town capture.
+['WFBE_SCORECAPTURETOWN',10,true] Call SetNamespace;
+//--- Points Received per Supply delivery.
+['WFBE_SCOREPERSUPPLYPOINT',2,true] Call SetNamespace;
+//--- Service points action range.
+['WFBE_SERVICEPOINTRANGE',50,true] Call SetNamespace;
+//--- Sides need at last xkm of distance between them.
+['WFBE_SIDESTARTINGDISTANCE',5000,false] Call SetNamespace;
+//--- Starting Locations Mode: 0 = WN|ES; 1 = WS|EN; 2 = Random;
+['WFBE_STARTINGLOCATIONMODE',2,false] Call SetNamespace;
+//--- When a structure is sold, x% of supply goes back to the side.
+['WFBE_STRUCTURESELLPERCENT',40,false] Call SetNamespace;
+//--- Supply System (0: Trucks, 1: Automatic with time).
+['WFBE_SUPPLYSYSTEM',0,false] Call SetNamespace;
+//--- If SUPPLYSYSTEM == 1 then, we increase of SUPPLYSYSTEMINCREASE each SUPPLYSYSTEMINCREASETIME.
+['WFBE_SUPPLYSYSTEMINCREASE0',1,true] Call SetNamespace;
+['WFBE_SUPPLYSYSTEMINCREASE1',2,true] Call SetNamespace;
+['WFBE_SUPPLYSYSTEMINCREASE2',3,true] Call SetNamespace;
+['WFBE_SUPPLYSYSTEMINCREASETIME',60,true] Call SetNamespace;
+//--- Action range for repair/rearm/refuel.
+['WFBE_SUPPORTRANGE',70,true] Call SetNamespace;
+//--- Price of Support (Base), note that Rearm, Refuel and Repair are using Ratio.
+['WFBE_SUPPORTHEALPRICE',100,true] Call SetNamespace;
+['WFBE_SUPPORTREARMPRICE',4,true] Call SetNamespace;
+['WFBE_SUPPORTREFUELPRICE',16,true] Call SetNamespace;
+['WFBE_SUPPORTREPAIRPRICE',2,true] Call SetNamespace;
+//--- Amount of time required to be able to use an action from the support menu again.
+['WFBE_SUPPORTHEALTIME',25,true] Call SetNamespace;
+['WFBE_SUPPORTREARMTIME',30,true] Call SetNamespace;
+['WFBE_SUPPORTREFUELTIME',20,true] Call SetNamespace;
+['WFBE_SUPPORTREPAIRTIME',40,true] Call SetNamespace;
+//--- Money to be deducted from a teamkiller.
+['WFBE_TEAMKILLPENALTY',500,true] Call SetNamespace;
+//--- Thermal Imaging (0: Disabled, 1: Weapons, 2: Vehicles, 3: All).
+['WFBE_THERMALIMAGING',3,false] Call SetNamespace;
+//--- Bounty received by player whenever he get an assist in a town.
+['WFBE_TOWNASSISTCAPTUREBOUNTY',175,true] Call SetNamespace;
+['WFBE_TOWNMISSIONASSISTCAPTUREBOUNTY',350,true] Call SetNamespace;
+//--- Restrict use of build menu if the player is near a town.
+['WFBE_TOWNBUILDPROTECTIONRANGE',450,false] Call SetNamespace;
+//--- Range Coefficient whenever a player get an assist in a town.
+['WFBE_TOWNCAPTUREASSISTRANGEMODIFIER',0.6,true] Call SetNamespace;
+//--- Bounty received by player whenever he capture a town.
+['WFBE_TOWNCAPTUREBOUNTY',400,true] Call SetNamespace;
+['WFBE_TOWNMISSIONCAPTUREBOUNTY',800,true] Call SetNamespace;
+//--- Town capture mode (0: normal, 1: threshold, 2: all camps[Best Use with PvP]).
+['WFBE_TOWNCAPTUREMODE',1,false] Call SetNamespace;
+//--- Town Depot capture range.
+['WFBE_TOWNCAPTURERANGE',40,true] Call SetNamespace;
+//--- Town Depot capture range (Threshold Capture mode).
+['WFBE_TOWNCAPTURERANGETHRESHOLD',50,true] Call SetNamespace;
+//--- Town Capture rate.
+['WFBE_TOWNCAPTURERATE',1,true] Call SetNamespace;
+//--- Town Conquest mode (0: None, 1: Territoriality 2: (tbd) commander task set). - TODO
+['WFBE_TOWNCONQUESTMODE',0,false] Call SetNamespace;
+//--- Buy Gear From (0: None, 1: Camps, 2: Depot, 3: Camps & Depot).
+['WFBE_TOWNGEAR',1,false] Call SetNamespace;
+//--- Amount of Waypoints given to the AI Patrol in towns (Higher is wider).
+['WFBE_TOWNPATROLHOPS',5,true] Call SetNamespace;
+//--- Town Purchase range.
+['WFBE_TOWNPURCHASERANGE',30,true] Call SetNamespace;
+//--- Town occupation Difficulty (1: Light, 2: Medium, 3: Hard, 4: Insane, 5: Auto).
+['WFBE_TOWNOCCUPATIONDIFFICULTY',1,false] Call SetNamespace;
+//--- Town resistance Difficulty (1: Light, 2: Medium, 3: Hard, 4: Insane).
+['WFBE_TOWNRESISTANCEDIFFICULTY',1,false] Call SetNamespace;
+//--- Town starting mode (0: Resistance, 1: 50% blu, 50% red, 2: Nearby Towns, 3: Random).
+['WFBE_TOWNSTARTINGMODE',0,false] Call SetNamespace;
+//--- Distance between each defensive waypoints.
+['WFBE_TOWNUNITSDEFENSEDISTANCE',30,true] Call SetNamespace;
+//--- Distance between each patrolling waypoints.
+['WFBE_TOWNUNITSPATROLDISTANCE',360,true] Call SetNamespace;
+//--- Unit will spawn within this range.
+['WFBE_TOWNUNITSPAWNRANGE',75,true] Call SetNamespace;
+//--- Interval between each uav spotting routine.
+['WFBE_UAVSPOTTINGDELAY',20,true] Call SetNamespace;
+//--- UAV will reveal each targets that it knows about this value (0-4)
+['WFBE_UAVSPOTTINGDETECTION',0.21,true] Call SetNamespace;
+//--- Max Range of the UAV spotting.
+['WFBE_UAVSPOTTINGRANGE',900,true] Call SetNamespace;
+//--- Units cleaning delay.
+['WFBE_UNITREMOVEDLAY',300,false] Call SetNamespace;
+//--- Victory Condition (0: Annihilation, 1: Assassination, 2: Supremacy, 3: Towns).
+['WFBE_VICTORYCONDITION',2,false] Call SetNamespace;
+//--- Commander vote time.
+['WFBE_VOTETIME',if (WF_Debug) then {6} else {60},true] Call SetNamespace;
+//--- Weather Type, 0: Clear, 1: Cloudy, 2: Rainy, 3: Dynamic)
+['WFBE_WEATHER',0,false] Call SetNamespace;
+//--- Weather Transition period (longer is more realistic).
+['WFBE_WEATHERTRANSITION',600,true] Call SetNamespace;
+//--- Proper worlds (Radio town localization).
+['WFBE_WORLDWHITELISTOA',["Zargabad","Takistan"],true] Call SetNamespace;
+['WFBE_WORLDWHITELISTVA',["chernarus","utes"],true] Call SetNamespace;
+
+if (paramUseWorkers) then {
+ //--- Minimal Distance in order to start building.
+ ['WFBE_WORKERS_BUILDDISTANCE',30,true] Call SetNamespace;
+ //--- Degredation of the building in time during a repair phase (over 100).
+ ['WFBE_WORKERS_DEGRADATION',1,true] Call SetNamespace;
+ //--- Maximum Workers per side.
+ ['WFBE_WORKERS_MAX',10,true] Call SetNamespace;
+ //--- Maximal Traveling distance.
+ ['WFBE_WORKERS_MAXRANGE',650,true] Call SetNamespace;
+ //--- Workers Models.
+ ['WFBE_WORKERS_MODELS_EAST',if (WF_A2_Vanilla) then {["Worker3","Worker1"]} else {["TK_CIV_Worker01_EP1"]}, true] Call SetNamespace;
+ ['WFBE_WORKERS_MODELS_WEST',if (WF_A2_Vanilla) then {["Worker2","Worker4"]} else {["TK_CIV_Worker02_EP1"]}, true] Call SetNamespace;
+ //--- Worker Price
+ ['WFBE_WORKERS_PRICE',500,true] Call SetNamespace;
+ //--- Build Speed Ratio.
+ ['WFBE_WORKERS_RATIO',2,true] Call SetNamespace;
+ //--- Health Point fixed during a repair.
+ ['WFBE_WORKERS_REPAIR',0.0075,true] Call SetNamespace;
+ //--- Ruins model.
+ ['WFBE_WORKERS_RUINS',if (WF_A2_Vanilla) then {"Land_budova4_ruins"} else {"Land_Mil_Barracks_i_ruins_EP1"}, true] Call SetNamespace;
+};
+
+//--- Build area (Radius/Height).
+['WFBE_AREAHQDEPLOYED',[('WFBE_HQDEPLOYRANGE' Call GetNamespace),25],true] Call SetNamespace;
+['WFBE_AREAHQUNDEPLOYED',[('WFBE_HQDEPLOYRANGE' Call GetNamespace)/2,15],true] Call SetNamespace;
+['WFBE_AREAREPAIRTRUCK',[45,10],true] Call SetNamespace;
+
+//--- Construction Module, Flat Detection.
+if (WF_A2_Vanilla) then {
+ ['WFBE_COINMINDISTANCE',8,true] Call SetNamespace;
+ ['WFBE_COINMAXGRADIENT',4,true] Call SetNamespace;
+} else {
+ ['WFBE_COINMINDISTANCE',24,true] Call SetNamespace;
+ ['WFBE_COINMAXGRADIENT',4,true] Call SetNamespace;
+};
+
+//--- Resistance Island Patrol System.
+['WFBE_RESPATROLINTERVAL',1200,true] Call SetNamespace;
+['WFBE_RESPATROL',0,false] Call SetNamespace;
+
+//--- Resistance Strikers.
+['WFBE_RESSTRIKERINTERVAL',1800,true] Call SetNamespace;
+['WFBE_RESSTRIKER',0,false] Call SetNamespace;
+
+/* UPGRADE SYSTEM: */
+//--- Important: If you add any other upgrades, add them at the end, also add a new 0 to init_server.sqf upgrade array.
+
+//--- Desc-Array - added MrNiceGuy
+['WFBE_UPGRADEDESCRIPTION',
+ [localize 'STR_WF_UPGRADE_barracks_Desc',localize 'STR_WF_UPGRADE_lightfactory_Desc',localize 'STR_WF_UPGRADE_heavyfactory_Desc',localize 'STR_WF_UPGRADE_aircraftfactory_Desc',
+ localize 'STR_WF_UPGRADE_Paratroop_Desc',localize 'STR_WF_UPGRADE_uav_Desc',localize 'STR_WF_UPGRADE_Supply_Desc',localize 'STR_WF_UPGRADE_RespawnRange_Desc',
+ localize 'STR_WF_UPGRADE_Airlift_Desc',localize 'STR_WF_UPGRADE_Countermeasures_Desc',localize 'STR_WF_UPGRADE_ArtilleryUpgrade_Desc',localize 'STR_WF_UPGRADE_ICBM_Desc',
+ localize 'STR_WF_UPGRADE_FastTravel_Desc',localize 'STR_WF_UPGRADE_Gear_Desc',localize 'STR_WF_UPGRADE_Ammo_Desc',localize 'STR_WF_UPGRADE_EASA_Desc',
+ localize 'STR_WF_UPGRADE_Paradrop_Desc',localize 'STR_WF_UPGRADE_ArtilleryAmmo_Desc'],
+ true
+] Call SetNamespace;
+
+['WFBE_UPGRADELABELS',
+ [localize 'strwfbarracks',localize 'strwflightfactory',localize 'strwfheavyfactory',localize 'strwfaircraftfactory',localize 'STR_WF_TACTICAL_Paratroop',
+ localize 'str_dn_uav',localize 'STR_WF_UPGRADE_Supply',localize 'STR_WF_UPGRADE_RespawnRange',localize 'STR_WF_UPGRADE_Airlift',localize 'STR_WF_UPGRADE_Countermeasures',
+ localize 'STR_WF_UPGRADE_ArtilleryUpgrade',localize 'STR_WF_ICBM',localize 'STR_WF_TACTICAL_FastTravel',localize 'STR_WF_UPGRADE_Gear',localize 'STR_WF_Ammo','EASA',
+ localize 'STR_WF_TACTICAL_Paradrop', localize 'STR_WF_UPGRADE_ArtilleryAmmo'],
+ true
+] Call SetNamespace;
+//--- Amount of upgrade levels.
+['WFBE_UPGRADELEVELS',[3,3,3,3,3,1,2,2,1,1,3,1,1,3,1,1,1,3],true] Call SetNamespace;
+//--- [upgrade index, upgrade level].
+['WFBE_UPGRADEDEPENDENCIES',[[],[],[],[],[3,1],[3,2],[],[1,2],[],[3,1],[2,1],[3,3],[],[0,1],[13,3],[3,3],[8,1],[10,3]],true] Call SetNamespace;
+//--- Special condition.
+['WFBE_UPGRADECONDITION',[true,true,true,true,true,true,true,true,true,paramCounterMeasures,paramArty,paramICBM,if (('WFBE_FASTTRAVEL' Call GetNamespace) > 0) then {true} else {false},true,true,paramEASA,true,true],true] Call SetNamespace;
+//--- [Supply,Money].
+['WFBE_UPGRADEPRICESLEVEL1',[[300,750],[800,1850],[3600,4000],[5600,11000],[3200,7400],[2500,5600],[1800,6200],[500,1800],[950,2450],[3400,8200],[1200,2950],[50000,80000],[1350,3550],[250,500],[750,2250],[4400,12500],[3250,8800],[2400,4550]],true] Call SetNamespace;
+['WFBE_UPGRADEPRICESLEVEL2',[[400,1150],[1400,2450],[4500,6750],[7600,16000],[3800,8700],[],[3600,12400],[700,2400],[],[],[1800,4400],[],[],[650,2550],[],[],[],[3500,8500]],true] Call SetNamespace;
+['WFBE_UPGRADEPRICESLEVEL3',[[500,1620],[1900,3400],[5500,8050],[9500,21250],[4400,9800],[],[],[],[],[],[3000,7500],[],[],[1400,4250],[],[],[],[6200,12000]],true] Call SetNamespace;
+//--- Time required per upgrade.
+['WFBE_UPGRADETIMESLEVEL1',[40,60,80,100,120,120,140,120,100,120,100,240,260,180,170,160,140,120],true] Call SetNamespace;
+['WFBE_UPGRADETIMESLEVEL2',[60,80,100,120,140,0,160,140,0,0,140,0,0,200,0,0,0,140],true] Call SetNamespace;
+['WFBE_UPGRADETIMESLEVEL3',[80,100,120,180,160,0,0,0,0,0,160,0,0,220,0,0,0,160],true] Call SetNamespace;
+// ['WFBE_UPGRADETIMESLEVEL1',[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],true] Call SetNamespace;
+// ['WFBE_UPGRADETIMESLEVEL2',[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],true] Call SetNamespace;
+// ['WFBE_UPGRADETIMESLEVEL3',[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],true] Call SetNamespace;
+//--- AI COMMANDER priority, we use the upgrade index (0: Barracks, 4: Paratroops...).
+['WFBE_UPGRADEAIORDER',[0,13,1,6,2,12,3,7,10,3,8,4,5,9,11,14,15,16,17],true] Call SetNamespace;
+
+/* Handle the missions (Server Only) */
+if (isServer && paramSecondaryMissions) then {
+ Private ['_initExt','_tpath'];
+ _tpath = 'Server\Missions\';
+ _initExt = '\m_init.sqf';
+
+ //--- Maximum amount of missions allowed per side at a time.
+ ['WFBE_MISSIONSMAXIMUM_WEST',1,true] Call SetNamespace;
+ ['WFBE_MISSIONSMAXIMUM_EAST',1,true] Call SetNamespace;
+ //--- Time randomizer (Affect the timeout).
+ ['WFBE_MISSIONSRANDOMIZER',160,true] Call SetNamespace;
+ //--- Re-usability, after x missions, mission y is available again.
+ ['WFBE_MISSIONSREUSABILITY',10,true] Call SetNamespace;
+ //--- Time to wait between each missions.
+ ['WFBE_MISSIONSTIMEOUT',2400,true] Call SetNamespace;
+
+ //--- Assign a content.
+ /*
+ all templates need at least a m_init.sqf
+
+ [
+ [island array, * = all, ! = not in, put the worldnames in otherwise],
+ temp path + folder name in templates + init name (path to the template folder),
+ unique identifier (template name or something, avoid duplicated names),
+ starting index (used in case of duplicated template allowed), 0 is ok to start with,
+ condition for template to be 'selectable', keep it as if it was a if (true/false condition), as it will be compiled inside a if on the fly (i.e: time > 600).
+ run for who? both(civ)? west? east?
+ ].
+
+ Each mission receive 3 defaults parameters, the unique identifier, the starting index and the selected index.
+ */
+
+ ['WFBE_M_CONTENT',[
+ [['*'],(_tpath + 'M_UAV_RetrieveModule' + _initExt),'M_UAV_RetrieveModule',0,"true",civilian], /* UAV Retrieving Mission, Any islands, No conditions, Both. */
+ [['*'],(_tpath + 'M_TOWN_Attack' + _initExt),'M_TOWN_AttackWest',0,"time > 1200",west], /* Town Assault, resistance attack a town, require at least a town (we wait a bit), west. */
+ [['*'],(_tpath + 'M_TOWN_Attack' + _initExt),'M_TOWN_AttackEast',0,"time > 1200",east], /* Town Assault, resistance attack a town, require at least a town (we wait a bit), east. */
+ [['*'],(_tpath + 'M_BASE_Attack' + _initExt),'M_BASE_Attack',0,"(count WestBaseStructures > 0) && (time > 600)",west], /* Resistance attack a base, require at least one building (we wait a bit), west. */
+ [['*'],(_tpath + 'M_BASE_Attack' + _initExt),'M_BASE_Attack',0,"(count EastBaseStructures > 0) && (time > 600)",east], /* Resistance attack a base, require at least one building (we wait a bit), east. */
+ [['*'],(_tpath + 'M_PLAYERS_Attack_Air' + _initExt),'M_PLAYERS_Attack_Air',0,"!WF_A2_Vanilla && paramDLCPMC",west], /* Resistance PMC attack players, requires PMC, west. */
+ [['*'],(_tpath + 'M_PLAYERS_Attack_Air' + _initExt),'M_PLAYERS_Attack_Air',0,"!WF_A2_Vanilla && paramDLCPMC",east] /* Resistance PMC attack players, requires PMC, east. */
+ ],true] Call SetNamespace;
+
+ //--- Ensure that the re-usability is not higher than the content.
+ if (('WFBE_MISSIONSREUSABILITY' Call GetNamespace) > count('WFBE_M_CONTENT' Call GetNamespace)-1) then {
+ ['WFBE_MISSIONSREUSABILITY',count('WFBE_M_CONTENT' Call GetNamespace),true] Call SetNamespace;
+ };
+};
+
+//--- UPSMON Parameters.
+if (paramUPSMON) then {
+ //--- Size of the marker (x,y) from the center of a town.
+ ['WFBE_UPSMONTOWNAREASIZE',[550,550],true] Call SetNamespace;
+};
+
+//--- Income System is Commander System?
+if (('WFBE_INCOMESYSTEM' Call GetNamespace) in [3,4]) then {
+ //--- Town Multiplicator Coefficient (SV * x).
+ ['WFBE_INC_COEFFICIENT',10, true] Call SetNamespace;
+ //--- Prevent commander from being a millionaire, and add the rest to the players pool.
+ ['WFBE_INC_DIVIDE_COM',2.75, true] Call SetNamespace;
+
+ //--- Commander Income %.
+ if (isNil "EastCommanderPercent") then {EastCommanderPercent = 70};
+ if (isNil "WestCommanderPercent") then {WestCommanderPercent = 70};
+};
+
+diag_log Format["[WFBE (INIT)][frameno:%1 | ticktime:%2] Init_CommonConstants: Constants Initialization - [Done]",diag_frameno,diag_tickTime]; \ No newline at end of file
diff --git a/Common/Init/Init_Location.sqf b/Common/Init/Init_Location.sqf
new file mode 100644
index 0000000..d0d97df
--- /dev/null
+++ b/Common/Init/Init_Location.sqf
@@ -0,0 +1,87 @@
+Private ['_camps','_location','_locationName','_marker','_maxSupplyValue','_probability','_range','_resistanceTeamTypes','_startingSupplyValue'];
+
+_location = _this select 0;
+_locationName = _this select 1;
+_resistanceTeamTypes = ["Group","Group"];
+_probability = 70;
+_startingSupplyValue = 10;
+_maxSupplyValue = 50;
+_range = 400;
+
+if (count _this > 3) then {_startingSupplyValue = _this Select 2};
+if (count _this > 4) then {_maxSupplyValue = _this Select 3};
+if (count _this > 5) then {_range = _this Select 4};
+if (count _this > 6) then {_resistanceTeamTypes = _this Select 5};
+if (count _this > 7) then {_probability = _this Select 6};
+
+if (isNull _location) exitWith {};
+
+_camps = _location getVariable "camps";
+if (isNil "_camps") then {_location setVariable ["camps",[]]};
+
+_location setVariable ["name",_locationName];
+_location setVariable ["range",_range];
+_location setVariable ["startingSupplyValue",_startingSupplyValue];
+_location setVariable ["maxSupplyValue",_maxSupplyValue];
+
+diag_log Format["[WFBE (INIT)][frameno:%3 | ticktime:%4] Init_Location: Town '%1' (%2) initialization - [Done]",str _location,_locationName,diag_frameno,diag_tickTime];
+
+waitUntil {commonInitComplete};
+
+if (isServer) then {
+ if (isNil 'EastMHQ' || isNil 'WestMHQ') exitWith {};
+ //--- Don't pause.
+ [_location,_startingSupplyValue,_range,_resistanceTeamTypes,_probability,_maxSupplyValue] Spawn {
+ Private ["_defenses","_isSet","_location","_marker","_maxSupplyValue","_probability","_range","_resistanceTeamTypes","_size","_startingSupplyValue"];
+ _location = _this select 0;
+ _startingSupplyValue = _this select 1;
+ _range = _this select 2;
+ _resistanceTeamTypes = _this select 3;
+ _probability = _this select 4;
+ _maxSupplyValue = _this select 5;
+
+ /* OA Depots are made of kryptonite */
+ if (WF_A2_Arrowhead || WF_A2_CombinedOps) then {_location addEventHandler ['handleDamage',{false}]};
+ _isSet = _location getVariable 'sideID';
+ if (isNil '_isSet') then {_location setVariable ["sideID",RESISTANCEID,true]};
+ _location setVariable ["supplyValue",_startingSupplyValue,true];
+ _location setVariable ["resistanceTypes",_resistanceTeamTypes];
+ sleep (random 1);
+ waitUntil {serverInitComplete && townInit};
+ //--- Town SV & Control script.
+ [_location,_range] ExecFSM "Server\FSM\updatetown.fsm";
+ if !(paramRes) then {
+ _defenses = _location nearEntities['WFBE_RESISTANCEDEFENSENAMES' Call GetNamespace,_range];
+ {deleteVehicle _x} forEach _defenses;
+ };
+ //--- Main AI Script
+ if (paramOccup || paramRes) then {[_location, _resistanceTeamTypes, _probability] ExecFSM "Server\FSM\updatetownai.fsm"};
+
+ //--- UPSMON Area Definition.
+ if (paramUPSMON) then {
+ _marker = Format['UPSMON_TOWN_%1',str _location];
+ createMarkerLocal [_marker, getPos _location];
+ _marker setMarkerColorLocal "ColorBlue";
+ _marker setMarkerShapeLocal "RECTANGLE";
+ _marker setMarkerBrushLocal "BORDER";
+ _size = 'WFBE_UPSMONTOWNAREASIZE' Call GetNamespace;
+ _marker setMarkerSizeLocal [_size select 0,_size select 1];
+ _marker setMarkerAlphaLocal 0;
+ };
+ };
+
+ if (('WFBE_TOWNCONQUESTMODE' Call GetNamespace) > 0) then {
+ _location setVariable ["wfbe_cancap_w", false];
+ _location setVariable ["wfbe_cancap_e", false];
+ };
+};
+
+towns = towns + [_location];
+
+if (local player) then {
+ waitUntil {clientInitComplete};
+ _marker = Format["%1Depot",str _location];
+ createMarkerLocal [_marker,getPos _location];
+ _marker setMarkerTypeLocal "Depot";
+ _marker setMarkerColorLocal ("Resistance" Call GetMarkerColoration);
+}; \ No newline at end of file
diff --git a/Common/Init/Init_Neighbors.sqf b/Common/Init/Init_Neighbors.sqf
new file mode 100644
index 0000000..727e0d1
--- /dev/null
+++ b/Common/Init/Init_Neighbors.sqf
@@ -0,0 +1,232 @@
+/*
+ Neighbors town per world.
+*/
+
+Private ["_index","_townMode"];
+_index = 0;
+for [{_i = 0},{_i < (count (missionConfigFile/"Params"))},{_i = _i + 1}] do {if ((configName ((missionConfigFile >> "Params") select _i)) == "townsAmount") exitWith {_index =_i}};
+_townMode = if (isMultiplayer) then {paramsArray select _index} else {getNumber (missionConfigFile >> "Params" >> "townsAmount" >> "default")};
+
+switch (toLower(worldName)) do {
+ case "chernarus": {
+ switch (_townMode) do {
+ case 4: {//--- Full.
+ Kamenka setVariable ["neighbors", [Pavlovo, Komarovo]];
+ Komarovo setVariable ["neighbors", [Pavlovo, Komarovo, Bor, Chernogorsk]];
+ Chernogorsk setVariable ["neighbors", [Komarovo, Nadezhdino, Prigorodki, Kozlovka]];
+ Prigorodki setVariable ["neighbors", [Chernogorsk, Elektrozavodsk]];
+ Elektrozavodsk setVariable ["neighbors", [Prigorodki, Chernogorsk, Pusta, Kamyshovo, Staroye]];
+ Kamyshovo setVariable ["neighbors", [Tulga, Elektrozavodsk]];
+ Tulga setVariable ["neighbors", [Kamyshovo, Msta, Solnichniy]];
+ Solnichniy setVariable ["neighbors", [Kamyshovo, Msta, Nizhnoye, Dolina]];
+ Nizhnoye setVariable ["neighbors", [Solnichniy, Berezino]];
+ Berezino setVariable ["neighbors", [Nizhnoye, Khelm, Orlovets, Dubrovka]];
+ Khelm setVariable ["neighbors", [Berezino, Krasnostav]];
+ Krasnostav setVariable ["neighbors", [Olsha, Gvozdno, Dubrovka, Khelm]];
+ Olsha setVariable ["neighbors", [Krasnostav]];
+ Gvozdno setVariable ["neighbors", [Krasnostav, Grishino]];
+ Grishino setVariable ["neighbors", [Gvozdno, Petrovka, Kabanino]];
+ Petrovka setVariable ["neighbors", [Grishino, Lopatino]];
+ Lopatino setVariable ["neighbors", [Petrovka, Vybor, Pustoshka]];
+ Myshkino setVariable ["neighbors", [Sosnovka, Pustoshka]];
+ Sosnovka setVariable ["neighbors", [Zelenogorsk, Myshkino, Pustoshka]];
+ Zelenogorsk setVariable ["neighbors", [Sosnovka, Pogorevka, Kozlovka, Pavlovo]];
+ Pavlovo setVariable ["neighbors", [Kamenka, Komarovo, Bor, Zelenogorsk]];
+ Bor setVariable ["neighbors", [Pavlovo, Kozlovka, Komarovo]];
+ Kozlovka setVariable ["neighbors", [Bor, Zelenogorsk, Nadezhdino, Chernogorsk]];
+ Nadezhdino setVariable ["neighbors", [Kozlovka, Chernogorsk]];
+ Mogilevka setVariable ["neighbors", [Vyshnoye, Pusta]];
+ Pusta setVariable ["neighbors", [Mogilevka, Elektrozavodsk]];
+ Staroye setVariable ["neighbors", [Shakhovka, Guglovo, Elektrozavodsk, Msta]];
+ Msta setVariable ["neighbors", [Staroye, Tulga, Solnichniy]];
+ Dolina setVariable ["neighbors", [Staroye, Solnichniy, Solnichniy, Polana]];
+ Orlovets setVariable ["neighbors", [Berezino, Polana]];
+ Polana setVariable ["neighbors", [Orlovets, Polana, Dolina, Shakhovka, Gorka]];
+ Gorka setVariable ["neighbors", [Dubrovka, NovySobor, Polana]];
+ Dubrovka setVariable ["neighbors", [Gorka, Krasnostav, Berezino]];
+ Shakhovka setVariable ["neighbors", [Staroye, Polana]];
+ Guglovo setVariable ["neighbors", [Staroye, NovySobor]];
+ NovySobor setVariable ["neighbors", [Guglovo, Gorka, StarySobor]];
+ Vyshnoye setVariable ["neighbors", [StarySobor, Gorka]];
+ StarySobor setVariable ["neighbors", [Vyshnoye, NovySobor, Kabanino, Pogorevka]];
+ Pulkovo setVariable ["neighbors", [Pogorevka]];
+ Pogorevka setVariable ["neighbors", [Pulkovo, Zelenogorsk, StarySobor]];
+ Kabanino setVariable ["neighbors", [Vybor, Grishino, StarySobor]];
+ Vybor setVariable ["neighbors", [Kabanino, Lopatino, Pustoshka]];
+ Pustoshka setVariable ["neighbors", [Kabanino, Vybor, Myshkino]];
+ };
+ case 3: {//--- Large.
+ Chernogorsk setVariable ["neighbors", [Komarovo, Nadezhdino, Elektrozavodsk]];
+ Elektrozavodsk setVariable ["neighbors", [Chernogorsk, Pusta, Kamyshovo, Staroye]];
+ Kamyshovo setVariable ["neighbors", [Solnichniy, Elektrozavodsk]];
+ Solnichniy setVariable ["neighbors", [Kamyshovo, Dolina, Berezino]];
+ Berezino setVariable ["neighbors", [Solnichniy, Dubrovka]];
+ Krasnostav setVariable ["neighbors", [Gvozdno, Dubrovka]];
+ Dubrovka setVariable ["neighbors", [Gorka, Krasnostav, Berezino]];
+ Gorka setVariable ["neighbors", [Dubrovka, Polana, StarySobor]];
+ Polana setVariable ["neighbors", [Gorka, Dolina]];
+ Dolina setVariable ["neighbors", [Polana, Solnichniy, Staroye]];
+ Staroye setVariable ["neighbors", [Elektrozavodsk, Dolina, Guglovo]];
+ Pusta setVariable ["neighbors", [Elektrozavodsk, Mogilevka]];
+ Guglovo setVariable ["neighbors", [Staroye, StarySobor]];
+ Mogilevka setVariable ["neighbors", [Pusta, Vyshnoye, Nadezhdino]];
+ Vyshnoye setVariable ["neighbors", [Mogilevka, StarySobor]];
+ StarySobor setVariable ["neighbors", [Mogilevka, Kabanino, Gorka, Pogorevka, Guglovo]];
+ Gvozdno setVariable ["neighbors", [Grishino, Krasnostav]];
+ Grishino setVariable ["neighbors", [Kabanino, Petrovka, Gvozdno]];
+ Kabanino setVariable ["neighbors", [StarySobor, Grishino, Vybor]];
+ Petrovka setVariable ["neighbors", [Grishino, Lopatino]];
+ Lopatino setVariable ["neighbors", [Vybor, Petrovka]];
+ Vybor setVariable ["neighbors", [Lopatino, Myshkino, Kabanino]];
+ Pogorevka setVariable ["neighbors", [StarySobor, Zelenogorsk]];
+ Myshkino setVariable ["neighbors", [Zelenogorsk, Lopatino]];
+ Nadezhdino setVariable ["neighbors", [Mogilevka, Chernogorsk]];
+ Zelenogorsk setVariable ["neighbors", [Pogorevka, Myshkino, Pavlovo]];
+ Pavlovo setVariable ["neighbors", [Zelenogorsk, Komarovo]];
+ Komarovo setVariable ["neighbors", [Pavlovo, Chernogorsk]];
+ };
+ case 2: {//--- Medium.
+ Chernogorsk setVariable ["neighbors", [Komarovo, Nadezhdino, Kozlovka, Mogilevka]];
+ Mogilevka setVariable ["neighbors", [Vyshnoye, Nadezhdino]];
+ Vyshnoye setVariable ["neighbors", [Mogilevka, StarySobor]];
+ StarySobor setVariable ["neighbors", [Mogilevka, Kabanino, Pogorevka]];
+ Grishino setVariable ["neighbors", [Kabanino]];
+ Kabanino setVariable ["neighbors", [StarySobor, Grishino, Vybor]];
+ Lopatino setVariable ["neighbors", [Vybor]];
+ Vybor setVariable ["neighbors", [Lopatino, Pustoshka, Kabanino]];
+ Myshkino setVariable ["neighbors", [Zelenogorsk, Pustoshka]];
+ Nadezhdino setVariable ["neighbors", [Mogilevka, Chernogorsk]];
+ Zelenogorsk setVariable ["neighbors", [Pogorevka, Myshkino, Pavlovo, Kozlovka]];
+ Pavlovo setVariable ["neighbors", [Zelenogorsk, Komarovo, Kamenka]];
+ Komarovo setVariable ["neighbors", [Pavlovo, Chernogorsk, Kamenka]];
+ Kamenka setVariable ["neighbors", [Pavlovo, Komarovo]];
+ Kozlovka setVariable ["neighbors", [Zelenogorsk, Nadezhdino, Chernogorsk]];
+ Pustoshka setVariable ["neighbors", [Vybor, Myshkino]];
+ Pogorevka setVariable ["neighbors", [StarySobor, Zelenogorsk]];
+ };
+ case 1: {//--- Small.
+ Berezino setVariable ["neighbors", [Khelm, Orlovets, Dubrovka]];
+ Orlovets setVariable ["neighbors", [Berezino, Polana]];
+ Polana setVariable ["neighbors", [Gorka, Orlovets]];
+ Gorka setVariable ["neighbors", [Dubrovka, Polana]];
+ Dubrovka setVariable ["neighbors", [Gorka, Krasnostav, Berezino]];
+ Khelm setVariable ["neighbors", [Berezino, Krasnostav]];
+ Krasnostav setVariable ["neighbors", [Olsha, Gvozdno, Dubrovka, Khelm]];
+ Olsha setVariable ["neighbors", [Krasnostav]];
+ Gvozdno setVariable ["neighbors", [Krasnostav]];
+ };
+ case 0: {//--- Extra Small.
+ Grishino setVariable ["neighbors", [Kabanino]];
+ Kabanino setVariable ["neighbors", [Grishino, Vybor]];
+ Vybor setVariable ["neighbors", [Kabanino, Lopatino, Pustoshka]];
+ Pustoshka setVariable ["neighbors", [Vybor]];
+ Lopatino setVariable ["neighbors", [Vybor]];
+ };
+ };
+ };
+ case "takistan": {
+ switch (_townMode) do {
+ case 4: {//--- Full.
+ Landay setVariable ["neighbors", [ChakChak]];
+ ChakChak setVariable ["neighbors", [Landay, Sakhee, Huzrutimam]];
+ Huzrutimam setVariable ["neighbors", [ChakChak, Sultansafee]];
+ Sultansafee setVariable ["neighbors", [Huzrutimam, LoyManara]];
+ LoyManara setVariable ["neighbors", [Sultansafee, Jaza, Chardarakht, Timurkalay]];
+ Chardarakht setVariable ["neighbors", [LoyManara, HazarBagh]];
+ HazarBagh setVariable ["neighbors", [Chardarakht]];
+ Timurkalay setVariable ["neighbors", [LoyManara, Anar, Garmarud]];
+ Garmarud setVariable ["neighbors", [Timurkalay, Garmsar, Imarat]];
+ Garmsar setVariable ["neighbors", [Garmarud]];
+ Imarat setVariable ["neighbors", [Garmarud, Zavarak, Bastam]];
+ Zavarak setVariable ["neighbors", [Imarat, Karachinar, Ravanay]];
+ Karachinar setVariable ["neighbors", [Zavarak]];
+ Ravanay setVariable ["neighbors", [Zavarak]];
+ Bastam setVariable ["neighbors", [Imarat, Falar, Rasman, Gospandi]];
+ Rasman setVariable ["neighbors", [Shamali, Bastam]];
+ Shamali setVariable ["neighbors", [Rasman, Nagara]];
+ Nagara setVariable ["neighbors", [Nur, Gospandi, Shamali]];
+ Nur setVariable ["neighbors", [Nagara]];
+ Gospandi setVariable ["neighbors", [Nagara, Bastam, Mulladoost]];
+ Mulladoost setVariable ["neighbors", [Gospandi, Khushab]];
+ Khushab setVariable ["neighbors", [Mulladoost, Jilavur, Shukurkalay]];
+ Shukurkalay setVariable ["neighbors", [Khushab, Jilavur, Chaman]];
+ Chaman setVariable ["neighbors", [Shukurkalay]];
+ Jilavur setVariable ["neighbors", [Shukurkalay, Khushab, Sakhee, FeeruzAbad]];
+ Sakhee setVariable ["neighbors", [Jilavur, ChakChak, FeeruzAbad, Kakaru]];
+ Kakaru setVariable ["neighbors", [Sakhee, Anar, FeeruzAbad]];
+ FeeruzAbad setVariable ["neighbors", [Jilavur, Anar, Kakaru, Falar, Sakhee]];
+ Anar setVariable ["neighbors", [FeeruzAbad, Kakaru, Timurkalay, Falar]];
+ Falar setVariable ["neighbors", [FeeruzAbad, Anar, Bastam]];
+ };
+ case 3: {//--- Large.
+ Landay setVariable ["neighbors", [ChakChak]];
+ ChakChak setVariable ["neighbors", [Landay, Sakhee, Huzrutimam]];
+ Huzrutimam setVariable ["neighbors", [ChakChak, Sultansafee]];
+ Sultansafee setVariable ["neighbors", [Huzrutimam, LoyManara]];
+ LoyManara setVariable ["neighbors", [Sultansafee, Jaza, Chardarakht, Timurkalay]];
+ Chardarakht setVariable ["neighbors", [LoyManara]];
+ Timurkalay setVariable ["neighbors", [LoyManara, Anar, Garmarud]];
+ Garmarud setVariable ["neighbors", [Timurkalay, Garmsar, Imarat]];
+ Garmsar setVariable ["neighbors", [Garmarud]];
+ Imarat setVariable ["neighbors", [Garmarud, Zavarak, Bastam]];
+ Zavarak setVariable ["neighbors", [Imarat, Karachinar, Ravanay]];
+ Karachinar setVariable ["neighbors", [Zavarak]];
+ Ravanay setVariable ["neighbors", [Zavarak]];
+ Bastam setVariable ["neighbors", [Imarat, Falar, Rasman, Gospandi]];
+ Rasman setVariable ["neighbors", [Shamali, Bastam]];
+ Shamali setVariable ["neighbors", [Rasman, Nagara]];
+ Nagara setVariable ["neighbors", [Gospandi, Shamali]];
+ Gospandi setVariable ["neighbors", [Nagara, Bastam, Mulladoost]];
+ Mulladoost setVariable ["neighbors", [Gospandi, Khushab]];
+ Khushab setVariable ["neighbors", [Mulladoost, Jilavur, Shukurkalay]];
+ Shukurkalay setVariable ["neighbors", [Khushab, Jilavur]];
+ Jilavur setVariable ["neighbors", [Shukurkalay, Khushab, Sakhee, FeeruzAbad]];
+ Sakhee setVariable ["neighbors", [Jilavur, ChakChak, FeeruzAbad, Kakaru]];
+ Kakaru setVariable ["neighbors", [Sakhee, Anar, FeeruzAbad]];
+ FeeruzAbad setVariable ["neighbors", [Jilavur, Anar, Kakaru, Falar, Sakhee]];
+ Anar setVariable ["neighbors", [FeeruzAbad, Kakaru, Timurkalay, Falar]];
+ Falar setVariable ["neighbors", [FeeruzAbad, Anar, Bastam]];
+ };
+ case 2: {//--- Medium.
+ Garmarud setVariable ["neighbors", [Imarat]];
+ Imarat setVariable ["neighbors", [Garmarud, Bastam]];
+ Bastam setVariable ["neighbors", [Imarat, Falar, Rasman, Gospandi]];
+ Rasman setVariable ["neighbors", [Shamali, Bastam]];
+ Shamali setVariable ["neighbors", [Rasman, Nagara]];
+ Nagara setVariable ["neighbors", [Gospandi, Shamali]];
+ Gospandi setVariable ["neighbors", [Nagara, Bastam, Mulladoost]];
+ Mulladoost setVariable ["neighbors", [Gospandi, Khushab]];
+ Khushab setVariable ["neighbors", [Mulladoost]];
+ Falar setVariable ["neighbors", [Anar, Bastam]];
+ };
+ case 1: {//--- Small.
+ Bastam setVariable ["neighbors", [Imarat, Falar, Rasman, Gospandi]];
+ Rasman setVariable ["neighbors", [Shamali, Bastam]];
+ Shamali setVariable ["neighbors", [Rasman, Nagara]];
+ Nagara setVariable ["neighbors", [Gospandi, Shamali]];
+ Nur setVariable ["neighbors", [Nagara]];
+ Gospandi setVariable ["neighbors", [Nagara, Bastam, Mulladoost]];
+ };
+ case 0: {//--- Extra Small.
+ Huzrutimam setVariable ["neighbors", [LoyManara]];
+ LoyManara setVariable ["neighbors", [Chardarakht, Huzrutimam]];
+ Chardarakht setVariable ["neighbors", [LoyManara]];
+ };
+ };
+ };
+ case "zargabad": {
+ Qeslaq setVariable ["neighbors", [Shahbaz, Zargabad]];
+ Shahbaz setVariable ["neighbors", [Qeslaq, Yarum]];
+ Yarum setVariable ["neighbors", [Zargabad, Shahbaz]];
+ Zargabad setVariable ["neighbors", [Qeslaq, Yarum, Nango, Azizajt, HazarBagh]];
+ Azizajt setVariable ["neighbors", [Zargabad, Nango]];
+ Nango setVariable ["neighbors", [Zargabad, Azizajt, HazarBagh]];
+ HazarBagh setVariable ["neighbors", [Zargabad, Nango]];
+ };
+ default {
+ ['WFBE_TOWNCONQUESTMODE', 0, true] Call SetNamespace;
+ };
+};
+
+objnull setVariable ["neighbors",objnull];
+
diff --git a/Common/Init/Init_PublicVariables.sqf b/Common/Init/Init_PublicVariables.sqf
new file mode 100644
index 0000000..535b47b
--- /dev/null
+++ b/Common/Init/Init_PublicVariables.sqf
@@ -0,0 +1,62 @@
+Private ['_clientCommandPV','_count','_l','_serverCommandPV'];
+
+_l = ["RequestVehicleLock"];
+_l = _l + ["RequestChangeScore"];
+_l = _l + ["RequestCommanderVote"];
+_l = _l + ["RequestStructure"];
+_l = _l + ["RequestDefense"];
+_l = _l + ["RequestJoin"];
+_l = _l + ["RequestMHQRepair"];
+_l = _l + ["RequestSpecial"];
+_l = _l + ["RequestTeamUpdate"];
+_l = _l + ["RequestUpgrade"];
+if (paramUseWorkers) then {_l = _l + ["RequestWorker"]};
+
+_serverCommandPV = _l;
+
+_l = ["AllCampsCaptured"];
+_l = _l + ["AwardBounty"];
+_l = _l + ["CampCaptured"];
+_l = _l + ["CanJoin"];
+_l = _l + ["ChangeScore"];
+_l = _l + ["CommanderVote"];
+_l = _l + ["DisplayICBM"];
+_l = _l + ["EndGame"];
+_l = _l + ["ISIS_AddAction"];
+_l = _l + ["LocalizeMessage"];
+_l = _l + ["Penalty"];
+_l = _l + ["PerformAction"];
+_l = _l + ["SetHQStatus"];
+_l = _l + ["SetTask"];
+_l = _l + ["SetVehicleLock"];
+_l = _l + ["TownCaptured"];
+_l = _l + ["TownCapturedPublic"];
+_l = _l + ["UAV_Reveal"];
+_l = _l + ["VoteForCommander"];
+
+/* Add missions Clients PVF here */
+if (paramSecondaryMissions) then {
+ _l = _l + ['M_BASE_Attack'];
+ _l = _l + ['M_TOWN_Attack'];
+ _l = _l + ['M_UAV_RetrieveModule'];
+ /* OA/CO Specific PVF */
+ if !(WF_A2_Vanilla) then {
+ _l = _l + ['M_PLAYERS_Attack_Air'];
+ };
+};
+
+_clientCommandPV = _l;
+
+for [{_count = Count _clientCommandPV - 1},{_count >= 0},{_count = _count - 1}] do {Call Compile Format["CLTFNC%1 = Compile PreprocessFile 'Client\PVFunctions\%1.sqf'",_clientCommandPV Select _count,_count]};
+for [{_count = Count _serverCommandPV - 1},{_count >= 0},{_count = _count - 1}] do {Call Compile Format["SRVFNC%1 = Compile PreprocessFile 'Server\PVFunctions\%1.sqf'",_serverCommandPV Select _count,_count]};
+
+//--- Handle the client side publicVariable.
+if (local player) then {
+ {Format['WFBE_%1',_x] addPublicVariableEventHandler {(_this select 1) Spawn HandlePVF}} forEach _clientCommandPV;
+};
+//--- Handle the server side publicVariable.
+if (isServer) then {
+ {Format['WFBE_%1',_x] addPublicVariableEventHandler {(_this select 1) Spawn HandleSPVF}} forEach _serverCommandPV;
+};
+
+diag_log Format["[WFBE (INIT)][frameno:%3 | ticktime:%4] Init_PublicVariables: Public Variable Initialization (SRV: %1 CLT: %2) - [Done]",count _serverCommandPV, count _clientCommandPV,diag_frameno,diag_tickTime]; \ No newline at end of file
diff --git a/Common/Init/Init_TownMode.sqf b/Common/Init/Init_TownMode.sqf
new file mode 100644
index 0000000..bafc29a
--- /dev/null
+++ b/Common/Init/Init_TownMode.sqf
@@ -0,0 +1,53 @@
+/*
+ Town mode initialization.
+ the town that have to be removed need to be stored on the desired variable over WF_Logic. If those ain't set, the full town setting will be used.
+ Custom templates can be added bellow.
+*/
+private ['_index','_i','_paramName','_value'];
+Private ['_i','_index','_paramName','_value'];
+
+_index = 0;
+for [{_i = 0},{_i < (count (missionConfigFile/"Params"))},{_i = _i + 1}] do {
+ _paramName = (configName ((missionConfigFile >> "Params") select _i));
+ if (_paramName == "townsAmount") exitWith {_index =_i};
+};
+
+_value = if (isMultiplayer) then {paramsArray select _index} else {getNumber (missionConfigFile >> "Params" >> "townsAmount" >> "default")};
+
+/*
+ Chernarus Template (WF_Logic init field):
+ this setVariable ["Towns_RemovedXSmall",["Zelenogorsk","Dolina","StarySobor","Myshkino","Chernogorsk","Dubrovka","Pogorevka","Bor","Staroye","Pulkovo","Khelm","Kamyshovo","Pavlovo","Nadezhdino","Mogilevka","Vyshnoye","Berezino","Krasnostav","Gorka","Elektrozavodsk","Msta","Komarovo","Petrovka","Shakhovka","Prigorodki","Olsha","Orlovets","Nizhnoye","Solnichniy","Tulga","Kozlovka","Polana","Kamenka","Gvozdno","NovySobor","Pusta","Guglovo"]];
+ this setVariable ["Towns_RemovedSmall",["Zelenogorsk","Dolina","StarySobor","Lopatino","Myshkino","Chernogorsk","Pogorevka","Bor","Kabanino","Staroye","Pulkovo","Kamyshovo","Vybor","Pavlovo","Nadezhdino","Grishino","Mogilevka","Vyshnoye","Elektrozavodsk","Msta","Komarovo","Petrovka","Shakhovka","Prigorodki","Nizhnoye","Solnichniy","Tulga","Kozlovka","Pustoshka","Kamenka","NovySobor","Pusta","Guglovo"]];
+ this setVariable ["Towns_RemovedMedium",["Dolina","Dubrovka","Bor","Staroye","Elektrozavodsk","Berezino","Krasnostav","Pulkovo","Khelm","Kamyshovo","Vyshnoye","Gorka","Msta","Petrovka","Shakhovka","Prigorodki","Olsha","Orlovets","Nizhnoye","Solnichniy","Tulga","Polana","Gvozdno","NovySobor","Pusta","Guglovo","Sosnovka"]];
+ this setVariable ["Towns_RemovedLarge",["Bor","Pulkovo","Khelm","Msta","Shakhovka","Prigorodki","Olsha","Orlovets","Nizhnoye","Tulga","Kozlovka","Pustoshka","Kamenka","NovySobor","Sosnovka"]];
+*/
+
+TownTemplate = [];
+switch (_value) do {
+ case 0: {TownTemplate = WF_Logic getVariable "Towns_RemovedXSmall"};
+ case 1: {TownTemplate = WF_Logic getVariable "Towns_RemovedSmall"};
+ case 2: {TownTemplate = WF_Logic getVariable "Towns_RemovedMedium"};
+ case 3: {TownTemplate = WF_Logic getVariable "Towns_RemovedLarge"};
+ //--- case 4 = full. useless.
+ /* Add your templates here !
+ Custom templates can be added here, just set a new variable with the towns to remove in WF_Logic and add your template name/value in the parameter class
+ - WF_Logic: this setVariable ["myRemovedTowns",["Chernogorsk","Pavlovo","Zelenogorsk"]];
+ - parameter (Add it at the end!!!):
+ class townsAmount {
+ title = "$STR_WF_PARAMETER_TownsAmount";
+ values[] = {0,1,2,3,4,5};
+ texts[] = {"Extra Small","Small","Medium","Large","Full","MyOwnTemplate"};
+ default = 3;
+ };
+ - Init_TownMode.sqf (Here!): case 5: {TownTemplate = WF_Logic getVariable "myRemovedTowns"}
+
+ As a result, Chernogorsk, Pavlovo and Zelenogorsk will be removed.
+ */
+};
+
+if (isNil "TownTemplate") then {TownTemplate = []};//--- The field is not defined, we use the default island setting.
+totalTowns = (WF_Logic getVariable "totalTowns") - (count TownTemplate);
+
+townModeSet = true;
+
+diag_log Format["[WFBE (INIT)][frameno:%1 | ticktime:%2] Init_TownMode: Towns mode initialization (world: %3) - [Done]",diag_frameno,diag_tickTime,worldName]; \ No newline at end of file
diff --git a/Common/Init/Init_Towns.sqf b/Common/Init/Init_Towns.sqf
new file mode 100644
index 0000000..4ee8796
--- /dev/null
+++ b/Common/Init/Init_Towns.sqf
@@ -0,0 +1,25 @@
+Private ["_startAt","_txt"];
+
+waitUntil{townModeSet};
+_startAt = time;
+waitUntil {!isNil "totalTowns" || time - _startAt > 120};
+waitUntil {(count towns == totalTowns) || time - _startAt > 120};
+if ((count towns != totalTowns) && local player) then {
+ _txt = Format["DEBUG: \n\n Something might be wrong with the town initialization process... \n\n This could be related to the towns amount set in WF_Logic or to the initialization itself, try to rejoin the game if the auto-fix doesn't work... \n\n Extra Info: \n count towns: %1 \n totalTowns: %2... \n\n The game will now attempt to fix itself...",count towns,totalTowns];
+ _txt Call DebugHint;
+
+ /* Attempt to fix Null over JIP */
+ towns = towns - [objNull];
+ if (count towns == totalTowns) then
+ {
+ townInit = true;
+ }
+ else
+ {
+ diag_log Format["[WFBE (INIT)] Init_Towns: Fail with count towns = %1, totalTowns = %2",count towns, totalTowns];
+ sleep 5;
+ failMission "END1";
+ };
+} else {townInit = true};
+
+diag_log Format["[WFBE (INIT)][frameno:%1 | ticktime:%2] Init_Towns: Towns initialization - [Done]",diag_frameno,diag_tickTime]; \ No newline at end of file
diff --git a/Common/Module/CIPHER/CIPHER_Init.sqf b/Common/Module/CIPHER/CIPHER_Init.sqf
new file mode 100644
index 0000000..05866ba
--- /dev/null
+++ b/Common/Module/CIPHER/CIPHER_Init.sqf
@@ -0,0 +1,91 @@
+/*
+ * Cipher Module
+ * Author: Benny.
+ * Description: Alphabetical functions such as sorting and string compare.
+ */
+
+
+/* Compare whether string A is greater than string B */
+CIPHER_CompareString = {
+ Private ["_aisgreater","_stringA","_stringB"];
+ _stringA = toArray(_this select 0);
+ _stringB = toArray(_this select 1);
+
+ _aisgreater = false;
+
+ for '_i' from 0 to count(_stringA)-1 do {
+ if (_i > count(_stringB)-1) exitWith {_aisgreater = true};
+ if ((_stringA select _i) != (_stringB select _i)) exitWith {
+ _aisgreater = if ((_stringA select _i) > (_stringB select _i)) then {true} else {false};
+ };
+ };
+
+ _aisgreater;
+};
+
+/* Swap Element A with Element B in an array. */
+CIPHER_ArraySwap = {
+ Private ["_array","_elea","_eleb","_posa","_posb"];
+ _array = _this select 0;
+ _posa = _this select 1;
+ _posb = _this select 2;
+
+ _elea = _array select _posa;
+ _eleb = _array select _posb;
+
+ _array set [_posa, _eleb];
+ _array set [_posb, _elea];
+
+ _array;
+};
+
+/* Reverse an array */
+CIPER_ArrayReverse = {
+ Private ["_array","_reversed","_u"];
+ _array = _this;
+ _reversed = [];
+
+ _u = 0;
+ for '_i' from count(_array)-1 step -1 to 0 do {
+ _reversed set [_u, _array select _i];
+ _u = _u + 1;
+ };
+
+ _reversed
+};
+
+/* Sort an array by alphabetical order, selection sort. */
+CIPHER_SortArray = {
+ Private['_auxArray','_list','_min','_reverse'];
+
+ _list = _this select 0;
+ _reverse = _this select 1;
+ _auxArray = if (count _this > 2) then {+(_this select 2)} else {[]};
+
+ if (count _list == 0) exitWith {[]};
+ _isString = if (typeName(_list select 0) == typeName "") then {true} else {false};
+
+ for '_i' from 0 to (count _list)-1 do {
+ _min = _i;
+
+ for '_j' from _i+1 to (count _list)-1 do {
+ if (_isString) then {
+ if !([_list select _j, _list select _min] Call CIPHER_CompareString) then {_min = _j}
+ } else {
+ if ((_list select _j) < (_list select _min)) then {_min = _j};
+ };
+ };
+
+ if (_min != _i) then {
+ _list = [_list, _i, _min] Call CIPHER_ArraySwap;
+ if (count _auxArray > 0) then {_auxArray = [_auxArray, _i, _min] Call CIPHER_ArraySwap};
+ };
+ };
+
+ if (_reverse) then {
+ _list = (_list) Call CIPER_ArrayReverse;
+ if (count _auxArray > 0) then {_auxArray = (_auxArray) Call CIPER_ArrayReverse};
+ };
+
+ [_list, _auxArray]
+}; \ No newline at end of file
diff --git a/Common/Module/CIPHER/CIPHER_Sort.sqf b/Common/Module/CIPHER/CIPHER_Sort.sqf
new file mode 100644
index 0000000..0ae438b
--- /dev/null
+++ b/Common/Module/CIPHER/CIPHER_Sort.sqf
@@ -0,0 +1,63 @@
+/* Elements to sort etc ... */
+
+_preformat = {
+ Private ["_get","_output","_units"];
+ _units = _this;
+ _output = [];
+
+ for '_i' from 0 to count(_units)-1 do {
+ _get = (_units select _i) Call GetNamespace;
+ if !(isNil "_get") then {
+ _output set [_i, _get select QUERYUNITLABEL];
+ } else {
+ _output set [_i, (_units select _i)];
+ };
+ };
+
+ _output
+};
+
+_preformat_gear = {
+ Private ["_content","_get","_output"];
+ _content = _this;
+ _output = [];
+
+ for '_i' from 0 to count(_content)-1 do {
+ _get = (_content select _i) Call GetNamespace;
+ if !(isNil "_get") then {
+ _output set [_i, _get select QUERYGEARLABEL];
+ } else {
+ _output set [_i, (_content select _i)];
+ };
+ };
+
+ _output
+};
+
+//--- Sort Factions.
+{
+ _content = Format["WFBE_%1%2FACTIONS",sideJoinedText,_x] Call GetNamespace;
+ _sorted = ([_content, false] Call CIPHER_SortArray) select 0;
+ [Format['WFBE_%1%2FACTIONS',sideJoinedText,_x], _sorted, true] Call SetNamespace;
+
+ //--- While we're at it we set the default selected faction.
+ _content = Format["WFBE_%1%2FACTIONS",sideJoinedText,_x] Call GetNamespace;
+ _find = _content find (Format["WFBE_%1DEFAULTFACTION",sideJoinedText] Call GetNamespace);
+ if (_find != -1) then {
+ [Format["WFBE_%1%2CURRENTFACTIONSELECTED",sideJoinedText,_x], _find] Call SetNamespace;
+ };
+} forEach ["BARRACKS","LIGHT","HEAVY","AIRCRAFT","AIRPORT","DEPOT"];
+
+//--- Sort Purchases (Default, name - asc).
+{
+ _content = Format['WFBE_%1%2UNITS',sideJoinedText,_x] Call GetNamespace;
+ _sorted = ([(_content) Call _preformat,false,_content] Call CIPHER_SortArray) select 1;
+ [Format['WFBE_%1%2UNITS',sideJoinedText,_x], _sorted, true] Call SetNamespace;
+} forEach ["BARRACKS","LIGHT","HEAVY","AIRCRAFT","AIRPORT","DEPOT"];
+
+//--- Sort Gear.
+{
+ _content = WF_Logic getVariable Format ["%1Classes",_x];
+ _sorted = ([(_content) Call _preformat_gear,false,_content] Call CIPHER_SortArray) select 1;
+ WF_Logic setVariable [Format ["%1Classes",_x], _sorted];
+} forEach ["primary","secondary","sidearm","misc"]; \ No newline at end of file
diff --git a/LICENSE b/LICENSE
new file mode 100644
index 0000000..546bc58
--- /dev/null
+++ b/LICENSE
@@ -0,0 +1,630 @@
+Copyright (C) 2026 RFP
+
+This program is free software: you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation, either version 3 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+ GNU GENERAL PUBLIC LICENSE
+ Version 3, 29 June 2007
+
+ Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+ Preamble
+
+ The GNU General Public License is a free, copyleft license for
+software and other kinds of works.
+
+ The licenses for most software and other practical works are designed
+to take away your freedom to share and change the works. By contrast,
+the GNU General Public License is intended to guarantee your freedom to
+share and change all versions of a program--to make sure it remains free
+software for all its users. We, the Free Software Foundation, use the
+GNU General Public License for most of our software; it applies also to
+any other work released this way by its authors. You can apply it to
+your programs, too.
+
+ When we speak of free software, we are referring to freedom, not
+price. Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+them if you wish), that you receive source code or can get it if you
+want it, that you can change the software or use pieces of it in new
+free programs, and that you know you can do these things.
+
+ To protect your rights, we need to prevent others from denying you
+these rights or asking you to surrender the rights. Therefore, you have
+certain responsibilities if you distribute copies of the software, or if
+you modify it: responsibilities to respect the freedom of others.
+
+ For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must pass on to the recipients the same
+freedoms that you received. You must make sure that they, too, receive
+or can get the source code. And you must show them these terms so they
+know their rights.
+
+ Developers that use the GNU GPL protect your rights with two steps:
+(1) assert copyright on the software, and (2) offer you this License
+giving you legal permission to copy, distribute and/or modify it.
+
+ For the developers' and authors' protection, the GPL clearly explains
+that there is no warranty for this free software. For both users' and
+authors' sake, the GPL requires that modified versions be marked as
+changed, so that their problems will not be attributed erroneously to
+authors of previous versions.
+
+ Some devices are designed to deny users access to install or run
+modified versions of the software inside them, although the manufacturer
+can do so. This is fundamentally incompatible with the aim of
+protecting users' freedom to change the software. The systematic
+pattern of such abuse occurs in the area of products for individuals to
+use, which is precisely where it is most unacceptable. Therefore, we
+have designed this version of the GPL to prohibit the practice for those
+products. If such problems arise substantially in other domains, we
+stand ready to extend this provision to those domains in future versions
+of the GPL, as needed to protect the freedom of users.
+
+ Finally, every program is threatened constantly by software patents.
+States should not allow patents to restrict development and use of
+software on general-purpose computers, but in those that do, we wish to
+avoid the special danger that patents applied to a free program could
+make it effectively proprietary. To prevent this, the GPL assures that
+patents cannot be used to render the program non-free.
+
+ The precise terms and conditions for copying, distribution and
+modification follow.
+
+ TERMS AND CONDITIONS
+
+ 0. Definitions.
+
+ "This License" refers to version 3 of the GNU General Public License.
+
+ "Copyright" also means copyright-like laws that apply to other kinds of
+works, such as semiconductor masks.
+
+ "The Program" refers to any copyrightable work licensed under this
+License. Each licensee is addressed as "you". "Licensees" and
+"recipients" may be individuals or organizations.
+
+ To "modify" a work means to copy from or adapt all or part of the work
+in a fashion requiring copyright permission, other than the making of an
+exact copy. The resulting work is called a "modified version" of the
+earlier work or a work "based on" the earlier work.
+
+ A "covered work" means either the unmodified Program or a work based
+on the Program.
+
+ To "propagate" a work means to do anything with it that, without
+permission, would make you directly or secondarily liable for
+infringement under applicable copyright law, except executing it on a
+computer or modifying a private copy. Propagation includes copying,
+distribution (with or without modification), making available to the
+public, and in some countries other activities as well.
+
+ To "convey" a work means any kind of propagation that enables other
+parties to make or receive copies. Mere interaction with a user through
+a computer network, with no transfer of a copy, is not conveying.
+
+ An interactive user interface displays "Appropriate Legal Notices"
+to the extent that it includes a convenient and prominently visible
+feature that (1) displays an appropriate copyright notice, and (2)
+tells the user that there is no warranty for the work (except to the
+extent that warranties are provided), that licensees may convey the
+work under this License, and how to view a copy of this License. If
+the interface presents a list of user commands or options, such as a
+menu, a prominent item in the list meets this criterion.
+
+ 1. Source Code.
+
+ The "source code" for a work means the preferred form of the work
+for making modifications to it. "Object code" means any non-source
+form of a work.
+
+ A "Standard Interface" means an interface that either is an official
+standard defined by a recognized standards body, or, in the case of
+interfaces specified for a particular programming language, one that
+is widely used among developers working in that language.
+
+ The "System Libraries" of an executable work include anything, other
+than the work as a whole, that (a) is included in the normal form of
+packaging a Major Component, but which is not part of that Major
+Component, and (b) serves only to enable use of the work with that
+Major Component, or to implement a Standard Interface for which an
+implementation is available to the public in source code form. A
+"Major Component", in this context, means a major essential component
+(kernel, window system, and so on) of the specific operating system
+(if any) on which the executable work runs, or a compiler used to
+produce the work, or an object code interpreter used to run it.
+
+ The "Corresponding Source" for a work in object code form means all
+the source code needed to generate, install, and (for an executable
+work) run the object code and to modify the work, including scripts to
+control those activities. However, it does not include the work's
+System Libraries, or general-purpose tools or generally available free
+programs which are used unmodified in performing those activities but
+which are not part of the work. For example, Corresponding Source
+includes interface definition files associated with source files for
+the work, and the source code for shared libraries and dynamically
+linked subprograms that the work is specifically designed to require,
+such as by intimate data communication or control flow between those
+subprograms and other parts of the work.
+
+ The Corresponding Source need not include anything that users
+can regenerate automatically from other parts of the Corresponding
+Source.
+
+ The Corresponding Source for a work in source code form is that
+same work.
+
+ 2. Basic Permissions.
+
+ All rights granted under this License are granted for the term of
+copyright on the Program, and are irrevocable provided the stated
+conditions are met. This License explicitly affirms your unlimited
+permission to run the unmodified Program. The output from running a
+covered work is covered by this License only if the output, given its
+content, constitutes a covered work. This License acknowledges your
+rights of fair use or other equivalent, as provided by copyright law.
+
+ You may make, run and propagate covered works that you do not
+convey, without conditions so long as your license otherwise remains
+in force. You may convey covered works to others for the sole purpose
+of having them make modifications exclusively for you, or provide you
+with facilities for running those works, provided that you comply with
+the terms of this License in conveying all material for which you do
+not control copyright. Those thus making or running the covered works
+for you must do so exclusively on your behalf, under your direction
+and control, on terms that prohibit them from making any copies of
+your copyrighted material outside their relationship with you.
+
+ Conveying under any other circumstances is permitted solely under
+the conditions stated below. Sublicensing is not allowed; section 10
+makes it unnecessary.
+
+ 3. Protecting Users' Legal Rights From Anti-Circumvention Law.
+
+ No covered work shall be deemed part of an effective technological
+measure under any applicable law fulfilling obligations under article
+11 of the WIPO copyright treaty adopted on 20 December 1996, or
+similar laws prohibiting or restricting circumvention of such
+measures.
+
+ When you convey a covered work, you waive any legal power to forbid
+circumvention of technological measures to the extent such circumvention
+is effected by exercising rights under this License with respect to
+the covered work, and you disclaim any intention to limit operation or
+modification of the work as a means of enforcing, against the work's
+users, your or third parties' legal rights to forbid circumvention of
+technological measures.
+
+ 4. Conveying Verbatim Copies.
+
+ You may convey verbatim copies of the Program's source code as you
+receive it, in any medium, provided that you conspicuously and
+appropriately publish on each copy an appropriate copyright notice;
+keep intact all notices stating that this License and any
+non-permissive terms added in accord with section 7 apply to the code;
+keep intact all notices of the absence of any warranty; and give all
+recipients a copy of this License along with the Program.
+
+ You may charge any price or no price for each copy that you convey,
+and you may offer support or warranty protection for a fee.
+
+ 5. Conveying Modified Source Versions.
+
+ You may convey a work based on the Program, or the modifications to
+produce it from the Program, in the form of source code under the
+terms of section 4, provided that you also meet all of these conditions:
+
+ a) The work must carry prominent notices stating that you modified
+ it, and giving a relevant date.
+
+ b) The work must carry prominent notices stating that it is
+ released under this License and any conditions added under section
+ 7. This requirement modifies the requirement in section 4 to
+ "keep intact all notices".
+
+ c) You must license the entire work, as a whole, under this
+ License to anyone who comes into possession of a copy. This
+ License will therefore apply, along with any applicable section 7
+ additional terms, to the whole of the work, and all its parts,
+ regardless of how they are packaged. This License gives no
+ permission to license the work in any other way, but it does not
+ invalidate such permission if you have separately received it.
+
+ d) If the work has interactive user interfaces, each must display
+ Appropriate Legal Notices; however, if the Program has interactive
+ interfaces that do not display Appropriate Legal Notices, your
+ work need not make them do so.
+
+ A compilation of a covered work with other separate and independent
+works, which are not by their nature extensions of the covered work,
+and which are not combined with it such as to form a larger program,
+in or on a volume of a storage or distribution medium, is called an
+"aggregate" if the compilation and its resulting copyright are not
+used to limit the access or legal rights of the compilation's users
+beyond what the individual works permit. Inclusion of a covered work
+in an aggregate does not cause this License to apply to the other
+parts of the aggregate.
+
+ 6. Conveying Non-Source Forms.
+
+ You may convey a covered work in object code form under the terms
+of sections 4 and 5, provided that you also convey the
+machine-readable Corresponding Source under the terms of this License,
+in one of these ways:
+
+ a) Convey the object code in, or embodied in, a physical product
+ (including a physical distribution medium), accompanied by the
+ Corresponding Source fixed on a durable physical medium
+ customarily used for software interchange.
+
+ b) Convey the object code in, or embodied in, a physical product
+ (including a physical distribution medium), accompanied by a
+ written offer, valid for at least three years and valid for as
+ long as you offer spare parts or customer support for that product
+ model, to give anyone who possesses the object code either (1) a
+ copy of the Corresponding Source for all the software in the
+ product that is covered by this License, on a durable physical
+ medium customarily used for software interchange, for a price no
+ more than your reasonable cost of physically performing this
+ conveying of source, or (2) access to copy the
+ Corresponding Source from a network server at no charge.
+
+ c) Convey individual copies of the object code with a copy of the
+ written offer to provide the Corresponding Source. This
+ alternative is allowed only occasionally and noncommercially, and
+ only if you received the object code with such an offer, in accord
+ with subsection 6b.
+
+ d) Convey the object code by offering access from a designated
+ place (gratis or for a charge), and offer equivalent access to the
+ Corresponding Source in the same way through the same place at no
+ further charge. You need not require recipients to copy the
+ Corresponding Source along with the object code. If the place to
+ copy the object code is a network server, the Corresponding Source
+ may be on a different server (operated by you or a third party)
+ that supports equivalent copying facilities, provided you maintain
+ clear directions next to the object code saying where to find the
+ Corresponding Source. Regardless of what server hosts the
+ Corresponding Source, you remain obligated to ensure that it is
+ available for as long as needed to satisfy these requirements.
+
+ e) Convey the object code using peer-to-peer transmission, provided
+ you inform other peers where the object code and Corresponding
+ Source of the work are being offered to the general public at no
+ charge under subsection 6d.
+
+ A separable portion of the object code, whose source code is excluded
+from the Corresponding Source as a System Library, need not be
+included in conveying the object code work.
+
+ A "User Product" is either (1) a "consumer product", which means any
+tangible personal property which is normally used for personal, family,
+or household purposes, or (2) anything designed or sold for incorporation
+into a dwelling. In determining whether a product is a consumer product,
+doubtful cases shall be resolved in favor of coverage. For a particular
+product received by a particular user, "normally used" refers to a
+typical or common use of that class of product, regardless of the status
+of the particular user or of the way in which the particular user
+actually uses, or expects or is expected to use, the product. A product
+is a consumer product regardless of whether the product has substantial
+commercial, industrial or non-consumer uses, unless such uses represent
+the only significant mode of use of the product.
+
+ "Installation Information" for a User Product means any methods,
+procedures, authorization keys, or other information required to install
+and execute modified versions of a covered work in that User Product from
+a modified version of its Corresponding Source. The information must
+suffice to ensure that the continued functioning of the modified object
+code is in no case prevented or interfered with solely because
+modification has been made.
+
+ If you convey an object code work under this section in, or with, or
+specifically for use in, a User Product, and the conveying occurs as
+part of a transaction in which the right of possession and use of the
+User Product is transferred to the recipient in perpetuity or for a
+fixed term (regardless of how the transaction is characterized), the
+Corresponding Source conveyed under this section must be accompanied
+by the Installation Information. But this requirement does not apply
+if neither you nor any third party retains the ability to install
+modified object code on the User Product (for example, the work has
+been installed in ROM).
+
+ The requirement to provide Installation Information does not include a
+requirement to continue to provide support service, warranty, or updates
+for a work that has been modified or installed by the recipient, or for
+the User Product in which it has been modified or installed. Access to a
+network may be denied when the modification itself materially and
+adversely affects the operation of the network or violates the rules and
+protocols for communication across the network.
+
+ Corresponding Source conveyed, and Installation Information provided,
+in accord with this section must be in a format that is publicly
+documented (and with an implementation available to the public in
+source code form), and must require no special password or key for
+unpacking, reading or copying.
+
+ 7. Additional Terms.
+
+ "Additional permissions" are terms that supplement the terms of this
+License by making exceptions from one or more of its conditions.
+Additional permissions that are applicable to the entire Program shall
+be treated as though they were included in this License, to the extent
+that they are valid under applicable law. If additional permissions
+apply only to part of the Program, that part may be used separately
+under those permissions, but the entire Program remains governed by
+this License without regard to the additional permissions.
+
+ When you convey a copy of a covered work, you may at your option
+remove any additional permissions from that copy, or from any part of
+it. (Additional permissions may be written to require their own
+removal in certain cases when you modify the work.) You may place
+additional permissions on material, added by you to a covered work,
+for which you have or can give appropriate copyright permission.
+
+ Notwithstanding any other provision of this License, for material you
+add to a covered work, you may (if authorized by the copyright holders of
+that material) supplement the terms of this License with terms:
+
+ a) Disclaiming warranty or limiting liability differently from the
+ terms of sections 15 and 16 of this License; or
+
+ b) Requiring preservation of specified reasonable legal notices or
+ author attributions in that material or in the Appropriate Legal
+ Notices displayed by works containing it; or
+
+ c) Prohibiting misrepresentation of the origin of that material, or
+ requiring that modified versions of such material be marked in
+ reasonable ways as different from the original version; or
+
+ d) Limiting the use for publicity purposes of names of licensors or
+ authors of the material; or
+
+ e) Declining to grant rights under trademark law for use of some
+ trade names, trademarks, or service marks; or
+
+ f) Requiring indemnification of licensors and authors of that
+ material by anyone who conveys the material (or modified versions of
+ it) with contractual assumptions of liability to the recipient, for
+ any liability that these contractual assumptions directly impose on
+ those licensors and authors.
+
+ All other non-permissive additional terms are considered "further
+restrictions" within the meaning of section 10. If the Program as you
+received it, or any part of it, contains a notice stating that it is
+governed by this License along with a term that is a further
+restriction, you may remove that term. If a license document contains
+a further restriction but permits relicensing or conveying under this
+License, you may add to a covered work material governed by the terms
+of that license document, provided that the further restriction does
+not survive such relicensing or conveying.
+
+ If you add terms to a covered work in accord with this section, you
+must place, in the relevant source files, a statement of the
+additional terms that apply to those files, or a notice indicating
+where to find the applicable terms.
+
+ Additional terms, permissive or non-permissive, may be stated in the
+form of a separately written license, or stated as exceptions;
+the above requirements apply either way.
+
+ 8. Termination.
+
+ You may not propagate or modify a covered work except as expressly
+provided under this License. Any attempt otherwise to propagate or
+modify it is void, and will automatically terminate your rights under
+this License (including any patent licenses granted under the third
+paragraph of section 11).
+
+ However, if you cease all violation of this License, then your
+license from a particular copyright holder is reinstated (a)
+provisionally, unless and until the copyright holder explicitly and
+finally terminates your license, and (b) permanently, if the copyright
+holder fails to notify you of the violation by some reasonable means
+prior to 60 days after the cessation.
+
+ Moreover, your license from a particular copyright holder is
+reinstated permanently if the copyright holder notifies you of the
+violation by some reasonable means, this is the first time you have
+received notice of violation of this License (for any work) from that
+copyright holder, and you cure the violation prior to 30 days after
+your receipt of the notice.
+
+ Termination of your rights under this section does not terminate the
+licenses of parties who have received copies or rights from you under
+this License. If your rights have been terminated and not permanently
+reinstated, you do not qualify to receive new licenses for the same
+material under section 10.
+
+ 9. Acceptance Not Required for Having Copies.
+
+ You are not required to accept this License in order to receive or
+run a copy of the Program. Ancillary propagation of a covered work
+occurring solely as a consequence of using peer-to-peer transmission
+to receive a copy likewise does not require acceptance. However,
+nothing other than this License grants you permission to propagate or
+modify any covered work. These actions infringe copyright if you do
+not accept this License. Therefore, by modifying or propagating a
+covered work, you indicate your acceptance of this License to do so.
+
+ 10. Automatic Licensing of Downstream Recipients.
+
+ Each time you convey a covered work, the recipient automatically
+receives a license from the original licensors, to run, modify and
+propagate that work, subject to this License. You are not responsible
+for enforcing compliance by third parties with this License.
+
+ An "entity transaction" is a transaction transferring control of an
+organization, or substantially all assets of one, or subdividing an
+organization, or merging organizations. If propagation of a covered
+work results from an entity transaction, each party to that
+transaction who receives a copy of the work also receives whatever
+licenses to the work the party's predecessor in interest had or could
+give under the previous paragraph, plus a right to possession of the
+Corresponding Source of the work from the predecessor in interest, if
+the predecessor has it or can get it with reasonable efforts.
+
+ You may not impose any further restrictions on the exercise of the
+rights granted or affirmed under this License. For example, you may
+not impose a license fee, royalty, or other charge for exercise of
+rights granted under this License, and you may not initiate litigation
+(including a cross-claim or counterclaim in a lawsuit) alleging that
+any patent claim is infringed by making, using, selling, offering for
+sale, or importing the Program or any portion of it.
+
+ 11. Patents.
+
+ A "contributor" is a copyright holder who authorizes use under this
+License of the Program or a work on which the Program is based. The
+work thus licensed is called the contributor's "contributor version".
+
+ A contributor's "essential patent claims" are all patent claims
+owned or controlled by the contributor, whether already acquired or
+hereafter acquired, that would be infringed by some manner, permitted
+by this License, of making, using, or selling its contributor version,
+but do not include claims that would be infringed only as a
+consequence of further modification of the contributor version. For
+purposes of this definition, "control" includes the right to grant
+patent sublicenses in a manner consistent with the requirements of
+this License.
+
+ Each contributor grants you a non-exclusive, worldwide, royalty-free
+patent license under the contributor's essential patent claims, to
+make, use, sell, offer for sale, import and otherwise run, modify and
+propagate the contents of its contributor version.
+
+ In the following three paragraphs, a "patent license" is any express
+agreement or commitment, however denominated, not to enforce a patent
+(such as an express permission to practice a patent or covenant not to
+sue for patent infringement). To "grant" such a patent license to a
+party means to make such an agreement or commitment not to enforce a
+patent against the party.
+
+ If you convey a covered work, knowingly relying on a patent license,
+and the Corresponding Source of the work is not available for anyone
+to copy, free of charge and under the terms of this License, through a
+publicly available network server or other readily accessible means,
+then you must either (1) cause the Corresponding Source to be so
+available, or (2) arrange to deprive yourself of the benefit of the
+patent license for this particular work, or (3) arrange, in a manner
+consistent with the requirements of this License, to extend the patent
+license to downstream recipients. "Knowingly relying" means you have
+actual knowledge that, but for the patent license, your conveying the
+covered work in a country, or your recipient's use of the covered work
+in a country, would infringe one or more identifiable patents in that
+country that you have reason to believe are valid.
+
+ If, pursuant to or in connection with a single transaction or
+arrangement, you convey, or propagate by procuring conveyance of, a
+covered work, and grant a patent license to some of the parties
+receiving the covered work authorizing them to use, propagate, modify
+or convey a specific copy of the covered work, then the patent license
+you grant is automatically extended to all recipients of the covered
+work and works based on it.
+
+ A patent license is "discriminatory" if it does not include within
+the scope of its coverage, prohibits the exercise of, or is
+conditioned on the non-exercise of one or more of the rights that are
+specifically granted under this License. You may not convey a covered
+work if you are a party to an arrangement with a third party that is
+in the business of distributing software, under which you make payment
+to the third party based on the extent of your activity of conveying
+the work, and under which the third party grants, to any of the
+parties who would receive the covered work from you, a discriminatory
+patent license (a) in connection with copies of the covered work
+conveyed by you (or copies made from those copies), or (b) primarily
+for and in connection with specific products or compilations that
+contain the covered work, unless you entered into that arrangement,
+or that patent license was granted, prior to 28 March 2007.
+
+ Nothing in this License shall be construed as excluding or limiting
+any implied license or other defenses to infringement that may
+otherwise be available to you under applicable patent law.
+
+ 12. No Surrender of Others' Freedom.
+
+ If conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License. If you cannot convey a
+covered work so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you may
+not convey it at all. For example, if you agree to terms that obligate you
+to collect a royalty for further conveying from those to whom you convey
+the Program, the only way you could satisfy both those terms and this
+License would be to refrain entirely from conveying the Program.
+
+ 13. Use with the GNU Affero General Public License.
+
+ Notwithstanding any other provision of this License, you have
+permission to link or combine any covered work with a work licensed
+under version 3 of the GNU Affero General Public License into a single
+combined work, and to convey the resulting work. The terms of this
+License will continue to apply to the part which is the covered work,
+but the special requirements of the GNU Affero General Public License,
+section 13, concerning interaction through a network will apply to the
+combination as such.
+
+ 14. Revised Versions of this License.
+
+ The Free Software Foundation may publish revised and/or new versions of
+the GNU General Public License from time to time. Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+ Each version is given a distinguishing version number. If the
+Program specifies that a certain numbered version of the GNU General
+Public License "or any later version" applies to it, you have the
+option of following the terms and conditions either of that numbered
+version or of any later version published by the Free Software
+Foundation. If the Program does not specify a version number of the
+GNU General Public License, you may choose any version ever published
+by the Free Software Foundation.
+
+ If the Program specifies that a proxy can decide which future
+versions of the GNU General Public License can be used, that proxy's
+public statement of acceptance of a version permanently authorizes you
+to choose that version for the Program.
+
+ Later license versions may give you additional or different
+permissions. However, no additional obligations are imposed on any
+author or copyright holder as a result of your choosing to follow a
+later version.
+
+ 15. Disclaimer of Warranty.
+
+ THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
+APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
+HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
+OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
+THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
+IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
+ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
+
+ 16. Limitation of Liability.
+
+ IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
+THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
+GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
+USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
+DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
+PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
+EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGES.
+
+ 17. Interpretation of Sections 15 and 16.
+
+ If the disclaimer of warranty and limitation of liability provided
+above cannot be given local legal effect according to their terms,
+reviewing courts shall apply local law that most closely approximates
+an absolute waiver of all civil liability in connection with the
+Program, unless a warranty or assumption of liability accompanies a
+copy of the Program in return for a fee.
diff --git a/Rsc/Dialogs.hpp b/Rsc/Dialogs.hpp
new file mode 100644
index 0000000..c758c4e
--- /dev/null
+++ b/Rsc/Dialogs.hpp
@@ -0,0 +1,3785 @@
+/* Dialogs */
+
+#ifndef VANILLA
+ #define gearmenu "_this ExecVM 'Client\GUI\GUI_GearBeta.sqf'"
+#else
+ #define gearmenu "_this ExecVM 'Client\GUI\GUI_GearV.sqf'"
+#endif
+
+//--- Voting Menu. | ALL DONE!
+class RscMenu_Voting {
+ movingEnable = 1;
+ idd = 10001;
+ onLoad = "ExecVM ""Client\GUI\GUI_Menu_Voting.sqf""";
+
+ class controlsBackground {
+ class Background_M : RscText {
+ x = 0.281402;
+ y = 0.0981439;
+ w = 0.437534;
+ h = 0.802989;
+ moving = 1;
+ colorBackground[] = WFBE_Background_Color;
+ };
+ class Background_H : RscText {
+ x = 0.281402;
+ y = 0.0981439;
+ w = 0.437534;
+ h = 0.0525;
+ moving = 1;
+ colorBackground[] = WFBE_Background_Color_Header;
+ };
+ class Background_F : RscText {
+ x = 0.281402;
+ y = 0.8486329;
+ w = 0.437534;
+ h = 0.0525;
+ moving = 1;
+ colorBackground[] = WFBE_Background_Color_Footer;
+ };
+ class Background_L : RscText {
+ x = 0.281402;
+ y = 0.1496439;
+ w = 0.437534;
+ h = WFBE_Background_Border_Thick;
+ colorBackground[] = WFBE_Background_Border;
+ };
+ };
+ class controls {
+ class VotingTitle : RscText_Title {
+ idc = 10003;
+ x = 0.287202;
+ y = 0.105539;
+ w = 0.44;
+ text = $STR_WF_VOTING_Title;
+ };
+ class Players : RscListBox {
+ idc = 10006;
+ x = 0.281402;
+ y = 0.15834;
+ w = 0.438195;
+ h = 0.643406;
+ columns[] = {0.0, 0.3};
+ rows = 10;
+ rowHeight = 0.025;
+ lineSpacing = 1;
+ sizeEx = 0.035;
+ };
+ class MostVotesText : RscText_SubTitle {
+ idc = 10007;
+ x = 0.286361;
+ y = 0.806289;
+ w = 0.434;
+ };
+ class VoteTime : RscText_SubTitle {
+ idc = 10008; //---NEW IDC IN GUI_MENU_VOTING.SQF
+ x = 0.27964;
+ y = 0.10489;
+ w = 0.434;
+ style = ST_RIGHT;
+ };
+ // class VPOPON_Button : RscButton {
+ // idc = 10009; //---NEW IDC IN GUI_MENU_VOTING.SQF
+ // x = 0.287539;
+ // y = 0.857947;
+ // w = 0.127058;
+ // text = "";
+ // action = "MenuAction = 13";
+ // }
+ /* Exit */
+ class Exit_Button : RscButton_Exit {
+ x = 0.67258;
+ y = 0.854106;
+ onButtonClick = "closeDialog 0;";
+ tooltip = $STR_WF_TOOLTIP_CloseButton;
+ };
+ };
+};
+
+//--- Main Menu. | ALL DONE!
+class WF_Menu {
+ movingEnable = 1;
+ idd = 11000;
+ onLoad = "ExecVM ""Client\GUI\GUI_Menu.sqf""";
+
+ class controlsBackground {
+ class Background_M : RscText {
+ x = 0.17467;
+ y = 0.186955;
+ w = 0.65066;
+ h = 0.63192;
+ moving = 1;
+ colorBackground[] = WFBE_Background_Color;
+ };
+ class Background_H : RscText {
+ x = 0.17467;
+ y = 0.186955;
+ w = 0.65066;
+ h = 0.0525;
+ moving = 1;
+ colorBackground[] = WFBE_Background_Color_Header;
+ };
+ class Background_F : RscText {
+ x = 0.17467;
+ y = 0.766375;
+ w = 0.65066;
+ h = 0.0525;
+ moving = 1;
+ colorBackground[] = WFBE_Background_Color_Footer;
+ };
+ class Background_L : RscText {
+ x = 0.17467;
+ y = 0.238455;
+ w = 0.65066;
+ h = WFBE_Background_Border_Thick;
+ colorBackground[] = WFBE_Background_Border;
+ };
+ };
+ class controls {
+ class Button_A : RscShortcutButtonMain {
+ idc = 11001;
+ x = 0.17598;
+ y = 0.250358;
+ w = 0.313727;
+ h = 0.104575;
+ text = $STR_WF_MAIN_Purchase_Units;
+ tooltip = $STR_WF_TOOLTIP_MainMenu_Purchase_Units;
+ action = "MenuAction = 1";
+ };
+ class Button_B : RscShortcutButtonMain {
+ idc = 11002;
+ x = 0.17598;
+ y = 0.35116;
+ w = 0.313727;
+ h = 0.104575;
+ text = $STR_WF_MAIN_Purchase_Gear;
+ tooltip = $STR_WF_TOOLTIP_MainMenu_Purchase_Gear;
+ action = "MenuAction = 2";
+ };
+ class Button_C : RscShortcutButtonMain {
+ idc = 11003;
+ x = 0.17598;
+ y = 0.451959;
+ w = 0.313727;
+ h = 0.104575;
+ text = $STR_WF_MAIN_TeamMenu;
+ tooltip = $STR_WF_TOOLTIP_MainMenu_TeamMenu;
+ action = "MenuAction = 3";
+ };
+ class Button_D : RscShortcutButtonMain {
+ idc = 11004;
+ x = 0.510943;
+ y = 0.65356;
+ w = 0.313727;
+ h = 0.104575;
+ text = $STR_WF_MAIN_VotingMenu;
+ tooltip = $STR_WF_TOOLTIP_MainMenu_VoteForCommander;
+ action = "MenuAction = 4";
+ };
+ class Button_E : RscShortcutButtonMain {
+ idc = 11005;
+ x = 0.510943;
+ y = 0.250358;
+ w = 0.313727;
+ h = 0.104575;
+ text = $STR_WF_MAIN_CommandMenu;
+ tooltip = $STR_WF_TOOLTIP_CommandMenu_Commandteam;
+ action = "MenuAction = 5";
+ };
+ class Button_F : RscShortcutButtonMain {
+ idc = 11006;
+ x = 0.17598;
+ y = 0.55276;
+ w = 0.313727;
+ h = 0.104575;
+ text = $STR_WF_MAIN_TacticalMenu;
+ tooltip = $STR_WF_TOOLTIP_CommandMenu_SpecialMenu;
+ action = "MenuAction = 6";
+ };
+ class Button_G : RscShortcutButtonMain {
+ idc = 11007;
+ x = 0.510943;
+ y = 0.451959;
+ w = 0.313727;
+ h = 0.104575;
+ text = $STR_WF_MAIN_UpgradeMenu;
+ tooltip = $STR_WF_TOOLTIP_CommandMenu_Upgrade_Menu;
+ action = "MenuAction = 7";
+ };
+ class Button_H : RscShortcutButtonMain {
+ idc = 11008;
+ x = 0.510943;
+ y = 0.35116;
+ w = 0.313727;
+ h = 0.104575;
+ text = $STR_WF_MAIN_EconomyMenu;
+ tooltip = $STR_WF_TOOLTIP_CommandMenu_Commander_Menu;
+ action = "MenuAction = 8";
+ };
+ class Button_I : RscShortcutButtonMain {
+ idc = 11009;
+ x = 0.17598;
+ y = 0.65356;
+ w = 0.313727;
+ h = 0.104575;
+ text = $STR_WF_SupportMenu;
+ tooltip = $STR_WF_TOOLTIP_CommandMenu_SupportMenu;
+ action = "MenuAction = 9";
+ };
+ class TitleMenu: RscText_Title {
+ idc = 11015;
+ x = 0.178164;
+ y = 0.19379;
+ w = 0.800001;
+ sizeEx = 0.035;
+ };
+ class CA_PA_Button : RscClickableText {
+ idc = 11012;
+ x = 0.776399;
+ y = 0.191982;
+ w = 0.04;
+ h = 0.04;
+ text = "\ca\ui\data\iconvehicle_ca.paa";
+ action = "MenuAction = 12";
+ tooltip = $STR_WF_TOOLTIP_Parameter;
+ };
+ class CA_UN_Button : RscClickableText {
+ idc = 11013;
+ x = 0.194088;
+ y = 0.767144;
+ w = 0.045;
+ h = 0.045;
+ text = "\ca\ui\data\stats_soft_ca.paa";
+ action = "MenuAction = 10";
+ tooltip = $STR_WF_TOOLTIP_Unflip;
+ };
+ class CA_HB_Button : RscClickableText {
+ idc = 11014;
+ x = 0.265514;
+ y = 0.766938;
+ w = 0.045;
+ h = 0.045;
+ text = "\ca\ui\data\editor_2d_camera_ca.paa";
+ action = "MenuAction = 11";
+ tooltip = $STR_WF_TOOLTIP_HeadBugFix;
+ };
+ /* Exit */
+ class Exit_Button : RscButton_Exit {
+ x = 0.778103;
+ y = 0.769671;
+ onButtonClick = "closeDialog 0;";
+ tooltip = $STR_WF_TOOLTIP_CloseButton;
+ };
+ };
+};
+
+//--- Team Menu. | ALL DONE!
+class RscMenu_Team {
+ movingEnable = 1;
+ idd = 13000;
+ onLoad = "_this ExecVM ""Client\GUI\GUI_Menu_Team.sqf""";
+
+ class controlsBackground {
+ class Background_M : RscText {
+ x = 0.187276;
+ y = 0.200401;
+ w = 0.625448;
+ h = 0.599268;
+ colorBackground[] = WFBE_Background_Color;
+ moving = 1;
+ };
+ class Background_H : RscText {
+ x = 0.187276;
+ y = 0.200401;
+ w = 0.625448;
+ h = 0.0525;
+ moving = 1;
+ colorBackground[] = WFBE_Background_Color_Header;
+ };
+ class Background_F : RscText {
+ x = 0.187276;
+ y = 0.747169;
+ w = 0.625448;
+ h = 0.0525;
+ moving = 1;
+ colorBackground[] = WFBE_Background_Color_Footer;
+ };
+ class Background_L : RscText {
+ x = 0.187276;
+ y = 0.251901;
+ w = 0.625448;
+ h = WFBE_Background_Border_Thick;
+ colorBackground[] = WFBE_Background_Border;
+ };
+ };
+ class controls {
+ class Title_TeamMenu : RscText_Title {
+ idc = 13001;
+ x = 0.192941;
+ y = 0.206879;
+ w = 0.3;
+ text = $STR_WF_MAIN_TeamMenu;
+ };
+ /* Video */
+ class Video_Subtitle : RscText_SubTitle {
+ idc = 13101;
+ x = 0.19634;
+ y = 0.265506;
+ w = 0.3;
+ text = $STR_WF_TEAM_VideoOptionsLabel;
+ };
+ class CA_VD_Label : RscText {
+ idc = 13002;
+ x = 0.197022;
+ y = 0.314747;
+ w = 0.3;
+ };
+ class CA_VD_Slider : RscXSliderH {
+ idc = 13003;
+ x = 0.513947;
+ y = 0.31565;
+ w = 0.279999;
+ h = 0.029412;
+ };
+ class CA_TG_Label : RscText {
+ idc = 13004;
+ x = 0.197022;
+ y = 0.35722;
+ w = 0.3;
+ };
+ class CA_TG_Slider : RscXSliderH {
+ idc = 13005;
+ x = 0.514313;
+ y = 0.363086;
+ w = 0.279999;
+ h = 0.029412;
+ };
+ /* Transfer */
+ class CA_Transfer_SubTitle : RscText_SubTitle {
+ idc = 13012;
+ x = 0.19634;
+ y = 0.465507;
+ w = 0.3;
+ text = $STR_WF_TEAM_MoneyTransferLabel;
+ };
+ class CA_TM_Label : RscText {
+ idc = 13006;
+ x = 0.196002;
+ y = 0.57032;
+ w = 0.3;
+ };
+ class CA_TM_Slider : RscXSliderH {
+ idc = 13007;
+ x = 0.513947;
+ y = 0.517846;
+ w = 0.279999;
+ h = 0.029412;
+ };
+ class CA_TM_Combo : RscCombo {
+ idc = 13008;
+ x = 0.202366;
+ y = 0.517987;
+ w = 0.279999;
+ h = 0.035;
+ };
+ class CA_TM_Button : RscButton {
+ idc = 13009;
+ x = 0.513949;
+ y = 0.572956;
+ w = 0.279999;
+ text = $STR_WF_TEAM_TransferButton;
+ action = "MenuAction = 1";
+ };
+ class CA_IC_SubTitle : RscText_SubTitle {
+ idc = 13010;
+ x = 0.380877;
+ y = 0.20787;
+ w = 0.426891;
+ style = ST_RIGHT;
+ };
+ /* Disband */
+ class CA_Disband_SubTitle : RscText_SubTitle {
+ idc = 13011;
+ x = 0.19532;
+ y = 0.642376;
+ w = 0.3;
+ text = $STR_WF_TEAM_DisbandLabel;
+ };
+ class CA_DB_Combo : RscCombo {
+ idc = 13013;
+ x = 0.202364;
+ y = 0.691727;
+ w = 0.279999;
+ h = 0.035;
+ };
+ class CA_DB_Button : RscButton {
+ idc = 13014;
+ x = 0.513951;
+ y = 0.691511;
+ w = 0.279999;
+ text = $STR_WF_TEAM_DisbandButton;
+ action = "MenuAction = 3";
+ };
+ /* FX */
+ class CA_FX_Label : RscText {
+ idc = 13015;
+ x = 0.19634;
+ y = 0.405641;
+ w = 0.3;
+ text = $STR_WF_TEAM_GraphicFilterLabel;
+ };
+ class CA_FX_Combo : RscCombo {
+ idc = 13018;
+ x = 0.514313;
+ y = 0.406464;
+ w = 0.0999999;
+ h = 0.035;
+ onLBSelChanged = "MenuAction = 6";
+ };
+ /* Vote PopUp */
+ class VPOPON_Button : RscButton {
+ idc = 13019;
+ x = 0.203;
+ y = 0.755;
+ w = 0.279;
+ text = "";
+ action = "MenuAction = 13";
+ }
+ /* Seperator */
+ class Line_TRH1 : RscText {
+ x = 0.192941;
+ y = 0.455916;
+ w = 0.614486;
+ h = WFBE_SPT1;
+ colorBackground[] = WFBE_SPC1;
+ };
+ class Line_TRH2 : RscText {
+ x = 0.192941;
+ y = 0.629907;
+ w = 0.614486;
+ h = WFBE_SPT1;
+ colorBackground[] = WFBE_SPC1;
+ };
+ /* Back */
+ class Back_Button : RscButton_Back {
+ x = 0.704632;
+ y = 0.753185;
+ action = "MenuAction = 8";
+ tooltip = $STR_WF_TOOLTIP_BackButton;
+ };
+ /* Exit */
+ class Exit_Button : RscButton_Exit {
+ x = 0.766877;
+ y = 0.753185;
+ onButtonClick = "closeDialog 0;";
+ tooltip = $STR_WF_TOOLTIP_CloseButton;
+ };
+ };
+};
+
+//--- BuyUnits Menu. | ALL DONE!
+class RscMenu_BuyUnits {
+ movingEnable = 1;
+ idd = 12000;
+ onLoad = "_this ExecVM ""Client\GUI\GUI_Menu_BuyUnits.sqf""";
+
+ class controlsBackground {
+ class Background_M : RscText {
+ x = -0.000119045;
+ y = 0.000960164;
+ w = 1.00024;
+ h = 1.00046;
+ moving = 1;
+ colorBackground[] = WFBE_Background_Color;
+ };
+ class Background_H : RscText {
+ x = -0.000119045;
+ y = 0.000960164;
+ w = 1.00024;
+ h = 0.0525;
+ moving = 1;
+ colorBackground[] = WFBE_Background_Color_Header;
+ };
+ class Background_F : RscText {
+ x = -0.000119045;
+ y = 0.948079045;
+ w = 1.00024;
+ h = 0.0525;
+ moving = 1;
+ colorBackground[] = WFBE_Background_Color_Footer;
+ };
+ class Background_L : RscText {
+ x = -0.000119045;
+ y = 0.051619045;
+ w = 1.00024;
+ h = WFBE_Background_Border_Thick;
+ colorBackground[] = WFBE_Background_Border;
+ };
+ };
+ class controls {
+ /* Controls */
+ class CA_BuyList : RscListBoxA {
+ idc = 12001;
+ x = 0.000983551;
+ y = 0.184483;
+ w = 0.493697;
+ h = 0.493299;
+ columns[] = {0.01, 0.19, 0.75};
+ drawSideArrows = 0;
+ idcRight = -1;
+ idcLeft = -1;
+
+ onLBSelChanged = "MenuAction = 302";
+ onLBDblClick = "MenuAction = 1";
+ };
+ class CA_Purchase : RscButton {
+ idc = 12002;
+ x = 0.688983;
+ y = 0.956626;
+ w = 0.12;
+ text = $STR_WF_Purchase;
+ action = "MenuAction = 1";
+ };
+ class Title_BuyUnits : RscText_Title {
+ idc = 12004;
+ x = 0.00477695;
+ y = 0.00775912;
+ w = 0.3;
+ text = $STR_WF_MAIN_Purchase_Units;
+ };
+ /* Factory-Picture */
+ class WF_Con1 : RscClickableText {
+ idc = 12005;
+ x = 0.499874;
+ y = 0.0612043;
+ w = 0.072;
+ h = 0.072;
+ text = "\CA\warfare2\Images\con_barracks.paa";
+ tooltip = $STR_WF_TOOLTIP_UnitPurchase_Con1;
+ action = "MenuAction = 101";
+ };
+ class WF_Con2 : WF_Con1 {
+ idc = 12006;
+ x = 0.585001;
+ text = "\CA\warfare2\Images\con_light.paa";
+ tooltip = $STR_WF_TOOLTIP_UnitPurchase_Con2;
+ action = "MenuAction = 102";
+ };
+ class WF_Con3 : WF_Con1 {
+ idc = 12007;
+ x = 0.670123;
+ text = "\CA\warfare2\Images\con_heavy.paa";
+ tooltip = $STR_WF_TOOLTIP_UnitPurchase_Con3;
+ action = "MenuAction = 103";
+ };
+ class WF_Con4 : WF_Con1 {
+ idc = 12008;
+ x = 0.753571;
+ text = "\CA\warfare2\Images\con_aircraft.paa";
+ tooltip = $STR_WF_TOOLTIP_UnitPurchase_Con4;
+ action = "MenuAction = 104";
+ };
+ class WF_Con7 : WF_Con1 {
+ idc = 12021;
+ x = 0.838699;
+ text = "\CA\warfare2\Images\con_airport.paa";
+ tooltip = $STR_WF_TOOLTIP_UnitPurchase_Con5;
+ action = "MenuAction = 106";
+ };
+ class WF_Con5 : WF_Con1 {
+ idc = 12020;
+ x = 0.923826;
+ text = "Client\Images\con_depot.paa";
+ tooltip = $STR_WF_TOOLTIP_UnitPurchase_Con6;
+ action = "MenuAction = 105";
+ };
+ /**/
+ class CA_Portrait : RscPicture {
+ idc = 12009;
+ x = 0.00434637;
+ y = 0.726386;
+ w = 0.186974;
+ h = 0.219467;
+ style = 0x30 + 0x800;
+ };
+ /* Vehicle-Crew */
+ class WF_Lock : RscClickableText {
+ idc = 12023;
+ x = 0.443363;
+ y = 0.128362;
+ w = 0.05;
+ h = 0.05;
+ text = "Client\Images\i_lock.paa";
+ tooltip = $STR_WF_TOOLTIP_Buy_Locked;
+ action = "MenuAction = 401";
+ };
+ class WF_Driver : WF_Lock {
+ idc = 12012;
+ x = 0.242185;
+ text = "Client\Images\i_driver.paa";
+ tooltip = $STR_WF_TOOLTIP_Buy_Driver;
+ action = "MenuAction = 201";
+ };
+ class WF_Gunner : WF_Lock {
+ idc = 12013;
+ x = 0.292267;
+ text = "Client\Images\i_gunner.paa";
+ tooltip = $STR_WF_TOOLTIP_Buy_Gunner;
+ action = "MenuAction = 202";
+ };
+ class WF_Commander : WF_Lock {
+ idc = 12014;
+ x = 0.343194;
+ text = "Client\Images\i_commander.paa";
+ tooltip = $STR_WF_TOOLTIP_Buy_Commander;
+ action = "MenuAction = 203";
+ };
+ class WF_Extra : WF_Lock {
+ idc = 12041;
+ x = 0.393278;
+ text = "Client\Images\i_extra.paa";
+ tooltip = $STR_WF_TOOLTIP_Buy_Extra;
+ action = "MenuAction = 204";
+ };
+ /**/
+ class WF_MiniMap : RscMapControl {
+ idc = 12015;
+ x = 0.5;
+ y = 0.185168;
+ w = 0.499378;
+ h = 0.493457;
+ ShowCountourInterval = 1;
+ };
+ class CA_Factory_Label : RscText {
+ idc = 12016;
+ x = 0.5;
+ y = 0.140446;
+ w = 0.3;
+ text = $STR_WF_UNITS_Factory;
+ sizeEx = 0.035;
+ };
+ class CA_Combo_Factory : RscCombo {
+ idc = 12018;
+ x = 0.626048;
+ y = 0.140446;
+ w = 0.368908;
+ h = 0.037;
+ onLBSelChanged = "MenuAction = 301";
+ };
+ class CA_Cash_SubTitle : RscText_SubTitle {
+ idc = 12019;
+ x = 0.694657;
+ y = 0.007759;
+ w = 0.3;
+ style = ST_RIGHT;
+ };
+ class CA_Details : RscStructuredText {
+ idc = 12022;
+ x = 0.5;
+ y = 0.699494;
+ w = 0.500294;
+ h = 0.242927;
+ size = 0.0250;
+ };
+ class CA_Queu_SubTitle : RscText_SubTitle {
+ idc = 12024;
+ x = 0.350419;
+ y = 0.00775906;
+ w = 0.3;
+ style = ST_CENTER;
+ };
+ class CA_Faction_Label : RscText {
+ idc = 12025;
+ x = 0.000797182;
+ y = 0.062964;
+ w = 0.3;
+ sizeEx = 0.035;
+ };
+ class CA_Combo_Faction : RscCombo {
+ idc = 12026;
+ x = 0.218874;
+ y = 0.0652035;
+ w = 0.261343;
+ h = 0.035;
+ onLBSelChanged = "MenuAction = 303";
+ };
+ /* Info-Labels */
+ class CA_Faction_Small : RscText_Small {
+ idc = 12027;
+ x = 0.194959;
+ y = 0.692771;
+ w = 0.3;
+ h = 0.037;
+ text = $STR_WF_UNITS_FactionLabel;
+ };
+ class CA_Price_Small : CA_Faction_Small {
+ idc = 12010;
+ x = 0.194959;
+ y = 0.730336;
+ text = $STR_WF_Price;
+ };
+ class CA_Time_Small : CA_Faction_Small {
+ idc = 12028;
+ x = 0.194957;
+ y = 0.76566;
+ text = $STR_WF_UNITS_DurationLabel;
+ };
+ class CA_Skill_Small : CA_Faction_Small {
+ idc = 12029;
+ x = 0.194959;
+ y = 0.803222;
+ text = $STR_WF_UNITS_SkillLabel;
+ };
+ class CA_TransportCapacity_Small : CA_Faction_Small {
+ idc = 12030;
+ x = 0.194959;
+ y = 0.838545;
+ text = $STR_WF_UNITS_TransportCabilityLabel;
+ };
+ class CA_MaxSpeed_Small : CA_Faction_Small {
+ idc = 12031;
+ x = 0.194959;
+ y = 0.876108;
+ text = $STR_WF_UNITS_MaxSpeedLabel;
+ };
+ class CA_Armor_Small : CA_Faction_Small {
+ idc = 12032;
+ x = 0.194959;
+ y = 0.911431;
+ text = $STR_WF_UNITS_ArmorLabel;
+ };
+ /* Info-Values */
+ class CA_Faction_Value : RscText_Small {
+ idc = 12033;
+ x = 0.305041;
+ y = 0.692773;
+ w = 0.19;
+ h = 0.037;
+ style = 1;
+ };
+ class CA_Price_Value : CA_Faction_Value {
+ idc = 12034;
+ x = 0.305042;
+ y = 0.730336;
+ colorText[] = {1, 0, 0, 1};
+ };
+ class CA_Time_Value : CA_Faction_Value {
+ idc = 12035;
+ x = 0.305041;
+ y = 0.765659;
+ };
+ class CA_Skill_Value : CA_Faction_Value {
+ idc = 12036;
+ x = 0.305041;
+ y = 0.803222;
+ };
+ class CA_TransportCapacity_Value : CA_Faction_Value {
+ idc = 12037;
+ x = 0.305042;
+ y = 0.838545;
+ };
+ class CA_MaxSpeed_Value : CA_Faction_Value{
+ idc = 12038;
+ x = 0.305041;
+ y = 0.876109;
+ };
+ class CA_Armor_Value : CA_Faction_Value {
+ idc = 12039;
+ x = 0.30504;
+ y = 0.911432;
+ };
+ /**/
+ class CA_Unit_SubTitle : RscText_SubTitle {
+ idc = 12040;
+ x = 0.000575542;
+ y = 0.686365;
+ w = 0.3;
+ text = $STR_WF_UNITS_InformationLabel;
+ };
+ /* Seperator */
+ class LineTRH1 : RscText {
+ x = 0.00470637;
+ y = 0.685127;
+ w = 0.990954;
+ h = WFBE_SPT1;
+ colorBackground[] = WFBE_SPC1;
+ };
+ /* Back */
+ class Back_Button : RscButton_Back {
+ x = 0.892748;
+ y = 0.953506;
+ action = "MenuAction = 2";
+ tooltip = $STR_WF_TOOLTIP_BackButton;
+ };
+ /* Exit */
+ class Exit_Button : RscButton_Exit {
+ x = 0.953972;
+ y = 0.953506;
+ onButtonClick = "closeDialog 0;";
+ tooltip = $STR_WF_TOOLTIP_CloseButton;
+ };
+ };
+};
+
+//--- Command Menu. | ALL DONE!
+class RscMenu_Command {
+ movingEnable = 1;
+ idd = 14000;
+ onLoad = "_this ExecVM 'Client\GUI\GUI_Menu_Command.sqf'";
+
+ class controlsBackground {
+ class Background_M : RscText {
+ x = 0.000960961;
+ y = 0.00128184;
+ w = 0.999761;
+ h = 1.00023;
+ moving = 1;
+ colorBackground[] = WFBE_Background_Color;
+ };
+ class Background_H : RscText {
+ x = 0.000960961;
+ y = 0.00128184;
+ w = 0.999761;
+ h = 0.0525;
+ moving = 1;
+ colorBackground[] = WFBE_Background_Color_Header;
+ };
+ class Background_F : RscText {
+ x = 0.000960961;
+ y = 0.94901184;
+ w = 0.999761;
+ h = 0.0525;
+ moving = 1;
+ colorBackground[] = WFBE_Background_Color_Footer;
+ };
+ class Background_L : RscText {
+ x = 0.000960961;
+ y = 0.05278184;
+ w = 0.999761;
+ h = WFBE_Background_Border_Thick;
+ colorBackground[] = WFBE_Background_Border;
+ };
+ };
+ class controls {
+ class WF_MiniMap : RscMapControl {
+ idc = 14002;
+ x = 0.468907;
+ y = 0.0563169;
+ w = 0.532152;
+ h = 0.892336;
+ ShowCountourInterval = 1;
+ onMouseMoving = "mouseX = (_this Select 1);mouseY = (_this Select 2)";
+ onMouseButtonDown = "mouseButtonDown = _this Select 1";
+ onMouseButtonUp = "mouseButtonUp = _this Select 1";
+ };
+ class Title_OrderMenu : RscText_Title {
+ idc = 14003;
+ x = 0.00561695;
+ y = 0.00775909;
+ w = 0.3;
+ text = $STR_WF_MAIN_CommandMenu;
+ };
+ class CA_TakeTowns : RscButton {
+ idc = 14005;
+ x = 0.0057147;
+ y = 0.423585;
+ w = 0.22;
+ text = $STR_WF_COMMAND_TakeTowns;
+ action = "MenuAction = 101";
+ };
+ class CA_Move : CA_TakeTowns {
+ idc = 14006;
+ x = 0.00487578;
+ y = 0.473669;
+ text = $STR_WF_COMMAND_Move;
+ action = "MenuAction = 102";
+
+ /* spezial */
+ colorBackground[] = {0.5882, 0.5882, 0.3529, 0.7};
+ colorBackgroundActive[] = {0.5882, 0.5882, 0.3529, 1};
+ colorFocused[] = {0.5882, 0.5882, 0.3529, 1};
+ };
+ class CA_Patrol : CA_TakeTowns {
+ idc = 14007;
+ x = 0.24437;
+ y = 0.424035;
+ text = $STR_WF_COMMAND_Patrol;
+ action = "MenuAction = 103";
+
+ /* spezial */
+ colorBackground[] = {0.5882, 0.5882, 0.3529, 0.7};
+ colorBackgroundActive[] = {0.5882, 0.5882, 0.3529, 1};
+ colorFocused[] = {0.5882, 0.5882, 0.3529, 1};
+ };
+ class CA_Defend : CA_TakeTowns {
+ idc = 14008;
+ x = 0.24353;
+ y = 0.472995;
+ text = $STR_WF_COMMAND_Defense;
+ action = "MenuAction = 104";
+
+ /* spezial */
+ colorBackground[] = {0.5882, 0.5882, 0.3529, 0.7};
+ colorBackgroundActive[] = {0.5882, 0.5882, 0.3529, 1};
+ colorFocused[] = {0.5882, 0.5882, 0.3529, 1};
+ };
+ /**/
+ class CA_BuyType_Label : RscText {
+ idc = 14009;
+ x = -0.000420049;
+ y = 0.752941;
+ w = 0.17;
+ text = $STR_WF_COMMAND_BuyType;
+ };
+ class CA_BuyType_Combo : RscCombo {
+ idc = 14010;
+ x = 0.162328;
+ y = 0.755179;
+ w = 0.302101;
+ h = 0.035;
+ };
+ class CA_Respawn : RscButton {
+ idc = 14011;
+ x = 0.631344;
+ y = 0.957504;
+ w = 0.23;
+ text = $STR_WF_COMMAND_RespawnButton;
+ action = "MenuAction = 201";
+ };
+ class CA_TeamList : RscListBox {
+ idc = 14012;
+ x = 0.00518636;
+ y = 0.178967;
+ w = 0.459244;
+ h = 0.229759;
+ rowHeight = 0.0219091;
+ sizeEx = 0.03;
+ style = 0x20;//--- MultiSelect LB.
+ onLBSelChanged = "MenuAction = 1";
+ onLBDblClick = "MenuAction = 2";
+ };
+ class CA_Mission_Type : RscText {
+ idc = 14013;
+ x = 0.000842094;
+ y = 0.142566;
+ w = 0.3;
+ };
+ class CA_AutoAIOn : RscButton {
+ idc = 14014;
+ x = 0.00470574;
+ y = 0.957504;
+ w = 0.3;
+ text = $STR_WF_COMMAND_AutoAI;
+ action = "MenuAction = 301";
+ };
+ class CA_AutoAIOff : CA_AutoAIOn {
+ idc = 14015;
+ x = 0.318572;
+ text = $STR_WF_COMMAND_AutoAIOff;
+ action = "MenuAction = 301";
+ };
+ class CA_SetBuy : RscButton {
+ idc = 14016;
+ x = 0.0440367;
+ y = 0.801901;
+ w = 0.42;
+ text = $STR_WF_COMMAND_SetBuyType;
+ action = "MenuAction = 302";
+ };
+ /**/
+ class CA_Behavior_Combo : RscCombo {
+ idc = 14017;
+ x = 0.214428;
+ y = 0.531822;
+ w = 0.25;
+ h = 0.035;
+ };
+ class CA_Combat_Combo : CA_Behavior_Combo {
+ idc = 14018;
+ x = 0.214428;
+ y = 0.572941;
+ };
+ class CA_Formation_Combo : CA_Behavior_Combo {
+ idc = 14019;
+ x = 0.214428;
+ y = 0.614061;
+ };
+ class CA_Speed_Combo : CA_Behavior_Combo {
+ idc = 14020;
+ x = 0.214428;
+ y = 0.656302;
+ };
+ /**/
+ class CA_Behavior_Label : RscText {
+ idc = 14021;
+ x = -0.000420049;
+ y = 0.52958;
+ w = 0.17;
+ text = $STR_WF_COMMAND_Behavior;
+ };
+ class CA_Combat_Label : CA_Behavior_Label {
+ idc = 14022;
+ x = -0.000420049;
+ y = 0.5707;
+ text = $STR_WF_COMMAND_CombatMode;
+ };
+ class CA_Formation_Label : CA_Behavior_Label {
+ idc = 14031;
+ x = -0.000420049;
+ y = 0.61182;
+ text = $STR_WF_COMMAND_Formation;
+ };
+ class CA_Speed_Label : CA_Behavior_Label {
+ idc = 14023;
+ x = -0.000420049;
+ y = 0.654061;
+ text = $STR_WF_COMMAND_Speed;
+ };
+ class CA_SetToTeam : RscButton {
+ idc = 14024;
+ x = 0.0440339;
+ y = 0.703026;
+ w = 0.42;
+ text = $STR_WF_COMMAND_SetTeamProperties;
+ action = "MenuAction = 303";
+ };
+ class CA_Respawn_Combo : RscCombo {
+ idc = 14025;
+ x = 0.160647;
+ y = 0.855182;
+ w = 0.303781;
+ h = 0.035;
+ onLBSelChanged = "MenuAction = 305";
+ };
+ class CA_Respawn_Label : CA_Behavior_Label {
+ idc = 14026;
+ x = -0.000420049;
+ y = 0.852941;
+ text = $STR_WF_COMMAND_Respawn;
+ };
+ class CA_SetRespawn : RscButton {
+ idc = 14027;
+ x = 0.0440337;
+ y = 0.900783;
+ w = 0.42;
+ text = $STR_WF_COMMAND_SetRespawn;
+ action = "MenuAction = 304";
+ };
+ class CA_Funds_Label : RscText {
+ idc = 14028;
+ x = 0.168488;
+ y = 0.142689;
+ w = 0.3;
+ style = ST_RIGHT;
+ };
+ class CA_Tab_Label : RscText_SubTitle {
+ idc = 14030;
+ x = 0.335;
+ y = 0.0107146;
+ w = 0.3;
+ style = ST_CENTER;
+ text = $STR_WF_COMMAND_SquadSettingsLabel;
+ };
+ class CA_SetTask : RscButton {
+ idc = 14032;
+ x = 0.0440328;
+ y = 0.621904;
+ w = 0.42;
+ text = $STR_WF_COMMAND_TaskTO_Set;
+ action = "MenuAction = 306";
+
+ /* spezial */
+ colorBackground[] = {0.5882, 0.5882, 0.3529, 0.7};
+ colorBackgroundActive[] = {0.5882, 0.5882, 0.3529, 1};
+ colorFocused[] = {0.5882, 0.5882, 0.3529, 1};
+ };
+ /* HQ Team units details */
+ class CA_UnitsDetailList : RscListBoxA {
+ idc = 14041;
+ x = 0.00518636;
+ y = 0.527339;
+ w = 0.463445;
+ h = 0.366386;
+ columns[] = {0.01, 0.19};
+ drawSideArrows = 0;
+ idcRight = -1;
+ idcLeft = -1;
+ rowHeight = 0.05;
+ sizeEx = 0.023;
+ onLBSelChanged = "MenuAction = 401";
+ onLBDblClick = "MenuAction = 3";
+
+ /* spezial */
+ colorText[] = {0, 0.875, 0, 0.8};
+ colorSelect[] = {0, 0.875, 0, 0.8};
+ colorSelect2[] = {0, 0.875, 0, 0.8};
+ /* extra */
+ colorSelectBackground[] = {0, 0, 0, 0.5};
+ colorSelectBackground2[] = {0, 0, 0, 0.5};
+ };
+ class CA_FUnflip : RscButton {
+ idc = 14042;
+ x = 0.24384;
+ y = 0.900286;
+ w = 0.22;
+ text = $STR_WF_COMMAND_UnflipButton;
+ action = "MenuAction = 402";
+ };
+ class CA_FDisband : RscButton {
+ idc = 14043;
+ x = 0.00493164;
+ y = 0.900296;
+ w = 0.22;
+ text = $STR_WF_TEAM_DisbandButton;
+ action = "MenuAction = 403";
+ };
+ class WF_Con1 : RscClickableText {
+ idc = 14500;
+ x = 0.136976;
+ y = 0.0589629;
+ w = 0.072;
+ h = 0.072;
+ text = "\CA\warfare2\Images\con_barracks.paa";
+ tooltip = $STR_WF_TOOLTIP_TeamOrders_Con1;
+ action = "MenuAction = 601";
+ };
+ class WF_Con2 : WF_Con1 {
+ idc = 14501;
+ x = 0.290419;
+ text = "Client\Images\con_task.paa";
+ tooltip = $STR_WF_TOOLTIP_TeamOrders_Con2;
+ action = "MenuAction = 602";
+ };
+ class WF_Con3 : WF_Con1 {
+ idc = 14502;
+ x = 0.213698;
+ text = "\CA\warfare2\Images\con_hq.paa";
+ tooltip = $STR_WF_TOOLTIP_TeamOrders_Con3;
+ action = "MenuAction = 603";
+ };
+ /* Separators */
+ class LineTRH1 : RscText {
+ idc = 14900;
+ x = 0.00554727;
+ y = 0.518182;
+ w = 0.458181;
+ h = WFBE_SPT1;
+ colorBackground[] = WFBE_SPC1;
+ };
+ class LineTRH2 : LineTRH1 {
+ idc = 14901;
+ x = 0.00554727;
+ y = 0.845784;
+ };
+ class LineTRH3 : LineTRH1 {
+ idc = 14902;
+ x = 0.00554727;
+ y = 0.746904;
+ };
+ /* Back */
+ class Back_Button : RscButton_Back {
+ x = 0.892507;
+ y = 0.953825;
+ action = "MenuAction = 4";
+ tooltip = $STR_WF_TOOLTIP_BackButton;
+ };
+ /* Exit */
+ class Exit_Button : RscButton_Exit {
+ x = 0.955773;
+ y = 0.953825;
+ onButtonClick = "closeDialog 0;";
+ tooltip = $STR_WF_TOOLTIP_CloseButton;
+ };
+ };
+};
+
+//--- Respawn Menu. | ALL DONE!
+class RscMenu_Respawn {
+ movingEnable = 1;
+ idd = 15000;
+ onLoad = "_this ExecVM ""Client\GUI\GUI_Menu_Respawn.sqf""";
+
+ class controlsBackground {
+ class Background_M : RscText {
+ x = -0.000119045;
+ y = 0.000960164;
+ w = 1.00024;
+ h = 1.00046;
+ moving = 1;
+ colorBackground[] = WFBE_Background_Color;
+ };
+ class Background_H : RscText {
+ x = -0.000119045;
+ y = 0.000960164;
+ w = 1.00024;
+ h = 0.0525;
+ moving = 1;
+ colorBackground[] = WFBE_Background_Color_Header;
+ };
+ class Background_F : RscText {
+ x = -0.000119045;
+ y = 0.948079045;
+ w = 1.00024;
+ h = 0.0525;
+ moving = 1;
+ colorBackground[] = WFBE_Background_Color_Footer;
+ };
+ class Background_L : RscText {
+ x = -0.000119045;
+ y = 0.051619045;
+ w = 1.00024;
+ h = WFBE_Background_Border_Thick;
+ colorBackground[] = WFBE_Background_Border;
+ };
+ };
+ class controls {
+ class WF_MiniMap : RscMapControl {
+ idc = 15001;
+ x = -0.000180572;
+ y = 0.0550423;
+ w = 0.999339;
+ h = 0.892352;
+ ShowCountourInterval = 1;
+
+ onMouseMoving = "mouseX = (_this Select 1);mouseY = (_this Select 2)";
+ onMouseButtonDown = "mouseButtonDown = _this Select 1";
+ onMouseButtonUp = "mouseButtonUp = _this Select 1";
+ };
+ class Title_RespawnMenu : RscText_Title {
+ idc = 15002;
+ x = 0.000478119;
+ y = 0.00556108;
+ w = 0.3;
+ text = $STR_WF_RESPAWN_Title;
+ };
+ class CA_Status : RscText {
+ idc = 15003;
+ x = 0.00558168;
+ y = 0.957391;
+ w = 0.7;
+ };
+ class CA_Gear_Button : RscButton {
+ idc = 15004;
+ x = 0.72479;
+ y = 0.00940119;
+ w = 0.25;
+ colorBackground[] = {0.5882, 0.5882, 0.3529, 0.7};
+ colorBackgroundActive[] = {0.5882, 0.5882, 0.3529, 1};
+ colorFocused[] = {0.5882, 0.5882, 0.3529, 1};
+
+ tooltip = $STR_WF_TOOLTIP_RespawnDefault;
+ onButtonClick = "WFBE_RespawnDefaultGear = if (WFBE_RespawnDefaultGear) then {false} else {true};";
+ };
+ class CA_PreEnv_Button : CA_Gear_Button {
+ idc = 15005;
+ x = 0.443363;
+ y = 0.00940122;
+ w = 0.25;
+ colorBackground[] = {0, 0.537, 1, 0.5};
+ colorBackgroundActive[] = {0, 0.537, 1, 1};
+ colorFocused[] = {0, 0.537, 1, 1};
+
+ tooltip = $STR_WF_TOOLTIP_Preload;
+ onButtonClick = "WFBE_EnablePreload = if (WFBE_EnablePreload) then {false} else {true};";
+ };
+ };
+};
+
+//--- BuyGear Menu. | ALL DONE!
+class RscMenu_BuyGear {
+ movingEnable = 1;
+ idd = 16000;
+ onLoad = gearmenu;
+
+ class controlsBackground {
+ class Background_M : RscText {
+ x = 0.000960961;
+ y = 0.00128125;
+ w = 0.999759;
+ h = 1.00023;
+ moving = 1;
+ colorBackground[] = WFBE_Background_Color;
+ };
+ class Background_G : RscText {
+ x = 0.502979;
+ y = 0.0571992;
+ w = 0.497839;
+ h = 0.894108;
+ moving = 1;
+ colorBackground[] = WFBE_Background_Color_Gear;
+ };
+ class Background_H : RscText {
+ x = 0.000960961;
+ y = 0.00128125;
+ w = 0.999759;
+ h = 0.0525;
+ moving = 1;
+ colorBackground[] = WFBE_Background_Color_Header;
+ };
+ class Background_F : RscText {
+ x = 0.000960961;
+ y = 0.94901125;
+ w = 0.999759;
+ h = 0.0525;
+ moving = 1;
+ colorBackground[] = WFBE_Background_Color_Footer;
+ };
+ class Background_L : RscText {
+ x = 0.000960961;
+ y = 0.05278125;
+ w = 0.999759;
+ h = WFBE_Background_Border_Thick;
+ colorBackground[] = WFBE_Background_Border;
+ };
+ };
+ class controls {
+ //---ArmA 2 WF Gear Menu Modified
+ /* FilterButton */
+ class FilterButtonSidearm : RscClickableText {
+ idc = 3400 + 4;
+ style = 48 + 0x800;
+ x = 0.33979;
+ y = 0.034482;
+ w = 0.0699999;
+ h = 0.11;
+ text = "Client\Images\geariconsidearm.paa";
+ tooltip = $STR_WF_TOOLTIP_FilterButtonSidearm;
+ action = "WF_Logic setVariable ['filler','sidearm']";
+ };
+ class FilterButtonMisc : FilterButtonSidearm {
+ idc = 3400 + 5;
+ x = 0.421555;
+ y = 0.0344832;
+ text = "Client\Images\geariconmisc.paa";
+ tooltip = $STR_WF_TOOLTIP_FilterButtonMisc;
+ action = "WF_Logic setVariable ['filler','misc']";
+ };
+ class FilterButtonSecondary : FilterButtonSidearm {
+ idc = 3400 + 3;
+ x = 0.259109;
+ y = 0.034482;
+ text = "Client\Images\geariconsecondary.paa";
+ tooltip = $STR_WF_TOOLTIP_FilterButtonSecondary;
+ action = "WF_Logic setVariable ['filler','secondary']";
+ };
+ class FilterButtonPrimary : FilterButtonSidearm {
+ idc = 3400 + 2;
+ x = 0.16979;
+ y = 0.0344832;
+ text = "Client\Images\geariconprimary.paa";
+ tooltip = $STR_WF_TOOLTIP_FilterButtonPrimary;
+ action = "WF_Logic setVariable ['filler','primary']";
+ };
+ class FilterButtonTemplate : FilterButtonSidearm {
+ idc = 3400;
+ x = 0.00642873;
+ y = 0.034482;
+ text = "Client\Images\gearicontemplate.paa";
+ tooltip = $STR_WF_TOOLTIP_FilterButtonTemplate;
+ action = "WF_Logic setVariable ['filler','template']";
+ };
+ class FilterButtonAll : FilterButtonTemplate {
+ idc = 3400 + 1;
+ x = 0.0814287;
+ y = 0.034482;
+ text = "Client\Images\geariconall.paa";
+ tooltip = $STR_WF_TOOLTIP_FilterButtonAll;
+ action = "WF_Logic setVariable ['filler','all']";
+ };
+ /* Bag, Clear, Reload */
+ class ConClear : RscClickableText {
+ idc = 3800;
+ x = 0.726369;
+ y = 0.000554629;
+ w = 0.05;
+ h = 0.05;
+ tooltip = $STR_WF_TOOLTIP_GearClear;
+ text = "Client\Images\i_clear.paa";
+ action = "WF_Logic setVariable ['WF_Gear_Action','clear']";
+ };
+ class ConReload : ConClear {
+ idc = 3801;
+ x = 0.788822;
+ tooltip = $STR_WF_TOOLTIP_GearReload;
+ text = "Client\Images\i_reload.paa";
+ action = "WF_Logic setVariable ['WF_Gear_Action','reload']";
+ };
+ class ConBackpack : ConClear {
+ idc = 3802;
+ x = 0.662235;
+ tooltip = $STR_WF_TOOLTIP_Backpack;
+ text = "Client\Images\i_backpack.paa";
+ action = "WF_Logic setVariable ['WF_Gear_Action','backpack']";
+ };
+ /* List */
+ class MainList : RscListBoxA {
+ idc = 3700;
+ columns[] = {0.01, 0.25};
+ drawSideArrows = 0;
+ idcRight = -1;
+ idcLeft = -1;
+ x = 0.00434496;
+ y = 0.17888;
+ w = 0.492017;
+ h = 0.464167;
+ onLBSelChanged = "WF_Logic setVariable ['lbChange',true]";
+ onLBDblClick = "WF_Logic setVariable ['lbMainAction','addWeapon']";
+ };
+ class SecondaryList : RscListBoxA {
+ idc = 3701;
+ columns[] = {0.01, 0.25};
+ drawSideArrows = 0;
+ idcRight = -1;
+ idcLeft = -1;
+ x = 0.00434496;
+ y = 0.657759;
+ w = 0.492017;
+ h = 0.284818;
+ onLBDblClick = "WF_Logic setVariable ['lbMainAction','addMagazine']";
+ };
+ /**/
+ class PrimaryWeapon : RscClickableText {
+ idc = 3500;
+ x = 0.502842;
+ y = 0.200302;
+ w = 0.310369;
+ h = 0.198179;
+ style = 48 + 0x800;
+ soundDoubleClick[] = {"", 0.1, 1};
+ colorBackground[] = {0.6, 0.83, 0.47, 1};
+ colorBackgroundSelected[] = {0.6, 0.83, 0.47, 1};
+ colorFocused[] = {0, 0, 0, 0};
+ color[] = {0.85, 0.85, 0.85, 1};
+ colorText[] = {0.85, 0.85, 0.85, 1};
+ colorActive[] = {1, 1, 1, 1};
+ text = "\Ca\UI\Data\ui_gear_gun_gs.paa";
+ action = "primClicked = true";
+ };
+ class SecondaryWeapon : PrimaryWeapon {
+ idc = 3500 + 1;
+ y = 0.401362;
+ text = "\Ca\UI\Data\ui_gear_sec_gs.paa";
+ action = "secoClicked = true";
+ };
+ class Sidearm : PrimaryWeapon {
+ idc = 3500 + 2;
+ x = 0.576806;
+ y = 0.607022;
+ w = 0.113;
+ h = 0.15;
+ text = "\Ca\UI\Data\ui_gear_hgun_gs.paa";
+ action = "sideClicked = true";
+ };
+ /* Inventory */
+ class InventorySlot0 : RscClickableText {
+ idc = 3500 + 3;
+ x = 0.816052;
+ y = 0.250721;
+ w = 0.06;
+ h = 0.08;
+ text = "\Ca\UI\Data\ui_gear_mag_gs.paa";
+ action = "WF_Logic setVariable ['InventoryClick',3503]";
+ };
+ class InventorySlot1 : InventorySlot0 {
+ idc = 3500 + 4;
+ x = 0.878093;
+ y = 0.250721;
+ action = "WF_Logic setVariable ['InventoryClick',3504]";
+ };
+ class InventorySlot2 : InventorySlot0 {
+ idc = 3500 + 5;
+ x = 0.940501;
+ y = 0.250721;
+ action = "WF_Logic setVariable ['InventoryClick',3505]";
+ };
+ class InventorySlot3 : InventorySlot0 {
+ idc = 3500 + 6;
+ x = 0.816052;
+ y = 0.341169;
+ action = "WF_Logic setVariable ['InventoryClick',3506]";
+ };
+ class InventorySlot4 : InventorySlot0 {
+ idc = 3500 + 7;
+ x = 0.878093;
+ y = 0.341169;
+ action = "WF_Logic setVariable ['InventoryClick',3507]";
+ };
+ class InventorySlot5 : InventorySlot0 {
+ idc = 3500 + 8;
+ x = 0.940501;
+ y = 0.341169;
+ action = "WF_Logic setVariable ['InventoryClick',3508]";
+ };
+ class InventorySlot6 : InventorySlot0 {
+ idc = 3500 + 9;
+ x = 0.816052;
+ y = 0.429373;
+ action = "WF_Logic setVariable ['InventoryClick',3509]";
+ };
+ class InventorySlot7 : InventorySlot0 {
+ idc = 3500 + 10;
+ x = 0.878093;
+ y = 0.429373;
+ action = "WF_Logic setVariable ['InventoryClick',3510]";
+ };
+ class InventorySlot8 : InventorySlot0 {
+ idc = 3500 + 11;
+ x = 0.940501;
+ y = 0.429373;
+ action = "WF_Logic setVariable ['InventoryClick',3511]";
+ };
+ class InventorySlot9 : InventorySlot0 {
+ idc = 3500 + 12;
+ x = 0.816052;
+ y = 0.519938;
+ action = "WF_Logic setVariable ['InventoryClick',3512]";
+ };
+ class InventorySlot10 : InventorySlot0 {
+ idc = 3500 + 13;
+ x = 0.878093;
+ y = 0.519938;
+ action = "WF_Logic setVariable ['InventoryClick',3513]";
+ };
+ class InventorySlot11 : InventorySlot0 {
+ idc = 3500 + 14;
+ x = 0.940501;
+ y = 0.519938;
+ action = "WF_Logic setVariable ['InventoryClick',3514]";
+ };
+ /* Sidearm */
+ class SidearmInventorySlot0 : RscClickableText {
+ idc = 3500 + 15;
+ x = 0.695848;
+ y = 0.607022;
+ w = 0.055;
+ h = 0.074;
+ text = "\Ca\UI\Data\ui_gear_hgunmag_gs.paa";
+ action = "WF_Logic setVariable ['InventoryClick',3515]";
+ };
+ class SidearmInventorySlot1 : SidearmInventorySlot0 {
+ idc = 3500 + 16;
+ x = 0.75653;
+ y = 0.607022;
+ action = "WF_Logic setVariable ['InventoryClick',3516]";
+ };
+ class SidearmInventorySlot2 : SidearmInventorySlot0 {
+ idc = 3500 + 17;
+ x = 0.816892;
+ y = 0.607022;
+ action = "WF_Logic setVariable ['InventoryClick',3517]";
+ };
+ class SidearmInventorySlot3 : SidearmInventorySlot0 {
+ idc = 3500 + 18;
+ x = 0.877253;
+ y = 0.607022;
+ action = "WF_Logic setVariable ['InventoryClick',3518]";
+ };
+ class SidearmInventorySlot4 : SidearmInventorySlot0 {
+ idc = 3500 + 19;
+ x = 0.695848;
+ y = 0.688504;
+ action = "WF_Logic setVariable ['InventoryClick',3519]";
+ };
+ class SidearmInventorySlot5 : SidearmInventorySlot0 {
+ idc = 3500 + 20;
+ x = 0.756529;
+ y = 0.688504;
+ action = "WF_Logic setVariable ['InventoryClick',3520]";
+ };
+ class SidearmInventorySlot6 : SidearmInventorySlot0 {
+ idc = 3500 + 21;
+ x = 0.816892;
+ y = 0.688504;
+ action = "WF_Logic setVariable ['InventoryClick',3521]";
+ };
+ class SidearmInventorySlot7 : SidearmInventorySlot0 {
+ idc = 3500 + 22;
+ x = 0.877252;
+ y = 0.688505;
+ action = "WF_Logic setVariable ['InventoryClick',3522]";
+ };
+ /* Misc */
+ class MiscInventorySlot0 : RscClickableText {
+ idc = 3500 + 23;
+ x = 0.575126;
+ y = 0.774467;
+ w = 0.055;
+ h = 0.074;
+ colorActive[] = {0.85, 0.85, 0.85, 1};
+ text = "\Ca\UI\Data\ui_gear_eq_gs.paa";
+ action = "WF_Logic setVariable ['InventoryClick',3523]";
+ };
+ class MiscInventorySlot1 : MiscInventorySlot0 {
+ idc = 3500 + 24;
+ x = 0.635487;
+ y = 0.774468;
+ action = "WF_Logic setVariable ['InventoryClick',3524]";
+ };
+ class MiscInventorySlot2 : MiscInventorySlot0 {
+ idc = 3500 + 25;
+ x = 0.695848;
+ y = 0.774468;
+ action = "WF_Logic setVariable ['InventoryClick',3525]";
+ };
+ class MiscInventorySlot3 : MiscInventorySlot0 {
+ idc = 3500 + 26;
+ x = 0.75653;
+ y = 0.774468;
+ action = "WF_Logic setVariable ['InventoryClick',3526]";
+ };
+ class MiscInventorySlot4 : MiscInventorySlot0 {
+ idc = 3500 + 27;
+ x = 0.816892;
+ y = 0.774468;
+ action = "WF_Logic setVariable ['InventoryClick',3527]";
+ };
+ class MiscInventorySlot5 : MiscInventorySlot0 {
+ idc = 3500 + 28;
+ x = 0.877252;
+ y = 0.774468;
+ action = "WF_Logic setVariable ['InventoryClick',3528]";
+ };
+ class MiscInventorySlot6 : MiscInventorySlot0 {
+ idc = 3500 + 29;
+ x = 0.575126;
+ y = 0.85595;
+ action = "WF_Logic setVariable ['InventoryClick',3529]";
+ };
+ class MiscInventorySlot7 : MiscInventorySlot0 {
+ idc = 3500 + 30;
+ x = 0.635487;
+ y = 0.85595;
+ action = "WF_Logic setVariable ['InventoryClick',3530]";
+ };
+ class MiscInventorySlot8 : MiscInventorySlot0 {
+ idc = 3500 + 31;
+ x = 0.695848;
+ y = 0.85595;
+ action = "WF_Logic setVariable ['InventoryClick',3531]";
+ };
+ class MiscInventorySlot9 : MiscInventorySlot0 {
+ idc = 3500 + 32;
+ x = 0.75653;
+ y = 0.85595;
+ action = "WF_Logic setVariable ['InventoryClick',3532]";
+ };
+ class MiscInventorySlot10 : MiscInventorySlot0 {
+ idc = 3500 + 33;
+ x = 0.816892;
+ y = 0.85595;
+ action = "WF_Logic setVariable ['InventoryClick',3533]";
+ };
+ class MiscInventorySlot11 : MiscInventorySlot0 {
+ idc = 3500 + 34;
+ x = 0.877253;
+ y = 0.85595;
+ action = "WF_Logic setVariable ['InventoryClick',3534]";
+ };
+ class SpecialInventorySlot0 : InventorySlot0 {
+ idc = 3500 + 35;
+ x = 0.507043;
+ y = 0.0586288;
+ w = 0.11384;
+ h = 0.136554;
+ colorActive[] = {0.85, 0.85, 0.85, 1};
+ text = "\Ca\UI\Data\ui_gear_eq_gs.paa";
+ action = "WF_Logic setVariable ['InventoryClick',3535]";
+ };
+ class SpecialInventorySlot1 : SpecialInventorySlot0 {
+ idc = 3500 + 36;
+ x = 0.880612;
+ y = 0.0575075;
+ action = "WF_Logic setVariable ['InventoryClick',3536]";
+ };
+ /**/
+ class CA_Money_Label : RscText {
+ x = 0.66164;
+ y = 0.105938;
+ w = 0.11;
+ text = $STR_WF_GEAR_CashLabel;
+ };
+ class CA_Money_Value : RscText {
+ idc = 3851;
+ x = 0.754833;
+ y = 0.105938;
+ w = 0.12;
+ };
+ class CA_Cost_Label : RscText {
+ x = 0.66164;
+ y = 0.150757;
+ w = 0.11;
+ text = $STR_WF_GEAR_CostLabel;
+ };
+ class CA_Cost : RscText {
+ idc = 3850;
+ x = 0.754833;
+ y = 0.150757;
+ w = 0.12;
+ colorText[] = {1, 0, 0, 1};
+ };
+ class CA_GearLabel : RscText_SubTitle {
+ idc = 3852;
+ x = 0.625108;
+ y = 0.0581786;
+ w = 0.250118;
+ style = 2;
+ text = $STR_WF_GEAR_MenuEquip;
+ };
+ class Title_Gear : RscText_Title {
+ idc = 3853;
+ x = 0.00393696;
+ y = 0.00775909;
+ w = 0.3;
+ text = $STR_WF_MAIN_Purchase_Gear;
+ };
+ class CA_SwapUnit : RscCombo {
+ idc = 3854;
+ x = 0.171251;
+ y = 0.131241;
+ w = 0.323269;
+ h = 0.035;
+ onLBSelChanged = "WF_Logic setVariable ['WF_GEAR_Swap',true]";
+ };
+ class Unit_Title : RscText {
+ idc = 3855;
+ x = -0.00101976;
+ y = 0.131241;
+ w = 0.3;
+ text = $STR_WF_GEAR_SquadMember;
+ };
+ class BuyButton : RscButton {
+ idc = 3900;
+ x = 0.687902;
+ y = 0.957504;
+ w = 0.12;
+ text = $STR_WF_Purchase;
+ action = "buyLoadout = true";
+ };
+ class SaveButton : BuyButton {
+ idc = 3902;
+ x = 0.264874;
+ y = 0.957504;
+ w = 0.23;
+ text = $STR_WF_GEAR_TemplateSave;
+ action = "saveLoadout = true";
+ };
+ class DeleteButton : BuyButton {
+ idc = 3903;
+ x = 0.00474623;
+ y = 0.957504;
+ w = 0.23;
+ text = $STR_WF_GEAR_TemplateDelete;
+ action = "deleteLoadout = true";
+ };
+ /* Separators */
+ class LineTRH1 : RscText {
+ x = 0.00302637;
+ y = 0.649061;
+ w = 0.491794;
+ h = WFBE_SPT1;
+ colorBackground[] = WFBE_SPC1;
+ };
+ class LineTRH2 : LineTRH1 {
+ x = 0.500757;
+ y = 0.0571992;
+ w = WFBE_SPT1;
+ h = 0.885859;
+ };
+ /* Back */
+ class Back_Button : RscButton_Back {
+ x = 0.892507;
+ y = 0.954946;
+ action = "MenuAction = 1";
+ tooltip = $STR_WF_TOOLTIP_BackButton;
+ };
+ /* Exit */
+ class Exit_Button : RscButton_Exit {
+ x = 0.955773;
+ y = 0.954946;
+ onButtonClick = "closeDialog 0;";
+ tooltip = $STR_WF_TOOLTIP_CloseButton;
+ };
+ };
+};
+
+//--- Tactical Menu. | ALL DONE!
+class RscMenu_Tactical {
+ movingEnable = 1;
+ idd = 17000;
+ onLoad = "_this ExecVM 'Client\GUI\GUI_Menu_Tactical.sqf'";
+
+ class controlsBackground {
+ class Background_M : RscText {
+ x = 0.000960961;
+ y = 0.00128125;
+ w = 0.999759;
+ h = 1.00023;
+ moving = 1;
+ colorBackground[] = WFBE_Background_Color;
+ };
+ class Background_H : RscText {
+ x = 0.000960961;
+ y = 0.00128125;
+ w = 0.999759;
+ h = 0.0525;
+ moving = 1;
+ colorBackground[] = WFBE_Background_Color_Header;
+ };
+ class Background_F : RscText {
+ x = 0.000960961;
+ y = 0.94901125;
+ w = 0.999759;
+ h = 0.0525;
+ moving = 1;
+ colorBackground[] = WFBE_Background_Color_Footer;
+ };
+ class Background_L : RscText {
+ x = 0.000960961;
+ y = 0.05278125;
+ w = 0.999759;
+ h = WFBE_Background_Border_Thick;
+ colorBackground[] = WFBE_Background_Border;
+ };
+ };
+ class controls {
+ class WF_MiniMap : RscMapControl {
+ idc = 17002;
+ x = 0.374789;
+ y = 0.0574369;
+ w = 0.625427;
+ h = 0.888975;
+ ShowCountourInterval = 1;
+ onMouseMoving = "mouseX = (_this Select 1);mouseY = (_this Select 2)";
+ onMouseButtonDown = "mouseButtonDown = _this Select 1";
+ onMouseButtonUp = "mouseButtonUp = _this Select 1";
+ };
+ class Title_Tactical : RscText_Title {
+ idc = 17003;
+ x = 0.00561695;
+ y = 0.00999998;
+ w = 0.3;
+ text = $STR_WF_MAIN_TacticalMenu;
+ };
+ class CA_Artillery_SubTitle : RscText_SubTitle {
+ idc = 17004;
+ x = 0.00434637;
+ y = 0.0596783;
+ w = 0.2;
+ text = $STR_WF_TACTICAL_Artillery;
+ };
+ class CA_Artillery_Label_Radius : RscText {
+ idc = 17030;
+ x = 0.00602637;
+ y = 0.182926;
+ w = 0.2;
+ text = $STR_WF_TACTICAL_ArtilleryRadius;
+ };
+ class CA_Artillery_Label_Unit : RscText {
+ idc = 17031;
+ x = 0.00434496;
+ y = 0.14259;
+ w = 0.2;
+ text = $STR_WF_TACTICAL_Artillery;
+ };
+ class CA_Artillery_Slider : RscXSliderH {
+ idc = 17005;
+ x = 0.14652;
+ y = 0.188795;
+ w = 0.224033;
+ h = 0.029412;
+ };
+ class CA_SetFMission_Button : RscButton {
+ idc = 17006;
+ x = 0.12047;
+ y = 0.515631;
+ w = 0.25;
+ text = $STR_WF_TACTICAL_ArtillerySetFireMission;
+ action = "MenuAction = 1";
+ /* spezial */
+ colorBackground[] = {0.5882, 0.5882, 0.3529, 0.7};
+ colorBackgroundActive[] = {0.5882, 0.5882, 0.3529, 1};
+ colorFocused[] = {0.5882, 0.5882, 0.3529, 1};
+ };
+ class CA_FireMission_Button : RscButton {
+ idc = 17007;
+ x = 0.12047;
+ y = 0.566833;
+ w = 0.25;
+ text = $STR_WF_TACTICAL_ArtilleryCallFireMission;
+ action = "MenuAction = 2";
+ };
+ class CA_Artillery_Combo : RscCombo {
+ idc = 17008;
+ x = 0.145945;
+ y = 0.146217;
+ w = 0.147;
+ h = 0.029412;
+ onLBSelChanged = "MenuAction = 200";
+ };
+ class CA_Support_SubTitle : RscText_SubTitle {
+ idc = 17009;
+ x = 0.00518464;
+ y = 0.622955;
+ w = 0.2;
+ text = $STR_WF_TACTICAL_Support;
+ };
+ class CA_Artillery_Label_Status : RscText {
+ idc = 17032;
+ x = 0.00602637;
+ y = 0.102254;
+ w = 0.2;
+ text = $STR_WF_TACTICAL_ArtilleryStatus;
+ };
+ class CA_ArtilleryTimeout : RscStructuredText {
+ idc = 17016;
+ x = 0.139245;
+ y = 0.107786;
+ w = 0.213025;
+ size = 0.03;
+ shadow = 2;
+ };
+ class SupportList : RscListBox {
+ idc = 17019;
+ x = 0.00602497;
+ y = 0.663556;
+ w = 0.365965;
+ h = 0.237187;
+ rowHeight = 0.01;
+ sizeEx = 0.026;
+ };
+ class CA_Button_Use : RscButton {
+ idc = 17020;
+ x = 0.22021;
+ y = 0.905171;
+ w = 0.15;
+ text = $STR_WF_TACTICAL_RequestButton;
+ action = "MenuAction = 20";
+ /* spezial */
+ colorBackground[] = {0.5882, 0.5882, 0.3529, 0.7};
+ colorBackgroundActive[] = {0.5882, 0.5882, 0.3529, 1};
+ colorFocused[] = {0.5882, 0.5882, 0.3529, 1};
+ };
+ class CA_SupportCost_Label : RscText {
+ idc = 17026;
+ x = 0.0119054;
+ y = 0.907169;
+ w = 0.11;
+ text = "$STR_WF_TACTICAL_Price";
+ sizeEx = 0.032;
+ };
+ class CA_SupportCost : RscText {
+ idc = 17021;
+ x = 0.111905;
+ y = 0.907169;
+ w = 0.11;
+ sizeEx = 0.032;
+ colorText[] = {1, 0, 0, 1};
+ };
+ class CA_InformationText : RscStructuredText {
+ idc = 17022;
+ x = 0.380816;
+ y = 0.0188458;
+ w = 0.614286;
+ h = 0.035;
+ size = 0.03;
+ class Attributes {
+ align = "center";
+ };
+ };
+ class Ca_ArtilleryToggle : RscClickableText {
+ idc = 17023;
+ x = 0.310672;
+ y = 0.121233;
+ w = 0.064;
+ h = 0.064;
+ text = "Client\Images\tog_arty.paa";
+ action = "MenuAction = 40";
+ tooltip = $STR_WF_TOOLTIP_ArtilleryToggle;
+ };
+ class CA_ArtilleryList : RscListBoxA {
+ idc = 17024;
+ x = 0.00459768;
+ y = 0.270084;
+ w = 0.365209;
+ h = 0.235;
+ columns[] = {0.02, 0.55};
+ drawSideArrows = 0;
+ idcRight = -1;
+ idcLeft = -1;
+ rowHeight = 0.05;
+ sizeEx = 0.023;
+
+ /* extra */
+ colorSelectBackground[] = {0, 0, 0, 0.5};
+ colorSelectBackground2[] = {0, 0, 0, 0.5};
+
+ onLBSelChanged = "MenuAction = 60";
+ };
+ class CA_ArtilleryTable_Label : RscText {
+ idc = 17025;
+ x = 0.00495766;
+ y = 0.226604;
+ w = 0.339999;
+ };
+ /* Separators */
+ class LineTRH1 : RscText {
+ x = 0.00638635;
+ y = 0.61566;
+ w = 0.364063;
+ h = WFBE_SPT1;
+ colorBackground[] = WFBE_SPC1;
+ };
+ /* Back */
+ class Back_Button : RscButton_Back {
+ x = 0.892328;
+ y = 0.953825;
+ action = "MenuAction = 30";
+ tooltip = $STR_WF_TOOLTIP_BackButton;
+ };
+ /* Exit */
+ class Exit_Button : RscButton_Exit {
+ x = 0.956614;
+ y = 0.953825;
+ onButtonClick = "closeDialog 0;";
+ tooltip = $STR_WF_TOOLTIP_CloseButton;
+ };
+ };
+};
+
+//--- Upgrade Menu. | ALL DONE!
+class RscMenu_Upgrade {
+ movingEnable = 1;
+ idd = 18000;
+ onLoad = "_this ExecVM ""Client\GUI\GUI_Menu_Upgrade.sqf""";
+
+ class controlsBackground {
+ class Background_M : RscText {
+ x = 0.0933989;
+ y = 0.151421;
+ w = 0.813204;
+ h = 0.699949;
+ moving = 1;
+ colorBackground[] = WFBE_Background_Color;
+ };
+ class Background_H : RscText {
+ x = 0.0933989;
+ y = 0.151421;
+ w = 0.813204;
+ h = 0.0525;
+ moving = 1;
+ colorBackground[] = WFBE_Background_Color_Header;
+ };
+ class Background_F : RscText {
+ x = 0.0933989;
+ y = 0.798870;
+ w = 0.813204;
+ h = 0.0525;
+ moving = 1;
+ colorBackground[] = WFBE_Background_Color_Footer;
+ };
+ class Background_L : RscText {
+ x = 0.0933989;
+ y = 0.202921;
+ w = 0.813204;
+ h = WFBE_Background_Border_Thick;
+ colorBackground[] = WFBE_Background_Border;
+ };
+ };
+ class controls {
+ class Title_Upgrade : RscText_Title {
+ idc = 18801;
+ x = 0.1;
+ y = 0.157621;
+ w = 0.399999;
+ text = $STR_WF_MAIN_UpgradeMenu;
+ };
+ class CA_Label_TimeLeft : RscText {
+ idc = 18802;
+ x = 0.443216;
+ y = 0.158741;
+ w = 0.45;
+ style = ST_RIGHT;
+ };
+ /* Aircraft */
+ class LineTRH1 : RscText {
+ x = 0.812039;
+ y = 0.3;
+ w = 0.0025;
+ h = 0.4;
+ colorBackground[] = {0.6941,0.6902,0.4431,1};
+ };
+ class LineTRH2 : LineTRH1 {
+ x = 0.812674;
+ y = 0.336547;
+ w = 0.05;
+ h = 0.00300001;
+ };
+ class LineTRH3 : LineTRH1 {
+ x = 0.763215;
+ y = 0.439469;
+ w = 0.05;
+ h = 0.00300001;
+ };
+ class LineTRH4 : LineTRH1 {
+ x = 0.763394;
+ y = 0.540148;
+ w = 0.05;
+ h = 0.00300001;
+ };
+ class LineTRH5 : LineTRH1 {
+ x = 0.812737;
+ y = 0.5648;
+ w = 0.05;
+ h = 0.00300001;
+ };
+ class LineTRH6 : LineTRH1 {
+ x = 0.700909;
+ y = 0.640347;
+ w = 0.113265;
+ h = 0.00300001;
+ };
+ class LineTRH7 : LineTRH1 {
+ x = 0.76336;
+ y = 0.439833;
+ w = 0.0025;
+ h = 0.0300001;
+ };
+ class LineTRH8 : LineTRH1 {
+ x = 0.76336;
+ y = 0.540672;
+ w = 0.0025;
+ h = 0.0300001;
+ };
+ class LineTRH9 : LineTRH1 {
+ x = 0.76336;
+ y = 0.640393;
+ w = 0.0025;
+ h = 0.0300001;
+ };
+ class LineTRH10 : LineTRH1 {
+ x = 0.700997;
+ y = 0.640154;
+ w = 0.0025;
+ h = 0.0300001;
+ };
+ class LineTRH11 : LineTRH1 {
+ x = 0.862185;
+ y = 0.352101;
+ w = 0.0025;
+ h = 0.14;
+ };
+ /* Heavy-Vehicle */
+ class LineTRH20 : LineTRH1 {
+ x = 0.593264;
+ y = 0.3;
+ w = 0.0025;
+ h = 0.4;
+ };
+ class LineTRH21 : LineTRH1 {
+ x = 0.545447;
+ y = 0.439629;
+ w = 0.0489796;
+ h = 0.00300001;
+ };
+ class LineTRH22 : LineTRH1 {
+ x = 0.545713;
+ y = 0.439833;
+ w = 0.0025;
+ h = 0.0300001;
+ };
+ class LineTRH23 : LineTRH1 {
+ x = 0.545713;
+ y = 0.496975;
+ w = 0.0025;
+ h = 0.185;
+ };
+ /* Light-Vehicle */
+ class LineTRH30 : LineTRH1 {
+ x = 0.374489;
+ y = 0.3;
+ w = 0.0025;
+ h = 0.4;
+ };
+ class LineTRH31 : LineTRH1 {
+ x = 0.375701;
+ y = 0.339909;
+ w = 0.05;
+ h = 0.00300001;
+ };
+ class LineTRH32 : LineTRH1 {
+ x = 0.327268;
+ y = 0.540469;
+ w = 0.0489797;
+ h = 0.00300001;
+ };
+ class LineTRH33 : LineTRH1 {
+ x = 0.327226;
+ y = 0.540672;
+ w = 0.0025;
+ h = 0.0300001;
+ };
+ /* Barracks */
+ class LineTRH40 : LineTRH1 {
+ x = 0.186325;
+ y = 0.3;
+ w = 0.0025;
+ h = 0.4;
+ };
+ class LineTRH41 : LineTRH1 {
+ x = 0.187465;
+ y = 0.339909;
+ w = 0.05;
+ h = 0.00300001;
+ };
+ class LineTRH42 : LineTRH1 {
+ x = 0.137885;
+ y = 0.439629;
+ w = 0.05;
+ h = 0.00300001;
+ };
+ class LineTRH43 : LineTRH1 {
+ x = 0.138151;
+ y = 0.439831;
+ w = 0.0025;
+ h = 0.0300001;
+ };
+ class LineTRH44 : LineTRH1 {
+ x = 0.138149;
+ y = 0.492493;
+ w = 0.0025;
+ h = 0.185;
+ };
+ /* Normal GUI Ctrls */
+ class WF_Con1 : RscClickableText {
+ idc = 18001;
+ x = 0.156325;
+ y = 0.238231;
+ w = 0.064;
+ h = 0.064;
+ text = "Client\Images\wf_b.paa";
+ action = "MenuAction = 1";
+
+ onMouseMoving = "mouseX = (_this Select 1);mouseY = (_this Select 2)";
+ onMouseEnter = "displayUpgrade = 'infantry'";
+ onMouseExit = "displayUpgrade = ''";
+ };
+ class WF_Con2 : WF_Con1 {
+ idc = 18002;
+ x = 0.34449;
+ y = 0.238231;
+ text = "Client\Images\wf_lvf.paa";
+ action = "MenuAction = 1";
+
+ onMouseMoving = "mouseX = (_this Select 1);mouseY = (_this Select 2)";
+ onMouseEnter = "displayUpgrade = 'light'";
+ onMouseExit = "displayUpgrade = ''";
+ };
+ class WF_Con3 : WF_Con1 {
+ idc = 18003;
+ x = 0.561224;
+ y = 0.238231;
+ text = "Client\Images\wf_hvf.paa";
+ action = "MenuAction = 1";
+
+ onMouseMoving = "mouseX = (_this Select 1);mouseY = (_this Select 2)";
+ onMouseEnter = "displayUpgrade = 'heavy'";
+ onMouseExit = "displayUpgrade = ''";
+ };
+ class WF_Con4 : WF_Con1 {
+ idc = 18004;
+ x = 0.779999;
+ y = 0.238231;
+ text = "Client\Images\wf_air.paa";
+ action = "MenuAction = 1";
+
+ onMouseMoving = "mouseX = (_this Select 1);mouseY = (_this Select 2)";
+ onMouseEnter = "displayUpgrade = 'air'";
+ onMouseExit = "displayUpgrade = ''";
+ };
+ class WF_Con5 : WF_Con1 {
+ idc = 18005;
+ x = 0.724129;
+ y = 0.457148;
+ text = "Client\Images\wf_par.paa";
+ action = "MenuAction = 1";
+
+ onMouseMoving = "mouseX = (_this Select 1);mouseY = (_this Select 2)";
+ onMouseEnter = "displayUpgrade = 'parachutist'";
+ onMouseExit = "displayUpgrade = ''";
+ };
+ class WF_Con6 : WF_Con1 {
+ idc = 18006;
+ x = 0.723951;
+ y = 0.557871;
+ text = "Client\Images\wf_uav.paa";
+ action = "MenuAction = 1";
+
+ onMouseMoving = "mouseX = (_this Select 1);mouseY = (_this Select 2)";
+ onMouseEnter = "displayUpgrade = 'uav'";
+ onMouseExit = "displayUpgrade = ''";
+ };
+ class WF_Con7 : WF_Con1 {
+ idc = 18007;
+ x = 0.400177;
+ y = 0.329419;
+ text = "Client\Images\wf_sup.paa";
+ action = "MenuAction = 1";
+
+ onMouseMoving = "mouseX = (_this Select 1);mouseY = (_this Select 2)";
+ onMouseEnter = "displayUpgrade = 'supply'";
+ onMouseExit = "displayUpgrade = ''";
+ };
+ class WF_Con8 : WF_Con1 {
+ idc = 18008;
+ x = 0.287599;
+ y = 0.55879;
+ text = "Client\Images\wf_fia.paa";
+ action = "MenuAction = 1";
+
+ onMouseMoving = "mouseX = (_this Select 1);mouseY = (_this Select 2)";
+ onMouseEnter = "displayUpgrade = 'ambuSpawn'";
+ onMouseExit = "displayUpgrade = ''";
+ };
+ class WF_Con9 : WF_Con1 {
+ idc = 18009;
+ x = 0.836891;
+ y = 0.32942;
+ text = "Client\Images\wf_lif.paa";
+ action = "MenuAction = 1";
+
+ onMouseMoving = "mouseX = (_this Select 1);mouseY = (_this Select 2)";
+ onMouseEnter = "displayUpgrade = 'airlift'";
+ onMouseExit = "displayUpgrade = ''";
+ };
+ class WF_Con10 : WF_Con1 {
+ idc = 18010;
+ x = 0.836891;
+ y = 0.558514;
+ text = "Client\Images\wf_fla.paa";
+ action = "MenuAction = 1";
+
+ onMouseMoving = "mouseX = (_this Select 1);mouseY = (_this Select 2)";
+ onMouseEnter = "displayUpgrade = 'flares'";
+ onMouseExit = "displayUpgrade = ''";
+ };
+ class WF_Con11 : WF_Con1 {
+ idc = 18011;
+ x = 0.50587;
+ y = 0.457871;
+ text = "Client\Images\wf_art.paa";
+ action = "MenuAction = 1";
+
+ onMouseMoving = "mouseX = (_this Select 1);mouseY = (_this Select 2)";
+ onMouseEnter = "displayUpgrade = 'artillery'";
+ onMouseExit = "displayUpgrade = ''";
+ };
+ class WF_Con12 : WF_Con1 {
+ idc = 18012;
+ x = 0.660492;
+ y = 0.657666;
+ text = "Client\Images\wf_mib.paa";
+ action = "MenuAction = 1";
+
+ onMouseMoving = "mouseX = (_this Select 1);mouseY = (_this Select 2)";
+ onMouseEnter = "displayUpgrade = 'icbm'";
+ onMouseExit = "displayUpgrade = ''";
+ };
+ class WF_Con13 : WF_Con1 {
+ idc = 18013;
+ x = 0.212198;
+ y = 0.329419;
+ text = "Client\Images\wf_fas.paa";
+ action = "MenuAction = 1";
+
+ onMouseMoving = "mouseX = (_this Select 1);mouseY = (_this Select 2)";
+ onMouseEnter = "displayUpgrade = 'fasttravel'";
+ onMouseExit = "displayUpgrade = ''";
+ };
+ class WF_Con14 : WF_Con1 {
+ idc = 18014;
+ x = 0.100274;
+ y = 0.456988;
+ text = "Client\Images\wf_gea.paa";
+ action = "MenuAction = 1";
+
+ onMouseMoving = "mouseX = (_this Select 1);mouseY = (_this Select 2)";
+ onMouseEnter = "displayUpgrade = 'gear'";
+ onMouseExit = "displayUpgrade = ''";
+ };
+ class WF_Con15 : WF_Con1 {
+ idc = 18015;
+ x = 0.100274;
+ y = 0.658312;
+ text = "Client\Images\wf_amm.paa";
+ action = "MenuAction = 1";
+
+ onMouseMoving = "mouseX = (_this Select 1);mouseY = (_this Select 2)";
+ onMouseEnter = "displayUpgrade = 'ammo'";
+ onMouseExit = "displayUpgrade = ''";
+ };
+ class WF_Con16 : WF_Con1 {
+ idc = 18016;
+ x = 0.72413;
+ y = 0.658312;
+ text = "Client\Images\wf_eas.paa";
+ action = "MenuAction = 1";
+
+ onMouseMoving = "mouseX = (_this Select 1);mouseY = (_this Select 2)";
+ onMouseEnter = "displayUpgrade = 'easa'";
+ onMouseExit = "displayUpgrade = ''";
+ };
+ class WF_Con17 : WF_Con1 {
+ idc = 18017;
+ x = 0.837035;
+ y = 0.457147;
+ text = "Client\Images\wf_pas.paa";
+ action = "MenuAction = 1";
+
+ onMouseMoving = "mouseX = (_this Select 1);mouseY = (_this Select 2)";
+ onMouseEnter = "displayUpgrade = 'paradrop'";
+ onMouseExit = "displayUpgrade = ''";
+ };
+ class WF_Con18 : WF_Con1 {
+ idc = 18018;
+ x = 0.505869;
+ y = 0.657837;
+ text = "Client\Images\wf_shl.paa";
+ action = "MenuAction = 1";
+
+ onMouseMoving = "mouseX = (_this Select 1);mouseY = (_this Select 2)";
+ onMouseEnter = "displayUpgrade = 'shells'";
+ onMouseExit = "displayUpgrade = ''";
+ };
+ /* Tooltip */
+ class TooltipHelper : RscText {
+ idc = 18998;
+ x = 0.0;
+ y = 0.0;
+ w = 0.0;
+ h = 0.0;
+ style = 128;
+ colorBackground[] = {0, 0, 0, 0.6};
+ };
+ class TooltipHelperText : RscStructuredText {
+ idc = 18999;
+ x = 0.0;
+ y = 0.0;
+ w = 0.0;
+ h = 0.0;
+ size = 0.035;
+ class Attributes {
+ font = "Zeppelin32";
+ color = "#B6F862";
+ align = "left";
+ shadow = true;
+ };
+ };
+ /* Back */
+ class Back_Button : RscButton_Back {
+ x = 0.799231;
+ y = 0.804806;
+ action = "MenuAction = 2";
+ tooltip = $STR_WF_TOOLTIP_BackButton;
+ };
+ /* Exit */
+ class Exit_Button : RscButton_Exit {
+ x = 0.862497;
+ y = 0.804806;
+ onButtonClick = "closeDialog 0;";
+ tooltip = $STR_WF_TOOLTIP_CloseButton;
+ };
+ };
+};
+
+//--- Service Menu. | ALL DONE!
+class RscMenu_Service {
+ movingEnable = 1;
+ idd = 20000;
+ onLoad = "ExecVM ""Client\GUI\GUI_Menu_Service.sqf""";
+
+ class controlsBackground {
+ class Background_M : RscText {
+ x = 0.157263;
+ y = 0.151421;
+ w = 0.687155;
+ h = 0.699949;
+ moving = 1;
+ colorBackground[] = WFBE_Background_Color;
+ };
+ class Background_H : RscText {
+ x = 0.157263;
+ y = 0.151421;
+ w = 0.687155;
+ h = 0.0525;
+ moving = 1;
+ colorBackground[] = WFBE_Background_Color_Header;
+ };
+ class Background_F : RscText {
+ x = 0.157263;
+ y = 0.798870;
+ w = 0.687155;
+ h = 0.0525;
+ moving = 1;
+ colorBackground[] = WFBE_Background_Color_Footer;
+ };
+ class Background_L : RscText {
+ x = 0.157263;
+ y = 0.202921;
+ w = 0.687155;
+ h = WFBE_Background_Border_Thick;
+ colorBackground[] = WFBE_Background_Border;
+ };
+ };
+ class controls {
+ class Title_Service : RscText_Title {
+ idc = 20001;
+ x = 0.161008;
+ y = 0.157731;
+ w = 0.3;
+ text = $STR_WF_SupportMenu;
+ };
+ class CA_UnitList : RscListBox {
+ idc = 20002;
+ x = 0.162101;
+ y = 0.209804;
+ w = 0.677143;
+ h = 0.429553;
+ rowHeight = 0.025;
+ sizeEx = 0.035;
+ };
+ class CA_Rearm_Button : RscButton {
+ idc = 20003;
+ x = 0.161261;
+ y = 0.650391;
+ w = 0.22;
+ text = $STR_WF_SERVICE_Rearm;
+ action = "MenuAction = 1";
+ };
+ class CA_Repair_Button : RscButton {
+ idc = 20004;
+ x = 0.50748;
+ y = 0.650391;
+ w = 0.22;
+ text = $STR_WF_SERVICE_Repair;
+ action = "MenuAction = 2";
+ };
+ class CA_Refuel_Button : RscButton {
+ idc = 20005;
+ x = 0.161261;
+ y = 0.697899;
+ w = 0.22;
+ text = $STR_WF_SERVICE_Refuel;
+ action = "MenuAction = 3";
+ };
+ class CA_Heal_Button : RscButton {
+ idc = 20008;
+ x = 0.50748;
+ y = 0.697899;
+ w = 0.22;
+ text = $STR_WF_SERVICE_Heal;
+ action = "MenuAction = 5";
+ };
+ class CA_EASA_Button : RscButton {
+ idc = 20010;
+ x = 0.161261;
+ y = 0.747311;
+ w = 0.565918;
+ text = $STR_WF_SERVICE_EASA;
+ action = "MenuAction = 7";
+ };
+ class CA_LabelRearm: RscText {
+ idc = 20011;
+ x = 0.388739;
+ y = 0.653752;
+ w = 0.12;
+ };
+ class CA_LabelRepair : CA_LabelRearm {
+ idc = 20012;
+ x = 0.734957;
+ y = 0.653752;
+ w = 0.12;
+ };
+ class CA_LabelRefuel : CA_LabelRearm {
+ idc = 20013;
+ x = 0.388739;
+ y = 0.699691;
+ w = 0.12;
+ };
+ class CA_LabelHeal : CA_LabelRearm {
+ idc = 20014;
+ x = 0.734957;
+ y = 0.699691;
+ w = 0.12;
+ };
+ /* Back */
+ class Back_Button : RscButton_Back {
+ x = 0.737046;
+ y = 0.803685;
+ action = "MenuAction = 8";
+ tooltip = $STR_WF_TOOLTIP_BackButton;
+ };
+ /* Exit */
+ class Exit_Button : RscButton_Exit {
+ x = 0.800311;
+ y = 0.803685;
+ onButtonClick = "closeDialog 0;";
+ tooltip = $STR_WF_TOOLTIP_CloseButton;
+ };
+ };
+};
+
+//--- UnitCamera Menu. | ALL DONE!
+class RscMenu_UnitCamera {
+ movingEnable = 1;
+ idd = 21000;
+ onLoad = "_this ExecVM ""Client\GUI\GUI_Menu_UnitCamera.sqf""";
+
+ class controlsBackground {
+ class Background_M : RscText {
+ x = 0.000119537;
+ y = 0.70044;
+ w = 0.999761;
+ h = 0.298829;
+ moving = 1;
+ colorBackground[] = WFBE_Background_Color;
+ };
+ class Background_H : RscText {
+ x = 0.000119537;
+ y = 0.70044;
+ w = 0.999761;
+ h = 0.0525;
+ moving = 1;
+ colorBackground[] = WFBE_Background_Color_Header;
+ };
+ class Background_F : RscText {
+ x = 0.000119537;
+ y = 0.946769;
+ w = 0.999761;
+ h = 0.0525;
+ moving = 1;
+ colorBackground[] = WFBE_Background_Color_Footer;
+ };
+ class Background_L : RscText {
+ x = 0.000119537;
+ y = 0.75194;
+ w = 0.999761;
+ h = WFBE_Background_Border_Thick;
+ colorBackground[] = WFBE_Background_Border;
+ };
+ };
+ class controls {
+ class Title_UnitCam : RscText_Title {
+ idc = 21001;
+ x = 0.00470497;
+ y = 0.706961;
+ w = 0.3;
+ text = $STR_WF_TACTICAL_UnitCam;
+ };
+ class CA_Camera_UnitList : RscListBox {
+ idc = 21002;
+ x = -0.000335053;
+ y = 0.755239;
+ w = 0.311932;
+ h = 0.190877;
+ rowHeight = 0.01;
+ sizeEx = 0.024;
+ onLBSelChanged = "MenuAction = 101";
+ };
+ class CA_SquadKI_Label : RscText {
+ idc = 21003;
+ x = 0.312271;
+ y = 0.714061;
+ w = 0.3;
+ colorText[] = {0.2588, 0.7137, 1, 1};
+ text = $STR_WF_UNITCAM_SquadKI;
+ };
+ class CA_Camera_AIList : RscListBox {
+ idc = 21004;
+ x = 0.312269;
+ y = 0.754063;
+ w = 0.311932;
+ h = 0.190877;
+ rowHeight = 0.01;
+ sizeEx = 0.024;
+ onLBSelChanged = "MenuAction = 102";
+ };
+ class CA_Camera_Mode : RscText {
+ idc = 21005;
+ x = 0.629077;
+ y = 0.713836;
+ w = 0.3;
+ colorText[] = {0.2588, 0.7137, 1, 1};
+ text = $STR_WF_UNITCAM_CamMode;
+ };
+ class CA_Camera_Combo : RscCombo {
+ idc = 21006;
+ x = 0.831595;
+ y = 0.711259;
+ w = 0.163193;
+ h = 0.035;
+ onLBSelChanged = "MenuAction = 103";
+ };
+ class CA_MiniMap : RscMapControl {
+ idc = 21007;
+ x = 0.625041;
+ y = 0.75514;
+ w = 0.374504;
+ h = 0.191614;
+ ShowCountourInterval = 1;
+ onMouseMoving = "mouseX = (_this Select 1);mouseY = (_this Select 2)";
+ onMouseButtonDown = "mouseButtonDown = _this Select 1";
+ onMouseButtonUp = "mouseButtonUp = _this Select 1";
+ };
+ /* Exit */
+ class Exit_Button : RscButton_Exit {
+ x = 0.954933;
+ y = 0.953825;
+ onButtonClick = "closeDialog 0;";
+ tooltip = $STR_WF_TOOLTIP_CloseButton;
+ };
+ };
+};
+
+//--- Prameters Display. | ALL DONE!
+class RscDisplay_Parameters {
+ movingEnable = 1;
+ idd = 22000;
+ onLoad = "_this ExecVM ""Client\GUI\GUI_Display_Parameters.sqf""";
+
+ class controlsBackground {
+ class Background_M : RscText {
+ x = -0.000478864;
+ y = 0.151421;
+ w = 1.00096;
+ h = 0.699949;
+ moving = 1;
+ colorBackground[] = WFBE_Background_Color;
+ };
+ class Background_H : RscText {
+ x = -0.000478864;
+ y = 0.151421;
+ w = 1.00096;
+ h = 0.0525;
+ moving = 1;
+ colorBackground[] = WFBE_Background_Color_Header;
+ };
+ class Background_F : RscText {
+ x = -0.000478864;
+ y = 0.798870;
+ w = 1.00096;
+ h = 0.0525;
+ moving = 1;
+ colorBackground[] = WFBE_Background_Color_Footer;
+ };
+ class Background_L : RscText {
+ x = -0.000478864;
+ y = 0.202921;
+ w = 1.00096;
+ h = WFBE_Background_Border_Thick;
+ colorBackground[] = WFBE_Background_Border;
+ };
+ };
+ class controls {
+ class Title_Parameter : RscText_Title {
+ idc = 22002;
+ x = 0.00510308;
+ y = 0.157759;
+ w = 0.3;
+ text = $STR_WF_PARAMETER_Parameters;
+ };
+ class LB_ParamsTitles : RscListBoxA {
+ idc = 22003;
+ columns[] = {0.01, 0.55};
+ rowHeight = 0.036;
+ drawSideArrows = 0;
+ idcRight = -1;
+ idcLeft = -1;
+ x = 0.00204286;
+ y = 0.211603;
+ w = 0.997959;
+ h = 0.579722;
+ };
+ /* Back */
+ class Back_Button : RscButton_Back {
+ x = 0.892509;
+ y = 0.804806;
+ action = "MenuAction = 1";
+ tooltip = $STR_WF_TOOLTIP_BackButton;
+ };
+ /* Exit */
+ class Exit_Button : RscButton_Exit {
+ x = 0.955774;
+ y = 0.804806;
+ onButtonClick = "closeDialog 0;";
+ tooltip = $STR_WF_TOOLTIP_CloseButton;
+ };
+ };
+};
+
+//--- EASA Menu. | ALL DONE!
+class RscMenu_EASA {
+ movingEnable = 1;
+ idd = 23000;
+ onLoad = "_this ExecVM ""Client\GUI\GUI_Menu_EASA.sqf""";
+
+ class controlsBackground {
+ class Background_M : RscText {
+ x = 0.157263;
+ y = 0.200721;
+ w = 0.687155;
+ h = 0.601349;
+ moving = 1;
+ colorBackground[] = WFBE_Background_Color;
+ };
+ class Background_H : RscText {
+ x = 0.157263;
+ y = 0.200721;
+ w = 0.687155;
+ h = 0.0525;
+ moving = 1;
+ colorBackground[] = WFBE_Background_Color_Header;
+ };
+ class Background_F : RscText {
+ x = 0.157263;
+ y = 0.749570;
+ w = 0.687155;
+ h = 0.0525;
+ moving = 1;
+ colorBackground[] = WFBE_Background_Color_Footer;
+ };
+ class Background_L : RscText {
+ x = 0.157263;
+ y = 0.252221;
+ w = 0.687155;
+ h = WFBE_Background_Border_Thick;
+ colorBackground[] = WFBE_Background_Border;
+ };
+ };
+ class controls {
+ class Title_EASA : RscText_Title {
+ idc = 23002;
+ x = 0.162105;
+ y = 0.207843;
+ w = 0.6;
+ text = $STR_WF_EASA;
+ };
+ class LB_EASA : RscListBoxA {
+ idc = 23003;
+ columns[] = {0.01, 0.16};
+ rowHeight = 0.036;
+ drawSideArrows = 0;
+ idcRight = -1;
+ idcLeft = -1;
+ x = 0.162186;
+ y = 0.263187;
+ w = 0.67689;
+ h = 0.476481;
+ onLBDblClick = "MenuAction = 101";
+ };
+ class CA_Purchase : RscButton {
+ idc = 22004;
+ x = 0.613615;
+ y = 0.758018;
+ w = 0.1;
+ text = $STR_WF_Purchase;
+ action = "MenuAction = 101";
+ };
+ /* Exit */
+ class Exit_Button : RscButton_Exit {
+ x = 0.799471;
+ y = 0.755506;
+ onButtonClick = "closeDialog 0;";
+ tooltip = $STR_WF_TOOLTIP_CloseButton;
+ };
+ };
+};
+
+//--- Economy Menu. | ALL DONE!
+class RscMenu_Economy {
+ movingEnable = 1;
+ idd = 23000;
+ onLoad = "_this ExecVM 'Client\GUI\GUI_Menu_Economy.sqf'";
+
+ class controlsBackground {
+ class Background_M : RscText {
+ x = 0.0318137;
+ y = 0.2004;
+ w = 0.938056;
+ h = 0.59934;
+ moving = 1;
+ colorBackground[] = WFBE_Background_Color;
+ };
+ class Background_H : RscText {
+ x = 0.0318137;
+ y = 0.2004;
+ w = 0.938056;
+ h = 0.0525;
+ moving = 1;
+ colorBackground[] = WFBE_Background_Color_Header;
+ };
+ class Background_F : RscText {
+ x = 0.0318137;
+ y = 0.74724;
+ w = 0.938056;
+ h = 0.0525;
+ moving = 1;
+ colorBackground[] = WFBE_Background_Color_Footer;
+ };
+ class Background_L : RscText {
+ x = 0.0318137;
+ y = 0.2519;
+ w = 0.938056;
+ h = WFBE_Background_Border_Thick;
+ colorBackground[] = WFBE_Background_Border;
+ };
+ };
+ class controls {
+ class WF_MiniMap : RscMapControl {
+ idc = 23002;
+ x = 0.5;
+ y = 0.254636;
+ w = 0.469125;
+ h = 0.492337;
+ ShowCountourInterval = 1;
+
+ onMouseMoving = "mouseX = (_this Select 1);mouseY = (_this Select 2)";
+ onMouseButtonDown = "mouseButtonDown = _this Select 1";
+ onMouseButtonUp = "mouseButtonUp = _this Select 1";
+ };
+ class Title_CommanderMenu : RscText_Title {
+ idc = 23003;
+ x = 0.0367093;
+ y = 0.207199;
+ w = 0.3;
+ text = $STR_WF_MAIN_EconomyMenu;
+ };
+ /* Workers */
+ class CA_LabelPartWorkers : RscText_SubTitle {
+ idc = 23008;
+ x = 0.0322372;
+ y = 0.264119;
+ w = 0.25;
+ text = $STR_WF_ECONOMY_Workers;
+ };
+ class CA_HireWorker_Button : RscButton {
+ idc = 23004;
+ x = 0.0372772;
+ y = 0.315322;
+ w = 0.279999;
+ text = $STR_WF_ECONOMY_HireWorker;
+ action = "MenuAction = 1";
+ };
+ class CA_LabelWorkers : RscText {
+ idc = 23005;
+ x = 0.331681;
+ y = 0.317564;
+ w = 0.15;
+ colorText[] = {1, 0, 0, 1};
+ };
+ class CA_DisbandWorker_Button : RscButton {
+ idc = 23006;
+ x = 0.0372786;
+ y = 0.373248;
+ w = 0.279999;
+ text = $STR_WF_ECONOMY_DisbandWorker;
+ action = "MenuAction = 2";
+ };
+ class CA_Workers_Combo : RscCombo {
+ idc = 23007;
+ x = 0.33168;
+ y = 0.37601;
+ w = 0.15;
+ h = 0.035;
+ onLBSelChanged = "MenuAction = 100";
+ };
+ /* Income */
+ class CA_LabelPartIncome : CA_LabelPartWorkers {
+ idc = 23009;
+ x = 0.0322358;
+ y = 0.456346;
+ w = 0.25;
+ text = $STR_WF_ECONOMY_Income_Sys;
+ };
+ class CA_Slider_Income : RscXSliderH {
+ idc = 23010;
+ x = 0.0372786;
+ y = 0.514272;
+ w = 0.333109;
+ h = 0.029412;
+ };
+ class CA_LabelIncomePercent : RscText {
+ idc = 23011;
+ x = 0.394873;
+ y = 0.512032;
+ w = 0.15;
+ };
+ class CA_IncomeSet_Button : RscButton {
+ idc = 23012;
+ x = 0.0372772;
+ y = 0.567717;
+ w = 0.334;
+ text = $STR_WF_ECONOMY_SetIncome;
+ action = "MenuAction = 3";
+ };
+ class CA_LabelIncomeCommander : RscText {
+ idc = 23013;
+ x = 0.0372772;
+ y = 0.634608;
+ w = 0.399999;
+ };
+ class CA_LabelPlayerCommander : CA_LabelIncomeCommander {
+ idc = 23014;
+ x = 0.0372772;
+ y = 0.687535;
+ w = 0.399999;
+ };
+ /* Selling Structures */
+ class CA_Sell : RscButton {
+ idc = 23015;
+ x = 0.501454;
+ y = 0.757255;
+ w = 0.28;
+ text = $STR_WF_ECONOMY_SellStructure;
+ action = "MenuAction = 105";
+ /* spezial */
+ colorBackground[] = {0.5882, 0.5882, 0.3529, 0.7};
+ colorBackgroundActive[] = {0.5882, 0.5882, 0.3529, 1};
+ colorFocused[] = {0.5882, 0.5882, 0.3529, 1};
+ };
+ /* Respawn Supply Truck Debug */
+ class CA_RespST_Button : RscClickableText {
+ idc = 23016;
+ x = 0.0368904;
+ y = 0.751251;
+ w = 0.05;
+ h = 0.05;
+ text = "Client\Images\picturepapercar_ca.paa";
+ action = "MenuAction = 4";
+ tooltip = $STR_WF_TOOLTIP_RespawnST;
+ };
+ /* Separators */
+ class LineTRH1 : RscText {
+ x = 0.0349591;
+ y = 0.449622;
+ w = 0.459861;
+ h = WFBE_SPT1;
+ colorBackground[] = WFBE_SPC1;
+ };
+ /* Back */
+ class Back_Button : RscButton_Back {
+ x = 0.861415;
+ y = 0.754385;
+ action = "MenuAction = 5";
+ tooltip = $STR_WF_TOOLTIP_BackButton;
+ };
+ /* Exit */
+ class Exit_Button : RscButton_Exit {
+ x = 0.924681;
+ y = 0.754385;
+ onButtonClick = "closeDialog 0;";
+ tooltip = $STR_WF_TOOLTIP_CloseButton;
+ };
+ };
+};
+
+// ACE gear menu
+class RscAceGear
+{
+ movingEnable=1;
+ idd=16001;
+ onLoad="ExecVM ""Client\GUI\GUI_GearAce.sqf""";
+ class Filters
+ {
+ class All
+ {
+ name="All";
+ mask=-1;
+ image="\ca\ui\data\igui_gear_filter_1_ca.paa";
+ };
+ class Primary
+ {
+ name="Primary";
+ mask=769;
+ image="\ca\ui\data\igui_gear_filter_2_ca.paa";
+ };
+ class Secondary
+ {
+ name="Secondary";
+ mask=516;
+ image="\ca\ui\data\igui_gear_filter_3_ca.paa";
+ };
+ class HandGun
+ {
+ name="HandGun";
+ mask=18;
+ image="\ca\ui\data\igui_gear_filter_4_ca.paa";
+ };
+ class Items
+ {
+ name="Items";
+ mask=135168;
+ image="\ca\ui\data\igui_gear_filter_5_ca.paa";
+ };
+ };
+ class ControlsBackground
+ {
+ class Mainback:RscPicture
+ {
+ idc=1005;
+ x="(SafeZoneX + 0.01)";
+ y="(SafeZoneY + 0.01)";
+ w=1.1;
+ h=1.14;
+ moving=1;
+ text="\x\ace\addons\sys_ruck\data\ui\ui_gear_background.paa";
+ };
+ };
+ class controls
+ {
+ class Gear_Title:CA_IGUI_Title
+ {
+ idc=1001;
+ x="(SafeZoneX + 0.02)";
+ y="(SafeZoneY + 0.02)";
+ text=$STR_WF_Purchase_Gear;
+ };
+ class ConClear : RscClickableText {
+ style = 48 + 0x800;
+ color[] = {1, 1, 1, 1};
+ colorActive[] = subcolor1;
+ idc = 3800;
+ x="(SafeZoneX + 0.852)";
+ y="(SafeZoneY + 0.02)";
+ w = 0.032;
+ h = 0.032;
+ tooltip = $STR_WF_Tooltips_GearClear;
+ text = "Client\Images\i_clear.paa";
+ action = "WF_Logic setVariable ['WF_Gear_Action','clear']";
+ };
+ class ConReload : ConClear {
+ idc = 3801;
+ x="(SafeZoneX + 0.88)";
+ tooltip = $STR_WF_Tooltips_GearReload;
+ text = "Client\Images\i_reload.paa";
+ action = "WF_Logic setVariable ['WF_Gear_Action','reload']";
+ };
+ class ConBackpack : ConClear {
+ idc = 3802;
+ x="(SafeZoneX + 0.824)";
+ tooltip = $STR_WF_Tooltips_Backpack;
+ text = "Client\Images\i_backpack.paa";
+ action = "WF_Logic setVariable ['WF_Gear_Action','backpack']";
+ };
+ class CA_Filter_Icon:RscPicture
+ {
+ idc=148;
+ style="0x30+ 0x800";
+ x="(SafeZoneX + 0.025)";
+ y="(SafeZoneY + 0.09)- 0.001";
+ w=0.458;
+ h=0.075;
+ text="\ca\ui\data\igui_gear_filter_1_ca.paa";
+ };
+ class CA_Filter_Left_Icon:RscClickableText
+ {
+ idc=1301;
+ style="0x30+ 0x800";
+ x="(SafeZoneX + 0.025)+ 0.01";
+ y="(SafeZoneY + 0.09)";
+ w=0.036;
+ h=0.075;
+ text="\ca\ui\data\arrow_left_ca.paa";
+ action="WF_Logic setVariable [ 'lbMainAction', 'filterMinus' ]";
+ };
+ class CA_Filter_Right_Icon:RscClickableText
+ {
+ idc=1302;
+ style="0x30+ 0x800";
+ x="(SafeZoneX + 0.025)+ 0.413";
+ y="(SafeZoneY + 0.09)";
+ w=0.036;
+ h=0.075;
+ text="\ca\ui\data\arrow_right_ca.paa";
+ action="WF_Logic setVariable [ 'lbMainAction', 'filterPlus' ]";
+ };
+ class CA_Filter_Icon1:RscButton
+ {
+ idc=149;
+ colorText[]={1,1,1,0};
+ colorDisabled[]={1,1,1,0};
+ colorBackground[]={1,1,1,0};
+ colorBackgroundDisabled[]={1,1,1,0};
+ colorBackgroundActive[]={1,1,1,0};
+ colorShadow[]={1,1,1,0};
+ colorFocused[]={1,1,1,0};
+ x="(SafeZoneX + 0.025)+ 0.059";
+ y="(SafeZoneY + 0.02)";
+ w=0.341;
+ h=0.075;
+ text="";
+ };
+ class Unit_Title:RscText
+ {
+ idc=101;
+ style="0x02";
+ x="(SafeZoneX + 0.66)";
+ y="(SafeZoneY + 0.09)";
+ w=0.4;
+ };
+ class ACE_Unit_Arrow_Left:RscClickableText
+ {
+ idc=90110;
+ style="0x30+ 0x800";
+ colorBackground[]={0,0,0,1};
+ x="(SafeZoneX + 0.66)- 0.030";
+ y="(SafeZoneY + 0.09)";
+ w=0.03;
+ h=0.037;
+ text="\ca\ui\data\arrow_left_ca.paa";
+ action="WF_Logic setVariable [ 'lbMainAction', 'unitMinus' ]";
+ };
+ class ACE_Unit_Arrow_Right:RscClickableText
+ {
+ idc=90111;
+ style="0x30+ 0x800";
+ colorBackground[]={0,0,0,1};
+ x="(SafeZoneX + 0.66)+ 0.4";
+ y="(SafeZoneY + 0.09)";
+ w=0.03;
+ h=0.037;
+ text="\ca\ui\data\arrow_right_ca.paa";
+ action="WF_Logic setVariable [ 'lbMainAction', 'unitPlus' ]";
+ };
+ class Available_items_Text:RscText
+ {
+ idc=1100;
+ x="(SafeZoneX + 0.025)+ 0.0033014";
+ y="(SafeZoneY + 0.18)";
+ w=0.389709;
+ h=0.04;
+ text=$STR_GEAR_ITEMS;
+ };
+ class CA_ItemName:Available_items_Text
+ {
+ idc=1101;
+ x="(SafeZoneX + 0.025)+ 0.0016704";
+ y="(SafeZoneY + 0.59)";
+ h=0.04;
+ text=$STR_GEAR_UNIT;
+ };
+ class CA_Item_Picture:RscPicture
+ {
+ idc=1104;
+ style="0x30+ 0x800";
+ x="(SafeZoneX + 0.465)";
+ y="(SafeZoneY + 0.64)";
+ w=0.156863;
+ h=0.104575;
+ text="";
+ };
+ class CA_CustomDescription:RscStructuredText
+ {
+ idc=1106;
+ x="(SafeZoneX + 0.02)";
+ y="(SafeZoneY + 0.64)";
+ w=0.458;
+ h=0.152;
+ colorText[]={0.95,0.95,0.95,1};
+ class Attributes
+ {
+ font="Zeppelin32";
+ color="#F2F2F2";
+ align="left";
+ shadow=1;
+ };
+ };
+ class ACE_Ruck_Items:RscText
+ {
+ idc=90000;
+ x="(SafeZoneX + 0.025)+ 0.0033014";
+ y="(SafeZoneY + 0.80)";
+ w=0.389709;
+ h=0.04;
+ text=$STR_ACE_RUCK_ITEMS;
+ };
+ class MainList : RscListBoxA {
+ idc = 3700;
+ columns[] = {0.01, 0.25};
+ drawSideArrows = 0;
+ idcRight = -1;
+ idcLeft = -1;
+ x="(SafeZoneX + 0.025)";
+ y="(SafeZoneY + 0.22)";
+ w=0.42;
+ h=0.36;
+
+ onLBSelChanged = "WF_Logic setVariable ['lbChange',true]";
+ onLBDblClick = "WF_Logic setVariable ['lbMainAction','addMainItem']";
+ };
+ class SecondaryList : RscListBoxA {
+ idc = 3701;
+ columns[] = {0.01, 0.25};
+ drawSideArrows = 0;
+ idcRight = -1;
+ idcLeft = -1;
+ x="(SafeZoneX + 0.025)";
+ y="(SafeZoneY + 0.84)";
+ w=0.42;
+ h=0.25;
+ onLBDblClick = "WF_Logic setVariable ['lbMainAction','addMagazine']";
+ };
+ class ACE_Item_Weight:RscText
+ {
+ idc=90005;
+ x="(SafeZoneX + 0.485)";
+ y="(SafeZoneY + 0.80)";
+ w=0.2;
+ h=0.04;
+ text="";
+ };
+ class ACE_Item_Volume:RscText
+ {
+ idc=90007;
+ x="(SafeZoneX + 0.485)";
+ y="(SafeZoneY + 0.84)";
+ w=0.2;
+ h=0.04;
+ text="";
+ };
+ class ACE_Total_Weight:RscText
+ {
+ idc=90009;
+ x="(SafeZoneX + 0.40)";
+ y="(SafeZoneY + 0.02)";
+ w=0.3;
+ h=0.04;
+ text="";
+ };
+ class ACE_Total_Volume:RscText
+ {
+ idc=90011;
+ x="(SafeZoneX + 0.025)+ 0.15";
+ y="(SafeZoneY + 0.80)";
+ w=0.35;
+ h=0.04;
+ text="";
+ };
+ class ACE_ButtonWOBPrimary:RscIGUIShortcutButton
+ {
+ idc=90100;
+ w=0.15;
+ x="(SafeZoneX + 0.51)";
+ y="(SafeZoneY + 0.20)";
+ text=$STR_ACE_ON_BACK;
+ onButtonClick="WF_Logic setVariable ['WF_Gear_Action','primary_onback']";
+ };
+ class ACE_ButtonWOBSecondary:ACE_ButtonWOBPrimary
+ {
+ idc=90101;
+ y="(SafeZoneY + 0.35)";
+ text=$STR_ACE_ON_BACK;
+ onButtonClick="WF_Logic setVariable ['WF_Gear_Action','secondary_onback']";
+ };
+ class G_GearItems:RscControlsGroup
+ {
+ idc=160;
+ x="(SafeZoneX + 0.13 + 0.502)";
+ y="(SafeZoneY + 0.05 + 0.09 )";
+ w=0.463;
+ h=0.776;
+ class Controls
+ {
+ class CA_Gear_slot_primary:RscClickableText
+ {
+ idc=107;
+ x=0;
+ y=0;
+ w=0.286;
+ h=0.15;
+ style="0x30+ 0x800";
+ soundDoubleClick[]={"",0.1,1};
+ color[]={1,1,1,1};
+ colorBackground[]={0.6,0.8392,0.4706,1};
+ colorBackgroundSelected[]={0.6,0.8392,0.4706,1};
+ colorFocused[]={0,0,0,0};
+ colorActive[]={1,1,1,1};
+ text="";
+ action="WF_Logic setVariable ['InventoryClick',107]";
+ };
+ class CA_Gear_slot_secondary:CA_Gear_slot_primary
+ {
+ idc=108;
+ y="(0.244 - 0.09)";
+ action="WF_Logic setVariable ['InventoryClick',108]";
+ };
+ class ACE_Gear_slot_WOB:CA_Gear_slot_primary
+ {
+ idc=90020;
+ y="(0.398 - 0.09)";
+ color[]={1,1,1,0.5};
+ colorFocused[]={1,1,1,1};
+ action="WF_Logic setVariable ['InventoryClick',90020]";
+ };
+ class CA_Gear_slot_item1:CA_Gear_slot_primary
+ {
+ idc=109;
+ x="(0.79 - 0.502)";
+ y=0;
+ w=0.055;
+ h=0.074;
+ action="WF_Logic setVariable ['InventoryClick',109]";
+ };
+ class CA_Gear_slot_item2:CA_Gear_slot_item1
+ {
+ idc=110;
+ x="(0.847 - 0.502)";
+ y=0;
+ action="WF_Logic setVariable ['InventoryClick',110]";
+ };
+ class CA_Gear_slot_item3:CA_Gear_slot_item1
+ {
+ idc=111;
+ x="(0.904366 - 0.502)";
+ y=0;
+ action="WF_Logic setVariable ['InventoryClick',111]";
+ };
+ class CA_Gear_slot_item4:CA_Gear_slot_item1
+ {
+ idc=112;
+ x="(0.79 - 0.502)";
+ y="(0.167 - 0.09)";
+ action="WF_Logic setVariable ['InventoryClick',112]";
+ };
+ class CA_Gear_slot_item5:CA_Gear_slot_item1
+ {
+ idc=113;
+ x="(0.847 - 0.502)";
+ y="(0.167 - 0.09)";
+ action="WF_Logic setVariable ['InventoryClick',113]";
+ };
+ class CA_Gear_slot_item6:CA_Gear_slot_item1
+ {
+ idc=114;
+ x="(0.904366 - 0.502)";
+ y="(0.167 - 0.09)";
+ action="WF_Logic setVariable ['InventoryClick',114]";
+ };
+ class CA_Gear_slot_item7:CA_Gear_slot_item1
+ {
+ idc=115;
+ x="(0.79 - 0.502)";
+ y="(0.244 - 0.09)";
+ action="WF_Logic setVariable ['InventoryClick',115]";
+ };
+ class CA_Gear_slot_item8:CA_Gear_slot_item7
+ {
+ idc=116;
+ x="(0.847 - 0.502)";
+ y="(0.244 - 0.09)";
+ action="WF_Logic setVariable ['InventoryClick',116]";
+ };
+ class CA_Gear_slot_item9:CA_Gear_slot_item7
+ {
+ idc=117;
+ x="(0.904366 - 0.502)";
+ y="(0.244 - 0.09)";
+ action="WF_Logic setVariable ['InventoryClick',117]";
+ };
+ class CA_Gear_slot_item10:CA_Gear_slot_item7
+ {
+ idc=118;
+ x="(0.79 - 0.502)";
+ y="(0.321 - 0.09)";
+ action="WF_Logic setVariable ['InventoryClick',118]";
+ };
+ class CA_Gear_slot_item11:CA_Gear_slot_item7
+ {
+ idc=119;
+ x="(0.847 - 0.502)";
+ y="(0.321 - 0.09)";
+ action="WF_Logic setVariable ['InventoryClick',119]";
+ };
+ class CA_Gear_slot_item12:CA_Gear_slot_item7
+ {
+ idc=120;
+ x="(0.904366 - 0.502)";
+ y="(0.321 - 0.09)";
+ action="WF_Logic setVariable ['InventoryClick',120]";
+ };
+ class CA_Gear_slot_handgun:CA_Gear_slot_primary
+ {
+ idc=121;
+ x=0;
+ y="(0.551 - 0.09)";
+ w=0.113;
+ h=0.15;
+ action="WF_Logic setVariable ['InventoryClick',121]";
+ };
+ class CA_Gear_slot_handgun_item1:CA_Gear_slot_item1
+ {
+ idc=122;
+ x="(0.617 - 0.502)";
+ y="(0.551 - 0.09)";
+ w=0.055;
+ h=0.074;
+ action="WF_Logic setVariable ['InventoryClick',122]";
+ };
+ class CA_Gear_slot_handgun_item2:CA_Gear_slot_handgun_item1
+ {
+ idc=123;
+ x="(0.674 - 0.502)";
+ y="(0.551 - 0.09)";
+ action="WF_Logic setVariable ['InventoryClick',123]";
+ };
+ class CA_Gear_slot_handgun_item3:CA_Gear_slot_handgun_item1
+ {
+ idc=124;
+ x="(0.733 - 0.502)";
+ y="(0.551 - 0.09)";
+ action="WF_Logic setVariable ['InventoryClick',124]";
+ };
+ class CA_Gear_slot_handgun_item4:CA_Gear_slot_handgun_item1
+ {
+ idc=125;
+ x="(0.79 - 0.502)";
+ y="(0.551 - 0.09)";
+ action="WF_Logic setVariable ['InventoryClick',125]";
+ };
+ class CA_Gear_slot_handgun_item5:CA_Gear_slot_handgun_item1
+ {
+ idc=126;
+ x="(0.617 - 0.502)";
+ y="(0.628 - 0.09)";
+ action="WF_Logic setVariable ['InventoryClick',126]";
+ };
+ class CA_Gear_slot_handgun_item6:CA_Gear_slot_handgun_item5
+ {
+ idc=127;
+ x="(0.674 - 0.502)";
+ y="(0.628 - 0.09)";
+ action="WF_Logic setVariable ['InventoryClick',127]";
+ };
+ class CA_Gear_slot_handgun_item7:CA_Gear_slot_handgun_item5
+ {
+ idc=128;
+ x="(0.733 - 0.502)";
+ y="(0.628 - 0.09)";
+ action="WF_Logic setVariable ['InventoryClick',128]";
+ };
+ class CA_Gear_slot_handgun_item8:CA_Gear_slot_handgun_item5
+ {
+ idc=129;
+ x="(0.79 - 0.502)";
+ y="(0.628 - 0.09)";
+ action="WF_Logic setVariable ['InventoryClick',129]";
+ };
+ class CA_Gear_slot_special1:CA_Gear_slot_item1
+ {
+ idc=130;
+ x="(0.847 - 0.502)";
+ y="(0.551 - 0.09)";
+ w=0.113;
+ h=0.15;
+ action="WF_Logic setVariable ['InventoryClick',130]";
+ };
+ class CA_Gear_slot_special2:CA_Gear_slot_special1
+ {
+ idc=131;
+ x="(0.847 - 0.502)";
+ y="(0.705 - 0.09)";
+ action="WF_Logic setVariable ['InventoryClick',131]";
+ };
+ class CA_Gear_slot_inventory1:CA_Gear_slot_special1
+ {
+ idc=134;
+ x=0;
+ y="(0.705 - 0.09)";
+ w=0.055;
+ h=0.074;
+ action="WF_Logic setVariable ['InventoryClick',134]";
+ };
+ class CA_Gear_slot_inventory2:CA_Gear_slot_inventory1
+ {
+ idc=135;
+ x="(0.56 - 0.502)";
+ y="(0.705 - 0.09)";
+ action="WF_Logic setVariable ['InventoryClick',135]";
+ };
+ class CA_Gear_slot_inventory3:CA_Gear_slot_inventory1
+ {
+ idc=136;
+ x="(0.617 - 0.502)";
+ y="(0.705 - 0.09)";
+ action="WF_Logic setVariable ['InventoryClick',136]";
+ };
+ class CA_Gear_slot_inventory4:CA_Gear_slot_inventory1
+ {
+ idc=137;
+ x="(0.674 - 0.502)";
+ y="(0.705 - 0.09)";
+ action="WF_Logic setVariable ['InventoryClick',137]";
+ };
+ class CA_Gear_slot_inventory5:CA_Gear_slot_inventory1
+ {
+ idc=138;
+ x="(0.733 - 0.502)";
+ y="(0.705 - 0.09)";
+ action="WF_Logic setVariable ['InventoryClick',138]";
+ };
+ class CA_Gear_slot_inventory6:CA_Gear_slot_inventory1
+ {
+ idc=139;
+ x="(0.79 - 0.502)";
+ y="(0.705 - 0.09)";
+ action="WF_Logic setVariable ['InventoryClick',139]";
+ };
+ class CA_Gear_slot_inventory7:CA_Gear_slot_inventory1
+ {
+ idc=140;
+ x=0;
+ y="(0.782 - 0.09)";
+ action="WF_Logic setVariable ['InventoryClick',140]";
+ };
+ class CA_Gear_slot_inventory8:CA_Gear_slot_inventory7
+ {
+ idc=141;
+ x="(0.56 - 0.502)";
+ y="(0.782 - 0.09)";
+ action="WF_Logic setVariable ['InventoryClick',141]";
+ };
+ class CA_Gear_slot_inventory9:CA_Gear_slot_inventory7
+ {
+ idc=142;
+ x="(0.617 - 0.502)";
+ y="(0.782 - 0.09)";
+ action="WF_Logic setVariable ['InventoryClick',142]";
+ };
+ class CA_Gear_slot_inventory10:CA_Gear_slot_inventory7
+ {
+ idc=143;
+ x="(0.674 - 0.502)";
+ y="(0.782 - 0.09)";
+ action="WF_Logic setVariable ['InventoryClick',143]";
+ };
+ class CA_Gear_slot_inventory11:CA_Gear_slot_inventory7
+ {
+ idc=144;
+ x="(0.733 - 0.502)";
+ y="(0.782 - 0.09)";
+ action="WF_Logic setVariable ['InventoryClick',144]";
+ };
+ class CA_Gear_slot_inventory12:CA_Gear_slot_inventory7
+ {
+ idc=145;
+ x="(0.79 - 0.502)";
+ y="(0.782 - 0.09)";
+ action="WF_Logic setVariable ['InventoryClick',145]";
+ };
+ class CA_Gear_slot_inventory13:CA_Gear_slot_inventory7
+ {
+ idc=1122;
+ x=0.1;
+ y=0.1;
+ };
+ class ACE_IFAK_1P:RscPicture
+ {
+ idc=90104;
+ style="0x30+ 0x800";
+ x="(0.79 - 0.502)";
+ y="(0.398 - 0.09)+ 0.05";
+ w=0.043;
+ h=0.043;
+ text="";
+ };
+ class ACE_IFAK_2P:RscPicture
+ {
+ idc=90105;
+ style="0x30+ 0x800";
+ x="(0.79 - 0.502)+ 0.001+ 0.043";
+ y="(0.398 - 0.09)+ 0.05";
+ w=0.043;
+ h=0.043;
+ text="";
+ };
+ class ACE_IFAK_3P:RscPicture
+ {
+ idc=90106;
+ style="0x30+ 0x800";
+ x="(0.79 - 0.502)+ (0.001+ 0.043) * 2";
+ y="(0.398 - 0.09)+ 0.05";
+ w=0.043;
+ h=0.043;
+ text="";
+ };
+ class ACE_IFAK_1C:RscText
+ {
+ idc=90107;
+ style="0x02";
+ x="(0.79 - 0.502)";
+ y="(0.398 - 0.09)+ 0.05* 2";
+ w=0.043;
+ h="0.043* 0.7";
+ text="";
+ };
+ class ACE_IFAK_2C:RscText
+ {
+ idc=90108;
+ style="0x02";
+ x="(0.79 - 0.502)+ 0.001+ 0.043";
+ y="(0.398 - 0.09)+ 0.05* 2";
+ w=0.043;
+ h="0.043* 0.7";
+ text="";
+ };
+ class ACE_IFAK_3C:RscText
+ {
+ idc=90109;
+ style="0x02";
+ x="(0.79 - 0.502)+ (0.001+ 0.043) * 2";
+ y="(0.398 - 0.09)+ 0.05* 2";
+ w=0.043;
+ h="0.043* 0.7";
+ text="";
+ };
+ };
+ };
+ class Break_7:RscLineBreak
+ {
+ };
+ class ButtonClose:RscIGUIShortcutButton
+ {
+ idc=2;
+ shortcuts[]={"0x00050000+1"};
+ x="(SafeZoneX + 0.0392216 )";
+ y="(SafeZoneY + 1.1 )";
+ text=$STR_DISP_CLOSE;
+ };
+ class ButtonBuy:RscIGUIShortcutButton
+ {
+ idc=148;
+ shortcuts[]={"0x00050000+3"};
+ x="(SafeZoneX + 0.333336 )";
+ y="(SafeZoneY + 1.1 )";
+ text=$STR_WF_Purchase;
+ onButtonClick="WF_Logic setVariable ['lbMainAction','buy']";
+ };
+ class ACE_ItemCost:ACE_Total_Weight
+ {
+ idc=152;
+ x="(SafeZoneX + 0.77)";
+ y="(SafeZoneY + 1.1)";
+ text="";
+ };
+ class ACE_PlayerFunds:ACE_ItemCost
+ {
+ idc=150;
+ x="(SafeZoneX + 0.52)";
+ };
+ class ACE_PlayerRespawnCost:ACE_ItemCost
+ {
+ idc=151;
+ y="(SafeZoneY + 1.04)";
+ text="";
+ };
+ };
+};
diff --git a/Rsc/Header.hpp b/Rsc/Header.hpp
new file mode 100644
index 0000000..ffc381a
--- /dev/null
+++ b/Rsc/Header.hpp
@@ -0,0 +1,22 @@
+/* Header */
+
+//--- Respawn options.
+respawn = 3;
+respawnDelay = WF_RESPAWNDELAY;
+respawnDialog = false;
+
+//--- Require briefing.html to show up.
+onLoadMission = WF_MISSIONNAME;
+onLoadMissionTime = false;
+
+//--- ArrowHead loadscreen.
+#ifndef VANILLA
+ loadScreen = WF_LOADSCREEN;
+#endif
+
+//--- Properties.
+class Header {
+ gameType = CTI;
+ minPlayers = 1;
+ maxPlayers = WF_MAXPLAYERS;
+}; \ No newline at end of file
diff --git a/Rsc/Identities.hpp b/Rsc/Identities.hpp
new file mode 100644
index 0000000..08ffaae
--- /dev/null
+++ b/Rsc/Identities.hpp
@@ -0,0 +1,42 @@
+/* Identities (Radio) */
+
+class CfgIdentities {
+ class WFHQ_EN0_EP1 {
+ name = "Benny";
+ face = "Default";
+ glasses = "None";
+ speaker = "Male01EN";
+ pitch = 1.0;
+ };
+ class WFHQ_EN1_EP1 : WFHQ_EN0_EP1 {
+ speaker = "Male02EN";
+ };
+ class WFHQ_EN2_EP1 : WFHQ_EN0_EP1 {
+ speaker = "Male03EN";
+ };
+ class WFHQ_EN3_EP1 : WFHQ_EN0_EP1 {
+ speaker = "Male04EN";
+ };
+ class WFHQ_EN4_EP1 : WFHQ_EN0_EP1 {
+ speaker = "Male05EN";
+ };
+ class WFHQ_EN5_EP1 : WFHQ_EN0_EP1 {
+ speaker = "Female01EN_EP1";
+ };
+
+ class WFHQ_TK0_EP1 : WFHQ_EN0_EP1 {
+ speaker = "Male01TK";
+ };
+ class WFHQ_TK1_EP1 : WFHQ_EN0_EP1 {
+ speaker = "Male02TK";
+ };
+ class WFHQ_TK2_EP1 : WFHQ_EN0_EP1 {
+ speaker = "Male03TK";
+ };
+ class WFHQ_TK3_EP1 : WFHQ_EN0_EP1 {
+ speaker = "Male04TK";
+ };
+ class WFHQ_TK4_EP1 : WFHQ_EN0_EP1 {
+ speaker = "Male05TK";
+ };
+}; \ No newline at end of file
diff --git a/Rsc/Parameters.hpp b/Rsc/Parameters.hpp
new file mode 100644
index 0000000..9bfc876
--- /dev/null
+++ b/Rsc/Parameters.hpp
@@ -0,0 +1,693 @@
+/* Parameters */
+
+class Params {
+ class aiGroupSizeAI {
+ title = "$STR_WF_PARAMETER_GroupSizeAI";
+ values[] = {2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,35,40,45,50,60,70,80,90,100};
+ texts[] = {"2","4","6","8","10","12","14","16","18","20","22","24","26","28","30","35","40","45","50","60","70","80","90","100"};
+ default = 10;
+ };
+ class aiGroupSizePlayer {
+ title = "$STR_WF_PARAMETER_GroupSizePlayer";
+ values[] = {2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,35,40,45,50,60,70,80,90,100};
+ texts[] = {"2","4","6","8","10","12","14","16","18","20","22","24","26","28","30","35","40","45","50","60","70","80","90","100"};
+ default = 12;
+ };
+ class aiKeepUnits {
+ title = "$STR_WF_PARAMETER_KeepAI";
+ values[] = {0,1};
+ texts[] = {"$STR_WF_PARAMETER_No","$STR_WF_PARAMETER_Yes"};//{"$STR_WF_Disabled","$STR_WF_Enabled"};
+ default = 0;
+ };
+ class aiTeams {
+ title = "$STR_WF_PARAMETER_AI";
+ values[] = {0,1};
+ texts[] = {"$STR_WF_Disabled","$STR_WF_Enabled"};
+ default = 1;
+ };
+ class artilleryCalls {
+ title = "$STR_WF_PARAMETER_Arty";
+ values[] = {0,1};
+ texts[] = {"$STR_WF_Disabled","$STR_WF_Enabled"};
+ default = 1;
+ };
+ #ifndef VANILLA
+ class artilleryComputer {
+ title = "$STR_WF_PARAMETER_ArtilleryComputer";
+ values[] = {0,1,2};
+ texts[] = {"$STR_WF_Disabled","$STR_WF_PARAMETER_Enabled_Upgrade","$STR_WF_Enabled"};
+ default = 0;
+ };
+ #endif
+ class artilleryUI {
+ title = "$STR_WF_PARAMETER_ArtilleryUI";
+ values[] = {0,1};
+ texts[] = {"$STR_WF_Disabled","$STR_WF_Enabled"};
+ default = 0;
+ };
+ class artilleryRange {
+ title = "$STR_WF_PARAMETER_Artillery";
+ values[] = {1,2,3};
+ texts[] = {"$STR_WF_PARAMETER_Short","$STR_WF_PARAMETER_Medium","$STR_WF_PARAMETER_Long"};
+ default = 3;
+ };
+ class baseAICommander {
+ title = "$STR_WF_PARAMETER_AICommander";
+ values[] = {0,1};
+ texts[] = {"$STR_WF_PARAMETER_No","$STR_WF_PARAMETER_Yes"};//{"$STR_WF_Disabled","$STR_WF_Enabled"};
+ default = 1;
+ };
+ //--- OA has no suitable allies for both side (yet).
+ #ifndef ARROWHEAD
+ class baseAllies {
+ title = "$STR_WF_PARAMETER_Allies";
+ values[] = {0,1,2,3};
+ texts[] = {"$STR_WF_Disabled","$STR_WF_PARAMETER_Side_West","$STR_WF_PARAMETER_Side_East","$STR_WF_PARAMETER_Both"};
+ default = 0;
+ };
+ #endif
+ class baseAAR {
+ title = "$STR_WF_PARAMETER_AntiAirRadar";
+ values[] = {0,1};
+ texts[] = {"$STR_WF_Disabled","$STR_WF_Enabled"};
+ default = 0;
+ };
+ class baseArea {
+ title = "$STR_WF_PARAMETER_BaseArea";
+ values[] = {0,1};
+ texts[] = {"$STR_WF_PARAMETER_No","$STR_WF_PARAMETER_Yes"};//{"$STR_WF_Disabled","$STR_WF_Enabled"};
+ default = 1;
+ };
+ class baseAreaLimit {
+ title = "$STR_WF_PARAMETER_BaseArea_Limit";
+ values[] = {1,2,3,4,5,6,7,8,9,10,12,14,16,18,20,22,24};
+ texts[] = {"1","2","3","4","5","6","7","8","9","10","12","14","16","18","20","22","24"};
+ default = 2;
+ };
+ class baseAutoDefenses {
+ title = "$STR_WF_PARAMETER_AutoMannedDefense";
+ values[] = {0,10,20,30,40,50,60,70,80,90,100};
+ texts[] = {"$STR_WF_Disabled","10","20","30","40","50","60","70","80","90","100"};
+ default = 30;
+ };
+ class baseAutoDefensesRange {
+ title = "$STR_WF_PARAMETER_AutoDefense_Range";
+ values[] = {50,100,150,200,250,300,350,400,450,500,600,700,800,900,1000};
+ texts[] = {"50m","100m","150m","200m","250m","300m","350m","400m","450m","500m","600m","700m","800m","900m","1000m"};
+ default = 250;
+ };
+ class baseBuildingsLimit {
+ title = "$STR_WF_PARAMETER_BuildingsLimit";
+ values[] = {1,2,3,4,5,6,7,8,9,10};
+ texts[] = {"1","2","3","4","5","6","7","8","9","10"};
+ default = 2;
+ };
+ class baseConstructionMode {
+ title = "$STR_WF_PARAMETER_ConstructionMode";
+ values[] = {0,1};
+ texts[] = {"$STR_WF_PARAMETER_Time","$STR_WF_PARAMETER_HQWorkers"};
+ default = 0;
+ };
+ class baseDefensePlacement {
+ title = "$STR_WF_PARAMETER_DefensePlacement";
+ values[] = {0,1};
+ texts[] = {"$STR_WF_PARAMETER_Collide_No","$STR_WF_PARAMETER_Collide"};
+ default = 1;
+ };
+ class baseHQDeploycost {
+ title = "$STR_WF_PARAMETER_HQDeployCost";
+ values[] = {100,200,300,400,500,600,700,800,900,1000,1500,2000,2500,3000,3500,4000,5000,6000,7000,8000,9000,10000};
+ texts[] = {"S 100","S 200","S 300","S 400","S 500","S 600","S 700","S 800","S 900","S 1000","S 1500","S 2000","S 2500","S 3000","S 3500","S 4000","S 5000","S 6000","S 7000","S 8000","S 9000","S 10000"};
+ default = 100;
+ };
+ class baseHQDeployRange {
+ title = "$STR_WF_PARAMETER_HQDeployRange";
+ values[] = {50,60,70,80,90,100,110,120,130,140,150,160,170,180,190,200,220,240,260,280,300,320,340,360,380,400};
+ texts[] = {"50m","60m","70m","80m","90m","100m","110m","120m","130m","140m","150m","160m","170m","180m","190m","200m","220m","240m","260m","280m","300m","320m","340m","360m","380m","400m"};
+ default = 120;
+ };
+ class basePatrols {
+ title = "$STR_WF_PARAMETER_BasePatrols";
+ values[] = {0,1};
+ texts[] = {"$STR_WF_Disabled","$STR_WF_Enabled"};
+ default = 0;
+ };
+ class baseSpawnSystemRestrict {
+ title = "$STR_WF_PARAMETER_SpawnSystemRestrict";
+ values[] = {0,1};
+ texts[] = {"$STR_WF_PARAMETER_No","$STR_WF_PARAMETER_Yes"};//{"$STR_WF_Disabled","$STR_WF_Enabled"};
+ default = 1;
+ };
+ class baseStartingDistance {
+ title = "$STR_WF_PARAMETER_StartingDistance";
+ values[] = {-1,1000,1500,2000,2500,3000,3500,4000,4500,5000,5500,6000,6500,7000,7500,8000,8500,9000};
+ texts[] = {"$STR_WF_PARAMETER_StartingLocations_Random","1000m","1500m","2000m","2500m","3000m","3500m","4000m","4500m","5000m","5500m","6000m","6500m","7000m","7500m","8000m","8500m","9000m"};
+ default = 5500;
+ };
+ class baseStartingLocations {
+ title = "$STR_WF_PARAMETER_StartingLocations";
+ values[] = {0,1,2};
+ texts[] = {"$STR_WF_PARAMETER_StartingLocations_WestNorth","$STR_WF_PARAMETER_StartingLocations_WestSouth","$STR_WF_PARAMETER_StartingLocations_Random"};
+ default = 2;
+ };
+ class economyCurrency {
+ title = "$STR_WF_PARAMETER_Currency";
+ values[] = {0,1};
+ texts[] = {"$STR_WF_PARAMETER_Money_Supply","$STR_WF_PARAMETER_Money"};
+ default = 0;
+ };
+ class economyIncomeInterval {
+ title = "$STR_WF_PARAMETER_IncomeInterval";
+ values[] = {30,60,120,180,240,300,360,420,480,540,600};
+ texts[] = {"30 Seconds", "1 Minute","2 Minutes","3 Minutes","4 Minutes","5 Minutes","6 Minutes","7 Minutes","8 Minutes","9 Minutes","10 Minutes"};
+ default = 60;
+ };
+ class economyIncomeSystem {
+ title = "$STR_WF_PARAMETER_IncomeSystem";
+ values[] = {1,2,3,4};
+ texts[] = {"$STR_WF_PARAMETER_IncomeSystem_Full","$STR_WF_PARAMETER_IncomeSystem_Half","$STR_WF_PARAMETER_Income_Sys_Param","$STR_WF_PARAMETER_Income_Sys_Param_Full"};
+ default = 3;
+ };
+ class economyStartingFundsEast {
+ title = "$STR_WF_PARAMETER_Funds_East";
+ values[] = {800,1600,2400,3200,4000,4800,6400,8000,12800,25600,51200,102400,204800,409600,819200};
+ texts[] = {"$ 800","$ 1600","$ 2400","$ 3200","$ 4000","$ 4800","$ 6400","$ 8000","$ 12800","$ 25600","$ 51200","$ 102400","$ 204800","$ 409600","$ 819200"};
+ default = 800;
+ };
+ class economyStartingFundsWest {
+ title = "$STR_WF_PARAMETER_Funds_West";
+ values[] = {800,1600,2400,3200,4000,4800,6400,8000,12800,25600,51200,102400,204800,409600,819200};
+ texts[] = {"$ 800","$ 1600","$ 2400","$ 3200","$ 4000","$ 4800","$ 6400","$ 8000","$ 12800","$ 25600","$ 51200","$ 102400","$ 204800","$ 409600","$ 819200"};
+ default = 800;
+ };
+ class economyStartingSupplyEast {
+ title = "$STR_WF_PARAMETER_Supply_East";
+ values[] = {1200,2400,3600,4800,6000,7200,8400,9600,19200,38400,76800};
+ texts[] = {"S 1200","S 2400","S 3600","S 4800","S 6000","S 7200","S 8400","S 9600","S 19200","S 38400","S 76800"};
+ default = 1200;
+ };
+ class economyStartingSupplyWest {
+ title = "$STR_WF_PARAMETER_Supply_West";
+ values[] = {1200,2400,3600,4800,6000,7200,8400,9600,19200,38400,76800};
+ texts[] = {"S 1200","S 2400","S 3600","S 4800","S 6000","S 7200","S 8400","S 9600","S 19200","S 38400","S 76800"};
+ default = 1200;
+ };
+ class economySupplySystem {
+ title = "$STR_WF_PARAMETER_SupplySystem";
+ values[] = {0,1};
+ texts[] = {"$STR_WF_PARAMETER_SupplySystem_Truck","$STR_WF_PARAMETER_Time"};
+ default = 1;
+ };
+ class environmentFastTime {
+ title = "$STR_WF_PARAMETER_FastTime";
+ values[] = {0,1,2,3,4,5,6,7,8,9};
+ texts[] = {"$STR_WF_Disabled","1 Second = 2 Seconds","1 Second = 3 Seconds","1 Second = 4 Seconds","1 Second = 5 Seconds","1 Second = 10 Seconds","1 Second = 15 Seconds","1 Second = 20 Seconds","1 Second = 25 Seconds","1 Second = 30 Seconds"};
+ default = 0;
+ };
+ class environmentTimeOfDay {
+ title = "$STR_WF_PARAMETER_TimeOfDay";
+ values[] = {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23};
+ texts[] = {"00:00","01:00","02:00","03:00","04:00","05:00","06:00","07:00","08:00","09:00","10:00","11:00",
+ "12:00","13:00","14:00","15:00","16:00","17:00","18:00","19:00","20:00","21:00","22:00","23:00"};
+ default = 9;
+ };
+ class environmentWeather {
+ title = "$STR_WF_PARAMETER_Weather";
+ values[] = {0,1,2,3};
+ texts[] = {"$STR_WF_PARAMETER_Weather_Clear","$STR_WF_PARAMETER_Weather_Cloudy","$STR_WF_PARAMETER_Weather_Rainy","$STR_WF_PARAMETER_Weather_Dynamic"};
+ default = 0;
+ };
+ #ifndef VANILLA
+ class extensionBAF {
+ title = "$STR_WF_PARAMETER_BAF";
+ values[] = {0,1};
+ texts[] = {"$STR_WF_Disabled","$STR_WF_Enabled"};
+ default = 1;
+ };
+ class extensionPMC {
+ title = "$STR_WF_PARAMETER_PMC";
+ values[] = {0,1};
+ texts[] = {"$STR_WF_Disabled","$STR_WF_Enabled"};
+ default = 1;
+ };
+ #endif
+ class gameplayAlice {
+ title = "$STR_WF_PARAMETER_Alice";
+ values[] = {0,1};
+ texts[] = {"$STR_WF_Disabled","$STR_WF_Enabled"};
+ default = 0;
+ };
+ class gameplayHangars {
+ title = "$STR_WF_PARAMETER_Hangars";
+ values[] = {0,1};
+ texts[] = {"$STR_WF_Disabled","$STR_WF_Enabled"};
+ default = 1;
+ };
+ class gameplayBodiesTimeout {
+ title = "$STR_WF_PARAMETER_BodiesTimeout";
+ 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 = 240;
+ };
+ #ifdef ACE
+ class gameplayDefenseAmmo {
+ title = "$STR_WF_Gameplay_DefenseAmmo";
+ values[] = {0,1,2,3};
+ texts[] = {"$STR_WF_Disabled","$STR_WF_Base_Only","$STR_WF_Base_And_Towns","$STR_WF_All"};
+ default = 2;
+ };
+ #endif
+ class gameplayVehiclesTimeout {
+ title = "$STR_WF_PARAMETER_VehicleDelay";
+ 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 = 1200;
+ };
+ class gameplayExtendedInventory {
+ title = "$STR_WF_PARAMETER_Extended_Inventory";
+ values[] = {0,1};
+ texts[] = {"$STR_WF_Disabled","$STR_WF_Enabled"};
+ default = 1;
+ };
+ class gameplayFastTravel {
+ title = "$STR_WF_PARAMETER_FastTravel";
+ values[] = {0,1,2};
+ texts[] = {"$STR_WF_Disabled","$STR_WF_PARAMETER_Free","$STR_WF_PARAMETER_Fee"};
+ default = 0;
+ };
+ class gameplayFriendlyFire {
+ title = "$STR_WF_PARAMETER_FriendlyFire";
+ values[] = {0,1};
+ texts[] = {"$STR_WF_Disabled","$STR_WF_Enabled"};
+ default = 0;
+ };
+ class gameplayGrass {
+ title = "$STR_WF_PARAMETER_Grass";
+ values[] = {10,20,30,50};
+ texts[] = {"Far","Medium","Short","Toggleable"};
+ default = 50;
+ };
+ class gameplayKickTeamswap {
+ title = "$STR_WF_PARAMETER_KickTeamswapper";
+ values[] = {0,1};
+ texts[] = {"$STR_WF_Disabled","$STR_WF_Enabled"};
+ default = 1;
+ };
+ class gameplayLimitedBoundaries {
+ title = "$STR_WF_PARAMETER_LimitedBoundaries";
+ values[] = {0,1};
+ texts[] = {"$STR_WF_Disabled","$STR_WF_Enabled"};
+ default = 1;
+ };
+ class gameplayMapColoration {
+ title = "$STR_WF_PARAMETER_Coloration";
+ values[] = {0,1};
+ texts[] = {"$STR_WF_PARAMETER_Default","$STR_WF_PARAMETER_NATO_Coloration"};
+ default = 0;
+ };
+ class gameplayMissileRange {
+ title = "$STR_WF_PARAMETER_MissileRange";
+ values[] = {0,500,1000,1500,2000,2500,3000,3500,4000,4500,5000,5500,6000,6500,7000,7500,8000,8500,9000,9500,10000};
+ texts[] = {"$STR_WF_Disabled","500m","1000m","1500m","2000m","2500m","3000m","3500m","4000m","4500m","5000m","5500m","6000m","6500m","7000m","7500m","8000m","8500m","9000m","9500m","10000m"};
+ default = 0;
+ };
+ class gameplaySecondaryMissions {
+ title = "$STR_WF_PARAMETER_SecondaryMissions";
+ values[] = {0,1};
+ texts[] = {"$STR_WF_Disabled","$STR_WF_Enabled"};
+ default = 0;
+ };
+ class gameplayShowUID {
+ title = "$STR_WF_PARAMETER_ShowUID";
+ values[] = {0,1};
+ texts[] = {"$STR_WF_Disabled","$STR_WF_Enabled"};
+ default = 1;
+ };
+ class gameplaySpecialization {
+ title = "$STR_WF_PARAMETER_Specialization";
+ values[] = {0,1,2,3};
+ texts[] = {"$STR_WF_PARAMETER_None","$STR_WF_PARAMETER_Infantry","$STR_WF_PARAMETER_LandVehicles","$STR_WF_PARAMETER_Aircraft"};
+ default = 0;
+ };
+ class gameplayThermalImaging {
+ title = "$STR_WF_PARAMETER_ThermalImaging";
+ values[] = {0,1,2,3};
+ texts[] = {"$STR_WF_Disabled","$STR_WF_PARAMETER_Weapons","$STR_WF_PARAMETER_Vehicles","$STR_WF_Enabled"};
+ default = 3;
+ };
+ class gameplayTrackAI {
+ title = "$STR_WF_PARAMETER_TrackAI";
+ values[] = {0,1};
+ texts[] = {"$STR_WF_Disabled","$STR_WF_Enabled"};
+ default = 0;
+ };
+ class gameplayTrackPlayers {
+ title = "$STR_WF_PARAMETER_TrackPlayers";
+ values[] = {0,1};
+ texts[] = {"$STR_WF_Disabled","$STR_WF_Enabled"};
+ default = 1;
+ };
+ class gameplayUnitsBalancing {
+ title = "$STR_WF_PARAMETER_Balance";
+ values[] = {0,1};
+ texts[] = {"$STR_WF_Disabled","$STR_WF_Enabled"};
+ default = 0;
+ };
+ class gameplayUnitsBounty {
+ title = "$STR_WF_PARAMETER_UnitsBounty";
+ values[] = {0,1};
+ texts[] = {"$STR_WF_Disabled","$STR_WF_Enabled"};
+ default = 1;
+ };
+ class gameplayUpgradesEast {
+ title = "$STR_WF_PARAMETER_Upgrades_East";
+ values[] = {0,1};
+ texts[] = {"$STR_WF_Disabled","$STR_WF_Enabled"};
+ default = 1;
+ };
+ class gameplayUpgradesWest {
+ title = "$STR_WF_PARAMETER_Upgrades_West";
+ values[] = {0,1};
+ texts[] = {"$STR_WF_Disabled","$STR_WF_Enabled"};
+ default = 1;
+ };
+ class gameplayVictoryConditions {
+ title = "$STR_WF_PARAMETER_VictoryCondition";
+ values[] = {0,1,2,3};
+ texts[] = {"$STR_WF_PARAMETER_Victory_Annihilation","$STR_WF_PARAMETER_Victory_Assassination","$STR_WF_PARAMETER_Victory_Supremacy","$STR_WF_PARAMETER_Victory_Towns"};
+ default = 2;
+ };
+ class gameplayViewDistance {
+ title = "$STR_WF_PARAMETER_ViewDistance";
+ values[] = {200,500,800,1000,1500,2000,2500,3000,3500,4000,4500,5000};
+ texts[] = {"200m","500m","800m","1000m","1500m","2000m","2500m","3000m","3500m","4000m","4500m","5000m"};
+ default = 4000;
+ };
+ #ifdef ACE
+ class gameplayAceWounds {
+ title = "$STR_WF_Gameplay_AceWounds";
+ values[] = {0,1};
+ texts[] = {"$STR_WF_Disabled","$STR_WF_Enabled"};
+ default = 0;
+ };
+ #endif
+ #ifdef VANILLA
+ class moduleCM {
+ title = "$STR_WF_PARAMETER_Countermeasures";
+ values[] = {0,1};
+ texts[] = {"$STR_WF_Disabled","$STR_WF_Enabled"};
+ default = 0;
+ };
+ #endif
+ class moduleEASA {
+ title = "$STR_WF_PARAMETER_EASA";
+ values[] = {0,1};
+ texts[] = {"$STR_WF_Disabled","$STR_WF_Enabled"};
+ default = 1;
+ };
+ class moduleHC {
+ title = "$STR_WF_PARAMETER_HighCommand";
+ values[] = {0,1};
+ texts[] = {"$STR_WF_Disabled","$STR_WF_Enabled"};
+ default = 1;
+ };
+ class moduleICBM {
+ title = "$STR_WF_PARAMETER_ICBM";
+ values[] = {0,1};
+ texts[] = {"$STR_WF_Disabled","$STR_WF_Enabled"};
+ default = 0;
+ };
+ class moduleISIS {
+ title = "$STR_WF_PARAMETER_ISIS";
+ values[] = {0,1,2};
+ texts[] = {"$STR_WF_Disabled","$STR_WF_PARAMETER_Leader","$STR_WF_PARAMETER_All"};
+ default = 0;
+ };
+ class moduleVC {
+ title = "$STR_WF_PARAMETER_Clouds";
+ values[] = {0,1};
+ texts[] = {"$STR_WF_Disabled","$STR_WF_Enabled"};
+ default = 0;
+ };
+ class respawnCamps {
+ title = "$STR_WF_PARAMETER_Camp";
+ values[] = {0,1,2,3};
+ texts[] = {"$STR_WF_Disabled","$STR_WF_PARAMETER_Classic","$STR_WF_PARAMETER_Respawn_CampsNearby","$STR_WF_PARAMETER_Respawn_Defender"};
+ default = 2;
+ };
+ class respawnCampsRule {
+ title = "$STR_WF_PARAMETER_CampRespawnRule";
+ values[] = {0,1,2};
+ texts[] = {"$STR_WF_Disabled","$STR_WF_PARAMETER_Respawn_CampsRule_WestEast","$STR_WF_PARAMETER_Respawn_CampsRule_WestEastRes"};
+ default = 2;
+ };
+ class respawnDelay {
+ title = "$STR_WF_PARAMETER_Respawn";
+ values[] = {10,15,20,25,30,35,40,45,50,55,60,65,70,75,80,85,90};
+ texts[] = {"10 Seconds","15 Seconds","20 Seconds","25 Seconds","30 Seconds","35 Seconds","40 Seconds","45 Seconds","50 Seconds",
+ "55 Seconds","60 Seconds","65 Seconds","70 Seconds","75 Seconds","80 Seconds","85 Seconds","90 Seconds"};
+ default = 30;
+ };
+ class respawnMASH {
+ title = "$STR_WF_PARAMETER_Respawn_MASH";
+ values[] = {0,1};
+ texts[] = {"$STR_WF_Disabled","$STR_WF_Enabled"};
+ default = 1;
+ };
+ class respawnMobile {
+ title = "$STR_WF_PARAMETER_MobileRespawn";
+ values[] = {0,1};
+ texts[] = {"$STR_WF_Disabled","$STR_WF_Enabled"};
+ default = 1;
+ };
+ class respawnPenalty {
+ title = "$STR_WF_PARAMETER_Respawn_Penalty";
+ values[] = {0,1,2,3,4,5};
+ texts[] = {"$STR_WF_Disabled","$STR_WF_PARAMETER_Respawn_Penalty_Remove","$STR_WF_PARAMETER_Respawn_Penalty_Full","$STR_WF_PARAMETER_Respawn_Penalty_OneHalf","$STR_WF_PARAMETER_Respawn_Penalty_OneFourth","$STR_WF_PARAMETER_Respawn_Penalty_Mobile"};
+ default = 5;
+ };
+ class respawnTownsRange {
+ title = "$STR_WF_PARAMETER_TownRespawnRange";
+ values[] = {50,100,150,200,250,300,350,400,450,500,550,600,650,700,750,800,850,900,950,1000,1500,2000,2500,3000,3500,4000};
+ texts[] = {"50m","100m","150m","200m","250m","300m","350m","400m","450m","500m","550m","600m","650m","700m","750m","800m","850m","900m","950m","1000m","1500m","2000m","2500m","3000m","3500m","4000m"};
+ default = 400;
+ };
+ class restrictionAdvancedAir {
+ title = "$STR_WF_PARAMETER_AdvancedAir";
+ values[] = {0,1,2};
+ texts[] = {"$STR_WF_Disabled","$STR_WF_PARAMETER_Restriction_Air_H","$STR_WF_PARAMETER_Restriction_Air_HTransport"};
+ default = 0;
+ };
+ class restrictionGear {
+ title = "$STR_WF_PARAMETER_GearRestriction";
+ values[] = {0,1};
+ texts[] = {"$STR_WF_Disabled","$STR_WF_Enabled"};
+ default = 0;
+ };
+ #ifndef ARROWHEAD
+ class restrictionKamov {
+ title = "$STR_WF_PARAMETER_Kamov";
+ values[] = {0,1};
+ texts[] = {"$STR_WF_Disabled","$STR_WF_Enabled"};
+ default = 0;
+ };
+ #endif
+ class townsAmount {
+ title = "$STR_WF_PARAMETER_TownsAmount";
+ values[] = {0,1,2,3,4};
+ texts[] = {"$STR_WF_PARAMETER_Extra_Small","$STR_WF_PARAMETER_Small","$STR_WF_PARAMETER_Medium","$STR_WF_PARAMETER_Large","$STR_WF_PARAMETER_Full"};
+ default = 3;
+ };
+ class townsStrikerMax {
+ title = "$STR_WF_PARAMETER_MaxResStriker";
+ values[] = {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,22,24,26,28,30,32,34,36,38,40,50,60,70,80,90,100};
+ texts[] = {"$STR_WF_Disabled","1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18","19","20","22","24","26","28","30","32","34","36","38","40","50","60","70","80","90","100"};
+ default = 0;
+ };
+ class townsCamps {
+ title = "$STR_WF_PARAMETER_TownsCamps";
+ values[] = {0,1};
+ texts[] = {"$STR_WF_Disabled","$STR_WF_Enabled"};
+ default = 1;
+ };
+ class townsCaptureMode {
+ title = "$STR_WF_PARAMETER_TownsCaptureMode";
+ values[] = {0,1,2};
+ texts[] = {"$STR_WF_PARAMETER_Classic","$STR_WF_PARAMETER_TownsCaptureMode_Threshold","$STR_WF_PARAMETER_TownsCaptureMode_AllCamps"};
+ default = 1;
+ };
+ #ifdef VANILLA
+ class townsCivilians {
+ title = "$STR_WF_PARAMETER_TownCivilians";
+ values[] = {0,1};
+ texts[] = {"$STR_WF_Disabled","Chernarus Civilians"};
+ default = 0;
+ };
+ #endif
+ #ifdef ARROWHEAD
+ class townsCivilians {
+ title = "$STR_WF_PARAMETER_TownCivilians";
+ values[] = {0,1};
+ texts[] = {"$STR_WF_Disabled","Takistan Civilians"};
+ default = 0;
+ };
+ #endif
+ #ifdef COMBINEDOPS
+ class townsCivilians {
+ title = "$STR_WF_PARAMETER_TownCivilians";
+ values[] = {0,1,2};
+ texts[] = {"$STR_WF_Disabled","Chernarus Civilians","Takistan Civilians"};
+ default = 0;
+ };
+ #endif
+ class townsConquestMode {
+ title = "$STR_WF_PARAMETER_TownsConquestMode";
+ values[] = {0,1};
+ texts[] = {"$STR_WF_PARAMETER_Classic","$STR_WF_PARAMETER_Territorial"};
+ default = 0;
+ };
+ class townsGear {
+ title = "$STR_WF_PARAMETER_TownsGear";
+ values[] = {0,1,2,3};
+ texts[] = {"$STR_WF_Disabled","$STR_WF_PARAMETER_CampSel","$STR_WF_PARAMETER_Depot","$STR_WF_PARAMETER_CampnDepot"};
+ default = 1;
+ };
+ class townsOccupation {
+ title = "$STR_WF_PARAMETER_Occupation";
+ values[] = {0,1};
+ texts[] = {"$STR_WF_Disabled","$STR_WF_Enabled"};
+ default = 1;
+ };
+ class townsOccupDifficulty {
+ title = "$STR_WF_PARAMETER_Difficulty_Occupation";
+ values[] = {1,2,3,4,5};
+ texts[] = {"$STR_WF_PARAMETER_Light","$STR_WF_PARAMETER_Medium","$STR_WF_PARAMETER_Hard","$STR_WF_PARAMETER_Impossible","$STR_WF_PARAMETER_Automatic"};
+ default = 1;
+ };
+ #ifdef VANILLA
+ class townsOccupationFactionEast {
+ title = "$STR_WF_PARAMETER_Occupation_Type_East";
+ values[] = {0,1};
+ texts[] = {"Insurgents","Russians"};
+ default = 1;
+ };
+ #endif
+ #ifdef VANILLA
+ class townsOccupationFactionWest {
+ title = "$STR_WF_PARAMETER_Occupation_Type_West";
+ values[] = {0,1};
+ texts[] = {"Chernarussian Defence Force","United States Marine Corps"};
+ default = 1;
+ };
+ #endif
+ #ifdef ARROWHEAD
+ class townsOccupationFactionEast {
+ title = "$STR_WF_PARAMETER_Occupation_Type_East";
+ values[] = {0};
+ texts[] = {"Takistan Army"};
+ default = 0;
+ };
+ #endif
+ #ifdef ARROWHEAD
+ class townsOccupationFactionWest {
+ title = "$STR_WF_PARAMETER_Occupation_Type_West";
+ values[] = {0};
+ texts[] = {"United States"};
+ default = 0;
+ };
+ #endif
+ #ifdef COMBINEDOPS
+ class townsOccupationFactionEast {
+ title = "$STR_WF_PARAMETER_Occupation_Type_East";
+ values[] = {0,1,2};
+ texts[] = {"Insurgents","Russians","Takistan Army"};
+ default = 1;
+ };
+ #endif
+ #ifdef COMBINEDOPS
+ class townsOccupationFactionWest {
+ title = "$STR_WF_PARAMETER_Occupation_Type_West";
+ values[] = {0,1,2};
+ texts[] = {"Chernarussian Defence Force","United States","United States Marine Corps"};
+ default = 1;
+ };
+ #endif
+ class townsOccupReinforcement {
+ title = "$STR_WF_PARAMETER_Reinforcement_Occupation";
+ values[] = {0,1};
+ texts[] = {"$STR_WF_Disabled","$STR_WF_Enabled"};
+ default = 0;
+ };
+ class townsMaxPatrol {
+ title = "$STR_WF_PARAMETER_MaxResPatrols";
+ values[] = {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,22,24,26,28,30,32,34,36,38,40,50,60,70,80,90,100};
+ texts[] = {"$STR_WF_Disabled","1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18","19","20","22","24","26","28","30","32","34","36","38","40","50","60","70","80","90","100"};
+ default = 0;
+ };
+ class townsProtectionRange {
+ title = "$STR_WF_PARAMETER_TownProtectionRange";
+ values[] = {0,50,100,150,200,250,300,350,400,450,500};
+ texts[] = {"0m","50m","100m","150m","200m","250m","300m","350m","400m","450m","500m"};
+ default = 400;
+ };
+ class townsPurchaseInfantry {
+ title = "$STR_WF_PARAMETER_TownsPurchaseMilita";
+ values[] = {0,1};
+ texts[] = {"$STR_WF_Disabled","$STR_WF_Enabled"};
+ default = 0;
+ };
+ class townsResistance {
+ title = "$STR_WF_PARAMETER_Resistance";
+ values[] = {0,1};
+ texts[] = {"$STR_WF_Disabled","$STR_WF_Enabled"};
+ default = 1;
+ };
+ class townsResistanceDifficulty {
+ title = "$STR_WF_PARAMETER_Difficulty_Resistance";
+ values[] = {1,2,3,4};
+ texts[] = {"$STR_WF_PARAMETER_Light","$STR_WF_PARAMETER_Medium","$STR_WF_PARAMETER_Hard","$STR_WF_PARAMETER_Impossible"};
+ default = 2;
+ };
+ #ifdef VANILLA
+ class townsResistanceFaction {
+ title = "$STR_WF_PARAMETER_Reinforcement_Type";
+ values[] = {0};
+ texts[] = {"Guerillas"};
+ default = 0;
+ };
+ #endif
+ #ifdef ARROWHEAD
+ class townsResistanceFaction {
+ title = "$STR_WF_PARAMETER_Reinforcement_Type";
+ values[] = {0,1};
+ texts[] = {"Private Military Company","Takistani Locals"};
+ default = 1;
+ };
+ #endif
+ #ifdef COMBINEDOPS
+ class townsResistanceFaction {
+ title = "$STR_WF_PARAMETER_Reinforcement_Type";
+ values[] = {0,1,2};
+ texts[] = {"Guerillas","Private Military Company","Takistani Locals"};
+ default = 2;
+ };
+ #endif
+ class townsResistanceReinforcement {
+ title = "$STR_WF_PARAMETER_Reinforcement_Resistance";
+ values[] = {0,1};
+ texts[] = {"$STR_WF_Disabled","$STR_WF_Enabled"};
+ default = 0;
+ };
+ class townsResistanceVehicleLock {
+ title = "$STR_WF_PARAMETER_Resistance_VehLock";
+ values[] = {0,1};
+ texts[] = {"$STR_WF_Disabled","$STR_WF_Enabled"};
+ default = 0;
+ };
+ class townsStartingMode {
+ title = "$STR_WF_PARAMETER_StartingMode";
+ values[] = {0,1,2,3};
+ texts[] = {"$STR_WF_PARAMETER_None","$STR_WF_PARAMETER_Divided_Towns","$STR_WF_PARAMETER_Nearby_Town","$STR_WF_PARAMETER_StartingLocations_Random"};
+ default = 0;
+ };
+}; \ No newline at end of file
diff --git a/Rsc/Ressources.hpp b/Rsc/Ressources.hpp
new file mode 100644
index 0000000..d0688c3
--- /dev/null
+++ b/Rsc/Ressources.hpp
@@ -0,0 +1,1001 @@
+/* Controls Definitions */
+
+#define CT_STATIC 0
+#define CT_BUTTON 1
+#define CT_COMBO 4
+#define CT_LISTBOX 5
+#define CT_CLICKABLETEXT 11
+#define CT_STRUCTUREDTEXT 13
+#define CT_LISTNBOX 102
+
+#define ST_POS 0x0F
+#define ST_HPOS 0x03
+#define ST_VPOS 0x0C
+#define ST_LEFT 0x00
+#define ST_RIGHT 0x01
+#define ST_CENTER 0x02
+#define ST_DOWN 0x04
+#define ST_UP 0x08
+#define ST_VCENTER 0x0c
+
+#define ENABLE_SHADOW shadow = 2
+
+#define ST_PICTURE 48
+#define ST_TEXT_BG 128
+
+
+#ifdef VANILLA
+ /* Green */
+ #define subcolor1 {0.7,1,0.7,1}
+ #define subcolor1hex "#eee58b"
+ #define WFBE_SoundClick "ui\ui_ok"
+ #define WFBE_SoundEnter "ui\ui_over"
+ #define WFBE_SoundEscape "ui\ui_cc"
+#else
+ /* Yellow */
+ #define subcolor1 {1,1,0.7,1}
+ #define subcolor1hex "#eee58b"
+ #define WFBE_SoundClick "\ca\ui\data\sound\onclick"
+ #define WFBE_SoundEnter "\ca\ui\data\sound\onover"
+ #define WFBE_SoundEscape "\ca\ui\data\sound\onescape"
+#endif
+
+/* RscPicture */
+class RscPicture {
+ type = 0;
+ idc = -2;
+ style = 48;
+ colorText[] = {0.75, 0.75, 0.75, 1};
+ colorBackground[] = {0, 0, 0, 0};
+ font = "Bitstream";
+ sizeEx = 0.025;
+ soundClick[] = {WFBE_SoundClick, 0.2, 1};
+ soundEnter[] = {WFBE_SoundEnter, 0.2, 1};
+ soundEscape[] = {WFBE_SoundEscape, 0.2, 1};
+ soundPush[] = {"", 0.2, 1};
+ w = 0.275;
+ h = 0.04;
+ text = "";
+};
+class RscPictureKeepAspect : RscPicture { //Coin Menu
+ style = 0x30 + 0x800;
+};
+
+class IGUIBack { //Coin Menu
+ type = CT_STATIC;
+ idc = 124;
+ style = ST_TEXT_BG;
+ text = "";
+ colorText[] = {0, 0, 0, 0};
+ font = "Zeppelin32";
+ sizeEx = 0.0;
+ x = 0.1;
+ y = 0.1;
+ w = 0.1;
+ h = 0.1;
+ colorbackground[] = {0, 0, 0, 0.6};
+};
+
+/* RscButton */
+class RscButton {
+ type = 1;
+ idc = -2;
+ style = 0x02 + 0x100;
+ x = 0;
+ y = 0;
+ w = 0;
+ h = 0.036;
+ text = "";
+ font = "Zeppelin32";
+ sizeEx = 0.035;
+ shadow = 2;
+ colorText[] = {1, 1, 1, 0.8};
+ colorBackground[] = {0.5882, 0.5882, 0.3529, 0.7};
+ colorBackgroundActive[] = {0.5882, 0.5882, 0.3529, 1};
+ colorDisabled[] = {0.5, 0.5, 0.5, 0.8};
+ colorBackgroundDisabled[] = {0, 0, 0, 0.6};
+ offsetX = 0.003;
+ offsetY = 0.003;
+ offsetPressedX = 0.002;
+ offsetPressedY = 0.002;
+ colorFocused[] = {0.5882, 0.5882, 0.3529, 0.7};
+ colorShadow[] = {0.023529, 0, 0.0313725, 1};
+ colorBorder[] = {0.023529, 0, 0.0313725, 1};
+ borderSize = 0.0;
+ soundEnter[] = {"\ca\ui\data\sound\mouse2", 0.09, 1};
+ soundPush[] = {"\ca\ui\data\sound\new1", 0.09, 1};
+ soundClick[] = {"\ca\ui\data\sound\mouse3", 0.07, 1};
+ soundEscape[] = {"\ca\ui\data\sound\mouse1", 0.09, 1};
+};
+class RscButton_Back : RscButton {
+ w = 0.04;
+ h = 0.04;
+ text = "<<";
+ shadow = 2;
+ sizeEx = 0.035;
+};
+class RscButton_Exit : RscButton {
+ w = 0.04;
+ h = 0.04;
+ text = "X";
+ shadow = 2;
+ sizeEx = 0.035;
+ colorText[] = {1, 1, 1, 0.8};
+ colorBackground[] = {0.5020, 0, 0, 1};
+ colorBackgroundActive[] = {0.9, 0, 0, 1};
+ colorFocused[] = {0.5020, 0, 0, 1};
+};
+
+/* RscShortcutButton */
+class RscShortcutButton {
+ type = 16;
+ idc = -2;
+ style = 0;
+ default = 0;
+ w = 0.183825;
+ h = 0.104575;
+ color[] = {0.543, 0.5742, 0.4102, 1.0};
+ color2[] = {0.95, 0.95, 0.95, 1};
+ colorBackground[] = {1, 1, 1, 1};
+ colorbackground2[] = {1, 1, 1, 0.4};
+ colorDisabled[] = {1, 1, 1, 0.25};
+ periodFocus = 1.2;
+ periodOver = 0.8;
+ class HitZone {
+ left = 0.004;
+ top = 0.029;
+ right = 0.004;
+ bottom = 0.029;
+ };
+ class ShortcutPos {
+ left = 0.004;
+ top = 0.026;
+ w = 0.0392157;
+ h = 0.0522876;
+ };
+ class TextPos {
+ left = 0.05;
+ top = 0.034;
+ right = 0.005;
+ bottom = 0.005;
+ };
+ animTextureNormal = "\ca\ui\data\ui_button_normal_ca.paa";
+ animTextureDisabled = "\ca\ui\data\ui_button_disabled_ca.paa";
+ animTextureOver = "\ca\ui\data\ui_button_over_ca.paa";
+ animTextureFocused = "\ca\ui\data\ui_button_focus_ca.paa";
+ animTexturePressed = "\ca\ui\data\ui_button_down_ca.paa";
+ animTextureDefault = "\ca\ui\data\ui_button_default_ca.paa";
+ textureNoShortcut = "";
+ period = 0.4;
+ font = "Zeppelin32";
+ size = 0.03521;
+ sizeEx = 0.03521;
+ text = "";
+ soundEnter[] = {"\ca\ui\data\sound\mouse2", 0.09, 1};
+ soundPush[] = {"\ca\ui\data\sound\new1", 0.09, 1};
+ soundClick[] = {"\ca\ui\data\sound\mouse3", 0.07, 1};
+ soundEscape[] = {"\ca\ui\data\sound\mouse1", 0.09, 1};
+ action = "";
+ class Attributes {
+ font = "Zeppelin32";
+ color = "#E5E5E5";
+ align = "left";
+ shadow = "true";
+ };
+ class AttributesImage {
+ font = "Zeppelin32";
+ color = "#E5E5E5";
+ align = "left";
+ };
+};
+class RscIGUIShortcutButton : RscShortcutButton {
+ w = 0.183825;
+ h = 0.0522876;
+ style = 2;
+ color[] = {1, 1, 1, 1};
+ color2[] = {1, 1, 1, 0.85};
+ colorBackground[] = {1, 1, 1, 1};
+ colorbackground2[] = {1, 1, 1, 0.85};
+ colorDisabled[] = {1, 1, 1, 0.4};
+ class HitZone {
+ left = 0.002;
+ top = 0.003;
+ right = 0.002;
+ bottom = 0.016;
+ };
+ class ShortcutPos {
+ left = -0.006;
+ top = -0.007;
+ w = 0.0392157;
+ h = 0.0522876;
+ };
+ class TextPos {
+ left = 0.02;
+ top = 0.0;
+ right = 0.002;
+ bottom = 0.016;
+ };
+ animTextureNormal = "\ca\ui\data\igui_button_normal_ca.paa";
+ animTextureDisabled = "\ca\ui\data\igui_button_disabled_ca.paa";
+ animTextureOver = "\ca\ui\data\igui_button_over_ca.paa";
+ animTextureFocused = "\ca\ui\data\igui_button_focus_ca.paa";
+ animTexturePressed = "\ca\ui\data\igui_button_down_ca.paa";
+ animTextureDefault = "\ca\ui\data\igui_button_normal_ca.paa";
+ class Attributes {
+ font = "Zeppelin32";
+ color = "#E5E5E5";
+ align = "center";
+ shadow = "true";
+ };
+};
+class RscShortcutButtonMain: RscShortcutButton {
+ w = 0.313726;
+ h = 0.104575;
+ color[] = {0.2588, 0.7137, 1, 1};
+ colorDisabled[] = {1, 1, 1, 0.25};
+ class HitZone {
+ left = 0.0;
+ top = 0.0;
+ right = 0.0;
+ bottom = 0.0;
+ };
+ class ShortcutPos {
+ left = 0.0204;
+ top = 0.026;
+ w = 0.0392157;
+ h = 0.0522876;
+ };
+ class TextPos {
+ left = 0.08;
+ top = 0.034;
+ right = 0.005;
+ bottom = 0.005;
+ };
+ animTextureNormal = "\ca\ui\data\ui_button_main_normal_ca.paa";
+ animTextureDisabled = "\ca\ui\data\ui_button_main_disabled_ca.paa";
+ //animTextureOver = "\ca\ui\data\ui_button_main_over_ca.paa";
+ animTextureOver = "Client\Images\ui_button_main_over.paa";
+ //animTextureFocused = "\ca\ui\data\ui_button_main_focus_ca.paa";
+ animTextureFocused = "Client\Images\ui_button_main_focus.paa";
+ //animTexturePressed = "\ca\ui\data\ui_button_main_down_ca.paa";
+ animTexturePressed = "Client\Images\ui_button_main_down.paa";
+ animTextureDefault = "\ca\ui\data\ui_button_main_normal_ca.paa";
+ period = 0.5;
+ font = "Zeppelin32";
+ size = 0.03921;
+ sizeEx = 0.03921;
+ text = "";
+ soundEnter[] = {"\ca\ui\data\sound\mouse2", 0.09, 1};
+ soundPush[] = {"\ca\ui\data\sound\new1", 0.09, 1};
+ soundClick[] = {"\ca\ui\data\sound\mouse3", 0.07, 1};
+ soundEscape[] = {"\ca\ui\data\sound\mouse1", 0.09, 1};
+ action = "";
+ class Attributes {
+ font = "Zeppelin32";
+ color = "#E5E5E5";
+ align = "left";
+ shadow = "false";
+ };
+ class AttributesImage {
+ font = "Zeppelin32";
+ color = "#E5E5E5";
+ align = "false";
+ };
+};
+
+/* RscListBox */
+class RscListBox {
+ idc = -2;
+ type = 5;
+ style = 0 + 0x10;
+ font = "Zeppelin32";
+ sizeEx = 0.04221;
+ color[] = {0.2588, 0.7137, 1, 1};
+ colorText[] = {1, 1, 1, 0.75};
+ colorScrollbar[] = {0.95, 0, 0, 1};
+ colorSelect[] = {0, 0, 0, 0.7};
+ colorSelect2[] = {0, 0, 0, 0.7};
+ colorSelectBackground[] = {0.2588, 0.7137, 1, 1};
+ colorSelectBackground2[] = {0.2588, 0.7137, 1, 1};
+ columns[] = {0.1, 0.7, 0.1, 0.1};
+ period = 0;
+ colorBackground[] = {0, 0, 0, 1};
+ maxHistoryDelay = 1.0;
+ autoScrollSpeed = -1;
+ autoScrollDelay = 5;
+ autoScrollRewind = 0;
+ soundSelect[] = {"\ca\ui\data\sound\new1", 0.09, 1};
+ class ScrollBar {
+ color[] = {1, 1, 1, 0.6};
+ colorActive[] = {1, 1, 1, 1};
+ colorDisabled[] = {1, 1, 1, 0.3};
+ thumb = "\ca\ui\data\igui_scrollbar_thumb_ca.paa";
+ arrowFull = "\ca\ui\data\igui_arrow_top_active_ca.paa";
+ arrowEmpty = "\ca\ui\data\igui_arrow_top_ca.paa";
+ border = "\ca\ui\data\igui_border_scroll_ca.paa";
+ };
+};
+
+class RscListBoxA : RscListBox {
+ type = 102;
+ lineSpacing = 1;
+ sizeEx = 0.029;
+ rowHeight = 0.03;
+ style = 16;
+ arrowEmpty = "#(argb,8,8,3)color(1,1,1,1)";
+ arrowFull = "#(argb,8,8,3)color(1,1,1,1)";
+};
+
+/* RscText */
+class RscText {
+ idc = -2;
+ type = 0;
+ x = 0;
+ y = 0;
+ h = 0.037;
+ w = 0;
+ style = 256;
+ font = "Zeppelin32";
+ text = "";
+ sizeEx = 0.03;
+ shadow = 2;
+ colorText[] = {0.9333, 0.8980, 0.5451, 0.9};
+ colorBackground[] = {0, 0, 0, 0};
+};
+class RscText_Title : RscText {
+ h = 0.04;
+ colorText[] = {0.2588, 0.7137, 1, 1};
+ sizeEx = 0.045;
+ shadow = 1;
+};
+class RscText_SubTitle : RscText {
+ h = 0.04;
+ colorText[] = {0.2588, 0.7137, 1, 0.9};
+ sizeEx = 0.035;
+ shadow = 1;
+};
+class RscText_Small : RscText {
+ h = 0.037;
+ colorText[] = {0.9333, 0.8980, 0.5451, 0.9};
+ sizeEx = 0.025;
+ shadow = 2;
+};
+
+/* RscStructuredText */
+class RscStructuredText {
+ type = 13;
+ idc = -2;
+ style = 0;
+ x = 0;
+ y = 0;
+ h = 0.035;
+ w = 0.1;
+ text = "";
+ size = 0.03421;
+ colorText[] = subcolor1;
+ class Attributes {
+ font = "Zeppelin32";
+ color = subcolor1hex;
+ align = "left";
+ shadow = true;
+ };
+};
+
+/* RscXSliderH */
+class RscXSliderH {
+ idc = -2;
+ type = 43;
+ style = 0x400 + 0x10;
+ x = 0;
+ y = 0;
+ h = 0.029412;
+ w = 0.4;
+ color[] = {1, 1, 1, 0.4};
+ colorActive[] = {1, 1, 1, 1};
+ colorDisabled[] = {1, 1, 1, 0.2};
+ arrowEmpty = "\ca\ui\data\ui_arrow_left_ca.paa";
+ arrowFull = "\ca\ui\data\ui_arrow_left_active_ca.paa";
+ border = "\ca\ui\data\ui_border_frame_ca.paa";
+ thumb = "\ca\ui\data\ui_slider_bar_ca.paa";
+};
+
+/* RscCombo */
+class RscCombo {
+ idc = -2;
+ type = 4;
+ style = 1;
+ x = 0;
+ y = 0;
+ w = 0.3;
+ h = 0.035;
+ colorSelect[] = {0, 0, 0, 0.7};
+ colorText[] = {1, 1, 1, 0.75};
+ colorBackground[] = {0,0,0,0.75};
+ colorSelectBackground[] = {0.2588, 0.7137, 1, 1};
+ colorScrollbar[] = {0.023529, 0, 0.0313725, 1};
+ arrowEmpty = "\ca\ui\data\ui_arrow_combo_ca.paa";
+ arrowFull = "\ca\ui\data\ui_arrow_combo_active_ca.paa";
+ wholeHeight = 0.45;
+ color[] = {0.2588, 0.7137, 1, 1};
+ colorActive[] = {0, 0, 0, 1};
+ colorDisabled[] = {0, 0, 0, 0.3};
+ font = "Zeppelin32";
+ sizeEx = 0.031;
+ soundSelect[] = {"\ca\ui\data\sound\new1", 0.09, 1};
+ soundExpand[] = {"\ca\ui\data\sound\new1", 0.09, 1};
+ soundCollapse[] = {"\ca\ui\data\sound\new1", 0.09, 1};
+ maxHistoryDelay = 1.0;
+ class ScrollBar {
+ color[] = {1, 1, 1, 0.6};
+ colorActive[] = {1, 1, 1, 1};
+ colorDisabled[] = {1, 1, 1, 0.3};
+ thumb = "\ca\ui\data\ui_scrollbar_thumb_ca.paa";
+ arrowFull = "\ca\ui\data\ui_arrow_top_active_ca.paa";
+ arrowEmpty = "\ca\ui\data\ui_arrow_top_ca.paa";
+ border = "\ca\ui\data\ui_border_scroll_ca.paa";
+ };
+};
+
+/* RscClickableText */
+class RscClickableText {
+ idc = -2;
+ type = 11;
+ style = 48 + 0x800;
+ color[] = {0.75,0.75,0.75,1};
+ colorActive[] = {1,1,1,1};
+ colorBackground[] = {0.6, 0.8392, 0.4706, 1};
+ colorBackgroundSelected[] = {0.6, 0.8392, 0.4706, 1};
+ colorFocused[] = {0.0, 0.0, 0.0, 0};
+ font = "Zeppelin32";
+ sizeEx = 0.03921;
+ soundClick[] = {WFBE_SoundClick,0.2,1};
+ soundDoubleClick[] = {"", 0.1, 1};
+ soundEnter[] = {WFBE_SoundEnter,0.2,1};
+ soundEscape[] = {WFBE_SoundEscape,0.2,1};
+ soundPush[] = {"",0.2,1};
+ w = 0.275;
+ h = 0.04;
+ text = "";
+};
+
+/* RscMapControl */
+class RscMapControl {
+ type = 101;
+ moveOnEdges = 1;
+ sizeEx = 0.025;
+ style = 48;
+ x = 0.2;
+ y = 0.2;
+ w = 0.2;
+ h = 0.2;
+ ptsPerSquareSea = 8;
+ ptsPerSquareTxt = 10;
+ ptsPerSquareCLn = 10;
+ ptsPerSquareExp = 10;
+ ptsPerSquareCost = 10;
+ ptsPerSquareFor = "6.0f";
+ ptsPerSquareForEdge = "15.0f";
+ ptsPerSquareRoad = "3f";
+ ptsPerSquareObj = 15;
+ showCountourInterval = "false";
+ maxSatelliteAlpha = 0.75;
+ alphaFadeStartScale = 0.15;
+ alphaFadeEndScale = 0.29;
+ colorLevels[] = {0.65, 0.6, 0.45, 1};
+ colorSea[] = {0.46, 0.65, 0.74, 0.5};
+ colorForest[] = {0.45, 0.64, 0.33, 0.5};
+ colorRocks[] = {0, 0, 0, 0.3};
+ colorCountlines[] = {0.85, 0.8, 0.65, 1};
+ colorMainCountlines[] = {0.45, 0.4, 0.25, 1};
+ colorCountlinesWater[] = {0.25, 0.4, 0.5, 0.3};
+ colorMainCountlinesWater[] = {0.25, 0.4, 0.5, 0.9};
+ colorPowerLines[] = {0.1, 0.1, 0.1, 1};
+ colorRailWay[] = {0.8, 0.2, 0, 1};
+ colorForestBorder[] = {0, 0, 0, 0};
+ colorRocksBorder[] = {0, 0, 0, 0};
+ colorNames[] = {0.1, 0.1, 0.1, 0.9};
+ colorInactive[] = {1, 1, 1, 0.5};
+ colorText[] = {0, 0, 0, 1};
+ colorBackground[] = {0.8, 0.8, 0.8, 1};
+ font = "EtelkaNarrowMediumPro";
+ colorOutside[] = {0, 0, 0, 1};
+ fontLabel = "Zeppelin32";
+ sizeExLabel = 0.034;
+ fontGrid = "Zeppelin32";
+ sizeExGrid = 0.03;
+ fontUnits = "Zeppelin32";
+ sizeExUnits = 0.034;
+ fontNames = "Zeppelin32";
+ sizeExNames = 0.056;
+ fontInfo = "Zeppelin32";
+ sizeExInfo = 0.034;
+ fontLevel = "Zeppelin32";
+ sizeExLevel = 0.024;
+ text = "\ca\ui\data\map_background2_co.paa";
+ class Task {
+ icon = "\ca\ui\data\ui_taskstate_current_CA.paa";
+ iconCreated = "\ca\ui\data\ui_taskstate_new_CA.paa";
+ iconCanceled = "#(argb,8,8,3)color(0,0,0,0)";
+ iconDone = "\ca\ui\data\ui_taskstate_done_CA.paa";
+ iconFailed = "\ca\ui\data\ui_taskstate_failed_CA.paa";
+ color[] = {0.863, 0.584, 0.0, 1};
+ colorCreated[] = {0.95, 0.95, 0.95, 1};
+ colorCanceled[] = {0.606, 0.606, 0.606, 1};
+ colorDone[] = {0.424, 0.651, 0.247, 1};
+ colorFailed[] = {0.706, 0.0745, 0.0196, 1};
+ size = 27;
+ importance = 1;
+ coefMin = 1;
+ coefMax = 1;
+ };
+ class CustomMark {
+ icon = "\ca\ui\data\map_waypoint_ca.paa";
+ color[] = {0.6471, 0.6706, 0.6235, 1.0};
+ size = 18;
+ importance = 1;
+ coefMin = 1;
+ coefMax = 1;
+ };
+ class Legend { //todo - current left corner top
+ x = "SafeZoneX";
+ y = "SafeZoneY";
+ w = 0.34;
+ h = 0.152;
+ font = "Zeppelin32";
+ sizeEx = 0.03921;
+ colorBackground[] = {0.906, 0.901, 0.88, 0};
+ color[] = {0, 0, 0, 1};
+ };
+ class Bunker {
+ icon = "\ca\ui\data\map_bunker_ca.paa";
+ size = 14;
+ color[] = {0, 0, 1, 1};
+ importance = 1.5 * 14 * 0.05;
+ coefMin = 0.25;
+ coefMax = 4;
+ };
+ class Bush {
+ icon = "\ca\ui\data\map_bush_ca.paa";
+ color[] = {0.55, 0.64, 0.43, 1};
+ size = 14;
+ importance = 0.2 * 14 * 0.05;
+ coefMin = 0.25;
+ coefMax = 4;
+ };
+ class BusStop {
+ icon = "\ca\ui\data\map_busstop_ca.paa";
+ color[] = {0, 0, 1, 1};
+ size = 12;
+ importance = 1 * 10 * 0.05;
+ coefMin = 0.25;
+ coefMax = 4;
+ };
+ class Command {
+ icon = "\ca\ui\data\map_waypoint_ca.paa";
+ color[] = {0, 0.9, 0, 1};
+ size = 18;
+ importance = 1;
+ coefMin = 1;
+ coefMax = 1;
+ };
+ class Cross {
+ icon = "\ca\ui\data\map_cross_ca.paa";
+ size = 16;
+ color[] = {0, 0.9, 0, 1};
+ importance = 0.7 * 16 * 0.05;
+ coefMin = 0.25;
+ coefMax = 4;
+ };
+ class Fortress {
+ icon = "\ca\ui\data\map_bunker_ca.paa";
+ size = 16;
+ color[] = {0, 0.9, 0, 1};
+ importance = 2 * 16 * 0.05;
+ coefMin = 0.25;
+ coefMax = 4;
+ };
+ class Fuelstation {
+ icon = "\ca\ui\data\map_fuelstation_ca.paa";
+ size = 16;
+ color[] = {0, 0.9, 0, 1};
+ importance = 2 * 16 * 0.05;
+ coefMin = 0.75;
+ coefMax = 4;
+ };
+ class Fountain {
+ icon = "\ca\ui\data\map_fountain_ca.paa";
+ color[] = {0.2, 0.45, 0.7, 1};
+ size = 11;
+ importance = 1 * 12 * 0.05;
+ coefMin = 0.25;
+ coefMax = 4;
+ };
+ class Hospital {
+ icon = "\ca\ui\data\map_hospital_ca.paa";
+ color[] = {0.78, 0, 0.05, 1};
+ size = 16;
+ importance = 2 * 16 * 0.05;
+ coefMin = 0.5;
+ coefMax = 4;
+ };
+ class Chapel {
+ icon = "\ca\ui\data\map_chapel_ca.paa";
+ color[] = {0, 0, 1, 1};
+ size = 16;
+ importance = 1 * 16 * 0.05;
+ coefMin = 0.9;
+ coefMax = 4;
+ };
+ class Church {
+ icon = "\ca\ui\data\map_church_ca.paa";
+ size = 16;
+ color[] = {0, 0.9, 0, 1};
+ importance = 2 * 16 * 0.05;
+ coefMin = 0.9;
+ coefMax = 4;
+ };
+ class Lighthouse {
+ icon = "\ca\ui\data\map_lighthouse_ca.paa";
+ size = 14;
+ color[] = {0, 0.9, 0, 1};
+ importance = 3 * 16 * 0.05;
+ coefMin = 0.9;
+ coefMax = 4;
+ };
+ class Quay {
+ icon = "\ca\ui\data\map_quay_ca.paa";
+ size = 16;
+ color[] = {0, 0.9, 0, 1};
+ importance = 2 * 16 * 0.05;
+ coefMin = 0.5;
+ coefMax = 4;
+ };
+ class Rock {
+ icon = "\ca\ui\data\map_rock_ca.paa";
+ color[] = {0.1, 0.1, 0.1, 0.8};
+ size = 12;
+ importance = 0.5 * 12 * 0.05;
+ coefMin = 0.25;
+ coefMax = 4;
+ };
+ class Ruin {
+ icon = "\ca\ui\data\map_ruin_ca.paa";
+ size = 16;
+ color[] = {0, 0.9, 0, 1};
+ importance = 1.2 * 16 * 0.05;
+ coefMin = 1;
+ coefMax = 4;
+ };
+ class SmallTree {
+ icon = "\ca\ui\data\map_smalltree_ca.paa";
+ color[] = {0.45, 0.64, 0.33, 0.4};
+ size = 12;
+ importance = 0.6 * 12 * 0.05;
+ coefMin = 0.25;
+ coefMax = 4;
+ };
+ class Stack {
+ icon = "\ca\ui\data\map_stack_ca.paa";
+ size = 20;
+ color[] = {0, 0.9, 0, 1};
+ importance = 2 * 16 * 0.05;
+ coefMin = 0.9;
+ coefMax = 4;
+ };
+ class Tree {
+ icon = "\ca\ui\data\map_tree_ca.paa";
+ color[] = {0.45, 0.64, 0.33, 0.4};
+ size = 12;
+ importance = 0.9 * 16 * 0.05;
+ coefMin = 0.25;
+ coefMax = 4;
+ };
+ class Tourism {
+ icon = "\ca\ui\data\map_tourism_ca.paa";
+ size = 16;
+ color[] = {0.78, 0, 0.05, 1};
+ importance = 1 * 16 * 0.05;
+ coefMin = 0.7;
+ coefMax = 4;
+ };
+ class Transmitter {
+ icon = "\ca\ui\data\map_transmitter_ca.paa";
+ color[] = {0, 0.9, 0, 1};
+ size = 20;
+ importance = 2 * 16 * 0.05;
+ coefMin = 0.9;
+ coefMax = 4;
+ };
+ class ViewTower {
+ icon = "\ca\ui\data\map_viewtower_ca.paa";
+ color[] = {0, 0.9, 0, 1};
+ size = 16;
+ importance = 2.5 * 16 * 0.05;
+ coefMin = 0.5;
+ coefMax = 4;
+ };
+ class Watertower {
+ icon = "\ca\ui\data\map_watertower_ca.paa";
+ color[] = {0.2, 0.45, 0.7, 1};
+ size = 20;
+ importance = 1.2 * 16 * 0.05;
+ coefMin = 0.9;
+ coefMax = 4;
+ };
+ class Waypoint {
+ icon = "\ca\ui\data\map_waypoint_ca.paa";
+ color[] = {0, 0, 1, 1};
+ size = 14;
+ importance = 2.5 * 16 * 0.05;
+ coefMin = 0.5;
+ coefMax = 4;
+ };
+ class WaypointCompleted {
+ icon = "\ca\ui\data\map_waypoint_completed_ca.paa";
+ color[] = {0, 0, 1, 1};
+ size = 14;
+ importance = 2.5 * 16 * 0.05;
+ coefMin = 0.5;
+ coefMax = 4;
+ };
+ class ActiveMarker {
+ icon = "";
+ color[] = {0, 0, 1, 1};
+ size = 14;
+ importance = 2.5 * 16 * 0.05;
+ coefMin = 0.5;
+ coefMax = 4;
+ };
+};
+
+class RscControlsGroup
+{
+ type = 15;
+ idc = -1;
+ x = 0;
+ y = 0;
+ w = 1;
+ h = 1;
+ shadow = 0;
+ style = 16;
+
+ class ScrollBar
+ {
+ color[] = {
+ 1, 1, 1, 0.600000
+ };
+ colorActive[] = {
+ 1, 1, 1, 1
+ };
+ colorDisabled[] = {
+ 1, 1, 1, 0.300000
+ };
+ thumb = "\ca\ui\data\ui_scrollbar_thumb_ca.paa";
+ arrowFull = "\ca\ui\data\ui_arrow_top_active_ca.paa";
+ arrowEmpty = "\ca\ui\data\ui_arrow_top_ca.paa";
+ border = "\ca\ui\data\ui_border_scroll_ca.paa";
+ };
+
+ class VScrollbar : ScrollBar
+ {
+ width = 0.021000;
+ autoScrollSpeed = -1;
+ autoScrollDelay = 5;
+ autoScrollRewind = 0;
+ shadow = 0;
+ };
+
+ class HScrollbar : ScrollBar
+ {
+ height = 0.028000;
+ shadow = 0;
+ };
+
+ class Controls
+ {
+ };
+};
+
+class RscListNBox
+{
+ style = 16;
+ shadow = 2;
+ type = 102;
+ color[] = {
+ 1, 1, 1, 1
+ };
+ colorText[] = {
+ 0.878400, 0.847100, 0.651000, 1.000000
+ };
+ colorScrollbar[] = {
+ 0.950000, 0.950000, 0.950000, 1
+ };
+ colorSelect[] = {
+ 0.950000, 0.950000, 0.950000, 1
+ };
+ colorSelect2[] = {
+ 0.950000, 0.950000, 0.950000, 1
+ };
+ colorSelectBackground[] = {
+ 0, 0, 0, 1
+ };
+ colorSelectBackground2[] = {
+ 0.878400, 0.847100, 0.651000, 1.000000
+ };
+
+ class ScrollBar
+ {
+ color[] = {
+ 1, 1, 1, 0.600000
+ };
+ colorActive[] = {
+ 1, 1, 1, 1
+ };
+ colorDisabled[] = {
+ 1, 1, 1, 0.300000
+ };
+ thumb = "\ca\ui\data\ui_scrollbar_thumb_ca.paa";
+ arrowFull = "\ca\ui\data\ui_arrow_top_active_ca.paa";
+ arrowEmpty = "\ca\ui\data\ui_arrow_top_ca.paa";
+ border = "\ca\ui\data\ui_border_scroll_ca.paa";
+ };
+};
+
+class RscIGUIListNBox : RscListNBox
+{
+ style = "0 + 0x10";
+ shadow = 2;
+ color[] = {
+ 1, 1, 1, 1
+ };
+ colorText[] = {
+ 1, 1, 1, 0.750000
+ };
+ colorScrollbar[] = {
+ 0.950000, 0.950000, 0.950000, 1
+ };
+ colorSelect[] = {
+ 0.950000, 0.950000, 0.950000, 1
+ };
+ colorSelect2[] = {
+ 0.950000, 0.950000, 0.950000, 1
+ };
+ colorSelectBackground[] = {
+ 0.878400, 0.847100, 0.651000, 1.000000
+ };
+ colorSelectBackground2[] = {
+ 0.878400, 0.847100, 0.651000, 1.000000
+ };
+ period = 0;
+ colorBackground[] = {
+ 0, 0, 0, 1
+ };
+ columns[] = {
+ 0.100000, 0.700000, 0.100000, 0.100000
+ };
+
+ class ScrollBar
+ {
+ color[] = {
+ 1, 1, 1, 0.600000
+ };
+ colorActive[] = {
+ 1, 1, 1, 1
+ };
+ colorDisabled[] = {
+ 1, 1, 1, 0.300000
+ };
+ thumb = "\ca\ui\data\igui_scrollbar_thumb_ca.paa";
+ arrowFull = "\ca\ui\data\igui_arrow_top_active_ca.paa";
+ arrowEmpty = "\ca\ui\data\igui_arrow_top_ca.paa";
+ border = "\ca\ui\data\igui_border_scroll_ca.paa";
+ };
+};
+
+class RscGearShortcutButton : RscShortcutButton
+{
+ w = 0.039216;
+ h = 0.052288;
+ style = 2;
+ color[] = {
+ 1, 1, 1, 1
+ };
+ color2[] = {
+ 1, 1, 1, 0.850000
+ };
+ colorBackground[] = {
+ 1, 1, 1, 1
+ };
+ colorbackground2[] = {
+ 1, 1, 1, 0.850000
+ };
+ colorDisabled[] = {
+ 1, 1, 1, 0.400000
+ };
+
+ class HitZone
+ {
+ left = 0.000000;
+ top = 0.000000;
+ right = 0.000000;
+ bottom = 0.000000;
+ };
+
+ class ShortcutPos
+ {
+ left = -0.006000;
+ top = -0.007000;
+ w = 0.039216;
+ h = 0.052288;
+ };
+
+ class TextPos
+ {
+ left = 0.003000;
+ top = 0.001000;
+ right = 0.000000;
+ bottom = 0.000000;
+ };
+ sizeEx = 0.100000;
+ animTextureNormal = "\ca\ui\data\igui_gear_normal_ca.paa";
+ animTextureDisabled = "\ca\ui\data\igui_gear_disabled_ca.paa";
+ animTextureOver = "\ca\ui\data\igui_gear_over_ca.paa";
+ animTextureFocused = "\ca\ui\data\igui_gear_focus_ca.paa";
+ animTexturePressed = "\ca\ui\data\igui_gear_down_ca.paa";
+ animTextureDefault = "\ca\ui\data\igui_gear_normal_ca.paa";
+
+ class Attributes
+ {
+ font = "Zeppelin32";
+ color = "#E5E5E5";
+ align = "center";
+ shadow = "false";
+ };
+};
+
+class RscActiveText
+{
+ idc = -1;
+ type = 11;
+ x = 0;
+ y = 0;
+ h = 0.035000;
+ w = 0.035000;
+ font = "Zeppelin32";
+ shadow = 2;
+ sizeEx = 0.039210;
+ color[] = {
+ 0, 0, 0, 1
+ };
+ colortext[] = {
+ 0, 0, 0, 1
+ };
+ colorActive[] = {
+ 0.300000, 0.400000, 0, 1
+ };
+};
+
+class CA_Title : RscText
+{
+ x = 0.014706;
+ y = 0.182000;
+ w = 0.950743;
+ h = 0.058824;
+ style = "0x00 + 0x100";
+ font = "Zeppelin32";
+ sizeEx = 0.050654;
+ colorText[] = {
+ 0.950000, 0.950000, 0.950000, 1
+ };
+};
+
+class CA_IGUI_Title : CA_Title
+{
+ sizeEx = 0.039210;
+ style = 0;
+};
+
+class RscLineBreak
+{
+ type=98;
+}; \ No newline at end of file
diff --git a/Rsc/Sounds.hpp b/Rsc/Sounds.hpp
new file mode 100644
index 0000000..43d12a1
--- /dev/null
+++ b/Rsc/Sounds.hpp
@@ -0,0 +1,4 @@
+class CfgSounds {
+ sounds[] = {};
+
+}; \ No newline at end of file
diff --git a/Rsc/Styles.hpp b/Rsc/Styles.hpp
new file mode 100644
index 0000000..51bc86e
--- /dev/null
+++ b/Rsc/Styles.hpp
@@ -0,0 +1,31 @@
+/* Background */
+#define WFBE_OA_Icon {0.2588, 0.7137, 1, 1}
+
+#define WFBE_EOGS_Background {0, 0, 0, 0.7}
+#define WFBE_EOGS_SRVBBar {0.2588, 0.7137, 1, 1}
+#define WFBE_EOGS_SLVLBar {0.2588, 0.7137, 1, 1}
+
+
+//---Coloration
+#define WFBE_Background_Color {0, 0, 0, 0.7}
+#define WFBE_Background_Color_Header {0, 0, 0, 0.4}
+#define WFBE_Background_Color_Footer {0, 0, 0, 0.3}
+#define WFBE_Background_Color_Gear {0.5, 0.5, 0.5, 0.15}
+#define WFBE_Background_Border {0.2588, 0.7137, 1, 1}
+//---Thick
+#define WFBE_Background_Border_Thick 0.001
+
+
+/* ListBox */
+//---ListBox Coloration
+#define WFBE_LBC_Select_Color {0.2588, 0.7137, 1, 1}
+
+
+/* Separator */
+//---Coloration
+#define WFBE_SPC1 {0.2588, 0.7137, 1, 1}
+#define WFBE_SPC2 {0.543, 0.5742, 0.4102, 1} //unused
+//---Thick
+#define WFBE_SPT1 0.001
+#define WFBE_SPT2 0.0005 //unused
+
diff --git a/Rsc/Titles.hpp b/Rsc/Titles.hpp
new file mode 100644
index 0000000..440b2f3
--- /dev/null
+++ b/Rsc/Titles.hpp
@@ -0,0 +1,430 @@
+/* Titles */
+
+#ifdef VANILLA
+ #define usflag "\ca\data\flag_usa_co.paa"
+ #define ruflag "\ca\data\flag_rus_co.paa"
+#endif
+
+#ifdef ARROWHEAD
+ #define usflag "\ca\ca_e\data\flag_us_co.paa"
+ #define ruflag "\ca\ca_e\data\flag_tkg_co.paa"
+#endif
+
+#ifdef COMBINEDOPS
+ #define usflag "\ca\ca_e\data\flag_us_co.paa"
+ #define ruflag "\ca\data\flag_rus_co.paa"
+#endif
+
+#ifndef usflag
+ #define usflag "\ca\ca_e\data\flag_us_co.paa"
+ #define ruflag "\ca\ca_e\data\flag_tkg_co.paa"
+#endif
+
+class RscTitles {
+
+ titles[] = {OptionsAvailable,EndOfGameStats};
+
+ class OptionsAvailable {
+ idd = 10200;
+ movingEnable = 0;
+ objects[] = {};
+ duration = 15000;
+ name = "OptionsAvailable";
+ onLoad = "_this ExecVM ""Client\GUI\GUI_SetCurrentCutDisplay.sqf""";
+ onUnload = "_this ExecVM ""Client\GUI\GUI_ClearCurrentCutDisplay.sqf""";
+ controls[] = {"ProgressBarBackground","ProgressBar","CA_Progress_Label","OptionsIcon0", "OptionsIcon1", "OptionsIcon2", "OptionsIcon3", "OptionsIcon4", "OptionsIcon5", "OptionsIcon6", "OptionsIcon7", "OptionsIcon8", "OptionsIcon9", "OptionsIcon10",
+ "OptionsIcon11", "OptionsIcon12", "OptionsIcon13", "OptionsIcon14", "OptionsIcon15", "OptionsIcon16", "OptionsIcon17"};
+ controlsBackground[] = {};
+
+ class ProgressBarBackground : RscText {
+ style = 128;
+ idc = 3600;
+ x = 0.3;
+ y = "((SafeZoneH + SafeZoneY) - (1 + 0.165))*-1";
+ w = 0.4;
+ h = 0.06;
+ colorBackground[] = {0,0,0,0.001};
+ };
+
+ class ProgressBar : RscText {
+ style = 128;
+ idc = 3800;
+ x = 0.31;
+ y = "((SafeZoneH + SafeZoneY) - (1 + 0.175))*-1";
+ w = 0.38;
+ h = 0.04;
+ colorBackground[] = {0,0,0,0.001};
+ };
+
+ class CA_Progress_Label: RscText {
+ idc = 3900;
+ text = "";
+ x = 0.44;
+ w = 0.2;
+ y = "((SafeZoneH + SafeZoneY) - (1 + 0.175))*-1";
+ };
+
+ class OptionsImageAspectRatio : RscPicture {
+ w = 0.0784314;
+ h = 0.104575;
+ style = 0x30+0x800;
+ };
+
+ class OptionsIcon0 : OptionsImageAspectRatio {
+ idc = 3500;
+ x = "(SafeZoneW + SafeZoneX) - (0.0392157)";
+ y = 0+(0.0522876*17);
+ w = 0.0392157;
+ h = 0.0522876;
+ colorText[] = WFBE_OA_Icon;
+ text = "";
+ };
+
+ class OptionsIcon1 : OptionsIcon0 {
+ idc = 3500 + 1;
+ y = 0+(0.0522876*16);
+ };
+
+ class OptionsIcon2 : OptionsIcon0 {
+ idc = 3500 + 2;
+ y = 0+(0.0522876*15);
+ };
+
+ class OptionsIcon3 : OptionsIcon0 {
+ idc = 3500 + 3;
+ y = 0+(0.0522876*14);
+ };
+
+ class OptionsIcon4 : OptionsIcon0 {
+ idc = 3500 + 4;
+ y = 0+(0.0522876*13);
+ };
+
+ class OptionsIcon5 : OptionsIcon0 {
+ idc = 3500 + 5;
+ y = 0+(0.0522876*12);
+ };
+
+ class OptionsIcon6 : OptionsIcon0 {
+ idc = 3500 + 6;
+ y = 0+(0.0522876*11);
+ };
+
+ class OptionsIcon7 : OptionsIcon0 {
+ idc = 3500 + 7;
+ y = 0+(0.0522876*10);
+ };
+
+ class OptionsIcon8 : OptionsIcon0 {
+ idc = 3500 + 8;
+ y = 0+(0.0522876*9);
+ };
+
+ class OptionsIcon9 : OptionsIcon0 {
+ idc = 3500 + 9;
+ y = 0+(0.0522876*8);
+ };
+
+ class OptionsIcon10 : OptionsIcon0 {
+ idc = 3500 + 10;
+ y = 0+(0.0522876*7);
+ };
+
+ class OptionsIcon11 : OptionsIcon0 {
+ idc = 3500 + 11;
+ y = 0+(0.0522876*6);
+ };
+
+ class OptionsIcon12 : OptionsIcon0 {
+ idc = 3500 + 12;
+ y = 0+(0.0522876*5);
+ };
+
+ class OptionsIcon13 : OptionsIcon0 {
+ idc = 3500 + 13;
+ y = 0+(0.0522876*4);
+ };
+
+ class OptionsIcon14 : OptionsIcon0 {
+ idc = 3500 + 14;
+ y = 0+(0.0522876*3);
+ };
+
+ class OptionsIcon15 : OptionsIcon0 {
+ idc = 3500 + 15;
+ y = 0+(0.0522876*2);
+ };
+
+ class OptionsIcon16 : OptionsIcon0 {
+ idc = 3500 + 16;
+ y = 0+(0.0522876*1);
+ };
+
+ class OptionsIcon17 : OptionsIcon0 {
+ idc = 3500 + 17;
+ y = 0.0522876;
+ };
+ };
+
+ class EndOfGameStats {
+ idd = 90000;
+ duration = 15000;
+ movingEnable = 0;
+ objects[] = {};
+ name = "EndOfGameStats";
+
+ onLoad = "_this ExecVM ""Client\GUI\GUI_SetCurrentCutDisplay.sqf""";
+ onUnload = "_this ExecVM ""Client\GUI\GUI_ClearCurrentCutDisplay.sqf""";
+
+ controls[] = {StatsBackGroundHeader,SideWinsText,StatsBackGround,EastImage,WestImage,SoldiersRecruitedLabel,SoldiersLostLabel,VehiclesCreatedLabel,VehiclesLostLabel,
+ EastSoldiersRecruitedBar,EastSoldiersRecruitedCount,WestSoldiersRecruitedBar,WestSoldiersRecruitedCount,
+ EastSoldiersLostBar,EastSoldiersLostCount,WestSoldiersLostBar,WestSoldiersLostCount,
+ EastVehiclesCreatedBar,EastVehiclesCreatedCount,WestVehiclesCreatedBar,WestVehiclesCreatedCount,
+ EastVehiclesLostBar,EastVehiclesLostCount,WestVehiclesLostBar,WestVehiclesLostCount};
+
+ controlsBackground[] = {};
+
+ class StatsBackGroundHeader : RscText {
+ style = 128;
+ idc = 90002;
+ x = 0;
+ y = 0.06;
+ w = 1;
+ h = 0.18;
+ colorBackground[] = WFBE_EOGS_Background;
+ };
+
+ class SideWinsText : RscText {
+ idc = 90001;
+ style = 2;
+ sizeEx = 0.05;
+ x = 0.211224;
+ y = 0.1;
+ w = 0.579592;
+ h = 0.08;
+ colorText[] = {1.0,1.0,1.0,1};
+ };
+
+ class StatsBackGround : RscText {
+ style = 128;
+ idc = 90003;
+ x = 0;
+ y = 0.24;
+ w = 1;
+ h = 0.62;
+ colorBackground[] = WFBE_EOGS_Background;
+ };
+
+ class EastImage : RscPicture {
+ style = 48 + 0x800;
+ x = 0.00612286;
+ y = 0.05;
+ w = 0.2;
+ h = 0.2;
+ text = ruflag;
+ };
+
+ class WestImage:EastImage {
+ x = 0.792857;
+ text = usflag;
+ };
+
+ class SoldiersRecruitedLabel : RscText {
+ style = 2;
+ sizeEx = 0.03;
+ x = 0.05;
+ y = 0.25;
+ w = 0.9;
+ h = 0.04;
+ colorText[] = {1.0,1.0,1.0,1};
+ text = $STR_WF_END_Soldier_Recruited;
+ };
+
+ class SoldiersRecruitedCountBase : RscText {
+ idc = 90100;
+ style = 0;
+ sizeEx = 0.06;
+ x = 0.05;
+ y = 0.3;
+ w = 0.2;
+ h = 0.1;
+ colorText[] = {1.0,1.0,1.0,1};
+ };
+
+ class EastSoldiersRecruitedCount : SoldiersRecruitedCountBase {
+ idc = 90101;
+ };
+
+ class EastSoldiersRecruitedBar : RscText {
+ style = 128;
+ idc = 90102;
+ x = 0.05;
+ y = 0.31;
+ w = 0.4;
+ h = 0.08;
+ colorBackground[] = WFBE_EOGS_SRVBBar;
+ };
+
+ class WestSoldiersRecruitedCount : SoldiersRecruitedCountBase {
+ idc = 90200;
+ x = 0.55;
+ };
+
+ class WestSoldiersRecruitedBar : EastSoldiersRecruitedBar {
+ idc = 90201;
+ x = 0.55;
+ };
+
+ class SoldiersLostLabel : SoldiersRecruitedLabel {
+ y = 0.4;
+ text = $STR_WF_END_Soldier_Lost;
+ };
+
+ class EastSoldiersLostCount : SoldiersRecruitedCountBase {
+ idc = 90103;
+ y = 0.45;
+ };
+
+ class EastSoldiersLostBar : EastSoldiersRecruitedBar {
+ idc = 90104;
+ y = 0.46;
+ colorBackground[] = WFBE_EOGS_SLVLBar;
+ };
+
+ class WestSoldiersLostCount : SoldiersRecruitedCountBase {
+ idc = 90202;
+ y = 0.45;
+ x = 0.55;
+ };
+
+ class WestSoldiersLostBar : EastSoldiersLostBar {
+ idc = 90203;
+ x = 0.55;
+ };
+
+ class VehiclesCreatedLabel : SoldiersRecruitedLabel {
+ y = 0.55;
+ text = $STR_WF_END_Vehicle_Built;
+ };
+
+ class EastVehiclesCreatedCount : SoldiersRecruitedCountBase {
+ idc = 90105;
+ y = 0.6;
+ };
+
+ class EastVehiclesCreatedBar : EastSoldiersRecruitedBar {
+ idc = 90106;
+ y = 0.61;
+ colorBackground[] = WFBE_EOGS_SRVBBar;
+ };
+
+ class WestVehiclesCreatedCount : SoldiersRecruitedCountBase {
+ idc = 90204;
+ x = 0.55;
+ y = 0.6;
+ };
+
+ class WestVehiclesCreatedBar : EastVehiclesCreatedBar {
+ idc = 90205;
+ x = 0.55;
+ };
+
+ class VehiclesLostLabel : SoldiersRecruitedLabel {
+ y = 0.7;
+ text = $STR_WF_END_Vehicle_Lost;
+ };
+
+ class EastVehiclesLostCount : SoldiersRecruitedCountBase {
+ idc = 90107;
+ y = 0.75;
+ };
+
+ class EastVehiclesLostBar : EastSoldiersRecruitedBar {
+ idc = 90108;
+ y = 0.76;
+ colorBackground[] = WFBE_EOGS_SLVLBar;
+ };
+
+ class WestVehiclesLostCount : SoldiersRecruitedCountBase {
+ idc = 90206;
+ x = 0.55;
+ y = 0.75;
+ };
+
+ class WestVehiclesLostBar : EastVehiclesLostBar {
+ idc = 90207;
+ x = 0.55;
+ };
+ };
+
+ class WFBE_ConstructionInterface {
+ idd = 112200;
+ movingEnable = 0;
+ duration = 1e+011;
+ name = "Construction Interface";
+ onLoad = "uiNamespace setVariable ['wfbe_title_coin', _this select 0]";
+ onUnload = "uiNamespace setVariable ['wfbe_title_coin', displayNull]";
+
+ class controls {
+ class center : RscPictureKeepAspect {
+ idc = 112201;
+ x = 0.4;
+ y = 0.4;
+ w = 0.2;
+ h = 0.2;
+ colorText[] = {1, 1, 1, 0.1};
+ text = "\ca\ui\data\cursor_w_laserlock_gs.paa";
+ };
+
+ class descBackLeft : IGUIBack {
+ idc = 112211;
+ x = "SafezoneX + 0.01";
+ y = "SafezoneY + SafezoneH - 0.13 + 0.01";
+ w = 0.3;
+ h = 0.12;
+ };
+ class descBackCenter : descBackLeft {
+ idc = 112212;
+ x = "SafezoneX + 0.01 + 0.3";
+ w = "SafeZoneW - 0.02 - 0.3*2";
+ };
+ class descBackRight : descBackLeft {
+ idc = 112213;
+ x = "SafezoneX + SafeZoneW - 0.01 - 0.3";
+ w = 0.3;
+ };
+
+ class descText : RscStructuredText {
+ idc = 112214;
+ x = "SafezoneX + 0.01 + 0.3";
+ y = "SafezoneY + SafezoneH - 0.13 + 0.021";
+ w = "SafeZoneW - 0.02 - 0.3*2";
+ h = 0.11;
+ size = 0.035;
+
+ class Attributes {
+ font = "Zeppelin32";
+ color = "#B6F862";
+ align = "left";
+ shadow = true;
+ };
+ };
+
+ class controlsText : descText {
+ idc = 112215;
+ x = "SafezoneX + SafeZoneW - 0.01 - 0.3";
+ y = "SafezoneY + SafezoneH - 0.13 + 0.015";
+ w = 0.3;
+ h = 0.11;
+ };
+
+ class cashText : descText {
+ idc = 112224;
+ x = "SafezoneX + 0.012*2";
+ y = "SafezoneY + SafezoneH - 0.13 + 0.02";
+ w = 0.2;
+ h = 0.1;
+ };
+ };
+ };
+}; \ No newline at end of file
diff --git a/Server/AI/AI_AddMultiplayerRespawnEH.sqf b/Server/AI/AI_AddMultiplayerRespawnEH.sqf
new file mode 100644
index 0000000..1308fb4
--- /dev/null
+++ b/Server/AI/AI_AddMultiplayerRespawnEH.sqf
@@ -0,0 +1 @@
+(leader _this) addMPEventHandler ['MPRespawn',{if (isServer && !(isPlayer (_this select 0))) then {_this Spawn AIAdvancedRespawn}}]; \ No newline at end of file
diff --git a/Server/AI/AI_AdvancedRespawn.sqf b/Server/AI/AI_AdvancedRespawn.sqf
new file mode 100644
index 0000000..a05caac
--- /dev/null
+++ b/Server/AI/AI_AdvancedRespawn.sqf
@@ -0,0 +1,119 @@
+/* Enhanced Respawn Management via Multiplayer Event Handler - Experimental */
+Private ['_autonomous','_availableSpawn','_buildings','_checks','_closestRespawn','_corpse','_deathLoc','_hq','_i','_isForcedRespawn','_mobileRespawns','_moveMode','_pos','_ran','_range','_rcm','_rd','_respawn','_respawnLoc','_respawnedUnit','_side','_sideText','_skip','_team','_update','_upgrades'];
+
+_respawnedUnit = _this select 0;
+_corpse = _this select 1;
+
+_deathLoc = getPos _corpse;
+_rd = 'WFBE_RESPAWNDELAY' Call GetNamespace;
+_rcm = 'WFBE_RESPAWNCAMPSMODE' Call GetNamespace;
+
+_side = side _respawnedUnit;
+//--- Ensure that the side is not civilian.
+if (_side == civilian) then {
+ if (_respawnedUnit isKindOf westSoldierBaseClass) then {_side = west};
+ if (_respawnedUnit isKindOf eastSoldierBaseClass) then {_side = east};
+};
+_sideText = str _side;
+_team = group _respawnedUnit;
+_respawn = (_team) Call GetTeamRespawn;
+_respawnLoc = objNull;
+
+diag_log format ["[WFBE (INFORMATION)][frameno:%7 | ticktime:%8] AI_AdvancedRespawn: AI Team Leader '%1' (Team '%2', Rank '%3', Type '%4', Side '%5') has respawned after dieing at %6",_respawnedUnit,_team,rank _respawnedUnit,typeOf _respawnedUnit,_side,_deathLoc,diag_frameno,diag_tickTime];
+
+//--- Remove previous EH.
+_respawnedUnit removeAllEventHandlers "Killed";
+Call Compile Format ["_respawnedUnit addEventHandler ['Killed',{[_this select 0,_this select 1,%1] Spawn UnitKilled}]",_side];
+
+//--- Place the leader on a 'safe' position.
+_respawnedUnit setPos getMarkerPos Format["%1TempRespawnMarker",_sideText];
+
+_availableSpawn = [];
+_isForcedRespawn = false;
+
+//--- Ensure that the ai is not forced to respawn.
+if (typeName _respawn == 'STRING') then {if (_respawn == "forceRespawn") then {_isForcedRespawn = true}};
+
+//--- Towns.
+if (_rcm > 0 && !_isForcedRespawn) then {
+ _availableSpawn = _availableSpawn + ([_deathLoc, _side] Call GetRespawnCamps);
+};
+
+_upgrades = (_sideText) Call GetSideUpgrades;
+
+//--- Mobile Respawn.
+if (paramMobileRespawn && !_isForcedRespawn) then {
+ _mobileRespawns = Format ["WFBE_%1AMBULANCES",_sideText] Call GetNamespace;
+ _range = (Format["WFBE_RESPAWNMOBILERANGE%1",(_upgrades select 7)] Call GetNamespace);
+ _checks = _deathLoc nearEntities[_mobileRespawns,_range];
+ if (count _checks > 0) then {
+ {if (alive _x) then {_availableSpawn = _availableSpawn + [_x]}} forEach _checks;
+ };
+};
+
+//--- Wait.
+_i = _rd;
+_skip = false;
+while {_i > 0} do {
+ if (isPlayer(_respawnedUnit) || !(alive _respawnedUnit)) exitWith {_skip = true};
+
+ _i = _i - 1;
+ sleep 1;
+};
+
+//--- Make sure that the AI didn't die or that a player hasn't replaced him before going any further.
+if !(_skip) then {
+ //--- Equip the AI.
+ _ran = 1 + round(random(2));
+ [_respawnedUnit,Format ["WFBE_%1LEADERWEAPONS%2%3",_sideText,_upgrades select 13,_ran] Call GetNamespace, Format ["WFBE_%1LEADERAMMO%2%3",_sideText,_upgrades select 13,_ran] Call GetNamespace] Call EquipLoadout;
+ _hq = (_sideText) Call GetSideHQ;
+ _buildings = (_sideText) Call GetSideStructures;
+
+ //--- Check whether AI has a spawn set or not.
+ _update = false;
+ switch (typeName _respawn) do {
+ case "STRING": {
+ //--- Not defined.
+ _update = true;
+ if (_isForcedRespawn) then {[_team,""] Call SetTeamRespawn};
+ };
+ case "OBJECT": {
+ //--- Defined.
+ _respawnLoc = _respawn;
+ if (!alive _respawn || isNull _respawn) then {
+ [_team, ""] Call SetTeamRespawn;
+ _update = true;
+ };
+ };
+ };
+
+ //--- Default respawn.
+ if (_update) then {
+ _respawnLoc = _hq;
+ if (count _buildings > 0) then {
+ _closestRespawn = [_hq,_buildings] Call SortByDistance;
+ _respawnLoc = _closestRespawn select 0;
+ };
+ };
+
+ //--- Alternative spawn location.
+ if (count _availableSpawn > 0) then {
+ _respawnLoc = _availableSpawn select (round(random((count _availableSpawn)-1)));
+ };
+
+ diag_log format ["[WFBE (INFORMATION)][frameno:%4 | ticktime:%5] AI_AdvancedRespawn: AI Team Leader %1 is respawning at: %2 (%3)",_respawnedUnit,typeOf _respawnLoc,_respawnLoc,diag_frameno,diag_tickTime];
+
+ _pos = [getPos _respawnLoc,20,30] Call GetRandomPosition;
+ _pos set [2,0];
+ _respawnedUnit setPos _pos;
+
+ //--- Assign fresh order if the AI is not on autonomous mode.
+ _autonomous = (_team) Call GetTeamAutonomous;
+ if !(_autonomous) then {
+ _moveMode = (_team) Call GetTeamMoveMode;
+ if (_moveMode == "towns") then {[_team,"resetTowns"] Call SetTeamMoveMode};
+ if (_moveMode == "move") then {[_team,"resetMove"] Call SetTeamMoveMode};
+ if (_moveMode == "patrol") then {[_team,"resetPatrol"] Call SetTeamMoveMode};
+ if (_moveMode == "defense") then {[_team,"resetDefense"] Call SetTeamMoveMode};
+ };
+}; \ No newline at end of file
diff --git a/Server/AI/AI_Resistance.sqf b/Server/AI/AI_Resistance.sqf
new file mode 100644
index 0000000..2fe1ce2
--- /dev/null
+++ b/Server/AI/AI_Resistance.sqf
@@ -0,0 +1,17 @@
+Private ["_action","_position","_range","_team"];
+_team = _this select 0;
+_position = _this select 1;
+_range = _this select 2;
+_action = _this select 3;
+
+switch (_action) do {
+ case "Patrol": {[_team,_position,_range] Call BIS_fnc_taskPatrol};
+ case "Defend": {
+ _team setFormation "STAG COLUMN";
+ _team setBehaviour "AWARE";
+ _team setSpeedMode "NORMAL";
+
+ [_team, true, [[_position, 'SAD', 40, 30, "", []]]] Call AIWPAdd;
+ };
+ case "CPatrol": {[_team,_position,_range] Spawn AIPatrol};
+}; \ No newline at end of file
diff --git a/Server/AI/AI_SquadRespawn.sqf b/Server/AI/AI_SquadRespawn.sqf
new file mode 100644
index 0000000..08a32a2
--- /dev/null
+++ b/Server/AI/AI_SquadRespawn.sqf
@@ -0,0 +1,104 @@
+Private ["_availableSpawn","_autonomous","_buildings","_checks","_closestRespawn","_deathLoc","_enemySide","_hq","_isForcedRespawn","_leader","_mobileRespawns","_moveMode","_pos","_ran","_range","_rcm'","_rd","_respawn","_respawnLoc","_side","_sideText","_team","_update","_upgrades"];
+_side = _this select 0;
+_team = _this select 1;
+_sideText = str _side;
+_deathLoc = objNull;
+_respawnLoc = objNull;
+
+_rd = 'WFBE_RESPAWNDELAY' Call GetNamespace;
+_rcm = 'WFBE_RESPAWNCAMPSMODE' Call GetNamespace;
+
+sleep (random 0.5);
+
+while {!gameOver} do {
+ if (isPlayer leader _team) exitWith {};
+ [str _side,'UnitsCreated',1] Call UpdateStatistics;
+ waitUntil {!alive leader _team || isPlayer leader _team};
+ _deathLoc = getPos (leader _team);
+ diag_log format ["[WFBE (INFORMATION)][frameno:%4 | ticktime:%5] AI_SquadRespawn: AI Team Leader '%1' (Team '%2') is dead at %3",leader _team,_team,_deathLoc,diag_frameno,diag_tickTime];
+ if (isPlayer leader _team) exitWith {};
+ waitUntil {alive leader _team || isPlayer leader _team};
+ if (isPlayer leader _team) exitWith {};
+
+ _respawn = (_team) Call GetTeamRespawn;
+
+ //--- Place the AI.
+ _leader = leader _team;
+ _leader removeAllEventHandlers "Killed";
+ Call Compile Format ["_leader addEventHandler ['Killed',{[_this select 0,_this select 1,%1] Spawn UnitKilled}]",_side];
+ _leader setPos getMarkerPos Format["%1TempRespawnMarker",_sideText];
+
+ _availableSpawn = [];
+ _isForcedRespawn = false;
+ if (typeName _respawn == 'STRING') then {if (_respawn == "forceRespawn") then {_isForcedRespawn = true}};
+
+ //--- Towns.
+ if (_rcm > 0 && !_isForcedRespawn) then {
+ _availableSpawn = _availableSpawn + ([_deathLoc, _side] Call GetRespawnCamps);
+ };
+
+ _upgrades = (_sideText) Call GetSideUpgrades;
+
+ //--- Mobile Respawn.
+ if (paramMobileRespawn && !_isForcedRespawn) then {
+ _mobileRespawns = Format ["WFBE_%1AMBULANCES",_sideText] Call GetNamespace;
+ _range = (Format["WFBE_RESPAWNMOBILERANGE%1",(_upgrades select 7)] Call GetNamespace);
+ _checks = _deathLoc nearEntities[_mobileRespawns,_range];
+ if (count _checks > 0) then {
+ {if (alive _x) then {_availableSpawn = _availableSpawn + [_x]}} forEach _checks;
+ };
+ };
+
+ sleep _rd;
+
+ //--- Equip the AI.
+ _ran = 1 + round(random(2));
+ [_leader,Format ["WFBE_%1LEADERWEAPONS%2%3",_sideText,_upgrades select 13,_ran] Call GetNamespace, Format ["WFBE_%1LEADERAMMO%2%3",_sideText,_upgrades select 13,_ran] Call GetNamespace] Call EquipLoadout;
+ _hq = (_sideText) Call GetSideHQ;
+ _buildings = (_sideText) Call GetSideStructures;
+
+ //--- Check whether AI has a spawn set or not.
+ _update = false;
+ switch (typeName _respawn) do {
+ case "STRING": {
+ _update = true;
+ if (_isForcedRespawn) then {[_team,""] Call SetTeamRespawn};
+ }; //--- Not defined.
+ case "OBJECT": {
+ _respawnLoc = _respawn;
+ if (!alive _respawn || isNull _respawn) then {
+ [_team, ""] Call SetTeamRespawn;
+ _update = true;
+ }; //--- Defined.
+ };
+ };
+
+ //--- Default respawn.
+ if (_update) then {
+ _respawnLoc = _hq;
+ if (count _buildings > 0) then {
+ _closestRespawn = [_hq,_buildings] Call SortByDistance;
+ _respawnLoc = _closestRespawn select 0;
+ };
+ };
+
+ //--- Alternative spawn location.
+ if (count _availableSpawn > 0) then {
+ _respawnLoc = _availableSpawn select (round(random((count _availableSpawn)-1)));
+ };
+
+ diag_log format ["[WFBE (INFORMATION)][frameno:%4 | ticktime:%5] AI_SquadRespawn: AI Team Leader %1 is respawning at: %2 (%3)",leader _team,typeOf _respawnLoc,_respawnLoc,diag_frameno,diag_tickTime];
+ _pos = [getPos _respawnLoc,20,30] Call GetRandomPosition;
+ _pos set [2,0];
+ _leader setPos _pos;
+
+ //--- Assign fresh order (tbc).
+ _autonomous = (_team) Call GetTeamAutonomous;
+ if !(_autonomous) then {
+ _moveMode = (_team) Call GetTeamMoveMode;
+ if (_moveMode == "towns") then {[_team,"resetTowns"] Call SetTeamMoveMode};
+ if (_moveMode == "move") then {[_team,"resetMove"] Call SetTeamMoveMode};
+ if (_moveMode == "patrol") then {[_team,"resetPatrol"] Call SetTeamMoveMode};
+ if (_moveMode == "defense") then {[_team,"resetDefense"] Call SetTeamMoveMode};
+ };
+}; \ No newline at end of file
diff --git a/Server/AI/AI_TLWPHandler.sqs b/Server/AI/AI_TLWPHandler.sqs
new file mode 100644
index 0000000..c94a6a8
--- /dev/null
+++ b/Server/AI/AI_TLWPHandler.sqs
@@ -0,0 +1,39 @@
+Private ["_group","_i","_timeSince","_unit","_units","_waitForMembers","_wpPos"]
+_group = _this select 0
+_wpPos = _this select 1
+
+_timeSince = 0
+
+if (vehicle (leader _group) isKindOf "Air") then {Goto "Exit";}
+
+#Main
+ ~5
+
+ _timeSince = _timeSince + 5
+
+ ;Check for the group's status.
+ _units = ((units _group) Call GetLiveUnits) - [leader _group]
+
+ ;Exit if the leader is the only member.
+ if (count _units < 2) then {Goto "Exit";}
+
+ _i = 0
+ _waitForMembers = false
+
+ ;Iterate through all members.
+ #Loop
+ _unit = _units select _i
+
+ if (_unit distance (leader _group) > 150 && !(_unit isKindOf 'Air')) then {_waitForMembers = true; if (_timeSince > 240) then {[vehicle _unit,getPos (leader _group),75] Call PlaceSafe;};}
+
+ _i = _i + 1
+
+ if (_i == count _units) then {if (_waitForMembers) then {Goto "Main";} else {Goto "Exit";}};
+
+ Goto "Loop"
+
+ Goto "Main"
+
+#Exit
+
+ Exit \ No newline at end of file
diff --git a/Server/AI/AI_UpdateSupplyTruck.sqf b/Server/AI/AI_UpdateSupplyTruck.sqf
new file mode 100644
index 0000000..9083ed7
--- /dev/null
+++ b/Server/AI/AI_UpdateSupplyTruck.sqf
@@ -0,0 +1,24 @@
+Private ["_AITrucks","_destinations","_driver","_full","_hq","_isDeployed","_maist","_side","_sideText","_team","_type","_vehicle"];
+_side = _this select 0;
+_sideText = str _side;
+_maist = 'WFBE_MAXAISUPPLYTRUCKS' Call GetNamespace;
+
+sleep ((Random 200) / 100);
+sleep ((Random 200) / 100);
+
+waitUntil {townInit};
+
+while {!gameOver} do {
+ sleep 60;
+ _AITrucks = Format ["WFBE_%1_AISupplyTrucks",_sideText] Call GetNamespace;
+ _full = false;
+ if (count _AITrucks >= _maist) then {_full = true};
+ if (!_full) then {
+ _isDeployed = (_sideText) Call GetSideHQDeployed;
+ _hq = (_sideText) Call GetSideHQ;
+ if ((_isDeployed)&&(alive _hq)&&(!isNull _hq)) then {
+ diag_log Format["[WFBE (INFORMATION)][frameno:%2 | ticktime:%3] AI_UpdateSupplyTruck: A %1 Supply truck has been created",_side,diag_frameno,diag_tickTime];
+ [_side] ExecFSM "Server\FSM\supplytruck.fsm";
+ };
+ };
+};
diff --git a/Server/AI/AI_Upgrade.sqf b/Server/AI/AI_Upgrade.sqf
new file mode 100644
index 0000000..dabac71
--- /dev/null
+++ b/Server/AI/AI_Upgrade.sqf
@@ -0,0 +1,32 @@
+Private ["_index","_index2","_name","_side","_sideText","_time","_upgrades","_upgrades_old"];
+_time = _this select 0;
+_index = _this select 1;
+_index2 = _this select 2;
+_name = _this select 3;
+_side = _this select 4;
+_sideText = Str _side;
+
+Call Compile Format ["WFBE_%1_Upgrading = true; publicVariable 'WFBE_%1_Upgrading';",_sideText];
+
+_upgrades_old = (_sideText) Call GetSideUpgrades;
+
+sleep _time;
+
+_upgrades = (_sideText) Call GetSideUpgrades;
+
+//--- Failover due to faulty pv.
+for '_i' from 0 to count _upgrades_old do {
+ if ((_upgrades_old select _i) != (_upgrades select _i)) then {_upgrades set [_i, (_upgrades_old select _i)]};
+};
+
+_upgrades set [_index2,_index + 1];
+Call Compile Format ["%1Upgrades = _upgrades; publicVariable '%1Upgrades';",_sideText];
+
+WFBE_LocalizeMessage = [_side,'CLTFNCLOCALIZEMESSAGE',['UpgradeComplete',_index2,(_index + 1)]];
+publicVariable 'WFBE_LocalizeMessage';
+if (isHostedServer) then {[_side,'CLTFNCLOCALIZEMESSAGE',['UpgradeComplete',_index2,(_index + 1)]] Spawn HandlePVF};
+[Format["WFBE_%1_Upgrading",_sideText],false,true] Call SetNamespace;
+
+["NewIntelAvailable","",_side,""] Spawn SideMessage;
+
+Call Compile Format ["WFBE_%1_Upgrading = false; publicVariable 'WFBE_%1_Upgrading';",_sideText];
diff --git a/Server/AI/Orders/AI_MoveTo.sqf b/Server/AI/Orders/AI_MoveTo.sqf
new file mode 100644
index 0000000..e372393
--- /dev/null
+++ b/Server/AI/Orders/AI_MoveTo.sqf
@@ -0,0 +1,17 @@
+private ["_destination","_mission","_radius","_team","_update"];
+_team = _this select 0;
+_destination = _this select 1;
+_mission = _this select 2;
+_radius = if (count _this > 3) then {_this select 3} else {30};
+
+_update = true;
+if (side _team == west || side _team == east) then {
+ _update = (_team) Call CanUpdateTeam;
+};
+
+//--- Override.
+if (_update) then {_team Call UpdateTeam};
+
+diag_log Format["[WFBE (INFORMATION)][frameno:%4 | ticktime:%5] AI_MoveTo: The %1 %2 Team is moving to %3",side _team,_team,_destination,diag_frameno,diag_tickTime];
+
+[_team,true,[[_destination, _mission, _radius, 20, "", []]]] Call AIWPAdd; \ No newline at end of file
diff --git a/Server/AI/Orders/AI_Patrol.sqf b/Server/AI/Orders/AI_Patrol.sqf
new file mode 100644
index 0000000..8cff904
--- /dev/null
+++ b/Server/AI/Orders/AI_Patrol.sqf
@@ -0,0 +1,34 @@
+Private ["_destination","_maxWaypoints","_pos","_radius","_rand1","_rand2","_team","_type","_update","_wps","_z"];
+_team = _this select 0;
+_destination = _this select 1;
+_radius = if (count _this > 2) then {_this select 2} else {30};
+if (typeName _destination == 'OBJECT') then {_destination = getPos _destination};
+
+_update = true;
+if (side _team == west || side _team == east) then {
+ _update = (_team) Call CanUpdateTeam;
+};
+
+//--- Override.
+if (_update) then {_team Call UpdateTeam};
+
+_maxWaypoints = 8;
+_wps = [];
+for [{_z=0},{_z<=_maxWaypoints},{_z=_z+1}] do {
+ _rand1 = (random _radius) - (random _radius);
+ _rand2 = (random _radius) - (random _radius);
+ _pos = [(_destination select 0)+_rand1,(_destination select 1)+_rand2,0];
+ _tries = 100;
+ while {surfaceIsWater _pos && _tries > 0} do {
+ _tries = _tries - 1;
+ _rand1 = (random _radius) - (random _radius);
+ _rand2 = (random _radius) - (random _radius);
+ _pos = [(_destination select 0)+_rand1,(_destination select 1)+_rand2,0];
+ };
+ _type = if (_z != _maxWaypoints) then {'MOVE'} else {'CYCLE'};
+ _wps = _wps + [[_pos,_type,35,40,"",[]]];
+};
+
+diag_log Format["[WFBE (INFORMATION)][frameno:%4 | ticktime:%5] AI_Patrol: The %1 %2 Team is patrolling at %3",side _team,_team,_destination,diag_frameno,diag_tickTime];
+
+[_team, true, _wps] Call AIWPAdd; \ No newline at end of file
diff --git a/Server/AI/Orders/AI_TownPatrol.sqf b/Server/AI/Orders/AI_TownPatrol.sqf
new file mode 100644
index 0000000..15122d3
--- /dev/null
+++ b/Server/AI/Orders/AI_TownPatrol.sqf
@@ -0,0 +1,71 @@
+/*
+ Author: Benny
+ Name: AI_TownPatrol.sqf
+ Parameters:
+ 0 - Team
+ 1 - Town
+ 2 - (Radius)
+ Description:
+ This file is called upon a resistance / occupation patrol, AI will randomly patrol in towns, including the camps and the depots.
+*/
+
+Private ['_camps','_insert','_insertObject','_insertStep','_maxWaypoints','_pos','_radius','_rand1','_rand2','_team','_town','_townPos','_type','_update','_usable','_wpcompletionRadius','_wpradius','_wps','_z'];
+_team = _this select 0;
+_town = _this select 1;
+_radius = if (count _this > 2) then {_this select 2} else {30};
+if (typeName _town != 'OBJECT') exitWith {diag_log Format ["[WFBE (ERROR)] AI_TownPatrol: Object expected, %1 given",_town]};
+if (isNull _team) exitWith {diag_log Format ["[WFBE (ERROR)] AI_TownPatrol: Null Groups cannot be used (Town: %1)",_town]};
+_townPos = getPos _town;
+
+_camps = _town getVariable 'camps';
+
+_usable = [_town] + _camps;
+_maxWaypoints = ('WFBE_TOWNPATROLHOPS' Call GetNamespace) + count(_usable);
+_wps = [];
+
+//--- Randomize the behaviours.
+if (random 100 > 50) then {_team setFormation "DIAMOND"} else {_team setFormation "STAG COLUMN"};
+if (random 100 > 50) then {_team setCombatMode "YELLOW"} else {_team setCombatMode "RED"};
+if (random 100 > 50) then {_team setBehaviour "AWARE"} else {_team setBehaviour "COMBAT"};
+if (random 100 > 50) then {_team setSpeedMode "NORMAL"} else {_team setSpeedMode "LIMITED"};
+
+//--- Dyn insert.
+_insertStep = if (count(_usable) != 0) then {floor(_maxWaypoints / count(_usable))} else {-1};
+_insert = _insertStep;
+_insertObject = objNull;
+_wpradius = -1;
+_wpcompletionRadius = -1;
+
+for [{_z=0},{_z<=_maxWaypoints},{_z=_z+1}] do {
+ if (_z == _insert && count _usable > 0) then {
+ _insert = _insert + _insertStep;
+ _insertObject = _usable select (round(random((count _usable)-1)));
+ _usable = _usable - [_insertObject];
+ };
+
+ if (isNull _insertObject) then {
+ _rand1 = random _radius;
+ _rand2 = random _radius;
+ _pos = [(_townPos select 0)+_rand1,(_townPos select 1)+_rand2,0];
+ _tries = 100;
+ while {surfaceIsWater _pos && _tries > 0} do {
+ _tries = _tries - 1;
+ _rand1 = random _radius;
+ _rand2 = random _radius;
+ _pos = [(_townPos select 0)+_rand1,(_townPos select 1)+_rand2,0];
+ };
+ _wpradius = 32;
+ _wpcompletionRadius = 44;
+ } else {
+ _pos = getPos _insertObject;
+ _wpradius = 35;
+ _wpcompletionRadius = 68;
+ };
+
+ _type = if (_z != _maxWaypoints) then {'MOVE'} else {'CYCLE'};
+ _wps = _wps + [[_pos,_type,_wpradius,_wpcompletionRadius, "", []]];
+};
+
+diag_log Format["[WFBE (INFORMATION)][frameno:%4 | ticktime:%5] AI_TownPatrol: The %1 %2 Team is patrolling the %3 town",side _team,_team,_town,diag_frameno,diag_tickTime];
+
+[_team, true, _wps] Call AIWPAdd; \ No newline at end of file
diff --git a/Server/AI/Orders/AI_WPAdd.sqf b/Server/AI/Orders/AI_WPAdd.sqf
new file mode 100644
index 0000000..ad04518
--- /dev/null
+++ b/Server/AI/Orders/AI_WPAdd.sqf
@@ -0,0 +1,39 @@
+/*
+ Author: Benny
+ Name: AI_WPAdd.sqf
+ Parameters:
+ 0 - Team
+ 1 - Clear (Remove WPs)
+ 2 - Waypoints (given in an Array)
+ Description:
+ This file is used to give a detailed WP system.
+ Exemple:
+ [_team, true, [[getPos _camp, 'MOVE', 10, 20, "", []],[[1560,2560,0], 'SAD', 50, 70, "", ["canComplete", "this sidechat 'lets roll'"]]...]] Call AddWP;
+*/
+
+Private ['_clear','_completionRadius','_position','_radius','_scripted','_statements','_team','_type','_waypoint','_waypoints','_WPCount'];
+_team = _this select 0;
+_clear = _this select 1;
+_waypoints = _this select 2;
+
+if (_clear) then {_team Call AIWPRemove};
+
+{
+ _position = _x select 0;
+ _type = _x select 1;
+ _radius = _x select 2;
+ _completionRadius = _x select 3;
+ _scripted = _x select 4;
+ _statements = _x select 5;
+ if (typeName _position == 'OBJECT') then {_position = getPos _position};
+
+ _WPCount = count (waypoints _team);
+
+ _team addWaypoint [_position,_radius];
+ [_team, _WPCount] setWaypointType _type;
+ [_team, _WPCount] setWaypointCompletionRadius _completionRadius;
+ if (_type == 'SCRIPTED') then {[_team, _WPCount] setWaypointScript _scripted};
+ if (count _statements > 0) then {[_team, _WPCount] setWaypointStatements [_statements select 0, _statements select 1]};
+
+ if (_WPCount == 0) then {_team setCurrentWaypoint [_team, _WPCount]};
+} forEach _waypoints; \ No newline at end of file
diff --git a/Server/AI/Orders/AI_WPRemove.sqf b/Server/AI/Orders/AI_WPRemove.sqf
new file mode 100644
index 0000000..a02a1e2
--- /dev/null
+++ b/Server/AI/Orders/AI_WPRemove.sqf
@@ -0,0 +1,6 @@
+Private ['_team','_z'];
+_team = _this;
+
+for [{_z = (count (waypoints _team))-1},{_z > -1},{_z = _z - 1}] do {
+ deleteWaypoint [_team, _z];
+}; \ No newline at end of file
diff --git a/Server/Config/Config_Allies.sqf b/Server/Config/Config_Allies.sqf
new file mode 100644
index 0000000..f0e500e
--- /dev/null
+++ b/Server/Config/Config_Allies.sqf
@@ -0,0 +1,454 @@
+Private ['_alliesTeamCost','_alliesTeamTemplates','_alliesTeamTemplateRequires','_alliesTeamTypes','_d','_f','_get','_p','_u'];
+/* ALLIES TEAM TEMPLATES */
+/* CDF*/
+_alliesTeamTemplates = [];
+_alliesTeamTemplateRequires = [];
+_alliesTeamTypes = []; //--- 0 Inf, 2 Light, 3 Armor, 4 Air
+_alliesTeamCost = [];
+
+_d = ["Infantry - Infantry Squad"];
+_u = ["CDF_Soldier_TL"];
+_u = _u + ["CDF_Soldier_MG"];
+_u = _u + ["CDF_Soldier_RPG"];
+_u = _u + ["CDF_Soldier_GL"];
+_u = _u + ["CDF_Soldier"];
+_u = _u + ["CDF_Soldier_MG"];
+_u = _u + ["CDF_Soldier_GL"];
+_u = _u + ["CDF_Soldier_RPG"];
+_u = _u + ["CDF_Soldier"];
+_u = _u + ["CDF_Soldier_Medic"];
+_f = [true,false,false,false];
+_p = 0;
+{_get = _x Call GetNamespace;if (!isNil '_get') then {_p = _p + (_get select QUERYUNITPRICE)}} forEach _u;
+
+_alliesTeamTemplates = _alliesTeamTemplates + [_u];
+_alliesTeamTemplateRequires = _alliesTeamTemplateRequires + [_f];
+_alliesTeamTypes = _alliesTeamTypes + [0];
+_alliesTeamCost = _alliesTeamCost + [_p];
+
+_d = ["Infantry - Rifle Squad"];
+_u = ["CDF_Soldier_TL"];
+_u = _u + ["CDF_Soldier_AR"];
+_u = _u + ["CDF_Soldier_MG"];
+_u = _u + ["CDF_Soldier_MG"];
+_u = _u + ["CDF_Soldier_RPG"];
+_u = _u + ["CDF_Soldier_RPG"];
+_u = _u + ["CDF_Soldier_Marksman"];
+_u = _u + ["CDF_Soldier_Marksman"];
+_f = [true,false,false,false];
+_p =0;
+{_get = _x Call GetNamespace;if (!isNil '_get') then {_p = _p + (_get select QUERYUNITPRICE)}} forEach _u;
+
+_alliesTeamTemplates = _alliesTeamTemplates + [_u];
+_alliesTeamTemplateRequires = _alliesTeamTemplateRequires + [_f];
+_alliesTeamTypes = _alliesTeamTypes + [0];
+_alliesTeamCost = _alliesTeamCost + [_p];
+
+_d = ["Infantry - Rifle Squad"];
+_u = ["CDF_Soldier_TL"];
+_u = _u + ["CDF_Soldier_AR"];
+_u = _u + ["CDF_Soldier_MG"];
+_u = _u + ["CDF_Soldier_MG"];
+_u = _u + ["CDF_Soldier_RPG"];
+_u = _u + ["CDF_Soldier_RPG"];
+_u = _u + ["CDF_Soldier_Marksman"];
+_u = _u + ["CDF_Soldier_Marksman"];
+_f = [true,false,false,false];
+_p =0;
+{_get = _x Call GetNamespace;if (!isNil '_get') then {_p = _p + (_get select QUERYUNITPRICE)}} forEach _u;
+
+_alliesTeamTemplates = _alliesTeamTemplates + [_u];
+_alliesTeamTemplateRequires = _alliesTeamTemplateRequires + [_f];
+_alliesTeamTypes = _alliesTeamTypes + [0];
+_alliesTeamCost = _alliesTeamCost + [_p];
+
+_d = ["Infantry - Weapon Squad"];
+_u = ["CDF_Soldier_Officer"];
+_u = _u + ["CDF_Soldier_AR"];
+_u = _u + ["CDF_Soldier_Engineer"];
+_u = _u + ["CDF_Soldier_Light"];
+_u = _u + ["CDF_Soldier_Strela"];
+_u = _u + ["CDF_Soldier_Strela"];
+_u = _u + ["CDF_Soldier_RPG"];
+_u = _u + ["CDF_Soldier_Sniper"];
+_u = _u + ["CDF_Soldier_Spotter"];
+_f = [true,false,false,false];
+_p =0;
+{_get = _x Call GetNamespace;if (!isNil '_get') then {_p = _p + (_get select QUERYUNITPRICE)}} forEach _u;
+
+_alliesTeamTemplates = _alliesTeamTemplates + [_u];
+_alliesTeamTemplateRequires = _alliesTeamTemplateRequires + [_f];
+_alliesTeamTypes = _alliesTeamTypes + [0];
+_alliesTeamCost = _alliesTeamCost + [_p];
+
+_d = ["Motorized - Infantry Squad"];
+_u = ["CDF_Soldier_TL"];
+_u = _u + ["Ural_CDF"];
+_u = _u + ["CDF_Soldier_MG"];
+_u = _u + ["CDF_Soldier_RPG"];
+_u = _u + ["CDF_Soldier_GL"];
+_u = _u + ["CDF_Soldier"];
+_u = _u + ["CDF_Soldier_MG"];
+_u = _u + ["CDF_Soldier_RPG"];
+_u = _u + ["CDF_Soldier"];
+_u = _u + ["CDF_Soldier_Medic"];
+_f = [true,true,false,false];
+_p =0;
+{_get = _x Call GetNamespace;if (!isNil '_get') then {_p = _p + (_get select QUERYUNITPRICE)}} forEach _u;
+
+_alliesTeamTemplates = _alliesTeamTemplates + [_u];
+_alliesTeamTemplateRequires = _alliesTeamTemplateRequires + [_f];
+_alliesTeamTypes = _alliesTeamTypes + [1];
+_alliesTeamCost = _alliesTeamCost + [_p];
+
+_d = ["Motorized - Infantry Section"];
+_u = ["UAZ_AGS30_CDF"];
+_u = _u + ["UAZ_AGS30_CDF"];
+_u = _u + ["UAZ_MG_CDF"];
+_f = [false,true,false,false];
+_p =0;
+{_get = _x Call GetNamespace;if (!isNil '_get') then {_p = _p + (_get select QUERYUNITPRICE)}} forEach _u;
+
+_alliesTeamTemplates = _alliesTeamTemplates + [_u];
+_alliesTeamTemplateRequires = _alliesTeamTemplateRequires + [_f];
+_alliesTeamTypes = _alliesTeamTypes + [1];
+_alliesTeamCost = _alliesTeamCost + [_p];
+
+_d = ["Motorized - AA Patrol"];
+_u = ["Ural_ZU23_CDF"];
+_u = _u + ["Ural_ZU23_CDF"];
+_f = [false,true,false,false];
+_p =0;
+{_get = _x Call GetNamespace;if (!isNil '_get') then {_p = _p + (_get select QUERYUNITPRICE)}} forEach _u;
+
+_alliesTeamTemplates = _alliesTeamTemplates + [_u];
+_alliesTeamTemplateRequires = _alliesTeamTemplateRequires + [_f];
+_alliesTeamTypes = _alliesTeamTypes + [1];
+_alliesTeamCost = _alliesTeamCost + [_p];
+
+_d = ["Motorized - BRDM"];
+_u = ["BRDM2_CDF"];
+_u = _u + ["BRDM2_ATGM_CDF"];
+_f = [false,true,false,false];
+_p =0;
+{_get = _x Call GetNamespace;if (!isNil '_get') then {_p = _p + (_get select QUERYUNITPRICE)}} forEach _u;
+
+_alliesTeamTemplates = _alliesTeamTemplates + [_u];
+_alliesTeamTemplateRequires = _alliesTeamTemplateRequires + [_f];
+_alliesTeamTypes = _alliesTeamTypes + [1];
+_alliesTeamCost = _alliesTeamCost + [_p];
+
+_d = ["Mechanized - Rifle Squad"];
+_u = ["CDF_Soldier_TL"];
+_u = _u + ["BMP2_CDF"];
+_u = _u + ["CDF_Soldier_MG"];
+_u = _u + ["CDF_Soldier_MG"];
+_u = _u + ["CDF_Soldier_Marksman"];
+_u = _u + ["CDF_Soldier_RPG"];
+_u = _u + ["CDF_Soldier"];
+_f = [true,false,true,false];
+_p =0;
+{_get = _x Call GetNamespace;if (!isNil '_get') then {_p = _p + (_get select QUERYUNITPRICE)}} forEach _u;
+
+_alliesTeamTemplates = _alliesTeamTemplates + [_u];
+_alliesTeamTemplateRequires = _alliesTeamTemplateRequires + [_f];
+_alliesTeamTypes = _alliesTeamTypes + [2];
+_alliesTeamCost = _alliesTeamCost + [_p];
+
+_d = ["Mechanized - BMP2"];
+_u = ["BMP2_CDF"];
+_u = _u + ["BMP2_CDF"];
+_u = _u + ["BMP2_CDF"];
+_f = [false,false,true,false];
+_p =0;
+{_get = _x Call GetNamespace;if (!isNil '_get') then {_p = _p + (_get select QUERYUNITPRICE)}} forEach _u;
+
+_alliesTeamTemplates = _alliesTeamTemplates + [_u];
+_alliesTeamTemplateRequires = _alliesTeamTemplateRequires + [_f];
+_alliesTeamTypes = _alliesTeamTypes + [2];
+_alliesTeamCost = _alliesTeamCost + [_p];
+
+_d = ["Armored - T72"];
+_u = ["T72_CDF"];
+_u = _u + ["T72_CDF"];
+_u = _u + ["T72_CDF"];
+_f = [false,false,true,false];
+_p =0;
+{_get = _x Call GetNamespace;if (!isNil '_get') then {_p = _p + (_get select QUERYUNITPRICE)}} forEach _u;
+
+_alliesTeamTemplates = _alliesTeamTemplates + [_u];
+_alliesTeamTemplateRequires = _alliesTeamTemplateRequires + [_f];
+_alliesTeamTypes = _alliesTeamTypes + [2];
+_alliesTeamCost = _alliesTeamCost + [_p];
+
+_d = ["Armored - Mix"];
+_u = ["T72_CDF"];
+_u = _u + ["ZSU_CDF"];
+_u = _u + ["BMP2_CDF"];
+_f = [false,false,true,false];
+_p =0;
+{_get = _x Call GetNamespace;if (!isNil '_get') then {_p = _p + (_get select QUERYUNITPRICE)}} forEach _u;
+
+_alliesTeamTemplates = _alliesTeamTemplates + [_u];
+_alliesTeamTemplateRequires = _alliesTeamTemplateRequires + [_f];
+_alliesTeamTypes = _alliesTeamTypes + [2];
+_alliesTeamCost = _alliesTeamCost + [_p];
+
+_d = ["Air - Hinds"];
+_u = ["Mi24_D"];
+_u = _u + ["Mi24_D"];
+_f = [false,false,false,true];
+_p =0;
+{_get = _x Call GetNamespace;if (!isNil '_get') then {_p = _p + (_get select QUERYUNITPRICE)}} forEach _u;
+
+_alliesTeamTemplates = _alliesTeamTemplates + [_u];
+_alliesTeamTemplateRequires = _alliesTeamTemplateRequires + [_f];
+_alliesTeamTypes = _alliesTeamTypes + [3];
+_alliesTeamCost = _alliesTeamCost + [_p];
+
+_d = ["Airborn Infantry - Hind"];
+_u = ["CDF_Soldier_TL"];
+_u = _u + ["Mi24_D"];
+_u = _u + ["CDF_Soldier_MG"];
+_u = _u + ["CDF_Soldier_Strela"];
+_u = _u + ["CDF_Soldier_Strela"];
+_f = [true,false,false,true];
+_p =0;
+{_get = _x Call GetNamespace;if (!isNil '_get') then {_p = _p + (_get select QUERYUNITPRICE)}} forEach _u;
+
+_alliesTeamTemplates = _alliesTeamTemplates + [_u];
+_alliesTeamTemplateRequires = _alliesTeamTemplateRequires + [_f];
+_alliesTeamTypes = _alliesTeamTypes + [3];
+_alliesTeamCost = _alliesTeamCost + [_p];
+
+_d = ["Airborn Infantry - Mi17"];
+_u = ["CDF_Soldier_TL"];
+_u = _u + ["Mi17_CDF"];
+_u = _u + ["CDF_Soldier_MG"];
+_u = _u + ["CDF_Soldier_AR"];
+_u = _u + ["CDF_Soldier_Marksman"];
+_u = _u + ["CDF_Soldier_RPG"];
+_u = _u + ["CDF_Soldier_Strela"];
+_u = _u + ["CDF_Soldier_Medic"];
+_f = [true,false,false,true];
+_p =0;
+{_get = _x Call GetNamespace;if (!isNil '_get') then {_p = _p + (_get select QUERYUNITPRICE)}} forEach _u;
+
+_alliesTeamTemplates = _alliesTeamTemplates + [_u];
+_alliesTeamTemplateRequires = _alliesTeamTemplateRequires + [_f];
+_alliesTeamTypes = _alliesTeamTypes + [3];
+_alliesTeamCost = _alliesTeamCost + [_p];
+
+['WFBE_WESTALLIESTEAMTEMPLATES',_alliesTeamTemplates,true] Call SetNamespace;
+['WFBE_WESTALLIESTEAMTEMPLATEREQUIRES',_alliesTeamTemplateRequires,true] Call SetNamespace;
+['WFBE_WESTALLIESTEAMTYPES',_alliesTeamTypes,true] Call SetNamespace;
+['WFBE_WESTALLIESTEAMCOST',_alliesTeamCost,true] Call SetNamespace;
+
+/* Insurgent*/
+_alliesTeamTemplates = [];
+_alliesTeamTemplateRequires = [];
+_alliesTeamTypes = []; //--- 0 Inf, 2 Light, 3 Armor, 4 Air
+_alliesTeamCost = [];
+
+_d = ["Infantry - Group"];
+_u = ["Ins_Soldier_CO"];
+_u = _u + ["Ins_Soldier_AR"];
+_u = _u + ["Ins_Soldier_GL"];
+_u = _u + ["Ins_Soldier_AT"];
+_u = _u + ["Ins_Soldier_2"];
+_u = _u + ["Ins_Soldier_AR"];
+_u = _u + ["Ins_Soldier_1"];
+_u = _u + ["Ins_Soldier_Medic"];
+_f = [true,false,false,false];
+_p =0;
+{_get = _x Call GetNamespace;if (!isNil '_get') then {_p = _p + (_get select QUERYUNITPRICE)}} forEach _u;
+
+_alliesTeamTemplates = _alliesTeamTemplates + [_u];
+_alliesTeamTemplateRequires = _alliesTeamTemplateRequires + [_f];
+_alliesTeamTypes = _alliesTeamTypes + [0];
+_alliesTeamCost = _alliesTeamCost + [_p];
+
+_d = ["Infantry - Weapons Group"];
+_u = ["Ins_Soldier_CO"];
+_u = _u + ["Ins_Soldier_MG"];
+_u = _u + ["Ins_Soldier_MG"];
+_u = _u + ["Ins_Soldier_AT"];
+_u = _u + ["Ins_Soldier_AT"];
+_u = _u + ["Ins_Soldier_AR"];
+_u = _u + ["Ins_Soldier_AR"];
+_u = _u + ["Ins_Soldier_2"];
+_f = [true,false,false,false];
+_p =0;
+{_get = _x Call GetNamespace;if (!isNil '_get') then {_p = _p + (_get select QUERYUNITPRICE)}} forEach _u;
+
+_alliesTeamTemplates = _alliesTeamTemplates + [_u];
+_alliesTeamTemplateRequires = _alliesTeamTemplateRequires + [_f];
+_alliesTeamTypes = _alliesTeamTypes + [0];
+_alliesTeamCost = _alliesTeamCost + [_p];
+
+_d = ["Infantry - Weapon Squad"];
+_u = ["Ins_Soldier_CO"];
+_u = _u + ["Ins_Soldier_AR"];
+_u = _u + ["Ins_Soldier_Sapper"];
+_u = _u + ["Ins_Soldier_2"];
+_u = _u + ["Ins_Soldier_AA"];
+_u = _u + ["Ins_Soldier_AA"];
+_u = _u + ["Ins_Soldier_AT"];
+_u = _u + ["Ins_Soldier_Sniper"];
+_u = _u + ["Ins_Soldier_Sab"];
+_f = [true,false,false,false];
+_p =0;
+{_get = _x Call GetNamespace;if (!isNil '_get') then {_p = _p + (_get select QUERYUNITPRICE)}} forEach _u;
+
+_alliesTeamTemplates = _alliesTeamTemplates + [_u];
+_alliesTeamTemplateRequires = _alliesTeamTemplateRequires + [_f];
+_alliesTeamTypes = _alliesTeamTypes + [0];
+_alliesTeamCost = _alliesTeamCost + [_p];
+
+_d = ["Motorized - Infantry Squad"];
+_u = ["Ins_Soldier_CO"];
+_u = _u + ["Ural_INS"];
+_u = _u + ["Ins_Soldier_MG"];
+_u = _u + ["Ins_Soldier_AT"];
+_u = _u + ["Ins_Soldier_GL"];
+_u = _u + ["Ins_Soldier_1"];
+_u = _u + ["Ins_Soldier_MG"];
+_u = _u + ["Ins_Soldier_AT"];
+_u = _u + ["Ins_Soldier_1"];
+_u = _u + ["Ins_Soldier_Medic"];
+_f = [true,true,false,false];
+_p =0;
+{_get = _x Call GetNamespace;if (!isNil '_get') then {_p = _p + (_get select QUERYUNITPRICE)}} forEach _u;
+
+_alliesTeamTemplates = _alliesTeamTemplates + [_u];
+_alliesTeamTemplateRequires = _alliesTeamTemplateRequires + [_f];
+_alliesTeamTypes = _alliesTeamTypes + [1];
+_alliesTeamCost = _alliesTeamCost + [_p];
+
+_d = ["Motorized - Infantry Section"];
+_u = ["UAZ_AGS30_INS"];
+_u = _u + ["UAZ_SPG9_INS"];
+_u = _u + ["UAZ_MG_INS"];
+_f = [false,true,false,false];
+_p =0;
+{_get = _x Call GetNamespace;if (!isNil '_get') then {_p = _p + (_get select QUERYUNITPRICE)}} forEach _u;
+
+_alliesTeamTemplates = _alliesTeamTemplates + [_u];
+_alliesTeamTemplateRequires = _alliesTeamTemplateRequires + [_f];
+_alliesTeamTypes = _alliesTeamTypes + [1];
+_alliesTeamCost = _alliesTeamCost + [_p];
+
+_d = ["Motorized - AA Patrol"];
+_u = ["Ural_ZU23_INS"];
+_u = _u + ["Ural_ZU23_INS"];
+_f = [false,true,false,false];
+_p =0;
+{_get = _x Call GetNamespace;if (!isNil '_get') then {_p = _p + (_get select QUERYUNITPRICE)}} forEach _u;
+
+_alliesTeamTemplates = _alliesTeamTemplates + [_u];
+_alliesTeamTemplateRequires = _alliesTeamTemplateRequires + [_f];
+_alliesTeamTypes = _alliesTeamTypes + [1];
+_alliesTeamCost = _alliesTeamCost + [_p];
+
+_d = ["Motorized - BRDM"];
+_u = ["BRDM2_INS"];
+_u = _u + ["BRDM2_ATGM_INS"];
+_f = [false,true,false,false];
+_p =0;
+{_get = _x Call GetNamespace;if (!isNil '_get') then {_p = _p + (_get select QUERYUNITPRICE)}} forEach _u;
+
+_alliesTeamTemplates = _alliesTeamTemplates + [_u];
+_alliesTeamTemplateRequires = _alliesTeamTemplateRequires + [_f];
+_alliesTeamTypes = _alliesTeamTypes + [1];
+_alliesTeamCost = _alliesTeamCost + [_p];
+
+_d = ["Mechanized - Rifle Squad"];
+_u = ["Ins_Soldier_CO"];
+_u = _u + ["BMP2_INS"];
+_u = _u + ["Ins_Soldier_MG"];
+_u = _u + ["Ins_Soldier_MG"];
+_u = _u + ["Ins_Soldier_Sniper"];
+_u = _u + ["Ins_Soldier_AT"];
+_u = _u + ["Ins_Soldier_1"];
+_f = [true,false,true,false];
+_p =0;
+{_get = _x Call GetNamespace;if (!isNil '_get') then {_p = _p + (_get select QUERYUNITPRICE)}} forEach _u;
+
+_alliesTeamTemplates = _alliesTeamTemplates + [_u];
+_alliesTeamTemplateRequires = _alliesTeamTemplateRequires + [_f];
+_alliesTeamTypes = _alliesTeamTypes + [2];
+_alliesTeamCost = _alliesTeamCost + [_p];
+
+_d = ["Mechanized - BMP2"];
+_u = ["BMP2_INS"];
+_u = _u + ["BMP2_INS"];
+_u = _u + ["BMP2_INS"];
+_f = [false,false,true,false];
+_p =0;
+{_get = _x Call GetNamespace;if (!isNil '_get') then {_p = _p + (_get select QUERYUNITPRICE)}} forEach _u;
+
+_alliesTeamTemplates = _alliesTeamTemplates + [_u];
+_alliesTeamTemplateRequires = _alliesTeamTemplateRequires + [_f];
+_alliesTeamTypes = _alliesTeamTypes + [2];
+_alliesTeamCost = _alliesTeamCost + [_p];
+
+_d = ["Armored - T72"];
+_u = ["T72_INS"];
+_u = _u + ["T72_INS"];
+_u = _u + ["T72_INS"];
+_f = [false,false,true,false];
+_p =0;
+{_get = _x Call GetNamespace;if (!isNil '_get') then {_p = _p + (_get select QUERYUNITPRICE)}} forEach _u;
+
+_alliesTeamTemplates = _alliesTeamTemplates + [_u];
+_alliesTeamTemplateRequires = _alliesTeamTemplateRequires + [_f];
+_alliesTeamTypes = _alliesTeamTypes + [2];
+_alliesTeamCost = _alliesTeamCost + [_p];
+
+_d = ["Armored - Mix"];
+_u = ["T72_INS"];
+_u = _u + ["ZSU_INS"];
+_u = _u + ["BMP2_INS"];
+_f = [false,false,true,false];
+_p =0;
+{_get = _x Call GetNamespace;if (!isNil '_get') then {_p = _p + (_get select QUERYUNITPRICE)}} forEach _u;
+
+_alliesTeamTemplates = _alliesTeamTemplates + [_u];
+_alliesTeamTemplateRequires = _alliesTeamTemplateRequires + [_f];
+_alliesTeamTypes = _alliesTeamTypes + [2];
+_alliesTeamCost = _alliesTeamCost + [_p];
+
+_d = ["Air - Sukhoi 25"];
+_u = ["Su25_Ins"];
+_u = _u + ["Su25_Ins"];
+_f = [false,false,false,true];
+_p =0;
+{_get = _x Call GetNamespace;if (!isNil '_get') then {_p = _p + (_get select QUERYUNITPRICE)}} forEach _u;
+
+_alliesTeamTemplates = _alliesTeamTemplates + [_u];
+_alliesTeamTemplateRequires = _alliesTeamTemplateRequires + [_f];
+_alliesTeamTypes = _alliesTeamTypes + [3];
+_alliesTeamCost = _alliesTeamCost + [_p];
+
+_d = ["Airborn Infantry - Mi17"];
+_u = ["Ins_Soldier_CO"];
+_u = _u + ["Mi17_Ins"];
+_u = _u + ["Ins_Soldier_MG"];
+_u = _u + ["Ins_Soldier_AR"];
+_u = _u + ["Ins_Soldier_Sab"];
+_u = _u + ["Ins_Soldier_AT"];
+_u = _u + ["Ins_Soldier_AA"];
+_u = _u + ["Ins_Soldier_Medic"];
+_f = [true,false,false,true];
+_p =0;
+{_get = _x Call GetNamespace;if (!isNil '_get') then {_p = _p + (_get select QUERYUNITPRICE)}} forEach _u;
+
+_alliesTeamTemplates = _alliesTeamTemplates + [_u];
+_alliesTeamTemplateRequires = _alliesTeamTemplateRequires + [_f];
+_alliesTeamTypes = _alliesTeamTypes + [3];
+_alliesTeamCost = _alliesTeamCost + [_p];
+
+['WFBE_EASTALLIESTEAMTEMPLATES',_alliesTeamTemplates,true] Call SetNamespace;
+['WFBE_EASTALLIESTEAMTEMPLATEREQUIRES',_alliesTeamTemplateRequires,true] Call SetNamespace;
+['WFBE_EASTALLIESTEAMTYPES',_alliesTeamTypes,true] Call SetNamespace;
+['WFBE_EASTALLIESTEAMCOST',_alliesTeamCost,true] Call SetNamespace; \ No newline at end of file
diff --git a/Server/Config/Config_Civilians.sqf b/Server/Config/Config_Civilians.sqf
new file mode 100644
index 0000000..48a62a8
--- /dev/null
+++ b/Server/Config/Config_Civilians.sqf
@@ -0,0 +1,139 @@
+/*
+ 3 levels of civilians, villagers, citizen and large citizen (keep them).
+ keep the same _n name
+*/
+
+
+Private ['_civType','_n','_u'];
+_civType = ('WFBE_CIVILIANFACTIONS' Call GetNamespace) select ('WFBE_CIVILIANFACTION' Call GetNamespace);
+
+if (_civType == 'Chernarus Civilians') then {
+ _n = ["Villagers1"];
+ _u = ["Villager1"];
+ _u = _u + ["Woodlander1"];
+ _u = _u + ["Worker1"];
+ [Format["WFBE_CIV%1UNITS",_n select (count _n - 1)],_u,true] Call SetNamespace;
+
+ _n = _n + ["Villagers2"];
+ _u = ["Villager4"];
+ _u = _u + ["Woodlander2"];
+ _u = _u + ["Farmwife1"];
+ [Format["WFBE_CIV%1UNITS",_n select (count _n - 1)],_u,true] Call SetNamespace;
+
+ _n = _n + ["Villagers3"];
+ _u = ["Villager2"];
+ _u = _u + ["WorkWoman3"];
+ [Format["WFBE_CIV%1UNITS",_n select (count _n - 1)],_u,true] Call SetNamespace;
+
+ _n = _n + ["Villagers4"];
+ _u = ["Villager2"];
+ _u = _u + ["WorkWoman3"];
+ _u = _u + ["Worker3"];
+ [Format["WFBE_CIV%1UNITS",_n select (count _n - 1)],_u,true] Call SetNamespace;
+
+ _n = _n + ["Citizen1"];
+ _u = ["Citizen2"];
+ _u = _u + ["Profiteer3"];
+ [Format["WFBE_CIV%1UNITS",_n select (count _n - 1)],_u,true] Call SetNamespace;
+
+ _n = _n + ["Citizen2"];
+ _u = ["Rocker2"];
+ _u = _u + ["Citizen4"];
+ [Format["WFBE_CIV%1UNITS",_n select (count _n - 1)],_u,true] Call SetNamespace;
+
+ _n = _n + ["Citizen3"];
+ _u = ["WorkWoman5"];
+ _u = _u + ["Citizen3"];
+ [Format["WFBE_CIV%1UNITS",_n select (count _n - 1)],_u,true] Call SetNamespace;
+
+ _n = _n + ["Citizen4"];
+ _u = ["Damsel2"];
+ _u = _u + ["Madam5"];
+ [Format["WFBE_CIV%1UNITS",_n select (count _n - 1)],_u,true] Call SetNamespace;
+
+ _n = _n + ["LargeCitizen1"];
+ _u = ["SchoolTeacher"];
+ _u = _u + ["Functionary1"];
+ [Format["WFBE_CIV%1UNITS",_n select (count _n - 1)],_u,true] Call SetNamespace;
+
+ _n = _n + ["LargeCitizen2"];
+ _u = ["Assistant"];
+ _u = _u + ["Secretary3"];
+ [Format["WFBE_CIV%1UNITS",_n select (count _n - 1)],_u,true] Call SetNamespace;
+
+ _n = _n + ["LargeCitizen3"];
+ _u = ["Worker3"];
+ _u = _u + ["Hooker1"];
+ [Format["WFBE_CIV%1UNITS",_n select (count _n - 1)],_u,true] Call SetNamespace;
+
+ _n = _n + ["LargeCitizen4"];
+ _u = ["Citizen3"];
+ _u = _u + ["Villager2"];
+ [Format["WFBE_CIV%1UNITS",_n select (count _n - 1)],_u,true] Call SetNamespace;
+};
+
+if (_civType == 'Takistan Civilians') then {
+ _n = ["Villagers1"];
+ _u = ["TK_CIV_Takistani02_EP1"];
+ _u = _u + ["TK_CIV_Takistani03_EP1"];
+ _u = _u + ["TK_CIV_Takistani06_EP1"];
+ [Format["WFBE_CIV%1UNITS",_n select (count _n - 1)],_u,true] Call SetNamespace;
+
+ _n = _n + ["Villagers2"];
+ _u = ["TK_CIV_Worker01_EP1"];
+ _u = _u + ["TK_CIV_Woman02_EP1"];
+ _u = _u + ["TK_CIV_Takistani06_EP1"];
+ [Format["WFBE_CIV%1UNITS",_n select (count _n - 1)],_u,true] Call SetNamespace;
+
+ _n = _n + ["Villagers3"];
+ _u = ["TK_CIV_Takistani05_EP1"];
+ _u = _u + ["TK_CIV_Takistani01_EP1"];
+ [Format["WFBE_CIV%1UNITS",_n select (count _n - 1)],_u,true] Call SetNamespace;
+
+ _n = _n + ["Villagers4"];
+ _u = ["TK_CIV_Woman01_EP1"];
+ _u = _u + ["TK_CIV_Takistani04_EP1"];
+ [Format["WFBE_CIV%1UNITS",_n select (count _n - 1)],_u,true] Call SetNamespace;
+
+ _n = _n + ["Citizen1"];
+ _u = ["TK_CIV_Worker02_EP1"];
+ _u = _u + ["CIV_EuroMan01_EP1"];
+ [Format["WFBE_CIV%1UNITS",_n select (count _n - 1)],_u,true] Call SetNamespace;
+
+ _n = _n + ["Citizen2"];
+ _u = ["CIV_EuroMan01_EP1"];
+ _u = _u + ["CIV_EuroMan02_EP1"];
+ [Format["WFBE_CIV%1UNITS",_n select (count _n - 1)],_u,true] Call SetNamespace;
+
+ _n = _n + ["Citizen3"];
+ _u = ["TK_CIV_Takistani06_EP1"];
+ _u = _u + ["TK_CIV_Takistani03_EP1"];
+ [Format["WFBE_CIV%1UNITS",_n select (count _n - 1)],_u,true] Call SetNamespace;
+
+ _n = _n + ["Citizen4"];
+ _u = ["TK_CIV_Takistani04_EP1"];
+ _u = _u + ["TK_CIV_Takistani05_EP1"];
+ [Format["WFBE_CIV%1UNITS",_n select (count _n - 1)],_u,true] Call SetNamespace;
+
+ _n = _n + ["LargeCitizen1"];
+ _u = ["TK_CIV_Woman03_EP1"];
+ _u = _u + ["TK_CIV_Woman03_EP1"];
+ [Format["WFBE_CIV%1UNITS",_n select (count _n - 1)],_u,true] Call SetNamespace;
+
+ _n = _n + ["LargeCitizen2"];
+ _u = ["TK_CIV_Takistani01_EP1"];
+ _u = _u + ["TK_CIV_Takistani05_EP1"];
+ [Format["WFBE_CIV%1UNITS",_n select (count _n - 1)],_u,true] Call SetNamespace;
+
+ _n = _n + ["LargeCitizen3"];
+ _u = ["TK_CIV_Takistani02_EP1"];
+ _u = _u + ["TK_CIV_Woman01_EP1"];
+ [Format["WFBE_CIV%1UNITS",_n select (count _n - 1)],_u,true] Call SetNamespace;
+
+ _n = _n + ["LargeCitizen4"];
+ _u = ["TK_CIV_Takistani03_EP1"];
+ _u = _u + ["TK_CIV_Takistani02_EP1"];
+ [Format["WFBE_CIV%1UNITS",_n select (count _n - 1)],_u,true] Call SetNamespace;
+};
+
+diag_log Format["[WFBE (INIT)][frameno:%1 | ticktime:%2] Config_Civilians: Intialization - [Done]",diag_frameno,diag_tickTime]; \ No newline at end of file
diff --git a/Server/Config/Config_HugeTown.sqf b/Server/Config/Config_HugeTown.sqf
new file mode 100644
index 0000000..4badb39
--- /dev/null
+++ b/Server/Config/Config_HugeTown.sqf
@@ -0,0 +1,13 @@
+Private ['_probability','_range','_teams','_town','_townName'];
+
+_town = _this Select 0;
+_townName = _this Select 1;
+
+_range = 600;
+if (Count _this > 3) then {_range = _this Select 3};
+
+_teams = ['huge1'] Call Compile preprocessFile "Server\Functions\Server_SelectResTeam.sqf";
+
+_probability = 55;
+
+[_town,_townName,30,120,_range,_teams,_probability] ExecVM "Common\Init\Init_Location.sqf"; \ No newline at end of file
diff --git a/Server/Config/Config_HugeTown2.sqf b/Server/Config/Config_HugeTown2.sqf
new file mode 100644
index 0000000..13e39c0
--- /dev/null
+++ b/Server/Config/Config_HugeTown2.sqf
@@ -0,0 +1,13 @@
+Private ['_probability','_range','_teams','_town','_townName'];
+
+_town = _this Select 0;
+_townName = _this Select 1;
+
+_range = 600;
+if (Count _this > 3) then {_range = _this Select 3};
+
+_teams = ['huge2'] Call Compile preprocessFile "Server\Functions\Server_SelectResTeam.sqf";
+
+_probability = 60;
+
+[_town,_townName,30,120,_range,_teams,_probability] ExecVM "Common\Init\Init_Location.sqf"; \ No newline at end of file
diff --git a/Server/Config/Config_LargeTown.sqf b/Server/Config/Config_LargeTown.sqf
new file mode 100644
index 0000000..5a06682
--- /dev/null
+++ b/Server/Config/Config_LargeTown.sqf
@@ -0,0 +1,13 @@
+Private ['_probability','_range','_teams','_town','_townName'];
+
+_town = _this Select 0;
+_townName = _this Select 1;
+
+_range = 600;
+if (Count _this > 3) then {_range = _this Select 3};
+
+_teams = ['large1'] Call Compile preprocessFile "Server\Functions\Server_SelectResTeam.sqf";
+
+_probability = 65;
+
+[_town,_townName,20,80,_range,_teams,_probability] ExecVM "Common\Init\Init_Location.sqf"; \ No newline at end of file
diff --git a/Server/Config/Config_LargeTown2.sqf b/Server/Config/Config_LargeTown2.sqf
new file mode 100644
index 0000000..c9df7bc
--- /dev/null
+++ b/Server/Config/Config_LargeTown2.sqf
@@ -0,0 +1,13 @@
+Private ['_probability','_range','_teams','_town','_townName'];
+
+_town = _this Select 0;
+_townName = _this Select 1;
+
+_range = 600;
+if (Count _this > 3) then {_range = _this Select 3};
+
+_teams = ['large2'] Call Compile preprocessFile "Server\Functions\Server_SelectResTeam.sqf";
+
+_probability = 60;
+
+[_town,_townName,20,80,_range,_teams,_probability] ExecVM "Common\Init\Init_Location.sqf"; \ No newline at end of file
diff --git a/Server/Config/Config_MediumTown.sqf b/Server/Config/Config_MediumTown.sqf
new file mode 100644
index 0000000..5d20450
--- /dev/null
+++ b/Server/Config/Config_MediumTown.sqf
@@ -0,0 +1,13 @@
+Private ['_probability','_range','_teams','_town','_townName'];
+
+_town = _this Select 0;
+_townName = _this Select 1;
+
+_range = 600;
+if (Count _this > 3) then {_range = _this Select 3};
+
+_teams = ['medium1'] Call Compile preprocessFile "Server\Functions\Server_SelectResTeam.sqf";
+
+_probability = 65;
+
+[_town,_townName,10,50,_range,_teams,_probability] ExecVM "Common\Init\Init_Location.sqf"; \ No newline at end of file
diff --git a/Server/Config/Config_MediumTown1Tank.sqf b/Server/Config/Config_MediumTown1Tank.sqf
new file mode 100644
index 0000000..582995a
--- /dev/null
+++ b/Server/Config/Config_MediumTown1Tank.sqf
@@ -0,0 +1,13 @@
+Private ['_probability','_range','_teams','_town','_townName'];
+
+_town = _this Select 0;
+_townName = _this Select 1;
+
+_range = 600;
+if (Count _this > 3) then {_range = _this Select 3};
+
+_teams = ['medium4'] Call Compile preprocessFile "Server\Functions\Server_SelectResTeam.sqf";
+
+_probability = 65;
+
+[_town,_townName,10,60,_range,_teams,_probability] ExecVM "Common\Init\Init_Location.sqf"; \ No newline at end of file
diff --git a/Server/Config/Config_MediumTown2.sqf b/Server/Config/Config_MediumTown2.sqf
new file mode 100644
index 0000000..373f491
--- /dev/null
+++ b/Server/Config/Config_MediumTown2.sqf
@@ -0,0 +1,13 @@
+Private ['_probability','_range','_teams','_town','_townName'];
+
+_town = _this Select 0;
+_townName = _this Select 1;
+
+_range = 600;
+if (Count _this > 3) then {_range = _this Select 3};
+
+_teams = ['medium2'] Call Compile preprocessFile "Server\Functions\Server_SelectResTeam.sqf";
+
+_probability = 75;
+
+[_town,_townName,10,50,_range,_teams,_probability] ExecVM "Common\Init\Init_Location.sqf"; \ No newline at end of file
diff --git a/Server/Config/Config_MediumTown2Tank.sqf b/Server/Config/Config_MediumTown2Tank.sqf
new file mode 100644
index 0000000..8301036
--- /dev/null
+++ b/Server/Config/Config_MediumTown2Tank.sqf
@@ -0,0 +1,13 @@
+Private ['_probability','_range','_teams','_town','_townName'];
+
+_town = _this Select 0;
+_townName = _this Select 1;
+
+_range = 600;
+if (Count _this > 3) then {_range = _this Select 3};
+
+_teams = ['medium3'] Call Compile preprocessFile "Server\Functions\Server_SelectResTeam.sqf";
+
+_probability = 70;
+
+[_town,_townName,10,60,_range,_teams,_probability] ExecVM "Common\Init\Init_Location.sqf"; \ No newline at end of file
diff --git a/Server/Config/Config_Occupation.sqf b/Server/Config/Config_Occupation.sqf
new file mode 100644
index 0000000..35bdb8b
--- /dev/null
+++ b/Server/Config/Config_Occupation.sqf
@@ -0,0 +1,925 @@
+
+private ["_n","_u"];
+if (WF_A2_Vanilla) then {
+ //--- West.
+ _n = ["SmallTeam1"];
+ _u = ["USMC_Soldier_SL"];
+ _u = _u + ["USMC_Soldier_TL"];
+ _u = _u + ["USMC_Soldier_AR"];
+ _u = _u + ["USMC_Soldier"];
+ [Format["WFBE_WEST%1UNITS",_n select (count _n - 1)],_u,true] Call SetNamespace;
+
+ _n = _n + ["SmallTeam2"];
+ _u = ["USMC_Soldier_TL"];
+ _u = _u + ["USMC_Soldier_AR"];
+ _u = _u + ["USMC_Soldier_LAT"];
+ _u = _u + ["USMC_Soldier_Medic"];
+ [Format["WFBE_WEST%1UNITS",_n select (count _n - 1)],_u,true] Call SetNamespace;
+
+ _n = _n + ["SmallTeam3"];
+ _u = ["USMC_Soldier_TL"];
+ _u = _u + ["USMC_Soldier_MG"];
+ _u = _u + ["USMC_Soldier_AR"];
+ _u = _u + ["USMC_Soldier_LAT"];
+ [Format["WFBE_WEST%1UNITS",_n select (count _n - 1)],_u,true] Call SetNamespace;
+
+ _n = _n + ["SmallVehTeam1"];
+ _u = ["USMC_Soldier_TL"];
+ _u = _u + ["HMMWV_Avenger"];
+ _u = _u + ["HMMWV_Armored"];
+ [Format["WFBE_WEST%1UNITS",_n select (count _n - 1)],_u,true] Call SetNamespace;
+
+ _n = _n + ["SmallVehTeam2"];
+ _u = ["USMC_Soldier_SL"];
+ _u = _u + ["HMMWV_TOW"];
+ _u = _u + ["LAV25"];
+ [Format["WFBE_WEST%1UNITS",_n select (count _n - 1)],_u,true] Call SetNamespace;
+
+ _n = _n + ["SmallVehTeam3"];
+ _u = ["USMC_Soldier_TL"];
+ _u = _u + ["HMMWV_Avenger"];
+ _u = _u + ["HMMWV_MK19"];
+ [Format["WFBE_WEST%1UNITS",_n select (count _n - 1)],_u,true] Call SetNamespace;
+
+ _n = _n + ["MediumTeam1"];
+ _u = ["USMC_Soldier_TL"];
+ _u = _u + ["USMC_Soldier_AR"];
+ _u = _u + ["USMC_Soldier_Medic"];
+ _u = _u + ["USMC_Soldier_AA"];
+ _u = _u + ["USMC_Soldier_AA"];
+ [Format["WFBE_WEST%1UNITS",_n select (count _n - 1)],_u,true] Call SetNamespace;
+
+ _n = _n + ["MediumTeam2"];
+ _u = ["USMC_Soldier_TL"];
+ _u = _u + ["USMC_Soldier_AA"];
+ _u = _u + ["USMC_Soldier_AA"];
+ _u = _u + ["USMC_Soldier_LAT"];
+ _u = _u + ["USMC_Soldier_AT"];
+ _u = _u + ["USMC_Soldier_AR"];
+ _u = _u + ["USMC_Soldier_MG"];
+ [Format["WFBE_WEST%1UNITS",_n select (count _n - 1)],_u,true] Call SetNamespace;
+
+ _n = _n + ["MediumTeam3"];
+ _u = ["USMC_SoldierS_Sniper"];
+ _u = _u + ["USMC_SoldierS_Spotter"];
+ _u = _u + ["USMC_SoldierS_Spotter"];
+ _u = _u + ["USMC_SoldierS"];
+ _u = _u + ["USMC_SoldierS"];
+ [Format["WFBE_WEST%1UNITS",_n select (count _n - 1)],_u,true] Call SetNamespace;
+
+ _n = _n + ["MediumVehTeam1"];
+ _u = ["USMC_Soldier_TL"];
+ _u = _u + ["HMMWV_Avenger"];
+ _u = _u + ["AAV"];
+ _u = _u + ["LAV25"];
+ [Format["WFBE_WEST%1UNITS",_n select (count _n - 1)],_u,true] Call SetNamespace;
+
+ _n = _n + ["MediumVehTeam2"];
+ _u = ["USMC_Soldier_TL"];
+ _u = _u + ["M1A1"];
+ _u = _u + ["M1A1"];
+ _u = _u + ["HMMWV_Ambulance"];
+ [Format["WFBE_WEST%1UNITS",_n select (count _n - 1)],_u,true] Call SetNamespace;
+
+ _n = _n + ["MediumVehTeam3"];
+ _u = ["USMC_Soldier_TL"];
+ _u = _u + ["AAV"];
+ _u = _u + ["HMMWV_M2"];
+ _u = _u + ["M1A1"];
+ [Format["WFBE_WEST%1UNITS",_n select (count _n - 1)],_u,true] Call SetNamespace;
+
+ _n = _n + ["LargeTeam1"];
+ _u = ["USMC_Soldier_HAT"];
+ _u = _u + ["USMC_Soldier_AT"];
+ _u = _u + ["USMC_Soldier_HAT"];
+ _u = _u + ["USMC_Soldier_HAT"];
+ _u = _u + ["USMC_Soldier_HAT"];
+ _u = _u + ["USMC_Soldier"];
+ [Format["WFBE_WEST%1UNITS",_n select (count _n - 1)],_u,true] Call SetNamespace;
+
+ _n = _n + ["LargeTeam2"];
+ _u = ["FR_TL"];
+ _u = _u + ["FR_AR"];
+ _u = _u + ["FR_GL"];
+ _u = _u + ["FR_Marksman"];
+ _u = _u + ["FR_R"];
+ _u = _u + ["FR_Corpsman"];
+ _u = _u + ["FR_Sapper"];
+ _u = _u + ["FR_AC"];
+ [Format["WFBE_WEST%1UNITS",_n select (count _n - 1)],_u,true] Call SetNamespace;
+
+ _n = _n + ["LargeTeam3"];
+ _u = ["USMC_Soldier_TL"];
+ _u = _u + ["USMC_Soldier_AA"];
+ _u = _u + ["USMC_Soldier_AA"];
+ _u = _u + ["USMC_Soldier_Medic"];
+ _u = _u + ["USMC_Soldier_GL"];
+ _u = _u + ["USMC_SoldierS_Sniper"];
+ _u = _u + ["USMC_Soldier_AT"];
+ _u = _u + ["USMC_Soldier_MG"];
+ _u = _u + ["USMC_Soldier_AR"];
+ _u = _u + ["USMC_Soldier_LAT"];
+ [Format["WFBE_WEST%1UNITS",_n select (count _n - 1)],_u,true] Call SetNamespace;
+
+ _n = _n + ["LargeVehTeam1"];
+ _u = ["USMC_Soldier_TL"];
+ _u = _u + ["M1A2_TUSK_MG"];
+ _u = _u + ["M1A2_TUSK_MG"];
+ _u = _u + ["M1A2_TUSK_MG"];
+ _u = _u + ["M1A2_TUSK_MG"];
+ [Format["WFBE_WEST%1UNITS",_n select (count _n - 1)],_u,true] Call SetNamespace;
+
+ _n = _n + ["LargeVehTeam2"];
+ _u = ["USMC_Soldier_TL"];
+ _u = _u + ["M1A2_TUSK_MG"];
+ _u = _u + ["M1A2_TUSK_MG"];
+ _u = _u + ["MLRS"];
+ _u = _u + ["M1A2_TUSK_MG"];
+ [Format["WFBE_WEST%1UNITS",_n select (count _n - 1)],_u,true] Call SetNamespace;
+
+ _n = _n + ["LargeVehTeam3"];
+ _u = ["USMC_Soldier_TL"];
+ _u = _u + ["M1A2_TUSK_MG"];
+ _u = _u + ["M1A2_TUSK_MG"];
+ _u = _u + ["M1A2_TUSK_MG"];
+ _u = _u + ["AAV"];
+ [Format["WFBE_WEST%1UNITS",_n select (count _n - 1)],_u,true] Call SetNamespace;
+
+ //--- East.
+ _n = ["SmallTeam1"];
+ _u = ["RU_Soldier_SL"];
+ _u = _u + ["RU_Soldier_MG"];
+ _u = _u + ["RU_Soldier_AT"];
+ _u = _u + ["RU_Soldier"];
+ [Format["WFBE_EAST%1UNITS",_n select (count _n - 1)],_u,true] Call SetNamespace;
+
+ _n = _n + ["SmallTeam2"];
+ _u = ["RU_Soldier_SL"];
+ _u = _u + ["RU_Soldier_LAT"];
+ _u = _u + ["RU_Soldier_Marksman"];
+ _u = _u + ["RU_Soldier_AR"];
+ _u = _u + ["RU_Soldier_GL"];
+ [Format["WFBE_EAST%1UNITS",_n select (count _n - 1)],_u,true] Call SetNamespace;
+
+ _n = _n + ["SmallTeam3"];
+ _u = ["RU_Soldier_TL"];
+ _u = _u + ["RU_Soldier_MG"];
+ _u = _u + ["RU_Soldier_GL"];
+ _u = _u + ["RU_Soldier_AT"];
+ [Format["WFBE_EAST%1UNITS",_n select (count _n - 1)],_u,true] Call SetNamespace;
+
+ _n = _n + ["SmallVehTeam1"];
+ _u = ["RU_Soldier_SL"];
+ _u = _u + ["UAZ_AGS30_RU"];
+ _u = _u + ["GAZ_Vodnik"];
+ [Format["WFBE_EAST%1UNITS",_n select (count _n - 1)],_u,true] Call SetNamespace;
+
+ _n = _n + ["SmallVehTeam2"];
+ _u = ["RU_Soldier_SL"];
+ _u = _u + ["GAZ_Vodnik"];
+ _u = _u + ["GAZ_Vodnik_HMG"];
+ [Format["WFBE_EAST%1UNITS",_n select (count _n - 1)],_u,true] Call SetNamespace;
+
+ _n = _n + ["SmallVehTeam3"];
+ _u = ["RU_Soldier_SL"];
+ _u = _u + ["UAZ_AGS30_RU"];
+ _u = _u + ["GAZ_Vodnik_HMG"];
+ [Format["WFBE_EAST%1UNITS",_n select (count _n - 1)],_u,true] Call SetNamespace;
+
+ _n = _n + ["MediumTeam1"];
+ _u = ["RU_Soldier_SL"];
+ _u = _u + ["RU_Soldier_AA"];
+ _u = _u + ["RU_Soldier_LAT"];
+ _u = _u + ["RU_Soldier_AT"];
+ _u = _u + ["RU_Soldier"];
+ [Format["WFBE_EAST%1UNITS",_n select (count _n - 1)],_u,true] Call SetNamespace;
+
+ _n = _n + ["MediumTeam2"];
+ _u = ["RUS_Commander"];
+ _u = _u + ["RUS_Soldier1"];
+ _u = _u + ["RUS_Soldier2"];
+ _u = _u + ["RUS_Soldier_GL"];
+ _u = _u + ["RUS_Soldier_Marksman"];
+ _u = _u + ["RUS_Soldier3"];
+ _u = _u + ["RUS_Soldier_TL"];
+ [Format["WFBE_EAST%1UNITS",_n select (count _n - 1)],_u,true] Call SetNamespace;
+
+ _n = _n + ["MediumTeam3"];
+ _u = ["MVD_Soldier_TL"];
+ _u = _u + ["MVD_Soldier_MG"];
+ _u = _u + ["MVD_Soldier_AT"];
+ _u = _u + ["MVD_Soldier_GL"];
+ _u = _u + ["MVD_Soldier_Sniper"];
+ _u = _u + ["MVD_Soldier_Marksman"];
+ [Format["WFBE_EAST%1UNITS",_n select (count _n - 1)],_u,true] Call SetNamespace;
+
+ _n = _n + ["MediumVehTeam1"];
+ _u = ["RU_Soldier_TL"];
+ _u = _u + ["GAZ_Vodnik"];
+ _u = _u + ["BMP3"];
+ _u = _u + ["BTR90"];
+ [Format["WFBE_EAST%1UNITS",_n select (count _n - 1)],_u,true] Call SetNamespace;
+
+ _n = _n + ["MediumVehTeam2"];
+ _u = ["RU_Soldier_TL"];
+ _u = _u + ["T72_RU"];
+ _u = _u + ["T72_RU"];
+ _u = _u + ["GAZ_Vodnik_MedEvac"];
+ [Format["WFBE_EAST%1UNITS",_n select (count _n - 1)],_u,true] Call SetNamespace;
+
+ _n = _n + ["MediumVehTeam3"];
+ _u = ["RU_Soldier_TL"];
+ _u = _u + ["BMP3"];
+ _u = _u + ["GAZ_Vodnik_HMG"];
+ _u = _u + ["T72_RU"];
+ [Format["WFBE_EAST%1UNITS",_n select (count _n - 1)],_u,true] Call SetNamespace;
+
+ _n = _n + ["LargeTeam1"];
+ _u = ["RU_Soldier_HAT"];
+ _u = _u + ["RU_Soldier_HAT"];
+ _u = _u + ["RU_Soldier_HAT"];
+ _u = _u + ["RU_Soldier_AT"];
+ _u = _u + ["RU_Soldier"];
+ [Format["WFBE_EAST%1UNITS",_n select (count _n - 1)],_u,true] Call SetNamespace;
+
+ _n = _n + ["LargeTeam2"];
+ _u = ["RUS_Commander"];
+ _u = _u + ["RUS_Soldier1"];
+ _u = _u + ["RUS_Soldier2"];
+ _u = _u + ["RUS_Soldier_GL"];
+ _u = _u + ["RUS_Soldier_Marksman"];
+ _u = _u + ["RUS_Soldier3"];
+ _u = _u + ["RUS_Soldier_TL"];
+ [Format["WFBE_EAST%1UNITS",_n select (count _n - 1)],_u,true] Call SetNamespace;
+
+ _n = _n + ["LargeTeam3"];
+ _u = ["RU_Soldier_SL"];
+ _u = _u + ["RU_Soldier_MG"];
+ _u = _u + ["RU_Soldier_AT"];
+ _u = _u + ["RU_Soldier_LAT"];
+ _u = _u + ["RU_Soldier_Marksman"];
+ _u = _u + ["RU_Soldier_AR"];
+ _u = _u + ["RU_Soldier_GL"];
+ _u = _u + ["RU_Soldier"];
+ [Format["WFBE_EAST%1UNITS",_n select (count _n - 1)],_u,true] Call SetNamespace;
+
+ _n = _n + ["LargeVehTeam1"];
+ _u = ["RU_Soldier_TL"];
+ if (WF_ACE) then
+ {
+ _u = _u + ["ACE_T90"];
+
+ _u = _u + ["ACE_T90"];
+
+ _u = _u + ["ACE_T90"];
+ }
+ else
+ {
+ _u = _u + ["T90"];
+ _u = _u + ["T90"];
+ _u = _u + ["T90"];
+ };
+ _u = _u + ["T72_RU"];
+ [Format["WFBE_EAST%1UNITS",_n select (count _n - 1)],_u,true] Call SetNamespace;
+
+ _n = _n + ["LargeVehTeam2"];
+ _u = ["RU_Soldier_TL"];
+ if (WF_ACE) then
+ {
+ _u = _u + ["ACE_T90"];
+ }
+ else
+ {
+ _u = _u + ["T90"];
+ };
+ _u = _u + ["GRAD_RU"];
+ _u = _u + ["T72_RU"];
+ _u = _u + ["2S6M_Tunguska"];
+ [Format["WFBE_EAST%1UNITS",_n select (count _n - 1)],_u,true] Call SetNamespace;
+
+ _n = _n + ["LargeVehTeam3"];
+ _u = ["RU_Soldier_TL"];
+
+ if (WF_ACE) then
+ {
+ _u = _u + ["ACE_T90"];
+
+ _u = _u + ["ACE_T90"];
+ }
+ else
+ {
+ _u = _u + ["T90"];
+
+ _u = _u + ["T90"];
+ };
+
+ _u = _u + ["2S6M_Tunguska"];
+ _u = _u + ["T72_RU"];
+ [Format["WFBE_EAST%1UNITS",_n select (count _n - 1)],_u,true] Call SetNamespace;
+};
+
+if (WF_A2_Arrowhead) then {
+ //--- West.
+ _n = ["SmallTeam1"];
+ _u = ["US_Soldier_SL_EP1"];
+ _u = _u + ["US_Soldier_TL_EP1"];
+ _u = _u + ["US_Soldier_AR_EP1"];
+ _u = _u + ["US_Soldier_EP1"];
+ [Format["WFBE_WEST%1UNITS",_n select (count _n - 1)],_u,true] Call SetNamespace;
+
+ _n = _n + ["SmallTeam2"];
+ _u = ["US_Soldier_TL_EP1"];
+ _u = _u + ["US_Soldier_AR_EP1"];
+ _u = _u + ["US_Soldier_LAT_EP1"];
+ _u = _u + ["US_Soldier_Medic_EP1"];
+ [Format["WFBE_WEST%1UNITS",_n select (count _n - 1)],_u,true] Call SetNamespace;
+
+ _n = _n + ["SmallTeam3"];
+ _u = ["US_Soldier_TL_EP1"];
+ _u = _u + ["US_Soldier_MG_EP1"];
+ _u = _u + ["US_Soldier_AR_EP1"];
+ _u = _u + ["US_Soldier_LAT_EP1"];
+ [Format["WFBE_WEST%1UNITS",_n select (count _n - 1)],_u,true] Call SetNamespace;
+
+ _n = _n + ["SmallVehTeam1"];
+ _u = ["US_Soldier_TL_EP1"];
+ _u = _u + ["HMMWV_Avenger_DES_EP1"];
+ _u = _u + ["HMMWV_M1151_M2_DES_EP1"];
+ [Format["WFBE_WEST%1UNITS",_n select (count _n - 1)],_u,true] Call SetNamespace;
+
+ _n = _n + ["SmallVehTeam2"];
+ _u = ["US_Soldier_SL_EP1"];
+ _u = _u + ["HMMWV_TOW_DES_EP1"];
+ _u = _u + ["M1126_ICV_mk19_EP1"];
+ [Format["WFBE_WEST%1UNITS",_n select (count _n - 1)],_u,true] Call SetNamespace;
+
+ _n = _n + ["SmallVehTeam3"];
+ _u = ["US_Soldier_TL_EP1"];
+ _u = _u + ["HMMWV_Avenger_DES_EP1"];
+ _u = _u + ["HMMWV_M998_crows_MK19_DES_EP1"];
+ [Format["WFBE_WEST%1UNITS",_n select (count _n - 1)],_u,true] Call SetNamespace;
+
+ _n = _n + ["MediumTeam1"];
+ _u = ["US_Soldier_TL_EP1"];
+ _u = _u + ["US_Soldier_AR_EP1"];
+ _u = _u + ["US_Soldier_Medic_EP1"];
+ _u = _u + ["US_Soldier_AA_EP1"];
+ _u = _u + ["US_Soldier_AA_EP1"];
+ [Format["WFBE_WEST%1UNITS",_n select (count _n - 1)],_u,true] Call SetNamespace;
+
+ _n = _n + ["MediumTeam2"];
+ _u = ["US_Soldier_TL_EP1"];
+ _u = _u + ["US_Soldier_AA_EP1"];
+ _u = _u + ["US_Soldier_AA_EP1"];
+ _u = _u + ["US_Soldier_LAT_EP1"];
+ _u = _u + ["US_Soldier_AT_EP1"];
+ _u = _u + ["US_Soldier_AR_EP1"];
+ _u = _u + ["US_Soldier_MG_EP1"];
+ [Format["WFBE_WEST%1UNITS",_n select (count _n - 1)],_u,true] Call SetNamespace;
+
+ _n = _n + ["MediumTeam3"];
+ _u = ["US_Soldier_Sniper_EP1"];
+ _u = _u + ["US_Soldier_Marksman_EP1"];
+ _u = _u + ["US_Soldier_Marksman_EP1"];
+ _u = _u + ["US_Soldier_SniperH_EP1"];
+ _u = _u + ["US_Soldier_SniperH_EP1"];
+ [Format["WFBE_WEST%1UNITS",_n select (count _n - 1)],_u,true] Call SetNamespace;
+
+ _n = _n + ["MediumVehTeam1"];
+ _u = ["US_Soldier_TL_EP1"];
+ _u = _u + ["HMMWV_Avenger_DES_EP1"];
+ _u = _u + ["M2A3_EP1"];
+ _u = _u + ["M1126_ICV_M2_EP1"];
+ [Format["WFBE_WEST%1UNITS",_n select (count _n - 1)],_u,true] Call SetNamespace;
+
+ _n = _n + ["MediumVehTeam2"];
+ _u = ["US_Soldier_TL_EP1"];
+ _u = _u + ["M1A1_US_DES_EP1"];
+ _u = _u + ["M1A1_US_DES_EP1"];
+ _u = _u + ["HMMWV_Ambulance_DES_EP1"];
+ [Format["WFBE_WEST%1UNITS",_n select (count _n - 1)],_u,true] Call SetNamespace;
+
+ _n = _n + ["MediumVehTeam3"];
+ _u = ["US_Soldier_TL_EP1"];
+ _u = _u + ["M1126_ICV_M2_EP1"];
+ _u = _u + ["HMMWV_M998_crows_M2_DES_EP1"];
+ _u = _u + ["M1A1_US_DES_EP1"];
+ [Format["WFBE_WEST%1UNITS",_n select (count _n - 1)],_u,true] Call SetNamespace;
+
+ _n = _n + ["LargeTeam1"];
+ _u = ["US_Soldier_HAT_EP1"];
+ _u = _u + ["US_Soldier_AT_EP1"];
+ _u = _u + ["US_Soldier_HAT_EP1"];
+ _u = _u + ["US_Soldier_HAT_EP1"];
+ _u = _u + ["US_Soldier_HAT_EP1"];
+ _u = _u + ["US_Soldier_EP1"];
+ [Format["WFBE_WEST%1UNITS",_n select (count _n - 1)],_u,true] Call SetNamespace;
+
+ _n = _n + ["LargeTeam2"];
+ _u = ["US_Delta_Force_EP1"];
+ _u = _u + ["US_Delta_Force_AR_EP1"];
+ _u = _u + ["US_Delta_Force_SD_EP1"];
+ _u = _u + ["US_Delta_Force_Assault_EP1"];
+ _u = _u + ["US_Delta_Force_Marksman_EP1"];
+ _u = _u + ["US_Delta_Force_M14_EP1"];
+ _u = _u + ["US_Delta_Force_MG_EP1"];
+ _u = _u + ["US_Delta_Force_Medic_EP1"];
+ [Format["WFBE_WEST%1UNITS",_n select (count _n - 1)],_u,true] Call SetNamespace;
+
+ _n = _n + ["LargeTeam3"];
+ _u = ["US_Soldier_TL_EP1"];
+ _u = _u + ["US_Soldier_AA_EP1"];
+ _u = _u + ["US_Soldier_AA_EP1"];
+ _u = _u + ["US_Soldier_Medic_EP1"];
+ _u = _u + ["US_Soldier_GL_EP1"];
+ _u = _u + ["US_Soldier_Sniper_EP1"];
+ _u = _u + ["US_Soldier_AT_EP1"];
+ _u = _u + ["US_Soldier_MG_EP1"];
+ _u = _u + ["US_Soldier_AR_EP1"];
+ _u = _u + ["US_Soldier_LAT_EP1"];
+ [Format["WFBE_WEST%1UNITS",_n select (count _n - 1)],_u,true] Call SetNamespace;
+
+ _n = _n + ["LargeVehTeam1"];
+ _u = ["US_Soldier_TL_EP1"];
+ _u = _u + ["M1A2_US_TUSK_MG_EP1"];
+ _u = _u + ["M1A2_US_TUSK_MG_EP1"];
+ _u = _u + ["M1A2_US_TUSK_MG_EP1"];
+ _u = _u + ["M1A2_US_TUSK_MG_EP1"];
+ [Format["WFBE_WEST%1UNITS",_n select (count _n - 1)],_u,true] Call SetNamespace;
+
+ _n = _n + ["LargeVehTeam2"];
+ _u = ["US_Soldier_TL_EP1"];
+ _u = _u + ["M1A2_US_TUSK_MG_EP1"];
+ _u = _u + ["M1A2_US_TUSK_MG_EP1"];
+ _u = _u + ["MLRS_DES_EP1"];
+ _u = _u + ["M1A2_US_TUSK_MG_EP1"];
+ [Format["WFBE_WEST%1UNITS",_n select (count _n - 1)],_u,true] Call SetNamespace;
+
+ _n = _n + ["LargeVehTeam3"];
+ _u = ["US_Soldier_TL_EP1"];
+ _u = _u + ["M1A2_US_TUSK_MG_EP1"];
+ _u = _u + ["M1A2_US_TUSK_MG_EP1"];
+ _u = _u + ["M1A2_US_TUSK_MG_EP1"];
+ _u = _u + ["M6_EP1"];
+ [Format["WFBE_WEST%1UNITS",_n select (count _n - 1)],_u,true] Call SetNamespace;
+
+ //--- East.
+ _n = ["SmallTeam1"];
+ _u = ["TK_Soldier_SL_EP1"];
+ _u = _u + ["TK_Soldier_MG_EP1"];
+ _u = _u + ["TK_Soldier_AT_EP1"];
+ _u = _u + ["TK_Soldier_EP1"];
+ [Format["WFBE_EAST%1UNITS",_n select (count _n - 1)],_u,true] Call SetNamespace;
+
+ _n = _n + ["SmallTeam2"];
+ _u = ["TK_Soldier_SL_EP1"];
+ _u = _u + ["TK_Soldier_LAT_EP1"];
+ _u = _u + ["TK_Soldier_Spotter_EP1"];
+ _u = _u + ["TK_Soldier_AR_EP1"];
+ _u = _u + ["TK_Soldier_GL_EP1"];
+ [Format["WFBE_EAST%1UNITS",_n select (count _n - 1)],_u,true] Call SetNamespace;
+
+ _n = _n + ["SmallTeam3"];
+ _u = ["TK_Soldier_SL_EP1"];
+ _u = _u + ["TK_Soldier_MG_EP1"];
+ _u = _u + ["TK_Soldier_GL_EP1"];
+ _u = _u + ["TK_Soldier_AT_EP1"];
+ [Format["WFBE_EAST%1UNITS",_n select (count _n - 1)],_u,true] Call SetNamespace;
+
+ _n = _n + ["SmallVehTeam1"];
+ _u = ["TK_Soldier_SL_EP1"];
+ _u = _u + ["LandRover_MG_TK_EP1"];
+ _u = _u + ["BTR60_TK_EP1"];
+ [Format["WFBE_EAST%1UNITS",_n select (count _n - 1)],_u,true] Call SetNamespace;
+
+ _n = _n + ["SmallVehTeam2"];
+ _u = ["TK_Soldier_SL_EP1"];
+ _u = _u + ["BTR60_TK_EP1"];
+ _u = _u + ["BRDM2_TK_EP1"];
+ _u = _u + ["BRDM2_ATGM_TK_EP1"];
+ [Format["WFBE_EAST%1UNITS",_n select (count _n - 1)],_u,true] Call SetNamespace;
+
+ _n = _n + ["SmallVehTeam3"];
+ _u = ["TK_Soldier_SL_EP1"];
+ _u = _u + ["UAZ_AGS30_TK_EP1"];
+ _u = _u + ["BRDM2_TK_EP1"];
+ [Format["WFBE_EAST%1UNITS",_n select (count _n - 1)],_u,true] Call SetNamespace;
+
+ _n = _n + ["MediumTeam1"];
+ _u = ["TK_Soldier_SL_EP1"];
+ _u = _u + ["TK_Soldier_AA_EP1"];
+ _u = _u + ["TK_Soldier_LAT_EP1"];
+ _u = _u + ["TK_Soldier_AT_EP1"];
+ _u = _u + ["TK_Soldier_EP1"];
+ [Format["WFBE_EAST%1UNITS",_n select (count _n - 1)],_u,true] Call SetNamespace;
+
+ _n = _n + ["MediumTeam2"];
+ _u = ["TK_Special_Forces_TL_EP1"];
+ _u = _u + ["TK_Soldier_Medic_EP1"];
+ _u = _u + ["TK_Soldier_HAT_EP1"];
+ _u = _u + ["TK_Soldier_HAT_EP1"];
+ _u = _u + ["TK_Special_Forces_EP1"];
+ _u = _u + ["TK_Special_Forces_EP1"];
+ _u = _u + ["TK_Special_Forces_MG_EP1"];
+ [Format["WFBE_EAST%1UNITS",_n select (count _n - 1)],_u,true] Call SetNamespace;
+
+ _n = _n + ["MediumTeam3"];
+ _u = ["TK_Special_Forces_TL_EP1"];
+ _u = _u + ["TK_Soldier_Medic_EP1"];
+ _u = _u + ["TK_Soldier_SniperH_EP1"];
+ _u = _u + ["TK_Soldier_Sniper_Night_EP1"];
+ _u = _u + ["TK_Soldier_Night_1_EP1"];
+ _u = _u + ["TK_Soldier_Night_2_EP1"];
+ [Format["WFBE_EAST%1UNITS",_n select (count _n - 1)],_u,true] Call SetNamespace;
+
+ _n = _n + ["MediumVehTeam1"];
+ _u = ["TK_Soldier_SL_EP1"];
+ _u = _u + ["BMP2_TK_EP1"];
+ _u = _u + ["BMP2_TK_EP1"];
+ _u = _u + ["BTR60_TK_EP1"];
+ [Format["WFBE_EAST%1UNITS",_n select (count _n - 1)],_u,true] Call SetNamespace;
+
+ _n = _n + ["MediumVehTeam2"];
+ _u = ["TK_Soldier_SL_EP1"];
+ _u = _u + ["T72_TK_EP1"];
+ _u = _u + ["T72_TK_EP1"];
+ _u = _u + ["M113Ambul_TK_EP1"];
+ [Format["WFBE_EAST%1UNITS",_n select (count _n - 1)],_u,true] Call SetNamespace;
+
+ _n = _n + ["MediumVehTeam3"];
+ _u = ["TK_Soldier_SL_EP1"];
+ _u = _u + ["BMP2_TK_EP1"];
+ _u = _u + ["Ural_ZU23_TK_EP1"];
+ _u = _u + ["T72_TK_EP1"];
+ [Format["WFBE_EAST%1UNITS",_n select (count _n - 1)],_u,true] Call SetNamespace;
+
+ _n = _n + ["LargeTeam1"];
+ _u = ["TK_Soldier_HAT_EP1"];
+ _u = _u + ["TK_Soldier_HAT_EP1"];
+ _u = _u + ["TK_Soldier_HAT_EP1"];
+ _u = _u + ["TK_Soldier_AT_EP1"];
+ _u = _u + ["TK_Soldier_EP1"];
+ [Format["WFBE_EAST%1UNITS",_n select (count _n - 1)],_u,true] Call SetNamespace;
+
+ _n = _n + ["LargeTeam2"];
+ _u = ["TK_Special_Forces_TL_EP1"];
+ _u = _u + ["TK_Special_Forces_EP1"];
+ _u = _u + ["TK_Special_Forces_EP1"];
+ _u = _u + ["TK_Special_Forces_EP1"];
+ _u = _u + ["TK_Special_Forces_MG_EP1"];
+ _u = _u + ["TK_Special_Forces_MG_EP1"];
+ _u = _u + ["TK_Special_Forces_MG_EP1"];
+ [Format["WFBE_EAST%1UNITS",_n select (count _n - 1)],_u,true] Call SetNamespace;
+
+ _n = _n + ["LargeTeam3"];
+ _u = ["TK_Soldier_SL_EP1"];
+ _u = _u + ["TK_Soldier_MG_EP1"];
+ _u = _u + ["TK_Soldier_AT_EP1"];
+ _u = _u + ["TK_Soldier_LAT_EP1"];
+ _u = _u + ["TK_Soldier_Spotter_EP1"];
+ _u = _u + ["TK_Soldier_AR_EP1"];
+ _u = _u + ["TK_Soldier_GL_EP1"];
+ _u = _u + ["TK_Soldier_EP1"];
+ [Format["WFBE_EAST%1UNITS",_n select (count _n - 1)],_u,true] Call SetNamespace;
+
+ _n = _n + ["LargeVehTeam1"];
+ _u = ["TK_Soldier_SL_EP1"];
+ _u = _u + ["T55_TK_EP1"];
+ _u = _u + ["T72_TK_EP1"];
+ _u = _u + ["T72_TK_EP1"];
+ _u = _u + ["T72_TK_EP1"];
+ [Format["WFBE_EAST%1UNITS",_n select (count _n - 1)],_u,true] Call SetNamespace;
+
+ _n = _n + ["LargeVehTeam2"];
+ _u = ["TK_Soldier_SL_EP1"];
+ _u = _u + ["T55_TK_EP1"];
+ _u = _u + ["T55_TK_EP1"];
+ _u = _u + ["T72_TK_EP1"];
+ _u = _u + ["ZSU_TK_EP1"];
+ [Format["WFBE_EAST%1UNITS",_n select (count _n - 1)],_u,true] Call SetNamespace;
+
+ _n = _n + ["LargeVehTeam3"];
+ _u = ["TK_Soldier_SL_EP1"];
+ _u = _u + ["T72_TK_EP1"];
+ _u = _u + ["T72_TK_EP1"];
+ _u = _u + ["T72_TK_EP1"];
+ _u = _u + ["ZSU_TK_EP1"];
+ _u = _u + ["T72_TK_EP1"];
+ [Format["WFBE_EAST%1UNITS",_n select (count _n - 1)],_u,true] Call SetNamespace;
+};
+
+if (WF_A2_CombinedOps) then {
+ //--- West.
+ _n = ["SmallTeam1"];
+ _u = ["US_Soldier_SL_EP1"];
+ _u = _u + ["US_Soldier_TL_EP1"];
+ _u = _u + ["US_Soldier_AR_EP1"];
+ _u = _u + ["US_Soldier_EP1"];
+ [Format["WFBE_WEST%1UNITS",_n select (count _n - 1)],_u,true] Call SetNamespace;
+
+ _n = _n + ["SmallTeam2"];
+ _u = ["US_Soldier_TL_EP1"];
+ _u = _u + ["US_Soldier_AR_EP1"];
+ _u = _u + ["US_Soldier_LAT_EP1"];
+ _u = _u + ["US_Soldier_Medic_EP1"];
+ [Format["WFBE_WEST%1UNITS",_n select (count _n - 1)],_u,true] Call SetNamespace;
+
+ _n = _n + ["SmallTeam3"];
+ _u = ["US_Soldier_TL_EP1"];
+ _u = _u + ["US_Soldier_MG_EP1"];
+ _u = _u + ["US_Soldier_AR_EP1"];
+ _u = _u + ["US_Soldier_LAT_EP1"];
+ [Format["WFBE_WEST%1UNITS",_n select (count _n - 1)],_u,true] Call SetNamespace;
+
+ _n = _n + ["SmallVehTeam1"];
+ _u = ["US_Soldier_TL_EP1"];
+ _u = _u + [if (WF_Camo) then {"HMMWV_Avenger"} else {"HMMWV_Avenger_DES_EP1"}];
+ _u = _u + [if (WF_Camo) then {"HMMWV_M2"} else {"HMMWV_M1151_M2_DES_EP1"}];
+ [Format["WFBE_WEST%1UNITS",_n select (count _n - 1)],_u,true] Call SetNamespace;
+
+ _n = _n + ["SmallVehTeam2"];
+ _u = ["US_Soldier_SL_EP1"];
+ _u = _u + [if (WF_Camo) then {"LAV25"} else {"M1126_ICV_mk19_EP1"}];
+ _u = _u + [if (WF_Camo) then {"HMMWV_TOW"} else {"HMMWV_TOW_DES_EP1"}];
+ [Format["WFBE_WEST%1UNITS",_n select (count _n - 1)],_u,true] Call SetNamespace;
+
+ _n = _n + ["SmallVehTeam3"];
+ _u = ["US_Soldier_TL_EP1"];
+ _u = _u + [if (WF_Camo) then {"HMMWV_Avenger"} else {"HMMWV_Avenger_DES_EP1"}];
+ _u = _u + [if (WF_Camo) then {"HMMWV_MK19"} else {"HMMWV_M998_crows_MK19_DES_EP1"}];
+ [Format["WFBE_WEST%1UNITS",_n select (count _n - 1)],_u,true] Call SetNamespace;
+
+ _n = _n + ["MediumTeam1"];
+ _u = ["US_Soldier_TL_EP1"];
+ _u = _u + ["US_Soldier_AR_EP1"];
+ _u = _u + ["US_Soldier_Medic_EP1"];
+ _u = _u + ["US_Soldier_AA_EP1"];
+ _u = _u + ["US_Soldier_AA_EP1"];
+ [Format["WFBE_WEST%1UNITS",_n select (count _n - 1)],_u,true] Call SetNamespace;
+
+ _n = _n + ["MediumTeam2"];
+ _u = ["US_Soldier_TL_EP1"];
+ _u = _u + ["US_Soldier_AA_EP1"];
+ _u = _u + ["US_Soldier_AA_EP1"];
+ _u = _u + ["US_Soldier_LAT_EP1"];
+ _u = _u + ["US_Soldier_AT_EP1"];
+ _u = _u + ["US_Soldier_AR_EP1"];
+ _u = _u + ["US_Soldier_MG_EP1"];
+ [Format["WFBE_WEST%1UNITS",_n select (count _n - 1)],_u,true] Call SetNamespace;
+
+ _n = _n + ["MediumTeam3"];
+ _u = ["US_Soldier_Sniper_EP1"];
+ _u = _u + ["US_Soldier_Marksman_EP1"];
+ _u = _u + ["US_Soldier_Marksman_EP1"];
+ _u = _u + ["US_Soldier_SniperH_EP1"];
+ _u = _u + ["US_Soldier_SniperH_EP1"];
+ [Format["WFBE_WEST%1UNITS",_n select (count _n - 1)],_u,true] Call SetNamespace;
+
+ _n = _n + ["MediumVehTeam1"];
+ _u = ["US_Soldier_TL_EP1"];
+ _u = _u + [if (WF_Camo) then {"HMMWV_Avenger"} else {"HMMWV_Avenger_DES_EP1"}];
+ _u = _u + ["M2A3_EP1"];
+ _u = _u + [if (WF_Camo) then {"AAV"} else {"M1126_ICV_M2_EP1"}];
+ [Format["WFBE_WEST%1UNITS",_n select (count _n - 1)],_u,true] Call SetNamespace;
+
+ _n = _n + ["MediumVehTeam2"];
+ _u = ["US_Soldier_TL_EP1"];
+ _u = _u + [if (WF_Camo) then {"M1A1"} else {"M1A1_US_DES_EP1"}];
+ _u = _u + [if (WF_Camo) then {"M1A1"} else {"M1A1_US_DES_EP1"}];
+ _u = _u + [if (WF_Camo) then {"HMMWV_Ambulance"} else {"HMMWV_Ambulance_DES_EP1"}];
+ [Format["WFBE_WEST%1UNITS",_n select (count _n - 1)],_u,true] Call SetNamespace;
+
+ _n = _n + ["MediumVehTeam3"];
+ _u = ["US_Soldier_TL_EP1"];
+ _u = _u + [if (WF_Camo) then {"AAV"} else {"M1126_ICV_M2_EP1"}];
+ _u = _u + [if (WF_Camo) then {"HMMWV_Armored"} else {"HMMWV_M998_crows_M2_DES_EP1"}];
+ _u = _u + [if (WF_Camo) then {"M1A1"} else {"M1A1_US_DES_EP1"}];
+ [Format["WFBE_WEST%1UNITS",_n select (count _n - 1)],_u,true] Call SetNamespace;
+
+ _n = _n + ["LargeTeam1"];
+ _u = ["US_Soldier_HAT_EP1"];
+ _u = _u + ["US_Soldier_AT_EP1"];
+ _u = _u + ["US_Soldier_HAT_EP1"];
+ _u = _u + ["US_Soldier_HAT_EP1"];
+ _u = _u + ["US_Soldier_HAT_EP1"];
+ _u = _u + ["US_Soldier_EP1"];
+ [Format["WFBE_WEST%1UNITS",_n select (count _n - 1)],_u,true] Call SetNamespace;
+
+ _n = _n + ["LargeTeam2"];
+ _u = ["US_Delta_Force_EP1"];
+ _u = _u + ["US_Delta_Force_AR_EP1"];
+ _u = _u + ["US_Delta_Force_SD_EP1"];
+ _u = _u + ["US_Delta_Force_Assault_EP1"];
+ _u = _u + ["US_Delta_Force_Marksman_EP1"];
+ _u = _u + ["US_Delta_Force_M14_EP1"];
+ _u = _u + ["US_Delta_Force_MG_EP1"];
+ _u = _u + ["US_Delta_Force_Medic_EP1"];
+ [Format["WFBE_WEST%1UNITS",_n select (count _n - 1)],_u,true] Call SetNamespace;
+
+ _n = _n + ["LargeTeam3"];
+ _u = ["US_Soldier_TL_EP1"];
+ _u = _u + ["US_Soldier_AA_EP1"];
+ _u = _u + ["US_Soldier_AA_EP1"];
+ _u = _u + ["US_Soldier_Medic_EP1"];
+ _u = _u + ["US_Soldier_GL_EP1"];
+ _u = _u + ["US_Soldier_Sniper_EP1"];
+ _u = _u + ["US_Soldier_AT_EP1"];
+ _u = _u + ["US_Soldier_MG_EP1"];
+ _u = _u + ["US_Soldier_AR_EP1"];
+ _u = _u + ["US_Soldier_LAT_EP1"];
+ [Format["WFBE_WEST%1UNITS",_n select (count _n - 1)],_u,true] Call SetNamespace;
+
+ _n = _n + ["LargeVehTeam1"];
+ _u = ["US_Soldier_TL_EP1"];
+ _u = _u + [if (WF_Camo) then {"M1A2_TUSK_MG"} else {"M1A2_US_TUSK_MG_EP1"}];
+ _u = _u + [if (WF_Camo) then {"M1A2_TUSK_MG"} else {"M1A2_US_TUSK_MG_EP1"}];
+ _u = _u + [if (WF_Camo) then {"M1A2_TUSK_MG"} else {"M1A2_US_TUSK_MG_EP1"}];
+ _u = _u + [if (WF_Camo) then {"M1A2_TUSK_MG"} else {"M1A2_US_TUSK_MG_EP1"}];
+ [Format["WFBE_WEST%1UNITS",_n select (count _n - 1)],_u,true] Call SetNamespace;
+
+ _n = _n + ["LargeVehTeam2"];
+ _u = ["US_Soldier_TL_EP1"];
+ _u = _u + [if (WF_Camo) then {"M1A2_TUSK_MG"} else {"M1A2_US_TUSK_MG_EP1"}];
+ _u = _u + [if (WF_Camo) then {"M1A2_TUSK_MG"} else {"M1A2_US_TUSK_MG_EP1"}];
+ _u = _u + [if (WF_Camo) then {"MLRS"} else {"MLRS_DES_EP1"}];
+ _u = _u + [if (WF_Camo) then {"M1A2_TUSK_MG"} else {"M1A2_US_TUSK_MG_EP1"}];
+ [Format["WFBE_WEST%1UNITS",_n select (count _n - 1)],_u,true] Call SetNamespace;
+
+ _n = _n + ["LargeVehTeam3"];
+ _u = ["US_Soldier_TL_EP1"];
+ _u = _u + [if (WF_Camo) then {"M1A2_TUSK_MG"} else {"M1A2_US_TUSK_MG_EP1"}];
+ _u = _u + [if (WF_Camo) then {"M1A2_TUSK_MG"} else {"M1A2_US_TUSK_MG_EP1"}];
+ _u = _u + [if (WF_Camo) then {"M1A2_TUSK_MG"} else {"M1A2_US_TUSK_MG_EP1"}];
+ _u = _u + ["M6_EP1"];
+ [Format["WFBE_WEST%1UNITS",_n select (count _n - 1)],_u,true] Call SetNamespace;
+
+ //--- East.
+ _n = ["SmallTeam1"];
+ _u = ["RU_Soldier_SL"];
+ _u = _u + ["RU_Soldier_MG"];
+ _u = _u + ["RU_Soldier_AT"];
+ _u = _u + ["RU_Soldier"];
+ [Format["WFBE_EAST%1UNITS",_n select (count _n - 1)],_u,true] Call SetNamespace;
+
+ _n = _n + ["SmallTeam2"];
+ _u = ["RU_Soldier_SL"];
+ _u = _u + ["RU_Soldier_LAT"];
+ _u = _u + ["RU_Soldier_Marksman"];
+ _u = _u + ["RU_Soldier_AR"];
+ _u = _u + ["RU_Soldier_GL"];
+ [Format["WFBE_EAST%1UNITS",_n select (count _n - 1)],_u,true] Call SetNamespace;
+
+ _n = _n + ["SmallTeam3"];
+ _u = ["RU_Soldier_TL"];
+ _u = _u + ["RU_Soldier_MG"];
+ _u = _u + ["RU_Soldier_GL"];
+ _u = _u + ["RU_Soldier_AT"];
+ [Format["WFBE_EAST%1UNITS",_n select (count _n - 1)],_u,true] Call SetNamespace;
+
+ _n = _n + ["SmallVehTeam1"];
+ _u = ["RU_Soldier_SL"];
+ _u = _u + ["UAZ_AGS30_RU"];
+ _u = _u + ["GAZ_Vodnik"];
+ [Format["WFBE_EAST%1UNITS",_n select (count _n - 1)],_u,true] Call SetNamespace;
+
+ _n = _n + ["SmallVehTeam2"];
+ _u = ["RU_Soldier_SL"];
+ _u = _u + ["GAZ_Vodnik"];
+ _u = _u + ["GAZ_Vodnik_HMG"];
+ [Format["WFBE_EAST%1UNITS",_n select (count _n - 1)],_u,true] Call SetNamespace;
+
+ _n = _n + ["SmallVehTeam3"];
+ _u = ["RU_Soldier_SL"];
+ _u = _u + ["UAZ_AGS30_RU"];
+ _u = _u + ["GAZ_Vodnik_HMG"];
+ [Format["WFBE_EAST%1UNITS",_n select (count _n - 1)],_u,true] Call SetNamespace;
+
+ _n = _n + ["MediumTeam1"];
+ _u = ["RU_Soldier_SL"];
+ _u = _u + ["RU_Soldier_AA"];
+ _u = _u + ["RU_Soldier_LAT"];
+ _u = _u + ["RU_Soldier_AT"];
+ _u = _u + ["RU_Soldier"];
+ [Format["WFBE_EAST%1UNITS",_n select (count _n - 1)],_u,true] Call SetNamespace;
+
+ _n = _n + ["MediumTeam2"];
+ _u = ["RUS_Commander"];
+ _u = _u + ["RUS_Soldier1"];
+ _u = _u + ["RUS_Soldier2"];
+ _u = _u + ["RUS_Soldier_GL"];
+ _u = _u + ["RUS_Soldier_Marksman"];
+ _u = _u + ["RUS_Soldier3"];
+ _u = _u + ["RUS_Soldier_TL"];
+ [Format["WFBE_EAST%1UNITS",_n select (count _n - 1)],_u,true] Call SetNamespace;
+
+ _n = _n + ["MediumTeam3"];
+ _u = ["MVD_Soldier_TL"];
+ _u = _u + ["MVD_Soldier_MG"];
+ _u = _u + ["MVD_Soldier_AT"];
+ _u = _u + ["MVD_Soldier_GL"];
+ _u = _u + ["MVD_Soldier_Sniper"];
+ _u = _u + ["MVD_Soldier_Marksman"];
+ [Format["WFBE_EAST%1UNITS",_n select (count _n - 1)],_u,true] Call SetNamespace;
+
+ _n = _n + ["MediumVehTeam1"];
+ _u = ["RU_Soldier_TL"];
+ _u = _u + ["GAZ_Vodnik"];
+ _u = _u + ["BMP3"];
+ _u = _u + ["BTR90"];
+ [Format["WFBE_EAST%1UNITS",_n select (count _n - 1)],_u,true] Call SetNamespace;
+
+ _n = _n + ["MediumVehTeam2"];
+ _u = ["RU_Soldier_TL"];
+ _u = _u + ["T72_RU"];
+ _u = _u + ["T72_RU"];
+ _u = _u + ["GAZ_Vodnik_MedEvac"];
+ [Format["WFBE_EAST%1UNITS",_n select (count _n - 1)],_u,true] Call SetNamespace;
+
+ _n = _n + ["MediumVehTeam3"];
+ _u = ["RU_Soldier_TL"];
+ _u = _u + ["BMP3"];
+ _u = _u + ["GAZ_Vodnik_HMG"];
+ _u = _u + ["T72_RU"];
+ [Format["WFBE_EAST%1UNITS",_n select (count _n - 1)],_u,true] Call SetNamespace;
+
+ _n = _n + ["LargeTeam1"];
+ _u = ["RU_Soldier_HAT"];
+ _u = _u + ["RU_Soldier_HAT"];
+ _u = _u + ["RU_Soldier_HAT"];
+ _u = _u + ["RU_Soldier_AT"];
+ _u = _u + ["RU_Soldier"];
+ [Format["WFBE_EAST%1UNITS",_n select (count _n - 1)],_u,true] Call SetNamespace;
+
+ _n = _n + ["LargeTeam2"];
+ _u = ["RUS_Commander"];
+ _u = _u + ["RUS_Soldier1"];
+ _u = _u + ["RUS_Soldier2"];
+ _u = _u + ["RUS_Soldier_GL"];
+ _u = _u + ["RUS_Soldier_Marksman"];
+ _u = _u + ["RUS_Soldier3"];
+ _u = _u + ["RUS_Soldier_TL"];
+ [Format["WFBE_EAST%1UNITS",_n select (count _n - 1)],_u,true] Call SetNamespace;
+
+ _n = _n + ["LargeTeam3"];
+ _u = ["RU_Soldier_SL"];
+ _u = _u + ["RU_Soldier_MG"];
+ _u = _u + ["RU_Soldier_AT"];
+ _u = _u + ["RU_Soldier_LAT"];
+ _u = _u + ["RU_Soldier_Marksman"];
+ _u = _u + ["RU_Soldier_AR"];
+ _u = _u + ["RU_Soldier_GL"];
+ _u = _u + ["RU_Soldier"];
+ [Format["WFBE_EAST%1UNITS",_n select (count _n - 1)],_u,true] Call SetNamespace;
+
+ _n = _n + ["LargeVehTeam1"];
+ _u = ["RU_Soldier_TL"];
+
+ if (WF_ACE) then
+ {
+ _u = _u + ["ACE_T90"];
+ _u = _u + ["ACE_T90"];
+ _u = _u + ["ACE_T90"];
+ }
+ else
+ {
+ _u = _u + ["T90"];
+ _u = _u + ["T90"];
+ _u = _u + ["T90"];
+ };
+
+ _u = _u + ["T72_RU"];
+ [Format["WFBE_EAST%1UNITS",_n select (count _n - 1)],_u,true] Call SetNamespace;
+
+ _n = _n + ["LargeVehTeam2"];
+ _u = ["RU_Soldier_TL"];
+ if (WF_ACE) then
+ {
+ _u = _u + ["ACE_T90"];
+ }
+ else
+ {
+ _u = _u + ["T90"];
+ };
+ _u = _u + ["GRAD_RU"];
+ _u = _u + ["T72_RU"];
+ _u = _u + ["2S6M_Tunguska"];
+ [Format["WFBE_EAST%1UNITS",_n select (count _n - 1)],_u,true] Call SetNamespace;
+
+ _n = _n + ["LargeVehTeam3"];
+ _u = ["RU_Soldier_TL"];
+ if (WF_ACE) then
+ {
+ _u = _u + ["ACE_T90"];
+ _u = _u + ["ACE_T90"];
+ }
+ else
+ {
+ _u = _u + ["T90"];
+ _u = _u + ["T90"];
+ };
+ _u = _u + ["2S6M_Tunguska"];
+ _u = _u + ["T72_RU"];
+ [Format["WFBE_EAST%1UNITS",_n select (count _n - 1)],_u,true] Call SetNamespace;
+};
+
+diag_log "[WFBE (INIT)] Config_Occupation: Intialization - [Done]"; \ No newline at end of file
diff --git a/Server/Config/Config_Resistance.sqf b/Server/Config/Config_Resistance.sqf
new file mode 100644
index 0000000..7dcc61b
--- /dev/null
+++ b/Server/Config/Config_Resistance.sqf
@@ -0,0 +1,276 @@
+private ["_resType","_n","_u"];
+_resType = 'WFBE_RESISTANCEFACTION' Call GetNamespace;
+if (isNil '_resType') then {_resType = -1};
+
+if (WF_A2_Vanilla || _resType == 0) then {
+ _n = ["Group"];
+ _u = ["GUE_Soldier_CO"];
+ _u = _u + ["GUE_Soldier_GL"];
+ _u = _u + ["GUE_Soldier_AR"];
+ _u = _u + ["GUE_Soldier_1"];
+ _u = _u + ["GUE_Soldier_3"];
+ _u = _u + ["GUE_Soldier_2"];
+ _u = _u + ["GUE_Soldier_Medic"];
+ [Format["WFBE_RES%1UNITS",_n select (count _n - 1)],_u,true] Call SetNamespace;
+
+ _n = _n + ["GroupAssault"];
+ _u = ["GUE_Soldier_CO"];
+ _u = _u + ["GUE_Soldier_GL"];
+ _u = _u + ["GUE_Soldier_AT"];
+ _u = _u + ["GUE_Soldier_AR"];
+ _u = _u + ["GUE_Soldier_MG"];
+ _u = _u + ["GUE_Soldier_AT"];
+ _u = _u + ["GUE_Soldier_2"];
+ _u = _u + ["GUE_Soldier_Medic"];
+ [Format["WFBE_RES%1UNITS",_n select (count _n - 1)],_u,true] Call SetNamespace;
+
+ _n = _n + ["GroupWeapons"];
+ _u = ["GUE_Soldier_2"];
+ _u = _u + ["GUE_Soldier_MG"];
+ _u = _u + ["GUE_Soldier_AT"];
+ _u = _u + ["GUE_Soldier_GL"];
+ _u = _u + ["GUE_Soldier_Sab"];
+ [Format["WFBE_RES%1UNITS",_n select (count _n - 1)],_u,true] Call SetNamespace;
+
+ _n = _n + ["Patrol1"];
+ _u = ["GUE_Soldier_2"];
+ _u = _u + ["GUE_Soldier_MG"];
+ _u = _u + ["GUE_Soldier_AT"];
+ _u = _u + ["GUE_Soldier_GL"];
+ [Format["WFBE_RES%1UNITS",_n select (count _n - 1)],_u,true] Call SetNamespace;
+
+ _n = _n + ["Patrol2"];
+ _u = ["GUE_Soldier_1"];
+ _u = _u + ["GUE_Soldier_AR"];
+ _u = _u + ["GUE_Soldier_GL"];
+ _u = _u + ["GUE_Soldier_2"];
+ [Format["WFBE_RES%1UNITS",_n select (count _n - 1)],_u,true] Call SetNamespace;
+
+ _n = _n + ["ATTeam"];
+ _u = ["GUE_Soldier_AT"];
+ _u = _u + ["GUE_Soldier_AT"];
+ _u = _u + ["GUE_Soldier_AR"];
+ [Format["WFBE_RES%1UNITS",_n select (count _n - 1)],_u,true] Call SetNamespace;
+
+ _n = _n + ["AATeam"];
+ _u = ["GUE_Soldier_CO"];
+ _u = _u + ["GUE_Soldier_AA"];
+ _u = _u + ["GUE_Soldier_AA"];
+ _u = _u + ["GUE_Soldier_AR"];
+ [Format["WFBE_RES%1UNITS",_n select (count _n - 1)],_u,true] Call SetNamespace;
+
+ _n = _n + ["SniperTeam"];
+ _u = ["GUE_Soldier_Sniper"];
+ _u = _u + ["GUE_Soldier_Scout"];
+ [Format["WFBE_RES%1UNITS",_n select (count _n - 1)],_u,true] Call SetNamespace;
+
+ _n = _n + ["Militia"];
+ _u = ["GUE_Worker2"];
+ _u = _u + ["GUE_Woodlander3"];
+ _u = _u + ["GUE_Villager3"];
+ _u = _u + ["GUE_Woodlander2"];
+ _u = _u + ["GUE_Woodlander1"];
+ _u = _u + ["GUE_Villager4"];
+ [Format["WFBE_RES%1UNITS",_n select (count _n - 1)],_u,true] Call SetNamespace;
+
+ _n = _n + ["Technical"];
+ _u = ["GUE_Soldier_CO"];
+ _u = _u + ["Offroad_DSHKM_Gue"];
+ _u = _u + ["Offroad_SPG9_Gue"];
+ _u = _u + ["Pickup_PK_GUE"];
+ _u = _u + ["GUE_Soldier_MG"];
+ _u = _u + ["GUE_Soldier_3"];
+ _u = _u + ["GUE_Soldier_Sniper"];
+ _u = _u + ["GUE_Soldier_AR"];
+ _u = _u + ["GUE_Soldier_Medic"];
+ [Format["WFBE_RES%1UNITS",_n select (count _n - 1)],_u,true] Call SetNamespace;
+
+ _n = _n + ["MotorizedGroup"];
+ _u = ["GUE_Soldier_CO"];
+ _u = _u + ["V3S_GUE"];
+ _u = _u + ["GUE_Soldier_GL"];
+ _u = _u + ["GUE_Soldier_AT"];
+ _u = _u + ["GUE_Soldier_1"];
+ _u = _u + ["GUE_Soldier_AR"];
+ _u = _u + ["GUE_Soldier_MG"];
+ _u = _u + ["GUE_Soldier_AT"];
+ _u = _u + ["GUE_Soldier_Medic"];
+ [Format["WFBE_RES%1UNITS",_n select (count _n - 1)],_u,true] Call SetNamespace;
+
+ _n = _n + ["MotorizedAATeam"];
+ _u = ["GUE_Soldier_CO"];
+ _u = _u + ["Ural_ZU23_Gue"];
+ _u = _u + ["GUE_Soldier_GL"];
+ _u = _u + ["GUE_Soldier_AA"];
+ _u = _u + ["GUE_Soldier_1"];
+ [Format["WFBE_RES%1UNITS",_n select (count _n - 1)],_u,true] Call SetNamespace;
+
+ _n = _n + ["MechanizedPatrol"];
+ _u = ["GUE_Soldier_AR"];
+ _u = _u + ["BRDM2_GUE"];
+ _u = _u + ["GUE_Soldier_GL"];
+ _u = _u + ["GUE_Soldier_1"];
+ [Format["WFBE_RES%1UNITS",_n select (count _n - 1)],_u,true] Call SetNamespace;
+
+ _n = _n + ["MechanizedGroup"];
+ _u = ["GUE_Soldier_CO"];
+ _u = _u + ["BMP2_GUE"];
+ _u = _u + ["GUE_Soldier_MG"];
+ _u = _u + ["GUE_Soldier_GL"];
+ _u = _u + ["GUE_Soldier_3"];
+ _u = _u + ["GUE_Soldier_AR"];
+ _u = _u + ["GUE_Soldier_Sniper"];
+ _u = _u + ["GUE_Soldier_AT"];
+ [Format["WFBE_RES%1UNITS",_n select (count _n - 1)],_u,true] Call SetNamespace;
+
+ _n = _n + ["LightArmor"];
+ _u = ["GUE_Soldier_CO"];
+ _u = _u + ["BMP2_GUE"];
+ _u = _u + ["BMP2_GUE"];
+ [Format["WFBE_RES%1UNITS",_n select (count _n - 1)],_u,true] Call SetNamespace;
+
+ _n = _n + ["HeavyArmor"];
+ _u = ["GUE_Soldier_CO"];
+ _u = _u + ["T72_GUE"];
+ _u = _u + ["T72_GUE"];
+ [Format["WFBE_RES%1UNITS",_n select (count _n - 1)],_u,true] Call SetNamespace;
+};
+
+if (WF_A2_Arrowhead || _resType == 1) then {
+ _n = ["Group"];
+ _u = ["TK_GUE_Warlord_EP1"];
+ _u = _u + ["TK_GUE_Soldier_4_EP1"];
+ _u = _u + ["TK_GUE_Soldier_AR_EP1"];
+ _u = _u + ["TK_GUE_Soldier_EP1"];
+ _u = _u + ["TK_GUE_Soldier_5_EP1"];
+ _u = _u + ["TK_GUE_Soldier_5_EP1"];
+ _u = _u + ["TK_GUE_Bonesetter_EP1"];
+ [Format["WFBE_RES%1UNITS",_n select (count _n - 1)],_u,true] Call SetNamespace;
+
+ _n = _n + ["GroupAssault"];
+ _u = ["TK_GUE_Warlord_EP1"];
+ _u = _u + ["TK_GUE_Soldier_4_EP1"];
+ _u = _u + ["TK_GUE_Soldier_AT_EP1"];
+ _u = _u + ["TK_GUE_Soldier_AR_EP1"];
+ _u = _u + ["TK_GUE_Soldier_MG_EP1"];
+ _u = _u + ["TK_GUE_Soldier_HAT_EP1"];
+ _u = _u + ["TK_GUE_Soldier_5_EP1"];
+ _u = _u + ["TK_GUE_Bonesetter_EP1"];
+ [Format["WFBE_RES%1UNITS",_n select (count _n - 1)],_u,true] Call SetNamespace;
+
+ _n = _n + ["GroupWeapons"];
+ _u = ["TK_GUE_Soldier_5_EP1"];
+ _u = _u + ["TK_GUE_Soldier_MG_EP1"];
+ _u = _u + ["TK_GUE_Soldier_AT_EP1"];
+ _u = _u + ["TK_GUE_Soldier_4_EP1"];
+ _u = _u + ["TK_GUE_Soldier_AT_EP1"];
+ [Format["WFBE_RES%1UNITS",_n select (count _n - 1)],_u,true] Call SetNamespace;
+
+ _n = _n + ["Patrol1"];
+ _u = ["TK_GUE_Soldier_5_EP1"];
+ _u = _u + ["TK_GUE_Soldier_MG_EP1"];
+ _u = _u + ["TK_GUE_Soldier_AT_EP1"];
+ _u = _u + ["TK_GUE_Soldier_4_EP1"];
+ [Format["WFBE_RES%1UNITS",_n select (count _n - 1)],_u,true] Call SetNamespace;
+
+ _n = _n + ["Patrol2"];
+ _u = ["TK_GUE_Soldier_EP1"];
+ _u = _u + ["TK_GUE_Soldier_AR_EP1"];
+ _u = _u + ["TK_GUE_Soldier_4_EP1"];
+ _u = _u + ["TK_GUE_Soldier_HAT_EP1"];
+ [Format["WFBE_RES%1UNITS",_n select (count _n - 1)],_u,true] Call SetNamespace;
+
+ _n = _n + ["ATTeam"];
+ _u = ["TK_GUE_Soldier_AT_EP1"];
+ _u = _u + ["TK_GUE_Soldier_AT_EP1"];
+ _u = _u + ["TK_GUE_Soldier_AR_EP1"];
+ [Format["WFBE_RES%1UNITS",_n select (count _n - 1)],_u,true] Call SetNamespace;
+
+ _n = _n + ["AATeam"];
+ _u = ["TK_GUE_Warlord_EP1"];
+ _u = _u + ["TK_GUE_Soldier_AA_EP1"];
+ _u = _u + ["TK_GUE_Soldier_AA_EP1"];
+ _u = _u + ["TK_GUE_Soldier_AR_EP1"];
+ [Format["WFBE_RES%1UNITS",_n select (count _n - 1)],_u,true] Call SetNamespace;
+
+ _n = _n + ["SniperTeam"];
+ _u = ["TK_GUE_Soldier_Sniper_EP1"];
+ _u = _u + ["TK_GUE_Soldier_2_EP1"];
+ [Format["WFBE_RES%1UNITS",_n select (count _n - 1)],_u,true] Call SetNamespace;
+
+ _n = _n + ["Militia"];
+ _u = ["TK_GUE_Soldier_2_EP1"];
+ _u = _u + ["TK_GUE_Soldier_3_EP1"];
+ _u = _u + ["TK_GUE_Soldier_4_EP1"];
+ _u = _u + ["TK_GUE_Soldier_5_EP1"];
+ _u = _u + ["TK_GUE_Bonesetter_EP1"];
+ _u = _u + ["TK_GUE_Soldier_EP1"];
+ [Format["WFBE_RES%1UNITS",_n select (count _n - 1)],_u,true] Call SetNamespace;
+
+ _n = _n + ["Technical"];
+ _u = ["TK_GUE_Warlord_EP1"];
+ _u = _u + ["Offroad_DSHKM_TK_GUE_EP1"];
+ _u = _u + ["Offroad_SPG9_TK_GUE_EP1"];
+ _u = _u + ["Pickup_PK_TK_GUE_EP1"];
+ _u = _u + ["TK_GUE_Soldier_MG_EP1"];
+ _u = _u + ["TK_GUE_Soldier_5_EP1"];
+ _u = _u + ["TK_GUE_Soldier_Sniper_EP1"];
+ _u = _u + ["TK_GUE_Soldier_HAT_EP1"];
+ _u = _u + ["TK_GUE_Soldier_AR_EP1"];
+ _u = _u + ["TK_GUE_Bonesetter_EP1"];
+ [Format["WFBE_RES%1UNITS",_n select (count _n - 1)],_u,true] Call SetNamespace;
+
+ _n = _n + ["MotorizedGroup"];
+ _u = ["TK_GUE_Warlord_EP1"];
+ _u = _u + ["V3S_TK_GUE_EP1"];
+ _u = _u + ["TK_GUE_Soldier_4_EP1"];
+ _u = _u + ["TK_GUE_Soldier_AT_EP1"];
+ _u = _u + ["TK_GUE_Soldier_EP1"];
+ _u = _u + ["TK_GUE_Soldier_AR_EP1"];
+ _u = _u + ["TK_GUE_Soldier_MG_EP1"];
+ _u = _u + ["TK_GUE_Soldier_HAT_EP1"];
+ _u = _u + ["TK_GUE_Bonesetter_EP1"];
+ [Format["WFBE_RES%1UNITS",_n select (count _n - 1)],_u,true] Call SetNamespace;
+
+ _n = _n + ["MotorizedAATeam"];
+ _u = ["TK_GUE_Warlord_EP1"];
+ _u = _u + ["Ural_ZU23_TK_GUE_EP1"];
+ _u = _u + ["TK_GUE_Soldier_4_EP1"];
+ _u = _u + ["TK_GUE_Soldier_AA_EP1"];
+ _u = _u + ["TK_GUE_Soldier_EP1"];
+ [Format["WFBE_RES%1UNITS",_n select (count _n - 1)],_u,true] Call SetNamespace;
+
+ _n = _n + ["MechanizedPatrol"];
+ _u = ["TK_GUE_Soldier_AR_EP1"];
+ _u = _u + ["BTR40_MG_TK_GUE_EP1"];
+ _u = _u + ["BRDM2_TK_GUE_EP1"];
+ _u = _u + ["TK_GUE_Soldier_4_EP1"];
+ _u = _u + ["TK_GUE_Soldier_EP1"];
+ [Format["WFBE_RES%1UNITS",_n select (count _n - 1)],_u,true] Call SetNamespace;
+
+ _n = _n + ["MechanizedGroup"];
+ _u = ["TK_GUE_Warlord_EP1"];
+ _u = _u + ["T34_TK_GUE_EP1"];
+ _u = _u + ["BTR40_MG_TK_GUE_EP1"];
+ _u = _u + ["TK_GUE_Soldier_MG_EP1"];
+ _u = _u + ["TK_GUE_Soldier_4_EP1"];
+ _u = _u + ["TK_GUE_Soldier_HAT_EP1"];
+ _u = _u + ["TK_GUE_Soldier_AR_EP1"];
+ _u = _u + ["TK_GUE_Soldier_Sniper_EP1"];
+ _u = _u + ["TK_GUE_Soldier_AT_EP1"];
+ [Format["WFBE_RES%1UNITS",_n select (count _n - 1)],_u,true] Call SetNamespace;
+
+ _n = _n + ["LightArmor"];
+ _u = ["TK_GUE_Warlord_EP1"];
+ _u = _u + ["T34_TK_GUE_EP1"];
+ _u = _u + ["T34_TK_GUE_EP1"];
+ [Format["WFBE_RES%1UNITS",_n select (count _n - 1)],_u,true] Call SetNamespace;
+
+ _n = _n + ["HeavyArmor"];
+ _u = ["TK_GUE_Warlord_EP1"];
+ _u = _u + ["T55_TK_GUE_EP1"];
+ _u = _u + ["T55_TK_GUE_EP1"];
+ [Format["WFBE_RES%1UNITS",_n select (count _n - 1)],_u,true] Call SetNamespace;
+};
+
+diag_log "[WFBE (INIT)] Config_Resistance: Intialization - [Done]"; \ No newline at end of file
diff --git a/Server/Config/Config_SmallTown.sqf b/Server/Config/Config_SmallTown.sqf
new file mode 100644
index 0000000..4aadeb3
--- /dev/null
+++ b/Server/Config/Config_SmallTown.sqf
@@ -0,0 +1,13 @@
+Private ['_probability','_range','_teams','_town','_townName'];
+
+_town = _this Select 0;
+_townName = _this Select 1;
+
+_range = 600;
+if (Count _this > 3) then {_range = _this Select 3};
+
+_teams = ['light1'] Call Compile preprocessFile "Server\Functions\Server_SelectResTeam.sqf";
+
+_probability = 70;
+
+[_town,_townName,10,50,_range,_teams,_probability] ExecVM "Common\Init\Init_Location.sqf"; \ No newline at end of file
diff --git a/Server/Config/Config_SmallTown2.sqf b/Server/Config/Config_SmallTown2.sqf
new file mode 100644
index 0000000..481545d
--- /dev/null
+++ b/Server/Config/Config_SmallTown2.sqf
@@ -0,0 +1,13 @@
+Private ['_probability','_range','_teams','_town','_townName'];
+
+_town = _this Select 0;
+_townName = _this Select 1;
+
+_range = 600;
+if (Count _this > 3) then {_range = _this Select 3};
+
+_teams = ['light2'] Call Compile preprocessFile "Server\Functions\Server_SelectResTeam.sqf";
+
+_probability = 78;
+
+[_town,_townName,10,50,_range,_teams,_probability] ExecVM "Common\Init\Init_Location.sqf"; \ No newline at end of file
diff --git a/Server/Config/Config_Town.sqf b/Server/Config/Config_Town.sqf
new file mode 100644
index 0000000..35f5724
--- /dev/null
+++ b/Server/Config/Config_Town.sqf
@@ -0,0 +1,25 @@
+Private ['_configScripts','_location','_locationName','_params','_range','_script','_total'];
+
+_location = _this Select 0;
+_locationName = _this Select 1;
+_configScripts = _this Select 2;
+
+if (isNull _location) exitWith {};
+
+waitUntil {townModeSet};
+if ((str _location) in TownTemplate) exitWith {
+ diag_log Format ["[WFBE (INIT)][frameno:%3 | ticktime:%4] Config_Town: Removing town %1 (%2) since the town is removed in the towns templates.",_location,_locationName,diag_frameno,diag_tickTime];
+ if (isServer) then {deleteVehicle _location};
+};
+
+_range = 600;
+if (Count _this > 4) then {_range = _this Select 4};
+
+_total = Count _configScripts;
+_script = _configScripts Select (Random (_total - 1));
+_params = [_location,_locationName];
+if (Count _this > 4) then {_params = _params + [_range]};
+
+waitUntil{initJIP && commonInitComplete};
+
+_params ExecVM Format["Server\Config\Config_%1.sqf",_script]; \ No newline at end of file
diff --git a/Server/Construction/Construction_HQSite.sqf b/Server/Construction/Construction_HQSite.sqf
new file mode 100644
index 0000000..3e4bef6
--- /dev/null
+++ b/Server/Construction/Construction_HQSite.sqf
@@ -0,0 +1,83 @@
+Private ["_areas","_deployed","_direction","_grp","_HQ","_HQName","_logic","_MHQ","_near","_position","_side","_sideText","_site","_text","_type","_update","_varTH"];
+_type = _this select 0;
+_side = _this select 1;
+_position = _this select 2;
+_direction = _this select 3;
+_sideText = _side;
+
+/* Handle the LAG. */
+_varTH = format['WF_CHQInUse_%1',_sideText];
+waitUntil {!(WF_Logic getVariable _varTH)};
+WF_Logic setVariable [_varTH,true];
+
+_HQ = (_sideText) Call GetSideHQ;
+_deployed = (_sideText) Call GetSideHQDeployed;
+
+if (!_deployed) then {
+ _HQ setPos [1,1,1];
+
+ _site = _type CreateVehicle _position;
+ _site SetDir _direction;
+ _site SetPos _position;
+
+ Call Compile Format ["%1MHQ = _site; %1MHQDeployed = true; publicVariable '%1MHQ'; publicVariable '%1MHQDeployed';",_sideText];
+
+ _site setVehicleInit Format["[this,true,%1] ExecVM 'Client\Init\Init_BaseStructure.sqf'",_side];
+ processInitCommands;
+
+ ["Constructed",_type,_side] Spawn SideMessage;
+ Call Compile Format ["_site addEventHandler ['killed',{[_this select 0,_this select 1,%1,'%2'] Spawn HQKilled}];",_side,typeOf _site];
+ _site addEventHandler ["hit",{_this Spawn BuildingDamaged}];
+ if (paramHandleFF) then {Call Compile Format ["_site addEventHandler ['handleDamage',{[_this select 0,_this select 2,_this select 3, %1] Call BuildingHandleDamages}]",_side]};
+
+ //--- base area limits.
+ if (paramBaseArea) then {
+ _update = true;
+ _areas = WF_Logic getVariable Format['%1Area',_sideText];
+ _near = [_position,_areas] Call SortByDistance;
+ if (count _near > 0) then {
+ if ((_near select 0) distance _position < (('WFBE_BASEAREARANGE' Call GetNamespace) + ('WFBE_MHQBUILDINGRANGE' Call GetNamespace))) then {_update = false};
+ };
+ if (_update) then {
+ _grp = createGroup sideLogic;
+ _logic = _grp createUnit ["Logic",[0,0,0],[],0,"NONE"];
+ _logic setPos _position;
+ WF_Logic setVariable [Format['%1Area',_sideText],_areas + [_logic],true];
+ };
+ };
+
+ diag_log Format["[WFBE (INFORMATION)][frameno:%3 | ticktime:%4] Construction_HQSite: The %1 MHQ (%2) was deployed",_sideText,_type,diag_frameno,diag_tickTime];
+
+ deleteVehicle _HQ;
+} else {
+ _position = getPos _HQ;
+ _direction = getDir _HQ;
+ _HQName = Format["WFBE_%1MHQNAME",_sideText] Call GetNamespace;
+
+ _HQ SetPos [1,1,1];
+
+ _MHQ = _HQName createVehicle _position;
+
+ Call Compile Format ["%1MHQ = _MHQ; %1MHQDeployed = false; publicVariable '%1MHQ'; publicVariable '%1MHQDeployed';",_sideText];
+
+ _MHQ setDir _direction;
+ _MHQ setVelocity [0,0,-1];
+ _MHQ setVariable ["WFBE_Taxi_Prohib", true];
+
+ ["Constructed",_HQName,_side] Spawn SideMessage;
+ Call Compile Format ["_MHQ AddEventHandler [""killed"",{[_this select 0,_this select 1,%1,'%2'] Spawn HQKilled}];",_side,typeOf _MHQ];
+ if (paramHandleFF) then {Call Compile Format ["_MHQ addEventHandler ['handleDamage',{[_this select 0,_this select 2,_this select 3, %1] Call BuildingHandleDamages}]",_side]};
+
+ _text = "";
+ if (('WFBE_INCOMINGMISSILEMAXRANGE' Call GetNamespace) != 0) then {_text = "this addEventHandler ['IncomingMissile', {_this Spawn HandleIncomingMissile}];"};
+
+ _MHQ setVehicleInit Format["['Headquarters','ColorGreen',[1,1],'','HQUndeployed',this,0.2,false,'','',false,%1] ExecVM 'Common\Common_MarkerUpdate.sqf';%2",_side,_text];
+ processInitCommands;
+
+ diag_log Format["[WFBE (INFORMATION)][frameno:%3 | ticktime:%4] Construction_HQSite: The %1 MHQ (%2) was mobilized",_sideText,_HQName,diag_frameno,diag_tickTime];
+
+ deleteVehicle _HQ;
+};
+
+/* Handle the LAG. */
+WF_Logic setVariable [_varTH,false]; \ No newline at end of file
diff --git a/Server/Construction/Construction_MediumSite.sqf b/Server/Construction/Construction_MediumSite.sqf
new file mode 100644
index 0000000..c153784
--- /dev/null
+++ b/Server/Construction/Construction_MediumSite.sqf
@@ -0,0 +1,135 @@
+//*****************************************************************************************
+//Description: Creates a small construction site.
+//*****************************************************************************************
+Private ["_construct","_constructed","_direction","_group","_index","_nearLogic","_objects","_position","_rlType","_side","_site","_siteName","_startTime","_structures","_structuresNames","_time","_timeNextUpdate","_type"];
+_type = _this select 0;
+_side = _this select 1;
+_position = _this select 2;
+_direction = _this select 3;
+_index = _this select 4;
+
+_time = ((Format ["WFBE_%1STRUCTURETIMES",str _side] Call GetNamespace) select _index) / 2;
+
+_siteName = Format["WFBE_%1CONSTRUCTIONSITE",str _side] Call GetNamespace;
+
+_structures = Format ['WFBE_%1STRUCTURES',str _side] Call GetNamespace;
+_structuresNames = Format ['WFBE_%1STRUCTURENAMES',str _side] Call GetNamespace;
+_rlType = _structures select (_structuresNames find _type);
+
+_startTime = time;
+_timeNextUpdate = _startTime + _time;
+
+_objects = [];
+if (WF_A2_Arrowhead) then {_objects = [[_siteName,[0,0,0.00242043],359.958,1,0],["Paleta2",[0.430908,-5.60693,-0.30535],359.945,1,0],["Paleta1",[-2.62598,-6.0437,0.000275612],359.951,1,0],["Land_Barrel_sand",[-10.1826,0.356689,7.62939e-005],0.00146227,1,0],["Land_Barrel_sand",[-10.7854,-1.97974,0.000187874],359.987,1,0],["Paleta1",[-9.7251,5.53955,0.000106812],359.976,1,0],["Land_Barrel_sand",[-11.053,-4.12183,0.00019455],359.987,1,0],["Land_Barrel_sand",[-12.3416,-1.57056,7.43866e-005],0.00146227,1,0],["Barrels",[-12.5134,0.682861,0.000136375],0.00146227,1,0],["RoadBarrier_long",[1.63794,-12.8806,-0.000716209],359.92,1,0],["Land_Barrel_sand",[-11.5149,-6.25757,0.00084877],359.938,1,0],["Land_Barrel_sand",[-12.7363,-3.63184,0.000207901],359.938,1,0],["Barrel4",[14.1938,0.500732,0.000412941],359.98,1,0],["Land_Barrel_sand",[-13.0708,-5.9082,0.000863075],359.938,1,0],["Barrel5",[14.7661,-1.11182,0.000411987],359.98,1,0],["Barrel1",[14.7314,2.21338,0.000409126],359.98,1,0],["Paleta2",[12.0034,9.8418,-0.305568],0.0412118,1,0],["RoadCone",[-12.2202,-13.7024,0.000279427],359.984,1,0],["RoadCone",[-12.1877,15.0469,0.000328064],359.969,1,0],["RoadCone",[14.5701,-13.311,0.000322342],359.995,1,0],["RoadCone",[14.6084,14.6824,0.000889778],359.994,1,0]]};
+if (WF_A2_Vanilla || WF_A2_CombinedOps) then {_objects = [[_siteName,[0,0,0.00242043],359.958,1,0],["Paleta2",[0.430908,-5.60693,-0.30535],359.945,1,0],["Paleta1",[-2.62598,-6.0437,0.000275612],359.951,1,0],["Land_Ind_BoardsPack1",[-0.82251,-9.15479,0.00291061],49.9467,1,0],["Land_Barrel_sand",[-10.1826,0.356689,7.62939e-005],0.00146227,1,0],["Land_Barrel_sand",[-10.7854,-1.97974,0.000187874],359.987,1,0],["Paleta1",[-9.7251,5.53955,0.000106812],359.976,1,0],["Land_Ind_Timbers",[1.88354,11.1238,-0.487763],95.0061,1,0],["Land_Barrel_sand",[-11.053,-4.12183,0.00019455],359.987,1,0],["Land_Ind_BoardsPack1",[-6.6582,-10.0774,0.0021534],324.956,1,0],["Land_Ind_BoardsPack1",[9.50244,-7.4668,0.00151634],270,1,0],["Land_Ind_Timbers",[12.0264,4.19629,-0.534346],359.98,1,0],["Land_Barrel_sand",[-12.3416,-1.57056,7.43866e-005],0.00146227,1,0],["Barrels",[-12.5134,0.682861,0.000136375],0.00146227,1,0],["RoadBarrier_long",[1.63794,-12.8806,-0.000716209],359.92,1,0],["Land_Barrel_sand",[-11.5149,-6.25757,0.00084877],359.938,1,0],["Land_Barrel_sand",[-12.7363,-3.63184,0.000207901],359.938,1,0],["Land_Ind_BoardsPack1",[-4.74194,-12.4204,0.00105476],49.9807,1,0],["Barrel4",[14.1938,0.500732,0.000412941],359.98,1,0],["Land_Barrel_sand",[-13.0708,-5.9082,0.000863075],359.938,1,0],["Barrel5",[14.7661,-1.11182,0.000411987],359.98,1,0],["Land_Ind_BoardsPack1",[9.42847,-11.5142,0.00151634],359.964,1,0],["Barrel1",[14.7314,2.21338,0.000409126],359.98,1,0],["Paleta2",[12.0034,9.8418,-0.305568],0.0412118,1,0],["RoadCone",[-12.2202,-13.7024,0.000279427],359.984,1,0],["RoadCone",[-12.1877,15.0469,0.000328064],359.969,1,0],["RoadCone",[14.5701,-13.311,0.000322342],359.995,1,0],["RoadCone",[14.6084,14.6824,0.000889778],359.994,1,0]]};
+_construct = Compile PreprocessFile "ca\modules\dyno\data\scripts\objectMapper.sqf";
+_constructed = ([_position,_direction,_objects] Call _construct);
+
+//--- Create the logic.
+(createGroup sideLogic) createUnit ["LocationLogicStart",_position,[],0,"NONE"];
+
+_nearLogic = objNull;
+if !(paramUseWorkers) then {
+ //--- Grab the logic.
+ _nearLogic = _position nearEntities [["LocationLogicStart"],15];
+ if (count _nearLogic > 0) then {_nearLogic = ([_position, _nearLogic] Call SortByDistance) select 0} else {_nearLogic = objNull};
+
+ if (isNull _nearLogic) exitWith {};
+
+ //--- Position the logic.
+ _nearLogic setPos _position;
+
+ _nearLogic setVariable ["WFBE_B_Type", _rlType];
+
+ waitUntil {time >= _timeNextUpdate};
+ _timeNextUpdate = _startTime + _time * 2;
+} else {
+ //--- Grab the logic.
+ _nearLogic = _position nearEntities [["LocationLogicStart"],15];
+ if (count _nearLogic > 0) then {_nearLogic = ([_position, _nearLogic] Call SortByDistance) select 0} else {_nearLogic = objNull};
+
+ if (isNull _nearLogic) exitWith {};
+
+ //--- Position the logic.
+ _nearLogic setPos _position;
+
+ //--- Instanciate the logic.
+ _nearLogic setVariable ["WFBE_B_Completion", 0];
+ _nearLogic setVariable ["WFBE_B_CompletionRatio", 0.6];
+ _nearLogic setVariable ["WFBE_B_Direction", _direction];
+ _nearLogic setVariable ["WFBE_B_Position", _position];
+ _nearLogic setVariable ["WFBE_B_Repair", false];
+ _nearLogic setVariable ["WFBE_B_Type", _rlType];
+
+ //--- Add the logic to the list.
+ [Format ["WFBE_WORKERS_%1LOGIC",str _side],((Format ["WFBE_WORKERS_%1LOGIC",str _side]) Call GetNamespace) + [_nearLogic],true] Call SetNamespace;
+
+ //--- Awaits for 33% of completion.
+ while {true} do {
+ sleep 1;
+ if ((_nearLogic getVariable "WFBE_B_Completion") >= 33.33) exitWith {};
+ };
+};
+
+if (WF_A2_Arrowhead) then {_objects = [[_siteName,[2.52539,-0.0065918,-0.000685692],359.928,1,0],["Land_WoodenRamp",[-2.27954,-0.582764,0.377601],270,1,0],["Land_WoodenRamp",[0.94751,-4.2085,0.388518],179.986,1,0],[_siteName,[2.60547,6.20386,-0.000685692],359.928,1,0],["Land_Dirthump01_EP1",[-8.63159,8.021,-0.00167847],29.985,1,0]]};
+if (WF_A2_Vanilla || WF_A2_CombinedOps) then {_objects = [[_siteName,[2.52539,-0.0065918,-0.000685692],359.928,1,0],["Land_WoodenRamp",[-2.27954,-0.582764,0.377601],270,1,0],["Land_WoodenRamp",[0.94751,-4.2085,0.388518],179.986,1,0],[_siteName,[2.60547,6.20386,-0.000685692],359.928,1,0],["Land_Dirthump01",[-8.63159,8.021,-0.00167847],29.985,1,0]]};
+_constructed = _constructed + ([_position,_direction,_objects] Call _construct);
+
+if !(paramUseWorkers) then {
+ waitUntil {time >= _timeNextUpdate};
+ _timeNextUpdate = _startTime + _time * 3;
+} else {
+ //--- Awaits for 66%
+ while {true} do {
+ sleep 1;
+ if ((_nearLogic getVariable "WFBE_B_Completion") >= 66.66) exitWith {};
+ };
+};
+
+if (WF_A2_Arrowhead) then {_objects = [["Land_Misc_Scaffolding",[5.67456,2.39307,0.0763969],179.92,1,0],["Land_Dirthump02_EP1",[-8.63159,8.021,0.000141144],29.9958,1,0],["Barrels",[11.4519,12.5623,0.00311279],359.877,1,0],["RoadCone",[-12.1465,-13.7354,0.000406265],359.958,1,0]]};
+if (WF_A2_Vanilla || WF_A2_CombinedOps) then {_objects = [["Land_Misc_Scaffolding",[5.67456,2.39307,0.0763969],179.92,1,0],["Land_Ind_Timbers",[10.0811,4.63477,-0.127748],359.961,1,0],["Land_Dirthump02",[-8.63159,8.021,0.000141144],29.9958,1,0],["Land_Ind_BoardsPack1",[13.3027,-7.63159,0.00639725],359.838,1,0],["Land_Ind_BoardsPack1",[-9.70117,-12.4263,0.00152397],324.976,1,0],["Land_Ind_BoardsPack1",[-7.78491,-14.7693,0.00152779],49.9774,1,0],["Barrels",[11.4519,12.5623,0.00311279],359.877,1,0],["Land_Ind_BoardsPack1",[13.4668,-11.5061,0.00515175],359.942,1,0],["RoadCone",[-12.1465,-13.7354,0.000406265],359.958,1,0]]};
+_constructed = _constructed + ([_position,_direction,_objects] Call _construct);
+
+if !(paramUseWorkers) then {
+ waitUntil {time >= _timeNextUpdate};
+
+ if !(isNull _nearLogic) then {
+ _group = group _nearLogic;
+ deleteVehicle _nearLogic;
+ deleteGroup _group;
+ };
+} else {
+ //--- Awaits for 100%
+ while {true} do {
+ sleep 1;
+ if ((_nearLogic getVariable "WFBE_B_Completion") >= 100) exitWith {};
+ };
+
+ //--- Remove the logic from the list since it's built. Add it back if destroyed.
+ [Format ["WFBE_WORKERS_%1LOGIC",str _side],((Format ["WFBE_WORKERS_%1LOGIC",str _side]) Call GetNamespace) - [_nearLogic],true] Call SetNamespace;
+};
+
+{if !(isNull _x) then {deleteVehicle _x}} forEach _constructed;
+
+_site = _type createVehicle _position;
+_site setDir _direction;
+_site setPos _position;
+
+["Constructed",_type,_side] Spawn SideMessage;
+
+if (!IsNull _site) then {
+ Call Compile Format ["%1BaseStructures = %1BaseStructures + [_site]; publicVariable '%1BaseStructures';",str _side];
+
+ _site setVehicleInit Format["[this,false,%1] ExecVM 'Client\Init\Init_BaseStructure.sqf'",_side];
+ processInitCommands;
+
+ _site addEventHandler ["hit",{_this Spawn BuildingDamaged}];
+ if (paramHandleFF) then {
+ Call Compile Format ["_site addEventHandler ['handleDamage',{[_this select 0,_this select 2,_this select 3, %1] Call BuildingHandleDamages}]",_side];
+ } else {
+ _site addEventHandler ['handleDamage',{[_this select 0, _this select 2] Call HandleBuildingDamage}];
+ };
+ Call Compile Format ["_site AddEventHandler ['killed',{[_this select 0,_this select 1,%1,'%2'] Spawn BuildingKilled}];",_side,_type];
+
+ diag_log Format["[WFBE (INFORMATION)][frameno:%3 | ticktime:%4] Construction_MediumSite: A %1 %2 has been constructed",str _side,_type,diag_frameno,diag_tickTime];
+}; \ No newline at end of file
diff --git a/Server/Construction/Construction_SmallSite.sqf b/Server/Construction/Construction_SmallSite.sqf
new file mode 100644
index 0000000..30e77c5
--- /dev/null
+++ b/Server/Construction/Construction_SmallSite.sqf
@@ -0,0 +1,126 @@
+//*****************************************************************************************
+//Description: Creates a small construction site.
+//*****************************************************************************************
+Private ["_construct","_constructed","_direction","_group","_index","_nearLogic","_objects","_position","_rlType","_side","_site","_siteName","_startTime","_structures","_structuresNames","_time","_timeNextUpdate","_type"];
+_type = _this select 0;
+_side = _this select 1;
+_position = _this select 2;
+_direction = _this select 3;
+_index = _this select 4;
+
+_time = ((Format ["WFBE_%1STRUCTURETIMES",str _side] Call GetNamespace) select _index) / 2;
+
+_siteName = Format["WFBE_%1CONSTRUCTIONSITE",str _side] Call GetNamespace;
+
+_structures = Format ['WFBE_%1STRUCTURES',str _side] Call GetNamespace;
+_structuresNames = Format ['WFBE_%1STRUCTURENAMES',str _side] Call GetNamespace;
+_rlType = _structures select (_structuresNames find _type);
+
+_startTime = time;
+_timeNextUpdate = _startTime + _time;
+
+_objects = [];
+if (WF_A2_Arrowhead) then {_objects = [[_siteName,[0,0,-0.000230789],359.997,1,0],["Paleta2",[0.416992,-5.62012,-0.305746],0.0130822,1,0],["Land_Barrel_sand",[-5.59448,3.26929,6.29425e-005],359.997,1,0],["Paleta1",[-2.62976,-6.04736,5.53131e-005],0.0130822,1,0],["Barrel4",[6.63696,0.694336,0.000753403],359.991,1,0],["Land_Barrel_sand",[-6.73267,2.06372,6.10352e-005],359.997,1,0],["Barrel5",[7.19604,2.8855,0.00028801],0.0135841,1,0],["Barrel1",[6.08984,5.5415,0.00028801],0.0135841,1,0],["Land_Barrel_sand",[-7.13452,4.40747,6.29425e-005],359.997,1,0],["RoadBarrier_long",[0.221924,-8.58496,0.00206566],0.0130822,1,0],["Land_Barrel_sand",[-8.27271,2.80054,6.10352e-005],359.997,1,0],["Barrels",[-7.91895,-4.09668,0.00037384],0.0128253,1,0],["RoadCone",[-10.4381,-8.94336,0.000131607],0.0119093,1,0],["RoadCone",[11.1655,-8.79932,0.00034523],359.991,1,0],["RoadCone",[-10.5692,12.6655,0.000509262],359.948,1,0],["RoadCone",[11.0276,12.3904,0.000509262],359.948,1,0]]};
+if (WF_A2_Vanilla || WF_A2_CombinedOps) then {_objects = [[_siteName,[0,0,-0.000230789],359.997,1,0],["Paleta2",[0.416992,-5.62012,-0.305746],0.0130822,1,0],["Land_Barrel_sand",[-5.59448,3.26929,6.29425e-005],359.997,1,0],["Paleta1",[-2.62976,-6.04736,5.53131e-005],0.0130822,1,0],["Barrel4",[6.63696,0.694336,0.000753403],359.991,1,0],["Land_Ind_BoardsPack2",[6.41797,-2.52051,0.000915527],270,1,0],["Land_Barrel_sand",[-6.73267,2.06372,6.10352e-005],359.997,1,0],["Barrel5",[7.19604,2.8855,0.00028801],0.0135841,1,0],["Barrel1",[6.08984,5.5415,0.00028801],0.0135841,1,0],["Land_Barrel_sand",[-7.13452,4.40747,6.29425e-005],359.997,1,0],["RoadBarrier_long",[0.221924,-8.58496,0.00206566],0.0130822,1,0],["Land_Barrel_sand",[-8.27271,2.80054,6.10352e-005],359.997,1,0],["Barrels",[-7.91895,-4.09668,0.00037384],0.0128253,1,0],["Land_Ind_BoardsPack1",[6.40332,-7.16162,0.000520706],0.0130822,1,0],["Land_Ind_BoardsPack1",[-6.18384,-8.09961,0.000535965],50.0093,1,0],["RoadCone",[-10.4381,-8.94336,0.000131607],0.0119093,1,0],["RoadCone",[11.1655,-8.79932,0.00034523],359.991,1,0],["RoadCone",[-10.5692,12.6655,0.000509262],359.948,1,0],["RoadCone",[11.0276,12.3904,0.000509262],359.948,1,0]]};
+_construct = Compile PreprocessFile "ca\modules\dyno\data\scripts\objectMapper.sqf";
+_constructed = ([_position,_direction,_objects] Call _construct);
+
+//--- Create the logic.
+(createGroup sideLogic) createUnit ["LocationLogicStart",_position,[],0,"NONE"];
+
+_nearLogic = objNull;
+if !(paramUseWorkers) then {
+ //--- Grab the logic.
+ _nearLogic = _position nearEntities [["LocationLogicStart"],15];
+ if (count _nearLogic > 0) then {_nearLogic = ([_position, _nearLogic] Call SortByDistance) select 0} else {_nearLogic = objNull};
+
+ if (isNull _nearLogic) exitWith {};
+
+ //--- Position the logic.
+ _nearLogic setPos _position;
+
+ _nearLogic setVariable ["WFBE_B_Type", _rlType];
+
+ waitUntil {time >= _timeNextUpdate};
+ _timeNextUpdate = _startTime + _time * 2;
+} else {
+ //--- Grab the logic.
+ _nearLogic = _position nearEntities [["LocationLogicStart"],15];
+ if (count _nearLogic > 0) then {_nearLogic = ([_position, _nearLogic] Call SortByDistance) select 0} else {_nearLogic = objNull};
+
+ if (isNull _nearLogic) exitWith {};
+
+ //--- Position the logic.
+ _nearLogic setPos _position;
+
+ //--- Instanciate the logic.
+ _nearLogic setVariable ["WFBE_B_Completion", 0];
+ _nearLogic setVariable ["WFBE_B_CompletionRatio", 1.1];
+ _nearLogic setVariable ["WFBE_B_Direction", _direction];
+ _nearLogic setVariable ["WFBE_B_Position", _position];
+ _nearLogic setVariable ["WFBE_B_Repair", false];
+ _nearLogic setVariable ["WFBE_B_Type", _rlType];
+
+ //--- Add the logic to the list.
+ [Format ["WFBE_WORKERS_%1LOGIC",str _side],((Format ["WFBE_WORKERS_%1LOGIC",str _side]) Call GetNamespace) + [_nearLogic],true] Call SetNamespace;
+
+ //--- Awaits for 50% of completion.
+ while {true} do {
+ sleep 1;
+ if ((_nearLogic getVariable "WFBE_B_Completion") >= 50) exitWith {};
+ };
+};
+
+if (WF_A2_Arrowhead) then {_objects = [["Land_WoodenRamp",[-2.45703,-0.593262,0.357508],270,1,0],["Land_WoodenRamp",[-2.5083,1.3811,0.357508],270,1,0],[_siteName,[4.6333,0.338135,0.00393867],90,1,0],["Land_Dirthump02_EP1",[-0.587891,8.57935,0.00207901],359.967,1,0],["Land_Dirthump01_EP1",[-3.97363,-8.49219,-4.57764e-005],29.9804,1,0],["Land_WoodenRamp",[8.8335,-0.125977,0.403545],90,1,0]]};
+if (WF_A2_Vanilla || WF_A2_CombinedOps) then {_objects = [["Land_WoodenRamp",[-2.45703,-0.593262,0.357508],270,1,0],["Land_WoodenRamp",[-2.5083,1.3811,0.357508],270,1,0],[_siteName,[4.6333,0.338135,0.00393867],90,1,0],["Land_Dirthump02",[-0.587891,8.57935,0.00207901],359.967,1,0],["Land_Dirthump01",[-3.97363,-8.49219,-4.57764e-005],29.9804,1,0],["Land_WoodenRamp",[8.8335,-0.125977,0.403545],90,1,0]]};
+_constructed = _constructed + ([_position,_direction,_objects] Call _construct);
+
+if !(paramUseWorkers) then {
+ waitUntil {time >= _timeNextUpdate};
+
+ if !(isNull _nearLogic) then {
+ _group = group _nearLogic;
+ deleteVehicle _nearLogic;
+ deleteGroup _group;
+ };
+} else {
+ //--- Awaits for 100%
+ while {true} do {
+ sleep 1;
+ if ((_nearLogic getVariable "WFBE_B_Completion") >= 100) exitWith {};
+ };
+
+ //--- Remove the logic from the list since it's built. Add it back if destroyed.
+ [Format ["WFBE_WORKERS_%1LOGIC",str _side],((Format ["WFBE_WORKERS_%1LOGIC",str _side]) Call GetNamespace) - [_nearLogic],true] Call SetNamespace;
+};
+
+{if !(isNull _x) then {DeleteVehicle _x}} ForEach _constructed;
+
+_site = _type CreateVehicle _position;
+_site SetDir _direction;
+_site SetPos _position;
+
+["Constructed",_type,_side] Spawn SideMessage;
+
+if (!IsNull _site) then {
+ Call Compile Format ["%1BaseStructures = %1BaseStructures + [_site]; publicVariable '%1BaseStructures';",str _side];
+
+ _site SetVehicleInit Format["[this,false,%1] ExecVM 'Client\Init\Init_BaseStructure.sqf'",_side];
+ ProcessInitCommands;
+
+ _site addEventHandler ["hit",{_this Spawn BuildingDamaged}];
+ if (paramHandleFF) then {
+ Call Compile Format ["_site addEventHandler ['handleDamage',{[_this select 0,_this select 2,_this select 3, %1] Call BuildingHandleDamages}]",_side];
+ } else {
+ _site addEventHandler ['handleDamage',{[_this select 0, _this select 2] Call HandleBuildingDamage}];
+ };
+ Call Compile Format ["_site AddEventHandler ['killed',{[_this select 0,_this select 1,%1,'%2'] Spawn BuildingKilled}];",_side,_type];
+
+ diag_log Format["[WFBE (INFORMATION)][frameno:%3 | ticktime:%4] Construction_SmallSite: A %1 %2 has been constructed",str _side,_type,diag_frameno,diag_tickTime];
+};
+
+//--- Base Patrols.
+if ((_type == WESTBAR || _type == EASTBAR) && paramBasePatrols) then {
+ [_site, _side] ExecFSM 'Server\FSM\basepatrol.fsm';
+ diag_log Format["[WFBE (INFORMATION)][frameno:%2 | ticktime:%3] Construction_SmallSite: A %1 Base Patrol Module has been launched",str _side,diag_frameno,diag_tickTime];
+} \ No newline at end of file
diff --git a/Server/Construction/Construction_StationaryDefense.sqf b/Server/Construction/Construction_StationaryDefense.sqf
new file mode 100644
index 0000000..1c62e25
--- /dev/null
+++ b/Server/Construction/Construction_StationaryDefense.sqf
@@ -0,0 +1,94 @@
+/* Description: Creates Defenses. */
+Private ["_buildings","_defense","_direction","_isAIQuery","_isArtillery","_manned","_position","_side","_type"];
+_type = _this select 0;
+_side = _this select 1;
+_position = _this select 2;
+_direction = _this select 3;
+_manned = _this select 4;
+_isAIQuery = _this select 5;
+_manRange = if (count _this > 6) then {_this select 6} else {'WFBE_DEFENSEMANRANGE' Call GetNamespace};
+
+_defense = _type createVehicle _position;
+_defense setDir _direction;
+_defense setPos _position;
+
+diag_log Format["[WFBE (INFORMATION)][frameno:%3 | ticktime:%4] Construction_StationaryDefense: A %1 %2 was created",str _side,_type,diag_frameno,diag_tickTime];
+
+//--- If it's a minefield, we exit the script while spawning it.
+if (_type == 'Sign_Danger') exitWith {
+ Private ["_c","_h","_mine","_mineType","_toWorld"];
+ _mineType = if (_side == east) then {'MineMineE'} else {'MineMine'};
+ _h = -4;
+ _c = 0;
+ for [{_z=0}, {_z<9}, {_z=_z+1}] do{
+ _array = [((_defense worldToModel (getPos _defense)) select 0) - 16 +_c,((_defense worldToModel (getPos _defense)) select 1) + _h];
+ _toWorld = _defense modelToWorld _array;
+ _toWorld set[2,0];
+ _mine = createMine [_mineType, _toWorld,[], 0];
+ _c = _c + 4;
+ };
+
+ _h = 0;
+ _c = 2;
+ for [{_z=0}, {_z<8}, {_z=_z+1}] do{
+ _array = [((_defense worldToModel (getPos _defense)) select 0) - 16 +_c,((_defense worldToModel (getPos _defense)) select 1) + _h];
+ _toWorld = _defense modelToWorld _array;
+ _toWorld set[2,0];
+ _mine = createMine [_mineType, _toWorld,[], 0];
+ _c = _c + 4;
+ };
+
+ _h = 4;
+ _c = 0;
+ for [{_z=0}, {_z<9}, {_z=_z+1}] do{
+ _array = [((_defense worldToModel (getPos _defense)) select 0) - 16 +_c,((_defense worldToModel (getPos _defense)) select 1) + _h];
+ _toWorld = _defense modelToWorld _array;
+ _toWorld set[2,0];
+ _mine = createMine [_mineType, _toWorld,[], 0];
+ _c = _c + 4;
+ };
+ deleteVehicle _defense;
+};
+
+if (_type == 'Concrete_Wall_EP1') then {
+ _defense addEventHandler ['handleDamage',{getDammage (_this select 0)+(_this select 2)/160}];
+};
+
+Call Compile Format ["_defense addEventHandler ['Killed',{[_this select 0,_this select 1,%1] Spawn UnitKilled}]",_side];
+
+if (_defense EmptyPositions "gunner" > 0 && ((('WFBE_AIDEFENSE' Call GetNamespace) > 0) || _isAIQuery)) then {
+ Private ["_alives","_check","_closest","_team"];
+ _team = if (_side == WEST) then {WF_DefenseWestGrp} else {WF_DefenseEastGrp};
+ emptyQueu = emptyQueu + [_defense];
+ [_defense, _side] Spawn HandleReloadDefense;
+ _defense Spawn HandleEmptyVehicle;
+ if (_manned) then {
+ _alives = (units _team) Call GetLiveUnits;
+ if (count _alives < ('WFBE_AIDEFENSE' Call GetNamespace) || _isAIQuery) then {
+ _buildings = (str _side) Call GetSideStructures;
+ _closest = ['BARRACKSTYPE',_buildings,_manRange,_side,_defense] Call BuildingInRange;
+
+ //--- Manning Defenses.
+ if !(isNull _closest) then {
+ [_defense,_side,_team,_closest] Spawn HandleDefense;
+ };
+ };
+ };
+};
+
+if (paramArtyUI) then {
+ Private ["_isAC","_isVeh"];
+ _isVeh = getNumber(configFile >> "CfgVehicles" >> typeOf(_defense) >> "ARTY_IsArtyVehicle");
+ _isAC = getNumber(configFile >> "CfgVehicles" >> typeOf(_defense) >> "artilleryScanner");
+ if (_isVeh == 1 || _isAC == 1) then {
+ _defense setVehicleInit "[this] ExecVM 'Common\Common_InitArtillery.sqf'";
+ processInitCommands;
+ diag_log Format["[WFBE (INFORMATION)][frameno:%3 | ticktime:%4] Construction_StationaryDefense: Artillery UI has been set over the %1 %2",str _side,_type,diag_frameno,diag_tickTime];
+ };
+};
+
+/* Are we dealing with an artillery unit ? */
+_isArtillery = [_type,_side] Call IsArtillery;
+if (_isArtillery != -1) then {[_defense,_isArtillery,_side] Call EquipArtillery};
+
+_defense \ No newline at end of file
diff --git a/Server/FSM/aibase.fsm b/Server/FSM/aibase.fsm
new file mode 100644
index 0000000..8bf9094
--- /dev/null
+++ b/Server/FSM/aibase.fsm
@@ -0,0 +1,677 @@
+/*%FSM<COMPILE "D:\ArmA2\FSM Editor Personal Edition\scriptedFSM.cfg, aibase">*/
+/*%FSM<HEAD>*/
+/*
+item0[] = {"AI_BASE_Init",0,250,-15.348785,-34.504990,74.651321,15.495049,0.000000,"AI BASE" \n "Init"};
+item1[] = {"AI_BASE_End",1,250,121.421707,50.708939,211.421722,100.708939,0.000000,"AI BASE" \n "End"};
+item2[] = {"AI_Base_Running",4,218,122.273567,-35.331635,212.273392,14.668474,0.000000,"AI Base" \n "Running"};
+item3[] = {"AI_Base_Not_Runn",4,218,-15.582159,46.154228,74.417801,96.154228,0.000000,"AI Base" \n "Not Running"};
+item4[] = {"Advanced__Init",2,4346,-16.452499,124.902863,73.547501,174.902863,0.000000,"Advanced " \n "Init"};
+item5[] = {"Loop",8,218,-16.586647,206.297379,73.413300,256.297363,0.000000,"Loop"};
+item6[] = {"Global_Checks",2,250,-16.758400,279.866577,73.241608,329.866577,0.000000,"Global Checks"};
+item7[] = {"Player_Commander",4,218,121.742462,280.140930,211.742416,330.140930,10.000000,"Player" \n "Commander?"};
+item8[] = {"Teams_Type",4,218,-164.034988,280.176239,-74.035011,330.176270,1.000000,"Teams Type"};
+item9[] = {"Update_Teams",2,250,-163.247650,207.771179,-73.247955,257.771149,0.000000,"Update Teams"};
+item10[] = {"Upgrades",4,218,-215.547272,312.433167,-125.547333,362.433167,0.000000,"Upgrades"};
+item11[] = {"Upgrades",2,250,-267.724365,207.955505,-177.724365,257.955505,0.000000,"Upgrades"};
+item12[] = {"",7,210,-169.994583,128.282928,-161.994583,136.282974,0.000000,""};
+link0[] = {0,2};
+link1[] = {0,3};
+link2[] = {2,1};
+link3[] = {3,4};
+link4[] = {4,5};
+link5[] = {5,6};
+link6[] = {6,5};
+link7[] = {6,7};
+link8[] = {6,8};
+link9[] = {6,10};
+link10[] = {7,1};
+link11[] = {8,9};
+link12[] = {9,12};
+link13[] = {10,11};
+link14[] = {11,12};
+link15[] = {12,5};
+globals[] = {0.000000,0,0,0,0,640,480,1,21,6316128,1,-428.130035,157.950897,480.503235,-35.746780,705,621,1};
+window[] = {0,-1,-1,-1,-1,866,125,1470,125,1,723};
+*//*%FSM</HEAD>*/
+class FSM
+{
+ fsmName = "aibase";
+ class States
+ {
+ /*%FSM<STATE "AI_BASE_Init">*/
+ class AI_BASE_Init
+ {
+ name = "AI_BASE_Init";
+ init = /*%FSM<STATEINIT""">*/"_side = _this select 0;" \n
+ "_sideText = Str _side;" \n
+ "" \n
+ "_aibase = Format [""WFBE_%1_AIBase"",_sideText] Call GetNamespace;"/*%FSM</STATEINIT""">*/;
+ precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
+ class Links
+ {
+ /*%FSM<LINK "AI_Base_Not_Runn">*/
+ class AI_Base_Not_Runn
+ {
+ priority = 0.000000;
+ to="Advanced__Init";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/"!_aibase"/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ /*%FSM<LINK "AI_Base_Running">*/
+ class AI_Base_Running
+ {
+ priority = 0.000000;
+ to="AI_BASE_End";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/"_aibase"/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ };
+ };
+ /*%FSM</STATE>*/
+ /*%FSM<STATE "AI_BASE_End">*/
+ class AI_BASE_End
+ {
+ name = "AI_BASE_End";
+ init = /*%FSM<STATEINIT""">*/"[Format[""WFBE_%1_AIBase"",_sideText],false,true] Call SetNamespace;" \n
+ "" \n
+ "if (!isNull _driver && alive _driver) then {" \n
+ " _group = group _driver;" \n
+ " deleteVehicle _vehicle;" \n
+ " deleteVehicle _driver;" \n
+ " deleteGroup _group;" \n
+ "};" \n
+ "if (!isNull _HQDriver && alive _HQDriver) then {" \n
+ " _group = group _HQDriver;" \n
+ " unassignVehicle _HQDriver;" \n
+ " _HQDriver action [""EJECT"",_hq];" \n
+ " deleteVehicle _HQDriver;" \n
+ " deleteGroup _group;" \n
+ "};"/*%FSM</STATEINIT""">*/;
+ precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
+ class Links
+ {
+ };
+ };
+ /*%FSM</STATE>*/
+ /*%FSM<STATE "Advanced__Init">*/
+ class Advanced__Init
+ {
+ name = "Advanced__Init";
+ init = /*%FSM<STATEINIT""">*/"[Format[""WFBE_%1_AIBase"",_sideText],true,true] Call SetNamespace;" \n
+ "" \n
+ "_hq = (_sideText) Call GetSideHQ;" \n
+ "_isDeployed = (_sideText) Call GetSideHQDeployed;" \n
+ "" \n
+ "_types = Format[""WFBE_%1STRUCTURES"",_sideText] Call GetNamespace;" \n
+ "_names = Format[""WFBE_%1STRUCTURENAMES"",_sideText] Call GetNamespace;" \n
+ "_costs = Format[""WFBE_%1STRUCTURECOSTS"",_sideText] Call GetNamespace;" \n
+ "_scripts = Format[""WFBE_%1STRUCTURESCRIPTS"",_sideText] Call GetNamespace;" \n
+ "" \n
+ "_structureState = [false,false,false,false,false,false];" \n
+ "_structureTimer = 0;" \n
+ "_structureTotal = count _structureState;" \n
+ "_structureTypes = [""BARRACKS"",""LIGHT"",""COMMANDCENTER"",""HEAVY"",""AIRCRAFT"",""SERVICEPOINT""];" \n
+ "_structureRelPos = [[75,75],[-75,75],[75,0],[75,-75],[-75,-75],[-75,0]];" \n
+ "_structurePos = [[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]];" \n
+ "" \n
+ "_repairTruck = Format['WFBE_%1REPAIRTRUCK',_sideText] Call GetNamespace;" \n
+ "_crew = Format [""WFBE_%1SOLDIER"",_sideText] Call GetNamespace;" \n
+ "_HQMoving = false;" \n
+ "_repairAlive = false;" \n
+ "_deployed = false;" \n
+ "_vehicle = objNull;" \n
+ "_HQDriver = objNull;" \n
+ "_driver = objNull;" \n
+ "_destination = objNull;" \n
+ "_lastMove = time;" \n
+ "_buildingLocations = [eastStartingLocation,westStartingLocation];" \n
+ "_lastTeamAssignements = -3000;" \n
+ "_lastUpgradeCheck = -120;" \n
+ "_type = 0;" \n
+ "_teams = (Format[""WFBE_%1TEAMS"",_sideText] Call GetNamespace);" \n
+ "_sideMHQRepair = Format [""%1MHQRepair"",_sideText];" \n
+ "_sideSupply = Format [""%1Supplies"",_sideText];" \n
+ "_repairPrice = 'WFBE_MHQREPAIRPRICE' Call GetNamespace;" \n
+ "_vc = 'WFBE_VICTORYCONDITION' Call GetNamespace;" \n
+ "_ul = 'WFBE_UPGRADELABELS' Call GetNamespace;" \n
+ "_upgrlev = 'WFBE_UPGRADELEVELS' Call GetNamespace;" \n
+ "_upgrcond = 'WFBE_UPGRADECONDITION' Call GetNamespace;" \n
+ "_upgrord = 'WFBE_UPGRADEAIORDER' Call GetNamespace;" \n
+ "_hqt = Format[""WFBE_%1HEADQUARTERSTYPE"",_sideText] Call GetNamespace;" \n
+ "" \n
+ "_totalSupply = 0;" \n
+ "{_totalSupply = _totalSupply + (_x getVariable 'maxSupplyValue')} forEach towns;" \n
+ "" \n
+ "_buildings = (_sideText) Call GetSideStructures;" \n
+ "" \n
+ "{" \n
+ " if (_x distance _hq < 500) then {" \n
+ " _type = typeOf _x;" \n
+ " if (_type in [WESTBAR,EASTBAR]) then {_structureState set [0,true]};//--- Barracks." \n
+ " if (_type in [WESTLVF,EASTLVF]) then {_structureState set [1,true]};//--- Light." \n
+ " if (_type in [WESTCC,EASTCC]) then {_structureState set [2,true]};//--- Command Center." \n
+ " if (_type in [WESTHEAVY,EASTHEAVY]) then {_structureState set [3,true]};//--- Heavy." \n
+ " if (_type in [WESTAIR,EASTAIR]) then {_structureState set [4,true]};//--- Aircraft." \n
+ " if (_type in [WESTSP,EASTSP]) then {_structureState set [5,true]};//--- Service Point." \n
+ " };" \n
+ "} forEach _buildings;" \n
+ "" \n
+ "_HQIsAlive = if (alive _hq) then {true} else {false};" \n
+ "_canBeDeploy = true;" \n
+ "if (isMultiplayer && _HQIsAlive) then {" \n
+ " _tbpr = 'WFBE_TOWNBUILDPROTECTIONRANGE' Call GetNamespace;" \n
+ " _isPlayerOnSide = false;" \n
+ " " \n
+ " {" \n
+ " if (!isNull _x) then {" \n
+ " if (side _x == _side && isPlayer _x) then {_isPlayerOnSide = true};" \n
+ " };" \n
+ " } forEach playableUnits;" \n
+ " " \n
+ " if (_isPlayerOnSide) then {" \n
+ " {" \n
+ " if (_x distance _hq < _tbpr) then {_canBeDeploy = false};" \n
+ " } forEach towns;" \n
+ " };" \n
+ "};" \n
+ "" \n
+ "if (!_isDeployed && _HQIsAlive && _canBeDeploy) then {" \n
+ " _pos = getPos _hq;" \n
+ " _pos set [2,0];" \n
+ " _pos = [_pos,(('WFBE_AREAHQUNDEPLOYED' Call GetNamespace) select 0)+20] Call GetSafePlace;" \n
+ " if (count _pos < 1) then {_pos = [_pos,(('WFBE_AREAHQUNDEPLOYED' Call GetNamespace) select 0)+50] Call GetSafePlace};" \n
+ " if (count _pos < 1) then {_pos = Call Compile Format [""%1StartingLocation"",_sideText]};" \n
+ " _dir = getDir _hq;" \n
+ " _HQType = _names select _hqt;" \n
+ " _supply = WF_Logic getVariable Format [""%1Supplies"",_sideText];" \n
+ " if (_supply >= (_costs select _hqt)) then {" \n
+ " [_HQType,_side,_pos,_dir] ExecVM 'Server\Construction\Construction_HQSite.sqf';" \n
+ " _supply = _supply - (_costs select _hqt);" \n
+ " WF_Logic setVariable [Format [""%1Supplies"",_sideText],_supply,true];" \n
+ " };" \n
+ "};" \n
+ "" \n
+ "_CommanderUpgrade = {" \n
+ " Private [""_index"",""_index2"",""_name"",""_side"",""_sideText"",""_time""];" \n
+ " _time = _this select 0;" \n
+ " _index = _this select 1;" \n
+ " _index2 = _this select 2;" \n
+ " _name = _this select 3;" \n
+ " _side = _this select 4;" \n
+ " _sideText = Str _side;" \n
+ " " \n
+ " sleep _time;" \n
+ " " \n
+ " _upgrades = (_sideText) Call GetSideUpgrades;" \n
+ " _upgrades Set [_index2,_index + 1];" \n
+ " Call Compile Format [""%1Upgrades = _upgrades; publicVariable '%1Upgrades';"",_sideText];" \n
+ " " \n
+ " WFBE_LocalizeMessage = [_side,'CLTFNCLOCALIZEMESSAGE',['UpgradeComplete',_index2,(_index + 1)]];" \n
+ " publicVariable 'WFBE_LocalizeMessage';" \n
+ " if (!isMultiplayer || (isServer && local player)) then {[_side,'CLTFNCLOCALIZEMESSAGE',['UpgradeComplete',_index2,(_index + 1)]] Spawn HandlePVF};" \n
+ " [Format[""WFBE_%1_Upgrading"",_sideText],false,true] Call SetNamespace;" \n
+ "" \n
+ " [""NewIntelAvailable"","""",_side,""""] Spawn SideMessage" \n
+ "};" \n
+ "" \n
+ "_lastCheck = 0;"/*%FSM</STATEINIT""">*/;
+ precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
+ class Links
+ {
+ /*%FSM<LINK "Loop">*/
+ class Loop
+ {
+ priority = 0.000000;
+ to="Global_Checks";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/"time - _lastCheck > 10"/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ };
+ };
+ /*%FSM</STATE>*/
+ /*%FSM<STATE "Global_Checks">*/
+ class Global_Checks
+ {
+ name = "Global_Checks";
+ init = /*%FSM<STATEINIT""">*/"//--- EXPERIMENTAL ENHANCED AI COMMANDER HANDLING --- Benny - 08/09/2009." \n
+ "_commander = (_side) Call GetCommanderTeam;" \n
+ "" \n
+ "_lastCheck = time;" \n
+ "_hq = (_sideText) Call GetSideHQ;" \n
+ "" \n
+ "_HQIsAlive = if !(alive _hq) then {false} else {true};" \n
+ "if (_structureTimer > 20) then {" \n
+ " _structureTimer = 0;" \n
+ " //--- Base Buildings handling." \n
+ " for [{_count = 0},{_count < _structureTotal},{_count = _count + 1}] do {" \n
+ " _currentBuilding = _structureTypes select _count;" \n
+ " if !(_structureState select _count) then {" \n
+ " _supply = WF_Logic getVariable _sideSupply;" \n
+ " _index = Format[""WFBE_%1%2TYPE"",_sideText,_currentBuilding] Call GetNamespace;" \n
+ " if ((_supply > (_costs select _index)) && _HQIsAlive) then {" \n
+ " _limit = (Format['WFBE_BUILDINGMAX%1',_currentBuilding]) Call GetNamespace;" \n
+ " _structureType = _names select _index;" \n
+ " _buildings = (_sideText) Call GetSideStructures;" \n
+ " _pursue = true;" \n
+ " " \n
+ " //--- Limit control." \n
+ " _current = {(typeOf _x) == _structureType} count _buildings;" \n
+ " if (_current >= _limit) then {_pursue = false};" \n
+ " " \n
+ " //--- AI Can build." \n
+ " if (_pursue) then {" \n
+ " _x = getPos _hq select 0;" \n
+ " _y = getPos _hq select 1;" \n
+ " _pos = [];" \n
+ " _pos set [0,((_structureRelPos select _count) select 0) + _x];" \n
+ " _pos set [1,((_structureRelPos select _count) select 1) + _y];" \n
+ " _newPos = [0,0,0];" \n
+ " _roads = [];" \n
+ " /* Retrieve the AI Spawn area */" \n
+ " _distance = (Format[""WFBE_%1STRUCTUREDISTANCES"",_sideText] Call GetNamespace) select _index;" \n
+ " _direction = (Format[""WFBE_%1STRUCTUREDIRECTIONS"",_sideText] Call GetNamespace) select _index;" \n
+ " " \n
+ " _continue = true;" \n
+ " _attempts = 0;" \n
+ " _max = 100;" \n
+ " while {_continue} do {" \n
+ " _newPos = [_pos,30,_max,10,0,50,0] Call BIS_fnc_findSafePos;" \n
+ " _aiSpawnPos = [_newPos,_distance,_direction] Call GetPositionFrom;" \n
+ " _aiSpawnPos set [2,0];" \n
+ " _roads = _newPos nearRoads 30;" \n
+ " _roads2 = _aiSpawnPos nearRoads 30;" \n
+ " " \n
+ " _isFlat = _aiSpawnPos isFlatEmpty [" \n
+ " 5, //--- Minimal distance from another object" \n
+ " 0, //--- If 0, just check position. If >0, select new one" \n
+ " 0.6, //--- Max gradient" \n
+ " 5, //--- Gradient area" \n
+ " 0, //--- 0 for restricted water, 2 for required water," \n
+ " false, //--- True if some water can be in 25m radius" \n
+ " objNull //--- Ignored object" \n
+ " ];" \n
+ " " \n
+ " _isTooClose = false;" \n
+ " {if (_x distance _newPos < 70) then {_isTooClose = true}} forEach _structurePos;" \n
+ " if (count _roads == 0 && count _roads2 == 0 && !_isTooClose && count _isFlat != 0) then {_continue = false};" \n
+ " _attempts = _attempts + 1;" \n
+ " if (_attempts > 100 && _max == 100) then {_max = _max + 150};" \n
+ " };" \n
+ " _structurePos set [_count, _newPos];" \n
+ " _dir = 0;" \n
+ " _script = _scripts select _index;" \n
+ " [_structureType,_side,_newPos,_dir,_index] ExecVM (Format[""Server\Construction\Construction_%1.sqf"",_script]);" \n
+ " _supply = _supply - (_costs select _index);" \n
+ " WF_Logic setVariable [_sideSupply,_supply,true];" \n
+ " _structureState set [_count,true];" \n
+ " };" \n
+ " };" \n
+ " };" \n
+ " };" \n
+ " " \n
+ " //--- Base is completed. Proceed to next one." \n
+ " _completed = true;" \n
+ " {if (!_x) then {_completed = false}} forEach _structureState;" \n
+ " if (_completed && !_HQMoving && time - _lastMove > ('WFBE_AICOMMANDERMOVEINTERVAL' Call GetNamespace)) then {_HQMoving = true};" \n
+ " " \n
+ " //--- HQ Moving part (it has to be alive)." \n
+ " if (_HQMoving && _HQIsAlive || _deployed) then {" \n
+ " _isDeployed = (_sideText) Call GetSideHQDeployed;" \n
+ " if (_isDeployed) then {" \n
+ " _pos = getPos _hq;" \n
+ " _dir = getDir _hq;" \n
+ " _HQType = _names select _hqt;" \n
+ " _supply = WF_Logic getVariable _sideSupply;" \n
+ " if (_supply >= (_costs select _hqt)) then {" \n
+ " [_HQType,_side,_pos,_dir] ExecVM ""Server\Construction\Construction_HQSite.sqf"";" \n
+ " _supply = _supply - (_costs select _hqt);" \n
+ " WF_Logic setVariable [_sideSupply,_supply,true];" \n
+ " _deployed = true;" \n
+ " };" \n
+ " };" \n
+ " " \n
+ " if (_deployed) then {" \n
+ " _deployed = false;" \n
+ " if (typeOf _hq != (Format [""WFBE_%1MHQNAME"",_sideText] Call GetNamespace)) then {_deployed = true};" \n
+ " if (!_deployed) then {" \n
+ " _hq = (_sideText) Call GetSideHQ;" \n
+ " _destination = objNull;" \n
+ " _destinations = startingLocations - _buildingLocations;" \n
+ " _sorted = [_hq,_destinations] Call SortByDistance;" \n
+ " _destination = _sorted select 0;" \n
+ " if (!isNull (driver _hq)) then {(driver _hq) setDammage 1};" \n
+ " _group = createGroup _side;" \n
+ " _HQDriver = [_crew,_group,getPos _hq,_side] Call CreateMan;" \n
+ " [_HQDriver] AllowGetIn true;" \n
+ " _HQDriver MoveInDriver _hq;" \n
+ " _HQDriver AssignAsDriver _hq;" \n
+ " [_HQDriver] OrderGetIn true;" \n
+ " _HQDriver doMove ([GetPos _destination,10,20] Call GetRandomPosition);" \n
+ " _lastMove = time;" \n
+ " };" \n
+ " };" \n
+ " " \n
+ " if (_hq distance _destination < 30 && !isNull _destination) then {" \n
+ " _HQMoving = false;" \n
+ " _buildingLocations = _buildingLocations + [_destination];" \n
+ " _destination = objNull;" \n
+ " if (!isNull _HQDriver && alive _HQDriver) then {" \n
+ " _group = group _HQDriver;" \n
+ " unassignVehicle _HQDriver;" \n
+ " _HQDriver action [""EJECT"",_hq];" \n
+ " deleteVehicle _HQDriver;" \n
+ " deleteGroup _group;" \n
+ " };" \n
+ " _isDeployed = (_sideText) Call GetSideHQDeployed;" \n
+ " if (!_isDeployed) then {" \n
+ " _pos = getPos _hq;" \n
+ " _dir = getDir _hq;" \n
+ " _HQType = _names select _hqt;" \n
+ " _supply = WF_Logic getVariable _sideSupply;" \n
+ " if (_supply >= (_costs select _hqt)) then {" \n
+ " [_HQType,_side,_pos,_dir] ExecVM ""Server\Construction\Construction_HQSite.sqf"";" \n
+ " _supply = _supply - (_costs select _hqt);" \n
+ " WF_Logic setVariable [_sideSupply,_supply,true];" \n
+ " };" \n
+ " _buildings = (_sideText) Call GetSideStructures;" \n
+ " _structureState = [false,false,false,false,false,false];" \n
+ " {" \n
+ " _type = typeOf _x;" \n
+ " if (_type in [WESTBAR,EASTBAR] && (_x distance _hq < 500)) then {_structureState set [0,true]} else {_structureState set [0,false]};//--- Barracks." \n
+ " if (_type in [WESTLVF,EASTLVF] && (_x distance _hq < 500)) then {_structureState set [1,true]} else {_structureState set [1,false]};//--- Light." \n
+ " if (_type in [WESTCC,EASTCC] && (_x distance _hq < 500)) then {_structureState set [2,true]} else {_structureState set [2,false]};//--- Command Center." \n
+ " if (_type in [WESTHEAVY,EASTHEAVY] && (_x distance _hq < 500)) then {_structureState set [3,true]} else {_structureState set [3,false]};//--- Heavy." \n
+ " if (_type in [WESTAIR,EASTAIR] && (_x distance _hq < 500)) then {_structureState set [4,true]} else {_structureState set [4,false]};//--- Aircraft." \n
+ " if (_type in [WESTSP,EASTSP] && (_x distance _hq < 500)) then {_structureState set [5,true]} else {_structureState set [5,false]};//--- Service Point." \n
+ " } forEach _buildings;" \n
+ " };" \n
+ " };" \n
+ " };" \n
+ " " \n
+ " //--- HQ Repair Part." \n
+ " if (!_HQIsAlive && _vc != 1) then {" \n
+ " //--- Closest Light." \n
+ " _buildings = (_sideText) Call GetSideStructures;" \n
+ " _checks = [_side,Format [""WFBE_%1LIGHTTYPE"",_sideText] Call GetNamespace,_buildings] Call GetFactories;" \n
+ " _light = objNull;" \n
+ " if (count _checks > 0) then {" \n
+ " _sorted = [_hq,_checks] Call SortByDistance;" \n
+ " _light = _sorted select 0;" \n
+ " };" \n
+ "" \n
+ " //--- Repair truck died." \n
+ " if (!(alive _vehicle) || isNull _vehicle || !alive _driver || isNull _driver) then {_repairAlive = false};" \n
+ " " \n
+ " //--- Light is Alive, we can build a repair truck." \n
+ " if (!_repairAlive && !isNull _light) then {" \n
+ " _type = TypeOf _light;" \n
+ " _index = _names find _type;" \n
+ " _distance = (Format[""WFBE_%1STRUCTUREDISTANCES"",str _side] Call GetNamespace) select _index;" \n
+ " _direction = (Format[""WFBE_%1STRUCTUREDIRECTIONS"",str _side] Call GetNamespace) select _index;" \n
+ " _position = [GetPos _light,_distance,GetDir _light + _direction] Call GetPositionFrom;" \n
+ " " \n
+ " _vehicle = [_repairTruck,_position,_side,true] Call CreateVehi;" \n
+ " _group = createGroup _side;" \n
+ " _driver = [_crew,_group,_position,_side] Call CreateMan;" \n
+ " [_driver] AllowGetIn true;" \n
+ " _driver MoveInDriver _vehicle;" \n
+ " _repairAlive = true;" \n
+ "" \n
+ " [_sideText,'VehiclesCreated',1] Call UpdateStatistics;" \n
+ " [_sideText,'UnitsCreated',1] Call UpdateStatistics;" \n
+ " _driver doMove ([GetPos _hq,10,20] Call GetRandomPosition);" \n
+ " };" \n
+ " " \n
+ " //--- Repair truck is in repair range." \n
+ " if (_driver distance _hq < 50 && _repairAlive) then {" \n
+ " if (isEngineOn _vehicle) then {_vehicle engineOn false};" \n
+ " _supply = WF_Logic getVariable _sideSupply;" \n
+ " if (_supply >= _repairPrice) then {" \n
+ " _isBeingFixed = WF_Logic getVariable _sideMHQRepair;" \n
+ " if (!_isBeingFixed) then {" \n
+ " _supply = _supply - _repairPrice;" \n
+ " WF_Logic setVariable [_sideSupply,_supply,true];" \n
+ " WF_Logic setVariable [_sideMHQRepair,true,true];" \n
+ " [_side] Spawn MHQRepair;" \n
+ " _HQMoving = true;" \n
+ " _deployed = true;" \n
+ " };" \n
+ " if (!isNull _driver && alive _driver) then {" \n
+ " _group = group _driver;" \n
+ " unassignVehicle _driver;" \n
+ " _driver action [""EJECT"",_hq];" \n
+ " deleteVehicle _vehicle;" \n
+ " deleteVehicle _driver;" \n
+ " deleteGroup _group;" \n
+ " };" \n
+ " };" \n
+ " };" \n
+ " };" \n
+ "};" \n
+ "_structureTimer = _structureTimer + 10;"/*%FSM</STATEINIT""">*/;
+ precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
+ class Links
+ {
+ /*%FSM<LINK "Player_Commander">*/
+ class Player_Commander
+ {
+ priority = 10.000000;
+ to="AI_BASE_End";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/"!isNull _commander"/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ /*%FSM<LINK "Teams_Type">*/
+ class Teams_Type
+ {
+ priority = 1.000000;
+ to="Update_Teams";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/"time - _lastTeamAssignements > 300 && isNull _commander"/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ /*%FSM<LINK "Upgrades">*/
+ class Upgrades
+ {
+ priority = 0.000000;
+ to="Upgrades";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/"time - _lastUpgradeCheck > 120 && isNull _commander"/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ /*%FSM<LINK "Loop">*/
+ class Loop
+ {
+ priority = 0.000000;
+ to="Global_Checks";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/"time - _lastCheck > 10"/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ };
+ };
+ /*%FSM</STATE>*/
+ /*%FSM<STATE "Update_Teams">*/
+ class Update_Teams
+ {
+ name = "Update_Teams";
+ init = /*%FSM<STATEINIT""">*/"_lastTeamAssignements = time;" \n
+ "_templates = Format [""WFBE_%1AITEAMTEMPLATES"",_sideText] Call GetNamespace;" \n
+ "_teamTypes = Format [""WFBE_%1AITEAMTYPES"",_sideText] Call GetNamespace;" \n
+ "_currentConfig = [];" \n
+ "_totalFunds = 0;" \n
+ "" \n
+ "{" \n
+ " if !(isNil '_x') then {" \n
+ " _teamIndex = (_x) Call GetTeamType;" \n
+ " _totalFunds = _totalFunds + ((_x) Call GetTeamFunds);" \n
+ " if (_teamIndex == -1) then {_teamIndex = 0};" \n
+ " _currentConfig = _currentConfig + [_teamTypes select _teamIndex];" \n
+ " };" \n
+ "} forEach _teams;" \n
+ "" \n
+ "_avgIncome = _totalFunds / maxPlayers;" \n
+ "_infantryTypes = {_x == 0} count _currentConfig;" \n
+ "_lightTypes = {_x == 1} count _currentConfig;" \n
+ "_heavyTypes = {_x == 2} count _currentConfig;" \n
+ "_airTypes = {_x == 3} count _currentConfig;" \n
+ "" \n
+ "_income = _side Call GetTotalSupplyValue;" \n
+ "" \n
+ "_infPercent = 0;" \n
+ "_lightPercent = 0;" \n
+ "_heavyPercent = 0;" \n
+ "_airPercent = 0;" \n
+ "if (_income < (_totalSupply - (_totalSupply/1.2)) || _avgIncome < 2000) then {_infPercent = 70; _lightPercent = 30};" \n
+ "if ((_income >= (_totalSupply - (_totalSupply/1.2)) && _income < (_totalSupply - (_totalSupply/1.6))) || _avgIncome > 2000) then {_infPercent = 60; _lightPercent = 30; _heavyPercent = 10};" \n
+ "if ((_income >= (_totalSupply - (_totalSupply/1.6)) && _income < (_totalSupply - (_totalSupply/2))) || _avgIncome > 4000) then {_infPercent = 50; _lightPercent = 30; _heavyPercent = 20};" \n
+ "if ((_income >= (_totalSupply - (_totalSupply/2)) && _income < (_totalSupply - (_totalSupply/3))) || _avgIncome > 12000) then {_infPercent = 40; _lightPercent = 30; _heavyPercent = 30};" \n
+ "if ((_income >= (_totalSupply - (_totalSupply/3)) && _income < (_totalSupply - (_totalSupply/4))) || _avgIncome > 18000) then {_infPercent = 30; _lightPercent = 20; _heavyPercent = 40; _airPercent = 10};" \n
+ "if (_income >= (_totalSupply - (_totalSupply/4)) || _avgIncome > 24000) then {_infPercent = 20; _lightPercent = 20; _heavyPercent = 50; _airPercent = 10};" \n
+ "" \n
+ "_infAssign = round(maxPlayers * (_infPercent / 100));" \n
+ "_lightAssign = round(maxPlayers * (_lightPercent / 100));" \n
+ "_heavyAssign = round(maxPlayers * (_heavyPercent / 100));" \n
+ "_airAssign = round(maxPlayers * (_airPercent / 100));" \n
+ "" \n
+ "_infTemplates = [];" \n
+ "_lightTemplates = [];" \n
+ "_heavyTemplates = [];" \n
+ "_airTemplates = [];" \n
+ "" \n
+ "_i = 0;" \n
+ "{" \n
+ " switch (_x) do {" \n
+ " case 0: {_infTemplates = _infTemplates + [_i]};" \n
+ " case 1: {_lightTemplates = _lightTemplates + [_i]};" \n
+ " case 2: {_heavyTemplates = _heavyTemplates + [_i]};" \n
+ " case 3: {_airTemplates = _airTemplates + [_i]};" \n
+ " };" \n
+ " _i = _i + 1;" \n
+ "} forEach _teamTypes;" \n
+ "" \n
+ "{" \n
+ " if !(isNil '_x') then {" \n
+ " _skip = false;" \n
+ " if (_infAssign > 0) then {" \n
+ " _type = _infTemplates select (round(random((count _infTemplates)-1)));" \n
+ " _infAssign = _infAssign - 1;" \n
+ " _skip = true;" \n
+ " };" \n
+ " if (_lightAssign > 0 && !_skip) then {" \n
+ " _type = _lightTemplates select (round(random((count _lightTemplates)-1)));" \n
+ " _lightAssign = _lightAssign - 1;" \n
+ " _skip = true;" \n
+ " };" \n
+ " if (_heavyAssign > 0 && !_skip) then {" \n
+ " _type = _heavyTemplates select (round(random((count _heavyTemplates)-1)));" \n
+ " _heavyAssign = _heavyAssign - 1;" \n
+ " _skip = true;" \n
+ " };" \n
+ " if (_airAssign > 0 && !_skip) then {" \n
+ " _type = _airTemplates select (round(random((count _airTemplates)-1)));" \n
+ " _airAssign = _airAssign - 1;" \n
+ " _skip = true;" \n
+ " };" \n
+ " [_x,_type] Call SetTeamType;" \n
+ " };" \n
+ "} forEach _teams;"/*%FSM</STATEINIT""">*/;
+ precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
+ class Links
+ {
+ /*%FSM<LINK "Loop">*/
+ class Loop
+ {
+ priority = 0.000000;
+ to="Global_Checks";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/"time - _lastCheck > 10"/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ };
+ };
+ /*%FSM</STATE>*/
+ /*%FSM<STATE "Upgrades">*/
+ class Upgrades
+ {
+ name = "Upgrades";
+ init = /*%FSM<STATEINIT""">*/"_lastUpgradeCheck = time;" \n
+ "" \n
+ "//--- Command center is needed for upgrades. AI won't upgrade if he's moving around. Don't bother with money atm, only supply." \n
+ "_isDeployed = (_sideText) Call GetSideHQDeployed;" \n
+ "_buildings = (_sideText) Call GetSideStructures;" \n
+ "_checks = [_side,Format [""WFBE_%1COMMANDCENTERTYPE"",_sideText] Call GetNamespace,_buildings] Call GetFactories;" \n
+ "if (_isDeployed && (count _checks > 0) && !(Format[""WFBE_%1_Upgrading"",_sideText] Call GetNamespace)) then {" \n
+ " _upgrades = (_sideText) Call GetSideUpgrades;" \n
+ " _supply = WF_Logic getVariable _sideSupply;" \n
+ " _break = false;" \n
+ "" \n
+ " _upgrade = -1;" \n
+ " _index = -1;" \n
+ " _supplyLevel = -1;" \n
+ " " \n
+ " for [{_x = 0},{_x < (count _upgrord) && !_break},{_x = _x + 1}] do {" \n
+ " _index = _upgrord select _x;" \n
+ " _canUpgrade = _upgrcond select _index;" \n
+ " //--- Can we use that upgrade?." \n
+ " if (_canUpgrade) then {" \n
+ " _upgradeLevels = _upgrlev select _index;" \n
+ " _currentLevel = _upgrades select _index;" \n
+ " //--- Have we reached the max?." \n
+ " if (_currentLevel < _upgradeLevels) then {" \n
+ " _supplyLevel = ((Format [""WFBE_UPGRADEPRICESLEVEL%1"",(_currentLevel + 1)] Call GetNamespace) select _index) select 0;" \n
+ " //--- Do we have enough ksupply to upgrade?. Otherwise, just skip the upgrade until AI has enough supply." \n
+ " if (_supply > _supplyLevel) then {" \n
+ " _upgrade = _currentLevel;" \n
+ " _break = true;" \n
+ " } else {" \n
+ " _break = true;" \n
+ " };" \n
+ " };" \n
+ " };" \n
+ " };" \n
+ " " \n
+ " if (_upgrade != -1) then {" \n
+ " [Format[""WFBE_%1_Upgrading"",_sideText],true,true] Call SetNamespace;" \n
+ " _supply = _supply - _supplyLevel;" \n
+ " WF_Logic setVariable [_sideSupply,_supply,true];" \n
+ " _time = (Format [""WFBE_UPGRADETIMESLEVEL%1"",_upgrade+1] Call GetNamespace) select _index;" \n
+ " _name = _ul select _index;" \n
+ " [_time,_upgrade,_index,_name,_side] Spawn _CommanderUpgrade;" \n
+ " };" \n
+ "};"/*%FSM</STATEINIT""">*/;
+ precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
+ class Links
+ {
+ /*%FSM<LINK "Loop">*/
+ class Loop
+ {
+ priority = 0.000000;
+ to="Global_Checks";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/"time - _lastCheck > 10"/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ };
+ };
+ /*%FSM</STATE>*/
+ };
+ initState="AI_BASE_Init";
+ finalStates[] =
+ {
+ "AI_BASE_End"
+ };
+};
+/*%FSM</COMPILE>*/ \ No newline at end of file
diff --git a/Server/FSM/aicommander.fsm b/Server/FSM/aicommander.fsm
new file mode 100644
index 0000000..6deb87f
--- /dev/null
+++ b/Server/FSM/aicommander.fsm
@@ -0,0 +1,2025 @@
+/*%FSM<COMPILE "F:\ArmA2\FSM Editor Personal Edition\scriptedFSM.cfg, aicommander">*/
+/*%FSM<HEAD>*/
+/*
+item0[] = {"Init",0,250,29.117783,-243.242416,119.117828,-193.242630,0.000000,"Init"};
+item1[] = {"End",1,250,-216.387955,-52.508366,-126.387947,-2.508394,0.000000,"End"};
+item2[] = {"Commander_Check",2,250,-82.090652,-139.314026,7.909359,-89.314034,0.000000,"Commander" \n "Check"};
+item3[] = {"AI",4,218,43.444695,-138.881104,133.444702,-88.881126,0.000000,"AI"};
+item4[] = {"Gameover",4,218,-216.387955,-139.464890,-126.387947,-89.464890,0.000000,"Gameover"};
+item5[] = {"_",8,218,-51.736092,-228.307785,-21.083296,-207.387909,0.000000,""};
+item6[] = {"Check_HQ",2,250,167.429672,-138.824554,257.429688,-88.824554,0.000000,"Check HQ"};
+item7[] = {"Alive",4,218,167.029816,-63.614120,257.029968,-13.613998,0.000000,"Alive"};
+item8[] = {"Dead",4,218,167.829926,-230.037415,257.830078,-180.037399,0.000000,"Dead"};
+item9[] = {"Check_HQ_Status",2,250,298.248291,-63.614052,388.248230,-13.614052,0.000000,"Check HQ" \n "Status"};
+item10[] = {"Mobilized",4,218,433.250854,-64.045685,523.250732,-14.045616,0.000000,"Mobilized"};
+item11[] = {"Deployed",4,218,298.503387,29.438709,388.503357,79.438721,0.000000,"Deployed"};
+item12[] = {"Check_Repair",2,250,296.539734,-230.131653,386.539734,-180.131622,0.000000,"Check" \n "Repair"};
+item13[] = {"Repair_Moving",4,218,429.166107,-228.948074,519.166382,-178.948105,0.000000,"Repair" \n "Moving"};
+item14[] = {"Repair_Null",4,218,429.329987,-153.716705,519.330261,-103.716690,0.000000,"Repair" \n "Null"};
+item15[] = {"Check_Status",2,250,563.136597,-243.488693,653.136597,-193.488678,0.000000,"Check" \n "Status"};
+item16[] = {"Check_Light",2,250,562.396851,-183.315887,652.396851,-133.315872,0.000000,"Check" \n "Light"};
+item17[] = {"Alive",4,218,715.106934,-184.222443,805.106934,-134.222443,0.000000,"Alive"};
+item18[] = {"Dead",4,218,715.106995,-243.430771,805.106995,-193.430771,0.000000,"Dead"};
+item19[] = {"Create_Repair",2,250,858.268066,-185.584671,948.268066,-135.584671,0.000000,"Create" \n "Repair"};
+item20[] = {"Skip",2,250,859.370850,-245.140686,949.370911,-195.140793,0.000000,"Skip"};
+item21[] = {"",7,210,1028.113892,-194.407562,1036.114014,-186.407562,0.000000,""};
+item22[] = {"",7,210,1027.204102,-330.018250,1035.203979,-322.018250,0.000000,""};
+item23[] = {"",7,210,-41.498245,-331.121155,-33.498249,-323.121155,0.000000,""};
+item24[] = {"Check_Status_1",2,250,567.105652,-64.265991,657.105652,-14.265972,0.000000,"Check" \n "Status"};
+item25[] = {"Moving",4,218,709.035706,-103.210243,799.035706,-53.210236,0.000000,"Moving"};
+item26[] = {"Empty",4,218,703.864319,-36.693626,793.864319,13.306374,0.000000,"Empty"};
+item27[] = {"Spawn___Lead",2,250,853.857727,-35.590744,943.857727,14.409276,0.000000,"Spawn & Lead"};
+item28[] = {"Check_Position",2,250,852.754883,-103.970093,942.754883,-53.970085,0.000000,"Check" \n "Position"};
+item29[] = {"",7,210,1028.114868,-51.031216,1036.114990,-43.031216,0.000000,""};
+item30[] = {"Check_Move",2,250,439.100250,29.323673,529.100098,79.323669,0.000000,"Check" \n "Move"};
+item31[] = {"Move",4,218,579.575684,29.323677,669.576050,79.323685,0.000000,"Move"};
+item32[] = {"Proceed",4,218,436.745636,114.689537,526.745728,164.689575,0.000000,"Proceed"};
+item33[] = {"Move",2,250,712.286255,29.029057,802.286255,79.029053,0.000000,"Move"};
+item34[] = {"",7,210,1028.016968,50.640667,1036.016846,58.640675,0.000000,""};
+item35[] = {"Check_Base",2,250,292.344421,114.037247,382.344421,164.037247,0.000000,"Check" \n "Base"};
+item36[] = {"Update",4,218,138.614502,145.674393,228.614502,195.674393,0.000000,"Update"};
+item37[] = {"Skip",4,218,138.614502,78.700897,228.614502,128.700897,0.000000,"Skip"};
+item38[] = {"Skip_1",2,250,-24.498369,79.781113,65.501648,129.781113,0.000000,"Skip"};
+item39[] = {"Update_Base",2,250,-24.498356,146.754593,65.501656,196.754593,0.000000,"Update" \n "Base"};
+item40[] = {"_",8,218,-113.658813,123.267853,-83.006012,144.187729,0.000000,""};
+item41[] = {"Check_Defenses",2,250,-263.351929,109.838028,-173.352142,159.838013,0.000000,"Check Defenses"};
+item42[] = {"Update",4,218,-400.730560,148.182983,-310.730560,198.182983,0.000000,"Update"};
+item43[] = {"Skip",4,218,-400.730560,81.209473,-310.730560,131.209488,0.000000,"Skip"};
+item44[] = {"Skip_2",2,250,-563.843628,82.289688,-473.843506,132.289688,0.000000,"Skip"};
+item45[] = {"Update_Defenses",2,250,-563.843628,149.263184,-473.843384,199.263184,0.000000,"Update" \n "Defenses"};
+item46[] = {"_",8,218,-653.004028,125.776443,-622.351196,146.696320,0.000000,""};
+item47[] = {"Check_Upgrades",2,250,-683.420288,273.342194,-593.420410,323.342194,0.000000,"Check Upgrades"};
+item48[] = {"Update",4,218,-508.776093,300.503662,-418.775909,350.503662,0.000000,"Update"};
+item49[] = {"Skip",4,218,-508.776093,233.530121,-418.775909,283.530151,0.000000,"Skip"};
+item50[] = {"Skip_3",2,250,-329.947998,234.610321,-239.947815,284.610352,0.000000,"Skip"};
+item51[] = {"Update_Upgrades",2,250,-329.947998,301.583862,-239.947693,351.583862,0.000000,"Update" \n "Upgrades"};
+item52[] = {"_",8,218,-167.467773,275.580872,-136.814941,296.500732,0.000000,""};
+item53[] = {"Check_Types",2,250,-197.088531,386.316132,-107.088661,436.316132,0.000000,"Check Types"};
+item54[] = {"Update",4,218,-22.444336,413.477600,67.555847,463.477600,0.000000,"Update"};
+item55[] = {"Skip",4,218,-22.444336,346.504059,67.555847,396.504089,0.000000,"Skip"};
+item56[] = {"Skip_4",2,250,156.383759,347.584259,246.383911,397.584290,0.000000,"Skip"};
+item57[] = {"Update_Types",2,4346,156.383759,414.557800,246.384033,464.557800,0.000000,"Update" \n "Types"};
+item58[] = {"_",8,218,318.863953,388.554810,349.516785,409.474670,0.000000,""};
+item59[] = {"Check_Move_1",2,250,-135.812561,688.819275,-45.812672,738.819336,0.000000,"Check Move"};
+item60[] = {"Check_Workers",2,250,289.874207,510.880676,379.874207,560.880615,0.000000,"Check" \n "Workers"};
+item61[] = {"Workers",4,218,145.521439,513.043701,235.521378,563.043640,0.000000,"Workers"};
+item62[] = {"Time",4,218,140.350052,579.560242,230.349976,629.560242,0.000000,"Time"};
+item63[] = {"Nothing",2,250,-6.216207,579.195068,83.783813,629.194946,0.000000,"Nothing"};
+item64[] = {"Update_Workers",2,250,-7.319051,510.815735,82.681030,560.815674,0.000000,"Update" \n "Workers"};
+item65[] = {"Update",4,218,28.554688,721.853210,118.554871,771.853149,0.000000,"Update"};
+item66[] = {"Skip",4,218,28.554688,654.879639,118.554871,704.879700,0.000000,"Skip"};
+item67[] = {"Skip_5",2,250,207.382751,655.959839,297.382874,705.959900,0.000000,"Skip"};
+item68[] = {"Update_Move",2,250,206.000549,721.551208,296.000916,771.551147,0.000000,"Update" \n "Move"};
+item69[] = {"",7,210,1026.111328,696.930481,1034.111206,704.930481,0.000000,""};
+item70[] = {"_",8,218,-105.421837,566.197021,-74.769012,587.116821,0.000000,""};
+item71[] = {"Being_Fixed",4,218,429.542877,-297.545441,519.542847,-247.545441,0.000000,"Being Fixed"};
+item72[] = {"Skip_6",2,250,562.756470,-305.701782,652.756470,-255.701782,0.000000,"Skip"};
+item73[] = {"",7,210,760.996826,-287.467224,768.996826,-279.467224,0.000000,""};
+item74[] = {"",7,210,364.846039,698.257568,372.846039,706.257568,0.000000,""};
+link0[] = {0,5};
+link1[] = {2,3};
+link2[] = {2,4};
+link3[] = {3,6};
+link4[] = {4,1};
+link5[] = {5,2};
+link6[] = {6,7};
+link7[] = {6,8};
+link8[] = {7,9};
+link9[] = {8,12};
+link10[] = {9,10};
+link11[] = {9,11};
+link12[] = {10,24};
+link13[] = {11,30};
+link14[] = {12,13};
+link15[] = {12,14};
+link16[] = {12,71};
+link17[] = {13,15};
+link18[] = {14,16};
+link19[] = {15,73};
+link20[] = {16,17};
+link21[] = {16,18};
+link22[] = {17,19};
+link23[] = {18,20};
+link24[] = {19,21};
+link25[] = {20,21};
+link26[] = {21,22};
+link27[] = {22,23};
+link28[] = {23,5};
+link29[] = {24,25};
+link30[] = {24,26};
+link31[] = {25,28};
+link32[] = {26,27};
+link33[] = {27,29};
+link34[] = {28,29};
+link35[] = {29,21};
+link36[] = {30,31};
+link37[] = {30,32};
+link38[] = {31,33};
+link39[] = {32,35};
+link40[] = {33,34};
+link41[] = {34,29};
+link42[] = {35,36};
+link43[] = {35,37};
+link44[] = {36,39};
+link45[] = {37,38};
+link46[] = {38,40};
+link47[] = {39,40};
+link48[] = {40,41};
+link49[] = {41,42};
+link50[] = {41,43};
+link51[] = {42,45};
+link52[] = {43,44};
+link53[] = {44,46};
+link54[] = {45,46};
+link55[] = {46,47};
+link56[] = {47,48};
+link57[] = {47,49};
+link58[] = {48,51};
+link59[] = {49,50};
+link60[] = {50,52};
+link61[] = {51,52};
+link62[] = {52,53};
+link63[] = {53,54};
+link64[] = {53,55};
+link65[] = {54,57};
+link66[] = {55,56};
+link67[] = {56,58};
+link68[] = {57,58};
+link69[] = {58,60};
+link70[] = {59,65};
+link71[] = {59,66};
+link72[] = {60,61};
+link73[] = {60,62};
+link74[] = {61,64};
+link75[] = {62,63};
+link76[] = {63,70};
+link77[] = {64,70};
+link78[] = {65,68};
+link79[] = {66,67};
+link80[] = {67,74};
+link81[] = {68,74};
+link82[] = {69,34};
+link83[] = {70,59};
+link84[] = {71,72};
+link85[] = {72,73};
+link86[] = {73,22};
+link87[] = {74,69};
+globals[] = {0.000000,0,0,0,0,640,480,1,103,6316128,1,-734.083008,803.701538,900.392273,-375.968842,900,777,1};
+window[] = {0,-1,-1,-1,-1,1037,110,1562,145,1,918};
+*//*%FSM</HEAD>*/
+class FSM
+{
+ fsmName = "aicommander";
+ class States
+ {
+ /*%FSM<STATE "Init">*/
+ class Init
+ {
+ name = "Init";
+ init = /*%FSM<STATEINIT""">*/"_side = _this select 0;" \n
+ "_sideText = Str _side;" \n
+ "_sideID = (_side) Call GetSideID;" \n
+ "" \n
+ "_hq = (_side) Call GetSideHQ;" \n
+ "" \n
+ "_lastHQMoveOrder = 0;" \n
+ "_lastHQMovePos = getPos _hq;" \n
+ "" \n
+ "_lastRepairMoveOrder = 0;" \n
+ "_lastRepairMosPos = [0,0,0];" \n
+ "" \n
+ "_lastUpdate = -500;" \n
+ "_lastUpdateBase = -500;" \n
+ "_lastUpdateDefenses = -500;" \n
+ "_lastUpdateMove = -500;" \n
+ "_lastUpdateTypes = -500;" \n
+ "_lastUpdateUpgrades = -500;" \n
+ "_lastUpdateWorkers = -500;" \n
+ "" \n
+ "//--- Init the base types." \n
+ "_types = Format[""WFBE_%1STRUCTURES"",_sideText] Call GetNamespace;" \n
+ "_names = Format[""WFBE_%1STRUCTURENAMES"",_sideText] Call GetNamespace;" \n
+ "_costs = Format[""WFBE_%1STRUCTURECOSTS"",_sideText] Call GetNamespace;" \n
+ "_scripts = Format[""WFBE_%1STRUCTURESCRIPTS"",_sideText] Call GetNamespace;" \n
+ "" \n
+ "_eastStructuresNames = ""WFBE_EASTSTRUCTURENAMES"" Call GetNamespace;" \n
+ "_westStructuresNames = ""WFBE_WESTSTRUCTURENAMES"" Call GetNamespace;" \n
+ "" \n
+ "_hqCanMove = false;" \n
+ "_hqDeployAt = ([_hq, startingLocations] Call SortByDistance) select 0;" \n
+ "_hqDeployRange = 'WFBE_HQDEPLOYRANGE' Call GetNamespace;" \n
+ "_hqType = Format[""WFBE_%1HEADQUARTERSTYPE"",_sideText] Call GetNamespace;" \n
+ "" \n
+ "_upgradesLabels = 'WFBE_UPGRADELABELS' Call GetNamespace;" \n
+ "_upgradesLevels = 'WFBE_UPGRADELEVELS' Call GetNamespace;" \n
+ "_upgradesConditions = 'WFBE_UPGRADECONDITION' Call GetNamespace;" \n
+ "_upgradesOrders = 'WFBE_UPGRADEAIORDER' Call GetNamespace;" \n
+ "" \n
+ "_baseAiInterval = 'WFBE_AICOMMANDERMOVEINTERVAL' Call GetNamespace;" \n
+ "_baseAiIntervalLast = time;" \n
+ "_baseAlive = [];" \n
+ "_baseDefenses = [];" \n
+ "_baseDefensesTemplate = [[Format[""WFBE_%1DEFENSES_MG"",_sideText] Call GetNamespace,[150,150],0,""MG""],[Format[""WFBE_%1DEFENSES_MG"",_sideText] Call GetNamespace,[-150,150],0,""MG""],[Format[""WFBE_%1DEFENSES_MG"",_sideText] Call GetNamespace,[-150,-150],180,""MG""],[Format[""WFBE_%1DEFENSES_MG"",_sideText] Call GetNamespace,[150,-150],180,""MG""],[Format[""WFBE_%1DEFENSES_AAPOD"",_sideText] Call GetNamespace,[0,135],0,""AAPOD""],[Format[""WFBE_%1DEFENSES_AAPOD"",_sideText] Call GetNamespace,[110,-145],90,""AAPOD""],[Format[""WFBE_%1DEFENSES_AAPOD"",_sideText] Call GetNamespace,[-110,-145],270,""AAPOD""],[Format[""WFBE_%1DEFENSES_MASH"",_sideText] Call GetNamespace,[0,-80],180,""MASH""],[Format[""WFBE_%1DEFENSES_ATPOD"",_sideText] Call GetNamespace,[0,-130],0,""""],[Format[""WFBE_%1DEFENSES_ATPOD"",_sideText] Call GetNamespace,[-100,130],315,""""],[Format[""WFBE_%1DEFENSES_ATPOD"",_sideText] Call GetNamespace,[100,130],45,""""],[Format[""WFBE_%1DEFENSES_CANNON"",_sideText] Call GetNamespace,[120,120],0,""""],[Format[""WFBE_%1DEFENSES_CANNON"",_sideText] Call GetNamespace,[-120,-120],180,""""]];" \n
+ "_baseDirections = Format[""WFBE_%1STRUCTUREDIRECTIONS"",_sideText] Call GetNamespace;" \n
+ "_baseDistances = Format[""WFBE_%1STRUCTUREDISTANCES"",_sideText] Call GetNamespace;" \n
+ "_baseInProgress = [];" \n
+ "_baseOrder = [""Barracks"",""Light"",""CommandCenter"",""Heavy"",""Aircraft"",""ServicePoint""];" \n
+ "_baseStructureRelPos = [[50,50],[-50,50],[50,0],[50,-50],[-50,-50],[-50,0]];" \n
+ "_baseTimerCheck = [];" \n
+ "_baseWalls = [];" \n
+ "" \n
+ "_currentContent = 0;" \n
+ "_crew = Format [""WFBE_%1SOLDIER"",_sideText] Call GetNamespace;" \n
+ "_driver = objNull;" \n
+ "_overallDefenses = [];" \n
+ "_repairPrice = 'WFBE_MHQREPAIRPRICE' Call GetNamespace;" \n
+ "_repairTruck = objNull;" \n
+ "_victoryCondition = 'WFBE_VICTORYCONDITION' Call GetNamespace;" \n
+ "" \n
+ "_teams = (Format[""WFBE_%1TEAMS"",_sideText] Call GetNamespace);" \n
+ "_templates = Format [""WFBE_%1AITEAMTEMPLATES"",_sideText] Call GetNamespace;" \n
+ "_teamTypes = Format [""WFBE_%1AITEAMTYPES"",_sideText] Call GetNamespace;" \n
+ "_teamUpgrades = Format [""WFBE_%1AITEAMUPGRADES"",_sideText] Call GetNamespace;" \n
+ "_totalSupply = 0;" \n
+ "{_totalSupply = _totalSupply + (_x getVariable 'maxSupplyValue')} forEach towns;" \n
+ "" \n
+ "_workerPrice = if (paramUseWorkers) then {'WFBE_WORKERS_PRICE' Call GetNamespace} else {0};" \n
+ "" \n
+ "_overallDefenses = missionNamespace getVariable Format [""WFBE_Defenses_%1_Global"",_sideText];" \n
+ "_currentContent = 0;" \n
+ "_totalContent = 0;" \n
+ "if !(isNil ""_overallDefenses"") then {_totalContent = count _overallDefenses} else {_overallDefenses = []};" \n
+ "" \n
+ "_baseDefenses = [];" \n
+ "_defenses = missionNamespace getVariable Format [""WFBE_Defenses_%1"",_sideText];" \n
+ "for '_i' from 0 to count(_baseDefensesTemplate)-1 do {_baseDefenses set [_i,["""",[]]]};" \n
+ "if (isNil '_defenses') then {" \n
+ " missionNamespace setVariable [Format [""WFBE_Defenses_%1"",_sideText],_baseDefenses];" \n
+ "} else {" \n
+ " //--- Check the distance;" \n
+ " _currentContent = -1;" \n
+ " for '_i' from 0 to _totalContent-1 do { " \n
+ " _defenses = _overallDefenses select _i;" \n
+ " {" \n
+ " if (count(_x select 1) > 0) then {" \n
+ " if (alive (_x select 0)) then {" \n
+ " if ((_x select 0) distance _hq < 750) then {" \n
+ " _baseDefenses = _defenses;" \n
+ " _currentContent = _i;" \n
+ " };" \n
+ " };" \n
+ " };" \n
+ " if (_currentContent != -1) exitWith {};" \n
+ " } forEach _defenses;" \n
+ " if (_currentContent != -1) exitWith {};" \n
+ " };" \n
+ "};" \n
+ "" \n
+ "if (_currentContent == -1) then {_currentContent = count _overallDefenses};" \n
+ "" \n
+ "_baseAiIntervalLast = time;" \n
+ "_baseAlive = [false,false,false,false,false,false];" \n
+ "_baseInProgress = [false,false,false,false,false,false];" \n
+ "_baseTimerCheck = [0,0,0,0,0,0];" \n
+ "_baseWalls = [[],[],[],[],[],[]];" \n
+ "" \n
+ "_isStartingFSM = true;"/*%FSM</STATEINIT""">*/;
+ precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
+ class Links
+ {
+ /*%FSM<LINK "_">*/
+ class _
+ {
+ priority = 0.000000;
+ to="Commander_Check";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/"time - _lastUpdate > 10"/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ };
+ };
+ /*%FSM</STATE>*/
+ /*%FSM<STATE "End">*/
+ class End
+ {
+ name = "End";
+ init = /*%FSM<STATEINIT""">*/""/*%FSM</STATEINIT""">*/;
+ precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
+ class Links
+ {
+ };
+ };
+ /*%FSM</STATE>*/
+ /*%FSM<STATE "Commander_Check">*/
+ class Commander_Check
+ {
+ name = "Commander_Check";
+ init = /*%FSM<STATEINIT""">*/"_commander = (_side) Call GetCommanderTeam;" \n
+ "" \n
+ "_lastUpdate = time;"/*%FSM</STATEINIT""">*/;
+ precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
+ class Links
+ {
+ /*%FSM<LINK "Gameover">*/
+ class Gameover
+ {
+ priority = 0.000000;
+ to="End";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/"gameOver || !isNull _commander"/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ /*%FSM<LINK "AI">*/
+ class AI
+ {
+ priority = 0.000000;
+ to="Check_HQ";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/"!gameOver && isNull _commander"/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ };
+ };
+ /*%FSM</STATE>*/
+ /*%FSM<STATE "Check_HQ">*/
+ class Check_HQ
+ {
+ name = "Check_HQ";
+ init = /*%FSM<STATEINIT""">*/"_hq = (_sideText) Call GetSideHQ;"/*%FSM</STATEINIT""">*/;
+ precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
+ class Links
+ {
+ /*%FSM<LINK "Dead">*/
+ class Dead
+ {
+ priority = 0.000000;
+ to="Check_Repair";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/"!(alive _hq) && _victoryCondition != 1"/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ /*%FSM<LINK "Alive">*/
+ class Alive
+ {
+ priority = 0.000000;
+ to="Check_HQ_Status";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/"alive _hq"/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ };
+ };
+ /*%FSM</STATE>*/
+ /*%FSM<STATE "Check_HQ_Status">*/
+ class Check_HQ_Status
+ {
+ name = "Check_HQ_Status";
+ init = /*%FSM<STATEINIT""">*/"_hqDeployed = (_sideText) Call GetSideHQDeployed;"/*%FSM</STATEINIT""">*/;
+ precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
+ class Links
+ {
+ /*%FSM<LINK "Deployed">*/
+ class Deployed
+ {
+ priority = 0.000000;
+ to="Check_Move";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/"_hqDeployed"/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ /*%FSM<LINK "Mobilized">*/
+ class Mobilized
+ {
+ priority = 0.000000;
+ to="Check_Status_1";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/"!_hqDeployed"/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ };
+ };
+ /*%FSM</STATE>*/
+ /*%FSM<STATE "Check_Repair">*/
+ class Check_Repair
+ {
+ name = "Check_Repair";
+ init = /*%FSM<STATEINIT""">*/"_isBeingRepaired = WF_Logic getVariable Format [""%1MHQRepair"",_sideText];"/*%FSM</STATEINIT""">*/;
+ precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
+ class Links
+ {
+ /*%FSM<LINK "Repair_Null">*/
+ class Repair_Null
+ {
+ priority = 0.000000;
+ to="Check_Light";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/"!alive _repairTruck && !_isBeingRepaired"/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ /*%FSM<LINK "Being_Fixed">*/
+ class Being_Fixed
+ {
+ priority = 0.000000;
+ to="Skip_6";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/"_isBeingRepaired"/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ /*%FSM<LINK "Repair_Moving">*/
+ class Repair_Moving
+ {
+ priority = 0.000000;
+ to="Check_Status";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/"alive _repairTruck && !_isBeingRepaired"/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ };
+ };
+ /*%FSM</STATE>*/
+ /*%FSM<STATE "Check_Status">*/
+ class Check_Status
+ {
+ name = "Check_Status";
+ init = /*%FSM<STATEINIT""">*/"if (!(alive _driver) || !canMove(_repairTruck)) then {" \n
+ " {_x setDammage 1} forEach [_driver, _repairTruck];" \n
+ "} else {" \n
+ " if (_lastRepairMosPos distance (getPos _repairTruck) < 20) then {" \n
+ " _lastRepairMoveOrder = _lastRepairMoveOrder + 5;" \n
+ " } else {" \n
+ " _lastRepairMoveOrder = 0;" \n
+ " };" \n
+ "" \n
+ " if (_lastRepairMoveOrder > 40) then {" \n
+ " _lastRepairMoveOrder = 0;" \n
+ " [_hq, getPos _repairTruck, 50] Call PlaceSafe;" \n
+ " (driver _hq) doMove ([getPos _hq,10,20] Call GetRandomPosition);" \n
+ " };" \n
+ "" \n
+ " _lastRepairMosPos = getPos _repairTruck;" \n
+ "};" \n
+ "" \n
+ "//--- Repair if possible." \n
+ "if (_repairTruck distance _hq < 75) then {" \n
+ " if (isEngineOn _repairTruck) then {_repairTruck engineOn false};" \n
+ " _currency = if !(paramMoneyOnly) then {(_side) Call GetSideSupply} else {(_side) Call GetAICommanderFunds};" \n
+ " if (_currency >= _repairPrice) then {" \n
+ " if !(paramMoneyOnly) then {" \n
+ " [_side,-_repairPrice] Call ChangeSideSupply;" \n
+ " } else {" \n
+ " [_side,-_repairPrice] Call ChangeAICommanderFunds;" \n
+ " };" \n
+ " " \n
+ " WF_Logic setVariable [Format [""%1MHQRepair"",_sideText],true,true];" \n
+ " [_side] Spawn MHQRepair;" \n
+ "" \n
+ " if (alive _driver) then {_group = group _driver; deleteVehicle _driver; deleteGroup _group};" \n
+ " deleteVehicle _repairTruck;" \n
+ "" \n
+ " //--- Determine a suitable moving location close by." \n
+ " _sortedLocation = [_hq, startingLocations] Call SortByDistance;" \n
+ "" \n
+ " _hqDeployAt = objNull;" \n
+ " {" \n
+ " if (count (nearestObjects [_x, _names, 400]) > 0 && _x distance _hq < 2000) exitWith {_hqDeployAt = _x};" \n
+ " } forEach _sortedLocation;" \n
+ "" \n
+ " if (isNull _hqDeployAt) then {_hqDeployAt = getPos _hq};" \n
+ " _isStartingFSM = false;" \n
+ " };" \n
+ "};"/*%FSM</STATEINIT""">*/;
+ precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
+ class Links
+ {
+ /*%FSM<LINK "_">*/
+ class _
+ {
+ priority = 0.000000;
+ to="Commander_Check";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/"time - _lastUpdate > 10"/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ };
+ };
+ /*%FSM</STATE>*/
+ /*%FSM<STATE "Check_Light">*/
+ class Check_Light
+ {
+ name = "Check_Light";
+ init = /*%FSM<STATEINIT""">*/"_buildings = (_sideText) Call GetSideStructures;" \n
+ "_checks = [_side,Format [""WFBE_%1LIGHTTYPE"",_sideText] Call GetNamespace,_buildings] Call GetFactories;" \n
+ "_light = objNull;" \n
+ "" \n
+ "if (count _checks > 0) then {" \n
+ " _sorted = [_hq,_checks] Call SortByDistance;" \n
+ " _light = _sorted select 0;" \n
+ "};" \n
+ "" \n
+ "if (alive _driver) then {_group = group _driver; deleteVehicle _driver; deleteGroup _group};"/*%FSM</STATEINIT""">*/;
+ precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
+ class Links
+ {
+ /*%FSM<LINK "Dead">*/
+ class Dead
+ {
+ priority = 0.000000;
+ to="Skip";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/"!(alive _light)"/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ /*%FSM<LINK "Alive">*/
+ class Alive
+ {
+ priority = 0.000000;
+ to="Create_Repair";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/"alive _light"/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ };
+ };
+ /*%FSM</STATE>*/
+ /*%FSM<STATE "Create_Repair">*/
+ class Create_Repair
+ {
+ name = "Create_Repair";
+ init = /*%FSM<STATEINIT""">*/"_type = typeOf _light;" \n
+ "_index = _names find _type;" \n
+ "_distance = (Format[""WFBE_%1STRUCTUREDISTANCES"",_sideText] Call GetNamespace) select _index;" \n
+ "_direction = (Format[""WFBE_%1STRUCTUREDIRECTIONS"",_sideText] Call GetNamespace) select _index;" \n
+ "_position = [getPos _light,_distance,getDir _light + _direction] Call GetPositionFrom;" \n
+ "" \n
+ "_repairTruck = [Format[""WFBE_%1REPAIRTRUCK"",_sideText] Call GetNamespace,_position,_side,true] Call CreateVehi;" \n
+ "_group = createGroup _side;" \n
+ "_driver = [_crew,_group,_position,_side] Call CreateMan;" \n
+ "[_driver] allowGetIn true;" \n
+ "_driver moveInDriver _repairTruck;" \n
+ "_repairAlive = true;" \n
+ "" \n
+ "[_sideText,'VehiclesCreated',1] Call UpdateStatistics;" \n
+ "[_sideText,'UnitsCreated',1] Call UpdateStatistics;" \n
+ "_driver doMove ([GetPos _hq,10,20] Call GetRandomPosition);"/*%FSM</STATEINIT""">*/;
+ precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
+ class Links
+ {
+ /*%FSM<LINK "_">*/
+ class _
+ {
+ priority = 0.000000;
+ to="Commander_Check";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/"time - _lastUpdate > 10"/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ };
+ };
+ /*%FSM</STATE>*/
+ /*%FSM<STATE "Skip">*/
+ class Skip
+ {
+ name = "Skip";
+ init = /*%FSM<STATEINIT""">*/""/*%FSM</STATEINIT""">*/;
+ precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
+ class Links
+ {
+ /*%FSM<LINK "_">*/
+ class _
+ {
+ priority = 0.000000;
+ to="Commander_Check";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/"time - _lastUpdate > 10"/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ };
+ };
+ /*%FSM</STATE>*/
+ /*%FSM<STATE "Check_Status_1">*/
+ class Check_Status_1
+ {
+ name = "Check_Status_1";
+ init = /*%FSM<STATEINIT""">*/"_inRange = if (_hq distance _hqDeployAt < 200) then {true} else {false};"/*%FSM</STATEINIT""">*/;
+ precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
+ class Links
+ {
+ /*%FSM<LINK "Empty">*/
+ class Empty
+ {
+ priority = 0.000000;
+ to="Spawn___Lead";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/"!_isStartingFSM || !_inRange"/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ /*%FSM<LINK "Moving">*/
+ class Moving
+ {
+ priority = 0.000000;
+ to="Check_Position";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/"_isStartingFSM || _inRange"/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ };
+ };
+ /*%FSM</STATE>*/
+ /*%FSM<STATE "Spawn___Lead">*/
+ class Spawn___Lead
+ {
+ name = "Spawn___Lead";
+ init = /*%FSM<STATEINIT""">*/"if !(alive(driver _hq)) then {" \n
+ " _HQDriver = [_crew,(createGroup _side),getPos _hq,_side] Call CreateMan;" \n
+ " [_HQDriver] allowGetIn true;" \n
+ " _HQDriver moveInDriver _hq;" \n
+ " _HQDriver assignAsDriver _hq;" \n
+ " [_HQDriver] orderGetIn true;" \n
+ " _HQDriver doMove ([GetPos _hqDeployAt,10,20] Call GetRandomPosition);" \n
+ "};" \n
+ "" \n
+ "if (alive(driver _hq)) then {" \n
+ "" \n
+ " if (_lastHQMovePos distance (getPos _hq) < 20 && !surfaceIsWater(getPos _hq)) then {" \n
+ " _lastHQMoveOrder = _lastHQMoveOrder + 5;" \n
+ " } else {" \n
+ " _lastHQMoveOrder = 0;" \n
+ " };" \n
+ "" \n
+ " if (_lastHQMoveOrder > 40) then {" \n
+ " _lastHQMoveOrder = 0;" \n
+ " [_hq, getPos _hq, 50] Call PlaceSafe;" \n
+ " (driver _hq) doMove ([GetPos _hqDeployAt,10,20] Call GetRandomPosition);" \n
+ " };" \n
+ "" \n
+ " _lastHQMovePos = getPos _hq;" \n
+ "};"/*%FSM</STATEINIT""">*/;
+ precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
+ class Links
+ {
+ /*%FSM<LINK "_">*/
+ class _
+ {
+ priority = 0.000000;
+ to="Commander_Check";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/"time - _lastUpdate > 10"/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ };
+ };
+ /*%FSM</STATE>*/
+ /*%FSM<STATE "Check_Position">*/
+ class Check_Position
+ {
+ name = "Check_Position";
+ init = /*%FSM<STATEINIT""">*/"_canBeDeploy = true;" \n
+ "" \n
+ "//--- On multiplayer, ensure that there is no exploits." \n
+ "if (isMultiplayer) then {" \n
+ " _tbpr = 'WFBE_TOWNBUILDPROTECTIONRANGE' Call GetNamespace;" \n
+ " _isPlayerOnSide = false;" \n
+ " " \n
+ " {if (!isNull _x) then {if (side _x == _side && isPlayer _x) exitWith {_isPlayerOnSide = true}}} forEach playableUnits;" \n
+ " " \n
+ " if (_isPlayerOnSide) then {" \n
+ " {if (_x distance _hq < _tbpr) exitWith {_canBeDeploy = false}} forEach towns;" \n
+ " };" \n
+ "};" \n
+ "" \n
+ "//--- HQ Can be deployed." \n
+ "if (_canBeDeploy) then {" \n
+ " if (alive(driver _hq)) then {(driver _hq) setDammage 1};" \n
+ "" \n
+ " _pos = getPos _hq;" \n
+ " _pos set [2,0];" \n
+ " _pos = [_pos,(('WFBE_AREAHQUNDEPLOYED' Call GetNamespace) select 0)+20] Call GetSafePlace;" \n
+ " if (count _pos < 1) then {_pos = [_pos,(('WFBE_AREAHQUNDEPLOYED' Call GetNamespace) select 0)+50] Call GetSafePlace};" \n
+ " if (count _pos < 1) then {_pos = Call Compile Format [""%1StartingLocation"",_sideText]};" \n
+ " _dir = getDir _hq;" \n
+ " _currency = if !(paramMoneyOnly) then {(_side) Call GetSideSupply} else {(_side) Call GetAICommanderFunds};" \n
+ "" \n
+ " //--- Ensure that we have the supply required to deploy the HQ." \n
+ " if (_currency >= (_costs select _hqType)) then {" \n
+ " [(_names select _hqType),_side,_pos,_dir] ExecVM 'Server\Construction\Construction_HQSite.sqf';" \n
+ "" \n
+ " if !(paramMoneyOnly) then {" \n
+ " [_side, -(_costs select _hqType)] Call ChangeSideSupply;" \n
+ " } else {" \n
+ " [_side, -(_costs select _hqType)] Call ChangeAICommanderFunds;" \n
+ " };" \n
+ " " \n
+ " if (_isStartingFSM) then {_isStartingFSM = false};" \n
+ " };" \n
+ "" \n
+ " //--- Reset local variable." \n
+ " _overallDefenses = missionNamespace getVariable Format [""WFBE_Defenses_%1_Global"",_sideText];" \n
+ " _currentContent = 0;" \n
+ " _totalContent = 0;" \n
+ " if !(isNil ""_overallDefenses"") then {_totalContent = count _overallDefenses} else {_overallDefenses = []};" \n
+ "" \n
+ " _baseDefenses = [];" \n
+ " _defenses = missionNamespace getVariable Format [""WFBE_Defenses_%1"",_sideText];" \n
+ " for '_i' from 0 to count(_baseDefensesTemplate)-1 do {_baseDefenses set [_i,["""",[]]]};" \n
+ " if (isNil '_defenses') then {" \n
+ " missionNamespace setVariable [Format [""WFBE_Defenses_%1"",_sideText],_baseDefenses];" \n
+ " } else {" \n
+ " //--- Check the distance;" \n
+ " _currentContent = -1;" \n
+ " for '_i' from 0 to _totalContent-1 do { " \n
+ " _defenses = _overallDefenses select _i;" \n
+ " {" \n
+ " if (count(_x select 1) > 0) then {" \n
+ " if (alive (_x select 0)) then {" \n
+ " if ((_x select 0) distance _hq < 750) then {" \n
+ " _baseDefenses = _defenses;" \n
+ " _currentContent = _i;" \n
+ " };" \n
+ " };" \n
+ " };" \n
+ " if (_currentContent != -1) exitWith {};" \n
+ " } forEach _defenses;" \n
+ " if (_currentContent != -1) exitWith {};" \n
+ " };" \n
+ " };" \n
+ "" \n
+ " if (_currentContent == -1) then {_currentContent = count _overallDefenses};" \n
+ "" \n
+ " _baseAiIntervalLast = time;" \n
+ " _baseAlive = [false,false,false,false,false,false];" \n
+ " _baseInProgress = [false,false,false,false,false,false];" \n
+ " _baseTimerCheck = [time,time,time,time,time,time];" \n
+ " _baseWalls = [[],[],[],[],[],[]];" \n
+ "};" \n
+ ""/*%FSM</STATEINIT""">*/;
+ precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
+ class Links
+ {
+ /*%FSM<LINK "_">*/
+ class _
+ {
+ priority = 0.000000;
+ to="Commander_Check";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/"time - _lastUpdate > 10"/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ };
+ };
+ /*%FSM</STATE>*/
+ /*%FSM<STATE "Check_Move">*/
+ class Check_Move
+ {
+ name = "Check_Move";
+ init = /*%FSM<STATEINIT""">*/""/*%FSM</STATEINIT""">*/;
+ precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
+ class Links
+ {
+ /*%FSM<LINK "Proceed">*/
+ class Proceed
+ {
+ priority = 0.000000;
+ to="Check_Base";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/"!_hqCanMove"/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ /*%FSM<LINK "Move">*/
+ class Move
+ {
+ priority = 0.000000;
+ to="Move";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/"_hqCanMove"/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ };
+ };
+ /*%FSM</STATE>*/
+ /*%FSM<STATE "Move">*/
+ class Move
+ {
+ name = "Move";
+ init = /*%FSM<STATEINIT""">*/"_hqCanMove = false;" \n
+ "" \n
+ "[(_names select _hqType),_side,getPos _hq,getDir _hq] ExecVM 'Server\Construction\Construction_HQSite.sqf';"/*%FSM</STATEINIT""">*/;
+ precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
+ class Links
+ {
+ /*%FSM<LINK "_">*/
+ class _
+ {
+ priority = 0.000000;
+ to="Commander_Check";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/"time - _lastUpdate > 10"/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ };
+ };
+ /*%FSM</STATE>*/
+ /*%FSM<STATE "Check_Base">*/
+ class Check_Base
+ {
+ name = "Check_Base";
+ init = /*%FSM<STATEINIT""">*/""/*%FSM</STATEINIT""">*/;
+ precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
+ class Links
+ {
+ /*%FSM<LINK "Skip">*/
+ class Skip
+ {
+ priority = 0.000000;
+ to="Skip_1";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/"time - _lastUpdateBase <= 45"/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ /*%FSM<LINK "Update">*/
+ class Update
+ {
+ priority = 0.000000;
+ to="Update_Base";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/"time - _lastUpdateBase > 45"/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ };
+ };
+ /*%FSM</STATE>*/
+ /*%FSM<STATE "Skip_1">*/
+ class Skip_1
+ {
+ name = "Skip_1";
+ init = /*%FSM<STATEINIT""">*/""/*%FSM</STATEINIT""">*/;
+ precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
+ class Links
+ {
+ /*%FSM<LINK "_">*/
+ class _
+ {
+ priority = 0.000000;
+ to="Check_Defenses";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/""/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ };
+ };
+ /*%FSM</STATE>*/
+ /*%FSM<STATE "Update_Base">*/
+ class Update_Base
+ {
+ name = "Update_Base";
+ init = /*%FSM<STATEINIT""">*/"_lastUpdateBase = time;" \n
+ "" \n
+ "_buildings = (_sideText) Call GetSideStructures;" \n
+ "" \n
+ "//--- Get the buildings close of the HQ by type (repair if downed)." \n
+ "_barracks = ['BARRACKSTYPE',_buildings,750,_side,_hq] Call BuildingInRange;" \n
+ "_light = ['LIGHTTYPE',_buildings,750,_side,_hq] Call BuildingInRange;" \n
+ "_heavy = ['HEAVYTYPE',_buildings,750,_side,_hq] Call BuildingInRange;" \n
+ "_air = ['AIRCRAFTTYPE',_buildings,750,_side,_hq] Call BuildingInRange;" \n
+ "_servicePoint = ['SERVICEPOINTTYPE',_buildings,750,_side,_hq] Call BuildingInRange;" \n
+ "_commandCenter = ['COMMANDCENTERTYPE',_buildings,750,_side,_hq] Call BuildingInRange;" \n
+ "" \n
+ "//--- Get the building in progress." \n
+ "_contentInProgress = [objNull,objNull,objNull,objNull,objNull,objNull];" \n
+ "_nearLogics = _hq nearEntities [[""LocationLogicStart""],550];" \n
+ "{" \n
+ " _get = _x getVariable 'WFBE_B_Type';" \n
+ " " \n
+ " if !(isNil '_get') then {" \n
+ " switch (_get) do {" \n
+ " case ""Barracks"": {_contentInProgress set [0, _x]};" \n
+ " case ""Light"": {_contentInProgress set [1, _x]};" \n
+ " case ""CommandCenter"": {_contentInProgress set [2, _x]};" \n
+ " case ""Heavy"": {_contentInProgress set [3, _x]};" \n
+ " case ""Aircraft"": {_contentInProgress set [4, _x]};" \n
+ " case ""ServicePoint"": {_contentInProgress set [5, _x]};" \n
+ " };" \n
+ " };" \n
+ "} forEach _nearLogics;" \n
+ "" \n
+ "//--- Is there a CC at least." \n
+ "_check = [_side, Format [""WFBE_%1COMMANDCENTERTYPE"",_sideText] Call GetNamespace,_buildings] Call GetFactories;" \n
+ "_ccAvailable = if (count _check == 0) then {false} else {true};" \n
+ "" \n
+ "_content = [_barracks,_light,_commandCenter,_heavy,_air,_servicePoint];" \n
+ "_baseStructurePos = [];" \n
+ "{_baseStructurePos = _baseStructurePos + [getPos _x]} forEach _content;" \n
+ "" \n
+ "//--- Check for construction etc." \n
+ "for '_i' from 0 to count(_content)-1 do {" \n
+ " _currency = if !(paramMoneyOnly) then {(_side) Call GetSideSupply} else {(_side) Call GetAICommanderFunds};" \n
+ "" \n
+ " _currentStructure = _content select _i;" \n
+ " _isInProgress = _baseInProgress select _i;" \n
+ " _isAlive = _baseAlive select _i;" \n
+ " _timer = _baseTimerCheck select _i;" \n
+ " _isLogicInProgress = _contentInProgress select _i;" \n
+ "" \n
+ " //--- Bad Catch?" \n
+ " if (_isInProgress && !_isAlive && _timer > 400) then {" \n
+ " _baseInProgress set [_i, false];" \n
+ " };" \n
+ "" \n
+ " //--- Alive?" \n
+ " if (alive _currentStructure) then {if !(_isAlive) then {_baseAlive set [_i , true]}};" \n
+ "" \n
+ " //--- Destroyed?" \n
+ " if (_isInProgress && _isAlive && !(alive _currentStructure)) then {" \n
+ " _baseAlive set [_i , false];" \n
+ " _baseInProgress set [_i, false];" \n
+ " };" \n
+ "" \n
+ " //--- Not in progress, we can build it." \n
+ " if (!_isInProgress && isNull(_currentStructure) && isNull(_isLogicInProgress)) then {" \n
+ " _currentType = _baseOrder select _i;" \n
+ " _type = _types find _currentType;" \n
+ "" \n
+ " //--- Check the supply." \n
+ " _cost = _costs select _type;" \n
+ " if (_cost <= _currency) then {" \n
+ "" \n
+ " //--- check about the building limit." \n
+ " _buildLimit = false;" \n
+ " _current = Call Compile Format ['%1BuildingsCurrent',_sideText];" \n
+ " _limit = (Format['WFBE_BUILDINGMAX%1',_currentType]) Call GetNamespace;" \n
+ " if (isNil '_limit') then {_limit = 4}; //--- Default." \n
+ " if ((_current select (_type-1)) >= _limit) then {_buildLimit = true};" \n
+ "" \n
+ " //--- Can build." \n
+ " if !(_buildLimit) then {" \n
+ " _pos = getPos _hq;" \n
+ " _x = _pos select 0;" \n
+ " _y = _pos select 1;" \n
+ " _pos = [];" \n
+ " _pos set [0,((_baseStructureRelPos select _i) select 0) + _x];" \n
+ " _pos set [1,((_baseStructureRelPos select _i) select 1) + _y];" \n
+ " _newPos = [0,0,0];" \n
+ " _roads = [];" \n
+ "" \n
+ " _attempts = 0;" \n
+ " _max = 100;" \n
+ " while {true} do {" \n
+ " _newPos = [_pos,30,_max,10,0,50,0] Call BIS_fnc_findSafePos;" \n
+ " _aiSpawnPos = [_newPos,_baseDistances select _i,_baseDirections select _i] Call GetPositionFrom;" \n
+ " _aiSpawnPos set [2,0];" \n
+ " _roads = _newPos nearRoads 30;" \n
+ " _roads2 = _aiSpawnPos nearRoads 30;" \n
+ " " \n
+ " _isFlat = _aiSpawnPos isFlatEmpty [" \n
+ " 5, //--- Minimal distance from another object" \n
+ " 0, //--- If 0, just check position. If >0, select new one" \n
+ " 0.6, //--- Max gradient" \n
+ " 5, //--- Gradient area" \n
+ " 0, //--- 0 for restricted water, 2 for required water," \n
+ " false, //--- True if some water can be in 25m radius" \n
+ " objNull //--- Ignored object" \n
+ " ];" \n
+ " " \n
+ " _isTooClose = false;" \n
+ " {if (_x distance _newPos < 70) exitWith {_isTooClose = true}} forEach _baseStructurePos;" \n
+ " if (count _roads == 0 && count _roads2 == 0 && !_isTooClose && count _isFlat != 0) exitWith {};" \n
+ " _attempts = _attempts + 1;" \n
+ " if (_attempts > 100 && _max == 100) then {_max = _max + 150};" \n
+ " };" \n
+ " _baseStructurePos set [_i, _newPos];" \n
+ " [(_names select _type),_side,_newPos,0,_type] ExecVM (Format[""Server\Construction\Construction_%1.sqf"",(_scripts select _type)]);" \n
+ " if !(paramMoneyOnly) then {" \n
+ " [_side, -_cost] Call ChangeSideSupply;" \n
+ " } else {" \n
+ " [_side, -_cost] Call ChangeAICommanderFunds;" \n
+ " };" \n
+ " _baseInProgress set [_i, true];" \n
+ " _baseTimerCheck set [_i, time];" \n
+ " " \n
+ " _current set [_type - 1, (_current select (_type-1)) + 1];" \n
+ " Call Compile Format ['%1BuildingsCurrent = _current',_sideText];" \n
+ " publicVariable Format ['%1BuildingsCurrent',_sideText]; " \n
+ " };" \n
+ " };" \n
+ " };" \n
+ "};"/*%FSM</STATEINIT""">*/;
+ precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
+ class Links
+ {
+ /*%FSM<LINK "_">*/
+ class _
+ {
+ priority = 0.000000;
+ to="Check_Defenses";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/""/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ };
+ };
+ /*%FSM</STATE>*/
+ /*%FSM<STATE "Check_Defenses">*/
+ class Check_Defenses
+ {
+ name = "Check_Defenses";
+ init = /*%FSM<STATEINIT""">*/""/*%FSM</STATEINIT""">*/;
+ precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
+ class Links
+ {
+ /*%FSM<LINK "Skip">*/
+ class Skip
+ {
+ priority = 0.000000;
+ to="Skip_2";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/"isNull _barracks || time - _lastUpdateDefenses <= 80"/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ /*%FSM<LINK "Update">*/
+ class Update
+ {
+ priority = 0.000000;
+ to="Update_Defenses";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/"!isNull _barracks && time - _lastUpdateDefenses > 80"/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ };
+ };
+ /*%FSM</STATE>*/
+ /*%FSM<STATE "Skip_2">*/
+ class Skip_2
+ {
+ name = "Skip_2";
+ init = /*%FSM<STATEINIT""">*/""/*%FSM</STATEINIT""">*/;
+ precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
+ class Links
+ {
+ /*%FSM<LINK "_">*/
+ class _
+ {
+ priority = 0.000000;
+ to="Check_Upgrades";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/""/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ };
+ };
+ /*%FSM</STATE>*/
+ /*%FSM<STATE "Update_Defenses">*/
+ class Update_Defenses
+ {
+ name = "Update_Defenses";
+ init = /*%FSM<STATEINIT""">*/"_lastUpdateDefenses = time;" \n
+ "" \n
+ "//--- Buildings checks" \n
+ "for '_i' from 0 to count(_content)-1 do {" \n
+ " _building = _content select _i;" \n
+ " _type = _baseOrder select _i;" \n
+ " _buildingWall = _baseWalls select _i;" \n
+ "" \n
+ " if (alive _building) then {" \n
+ " if (count _buildingWall == 0) then {" \n
+ " //--- Persistent check (Walls), only executed if the array is empty." \n
+ " _defenses = _building getVariable 'WFBE_Walls';" \n
+ " if !(isNil ""_defenses"") then {_baseWalls set [_i,_defenses]};" \n
+ " " \n
+ " _defenses = [_building,Format [""WFBE_NEURODEF_%1_WALLS"",_type] Call GetNamespace,(_baseWalls select _i)] Call CreateDefenseTemplate;" \n
+ " _baseWalls set [_i ,_defenses];" \n
+ " _building setVariable ['WFBE_Walls', _defenses];" \n
+ " } else {" \n
+ " {" \n
+ " if !(alive _x) exitWith {" \n
+ " _defenses = [_building,Format [""WFBE_NEURODEF_%1_WALLS"",_type] Call GetNamespace,(_baseWalls select _i)] Call CreateDefenseTemplate;" \n
+ " _baseWalls set [_i ,_defenses];" \n
+ " _building setVariable ['WFBE_Walls', _defenses];" \n
+ " };" \n
+ " } forEach (_baseWalls select _i);" \n
+ " };" \n
+ " } else {" \n
+ " if (count(_buildingWall) > 0) then {" \n
+ " {deleteVehicle _x} forEach (_baseWalls select _i);" \n
+ " _baseWalls set [_i, []];" \n
+ " };" \n
+ " };" \n
+ "} forEach _content;" \n
+ "" \n
+ "//--- Defenses Check." \n
+ "for '_i' from 0 to count(_baseDefenses)-1 do {" \n
+ " _defense = (_baseDefenses select _i) select 0;" \n
+ "" \n
+ " //--- If object, it exist or existed." \n
+ " if (typename _defense == ""OBJECT"") then {" \n
+ " _template = (_baseDefenses select _i) select 1;" \n
+ " " \n
+ " if (alive _defense) then {" \n
+ " {" \n
+ " if !(alive _x) exitWith {" \n
+ " _template = _baseDefensesTemplate select _i;" \n
+ " _defenses = [_defense,Format [""WFBE_NEURODEF_%1"",_template select 3] Call GetNamespace] Call CreateDefenseTemplate;" \n
+ " _baseDefenses set [_i, [_defense,_defenses]];" \n
+ " missionNamespace setVariable [Format [""WFBE_Defenses_%1"",_sideText],_baseDefenses];" \n
+ " _overallDefenses set [_currentContent, _baseDefenses];" \n
+ " missionNamespace setVariable [Format [""WFBE_Defenses_%1_Global"",_sideText], _overallDefenses];" \n
+ " };" \n
+ " } forEach _template;" \n
+ "" \n
+ " //--- Keep the defense able to fire." \n
+ " if !(isNull(gunner _defense)) then {" \n
+ " if !(someAmmo _defense) then {[_defense,_side] Call RearmVehicle};" \n
+ " };" \n
+ " } else {" \n
+ " if (count(_template) > 0) then {" \n
+ " {deleteVehicle _x} forEach _template;" \n
+ " _baseDefenses set [_i, ["""",[]]];" \n
+ " _defense = (_baseDefenses select _i) select 0;" \n
+ " missionNamespace setVariable [Format [""WFBE_Defenses_%1"",_sideText],_baseDefenses];" \n
+ " _overallDefenses set [_currentContent, _baseDefenses];" \n
+ " missionNamespace setVariable [Format [""WFBE_Defenses_%1_Global"",_sideText], _overallDefenses];" \n
+ " };" \n
+ " };" \n
+ " };" \n
+ "" \n
+ " //--- If string, it don't exist." \n
+ " if (typename _defense == ""STRING"") then {" \n
+ " _aiComFunds = (_side) Call GetAICommanderFunds;" \n
+ " _template = _baseDefensesTemplate select _i;" \n
+ " _pool = _template select 0;" \n
+ " _picked = _pool select round(random((count _pool)-1));" \n
+ "" \n
+ " //--- Grab the defense price." \n
+ " _details = _picked Call GetNamespace;" \n
+ " _price = if !(isNil '_details') then {_details select QUERYUNITPRICE} else {400};" \n
+ "" \n
+ " if (_aiComFunds >= _price) then {" \n
+ " [_side, -_price] Call ChangeAICommanderFunds;" \n
+ " " \n
+ " _pos = getPos _hq;" \n
+ " _x = _pos select 0;" \n
+ " _y = _pos select 1;" \n
+ " _pos = [];" \n
+ " _pos set [0,((_template select 1) select 0) + _x];" \n
+ " _pos set [1,((_template select 1) select 1) + _y];" \n
+ " _newPos = [0,0,0];" \n
+ " _roads = [];" \n
+ "" \n
+ " _attempts = 0;" \n
+ " _max = 100;" \n
+ " while {true} do {" \n
+ " _newPos = [_pos,30,_max,10,0,50,0] Call BIS_fnc_findSafePos;" \n
+ " _roads = _newPos nearRoads 24;" \n
+ "" \n
+ " _isTooClose = false;" \n
+ " {if (_x distance _newPos < 30) exitWith {_isTooClose = true}} forEach _content;" \n
+ " if (count _roads == 0 && !_isTooClose && count(_newPos nearEntities 15) == 0) exitWith {};" \n
+ " _attempts = _attempts + 1;" \n
+ " if (_attempts > 100 && _max == 100) then {_max = _max + 150};" \n
+ " };" \n
+ "" \n
+ " _created = [_picked,_side,_newPos,_template select 2,true,true,('WFBE_DEFENSEMANRANGE' Call GetNamespace)*3] Call ConstructDefense;" \n
+ "" \n
+ " //--- Extra?" \n
+ " _defenses = [];" \n
+ " _extra = _template select 3;" \n
+ " if (_extra != """") then {" \n
+ " _defenses = [_created,Format [""WFBE_NEURODEF_%1"",_extra] Call GetNamespace] Call CreateDefenseTemplate;" \n
+ " };" \n
+ "" \n
+ " _baseDefenses set [_i, [_created,_defenses]];" \n
+ " missionNamespace setVariable [Format [""WFBE_Defenses_%1"",_sideText],_baseDefenses];" \n
+ " _overallDefenses set [_currentContent, _baseDefenses];" \n
+ " missionNamespace setVariable [Format [""WFBE_Defenses_%1_Global"",_sideText], _overallDefenses];" \n
+ " };" \n
+ " };" \n
+ "};"/*%FSM</STATEINIT""">*/;
+ precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
+ class Links
+ {
+ /*%FSM<LINK "_">*/
+ class _
+ {
+ priority = 0.000000;
+ to="Check_Upgrades";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/""/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ };
+ };
+ /*%FSM</STATE>*/
+ /*%FSM<STATE "Check_Upgrades">*/
+ class Check_Upgrades
+ {
+ name = "Check_Upgrades";
+ init = /*%FSM<STATEINIT""">*/""/*%FSM</STATEINIT""">*/;
+ precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
+ class Links
+ {
+ /*%FSM<LINK "Skip">*/
+ class Skip
+ {
+ priority = 0.000000;
+ to="Skip_3";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/"!_ccAvailable || time - _lastUpdateUpgrades <= 60"/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ /*%FSM<LINK "Update">*/
+ class Update
+ {
+ priority = 0.000000;
+ to="Update_Upgrades";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/"_ccAvailable && time - _lastUpdateUpgrades > 60"/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ };
+ };
+ /*%FSM</STATE>*/
+ /*%FSM<STATE "Skip_3">*/
+ class Skip_3
+ {
+ name = "Skip_3";
+ init = /*%FSM<STATEINIT""">*/""/*%FSM</STATEINIT""">*/;
+ precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
+ class Links
+ {
+ /*%FSM<LINK "_">*/
+ class _
+ {
+ priority = 0.000000;
+ to="Check_Types";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/""/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ };
+ };
+ /*%FSM</STATE>*/
+ /*%FSM<STATE "Update_Upgrades">*/
+ class Update_Upgrades
+ {
+ name = "Update_Upgrades";
+ init = /*%FSM<STATEINIT""">*/"_lastUpdateUpgrades = time;" \n
+ "" \n
+ "if !(Call Compile Format [""WFBE_%1_Upgrading"",_sideText]) then {" \n
+ " _upgrades = (_sideText) Call GetSideUpgrades;" \n
+ " _currency = if !(paramMoneyOnly) then {(_side) Call GetSideSupply} else {(_side) Call GetAICommanderFunds};" \n
+ " _break = false;" \n
+ "" \n
+ " _upgrade = -1;" \n
+ " _index = -1;" \n
+ " _supplyLevel = -1;" \n
+ " " \n
+ " for [{_x = 0},{_x < (count _upgradesOrders) && !_break},{_x = _x + 1}] do {" \n
+ " _index = _upgradesOrders select _x;" \n
+ " _canUpgrade = _upgradesConditions select _index;" \n
+ "" \n
+ " //--- Can we use that upgrade?." \n
+ " if (_canUpgrade) then {" \n
+ " _upgradeLevels = _upgradesLevels select _index;" \n
+ " _currentLevel = _upgrades select _index;" \n
+ " //--- Have we reached the max?." \n
+ " if (_currentLevel < _upgradeLevels) then {" \n
+ " _currencyID = if !(paramMoneyOnly) then {0} else {1};" \n
+ " _supplyLevel = ((Format [""WFBE_UPGRADEPRICESLEVEL%1"",(_currentLevel + 1)] Call GetNamespace) select _index) select _currencyID;" \n
+ " //--- Do we have enough currency to upgrade?. Otherwise, just skip the upgrade until AI has enough currency." \n
+ " if (_currency > _supplyLevel) then {" \n
+ " _upgrade = _currentLevel;" \n
+ " _break = true;" \n
+ " } else {" \n
+ " _break = true;" \n
+ " };" \n
+ " };" \n
+ " };" \n
+ " };" \n
+ " " \n
+ " if (_upgrade != -1) then {" \n
+ " if !(paramMoneyOnly) then {" \n
+ " [_side,-_supplyLevel] Call ChangeSideSupply;" \n
+ " } else {" \n
+ " [_side,-_supplyLevel] Call ChangeAICommanderFunds;" \n
+ " };" \n
+ " " \n
+ " _time = (Format [""WFBE_UPGRADETIMESLEVEL%1"",_upgrade+1] Call GetNamespace) select _index;" \n
+ " _name = _upgradesLabels select _index;" \n
+ " [_time,_upgrade,_index,_name,_side] Spawn AIUpgrade;" \n
+ " };" \n
+ "};"/*%FSM</STATEINIT""">*/;
+ precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
+ class Links
+ {
+ /*%FSM<LINK "_">*/
+ class _
+ {
+ priority = 0.000000;
+ to="Check_Types";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/""/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ };
+ };
+ /*%FSM</STATE>*/
+ /*%FSM<STATE "Check_Types">*/
+ class Check_Types
+ {
+ name = "Check_Types";
+ init = /*%FSM<STATEINIT""">*/""/*%FSM</STATEINIT""">*/;
+ precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
+ class Links
+ {
+ /*%FSM<LINK "Skip">*/
+ class Skip
+ {
+ priority = 0.000000;
+ to="Skip_4";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/"time - _lastUpdateTypes <= 120"/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ /*%FSM<LINK "Update">*/
+ class Update
+ {
+ priority = 0.000000;
+ to="Update_Types";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/"time - _lastUpdateTypes > 120"/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ };
+ };
+ /*%FSM</STATE>*/
+ /*%FSM<STATE "Skip_4">*/
+ class Skip_4
+ {
+ name = "Skip_4";
+ init = /*%FSM<STATEINIT""">*/""/*%FSM</STATEINIT""">*/;
+ precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
+ class Links
+ {
+ /*%FSM<LINK "_">*/
+ class _
+ {
+ priority = 0.000000;
+ to="Check_Workers";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/""/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ };
+ };
+ /*%FSM</STATE>*/
+ /*%FSM<STATE "Update_Types">*/
+ class Update_Types
+ {
+ name = "Update_Types";
+ init = /*%FSM<STATEINIT""">*/"_lastUpdateTypes = time;" \n
+ "" \n
+ "_totalFunds = 0;" \n
+ "" \n
+ "{" \n
+ " if !(isNil '_x') then {_totalFunds = _totalFunds + ((_x) Call GetTeamFunds)};" \n
+ "} forEach _teams;" \n
+ "" \n
+ "_avgIncome = _totalFunds / maxPlayers;" \n
+ "" \n
+ "_income = _side Call GetTotalSupplyValue;" \n
+ "" \n
+ "_type = 0;" \n
+ "" \n
+ "_infPercent = 0;" \n
+ "_lightPercent = 0;" \n
+ "_heavyPercent = 0;" \n
+ "_airPercent = 0;" \n
+ "if (_income < (_totalSupply - (_totalSupply/1.2)) || _avgIncome < 2000) then {_infPercent = 70; _lightPercent = 30};" \n
+ "if ((_income >= (_totalSupply - (_totalSupply/1.2)) && _income < (_totalSupply - (_totalSupply/1.6))) || _avgIncome > 2000) then {_infPercent = 60; _lightPercent = 30; _heavyPercent = 10};" \n
+ "if ((_income >= (_totalSupply - (_totalSupply/1.6)) && _income < (_totalSupply - (_totalSupply/2))) || _avgIncome > 4000) then {_infPercent = 50; _lightPercent = 30; _heavyPercent = 20};" \n
+ "if ((_income >= (_totalSupply - (_totalSupply/2)) && _income < (_totalSupply - (_totalSupply/3))) || _avgIncome > 12000) then {_infPercent = 40; _lightPercent = 25; _heavyPercent = 30; _airPercent = 5};" \n
+ "if ((_income >= (_totalSupply - (_totalSupply/3)) && _income < (_totalSupply - (_totalSupply/4))) || _avgIncome > 18000) then {_infPercent = 30; _lightPercent = 20; _heavyPercent = 40; _airPercent = 10};" \n
+ "if (_income >= (_totalSupply - (_totalSupply/4)) || _avgIncome > 24000) then {_infPercent = 20; _lightPercent = 20; _heavyPercent = 45; _airPercent = 15};" \n
+ "" \n
+ "_infAssign = round(maxPlayers * (_infPercent / 100));" \n
+ "_lightAssign = round(maxPlayers * (_lightPercent / 100));" \n
+ "_heavyAssign = round(maxPlayers * (_heavyPercent / 100));" \n
+ "_airAssign = round(maxPlayers * (_airPercent / 100));" \n
+ "" \n
+ "_infTemplates = [];" \n
+ "_lightTemplates = [];" \n
+ "_heavyTemplates = [];" \n
+ "_airTemplates = [];" \n
+ "" \n
+ "_i = 0;" \n
+ "" \n
+ "/* Experimental - Start */" \n
+ "_upgrades = (_sideText) Call GetSideUpgrades;" \n
+ "" \n
+ "//--- Retrieve the available types." \n
+ "{" \n
+ " _upgradesTemplate = _teamUpgrades select _i;" \n
+ " switch (_x) do {" \n
+ " //--- Infantry." \n
+ " case 0: {" \n
+ " _canAdd = true;" \n
+ " for '_k' from 0 to 3 do {" \n
+ " if ((_upgrades select _k) < (_upgradesTemplate select _k)) exitWith {_canAdd = false};" \n
+ " };" \n
+ " if (_canAdd) then {_infTemplates = _infTemplates + [_i]};" \n
+ " };" \n
+ " //--- Light." \n
+ " case 1: {" \n
+ " _canAdd = true;" \n
+ " for '_k' from 0 to 3 do {" \n
+ " if ((_upgrades select _k) < (_upgradesTemplate select _k)) exitWith {_canAdd = false};" \n
+ " };" \n
+ " if (_canAdd) then {_lightTemplates = _lightTemplates + [_i]};" \n
+ " };" \n
+ " //--- Heavy." \n
+ " case 2: {" \n
+ " _canAdd = true;" \n
+ " for '_k' from 0 to 3 do {" \n
+ " if ((_upgrades select _k) < (_upgradesTemplate select _k)) exitWith {_canAdd = false};" \n
+ " };" \n
+ " if (_canAdd) then {_heavyTemplates = _heavyTemplates + [_i]};" \n
+ " };" \n
+ " //--- Air." \n
+ " case 3: {" \n
+ " _canAdd = true;" \n
+ " for '_k' from 0 to 3 do {" \n
+ " if ((_upgrades select _k) < (_upgradesTemplate select _k)) exitWith {_canAdd = false};" \n
+ " };" \n
+ " if (_canAdd) then {_airTemplates = _airTemplates + [_i]};" \n
+ " };" \n
+ " };" \n
+ " _i = _i + 1;" \n
+ "} forEach _teamTypes;" \n
+ "" \n
+ "//--- How many types are available." \n
+ "_templates_infavailable = count _infTemplates;" \n
+ "_templates_ligavailable = count _lightTemplates;" \n
+ "_templates_heaavailable = count _heavyTemplates;" \n
+ "_templates_airavailable = count _airTemplates;" \n
+ "" \n
+ "//--- Assign if possible." \n
+ "if (_templates_infavailable > 0 || _templates_ligavailable > 0 || _templates_heaavailable > 0 || _templates_airavailable > 0) then {" \n
+ " //--- Reallocate if necessary - Infantry." \n
+ " if (_templates_infavailable == 0 && _infAssign > 0) then {" \n
+ " _dividedEnd = _infAssign;" \n
+ " _ressourceDivision = [_dividedEnd / 2, (_dividedEnd/2) - ((_dividedEnd/2) / 4), (_dividedEnd/2)/4];" \n
+ " " \n
+ " _infAssign = 0;" \n
+ " _i = 0;" \n
+ " " \n
+ " if (_templates_ligavailable != 0) then {" \n
+ " _lightAssign = _lightAssign + (_ressourceDivision select _i);" \n
+ " _i = _i + 1;" \n
+ " " \n
+ " if (_templates_heaavailable == 0) then {" \n
+ " _lightAssign = _lightAssign + (_ressourceDivision select _i);" \n
+ " _i = _i + 1;" \n
+ " };" \n
+ " " \n
+ " if (_templates_airavailable == 0) then {" \n
+ " _lightAssign = _lightAssign + (_ressourceDivision select _i);" \n
+ " _i = _i + 1;" \n
+ " };" \n
+ " };" \n
+ " " \n
+ " if (_i < 3) then {" \n
+ " if (_templates_heaavailable != 0) then {" \n
+ " _heavyAssign = _heavyAssign + (_ressourceDivision select _i);" \n
+ " _i = _i + 1;" \n
+ " " \n
+ " if (_templates_ligavailable == 0 && _i < 3) then {" \n
+ " _heavyAssign = _heavyAssign + (_ressourceDivision select _i);" \n
+ " _i = _i + 1;" \n
+ " };" \n
+ " " \n
+ " if (_templates_airavailable == 0 && _i < 3) then {" \n
+ " _heavyAssign = _heavyAssign + (_ressourceDivision select _i);" \n
+ " _i = _i + 1;" \n
+ " };" \n
+ " };" \n
+ " " \n
+ " if (_i < 3) then {" \n
+ " if (_templates_airavailable != 0) then {" \n
+ " _airAssign = _airAssign + (_ressourceDivision select _i);" \n
+ " _i = _i + 1;" \n
+ " " \n
+ " if (_templates_ligavailable == 0 && _i < 3) then {" \n
+ " _airAssign = _airAssign + (_ressourceDivision select _i);" \n
+ " _i = _i + 1;" \n
+ " };" \n
+ " " \n
+ " if (_templates_heaavailable == 0 && _i < 3) then {" \n
+ " _airAssign = _airAssign + (_ressourceDivision select _i);" \n
+ " _i = _i + 1;" \n
+ " };" \n
+ " };" \n
+ " };" \n
+ " };" \n
+ " };" \n
+ "" \n
+ " //--- Reallocate if necessary - Light." \n
+ " if (_templates_ligavailable == 0 && _lightAssign > 0) then {" \n
+ " _dividedEnd = _lightAssign;" \n
+ " _ressourceDivision = [_dividedEnd / 2, (_dividedEnd/2) - ((_dividedEnd/2) / 4), (_dividedEnd/2)/4];" \n
+ " " \n
+ " _lightAssign = 0;" \n
+ " _i = 0;" \n
+ " " \n
+ " if (_templates_infavailable != 0) then {" \n
+ " _infAssign = _infAssign + (_ressourceDivision select _i);" \n
+ " _i = _i + 1;" \n
+ " " \n
+ " if (_templates_heaavailable == 0) then {" \n
+ " _infAssign = _infAssign + (_ressourceDivision select _i);" \n
+ " _i = _i + 1;" \n
+ " };" \n
+ " " \n
+ " if (_templates_airavailable == 0) then {" \n
+ " _infAssign = _infAssign + (_ressourceDivision select _i);" \n
+ " _i = _i + 1;" \n
+ " };" \n
+ " };" \n
+ " " \n
+ " if (_i < 3) then {" \n
+ " if (_templates_heaavailable != 0) then {" \n
+ " _heavyAssign = _heavyAssign + (_ressourceDivision select _i);" \n
+ " _i = _i + 1;" \n
+ " " \n
+ " if (_templates_infavailable == 0 && _i < 3) then {" \n
+ " _heavyAssign = _heavyAssign + (_ressourceDivision select _i);" \n
+ " _i = _i + 1;" \n
+ " };" \n
+ " " \n
+ " if (_templates_airavailable == 0 && _i < 3) then {" \n
+ " _heavyAssign = _heavyAssign + (_ressourceDivision select _i);" \n
+ " _i = _i + 1;" \n
+ " };" \n
+ " };" \n
+ " " \n
+ " if (_i < 3) then {" \n
+ " if (_templates_airavailable != 0) then {" \n
+ " _airAssign = _airAssign + (_ressourceDivision select _i);" \n
+ " _i = _i + 1;" \n
+ " " \n
+ " if (_templates_infavailable == 0 && _i < 3) then {" \n
+ " _airAssign = _airAssign + (_ressourceDivision select _i);" \n
+ " _i = _i + 1;" \n
+ " };" \n
+ " " \n
+ " if (_templates_heaavailable == 0 && _i < 3) then {" \n
+ " _airAssign = _airAssign + (_ressourceDivision select _i);" \n
+ " _i = _i + 1;" \n
+ " };" \n
+ " };" \n
+ " };" \n
+ " };" \n
+ " };" \n
+ " " \n
+ " //--- Reallocate if necessary - Heavy." \n
+ " if (_templates_heaavailable == 0 && _heavyAssign > 0) then {" \n
+ " _dividedEnd = _heavyAssign;" \n
+ " _ressourceDivision = [_dividedEnd / 2, (_dividedEnd/2) - ((_dividedEnd/2) / 4), (_dividedEnd/2)/4];" \n
+ " " \n
+ " _heavyAssign = 0;" \n
+ " _i = 0;" \n
+ " " \n
+ " if (_templates_infavailable != 0) then {" \n
+ " _infAssign = _infAssign + (_ressourceDivision select _i);" \n
+ " _i = _i + 1;" \n
+ " " \n
+ " if (_templates_ligavailable == 0) then {" \n
+ " _infAssign = _infAssign + (_ressourceDivision select _i);" \n
+ " _i = _i + 1;" \n
+ " };" \n
+ " " \n
+ " if (_templates_airavailable == 0) then {" \n
+ " _infAssign = _infAssign + (_ressourceDivision select _i);" \n
+ " _i = _i + 1;" \n
+ " };" \n
+ " };" \n
+ " " \n
+ " if (_i < 3) then {" \n
+ " if (_templates_ligavailable != 0) then {" \n
+ " _lightAssign = _lightAssign + (_ressourceDivision select _i);" \n
+ " _i = _i + 1;" \n
+ " " \n
+ " if (_templates_infavailable == 0 && _i < 3) then {" \n
+ " _lightAssign = _lightAssign + (_ressourceDivision select _i);" \n
+ " _i = _i + 1;" \n
+ " };" \n
+ " " \n
+ " if (_templates_airavailable == 0 && _i < 3) then {" \n
+ " _lightAssign = _lightAssign + (_ressourceDivision select _i);" \n
+ " _i = _i + 1;" \n
+ " };" \n
+ " };" \n
+ " " \n
+ " if (_i < 3) then {" \n
+ " if (_templates_airavailable != 0) then {" \n
+ " _airAssign = _airAssign + (_ressourceDivision select _i);" \n
+ " _i = _i + 1;" \n
+ " " \n
+ " if (_templates_infavailable == 0 && _i < 3) then {" \n
+ " _airAssign = _airAssign + (_ressourceDivision select _i);" \n
+ " _i = _i + 1;" \n
+ " };" \n
+ " " \n
+ " if (_templates_ligavailable == 0 && _i < 3) then {" \n
+ " _airAssign = _airAssign + (_ressourceDivision select _i);" \n
+ " _i = _i + 1;" \n
+ " };" \n
+ " };" \n
+ " };" \n
+ " };" \n
+ " };" \n
+ " " \n
+ " //--- Reallocate if necessary - Air." \n
+ " if (_templates_airavailable == 0 && _airAssign > 0) then {" \n
+ " _dividedEnd = _airAssign;" \n
+ " _ressourceDivision = [_dividedEnd / 2, (_dividedEnd/2) - ((_dividedEnd/2) / 4), (_dividedEnd/2)/4];" \n
+ " " \n
+ " _airAssign = 0;" \n
+ " _i = 0;" \n
+ " " \n
+ " if (_templates_infavailable != 0) then {" \n
+ " _infAssign = _infAssign + (_ressourceDivision select _i);" \n
+ " _i = _i + 1;" \n
+ " " \n
+ " if (_templates_ligavailable == 0) then {" \n
+ " _infAssign = _infAssign + (_ressourceDivision select _i);" \n
+ " _i = _i + 1;" \n
+ " };" \n
+ " " \n
+ " if (_templates_airavailable == 0) then {" \n
+ " _infAssign = _infAssign + (_ressourceDivision select _i);" \n
+ " _i = _i + 1;" \n
+ " };" \n
+ " };" \n
+ " " \n
+ " if (_i < 3) then {" \n
+ " if (_templates_ligavailable != 0) then {" \n
+ " _lightAssign = _lightAssign + (_ressourceDivision select _i);" \n
+ " _i = _i + 1;" \n
+ " " \n
+ " if (_templates_infavailable == 0 && _i < 3) then {" \n
+ " _lightAssign = _lightAssign + (_ressourceDivision select _i);" \n
+ " _i = _i + 1;" \n
+ " };" \n
+ " " \n
+ " if (_templates_airavailable == 0 && _i < 3) then {" \n
+ " _lightAssign = _lightAssign + (_ressourceDivision select _i);" \n
+ " _i = _i + 1;" \n
+ " };" \n
+ " };" \n
+ " " \n
+ " if (_i < 3) then {" \n
+ " if (_templates_heaavailable != 0) then {" \n
+ " _heavyAssign = _heavyAssign + (_ressourceDivision select _i);" \n
+ " _i = _i + 1;" \n
+ " " \n
+ " if (_templates_infavailable == 0 && _i < 3) then {" \n
+ " _heavyAssign = _heavyAssign + (_ressourceDivision select _i);" \n
+ " _i = _i + 1;" \n
+ " };" \n
+ " " \n
+ " if (_templates_ligavailable == 0 && _i < 3) then {" \n
+ " _heavyAssign = _heavyAssign + (_ressourceDivision select _i);" \n
+ " _i = _i + 1;" \n
+ " };" \n
+ " };" \n
+ " };" \n
+ " };" \n
+ " };" \n
+ " " \n
+ " {" \n
+ " if !(isNil '_x') then {" \n
+ " _skip = false;" \n
+ " if (_infAssign > 0) then {" \n
+ " _type = _infTemplates select (round(random((count _infTemplates)-1)));" \n
+ " _infAssign = _infAssign - 1;" \n
+ " _skip = true;" \n
+ " };" \n
+ " if (_lightAssign > 0 && !_skip) then {" \n
+ " _type = _lightTemplates select (round(random((count _lightTemplates)-1)));" \n
+ " _lightAssign = _lightAssign - 1;" \n
+ " _skip = true;" \n
+ " };" \n
+ " if (_heavyAssign > 0 && !_skip) then {" \n
+ " _type = _heavyTemplates select (round(random((count _heavyTemplates)-1)));" \n
+ " _heavyAssign = _heavyAssign - 1;" \n
+ " _skip = true;" \n
+ " };" \n
+ " if (_airAssign > 0 && !_skip) then {" \n
+ " _type = _airTemplates select (round(random((count _airTemplates)-1)));" \n
+ " _airAssign = _airAssign - 1;" \n
+ " _skip = true;" \n
+ " };" \n
+ " [_x,_type] Call SetTeamType;" \n
+ " };" \n
+ " } forEach _teams;" \n
+ "};" \n
+ "/* Experimental - End */"/*%FSM</STATEINIT""">*/;
+ precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
+ class Links
+ {
+ /*%FSM<LINK "_">*/
+ class _
+ {
+ priority = 0.000000;
+ to="Check_Workers";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/""/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ };
+ };
+ /*%FSM</STATE>*/
+ /*%FSM<STATE "Check_Move_1">*/
+ class Check_Move_1
+ {
+ name = "Check_Move_1";
+ init = /*%FSM<STATEINIT""">*/""/*%FSM</STATEINIT""">*/;
+ precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
+ class Links
+ {
+ /*%FSM<LINK "Skip">*/
+ class Skip
+ {
+ priority = 0.000000;
+ to="Skip_5";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/"time - _lastUpdateMove <= 120"/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ /*%FSM<LINK "Update">*/
+ class Update
+ {
+ priority = 0.000000;
+ to="Update_Move";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/"time - _lastUpdateMove > 120"/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ };
+ };
+ /*%FSM</STATE>*/
+ /*%FSM<STATE "Check_Workers">*/
+ class Check_Workers
+ {
+ name = "Check_Workers";
+ init = /*%FSM<STATEINIT""">*/""/*%FSM</STATEINIT""">*/;
+ precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
+ class Links
+ {
+ /*%FSM<LINK "Time">*/
+ class Time
+ {
+ priority = 0.000000;
+ to="Nothing";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/"!paramUseWorkers || time - _lastUpdateWorkers <= 20"/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ /*%FSM<LINK "Workers">*/
+ class Workers
+ {
+ priority = 0.000000;
+ to="Update_Workers";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/"paramUseWorkers && time - _lastUpdateWorkers > 20"/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ };
+ };
+ /*%FSM</STATE>*/
+ /*%FSM<STATE "Nothing">*/
+ class Nothing
+ {
+ name = "Nothing";
+ init = /*%FSM<STATEINIT""">*/""/*%FSM</STATEINIT""">*/;
+ precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
+ class Links
+ {
+ /*%FSM<LINK "_">*/
+ class _
+ {
+ priority = 0.000000;
+ to="Check_Move_1";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/""/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ };
+ };
+ /*%FSM</STATE>*/
+ /*%FSM<STATE "Update_Workers">*/
+ class Update_Workers
+ {
+ name = "Update_Workers";
+ init = /*%FSM<STATEINIT""">*/"_lastUpdateWorkers = time;" \n
+ "" \n
+ "_workers = Call Compile Format [""WF_%1Workers"",_sideText];" \n
+ "_aliveWorkers = (_workers) Call GetLiveUnits;" \n
+ "" \n
+ "//--- enough workers or?." \n
+ "if (count _aliveWorkers < ('WFBE_WORKERS_MAX' Call GetNamespace)) then {" \n
+ " _aiComFunds = (_side) Call GetAICommanderFunds;" \n
+ "" \n
+ " if (_aiComFunds >= _workerPrice) then {" \n
+ " [_side, -_workerPrice] Call ChangeAICommanderFunds;" \n
+ " " \n
+ " //--- Which index." \n
+ " _index = 0;" \n
+ " for '_i' from 0 to count(_workers)-1 do {" \n
+ " if (isNull (_workers select _i)) exitWith {_index = _i};" \n
+ " };" \n
+ " " \n
+ " if (_index == 0 && count(_workers) > 0) then {_index = count _workers};" \n
+ " " \n
+ " [_side, _hq, _index] Call SRVFNCRequestWorker;" \n
+ " };" \n
+ "} else {" \n
+ " //--- Max reached, enough in base to build else dispose." \n
+ " {" \n
+ " if (_x distance _hq > 600 && alive _x) then {_x setDammage 1};" \n
+ " } forEach _workers;" \n
+ "};" \n
+ ""/*%FSM</STATEINIT""">*/;
+ precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
+ class Links
+ {
+ /*%FSM<LINK "_">*/
+ class _
+ {
+ priority = 0.000000;
+ to="Check_Move_1";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/""/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ };
+ };
+ /*%FSM</STATE>*/
+ /*%FSM<STATE "Skip_5">*/
+ class Skip_5
+ {
+ name = "Skip_5";
+ init = /*%FSM<STATEINIT""">*/""/*%FSM</STATEINIT""">*/;
+ precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
+ class Links
+ {
+ /*%FSM<LINK "_">*/
+ class _
+ {
+ priority = 0.000000;
+ to="Commander_Check";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/"time - _lastUpdate > 10"/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ };
+ };
+ /*%FSM</STATE>*/
+ /*%FSM<STATE "Update_Move">*/
+ class Update_Move
+ {
+ name = "Update_Move";
+ init = /*%FSM<STATEINIT""">*/"_lastUpdateMove = time;" \n
+ "" \n
+ "if (time - _baseAiIntervalLast > _baseAiInterval) then {" \n
+ " _hqCanMove = true;" \n
+ "" \n
+ " //--- Build limit Check" \n
+ " _buildLimit = false;" \n
+ " _current = Call Compile Format ['%1BuildingsCurrent',_sideText];" \n
+ " _limit = 'WFBE_BUILDINGMAXBARRACKS' Call GetNamespace;" \n
+ " if (isNil '_limit') then {_limit = 4}; //--- Default." \n
+ " if ((_current select 0) >= _limit) exitWith {_hqCanMove = false};" \n
+ "" \n
+ " //--- check the nearby buildings." \n
+ " {" \n
+ " if !(alive _x) exitWith {_hqCanMove = false}; " \n
+ " } forEach _content;" \n
+ "" \n
+ " if (_hqCanMove) then {" \n
+ " //--- Check Defenses." \n
+ " for '_i' from 0 to count(_baseDefenses)-1 do {" \n
+ " _defense = (_baseDefenses select _i) select 0;" \n
+ " if (typeName _defense == ""STRING"") exitWith {_hqCanMove = false};" \n
+ " };" \n
+ "" \n
+ " if (_hqCanMove) then {" \n
+ " //--- Attempt to get a destination." \n
+ " _sortedLocation = [_hq, startingLocations] Call SortByDistance;" \n
+ "" \n
+ " _hqDeployAt = objNull;" \n
+ " {" \n
+ " if (count (nearestObjects [_x, (_westStructuresNames + _eastStructuresNames), 400]) == 0 && _x distance _hq > 700) exitWith {_hqDeployAt = _x};" \n
+ " } forEach _sortedLocation;" \n
+ " " \n
+ " if !(isNull _hqDeployAt) then {" \n
+ " //--- Location Picked." \n
+ " _hostileTowns = 0;" \n
+ " _distance = _hq distance _hqDeployAt;" \n
+ " {if (_x distance _hq < _distance && ((_x getVariable 'sideID') != _sideID)) then {_hostileTowns = _hostileTowns + 1}} forEach towns;" \n
+ " " \n
+ " if (_hostileTowns != 0) then {_hqCanMove = false};" \n
+ " } else {" \n
+ " _hqCanMove = false;" \n
+ " };" \n
+ " };" \n
+ " };" \n
+ "};"/*%FSM</STATEINIT""">*/;
+ precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
+ class Links
+ {
+ /*%FSM<LINK "_">*/
+ class _
+ {
+ priority = 0.000000;
+ to="Commander_Check";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/"time - _lastUpdate > 10"/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ };
+ };
+ /*%FSM</STATE>*/
+ /*%FSM<STATE "Skip_6">*/
+ class Skip_6
+ {
+ name = "Skip_6";
+ init = /*%FSM<STATEINIT""">*/""/*%FSM</STATEINIT""">*/;
+ precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
+ class Links
+ {
+ /*%FSM<LINK "_">*/
+ class _
+ {
+ priority = 0.000000;
+ to="Commander_Check";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/"time - _lastUpdate > 10"/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ };
+ };
+ /*%FSM</STATE>*/
+ };
+ initState="Init";
+ finalStates[] =
+ {
+ "End",
+ };
+};
+/*%FSM</COMPILE>*/ \ No newline at end of file
diff --git a/Server/FSM/aiteam.fsm b/Server/FSM/aiteam.fsm
new file mode 100644
index 0000000..62ac00d
--- /dev/null
+++ b/Server/FSM/aiteam.fsm
@@ -0,0 +1,1235 @@
+/*%FSM<COMPILE "D:\ArmA2\FSM Editor Personal Edition\scriptedFSM.cfg, aiteam">*/
+/*%FSM<HEAD>*/
+/*
+item0[] = {"Init",0,250,-81.542984,-257.577942,8.457038,-207.578140,0.000000,"Init"};
+item1[] = {"AI",4,218,-82.819679,-169.595276,7.180347,-119.595261,0.000000,"AI"};
+item2[] = {"Player",4,218,49.705437,-259.537231,139.705353,-209.537186,1.000000,"Player"};
+item3[] = {"End",1,250,321.430817,-171.897736,411.430847,-121.897774,0.000000,"End"};
+item4[] = {"_",-1,250,78.086945,-213.540482,78.086945,-208.131866,0.000000,""};
+item5[] = {"Advanced_Init",2,250,-85.897964,-82.487251,4.102041,-32.487217,0.000000,"Advanced Init"};
+item6[] = {"Loop",4,218,-83.198402,0.114880,6.801598,50.114880,0.000000,"Loop"};
+item7[] = {"",7,210,86.608803,29.398537,94.608841,37.398552,0.000000,""};
+item8[] = {"_",8,218,62.498558,99.618889,94.074371,122.354271,0.000000,""};
+item9[] = {"Towns",4,218,424.040314,260.865143,514.040283,310.865143,1.000000,"Towns"};
+item10[] = {"Check",2,250,-83.027481,86.339714,6.972525,136.339722,0.000000,"Check"};
+item11[] = {"Handle_AI_Mode",2,250,34.021767,145.371872,124.021767,195.371826,0.000000,"Handle" \n "AI Mode"};
+item12[] = {"Handle_Towns",2,4346,645.149963,260.576935,735.150269,310.576996,0.000000,"Handle Towns"};
+item13[] = {"Auto_Move",4,218,156.132660,127.149292,246.132660,177.149307,1.000000,"Auto Move"};
+item14[] = {"Ind_Move",4,218,151.292526,60.816727,241.292587,110.816818,0.000000,"Ind Move"};
+item15[] = {"Handle_Movement",2,250,259.692505,65.755508,349.692505,115.755600,0.000000,"Handle" \n "Movement"};
+item16[] = {"",7,210,783.690674,11.963443,791.690674,19.963448,0.000000,""};
+item17[] = {"Independant",2,250,258.015839,-8.785803,348.015778,41.214260,0.000000,"Independant"};
+item18[] = {"_",8,218,848.837219,4.163350,882.557495,26.575237,0.000000,""};
+item19[] = {"Handle_Buildings",2,250,945.165405,-11.593051,1035.166992,38.406914,0.000000,"Handle Buildings"};
+item20[] = {"Not_Ready",4,218,1100.195435,17.938362,1190.195313,67.938385,0.000000,"Not Ready"};
+item21[] = {"Ready",4,218,1103.682739,-48.457657,1193.682617,1.542370,1.000000,"Ready"};
+item22[] = {"Update_Building",2,250,1231.852661,-47.771744,1321.852783,2.228256,0.000000,"Update Building"};
+item23[] = {"_",8,218,1364.159546,-1.876722,1397.271606,20.541275,0.000000,""};
+item24[] = {"Nil",2,250,1230.162842,18.195518,1320.162720,68.195541,0.000000,"Nil"};
+item25[] = {"Handle_NEURO",2,250,936.365967,410.514252,1026.365967,460.514252,0.000000,"Handle NEURO"};
+item26[] = {"Not_Ready",4,218,786.411011,385.692657,876.411011,435.692657,0.000000,"Not Ready"};
+item27[] = {"Ready",4,218,787.582764,448.519836,877.582764,498.519836,0.000000,"Ready"};
+item28[] = {"Update_NEURO",2,250,666.334106,448.291901,756.334106,498.291901,0.000000,"Update NEURO"};
+item29[] = {"Nil_1",2,250,667.132202,384.425903,757.132202,434.425903,0.000000,"Nil"};
+item30[] = {"_",8,218,594.121155,430.249359,623.907043,450.620209,0.000000,""};
+item31[] = {"Handle_Purchases",2,250,301.274597,414.618500,391.274658,464.618500,0.000000,"Handle" \n "Purchases"};
+item32[] = {"Skip",4,218,181.354340,379.690796,271.354309,429.690796,0.000000,"Skip"};
+item33[] = {"Purchase",4,218,180.375580,442.118439,270.375549,492.118439,0.000000,"Purchase"};
+item34[] = {"Nil_2",2,250,52.676552,379.745789,142.676575,429.745789,0.000000,"Nil"};
+item35[] = {"Handle_Env",2,250,53.368782,440.550720,143.368713,490.550720,0.000000,"Handle Env"};
+item36[] = {"_",8,218,-40.001137,393.311249,-9.106947,416.546387,0.000000,""};
+item37[] = {"Done",2,250,-201.887054,5.574802,-111.887016,55.574814,0.000000,"Done"};
+item38[] = {"Continue",4,218,111.227577,532.703003,201.227600,582.703003,0.000000,"Continue"};
+item39[] = {"Skip",4,218,12.053749,531.477417,102.053658,581.477417,0.000000,"Skip"};
+item40[] = {"",7,210,-160.345612,430.631622,-152.345581,438.631622,0.000000,""};
+item41[] = {"Handle_Purchase",2,250,72.976715,609.960266,162.976746,659.960266,0.000000,"Handle" \n "Purchase"};
+item42[] = {"_",8,218,-166.701218,623.231323,-139.133789,643.141235,0.000000,""};
+item43[] = {"Handle_Move",2,250,600.383606,198.903793,690.383606,248.903793,0.000000,"Handle Move"};
+item44[] = {"Move",4,218,423.396515,198.786560,513.396484,248.786560,0.000000,"Move"};
+item45[] = {"Patrol",4,218,425.609192,137.120514,515.609192,187.120529,0.000000,"Patrol"};
+item46[] = {"Handle_Patrol",2,250,577.069885,137.120560,667.069885,187.120560,0.000000,"Handle Patrol"};
+item47[] = {"Defense",4,218,424.527344,75.454391,514.527283,125.454391,0.000000,"Defense"};
+item48[] = {"Handle_Defense",2,250,557.596313,76.536301,647.596313,126.536301,0.000000,"Handle Defense"};
+item49[] = {"Handle_Injured",2,250,1335.737915,79.091011,1425.737915,129.090988,0.000000,"Handle Injured"};
+item50[] = {"Not_Ready",4,218,1282.343750,173.416992,1372.343750,223.417023,0.000000,"Not Ready"};
+item51[] = {"Ready",4,218,1390.460693,173.416977,1480.460693,223.416962,0.000000,"Ready"};
+item52[] = {"Update_Injured",2,250,1392.124146,264.900574,1482.124146,314.900574,0.000000,"Update Injured"};
+item53[] = {"Nil_3",2,250,1282.343750,263.237244,1372.343750,313.237244,0.000000,"Nil"};
+item54[] = {"_",8,218,1358.857300,424.581024,1397.293823,447.967590,0.000000,""};
+item55[] = {"Check_1",2,250,180.789749,-259.549835,270.789703,-209.549866,0.000000,"Check"};
+item56[] = {"Gameover",4,218,320.254791,-258.390808,410.254761,-208.390778,1.000000,"Gameover"};
+item57[] = {"Idle",4,218,180.499100,-361.358368,270.498993,-311.358368,0.000000,"Idle"};
+item58[] = {"Check_2",2,250,44.078018,-361.358368,134.078003,-311.358368,0.000000,"Check"};
+item59[] = {"Player",4,218,42.931602,-458.802002,132.931793,-408.802002,0.000000,"Player"};
+item60[] = {"AI",4,218,-192.079422,-362.504791,-102.079514,-312.504791,0.000000,"AI"};
+item61[] = {"",7,210,-151.955643,-61.002697,-143.955643,-53.002697,0.000000,""};
+item62[] = {"Wait",2,250,288.260162,-459.948456,378.260162,-409.948456,0.000000,"Wait"};
+item63[] = {"_",8,218,318.144775,-352.061035,349.720581,-329.325653,0.000000,""};
+version=1;
+class LayoutItems
+{
+ class Item4
+ {
+ class ItemInfo
+ {
+ FontFace="Arial";
+ FontHeight=10;
+ lStyle=1;
+ };
+ };
+};
+link0[] = {0,1};
+link1[] = {0,2};
+link2[] = {1,5};
+link3[] = {2,55};
+link4[] = {5,6};
+link5[] = {6,10};
+link6[] = {7,2};
+link7[] = {8,11};
+link8[] = {9,12};
+link9[] = {10,7};
+link10[] = {10,8};
+link11[] = {11,13};
+link12[] = {11,14};
+link13[] = {12,16};
+link14[] = {13,15};
+link15[] = {14,17};
+link16[] = {15,9};
+link17[] = {15,44};
+link18[] = {15,45};
+link19[] = {15,47};
+link20[] = {16,18};
+link21[] = {17,16};
+link22[] = {18,19};
+link23[] = {19,20};
+link24[] = {19,21};
+link25[] = {20,24};
+link26[] = {21,22};
+link27[] = {22,23};
+link28[] = {23,49};
+link29[] = {24,23};
+link30[] = {25,26};
+link31[] = {25,27};
+link32[] = {26,29};
+link33[] = {27,28};
+link34[] = {28,30};
+link35[] = {29,30};
+link36[] = {30,31};
+link37[] = {31,32};
+link38[] = {31,33};
+link39[] = {32,34};
+link40[] = {33,35};
+link41[] = {34,36};
+link42[] = {35,38};
+link43[] = {35,39};
+link44[] = {36,40};
+link45[] = {37,6};
+link46[] = {38,41};
+link47[] = {39,40};
+link48[] = {40,37};
+link49[] = {41,42};
+link50[] = {42,40};
+link51[] = {43,16};
+link52[] = {44,43};
+link53[] = {45,46};
+link54[] = {46,16};
+link55[] = {47,48};
+link56[] = {48,16};
+link57[] = {49,50};
+link58[] = {49,51};
+link59[] = {50,53};
+link60[] = {51,52};
+link61[] = {52,54};
+link62[] = {53,54};
+link63[] = {54,25};
+link64[] = {55,56};
+link65[] = {55,57};
+link66[] = {56,3};
+link67[] = {57,58};
+link68[] = {58,59};
+link69[] = {58,60};
+link70[] = {59,62};
+link71[] = {60,61};
+link72[] = {61,5};
+link73[] = {62,63};
+link74[] = {63,55};
+globals[] = {0.000000,0,0,0,0,640,480,1,102,6316128,1,-236.814148,967.257141,522.169556,-528.625977,707,617,1};
+window[] = {0,-1,-1,-32000,-32000,912,175,1588,175,1,725};
+*//*%FSM</HEAD>*/
+class FSM
+{
+ fsmName = "aiteam";
+ class States
+ {
+ /*%FSM<STATE "Init">*/
+ class Init
+ {
+ name = "Init";
+ init = /*%FSM<STATEINIT""">*/"_team = _this select 0;" \n
+ "_stored = str _team;"/*%FSM</STATEINIT""">*/;
+ precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
+ class Links
+ {
+ /*%FSM<LINK "Player">*/
+ class Player
+ {
+ priority = 1.000000;
+ to="Check_1";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/"isPlayer (leader _team) || isNull _team || isNil ""_team"" || gameOver"/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ /*%FSM<LINK "AI">*/
+ class AI
+ {
+ priority = 0.000000;
+ to="Advanced_Init";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/"!(isPlayer (leader _team))"/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ };
+ };
+ /*%FSM</STATE>*/
+ /*%FSM<STATE "End">*/
+ class End
+ {
+ name = "End";
+ init = /*%FSM<STATEINIT""">*/"diag_log Format[""[WFBE (INFORMATION)][frameno:%2 | ticktime:%3] aiteam.fsm: Team %1 is null or nil, exiting FSM."",_stored,diag_frameno,diag_tickTime];"/*%FSM</STATEINIT""">*/;
+ precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
+ class Links
+ {
+ };
+ };
+ /*%FSM</STATE>*/
+ /*%FSM<STATE "Advanced_Init">*/
+ class Advanced_Init
+ {
+ name = "Advanced_Init";
+ init = /*%FSM<STATEINIT""">*/"diag_log Format[""[WFBE (INFORMATION)][frameno:%2 | ticktime:%3] aiteam.fsm: Team %1 is ai controlled."",_team,diag_frameno,diag_tickTime];" \n
+ "" \n
+ "_side = side _team;" \n
+ "_sideText = str _side;" \n
+ "_sideID = (_side) Call GetSideID;" \n
+ "" \n
+ "_ccInRange = false;" \n
+ "_ccr = 'WFBE_COMMANDCENTERRANGE' Call GetNamespace;" \n
+ "_defenseTime = -120;" \n
+ "_dr = 'WFBE_DEFENSEMANRANGE' Call GetNamespace;" \n
+ "_lastBuyType = -1;" \n
+ "_lastCheckBuilding = -200;" \n
+ "_lastCheckInjured = -200;" \n
+ "_lastCheckVehicles = -200;" \n
+ "_lastCheck = -100;" \n
+ "_lastCoord = [0,0,0];" \n
+ "_mbu = 'WFBE_MAXGROUPSIZEAI' Call GetNamespace;" \n
+ "_minCheckArray = [800,1600,3200,6400];" \n
+ "_moveAtRunning = false;" \n
+ "_moveAtLast = objNull;" \n
+ "_moveAt = objNull;" \n
+ "_pur = 'WFBE_PURCHASEUNITSRANGE' Call GetNamespace;" \n
+ "_pr = 'WFBE_PATROLRANGE' Call GetNamespace;" \n
+ "_templates = Format [""WFBE_%1AITEAMTEMPLATES"",_sideText] Call GetNamespace;" \n
+ "_templatesRequire = Format [""WFBE_%1AITEAMTEMPLATEREQUIRES"",_sideText] Call GetNamespace;" \n
+ "_templatesUpgrade = Format [""WFBE_%1AITEAMUPGRADES"",_sideText] Call GetNamespace;" \n
+ "_town_cvar = """";" \n
+ "if (('WFBE_TOWNCONQUESTMODE' Call GetNamespace) > 0) then {_town_cvar = if (_side == west) then {""wfbe_cancap_w""} else {""wfbe_cancap_e""}};" \n
+ "_upgradeLevel = -1;" \n
+ "_nextPurchase = time + 60 + (random 120);" \n
+ "" \n
+ "_buyType = (_team) Call GetTeamType;" \n
+ "if (_buyType == -1) then {" \n
+ " _index = round(random(count(_templates) - 1));" \n
+ " _teamType = _templates select _index;" \n
+ " _teamRequire = _templatesRequire select _index;" \n
+ " [_team,_index] Call SetTeamType;" \n
+ "};" \n
+ "" \n
+ "if (isMultiplayer && WF_A2_Vanilla) then {[_side,_team] Spawn AISquadRespawn};"/*%FSM</STATEINIT""">*/;
+ precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
+ class Links
+ {
+ /*%FSM<LINK "Loop">*/
+ class Loop
+ {
+ priority = 0.000000;
+ to="Check";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/"time - _lastCheck > 14;"/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ };
+ };
+ /*%FSM</STATE>*/
+ /*%FSM<STATE "Check">*/
+ class Check
+ {
+ name = "Check";
+ init = /*%FSM<STATEINIT""">*/"_lastCheck = time + random(1);"/*%FSM</STATEINIT""">*/;
+ precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
+ class Links
+ {
+ /*%FSM<LINK "Player">*/
+ class Player
+ {
+ priority = 1.000000;
+ to="Check_1";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/"isPlayer (leader _team) || isNull _team || isNil ""_team"" || gameOver"/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ /*%FSM<LINK "_">*/
+ class _
+ {
+ priority = 0.000000;
+ to="Handle_AI_Mode";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/""/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ };
+ };
+ /*%FSM</STATE>*/
+ /*%FSM<STATE "Handle_AI_Mode">*/
+ class Handle_AI_Mode
+ {
+ name = "Handle_AI_Mode";
+ init = /*%FSM<STATEINIT""">*/"_commandMode = _team Call GetTeamAutonomous;"/*%FSM</STATEINIT""">*/;
+ precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
+ class Links
+ {
+ /*%FSM<LINK "Auto_Move">*/
+ class Auto_Move
+ {
+ priority = 1.000000;
+ to="Handle_Movement";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/"!_commandMode"/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ /*%FSM<LINK "Ind_Move">*/
+ class Ind_Move
+ {
+ priority = 0.000000;
+ to="Independant";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/"_commandMode"/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/"_commandMode"/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ };
+ };
+ /*%FSM</STATE>*/
+ /*%FSM<STATE "Handle_Towns">*/
+ class Handle_Towns
+ {
+ name = "Handle_Towns";
+ init = /*%FSM<STATEINIT""">*/"if (_moveMode == 'resetTowns') then {" \n
+ " _moveAtLast = _moveAt;" \n
+ " _moveAt = objNull;" \n
+ " _moveAtRunning = false;" \n
+ " [_team,'towns'] Call SetTeamMoveMode;" \n
+ "};" \n
+ "" \n
+ "if !(isNull _moveAt) then {" \n
+ " _tsideID = _moveAt getVariable 'sideID';" \n
+ " if ((leader _team) distance _moveAt < 40 || _tsideID == _sideID) then {" \n
+ " if (_tsideID == _sideID) then {" \n
+ " _moveAtLast = _moveAt;" \n
+ " _moveAt = objNull;" \n
+ " _moveAtRunning = false;" \n
+ " };" \n
+ " };" \n
+ "};" \n
+ "" \n
+ "if (isNull _moveAt) then {" \n
+ " _moveAt = [leader _team, _side, _town_cvar] Call GetClosestLocationBySide;" \n
+ "};" \n
+ "" \n
+ "if (!isNull _moveAtLast && !isNull _moveAt) then {" \n
+ " _tlsideID = _moveAtLast getVariable 'sideID';" \n
+ " if (_tlsideID != _sideID && ((leader _team) distance _moveAt > (leader _team) distance _moveAtLast)) then {" \n
+ " _moveAtLast = _moveAt;" \n
+ " _moveAt = objNull;" \n
+ " _moveAtRunning = false;" \n
+ " };" \n
+ "};" \n
+ "" \n
+ "if (!isNull _moveAt && !_moveAtRunning) then {" \n
+ " /* Use a smart system to attack a town, AI Commander deal with the teams sync if needed. */" \n
+ " _wporigin = getPos (leader _team);" \n
+ " _wpdest = getPos _moveAt;" \n
+ " " \n
+ " _update = (_team) Call CanUpdateTeam;" \n
+ " if (_update) then {_team Call UpdateTeam};" \n
+ " " \n
+ " _cleanWP = true;" \n
+ " " \n
+ " if (_wporigin distance _wpdest > 550) then {" \n
+ " _percent = 1 - (550 / (_wporigin distance _wpdest));" \n
+ "" \n
+ " _x = (_wporigin select 0) + _percent * ((_wpdest select 0) - (_wporigin select 0));" \n
+ " _y = (_wporigin select 1) + _percent * ((_wpdest select 1) - (_wporigin select 1));" \n
+ " " \n
+ " /* Create the first move order to the town's border */" \n
+ " _wppos = [[_x,_y,0], 0, 75] Call GetRandomPosition;" \n
+ " [_team,true,[[_wppos, 'MOVE', 40, 20, """", [""true"", ""nullReturn = (this) Spawn NEURO_BE_HandleArrivalCargo""]]]] Call AIWPAdd;" \n
+ " _cleanWP = false;" \n
+ " };" \n
+ " " \n
+ " [_team,_cleanWP,[[_moveAt, 'SCRIPTED', 35, 20, 'Server\AI\AI_TLWPHandler.sqs',[]]]] Call AIWPAdd;" \n
+ " [_team,false,[[_moveAt, 'SAD', 35, 20, """", []]]] Call AIWPAdd;" \n
+ " [_team,_moveAt] Call SetTeamMovePos;" \n
+ " " \n
+ " _moveAtRunning = true;" \n
+ "};"/*%FSM</STATEINIT""">*/;
+ precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
+ class Links
+ {
+ /*%FSM<LINK "_">*/
+ class _
+ {
+ priority = 0.000000;
+ to="Handle_Buildings";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/""/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ };
+ };
+ /*%FSM</STATE>*/
+ /*%FSM<STATE "Handle_Movement">*/
+ class Handle_Movement
+ {
+ name = "Handle_Movement";
+ init = /*%FSM<STATEINIT""">*/"_moveMode = _team Call GetTeamMoveMode;"/*%FSM</STATEINIT""">*/;
+ precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
+ class Links
+ {
+ /*%FSM<LINK "Towns">*/
+ class Towns
+ {
+ priority = 1.000000;
+ to="Handle_Towns";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/"_moveMode == 'towns' || _moveMode == 'resetTowns'"/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ /*%FSM<LINK "Patrol">*/
+ class Patrol
+ {
+ priority = 0.000000;
+ to="Handle_Patrol";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/"_moveMode == 'patrol' || _moveMode == 'resetPatrol'"/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ /*%FSM<LINK "Defense">*/
+ class Defense
+ {
+ priority = 0.000000;
+ to="Handle_Defense";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/"_moveMode == 'defense' || _moveMode == 'resetDefense'"/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ /*%FSM<LINK "Move">*/
+ class Move
+ {
+ priority = 0.000000;
+ to="Handle_Move";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/"_moveMode == 'move' || _moveMode == 'resetMove'"/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ };
+ };
+ /*%FSM</STATE>*/
+ /*%FSM<STATE "Independant">*/
+ class Independant
+ {
+ name = "Independant";
+ init = /*%FSM<STATEINIT""">*/"_moveAt = objNull;" \n
+ "_moveAtLast = objNull;" \n
+ "_moveAtRunning = false;"/*%FSM</STATEINIT""">*/;
+ precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
+ class Links
+ {
+ /*%FSM<LINK "_">*/
+ class _
+ {
+ priority = 0.000000;
+ to="Handle_Buildings";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/""/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ };
+ };
+ /*%FSM</STATE>*/
+ /*%FSM<STATE "Handle_Buildings">*/
+ class Handle_Buildings
+ {
+ name = "Handle_Buildings";
+ init = /*%FSM<STATEINIT""">*/""/*%FSM</STATEINIT""">*/;
+ precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
+ class Links
+ {
+ /*%FSM<LINK "Ready">*/
+ class Ready
+ {
+ priority = 1.000000;
+ to="Update_Building";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/"time - _lastCheckBuilding >= 29"/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ /*%FSM<LINK "Not_Ready">*/
+ class Not_Ready
+ {
+ priority = 0.000000;
+ to="Nil";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/"time - _lastCheckBuilding < 29"/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ };
+ };
+ /*%FSM</STATE>*/
+ /*%FSM<STATE "Update_Building">*/
+ class Update_Building
+ {
+ name = "Update_Building";
+ init = /*%FSM<STATEINIT""">*/"_lastCheckBuilding = time;" \n
+ "" \n
+ "_purchaseRange = if (_ccInRange) then {_ccr} else {_pur};" \n
+ "_buildings = (_sideText) Call GetSideStructures;" \n
+ "" \n
+ "_check = ['BARRACKSTYPE',_buildings,_purchaseRange,_side,leader _team] Call BuildingInRange;" \n
+ "_barrack = _check;" \n
+ "_barracksInRange = if (isNull _check) then {false} else {true};" \n
+ "" \n
+ "_check = ['LIGHTTYPE',_buildings,_purchaseRange,_side,leader _team] Call BuildingInRange;" \n
+ "_light = _check;" \n
+ "_lightInRange = if (isNull _check) then {false} else {true};" \n
+ "" \n
+ "_check = ['HEAVYTYPE',_buildings,_purchaseRange,_side,leader _team] Call BuildingInRange;" \n
+ "_heavy = _check;" \n
+ "_heavyInRange = if (isNull _check) then {false} else {true};" \n
+ "" \n
+ "_check = ['AIRCRAFTTYPE',_buildings,_purchaseRange,_side,leader _team] Call BuildingInRange;" \n
+ "_air = _check;" \n
+ "_airInRange = if (isNull _check) then {false} else {true};" \n
+ "" \n
+ "_check = ['COMMANDCENTERTYPE',_buildings,_ccr,_side,leader _team] Call BuildingInRange;" \n
+ "_ccInRange = if (isNull _check) then {false} else {true};" \n
+ "" \n
+ "_buildingArray = [_barrack,_light,_heavy,_air];"/*%FSM</STATEINIT""">*/;
+ precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
+ class Links
+ {
+ /*%FSM<LINK "_">*/
+ class _
+ {
+ priority = 0.000000;
+ to="Handle_Injured";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/""/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ };
+ };
+ /*%FSM</STATE>*/
+ /*%FSM<STATE "Nil">*/
+ class Nil
+ {
+ name = "Nil";
+ init = /*%FSM<STATEINIT""">*/""/*%FSM</STATEINIT""">*/;
+ precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
+ class Links
+ {
+ /*%FSM<LINK "_">*/
+ class _
+ {
+ priority = 0.000000;
+ to="Handle_Injured";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/""/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ };
+ };
+ /*%FSM</STATE>*/
+ /*%FSM<STATE "Handle_NEURO">*/
+ class Handle_NEURO
+ {
+ name = "Handle_NEURO";
+ init = /*%FSM<STATEINIT""">*/""/*%FSM</STATEINIT""">*/;
+ precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
+ class Links
+ {
+ /*%FSM<LINK "Ready">*/
+ class Ready
+ {
+ priority = 0.000000;
+ to="Update_NEURO";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/"(time - _lastCheckVehicles >= 30) && !paramUPSMON"/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ /*%FSM<LINK "Not_Ready">*/
+ class Not_Ready
+ {
+ priority = 0.000000;
+ to="Nil_1";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/"(time - _lastCheckVehicles < 30) || paramUPSMON"/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ };
+ };
+ /*%FSM</STATE>*/
+ /*%FSM<STATE "Update_NEURO">*/
+ class Update_NEURO
+ {
+ name = "Update_NEURO";
+ init = /*%FSM<STATEINIT""">*/"_lastCheckVehicles = time;" \n
+ "" \n
+ "_vehicles = [_team, false] Call GetTeamVehicles;" \n
+ "" \n
+ "//--- Update the Path." \n
+ "(_team) Call NEURO_BE_UpdateTeamDestination;" \n
+ "" \n
+ "//--- Update NEURO transportation." \n
+ "_canAssign = true;" \n
+ "" \n
+ "//--- NEURO Security, AI don't need to get in when they are taking a town." \n
+ "if (_moveMode == 'towns') then {" \n
+ " if (leader _team distance _moveAt < 700) then {_canAssign = false};" \n
+ "};" \n
+ "" \n
+ "if (_canAssign) then {[_team, getPos leader _team] Call NEURO_BE_AssignToVehicle};"/*%FSM</STATEINIT""">*/;
+ precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
+ class Links
+ {
+ /*%FSM<LINK "_">*/
+ class _
+ {
+ priority = 0.000000;
+ to="Handle_Purchases";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/""/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ };
+ };
+ /*%FSM</STATE>*/
+ /*%FSM<STATE "Nil_1">*/
+ class Nil_1
+ {
+ name = "Nil_1";
+ init = /*%FSM<STATEINIT""">*/""/*%FSM</STATEINIT""">*/;
+ precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
+ class Links
+ {
+ /*%FSM<LINK "_">*/
+ class _
+ {
+ priority = 0.000000;
+ to="Handle_Purchases";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/""/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ };
+ };
+ /*%FSM</STATE>*/
+ /*%FSM<STATE "Handle_Purchases">*/
+ class Handle_Purchases
+ {
+ name = "Handle_Purchases";
+ init = /*%FSM<STATEINIT""">*/"_size = Count ((units _team) Call GetLiveUnits);" \n
+ "_globalQueu = _team getVariable ""queue"";" \n
+ "if (isNil ""_globalQueu"") then {_globalQueu = []};" \n
+ "_cpt = count _globalQueu;"/*%FSM</STATEINIT""">*/;
+ precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
+ class Links
+ {
+ /*%FSM<LINK "Purchase">*/
+ class Purchase
+ {
+ priority = 0.000000;
+ to="Handle_Env";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/"(_cpt + _size) <= _mbu && alive (leader _team) && time > _nextPurchase"/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ /*%FSM<LINK "Skip">*/
+ class Skip
+ {
+ priority = 0.000000;
+ to="Nil_2";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/"(_cpt + _size) > _mbu || time <= _nextPurchase"/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ };
+ };
+ /*%FSM</STATE>*/
+ /*%FSM<STATE "Nil_2">*/
+ class Nil_2
+ {
+ name = "Nil_2";
+ init = /*%FSM<STATEINIT""">*/""/*%FSM</STATEINIT""">*/;
+ precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
+ class Links
+ {
+ /*%FSM<LINK "_">*/
+ class _
+ {
+ priority = 0.000000;
+ to="Done";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/""/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ };
+ };
+ /*%FSM</STATE>*/
+ /*%FSM<STATE "Handle_Env">*/
+ class Handle_Env
+ {
+ name = "Handle_Env";
+ init = /*%FSM<STATEINIT""">*/"_buyType = (_team) Call GetTeamType;" \n
+ "" \n
+ "_teamType = _templates select _buyType;" \n
+ "_teamRequire = _templatesRequire select _buyType;" \n
+ "_teamUpgrade = _templatesUpgrade select _buyType;" \n
+ "" \n
+ "_upgrades = (_sideText) Call GetSideUpgrades;" \n
+ "" \n
+ "_barrackUpLevel = _upgrades select 0;" \n
+ "_lightUpLevel = _upgrades select 1;" \n
+ "_heavyUpLevel = _upgrades select 2;" \n
+ "_airUpLevel = _upgrades select 3;" \n
+ "" \n
+ "_upArray = [_barrackUpLevel,_lightUpLevel,_heavyUpLevel,_airUpLevel];" \n
+ "_funds = _team Call GetTeamFunds;" \n
+ "" \n
+ "_canBuy = true;" \n
+ "for '_i' from 0 to 3 do {" \n
+ " if ((_upArray select _i) < (_teamUpgrade select _i)) then {" \n
+ " _canBuy = false;" \n
+ " } else {" \n
+ " if (_teamRequire select _i) then {" \n
+ " if (_funds < (_minCheckArray select _i)) then {" \n
+ " _canBuy = false;" \n
+ " };" \n
+ " };" \n
+ " };" \n
+ "};"/*%FSM</STATEINIT""">*/;
+ precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
+ class Links
+ {
+ /*%FSM<LINK "Skip">*/
+ class Skip
+ {
+ priority = 0.000000;
+ to="Done";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/"!_canBuy"/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ /*%FSM<LINK "Continue">*/
+ class Continue
+ {
+ priority = 0.000000;
+ to="Handle_Purchase";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/"_canBuy"/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ };
+ };
+ /*%FSM</STATE>*/
+ /*%FSM<STATE "Done">*/
+ class Done
+ {
+ name = "Done";
+ init = /*%FSM<STATEINIT""">*/""/*%FSM</STATEINIT""">*/;
+ precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
+ class Links
+ {
+ /*%FSM<LINK "Loop">*/
+ class Loop
+ {
+ priority = 0.000000;
+ to="Check";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/"time - _lastCheck > 14;"/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ };
+ };
+ /*%FSM</STATE>*/
+ /*%FSM<STATE "Handle_Purchase">*/
+ class Handle_Purchase
+ {
+ name = "Handle_Purchase";
+ init = /*%FSM<STATEINIT""">*/"_nextPurchase = time + 60 + (random 120);" \n
+ "" \n
+ "_buyType = (_team) Call GetTeamType;" \n
+ "if (_lastBuyType != _buyType) then {" \n
+ " if (_buyType != -1) then {" \n
+ " _teamType = _templates select _buyType;" \n
+ " _teamRequire = _templatesRequire select _buyType;" \n
+ " };" \n
+ " _lastBuyType = _buyType;" \n
+ "};" \n
+ "" \n
+ "//--- Final types." \n
+ "_types = +_teamType;" \n
+ "" \n
+ "//--- Prevent class stacking, use an existing type compare system." \n
+ "_units = (units _team) Call GetLiveUnits;" \n
+ "_units = _units + ([_team, true] Call GetTeamVehicles);" \n
+ "_typesU = [];" \n
+ "{_typesU = _typesU + [typeOf _x]} forEach _units;" \n
+ "" \n
+ "_difference = round(_mbu / count _types);" \n
+ "_maxAllowed = [];" \n
+ "" \n
+ "for '_i' from 0 to count(_types)-1 do {" \n
+ " _type = _types select _i;" \n
+ " //--- IMPORTANT TODO: Do the godamn ratio for each vehicle over the count of teamtypes. 4 = 20% each" \n
+ " _maxAllowed set [_i, _difference - ({_x == _type} count _typesU)];" \n
+ "};" \n
+ "" \n
+ "for '_i' from 0 to count(_maxAllowed) do {" \n
+ " if ((_maxAllowed select _i) <= 0) then {" \n
+ " _maxAllowed set [_i, -1];" \n
+ " _types set [_i, -1];" \n
+ " };" \n
+ "};" \n
+ "" \n
+ "//--- We remove the unecessary types." \n
+ "_types = _types - [-1];" \n
+ "_maxAllowed = _maxAllowed - [-1];" \n
+ "" \n
+ "if (count _types > 0) then {" \n
+ " //--- Use CIPHER module to order the array with priority." \n
+ " _types = ([_maxAllowed, true, _types] Call CIPHER_SortArray) select 1;" \n
+ "};" \n
+ "" \n
+ "//--- Define the needs." \n
+ "_needs = [];" \n
+ "if (_teamRequire select 0) then {_needs = _needs + [_barracksInRange]};" \n
+ "if (_teamRequire select 1) then {_needs = _needs + [_lightInRange]};" \n
+ "if (_teamRequire select 2) then {_needs = _needs + [_heavyInRange]};" \n
+ "if (_teamRequire select 3) then {_needs = _needs + [_airInRange]};" \n
+ "_canBuy = true;" \n
+ "{if (!_x) then {_canBuy = false}} forEach _needs;" \n
+ "" \n
+ "//--- Team purchases." \n
+ "if (_canBuy) then {" \n
+ " _upgrades = (_sideText) Call GetSideUpgrades;" \n
+ " {" \n
+ " _buyFrom = objNull;" \n
+ " _kindDetail = _x Call GetNamespace;" \n
+ " if !(isNil '_kindDetail') then {" \n
+ " _crews = _kindDetail select QUERYUNITCREW;" \n
+ " _price = _kindDetail select QUERYUNITPRICE;" \n
+ " _upgradeRequired = _kindDetail select QUERYUNITUPGRADE;" \n
+ " _unitType = _kindDetail select QUERYUNITFACTORY;" \n
+ " switch (_unitType) do {" \n
+ " case 0: {" \n
+ " _buyFrom = _barrack;" \n
+ " _upgradeLevel = 0;" \n
+ " };" \n
+ " case 1: {" \n
+ " _buyFrom = _light;" \n
+ " _upgradeLevel = 1;" \n
+ " };" \n
+ " case 2: {" \n
+ " _buyFrom = _heavy;" \n
+ " _upgradeLevel = 2;" \n
+ " };" \n
+ " case 3: {" \n
+ " _buyFrom = _air;" \n
+ " _upgradeLevel = 2;" \n
+ " };" \n
+ " };" \n
+ " if !(isNull _buyFrom) then {" \n
+ " _upgradeStatus = _upgrades select _upgradeLevel;" \n
+ " _globalQueu = +(_team getVariable ""queue"");" \n
+ " if (isNil ""_globalQueu"") then {_globalQueu = []};" \n
+ " if ((count _globalQueu) + _size < _mbu && _funds > _price && _upgradeStatus >= _upgradeRequired) then {" \n
+ " _vehiSlots = [true,false,false,false];" \n
+ " _IDS = []; " \n
+ " if !(_x isKindOf ""Man"") then {" \n
+ " if (typeName _crews == ""ARRAY"") then {" \n
+ " if (_crews select 0) then {_vehiSlots set [2, true]};" \n
+ " if (_crews select 1) then {_vehiSlots set [1, true]};" \n
+ " if ((_crews select 3) > 0) then {_vehiSlots set [3, true]};" \n
+ " " \n
+ " {" \n
+ " _ran = round(2000 + random(10) + random (100) + random(1000));" \n
+ " _globalQueu set [count _globalQueu, _ran];" \n
+ " _IDS set [count _IDS, _ran];" \n
+ " } forEach _vehiSlots;" \n
+ " } else {" \n
+ " if (_crews < 3 && _crews != 1) then {" \n
+ " _ran2 = round(2000 + random(10) + random (100) + random(1000));" \n
+ " _globalQueu = _globalQueu + [_ran2];" \n
+ " _vehiSlots = [true,true,false];" \n
+ " _IDS = _IDS + [_ran2];" \n
+ " };" \n
+ " if (_crews > 2) then {" \n
+ " _ran2 = round(2000 + random(10) + random (100) + random(1000));" \n
+ " _ran3 = round(2000 + random(10) + random (100) + random(1000));" \n
+ " _globalQueu = _globalQueu + [_ran2,_ran3];" \n
+ " _vehiSlots = [true,true,true];" \n
+ " _IDS = _IDS + [_ran2,_ran3];" \n
+ " };" \n
+ " };" \n
+ " } else {" \n
+ " _ran = round(2000 + random(10) + random (100) + random(1000));" \n
+ " _IDS = [_ran];" \n
+ " _globalQueu = _globalQueu + [_ran];" \n
+ " };" \n
+ " [_IDS,_buyFrom,_x,_side,_team,_vehiSlots] Spawn AIBuyUnit;" \n
+ " [_team,-_price] Call ChangeTeamFunds;" \n
+ " _team setVariable [""queue"", _globalQueu];" \n
+ " };" \n
+ " };" \n
+ " } else {" \n
+ " diag_log Format[""[WFBE (ERROR)][frameno:%2 | ticktime:%3] aiteam.fsm: Element %1 is not defined within the core system."",_x,diag_frameno,diag_tickTime];" \n
+ " };" \n
+ " } forEach _types;" \n
+ "};"/*%FSM</STATEINIT""">*/;
+ precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
+ class Links
+ {
+ /*%FSM<LINK "_">*/
+ class _
+ {
+ priority = 0.000000;
+ to="Done";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/""/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ };
+ };
+ /*%FSM</STATE>*/
+ /*%FSM<STATE "Handle_Move">*/
+ class Handle_Move
+ {
+ name = "Handle_Move";
+ init = /*%FSM<STATEINIT""">*/"if (_moveMode == 'resetMove') then {" \n
+ " _lastCoord = [0,0,0];" \n
+ " [_team,'move'] Call SetTeamMoveMode;" \n
+ "};" \n
+ "" \n
+ "_coord = (_team) Call GetTeamMovePos;" \n
+ "if ((_coord select 0 != _lastCoord select 0)&&(_coord select 1 != _lastCoord select 1)) then {" \n
+ " _lastCoord = _coord;" \n
+ " _update = (_team) Call CanUpdateTeam;" \n
+ " if (_update) then {_team Call UpdateTeam};" \n
+ " [_team,true,[[_coord, 'MOVE', 40, 20, """", []]]] Call AIWPAdd;" \n
+ "" \n
+ " _moveAtLast = _moveAt;" \n
+ " _moveAt = objNull;" \n
+ " _moveAtRunning = false;" \n
+ "};"/*%FSM</STATEINIT""">*/;
+ precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
+ class Links
+ {
+ /*%FSM<LINK "_">*/
+ class _
+ {
+ priority = 0.000000;
+ to="Handle_Buildings";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/""/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ };
+ };
+ /*%FSM</STATE>*/
+ /*%FSM<STATE "Handle_Patrol">*/
+ class Handle_Patrol
+ {
+ name = "Handle_Patrol";
+ init = /*%FSM<STATEINIT""">*/"if (_moveMode == 'resetPatrol') then {" \n
+ " _lastCoord = [0,0,0];" \n
+ " [_team,'patrol'] Call SetTeamMoveMode;" \n
+ "};" \n
+ "" \n
+ "_coord = (_team) Call GetTeamMovePos;" \n
+ "if ((_coord select 0 != _lastCoord select 0)&&(_coord select 1 != _lastCoord select 1)) then {" \n
+ " _lastCoord = _coord;" \n
+ " [_team,_coord,_pr] Call AIPatrol;" \n
+ "" \n
+ " _moveAtLast = _moveAt;" \n
+ " _moveAt = objNull;" \n
+ " _moveAtRunning = false;" \n
+ "};"/*%FSM</STATEINIT""">*/;
+ precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
+ class Links
+ {
+ /*%FSM<LINK "_">*/
+ class _
+ {
+ priority = 0.000000;
+ to="Handle_Buildings";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/""/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ };
+ };
+ /*%FSM</STATE>*/
+ /*%FSM<STATE "Handle_Defense">*/
+ class Handle_Defense
+ {
+ name = "Handle_Defense";
+ init = /*%FSM<STATEINIT""">*/"if (_moveMode == 'resetDefense') then {" \n
+ " _lastCoord = [0,0,0];" \n
+ " [_team,'defense'] Call SetTeamMoveMode;" \n
+ "};" \n
+ "" \n
+ "_coord = (_team) Call GetTeamMovePos;" \n
+ "if ((_coord select 0 != _lastCoord select 0)&&(_coord select 1 != _lastCoord select 1)) then {" \n
+ " _lastCoord = _coord;" \n
+ " [_team,_coord,_pr] Call AIPatrol;" \n
+ "" \n
+ " _moveAtLast = _moveAt;" \n
+ " _moveAt = objNull;" \n
+ " _moveAtRunning = false;" \n
+ "};" \n
+ "" \n
+ "if (time - _defenseTime > 60) then {" \n
+ " _defenseTime = time;" \n
+ " [units _team,_dr] Call UseStationaryDefense;" \n
+ "};"/*%FSM</STATEINIT""">*/;
+ precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
+ class Links
+ {
+ /*%FSM<LINK "_">*/
+ class _
+ {
+ priority = 0.000000;
+ to="Handle_Buildings";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/""/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ };
+ };
+ /*%FSM</STATE>*/
+ /*%FSM<STATE "Handle_Injured">*/
+ class Handle_Injured
+ {
+ name = "Handle_Injured";
+ init = /*%FSM<STATEINIT""">*/""/*%FSM</STATEINIT""">*/;
+ precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
+ class Links
+ {
+ /*%FSM<LINK "Ready">*/
+ class Ready
+ {
+ priority = 0.000000;
+ to="Update_Injured";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/"time - _lastCheckInjured >= 119"/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ /*%FSM<LINK "Not_Ready">*/
+ class Not_Ready
+ {
+ priority = 0.000000;
+ to="Nil_3";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/"time - _lastCheckInjured < 119"/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ };
+ };
+ /*%FSM</STATE>*/
+ /*%FSM<STATE "Update_Injured">*/
+ class Update_Injured
+ {
+ name = "Update_Injured";
+ init = /*%FSM<STATEINIT""">*/"_lastCheckInjured = time;" \n
+ "" \n
+ "_alives = (units _team) Call GetLiveUnits;" \n
+ "" \n
+ "{" \n
+ " if (vehicle _x == _x) then {" \n
+ " if !(canStand _x) then {" \n
+ " _x playMove ""amovppnemstpsraswrfldnon_healed"";" \n
+ " _x setDammage 0;" \n
+ " };" \n
+ " };" \n
+ "} forEach _alives;"/*%FSM</STATEINIT""">*/;
+ precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
+ class Links
+ {
+ /*%FSM<LINK "_">*/
+ class _
+ {
+ priority = 0.000000;
+ to="Handle_NEURO";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/""/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ };
+ };
+ /*%FSM</STATE>*/
+ /*%FSM<STATE "Nil_3">*/
+ class Nil_3
+ {
+ name = "Nil_3";
+ init = /*%FSM<STATEINIT""">*/""/*%FSM</STATEINIT""">*/;
+ precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
+ class Links
+ {
+ /*%FSM<LINK "_">*/
+ class _
+ {
+ priority = 0.000000;
+ to="Handle_NEURO";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/""/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ };
+ };
+ /*%FSM</STATE>*/
+ /*%FSM<STATE "Check_1">*/
+ class Check_1
+ {
+ name = "Check_1";
+ init = /*%FSM<STATEINIT""">*/""/*%FSM</STATEINIT""">*/;
+ precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
+ class Links
+ {
+ /*%FSM<LINK "Gameover">*/
+ class Gameover
+ {
+ priority = 1.000000;
+ to="End";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/"gameOver || isNil ""_team"" || isNull _team"/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ /*%FSM<LINK "Idle">*/
+ class Idle
+ {
+ priority = 0.000000;
+ to="Check_2";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/"!gameOver && !isNull _team"/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ };
+ };
+ /*%FSM</STATE>*/
+ /*%FSM<STATE "Check_2">*/
+ class Check_2
+ {
+ name = "Check_2";
+ init = /*%FSM<STATEINIT""">*/""/*%FSM</STATEINIT""">*/;
+ precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
+ class Links
+ {
+ /*%FSM<LINK "AI">*/
+ class AI
+ {
+ priority = 0.000000;
+ to="Advanced_Init";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/"!isPlayer (leader _team)"/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ /*%FSM<LINK "Player">*/
+ class Player
+ {
+ priority = 0.000000;
+ to="Wait";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/"isPlayer (leader _team)"/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ };
+ };
+ /*%FSM</STATE>*/
+ /*%FSM<STATE "Wait">*/
+ class Wait
+ {
+ name = "Wait";
+ init = /*%FSM<STATEINIT""">*/"_wait = time + 20;"/*%FSM</STATEINIT""">*/;
+ precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
+ class Links
+ {
+ /*%FSM<LINK "_">*/
+ class _
+ {
+ priority = 0.000000;
+ to="Check_1";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/"time > _wait"/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ };
+ };
+ /*%FSM</STATE>*/
+ };
+ initState="Init";
+ finalStates[] =
+ {
+ "End",
+ };
+};
+/*%FSM</COMPILE>*/ \ No newline at end of file
diff --git a/Server/FSM/allies.fsm b/Server/FSM/allies.fsm
new file mode 100644
index 0000000..e2248b4
--- /dev/null
+++ b/Server/FSM/allies.fsm
@@ -0,0 +1,274 @@
+/*%FSM<COMPILE "D:\ArmA2\FSM Editor Personal Edition\scriptedFSM.cfg, allies">*/
+/*%FSM<HEAD>*/
+/*
+item0[] = {"Allies_Init",0,250,-44.418510,-87.799530,45.581596,-37.799454,0.000000,"Allies" \n "Init"};
+item1[] = {"loop",4,218,-43.082561,-10.971841,46.917431,39.028156,0.000000,"loop"};
+item2[] = {"Check",2,4346,-190.853607,-12.100532,-100.853592,37.899467,0.000000,"Check"};
+item3[] = {"done",4,218,-314.399872,-10.889294,-224.399902,39.110706,0.000000,"done"};
+item4[] = {"end",1,250,-315.611145,69.052460,-225.611130,119.052437,0.000000,"end"};
+link0[] = {0,1};
+link1[] = {1,2};
+link2[] = {2,1};
+link3[] = {2,3};
+link4[] = {3,4};
+globals[] = {0.000000,0,0,0,0,640,480,1,23,6316128,1,-472.927826,92.799797,435.032471,-147.570496,704,720,1};
+window[] = {0,-1,-1,-1,-1,945,231,1576,105,1,722};
+*//*%FSM</HEAD>*/
+class FSM
+{
+ fsmName = "allies";
+ class States
+ {
+ /*%FSM<STATE "Allies_Init">*/
+ class Allies_Init
+ {
+ name = "Allies_Init";
+ init = /*%FSM<STATEINIT""">*/"_side = _this select 0;" \n
+ "_sideText = str _side;" \n
+ "_timeStart = time;" \n
+ "" \n
+ "_startingLocation = Call Compile Format [""%1StartingLocation"",_sideText];" \n
+ "_nearest = [_startingLocation,(startingLocations - [_startingLocation])] Call SortByDistance;" \n
+ "_allysLoc = _nearest select 0;" \n
+ "" \n
+ "_types = if (_side == west) then {[""CDF_WarfareBBarracks"",""CDF_WarfareBLightFactory"",""CDF_WarfareBUAVterminal"",""CDF_WarfareBHeavyFactory"",""CDF_WarfareBAircraftFactory"",""CDF_WarfareBVehicleServicePoint""]} else {[""Ins_WarfareBBarracks"",""Ins_WarfareBLightFactory"",""Ins_WarfareBUAVterminal"",""Ins_WarfareBHeavyFactory"",""Ins_WarfareBAircraftFactory"",""Ins_WarfareBVehicleServicePoint""]};" \n
+ "_structureRelPos = [[75,75],[-75,75],[75,0],[75,-75],[-75,-75],[-75,0]];" \n
+ "_structurePos = [[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]];" \n
+ "_structureLabel = [""B"",""L"",""C"",""H"",""A"",""S""];" \n
+ "_alives = [];" \n
+ "" \n
+ "_checkNeeds = {" \n
+ " Private [""_building"",""_canBuy"",""_needs"",""_require""];" \n
+ " _require = _this select 0;" \n
+ " _building = _this select 1;" \n
+ " _needs = [];" \n
+ " if (_require select 0) then {_needs = _needs + [alive (_building select 0)]};" \n
+ " if (_require select 1) then {_needs = _needs + [alive (_building select 1)]};" \n
+ " if (_require select 2) then {_needs = _needs + [alive (_building select 2)]};" \n
+ " if (_require select 3) then {_needs = _needs + [alive (_building select 3)]};" \n
+ " _canBuy = true;" \n
+ " {if (!_x) then {_canBuy = false}} forEach _needs;" \n
+ " _canBuy" \n
+ "};" \n
+ "" \n
+ "for [{_count = 0},{_count < (count _types)},{_count = _count + 1}] do {" \n
+ " _type = _types select _count;" \n
+ " _x = getPos _allysLoc select 0;" \n
+ " _y = getPos _allysLoc select 1;" \n
+ " _pos = [];" \n
+ " _pos set [0,((_structureRelPos select _count) select 0) + _x];" \n
+ " _pos set [1,((_structureRelPos select _count) select 1) + _y];" \n
+ " _newPos = [0,0,0];" \n
+ " _roads = [];" \n
+ " _continue = true;" \n
+ " while {_continue} do {" \n
+ " _newPos = [_pos,30,100,10,0,50,0] Call BIS_fnc_findSafePos;" \n
+ " _roads = _newPos nearRoads 60;" \n
+ " _isTooClose = false;" \n
+ " {if (_x distance _newPos < 70) then {_isTooClose = true}} forEach _structurePos;" \n
+ " if (count _roads == 0 || _isTooClose) then {_continue = false};" \n
+ " };" \n
+ " _structurePos set [_count, _newPos];" \n
+ " _building = _type createVehicle (_structurePos select _count);" \n
+ " _building setVehicleInit Format[""[this,false,%1,'%2'] ExecVM 'Client\Init\Init_BaseStructure.sqf'"",_side,_structureLabel select _count];" \n
+ " processInitCommands;" \n
+ " if (_count in [0,1,3,4]) then {_alives = _alives + [_building]};" \n
+ "};" \n
+ "" \n
+ "_barrack = _alives select 0;" \n
+ "_light = _alives select 1;" \n
+ "_heavy = _alives select 2;" \n
+ "_air = _alives select 3;" \n
+ "" \n
+ "_alliesTemplates = Format[""WFBE_%1ALLIESTEAMTEMPLATES"",_sideText] Call GetNamespace;" \n
+ "_alliesTemplatesRequire = Format[""WFBE_%1ALLIESTEAMTEMPLATEREQUIRES"",_sideText] Call GetNamespace;" \n
+ "_alliesTemplatesTypes = Format[""WFBE_%1ALLIESTEAMTYPES"",_sideText] Call GetNamespace;" \n
+ "_alliesTemplatesCost = Format[""WFBE_%1ALLIESTEAMCOST"",_sideText] Call GetNamespace;" \n
+ "" \n
+ "_barracksTemplate = [];" \n
+ "_lightTemplate = [];" \n
+ "_heavyTemplate = [];" \n
+ "_airTemplate = [];" \n
+ "_o = 0;" \n
+ "{" \n
+ " if (_alliesTemplatesTypes select _o == 0) then {_barracksTemplate = _barracksTemplate + [_o]};" \n
+ " if (_alliesTemplatesTypes select _o == 1) then {_lightTemplate = _lightTemplate + [_o]};" \n
+ " if (_alliesTemplatesTypes select _o == 2) then {_heavyTemplate = _heavyTemplate + [_o]};" \n
+ " if (_alliesTemplatesTypes select _o == 3) then {_airTemplate = _airTemplate + [_o]};" \n
+ " _o = _o + 1;" \n
+ "} forEach _alliesTemplates;" \n
+ "" \n
+ "WF_Logic setVariable [Format[""%1TeamInfA"",_sideText],false];" \n
+ "WF_Logic setVariable [Format[""%1TeamInfB"",_sideText],false];" \n
+ "WF_Logic setVariable [Format[""%1TeamVehA"",_sideText],false];" \n
+ "WF_Logic setVariable [Format[""%1TeamHVehA"",_sideText],false];" \n
+ "WF_Logic setVariable [Format[""%1TeamAVehA"",_sideText],false];" \n
+ "" \n
+ "_minInfFunds = 2000;" \n
+ "_minLightFunds = 5000;" \n
+ "_minHeavyFunds = 8000;" \n
+ "_minAirFunds = 40000;"/*%FSM</STATEINIT""">*/;
+ precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
+ class Links
+ {
+ /*%FSM<LINK "loop">*/
+ class loop
+ {
+ priority = 0.000000;
+ to="Check";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/"!gameOver && time - _timeStart > 60"/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ };
+ };
+ /*%FSM</STATE>*/
+ /*%FSM<STATE "Check">*/
+ class Check
+ {
+ name = "Check";
+ init = /*%FSM<STATEINIT""">*/"_timeStart = time;" \n
+ "" \n
+ "_funds = Call Compile Format [""%1AlliesFunds"",_sideText];" \n
+ "" \n
+ "_teamInfAAlive = WF_Logic getVariable Format[""%1TeamInfA"",_sideText];" \n
+ "_teamInfBAlive = WF_Logic getVariable Format[""%1TeamInfB"",_sideText];" \n
+ "_teamVehAAlive = WF_Logic getVariable Format[""%1TeamVehA"",_sideText];" \n
+ "_teamHVehAAlive = WF_Logic getVariable Format[""%1TeamHVehA"",_sideText];" \n
+ "_teamAVehAAlive = WF_Logic getVariable Format[""%1TeamAVehA"",_sideText];" \n
+ "" \n
+ "if (!_teamInfAAlive) then {" \n
+ " if (_funds > _minInfFunds) then {" \n
+ " _ranTemp = _barracksTemplate select round(random((count _barracksTemplate)-1));" \n
+ " _templateToUse = _alliesTemplates select _ranTemp;" \n
+ " _templateRequire = _alliesTemplatesRequire select _ranTemp;" \n
+ " _templateCost = _alliesTemplatesCost select _ranTemp;" \n
+ " " \n
+ " _canBuy = [_templateRequire,_alives] Call _checkNeeds;" \n
+ " " \n
+ " if (_funds > _templateCost && _canBuy) then {" \n
+ " Call Compile Format [""%1AlliesFunds = %1AlliesFunds - _templateCost"",_sideText];" \n
+ " _funds = Call Compile Format [""%1AlliesFunds"",_sideText];" \n
+ " [_side,_templateToUse,_templateRequire,_alives,Format[""%1TeamInfA"",_sideText]] ExecFSM ""Server\FSM\allies_team.fsm"";" \n
+ " WF_Logic setVariable [Format[""%1TeamInfA"",_sideText],true];" \n
+ " };" \n
+ " };" \n
+ "};" \n
+ "" \n
+ "if (!_teamInfBAlive) then {" \n
+ " if (_funds > _minInfFunds) then {" \n
+ " _ranTemp = _barracksTemplate select round(random((count _barracksTemplate)-1));" \n
+ " _templateToUse = _alliesTemplates select _ranTemp;" \n
+ " _templateRequire = _alliesTemplatesRequire select _ranTemp;" \n
+ " _templateCost = _alliesTemplatesCost select _ranTemp;" \n
+ " " \n
+ " _canBuy = [_templateRequire,_alives] Call _checkNeeds;" \n
+ " " \n
+ " if (_funds > _templateCost && _canBuy) then {" \n
+ " Call Compile Format [""%1AlliesFunds = %1AlliesFunds - _templateCost"",_sideText];" \n
+ " _funds = Call Compile Format [""%1AlliesFunds"",_sideText];" \n
+ " [_side,_templateToUse,_templateRequire,_alives,Format[""%1TeamInfB"",_sideText]] ExecFSM ""Server\FSM\allies_team.fsm"";" \n
+ " WF_Logic setVariable [Format[""%1TeamInfB"",_sideText],true];" \n
+ " };" \n
+ " };" \n
+ "};" \n
+ "" \n
+ "if (!_teamVehAAlive) then {" \n
+ " if (_funds > _minLightFunds) then {" \n
+ " _ranTemp = _lightTemplate select round(random((count _lightTemplate)-1));" \n
+ " _templateToUse = _alliesTemplates select _ranTemp;" \n
+ " _templateRequire = _alliesTemplatesRequire select _ranTemp;" \n
+ " _templateCost = _alliesTemplatesCost select _ranTemp;" \n
+ " " \n
+ " _canBuy = [_templateRequire,_alives] Call _checkNeeds;" \n
+ " " \n
+ " if (_funds > _templateCost && _canBuy) then {" \n
+ " Call Compile Format [""%1AlliesFunds = %1AlliesFunds - _templateCost"",_sideText];" \n
+ " _funds = Call Compile Format [""%1AlliesFunds"",_sideText];" \n
+ " [_side,_templateToUse,_templateRequire,_alives,Format[""%1TeamVehA"",_sideText]] ExecFSM ""Server\FSM\allies_team.fsm"";" \n
+ " WF_Logic setVariable [Format[""%1TeamVehA"",_sideText],true];" \n
+ " };" \n
+ " };" \n
+ "};" \n
+ "" \n
+ "if (!_teamHVehAAlive) then {" \n
+ " if (_funds > _minHeavyFunds) then {" \n
+ " _ranTemp = _heavyTemplate select round(random((count _heavyTemplate)-1));" \n
+ " _templateToUse = _alliesTemplates select _ranTemp;" \n
+ " _templateRequire = _alliesTemplatesRequire select _ranTemp;" \n
+ " _templateCost = _alliesTemplatesCost select _ranTemp;" \n
+ " " \n
+ " _canBuy = [_templateRequire,_alives] Call _checkNeeds;" \n
+ "" \n
+ " if (_funds > _templateCost && _canBuy) then {" \n
+ " Call Compile Format [""%1AlliesFunds = %1AlliesFunds - _templateCost"",_sideText];" \n
+ " _funds = Call Compile Format [""%1AlliesFunds"",_sideText];" \n
+ " [_side,_templateToUse,_templateRequire,_alives,Format[""%1TeamHVehA"",_sideText]] ExecFSM ""Server\FSM\allies_team.fsm"";" \n
+ " WF_Logic setVariable [Format[""%1TeamHVehA"",_sideText],true];" \n
+ " };" \n
+ " };" \n
+ "};" \n
+ "" \n
+ "if (!_teamAVehAAlive) then {" \n
+ " if (_funds > _minAirFunds) then {" \n
+ " _ranTemp = _airTemplate select round(random((count _airTemplate)-1));" \n
+ " _templateToUse = _alliesTemplates select _ranTemp;" \n
+ " _templateRequire = _alliesTemplatesRequire select _ranTemp;" \n
+ " _templateCost = _alliesTemplatesCost select _ranTemp;" \n
+ " " \n
+ " _canBuy = [_templateRequire,_alives] Call _checkNeeds;" \n
+ " " \n
+ " if (_funds > _templateCost && _canBuy) then {" \n
+ " Call Compile Format [""%1AlliesFunds = %1AlliesFunds - _templateCost"",_sideText];" \n
+ " _funds = Call Compile Format [""%1AlliesFunds"",_sideText];" \n
+ " [_side,_templateToUse,_templateRequire,_alives,Format[""%1TeamAVehA"",_sideText]] ExecFSM ""Server\FSM\allies_team.fsm"";" \n
+ " WF_Logic setVariable [Format[""%1TeamAVehA"",_sideText],true];" \n
+ " };" \n
+ " };" \n
+ "};"/*%FSM</STATEINIT""">*/;
+ precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
+ class Links
+ {
+ /*%FSM<LINK "done">*/
+ class done
+ {
+ priority = 0.000000;
+ to="end";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/"gameOver || ({alive _x} count _alives) == 0"/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ /*%FSM<LINK "loop">*/
+ class loop
+ {
+ priority = 0.000000;
+ to="Check";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/"!gameOver && time - _timeStart > 60"/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ };
+ };
+ /*%FSM</STATE>*/
+ /*%FSM<STATE "end">*/
+ class end
+ {
+ name = "end";
+ init = /*%FSM<STATEINIT""">*/""/*%FSM</STATEINIT""">*/;
+ precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
+ class Links
+ {
+ };
+ };
+ /*%FSM</STATE>*/
+ };
+ initState="Allies_Init";
+ finalStates[] =
+ {
+ "end"
+ };
+};
+/*%FSM</COMPILE>*/ \ No newline at end of file
diff --git a/Server/FSM/allies_team.fsm b/Server/FSM/allies_team.fsm
new file mode 100644
index 0000000..43d5a2b
--- /dev/null
+++ b/Server/FSM/allies_team.fsm
@@ -0,0 +1,184 @@
+/*%FSM<COMPILE "E:\Bohemia Interactive\ArmA 2\FSM Editor Personal Edition\scriptedFSM.cfg, allies_team">*/
+/*%FSM<HEAD>*/
+/*
+item0[] = {"Allies_Init",0,4346,-44.418510,-87.799530,45.581596,-37.799454,0.000000,"Allies" \n "Init"};
+item1[] = {"loop",4,218,-43.082561,-10.971841,46.917431,39.028156,0.000000,"loop"};
+item2[] = {"Check",2,250,-190.853607,-12.100532,-100.853592,37.899467,0.000000,"Check"};
+item3[] = {"done",4,218,-314.399872,-10.889294,-224.399902,39.110706,0.000000,"done"};
+item4[] = {"end",1,250,-315.611145,69.052460,-225.611130,119.052437,0.000000,"end"};
+link0[] = {0,1};
+link1[] = {1,2};
+link2[] = {2,1};
+link3[] = {2,3};
+link4[] = {3,4};
+globals[] = {0.000000,0,0,0,0,640,480,1,23,6316128,1,-440.874512,60.746586,402.023224,-114.561028,704,695,1};
+window[] = {0,-1,-1,-1,-1,915,75,1420,75,1,722};
+*//*%FSM</HEAD>*/
+class FSM
+{
+ fsmName = "allies_team";
+ class States
+ {
+ /*%FSM<STATE "Allies_Init">*/
+ class Allies_Init
+ {
+ name = "Allies_Init";
+ init = /*%FSM<STATEINIT""">*/"_side = _this select 0;" \n
+ "_template = _this select 1;" \n
+ "_templateRequire = _this select 2;" \n
+ "_buildings = _this select 3;" \n
+ "_status = _this select 4;" \n
+ "" \n
+ "_barrack = _buildings select 0;" \n
+ "_light = _buildings select 1;" \n
+ "_heavy = _buildings select 2;" \n
+ "_air = _buildings select 3;" \n
+ "" \n
+ "_destination = objNull;" \n
+ "_lastDestination = objNull;" \n
+ "_orderComplete = true;" \n
+ "_timeStart = time;" \n
+ "_end = false;" \n
+ "" \n
+ "_team = createGroup _side;" \n
+ "" \n
+ "{" \n
+ " _buyFrom = objNull;" \n
+ " _kind = (Format[""WFBE_%1ALLIESBARRACKSUNITS"",str _side] Call GetNamespace) find _x;" \n
+ " _kindDetail = _x Call GetNamespace;" \n
+ " _crews = _kindDetail select QUERYUNITCREW;" \n
+ " _unitType = _kindDetail select QUERYUNITFACTORY;" \n
+ " switch (_unitType) do {" \n
+ " case 0: {" \n
+ " _buyFrom = _barrack;" \n
+ " };" \n
+ " case 1: {" \n
+ " _buyFrom = _light;" \n
+ " };" \n
+ " case 2: {" \n
+ " _buyFrom = _heavy;" \n
+ " };" \n
+ " case 3: {" \n
+ " _buyFrom = _air;" \n
+ " };" \n
+ " };" \n
+ " if !(isNull _buyFrom) then {" \n
+ " _vehiSlots = [true,false,false,false];" \n
+ " _IDS = []; " \n
+ " if !(_x isKindOf ""Man"") then {" \n
+ " if (typeName _crews == ""ARRAY"") then {" \n
+ " if (_crews select 0) then {_vehiSlots set [2, true]};" \n
+ " if (_crews select 1) then {_vehiSlots set [1, true]};" \n
+ " if ((_crews select 3) > 0) then {_vehiSlots set [3, true]};" \n
+ " " \n
+ " {" \n
+ " _ran = 2000 + random(10) + random (100) + random(1000);" \n
+ " _IDS set [count _IDS, _ran];" \n
+ " } forEach _vehiSlots;" \n
+ " } else {" \n
+ " if (_crews < 3 && _crews != 1) then {" \n
+ " _ran2 = 2000 + random(10) + random (100) + random(1000);" \n
+ " _vehiSlots = [true,true,false];" \n
+ " _IDS = _IDS + [_ran2];" \n
+ " };" \n
+ " if (_crews > 2) then {" \n
+ " _ran2 = 2000 + random(10) + random (100) + random(1000);" \n
+ " _ran3 = 2000 + random(10) + random (100) + random(1000);" \n
+ " _vehiSlots = [true,true,true];" \n
+ " _IDS = _IDS + [_ran2] + [_ran3];" \n
+ " };" \n
+ " };" \n
+ " };" \n
+ " [_IDS,_buyFrom,_x,_side,_team,_vehiSlots] Spawn AlliesBuyUnit;" \n
+ " };" \n
+ "} forEach _template;"/*%FSM</STATEINIT""">*/;
+ precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
+ class Links
+ {
+ /*%FSM<LINK "loop">*/
+ class loop
+ {
+ priority = 0.000000;
+ to="Check";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/"!_end && time - _timeStart > 120 && !gameOver"/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ };
+ };
+ /*%FSM</STATE>*/
+ /*%FSM<STATE "Check">*/
+ class Check
+ {
+ name = "Check";
+ init = /*%FSM<STATEINIT""">*/"_timeStart = time;" \n
+ "" \n
+ "_alives = (units _team) Call GetLiveUnits;" \n
+ "_end = if (count _alives > 0) then {false} else {true};" \n
+ "" \n
+ "if ((leader _team) distance _destination < 30) then {" \n
+ " _locationSide = (_destination getVariable ""sideID"") Call GetSideFromID;" \n
+ " if (_locationSide == _side) then {_orderComplete = true;_lastDestination = _destination};" \n
+ "};" \n
+ "if (((_destination getVariable ""sideID"") Call GetSideFromID) == _side) then {_orderComplete = true;_lastDestination = _destination};" \n
+ "if (!isNull(_lastDestination)) then {if (((_lastDestination getVariable ""sideID"") Call GetSideFromID) != _side) then {_orderComplete = true}};" \n
+ "" \n
+ "if (_orderComplete) then {" \n
+ " _destinations = [];" \n
+ " {" \n
+ " _locationSide = (_x getVariable ""sideID"") Call GetSideFromID;" \n
+ " if (_locationSide != _side) then {_destinations = _destinations + [_x]};" \n
+ " } forEach towns;" \n
+ " if (count _destinations > 0) then {" \n
+ " _orderComplete = false;" \n
+ " _loc = [leader _team,_destinations] Call SortByDistance;" \n
+ " _destination = _loc select 0;" \n
+ " [_team,_destination,""move""] Call AIMoveTo;" \n
+ " };" \n
+ "};"/*%FSM</STATEINIT""">*/;
+ precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
+ class Links
+ {
+ /*%FSM<LINK "done">*/
+ class done
+ {
+ priority = 0.000000;
+ to="end";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/"gameOver || _end"/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ /*%FSM<LINK "loop">*/
+ class loop
+ {
+ priority = 0.000000;
+ to="Check";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/"!_end && time - _timeStart > 120 && !gameOver"/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ };
+ };
+ /*%FSM</STATE>*/
+ /*%FSM<STATE "end">*/
+ class end
+ {
+ name = "end";
+ init = /*%FSM<STATEINIT""">*/"WF_Logic setVariable [_status,false];"/*%FSM</STATEINIT""">*/;
+ precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
+ class Links
+ {
+ };
+ };
+ /*%FSM</STATE>*/
+ };
+ initState="Allies_Init";
+ finalStates[] =
+ {
+ "end"
+ };
+};
+/*%FSM</COMPILE>*/ \ No newline at end of file
diff --git a/Server/FSM/basearea.fsm b/Server/FSM/basearea.fsm
new file mode 100644
index 0000000..177e28d
--- /dev/null
+++ b/Server/FSM/basearea.fsm
@@ -0,0 +1,141 @@
+/*%FSM<COMPILE "D:\ArmA2\FSM Editor Personal Edition\scriptedFSM.cfg, basearea">*/
+/*%FSM<HEAD>*/
+/*
+item0[] = {"Init",0,250,-81.542984,-257.577942,8.457038,-207.578140,0.000000,"Init"};
+item1[] = {"End",1,250,-216.387955,-52.508366,-126.387947,-2.508394,0.000000,"End"};
+item2[] = {"Update_Areas",2,4346,-82.090652,-139.314026,7.909359,-89.314034,0.000000,"Update Areas"};
+item3[] = {"Loop",4,218,53.846153,-139.681244,143.846161,-89.681236,0.000000,"Loop"};
+item4[] = {"Gameover",4,218,-216.387955,-139.464890,-126.387947,-89.464890,0.000000,"Gameover"};
+item5[] = {"_",8,218,-51.736092,-184.192123,-21.083296,-163.272247,0.000000,""};
+link0[] = {0,5};
+link1[] = {2,3};
+link2[] = {2,4};
+link3[] = {3,2};
+link4[] = {4,1};
+link5[] = {5,2};
+globals[] = {0.000000,0,0,0,0,640,480,1,8,6316128,1,-450.330200,450.329834,163.072220,-391.043060,721,617,1};
+window[] = {0,-1,-1,-1,-1,792,265,1678,55,1,739};
+*//*%FSM</HEAD>*/
+class FSM
+{
+ fsmName = "basearea";
+ class States
+ {
+ /*%FSM<STATE "Init">*/
+ class Init
+ {
+ name = "Init";
+ init = /*%FSM<STATEINIT""">*/"_brr = 'WFBE_BASEAREARANGE' Call GetNamespace;" \n
+ "_mbr = 'WFBE_MHQBUILDINGRANGE' Call GetNamespace;"/*%FSM</STATEINIT""">*/;
+ precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
+ class Links
+ {
+ /*%FSM<LINK "_">*/
+ class _
+ {
+ priority = 0.000000;
+ to="Update_Areas";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/""/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ };
+ };
+ /*%FSM</STATE>*/
+ /*%FSM<STATE "End">*/
+ class End
+ {
+ name = "End";
+ init = /*%FSM<STATEINIT""">*/""/*%FSM</STATEINIT""">*/;
+ precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
+ class Links
+ {
+ };
+ };
+ /*%FSM</STATE>*/
+ /*%FSM<STATE "Update_Areas">*/
+ class Update_Areas
+ {
+ name = "Update_Areas";
+ init = /*%FSM<STATEINIT""">*/"_lastUpdate = time;" \n
+ "_areaWest = WF_Logic getVariable 'WestArea';" \n
+ "_areaEast = WF_Logic getVariable 'EastArea';" \n
+ "" \n
+ "_buildingsWest = WestBaseStructures + [WestMHQ];" \n
+ "_buildingsEast = EastBaseStructures + [EastMHQ];" \n
+ "" \n
+ "_newWest = _areaWest;" \n
+ "_newEast = _areaEast;" \n
+ "" \n
+ "{" \n
+ " _logic = _x;" \n
+ " _structures = [_logic,_buildingsWest] Call SortByDistance;" \n
+ " _update = false;" \n
+ " if (count _structures > 0) then {" \n
+ " if ((_structures select 0) distance _logic > (_brr + _mbr)) then {_update = true};" \n
+ " if (_update) then {" \n
+ " _newWest = _newWest - [_logic] - [objNull];" \n
+ " _grp = group _logic;" \n
+ " deleteVehicle _logic;" \n
+ " deleteGroup _grp;" \n
+ " };" \n
+ " };" \n
+ "} forEach _areaWest;" \n
+ "" \n
+ "if (count _newWest != count _areaWest) then {" \n
+ " WF_Logic setVariable ['WestArea',_newWest,true];" \n
+ "};" \n
+ "" \n
+ "{" \n
+ " _logic = _x;" \n
+ " _structures = [_logic,_buildingsEast] Call SortByDistance;" \n
+ " _update = false;" \n
+ " if (count _structures > 0) then {" \n
+ " if ((_structures select 0) distance _logic > (_brr + _mbr)) then {_update = true};" \n
+ " if (_update) then {" \n
+ " _newEast = _newEast - [_logic] - [objNull];" \n
+ " _grp = group _logic;" \n
+ " deleteVehicle _logic;" \n
+ " deleteGroup _grp;" \n
+ " };" \n
+ " };" \n
+ "} forEach _areaEast;" \n
+ "" \n
+ "if (count _newEast != count _areaEast) then {" \n
+ " WF_Logic setVariable ['EastArea',_newEast,true];" \n
+ "};"/*%FSM</STATEINIT""">*/;
+ precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
+ class Links
+ {
+ /*%FSM<LINK "Gameover">*/
+ class Gameover
+ {
+ priority = 0.000000;
+ to="End";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/"gameOver"/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ /*%FSM<LINK "Loop">*/
+ class Loop
+ {
+ priority = 0.000000;
+ to="Update_Areas";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/"!gameOver && time - _lastUpdate > 30"/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ };
+ };
+ /*%FSM</STATE>*/
+ };
+ initState="Init";
+ finalStates[] =
+ {
+ "End"
+ };
+};
+/*%FSM</COMPILE>*/ \ No newline at end of file
diff --git a/Server/FSM/basepatrol.fsm b/Server/FSM/basepatrol.fsm
new file mode 100644
index 0000000..b5ac244
--- /dev/null
+++ b/Server/FSM/basepatrol.fsm
@@ -0,0 +1,303 @@
+/*%FSM<COMPILE "F:\ArmA2\FSM Editor Personal Edition\scriptedFSM.cfg, basepatrol">*/
+/*%FSM<HEAD>*/
+/*
+item0[] = {"Init_Patrol",0,250,-55.645832,-232.443039,34.354168,-182.443039,0.000000,"Init Patrol"};
+item1[] = {"_",8,218,-27.486687,-147.637543,6.009465,-118.394058,0.000000,""};
+item2[] = {"Building_Status",2,250,-55.764599,-83.906609,34.235420,-33.906616,0.000000,"Building" \n "Status"};
+item3[] = {"Alive",4,218,-57.270676,3.753643,32.729324,53.753662,1.000000,"Alive"};
+item4[] = {"Dead",4,218,75.014023,-81.237984,165.014221,-31.238003,0.000000,"Dead"};
+item5[] = {"Worth__defending",2,250,201.740265,-81.387749,291.740295,-31.387749,0.000000,"Worth" \n " defending?"};
+item6[] = {"Yes",4,218,200.643723,38.075150,290.643738,88.075134,1.000000,"Yes"};
+item7[] = {"No",4,218,328.454315,-81.330719,418.454376,-31.330761,0.000000,"No"};
+item8[] = {"Exit_Patrol",1,250,453.130798,-80.331696,543.130859,-30.331718,0.000000,"Exit Patrol"};
+item9[] = {"Status",2,250,206.126862,235.996475,296.126648,285.996338,0.000000,"Status"};
+item10[] = {"Wait",4,218,-234.715958,235.996490,-144.715927,285.996399,1.000000,"Wait"};
+item11[] = {"Game_Over",4,218,454.348022,235.593781,544.348022,285.593781,0.000000,"Game Over"};
+item12[] = {"Teams_Status",2,250,-55.966236,80.275879,34.033779,130.275909,0.000000,"Teams Status"};
+item13[] = {"Skip",4,218,137.039566,80.103676,227.039597,130.103638,0.000000,"Skip"};
+item14[] = {"Spawning",4,218,-54.869621,155.942947,35.130379,205.942947,1.000000,"Spawning"};
+item15[] = {"Spawn",2,4346,71.483360,157.670105,161.483368,207.670105,0.000000,"Spawn"};
+item16[] = {"_",8,218,101.881767,227.152191,135.427612,252.182098,0.000000,""};
+link0[] = {0,1};
+link1[] = {1,2};
+link2[] = {2,3};
+link3[] = {2,4};
+link4[] = {3,12};
+link5[] = {4,5};
+link6[] = {5,6};
+link7[] = {5,7};
+link8[] = {6,9};
+link9[] = {7,8};
+link10[] = {9,10};
+link11[] = {9,11};
+link12[] = {10,2};
+link13[] = {11,8};
+link14[] = {12,13};
+link15[] = {12,14};
+link16[] = {13,9};
+link17[] = {14,15};
+link18[] = {15,16};
+link19[] = {16,9};
+globals[] = {0.000000,0,0,0,0,640,480,1,61,6316128,1,-265.668091,546.403687,327.217163,-287.807800,640,520,1};
+window[] = {0,-1,-1,-1,-1,838,154,1453,203,1,658};
+*//*%FSM</HEAD>*/
+class FSM
+{
+ fsmName = "basepatrol";
+ class States
+ {
+ /*%FSM<STATE "Init_Patrol">*/
+ class Init_Patrol
+ {
+ name = "Init_Patrol";
+ init = /*%FSM<STATEINIT""">*/"_building = _this select 0;" \n
+ "_side = _this select 1;" \n
+ "" \n
+ "_posBuilding = getPos _building;" \n
+ "" \n
+ "_lastCheck = 0;" \n
+ "_teams = [];" \n
+ "_maxTeams = 'WFBE_TOWNOCCUPATIONDIFFICULTY' Call GetNamespace;"/*%FSM</STATEINIT""">*/;
+ precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
+ class Links
+ {
+ /*%FSM<LINK "_">*/
+ class _
+ {
+ priority = 0.000000;
+ to="Building_Status";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/""/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ };
+ };
+ /*%FSM</STATE>*/
+ /*%FSM<STATE "Building_Status">*/
+ class Building_Status
+ {
+ name = "Building_Status";
+ init = /*%FSM<STATEINIT""">*/"_aliveTeams = _teams;" \n
+ "{" \n
+ " _alives = (units _x) Call GetLiveUnits;" \n
+ " if (count _alives < 1 || isNull _x) then {" \n
+ " _aliveTeams = _aliveTeams - [_x] - [objNull];" \n
+ " };" \n
+ "} forEach _teams;" \n
+ "_teams = _aliveTeams;"/*%FSM</STATEINIT""">*/;
+ precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
+ class Links
+ {
+ /*%FSM<LINK "Alive">*/
+ class Alive
+ {
+ priority = 1.000000;
+ to="Teams_Status";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/"alive _building"/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ /*%FSM<LINK "Dead">*/
+ class Dead
+ {
+ priority = 0.000000;
+ to="Worth__defending";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/"isNull _building || !(alive _building)"/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ };
+ };
+ /*%FSM</STATE>*/
+ /*%FSM<STATE "Worth__defending">*/
+ class Worth__defending
+ {
+ name = "Worth__defending";
+ init = /*%FSM<STATEINIT""">*/"_buildings = (str _side) Call GetSideStructures;" \n
+ "_sorted = [_posBuilding, _buildings] Call SortByDistance;" \n
+ "" \n
+ "_nearby = false;" \n
+ "if (count _sorted > 0) then {" \n
+ " if ((_sorted select 0) distance _posBuilding < 400) then {_nearby = true};" \n
+ "};"/*%FSM</STATEINIT""">*/;
+ precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
+ class Links
+ {
+ /*%FSM<LINK "Yes">*/
+ class Yes
+ {
+ priority = 1.000000;
+ to="Status";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/"_nearby"/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ /*%FSM<LINK "No">*/
+ class No
+ {
+ priority = 0.000000;
+ to="Exit_Patrol";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/"!_nearby"/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ };
+ };
+ /*%FSM</STATE>*/
+ /*%FSM<STATE "Exit_Patrol">*/
+ class Exit_Patrol
+ {
+ name = "Exit_Patrol";
+ init = /*%FSM<STATEINIT""">*/"{" \n
+ " _group = _x;" \n
+ " {" \n
+ " deleteVehicle _x;" \n
+ " } forEach (units _x);" \n
+ "" \n
+ " deleteGroup _group;" \n
+ "} forEach _teams;"/*%FSM</STATEINIT""">*/;
+ precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
+ class Links
+ {
+ };
+ };
+ /*%FSM</STATE>*/
+ /*%FSM<STATE "Status">*/
+ class Status
+ {
+ name = "Status";
+ init = /*%FSM<STATEINIT""">*/"_lastCheck = time;"/*%FSM</STATEINIT""">*/;
+ precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
+ class Links
+ {
+ /*%FSM<LINK "Wait">*/
+ class Wait
+ {
+ priority = 1.000000;
+ to="Building_Status";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/"time - _lastCheck > 300 && !gameOver"/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ /*%FSM<LINK "Game_Over">*/
+ class Game_Over
+ {
+ priority = 0.000000;
+ to="Exit_Patrol";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/"gameOver"/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ };
+ };
+ /*%FSM</STATE>*/
+ /*%FSM<STATE "Teams_Status">*/
+ class Teams_Status
+ {
+ name = "Teams_Status";
+ init = /*%FSM<STATEINIT""">*/""/*%FSM</STATEINIT""">*/;
+ precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
+ class Links
+ {
+ /*%FSM<LINK "Spawning">*/
+ class Spawning
+ {
+ priority = 1.000000;
+ to="Spawn";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/"count _teams < _maxTeams"/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ /*%FSM<LINK "Skip">*/
+ class Skip
+ {
+ priority = 0.000000;
+ to="Status";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/"count _teams >= _maxTeams"/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ };
+ };
+ /*%FSM</STATE>*/
+ /*%FSM<STATE "Spawn">*/
+ class Spawn
+ {
+ name = "Spawn";
+ init = /*%FSM<STATEINIT""">*/"_group = createGroup _side;" \n
+ "" \n
+ "_currentUpgrades = (str _side) Call GetSideUpgrades;" \n
+ "_currentLevel = _currentUpgrades select 13;" \n
+ "" \n
+ "if (count _teams > 1) then {" \n
+ " _currentLevel = round(random(_currentLevel));" \n
+ "};" \n
+ "" \n
+ "[_building,_side,_group,(Format['WFBE_%1BASEPATROLS_%2',_side,_currentLevel]) Call GetNamespace] Spawn {" \n
+ " Private ['_direction','_distance','_group','_index','_position','_side','_site','_type','_units'];" \n
+ " _site = _this select 0;" \n
+ " _side = _this select 1;" \n
+ " _group = _this select 2;" \n
+ " _units = _this select 3;" \n
+ " " \n
+ " _type = typeOf _site;" \n
+ " _index = (Format[""WFBE_%1STRUCTURENAMES"",str _side] Call GetNamespace) find _type;" \n
+ " _distance = (Format[""WFBE_%1STRUCTUREDISTANCES"",str _side] Call GetNamespace) select _index;" \n
+ " _direction = (Format[""WFBE_%1STRUCTUREDIRECTIONS"",str _side] Call GetNamespace) select _index;" \n
+ " _position = [getPos _site,_distance,getDir _site + _direction] Call GetPositionFrom;" \n
+ " " \n
+ " _created = 0;" \n
+ " " \n
+ " {" \n
+ " if (alive _site) then {" \n
+ " if (_x isKindOf 'Man') then {" \n
+ " sleep 7;" \n
+ " _soldier = [_x,_group,_position,_side] Call CreateMan;" \n
+ " _created = _created + 1;" \n
+ " };" \n
+ " };" \n
+ " } forEach _units;" \n
+ " " \n
+ " if (_created > 0) then {" \n
+ " _built = WF_Logic getVariable Format [""%1UnitsCreated"",str _side];" \n
+ " _built = _built + 1;" \n
+ " WF_Logic setVariable [Format[""%1UnitsCreated"",str _side],_built,true];" \n
+ " [str _side,'UnitsCreated',_built] Call UpdateStatistics;" \n
+ " [_group,_site,'WFBE_PATROLRANGE' Call GetNamespace] Spawn AIPatrol;" \n
+ " };" \n
+ "};" \n
+ "" \n
+ "_teams = _teams + [_group];"/*%FSM</STATEINIT""">*/;
+ precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
+ class Links
+ {
+ /*%FSM<LINK "_">*/
+ class _
+ {
+ priority = 0.000000;
+ to="Status";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/""/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ };
+ };
+ /*%FSM</STATE>*/
+ };
+ initState="Init_Patrol";
+ finalStates[] =
+ {
+ "Exit_Patrol"
+ };
+};
+/*%FSM</COMPILE>*/ \ No newline at end of file
diff --git a/Server/FSM/conquest.fsm b/Server/FSM/conquest.fsm
new file mode 100644
index 0000000..6072425
--- /dev/null
+++ b/Server/FSM/conquest.fsm
@@ -0,0 +1,134 @@
+/*%FSM<COMPILE "E:\Bohemia Interactive\ArmA 2\FSM Editor Personal Edition\scriptedFSM.cfg, conquest">*/
+/*%FSM<HEAD>*/
+/*
+item0[] = {"Init",0,4346,53.240814,-221.988968,143.240845,-171.989166,0.000000,"Init"};
+item1[] = {"End",1,250,-216.387955,-52.508366,-126.387947,-2.508394,0.000000,"End"};
+item2[] = {"Update_Conquest",2,250,-82.090652,-139.314026,7.909359,-89.314034,0.000000,"Update" \n "Conquest"};
+item3[] = {"Loop",4,218,53.846153,-139.681244,143.846161,-89.681236,0.000000,"Loop"};
+item4[] = {"Gameover",4,218,-216.387955,-139.464890,-126.387947,-89.464890,0.000000,"Gameover"};
+link0[] = {0,3};
+link1[] = {2,3};
+link2[] = {2,4};
+link3[] = {3,2};
+link4[] = {4,1};
+globals[] = {0.000000,0,0,0,0,640,480,1,8,6316128,1,-348.696411,348.696136,79.849762,-328.514618,921,592,1};
+window[] = {0,-1,-1,-1,-1,837,100,1513,100,1,939};
+*//*%FSM</HEAD>*/
+class FSM
+{
+ fsmName = "conquest";
+ class States
+ {
+ /*%FSM<STATE "Init">*/
+ class Init
+ {
+ name = "Init";
+ init = /*%FSM<STATEINIT""">*/"_ntime = 0;"/*%FSM</STATEINIT""">*/;
+ precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
+ class Links
+ {
+ /*%FSM<LINK "Loop">*/
+ class Loop
+ {
+ priority = 0.000000;
+ to="Update_Conquest";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/"time > _ntime"/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ };
+ };
+ /*%FSM</STATE>*/
+ /*%FSM<STATE "End">*/
+ class End
+ {
+ name = "End";
+ init = /*%FSM<STATEINIT""">*/""/*%FSM</STATEINIT""">*/;
+ precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
+ class Links
+ {
+ };
+ };
+ /*%FSM</STATE>*/
+ /*%FSM<STATE "Update_Conquest">*/
+ class Update_Conquest
+ {
+ name = "Update_Conquest";
+ init = /*%FSM<STATEINIT""">*/"_wt = [];" \n
+ "_et = [];" \n
+ "" \n
+ "{" \n
+ " _sideID = _x getVariable 'sideID';" \n
+ " if (_sideID == WestID) then {_wt = _wt + [_x]};" \n
+ " if (_sideID == EastID) then {_et = _et + [_x]};" \n
+ "} forEach towns;" \n
+ "" \n
+ "{" \n
+ " Private [""_hq"",""_set"",""_side"",""_sideID"",""_sideTowns"",""_sideVar""];" \n
+ " _sideTowns = _x select 0;" \n
+ " _sideVar = _x select 1;" \n
+ " _side = _x select 2;" \n
+ " _sideID = _x select 3;" \n
+ " _set = [];" \n
+ " " \n
+ " if (count _sideTowns > 0) then {" \n
+ " {" \n
+ " _neighbors = _x getVariable ""neighbors"";" \n
+ " if !(isNil ""_neighbors"") then {" \n
+ " {" \n
+ " if ((_x getVariable ""sideID"") != _sideID) then {" \n
+ " _x setVariable [_sideVar, true];" \n
+ " if !(_x in _set) then {_set = _set + [_x]};" \n
+ " };" \n
+ " } forEach _neighbors;" \n
+ " };" \n
+ " } forEach _sideTowns;" \n
+ " } else {" \n
+ " _hq = (_side) Call GetSideHQ;" \n
+ " _nearest = ([_hq, towns] Call SortByDistance) select 0;" \n
+ " if !(_nearest getVariable _sideVar) then {_nearest setVariable [_sideVar, true]};" \n
+ " _set = [_nearest];" \n
+ " };" \n
+ "" \n
+ " _set = towns - _set;" \n
+ " {" \n
+ " if (_x getVariable _sideVar) then {_x setVariable [_sideVar, false]};" \n
+ " } forEach _set;" \n
+ "} forEach [[_wt, ""wfbe_cancap_w"", west, WESTID], [_et, ""wfbe_cancap_e"", east, EASTID]];" \n
+ "" \n
+ "_ntime = time + 10;"/*%FSM</STATEINIT""">*/;
+ precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
+ class Links
+ {
+ /*%FSM<LINK "Gameover">*/
+ class Gameover
+ {
+ priority = 0.000000;
+ to="End";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/"gameOver"/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ /*%FSM<LINK "Loop">*/
+ class Loop
+ {
+ priority = 0.000000;
+ to="Update_Conquest";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/"time > _ntime"/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ };
+ };
+ /*%FSM</STATE>*/
+ };
+ initState="Init";
+ finalStates[] =
+ {
+ "End",
+ };
+};
+/*%FSM</COMPILE>*/ \ No newline at end of file
diff --git a/Server/FSM/emptyvehiclescollector.fsm b/Server/FSM/emptyvehiclescollector.fsm
new file mode 100644
index 0000000..40c2936
--- /dev/null
+++ b/Server/FSM/emptyvehiclescollector.fsm
@@ -0,0 +1,102 @@
+/*%FSM<COMPILE "F:\ArmA2\FSM Editor Personal Edition\scriptedFSM.cfg, emptyvehiclescollector">*/
+/*%FSM<HEAD>*/
+/*
+item0[] = {"Init",0,250,69.011497,-125.277687,159.011566,-75.277672,0.000000,"Init"};
+item1[] = {"Update_Empty_Veh",2,4346,67.881363,24.571560,157.881256,74.571510,0.000000,"Update" \n "Empty" \n "Vehicles"};
+item2[] = {"End",1,250,-62.454956,96.990730,27.545134,146.990707,0.000000,"End"};
+item3[] = {"Loop",4,218,68.212364,-51.053558,158.212402,-1.053517,0.000000,"Loop"};
+item4[] = {"Gameover",4,218,-62.855103,24.549839,27.144907,74.549820,0.000000,"Gameover"};
+link0[] = {0,3};
+link1[] = {1,3};
+link2[] = {1,4};
+link3[] = {3,1};
+link4[] = {4,2};
+globals[] = {0.000000,0,0,0,0,640,480,1,19,6316128,1,-421.780701,421.779755,226.237854,-325.234192,748,514,1};
+window[] = {0,-1,-1,-1,-1,837,154,1414,203,1,766};
+*//*%FSM</HEAD>*/
+class FSM
+{
+ fsmName = "emptyvehiclescollector";
+ class States
+ {
+ /*%FSM<STATE "Init">*/
+ class Init
+ {
+ name = "Init";
+ init = /*%FSM<STATEINIT""">*/"_lastUpdate = time;"/*%FSM</STATEINIT""">*/;
+ precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
+ class Links
+ {
+ /*%FSM<LINK "Loop">*/
+ class Loop
+ {
+ priority = 0.000000;
+ to="Update_Empty_Veh";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/"time - _lastUpdate > 1 && !gameOver"/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ };
+ };
+ /*%FSM</STATE>*/
+ /*%FSM<STATE "Update_Empty_Veh">*/
+ class Update_Empty_Veh
+ {
+ name = "Update_Empty_Veh";
+ init = /*%FSM<STATEINIT""">*/"_vehicles = WF_Logic getVariable ""emptyVehicles"";" \n
+ "{" \n
+ " if !(_x in emptyQueu) then {" \n
+ " _vehicles2 = WF_Logic getVariable ""emptyVehicles"";" \n
+ " emptyQueu = emptyQueu + [_x];" \n
+ " _x Spawn HandleEmptyVehicle;" \n
+ " _reloaded = _vehicles2 - [_x] - [objNull];" \n
+ " WF_Logic setVariable [""emptyVehicles"",_reloaded,true];" \n
+ " };" \n
+ "} forEach _vehicles;" \n
+ "_lastUpdate = time;"/*%FSM</STATEINIT""">*/;
+ precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
+ class Links
+ {
+ /*%FSM<LINK "Gameover">*/
+ class Gameover
+ {
+ priority = 0.000000;
+ to="End";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/"gameOver"/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ /*%FSM<LINK "Loop">*/
+ class Loop
+ {
+ priority = 0.000000;
+ to="Update_Empty_Veh";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/"time - _lastUpdate > 1 && !gameOver"/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ };
+ };
+ /*%FSM</STATE>*/
+ /*%FSM<STATE "End">*/
+ class End
+ {
+ name = "End";
+ init = /*%FSM<STATEINIT""">*/""/*%FSM</STATEINIT""">*/;
+ precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
+ class Links
+ {
+ };
+ };
+ /*%FSM</STATE>*/
+ };
+ initState="Init";
+ finalStates[] =
+ {
+ "End"
+ };
+};
+/*%FSM</COMPILE>*/ \ No newline at end of file
diff --git a/Server/FSM/fasttime.fsm b/Server/FSM/fasttime.fsm
new file mode 100644
index 0000000..a8a4796
--- /dev/null
+++ b/Server/FSM/fasttime.fsm
@@ -0,0 +1,101 @@
+/*%FSM<COMPILE "F:\ArmA2\FSM Editor Personal Edition\scriptedFSM.cfg, fasttime">*/
+/*%FSM<HEAD>*/
+/*
+item0[] = {"Init",0,4346,-81.542984,-257.577942,8.457038,-207.578140,0.000000,"Init"};
+item1[] = {"End",1,250,-216.387955,-52.508366,-126.387947,-2.508394,0.000000,"End"};
+item2[] = {"Update_Time",2,250,-82.090652,-139.314026,7.909359,-89.314034,0.000000,"Update Time"};
+item3[] = {"Loop",4,218,53.846153,-139.681244,143.846161,-89.681236,0.000000,"Loop"};
+item4[] = {"Gameover",4,218,-216.387955,-139.464890,-126.387947,-89.464890,0.000000,"Gameover"};
+item5[] = {"_",8,218,-51.736092,-184.192123,-21.083296,-163.272247,0.000000,""};
+link0[] = {0,5};
+link1[] = {2,3};
+link2[] = {2,4};
+link3[] = {3,2};
+link4[] = {4,1};
+link5[] = {5,2};
+globals[] = {0.000000,0,0,0,0,640,480,1,8,6316128,1,-348.696411,348.696136,79.849762,-328.514618,1011,622,1};
+window[] = {0,-1,-1,-1,-1,795,22,1435,58,1,1029};
+*//*%FSM</HEAD>*/
+class FSM
+{
+ fsmName = "fasttime";
+ class States
+ {
+ /*%FSM<STATE "Init">*/
+ class Init
+ {
+ name = "Init";
+ init = /*%FSM<STATEINIT""">*/"_currentTime = DayTime;" \n
+ "_lastUpdate = time;" \n
+ "_ftr = ('WFBE_FASTTIMERATES' Call GetNamespace) select ('WFBE_FASTTIMERATE' Call GetNamespace);" \n
+ "WF_Logic setVariable [""currentTime"",_currentTime,true];"/*%FSM</STATEINIT""">*/;
+ precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
+ class Links
+ {
+ /*%FSM<LINK "_">*/
+ class _
+ {
+ priority = 0.000000;
+ to="Update_Time";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/""/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ };
+ };
+ /*%FSM</STATE>*/
+ /*%FSM<STATE "End">*/
+ class End
+ {
+ name = "End";
+ init = /*%FSM<STATEINIT""">*/""/*%FSM</STATEINIT""">*/;
+ precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
+ class Links
+ {
+ };
+ };
+ /*%FSM</STATE>*/
+ /*%FSM<STATE "Update_Time">*/
+ class Update_Time
+ {
+ name = "Update_Time";
+ init = /*%FSM<STATEINIT""">*/"skipTime _ftr;" \n
+ "_currentTime = dayTime;" \n
+ "WF_Logic setVariable [""currentTime"",_currentTime,true];" \n
+ "" \n
+ "_lastUpdate = time;"/*%FSM</STATEINIT""">*/;
+ precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
+ class Links
+ {
+ /*%FSM<LINK "Gameover">*/
+ class Gameover
+ {
+ priority = 0.000000;
+ to="End";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/"gameOver"/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ /*%FSM<LINK "Loop">*/
+ class Loop
+ {
+ priority = 0.000000;
+ to="Update_Time";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/"!gameOver && time - _lastUpdate > 1"/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ };
+ };
+ /*%FSM</STATE>*/
+ };
+ initState="Init";
+ finalStates[] =
+ {
+ "End"
+ };
+};
+/*%FSM</COMPILE>*/ \ No newline at end of file
diff --git a/Server/FSM/garbagecollector.fsm b/Server/FSM/garbagecollector.fsm
new file mode 100644
index 0000000..596beca
--- /dev/null
+++ b/Server/FSM/garbagecollector.fsm
@@ -0,0 +1,165 @@
+/*%FSM<COMPILE "D:\ArmA2\FSM Editor Personal Edition\scriptedFSM.cfg, garbagecollector">*/
+/*%FSM<HEAD>*/
+/*
+item0[] = {"Init",0,250,27.096645,-357.382507,117.096680,-307.382507,0.000000,"Init"};
+item1[] = {"Loop",4,218,349.567535,-189.804108,439.567596,-139.804062,0.000000,"Loop"};
+item2[] = {"End",1,250,35.343773,-97.642059,125.343819,-47.642326,0.000000,"End"};
+item3[] = {"Arrowhead_Garbag",2,4346,201.635025,-189.872375,291.634949,-139.872375,0.000000,"Arrowhead" \n "Garbage"};
+item4[] = {"Loop",4,218,-301.789124,-191.088837,-211.789047,-141.088791,0.000000,"Loop"};
+item5[] = {"Vanilla",4,218,-28.368071,-262.232788,61.631752,-212.232986,0.000000,"Vanilla"};
+item6[] = {"Arrowhead",4,218,94.700302,-263.344727,184.700043,-213.344574,0.000000,"Arrowhead"};
+item7[] = {"Vanilla_Garbage",2,250,-153.091797,-191.262604,-63.091869,-141.262650,0.000000,"Vanilla" \n "Garbage"};
+item8[] = {"Gameover",4,218,34.943623,-190.869827,124.943687,-140.869797,0.000000,"Gameover"};
+link0[] = {0,5};
+link1[] = {0,6};
+link2[] = {1,3};
+link3[] = {3,1};
+link4[] = {3,8};
+link5[] = {4,7};
+link6[] = {5,7};
+link7[] = {6,3};
+link8[] = {7,4};
+link9[] = {7,8};
+link10[] = {8,2};
+globals[] = {0.000000,0,0,0,0,640,480,1,38,6316128,1,-314.217926,456.388641,91.977463,-442.708069,748,514,1};
+window[] = {0,-1,-1,-1,-1,659,25,1285,25,1,766};
+*//*%FSM</HEAD>*/
+class FSM
+{
+ fsmName = "garbagecollector";
+ class States
+ {
+ /*%FSM<STATE "Init">*/
+ class Init
+ {
+ name = "Init";
+ init = /*%FSM<STATEINIT""">*/"_lastUpdate = time;"/*%FSM</STATEINIT""">*/;
+ precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
+ class Links
+ {
+ /*%FSM<LINK "Arrowhead">*/
+ class Arrowhead
+ {
+ priority = 0.000000;
+ to="Arrowhead_Garbag";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/"!WF_A2_Vanilla"/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ /*%FSM<LINK "Vanilla">*/
+ class Vanilla
+ {
+ priority = 0.000000;
+ to="Vanilla_Garbage";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/"WF_A2_Vanilla"/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ };
+ };
+ /*%FSM</STATE>*/
+ /*%FSM<STATE "End">*/
+ class End
+ {
+ name = "End";
+ init = /*%FSM<STATEINIT""">*/""/*%FSM</STATEINIT""">*/;
+ precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
+ class Links
+ {
+ };
+ };
+ /*%FSM</STATE>*/
+ /*%FSM<STATE "Arrowhead_Garbag">*/
+ class Arrowhead_Garbag
+ {
+ name = "Arrowhead_Garbag";
+ init = /*%FSM<STATEINIT""">*/"_lastUpdate = time;" \n
+ "" \n
+ "/* Units Removal */" \n
+ "" \n
+ "_whq = (west) Call GetSideHQ;" \n
+ "_ehq = (East) Call GetSideHQ;" \n
+ "" \n
+ "{" \n
+ " if (!(_x in trashQueu) && !(_x in ignoreQueu) && !(_x in playableUnits) && (_x != _whq) && (_x != _ehq)) then {" \n
+ " _x Spawn TrashObject;" \n
+ " };" \n
+ "} forEach allDead;"/*%FSM</STATEINIT""">*/;
+ precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
+ class Links
+ {
+ /*%FSM<LINK "Gameover">*/
+ class Gameover
+ {
+ priority = 0.000000;
+ to="End";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/"gameOver"/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ /*%FSM<LINK "Loop">*/
+ class Loop
+ {
+ priority = 0.000000;
+ to="Arrowhead_Garbag";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/"time - _lastUpdate > 30 && !gameOver"/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ };
+ };
+ /*%FSM</STATE>*/
+ /*%FSM<STATE "Vanilla_Garbage">*/
+ class Vanilla_Garbage
+ {
+ name = "Vanilla_Garbage";
+ init = /*%FSM<STATEINIT""">*/"_objects = WF_Logic getVariable ""trash"";" \n
+ "{" \n
+ " if !(_x in trashQueu) then {" \n
+ " _objects2 = WF_Logic getVariable ""trash"";" \n
+ " trashQueu = trashQueu + [_x];" \n
+ " _x Spawn TrashObject;" \n
+ " _renewed = _objects2 - [_x] - [objNull];" \n
+ " WF_Logic setVariable [""trash"",_renewed,true];" \n
+ " };" \n
+ "} forEach _objects;" \n
+ "" \n
+ "_lastUpdate = time;"/*%FSM</STATEINIT""">*/;
+ precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
+ class Links
+ {
+ /*%FSM<LINK "Gameover">*/
+ class Gameover
+ {
+ priority = 0.000000;
+ to="End";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/"gameOver"/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ /*%FSM<LINK "Loop">*/
+ class Loop
+ {
+ priority = 0.000000;
+ to="Vanilla_Garbage";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/"time - _lastUpdate > 0.5 && !gameOver"/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ };
+ };
+ /*%FSM</STATE>*/
+ };
+ initState="Init";
+ finalStates[] =
+ {
+ "End"
+ };
+};
+/*%FSM</COMPILE>*/ \ No newline at end of file
diff --git a/Server/FSM/missions.fsm b/Server/FSM/missions.fsm
new file mode 100644
index 0000000..ecc3b98
--- /dev/null
+++ b/Server/FSM/missions.fsm
@@ -0,0 +1,233 @@
+/*%FSM<COMPILE "D:\ArmA2\FSM Editor Personal Edition\scriptedFSM.cfg, missions">*/
+/*%FSM<HEAD>*/
+/*
+item0[] = {"Init",0,4346,-74.017166,-296.043274,15.982856,-246.043442,0.000000,"Init"};
+item1[] = {"End",1,250,-198.827713,-59.197983,-108.827713,-9.198011,0.000000,"End"};
+item2[] = {"Update_Time",2,250,-73.728622,-145.167450,16.271379,-95.167450,0.000000,"Update Time"};
+item3[] = {"Loop",4,218,-74.092773,-224.973862,15.907227,-174.973846,0.000000,"Loop"};
+item4[] = {"Gameover",4,218,-197.991501,-144.482101,-107.991493,-94.482101,0.000000,"Gameover"};
+item5[] = {"Create",4,218,-73.431000,-64.188675,16.568987,-14.188683,1.000000,"Create"};
+item6[] = {"Assign_a_Mission",2,250,72.904373,-65.024872,162.904373,-15.024889,0.000000,"Assign a" \n "Mission"};
+item7[] = {"Skip",2,250,186.627869,-224.739502,276.627808,-174.739502,0.000000,"Skip"};
+item8[] = {"_",8,218,215.894943,-49.973213,248.197006,-28.404099,0.000000,""};
+link0[] = {0,3};
+link1[] = {2,3};
+link2[] = {2,4};
+link3[] = {2,5};
+link4[] = {3,2};
+link5[] = {4,1};
+link6[] = {5,6};
+link7[] = {6,8};
+link8[] = {7,3};
+link9[] = {8,7};
+globals[] = {0.000000,0,0,0,0,640,480,1,14,6316128,1,-348.696289,348.696289,188.145477,-327.791229,834,617,1};
+window[] = {0,-1,-1,-1,-1,762,25,1438,25,1,852};
+*//*%FSM</HEAD>*/
+class FSM
+{
+ fsmName = "missions";
+ class States
+ {
+ /*%FSM<STATE "Init">*/
+ class Init
+ {
+ name = "Init";
+ init = /*%FSM<STATEINIT""">*/"_maxmissionswest = 'WFBE_MISSIONSMAXIMUM_WEST' Call GetNamespace;" \n
+ "_maxmissionseast = 'WFBE_MISSIONSMAXIMUM_EAST' Call GetNamespace;" \n
+ "_randomizer = 'WFBE_MISSIONSRANDOMIZER' Call GetNamespace;" \n
+ "_timeout = 'WFBE_MISSIONSTIMEOUT' Call GetNamespace;" \n
+ "_canReuseAfter = 'WFBE_MISSIONSREUSABILITY' Call GetNamespace;" \n
+ "_totalMissions = count('WFBE_M_CONTENT' Call GetNamespace) - 1;" \n
+ "" \n
+ "_lastUpdate = 0;" \n
+ "_lastMissionAssignedTime = -6000;" \n
+ "_lastMissionsIndex = [];" \n
+ "['_WFBE_M_RUNNINGMISSIONS_WEST',0,true] Call SetNamespace;" \n
+ "['_WFBE_M_RUNNINGMISSIONS_EAST',0,true] Call SetNamespace;"/*%FSM</STATEINIT""">*/;
+ precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
+ class Links
+ {
+ /*%FSM<LINK "Loop">*/
+ class Loop
+ {
+ priority = 0.000000;
+ to="Update_Time";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/"!gameOver && time - _lastUpdate > 30"/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ };
+ };
+ /*%FSM</STATE>*/
+ /*%FSM<STATE "End">*/
+ class End
+ {
+ name = "End";
+ init = /*%FSM<STATEINIT""">*/""/*%FSM</STATEINIT""">*/;
+ precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
+ class Links
+ {
+ };
+ };
+ /*%FSM</STATE>*/
+ /*%FSM<STATE "Update_Time">*/
+ class Update_Time
+ {
+ name = "Update_Time";
+ init = /*%FSM<STATEINIT""">*/"_lastUpdate = time;" \n
+ "" \n
+ "_runningMissionsWest = '_WFBE_M_RUNNINGMISSIONS_WEST' Call GetNamespace;" \n
+ "_runningMissionsEast = '_WFBE_M_RUNNINGMISSIONS_EAST' Call GetNamespace;"/*%FSM</STATEINIT""">*/;
+ precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
+ class Links
+ {
+ /*%FSM<LINK "Create">*/
+ class Create
+ {
+ priority = 1.000000;
+ to="Assign_a_Mission";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/"!gameOver && time - _lastMissionAssignedTime >= _timeout && (_runningMissionsWest < _maxmissionswest || _runningMissionsEast < _maxmissionseast)"/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ /*%FSM<LINK "Gameover">*/
+ class Gameover
+ {
+ priority = 0.000000;
+ to="End";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/"gameOver"/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ /*%FSM<LINK "Loop">*/
+ class Loop
+ {
+ priority = 0.000000;
+ to="Update_Time";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/"!gameOver && time - _lastUpdate > 30"/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ };
+ };
+ /*%FSM</STATE>*/
+ /*%FSM<STATE "Assign_a_Mission">*/
+ class Assign_a_Mission
+ {
+ name = "Assign_a_Mission";
+ init = /*%FSM<STATEINIT""">*/"//--- Retrieve an updated version of the missions array." \n
+ "_missions = 'WFBE_M_CONTENT' Call GetNamespace;" \n
+ "_missionAssigned = false;" \n
+ "" \n
+ "//--- Retrieve a 'free' mission." \n
+ "_i = -1;" \n
+ "while {_i < 0} do {" \n
+ " _r = round (random _totalMissions);" \n
+ " if !(_r in _lastMissionsIndex) then {_i = _r};" \n
+ "};" \n
+ "" \n
+ "//--- Retrieve the current mission content." \n
+ "_mission = (_missions select _i);" \n
+ "" \n
+ "//--- Can we run it?" \n
+ "_go = false;" \n
+ "if ((_mission select 5) == civilian) then {if (_runningMissionsWest < _maxmissionswest && _runningMissionsEast < _maxmissionseast) then {_go = true}};" \n
+ "if ((_mission select 5) == west) then {if (_runningMissionsWest < _maxmissionswest) then {_go = true}};" \n
+ "if ((_mission select 5) == east) then {if (_runningMissionsEast < _maxmissionseast) then {_go = true}};" \n
+ "" \n
+ "if (_go) then {" \n
+ " _islandHeader = (_mission select 0) select 0;" \n
+ " //--- All" \n
+ " if (_islandHeader == '*') then {" \n
+ " _go = true;" \n
+ " } else {" \n
+ " if (_islandHeader == '!') then {" \n
+ " //--- If island not in." \n
+ " if !(worldName in (_mission select 0)) then {_go = true};" \n
+ " } else {" \n
+ " //--- If island in." \n
+ " if (worldName in (_mission select 0)) then {_go = true};" \n
+ " };" \n
+ " };" \n
+ "};" \n
+ "" \n
+ "//--- Go?" \n
+ "if (_go) then {" \n
+ " //--- Check for the mission condition (Compile it)." \n
+ " if (Call Compile (_mission select 4)) then {" \n
+ " [_mission select 2,_mission select 3,_mission select 5] ExecVM (_mission select 1);" \n
+ "" \n
+ " //--- Randomize the next mission delay." \n
+ " _lastMissionAssignedTime = (time)+random(_randomizer)-random(_randomizer);" \n
+ "" \n
+ " //--- Select the mission type (both, west ,east)" \n
+ " switch (_mission select 5) do {" \n
+ " case civilian: {['_WFBE_M_RUNNINGMISSIONS_WEST',_runningMissionsWest + 1, true] Call SetNamespace;['_WFBE_M_RUNNINGMISSIONS_EAST',_runningMissionsEast + 1, true] Call SetNamespace};" \n
+ " case west: {['_WFBE_M_RUNNINGMISSIONS_WEST',_runningMissionsWest + 1, true] Call SetNamespace};" \n
+ " case east: {['_WFBE_M_RUNNINGMISSIONS_EAST',_runningMissionsEast + 1, true] Call SetNamespace};" \n
+ " };" \n
+ " " \n
+ " //--- Increment Mission index (it will apply to the getter, no need to set again)." \n
+ " _mission set [3,(_mission select 3) + 1];" \n
+ "" \n
+ " //--- Push (i.e limit 4, [1,2,3,4] add 5 >> [5,1,2,3])." \n
+ " for [{_z = (count _lastMissionsIndex)},{_z > 0},{_z = _z - 1}] do {" \n
+ " _lastMissionsIndex set [_z, (_lastMissionsIndex select (_z - 1))];" \n
+ " };" \n
+ " " \n
+ " //--- Resize if we're above the limit." \n
+ " _lastMissionsIndex set [0, _i];" \n
+ " if (count _lastMissionsIndex >= _canReuseAfter) then {" \n
+ " _lastMissionsIndex resize (_canReuseAfter - 1);" \n
+ " };" \n
+ " };" \n
+ "};"/*%FSM</STATEINIT""">*/;
+ precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
+ class Links
+ {
+ /*%FSM<LINK "_">*/
+ class _
+ {
+ priority = 0.000000;
+ to="Skip";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/""/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ };
+ };
+ /*%FSM</STATE>*/
+ /*%FSM<STATE "Skip">*/
+ class Skip
+ {
+ name = "Skip";
+ init = /*%FSM<STATEINIT""">*/""/*%FSM</STATEINIT""">*/;
+ precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
+ class Links
+ {
+ /*%FSM<LINK "Loop">*/
+ class Loop
+ {
+ priority = 0.000000;
+ to="Update_Time";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/"!gameOver && time - _lastUpdate > 30"/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ };
+ };
+ /*%FSM</STATE>*/
+ };
+ initState="Init";
+ finalStates[] =
+ {
+ "End",
+ };
+};
+/*%FSM</COMPILE>*/ \ No newline at end of file
diff --git a/Server/FSM/queryhandler.fsm b/Server/FSM/queryhandler.fsm
new file mode 100644
index 0000000..2f5f130
--- /dev/null
+++ b/Server/FSM/queryhandler.fsm
@@ -0,0 +1,153 @@
+/*%FSM<COMPILE "D:\ArmA2\FSM Editor Personal Edition\scriptedFSM.cfg, queryhandler">*/
+/*%FSM<HEAD>*/
+/*
+item0[] = {"Init",0,250,67.883751,-127.533096,157.883820,-77.533165,0.000000,"Init"};
+item1[] = {"Update_Query",2,250,67.881363,24.571560,157.881256,74.571510,0.000000,"Update" \n "Query"};
+item2[] = {"End",1,250,-189.891251,153.378479,-99.891129,203.378586,0.000000,"End"};
+item3[] = {"Loop",4,218,68.212364,-51.053558,158.212402,-1.053517,0.000000,"Loop"};
+item4[] = {"Gameover",4,218,-62.855103,24.549839,27.144907,74.549820,0.000000,"Gameover"};
+item5[] = {"End_Check",2,4346,-191.718842,24.369755,-101.718727,74.369736,0.000000,"End Check"};
+item6[] = {"_",8,218,-162.287018,100.867683,-128.674744,124.929321,0.000000,""};
+link0[] = {0,3};
+link1[] = {1,3};
+link2[] = {1,4};
+link3[] = {3,1};
+link4[] = {4,5};
+link5[] = {5,6};
+link6[] = {6,2};
+globals[] = {0.000000,0,0,0,0,640,480,1,21,6316128,1,-421.780701,421.779755,226.237854,-325.234192,748,514,1};
+window[] = {0,-1,-1,-1,-1,772,203,1463,138,1,766};
+*//*%FSM</HEAD>*/
+class FSM
+{
+ fsmName = "queryhandler";
+ class States
+ {
+ /*%FSM<STATE "Init">*/
+ class Init
+ {
+ name = "Init";
+ init = /*%FSM<STATEINIT""">*/"_lastUpdate = time;" \n
+ "" \n
+ "_mysql_query = [];"/*%FSM</STATEINIT""">*/;
+ precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
+ class Links
+ {
+ /*%FSM<LINK "Loop">*/
+ class Loop
+ {
+ priority = 0.000000;
+ to="Update_Query";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/"time - _lastUpdate > 0.3 && !gameOver"/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ };
+ };
+ /*%FSM</STATE>*/
+ /*%FSM<STATE "Update_Query">*/
+ class Update_Query
+ {
+ name = "Update_Query";
+ init = /*%FSM<STATEINIT""">*/"_cobjects = WF_Logic getVariable ""WF_MYSQL_CLIENT"";" \n
+ "_sobjects = WF_Logic getVariable ""WF_MYSQL_SERVER"";" \n
+ "" \n
+ "_query = """";" \n
+ "" \n
+ "if (count _cobjects > 0) then {" \n
+ " _query = _cobjects select 0;" \n
+ " _cobjects set [0,""nil""];" \n
+ " _cobjects = _cobjects - [""nil""];" \n
+ " WF_Logic setVariable [""WF_MYSQL_CLIENT"",_cobjects,true];" \n
+ "};" \n
+ "" \n
+ "if (count _sobjects > 0 && _query == """") then {" \n
+ " _query = _sobjects select 0;" \n
+ " _sobjects set [0,""nil""];" \n
+ " _sobjects = _sobjects - [""nil""];" \n
+ " WF_Logic setVariable [""WF_MYSQL_SERVER"",_sobjects];" \n
+ "};" \n
+ "" \n
+ "if (_query != """") then {copyToClipboard _query};" \n
+ "" \n
+ "_lastUpdate = time;"/*%FSM</STATEINIT""">*/;
+ precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
+ class Links
+ {
+ /*%FSM<LINK "Gameover">*/
+ class Gameover
+ {
+ priority = 0.000000;
+ to="End_Check";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/"gameOver"/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ /*%FSM<LINK "Loop">*/
+ class Loop
+ {
+ priority = 0.000000;
+ to="Update_Query";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/"time - _lastUpdate > 0.3 && !gameOver"/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ };
+ };
+ /*%FSM</STATE>*/
+ /*%FSM<STATE "End">*/
+ class End
+ {
+ name = "End";
+ init = /*%FSM<STATEINIT""">*/""/*%FSM</STATEINIT""">*/;
+ precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
+ class Links
+ {
+ };
+ };
+ /*%FSM</STATE>*/
+ /*%FSM<STATE "End_Check">*/
+ class End_Check
+ {
+ name = "End_Check";
+ init = /*%FSM<STATEINIT""">*/"[] Spawn {" \n
+ " {" \n
+ " if (isPlayer (leader _x)) then {" \n
+ " sleep 0.3;" \n
+ " " \n
+ " _get = Format[""WFBE_JIP_USER%1"",getPlayerUID (leader _x)] Call GetNamespace;" \n
+ " if !(isNil '_get') then {" \n
+ " _field = if (side (leader _x) == (WF_Logic getVariable ""WF_Winner"")) then {""win""} else {""loss""};" \n
+ " _strTr = if (side(leader _x) == west) then {'west'} else {'east'};" \n
+ " copyToClipboard Format [""MYSQLDATA�WFBE_EndGame�%1�%2�%3�%4�%5�%6"",getPlayerUID (leader _x), name (leader _x), time - (_get select 5), _strTr, worldName, _field];" \n
+ " };" \n
+ " };" \n
+ " } forEach (('WFBE_EASTTEAMS' Call GetNamespace)+('WFBE_WESTTEAMS' Call GetNamespace));" \n
+ "};"/*%FSM</STATEINIT""">*/;
+ precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
+ class Links
+ {
+ /*%FSM<LINK "_">*/
+ class _
+ {
+ priority = 0.000000;
+ to="End";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/""/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ };
+ };
+ /*%FSM</STATE>*/
+ };
+ initState="Init";
+ finalStates[] =
+ {
+ "End"
+ };
+};
+/*%FSM</COMPILE>*/ \ No newline at end of file
diff --git a/Server/FSM/respatrol.fsm b/Server/FSM/respatrol.fsm
new file mode 100644
index 0000000..4d1d9b3
--- /dev/null
+++ b/Server/FSM/respatrol.fsm
@@ -0,0 +1,336 @@
+/*%FSM<COMPILE "F:\ArmA2\FSM Editor Personal Edition\scriptedFSM.cfg, respatrol">*/
+/*%FSM<HEAD>*/
+/*
+item0[] = {"Init_Patrol",0,250,-37.336731,-245.259415,52.663269,-195.259415,0.000000,"Init Patrol"};
+item1[] = {"Wait",4,218,-34.704277,-60.518974,55.295708,-10.518976,0.000000,"Wait"};
+item2[] = {"Activity",2,250,-38.403221,10.450424,51.596794,60.450424,0.000000,"Activity"};
+item3[] = {"is_Active",4,218,101.439552,11.111540,191.439560,61.111511,1.000000,"is Active"};
+item4[] = {"Actions",2,250,100.520218,-64.953995,190.520096,-14.954021,0.000000,"Actions"};
+item5[] = {"Spawn",4,218,-316.513123,35.015533,-226.513107,85.015488,10.000000,"Spawn"};
+item6[] = {"Create",2,250,-316.368622,-205.743271,-226.368637,-155.743256,0.000000,"Create"};
+item7[] = {"Gameover",4,218,-99.764572,74.877029,-9.764542,124.877037,0.000000,"Gameover"};
+item8[] = {"End",1,250,-101.050774,175.913666,-11.050694,225.913651,0.000000,"End"};
+item9[] = {"Wait",4,218,-38.930679,109.403816,51.069321,159.403778,0.000000,"Wait"};
+item10[] = {"Respawn_units",2,250,207.845749,108.995827,297.845764,158.995819,0.000000,"Respawn units"};
+item11[] = {"_",8,218,231.577728,-112.425110,275.102661,-89.123550,0.000000,""};
+item12[] = {"_",8,218,-14.641279,-176.291138,27.894829,-149.034271,0.000000,""};
+item13[] = {"Advanced_Init",2,250,-39.362053,-125.860779,50.637978,-75.860779,0.000000,"Advanced Init"};
+item14[] = {"Town_Enemy",4,218,-253.437073,0.921768,-163.437073,50.921768,0.000000,"Town Enemy"};
+item15[] = {"Idle",2,250,-251.141953,-120.718803,-161.141937,-70.718803,0.000000,"Idle"};
+link0[] = {0,12};
+link1[] = {1,2};
+link2[] = {2,3};
+link3[] = {2,5};
+link4[] = {2,7};
+link5[] = {2,9};
+link6[] = {2,14};
+link7[] = {3,4};
+link8[] = {4,1};
+link9[] = {5,6};
+link10[] = {6,1};
+link11[] = {7,8};
+link12[] = {9,10};
+link13[] = {10,11};
+link14[] = {11,13};
+link15[] = {12,13};
+link16[] = {13,1};
+link17[] = {14,15};
+link18[] = {15,1};
+globals[] = {0.000000,0,0,0,0,640,480,1,40,6316128,1,-340.674133,424.132904,299.011444,-280.217407,680,520,1};
+window[] = {0,-1,-1,-1,-1,838,154,1453,203,1,698};
+*//*%FSM</HEAD>*/
+class FSM
+{
+ fsmName = "respatrol";
+ class States
+ {
+ /*%FSM<STATE "Init_Patrol">*/
+ class Init_Patrol
+ {
+ name = "Init_Patrol";
+ init = /*%FSM<STATEINIT""">*/"_location = _this select 0;" \n
+ "_startSV = _location getVariable ""startingSupplyValue"";" \n
+ "" \n
+ "_rpi = 'WFBE_RESPATROLINTERVAL' Call GetNamespace;"/*%FSM</STATEINIT""">*/;
+ precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
+ class Links
+ {
+ /*%FSM<LINK "_">*/
+ class _
+ {
+ priority = 0.000000;
+ to="Advanced_Init";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/""/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ };
+ };
+ /*%FSM</STATE>*/
+ /*%FSM<STATE "Activity">*/
+ class Activity
+ {
+ name = "Activity";
+ init = /*%FSM<STATEINIT""">*/"_lastUpdate = time;" \n
+ "_sideID = _location getVariable ""sideID"";" \n
+ "_isActive = _location getVariable ""activePatrol"";" \n
+ "_SV =_location getVariable ""supplyValue"";" \n
+ "" \n
+ "_alives = if (!isNil ""_team"") then {Count ((Units _team) Call GetLiveUnits)} else {0};" \n
+ "" \n
+ "if (time - _travelTime > 1200) then {_lastMission = """"};"/*%FSM</STATEINIT""">*/;
+ precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
+ class Links
+ {
+ /*%FSM<LINK "Spawn">*/
+ class Spawn
+ {
+ priority = 10.000000;
+ to="Create";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/"!gameOver && !_isActive && _sideID == RESISTANCEID"/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ /*%FSM<LINK "is_Active">*/
+ class is_Active
+ {
+ priority = 1.000000;
+ to="Actions";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/"!gameOver && _isActive && _alives > 0"/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ /*%FSM<LINK "Wait">*/
+ class Wait
+ {
+ priority = 0.000000;
+ to="Respawn_units";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/"_alives <= 0 && _isActive"/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ /*%FSM<LINK "Town_Enemy">*/
+ class Town_Enemy
+ {
+ priority = 0.000000;
+ to="Idle";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/"!gameOver && !_isActive && _sideID != RESISTANCEID"/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ /*%FSM<LINK "Gameover">*/
+ class Gameover
+ {
+ priority = 0.000000;
+ to="End";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/"gameOver"/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ };
+ };
+ /*%FSM</STATE>*/
+ /*%FSM<STATE "Actions">*/
+ class Actions
+ {
+ name = "Actions";
+ init = /*%FSM<STATEINIT""">*/"if (_SV != _startSV || _sideID != RESISTANCEID) then {" \n
+ " _curMission = ""Defend"";" \n
+ "} else {" \n
+ " _curMission = ""Patrol"";" \n
+ "};" \n
+ "" \n
+ "_nsid = _nearest getVariable ""sideID"";" \n
+ "" \n
+ "if (_curMission != _lastMission || ((leader _team) distance _nearest < 60 && _nsid == RESISTANCEID)) then {" \n
+ " _lastMission = _curMission;" \n
+ " _travelTime = time;" \n
+ " switch (_curMission) do {" \n
+ " case ""Patrol"": {" \n
+ " _nearTowns = ([leader _team,towns] Call SortByDistance) - [_lastDestination];" \n
+ " _nearest = _nearTowns select 0;" \n
+ " if (count towns > 3) then {" \n
+ " _nearest = _nearTowns select (round(random 2));" \n
+ " } else {" \n
+ " if (count towns > 2) then {" \n
+ " _nearest = _nearTowns select (round(random 1));" \n
+ " } else {" \n
+ " _nearest = _nearTowns select 0;" \n
+ " };" \n
+ " };" \n
+ " [_team,getPos _nearest,""move""] Call AIMoveTo;" \n
+ " _lastDestination = _nearest" \n
+ " };" \n
+ " case ""Defend"": {" \n
+ " [_team,getPos _location,""move""] Call AIMoveTo;" \n
+ " };" \n
+ " };" \n
+ "};"/*%FSM</STATEINIT""">*/;
+ precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
+ class Links
+ {
+ /*%FSM<LINK "Wait">*/
+ class Wait
+ {
+ priority = 0.000000;
+ to="Activity";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/"time - _lastUpdate > (30+random 1)"/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ };
+ };
+ /*%FSM</STATE>*/
+ /*%FSM<STATE "Create">*/
+ class Create
+ {
+ name = "Create";
+ init = /*%FSM<STATEINIT""">*/"_team = createGroup resistance;" \n
+ "_unit = objNull;" \n
+ "_vehicles = [];" \n
+ "_position = [getPos _location,100,300] Call GetRandomPosition;" \n
+ "" \n
+ "{" \n
+ " if (_x isKindOf ""Man"") then {" \n
+ " _unit = [_x,_team,_position,resistance] Call CreateMan;" \n
+ " } else {" \n
+ " _type = if (_x isKindOf 'Man') then {'WFBE_GUERSOLDIER' Call GetNamespace} else {if (_x isKindOf 'Air') then {'WFBE_GUERPILOT' Call GetNamespace} else {'WFBE_GUERCREW' Call GetNamespace}};" \n
+ " _vehicle = [_x,_position,resistance,paramResVehLock] Call CreateVehi;" \n
+ " _vehicles = _vehicles + [_vehicle];" \n
+ " _unit = [_type,_team,_position,resistance] Call CreateMan;" \n
+ " _unit moveInDriver _vehicle;" \n
+ " if (_vehicle emptyPositions ""gunner"" > 0) then {_unit = [_type,_team,_position,resistance] Call CreateMan;_unit moveInGunner _vehicle};" \n
+ " if (_vehicle emptyPositions ""commander"" > 0) then {_unit = [_type,_team,_position,resistance] Call CreateMan;_unit moveInCommander _vehicle};" \n
+ " };" \n
+ "} forEach _types;" \n
+ "" \n
+ "{_team addVehicle _x} forEach _vehicles;" \n
+ "" \n
+ "if (count _vehicles > 0) then {" \n
+ " {" \n
+ " emptyQueu = emptyQueu + [_x];" \n
+ " _x Spawn HandleEmptyVehicle;" \n
+ " } forEach _vehicles;" \n
+ "};" \n
+ "" \n
+ "_location setVariable [""activePatrol"",true];"/*%FSM</STATEINIT""">*/;
+ precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
+ class Links
+ {
+ /*%FSM<LINK "Wait">*/
+ class Wait
+ {
+ priority = 0.000000;
+ to="Activity";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/"time - _lastUpdate > (30+random 1)"/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ };
+ };
+ /*%FSM</STATE>*/
+ /*%FSM<STATE "End">*/
+ class End
+ {
+ name = "End";
+ init = /*%FSM<STATEINIT""">*/""/*%FSM</STATEINIT""">*/;
+ precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
+ class Links
+ {
+ };
+ };
+ /*%FSM</STATE>*/
+ /*%FSM<STATE "Respawn_units">*/
+ class Respawn_units
+ {
+ name = "Respawn_units";
+ init = /*%FSM<STATEINIT""">*/"_idleStart = time;"/*%FSM</STATEINIT""">*/;
+ precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
+ class Links
+ {
+ /*%FSM<LINK "_">*/
+ class _
+ {
+ priority = 0.000000;
+ to="Advanced_Init";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/"time - _idleStart > 5"/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ };
+ };
+ /*%FSM</STATE>*/
+ /*%FSM<STATE "Advanced_Init">*/
+ class Advanced_Init
+ {
+ name = "Advanced_Init";
+ init = /*%FSM<STATEINIT""">*/"_lastUpdate = 0;" \n
+ "_lastDestination = _location;" \n
+ "_curMission = """";" \n
+ "_lastMission = """";" \n
+ "_team = nil;" \n
+ "_nearest = _location;" \n
+ "_travelTime = time;" \n
+ "" \n
+ "//--- Select a team sample depending of the SV." \n
+ "_types = -1;" \n
+ "if (_startSV <= 10) then {_types = Format [""WFBE_RESPATROLTYPE1%1"",round(random 2)] Call GetNamespace};" \n
+ "if (_startSV > 10 && _startSV <= 20) then {_types = Format [""WFBE_RESPATROLTYPE2%1"",round(random 2)] Call GetNamespace};" \n
+ "if (_startSV > 20 && _startSV <= 30) then {_types = Format [""WFBE_RESPATROLTYPE3%1"",round(random 2)] Call GetNamespace};" \n
+ "if (typeName _types != 'ARRAY') then {_types = 'WFBE_RESPATROLTYPE10' Call GetNamespace};" \n
+ "" \n
+ "_location setVariable [""activePatrol"",false];"/*%FSM</STATEINIT""">*/;
+ precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
+ class Links
+ {
+ /*%FSM<LINK "Wait">*/
+ class Wait
+ {
+ priority = 0.000000;
+ to="Activity";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/"time - _lastUpdate > (30+random 1)"/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ };
+ };
+ /*%FSM</STATE>*/
+ /*%FSM<STATE "Idle">*/
+ class Idle
+ {
+ name = "Idle";
+ init = /*%FSM<STATEINIT""">*/""/*%FSM</STATEINIT""">*/;
+ precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
+ class Links
+ {
+ /*%FSM<LINK "Wait">*/
+ class Wait
+ {
+ priority = 0.000000;
+ to="Activity";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/"time - _lastUpdate > (30+random 1)"/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ };
+ };
+ /*%FSM</STATE>*/
+ };
+ initState="Init_Patrol";
+ finalStates[] =
+ {
+ "End"
+ };
+};
+/*%FSM</COMPILE>*/ \ No newline at end of file
diff --git a/Server/FSM/resstriker.fsm b/Server/FSM/resstriker.fsm
new file mode 100644
index 0000000..5f29b20
--- /dev/null
+++ b/Server/FSM/resstriker.fsm
@@ -0,0 +1,303 @@
+/*%FSM<COMPILE "E:\Bohemia Interactive\ArmA 2\FSM Editor Personal Edition\scriptedFSM.cfg, resstriker">*/
+/*%FSM<HEAD>*/
+/*
+item0[] = {"Init_Patrol",0,250,-37.336731,-245.259415,52.663269,-195.259415,0.000000,"Init Patrol"};
+item1[] = {"Wait",4,218,-35.585495,-60.933670,54.414505,-10.933670,0.000000,"Wait"};
+item2[] = {"Activity",2,250,-38.403221,10.450424,51.596794,60.450424,0.000000,"Activity"};
+item3[] = {"is_Active",4,218,101.439552,11.111540,191.439560,61.111511,1.000000,"is Active"};
+item4[] = {"Actions",2,250,100.520218,-64.953995,190.520096,-14.954021,0.000000,"Actions"};
+item5[] = {"Spawn",4,218,-316.513123,35.015533,-226.513107,85.015488,10.000000,"Spawn"};
+item6[] = {"Create",2,250,-316.368622,-205.743271,-226.368637,-155.743256,0.000000,"Create"};
+item7[] = {"Gameover",4,218,-99.764572,74.877029,-9.764542,124.877037,0.000000,"Gameover"};
+item8[] = {"End",1,250,-101.050774,175.913666,-11.050694,225.913651,0.000000,"End"};
+item9[] = {"Wait",4,218,-38.930679,109.403816,51.069321,159.403778,0.000000,"Wait"};
+item10[] = {"Respawn_units",2,250,207.845749,108.995827,297.845764,158.995819,0.000000,"Respawn units"};
+item11[] = {"_",8,218,231.577728,-112.425110,275.102661,-89.123550,0.000000,""};
+item12[] = {"_",8,218,-14.641279,-176.291138,27.894829,-149.034271,0.000000,""};
+item13[] = {"Advanced_Init",2,250,-39.362053,-125.860779,50.637978,-75.860779,0.000000,"Advanced Init"};
+item14[] = {"Town_Enemy",4,218,-253.437073,0.921768,-163.437073,50.921768,0.000000,"Town Enemy"};
+item15[] = {"Idle",2,250,-251.141953,-120.718803,-161.141937,-70.718803,0.000000,"Idle"};
+link0[] = {0,12};
+link1[] = {1,2};
+link2[] = {2,3};
+link3[] = {2,5};
+link4[] = {2,7};
+link5[] = {2,9};
+link6[] = {2,14};
+link7[] = {3,4};
+link8[] = {4,1};
+link9[] = {5,6};
+link10[] = {6,1};
+link11[] = {7,8};
+link12[] = {9,10};
+link13[] = {10,11};
+link14[] = {11,13};
+link15[] = {12,13};
+link16[] = {13,1};
+link17[] = {14,15};
+link18[] = {15,1};
+globals[] = {0.000000,0,0,0,0,640,480,1,40,6316128,1,-414.643646,338.593170,226.689758,-316.083740,680,490,1};
+window[] = {0,-1,-1,-1,-1,710,75,1374,75,1,698};
+*//*%FSM</HEAD>*/
+class FSM
+{
+ fsmName = "resstriker";
+ class States
+ {
+ /*%FSM<STATE "Init_Patrol">*/
+ class Init_Patrol
+ {
+ name = "Init_Patrol";
+ init = /*%FSM<STATEINIT""">*/"_location = _this select 0;" \n
+ "_target = objNull;" \n
+ "" \n
+ "_rsi = 'WFBE_RESSTRIKERINTERVAL' Call GetNamespace;"/*%FSM</STATEINIT""">*/;
+ precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
+ class Links
+ {
+ /*%FSM<LINK "_">*/
+ class _
+ {
+ priority = 0.000000;
+ to="Advanced_Init";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/""/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ };
+ };
+ /*%FSM</STATE>*/
+ /*%FSM<STATE "Activity">*/
+ class Activity
+ {
+ name = "Activity";
+ init = /*%FSM<STATEINIT""">*/"_lastUpdate = time + 40 + random 2;" \n
+ "_sideID = _location getVariable ""sideID"";" \n
+ "_isActive = _location getVariable ""activeStriker"";" \n
+ "" \n
+ "_alives = if (!isNil ""_team"") then {Count ((Units _team) Call GetLiveUnits)} else {0};"/*%FSM</STATEINIT""">*/;
+ precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
+ class Links
+ {
+ /*%FSM<LINK "Spawn">*/
+ class Spawn
+ {
+ priority = 10.000000;
+ to="Create";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/"!gameOver && !_isActive && _sideID == RESISTANCEID"/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ /*%FSM<LINK "is_Active">*/
+ class is_Active
+ {
+ priority = 1.000000;
+ to="Actions";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/"!gameOver && _isActive && _alives > 0"/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ /*%FSM<LINK "Wait">*/
+ class Wait
+ {
+ priority = 0.000000;
+ to="Respawn_units";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/"_alives <= 0 && _isActive"/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ /*%FSM<LINK "Town_Enemy">*/
+ class Town_Enemy
+ {
+ priority = 0.000000;
+ to="Idle";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/"!gameOver && !_isActive && _sideID != RESISTANCEID"/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ /*%FSM<LINK "Gameover">*/
+ class Gameover
+ {
+ priority = 0.000000;
+ to="End";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/"gameOver"/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ };
+ };
+ /*%FSM</STATE>*/
+ /*%FSM<STATE "Actions">*/
+ class Actions
+ {
+ name = "Actions";
+ init = /*%FSM<STATEINIT""">*/"_update = false;" \n
+ "if (time - _travelTime > 2400 || !alive _target) then {_update = true};" \n
+ "" \n
+ "if (_update) then {" \n
+ " _buildings = (WestBaseStructures) + (EastBaseStructures) + [EastMHQ,WestMHQ];" \n
+ " _near = [_location, _buildings] Call SortByDistance;" \n
+ " _target = _near select 0;" \n
+ " [_team, true, [[_target, 'SAD', 100, 60, """", []]]] Call AIWPAdd;" \n
+ " _travelTime = time;" \n
+ "};"/*%FSM</STATEINIT""">*/;
+ precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
+ class Links
+ {
+ /*%FSM<LINK "Wait">*/
+ class Wait
+ {
+ priority = 0.000000;
+ to="Activity";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/"time > _lastUpdate"/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ };
+ };
+ /*%FSM</STATE>*/
+ /*%FSM<STATE "Create">*/
+ class Create
+ {
+ name = "Create";
+ init = /*%FSM<STATEINIT""">*/"_team = createGroup resistance;" \n
+ "_unit = objNull;" \n
+ "_vehicles = [];" \n
+ "_position = [getPos _location,100,300] Call GetRandomPosition;" \n
+ "" \n
+ "//--- Select a team." \n
+ "_types = Format [""WFBE_RESSTRIKERTYPE1%1"",round(random 3)] Call GetNamespace;" \n
+ "" \n
+ "{" \n
+ " if (_x isKindOf ""Man"") then {" \n
+ " _unit = [_x,_team,_position,resistance] Call CreateMan;" \n
+ " } else {" \n
+ " _type = if (_x isKindOf 'Man') then {'WFBE_GUERSOLDIER' Call GetNamespace} else {if (_x isKindOf 'Air') then {'WFBE_GUERPILOT' Call GetNamespace} else {'WFBE_GUERCREW' Call GetNamespace}};" \n
+ " _vehicle = [_x,_position,resistance,paramResVehLock] Call CreateVehi;" \n
+ " _vehicles = _vehicles + [_vehicle];" \n
+ " _unit = [_type,_team,_position,resistance] Call CreateMan;" \n
+ " _unit moveInDriver _vehicle;" \n
+ " if (_vehicle emptyPositions ""gunner"" > 0) then {_unit = [_type,_team,_position,resistance] Call CreateMan;_unit moveInGunner _vehicle};" \n
+ " if (_vehicle emptyPositions ""commander"" > 0) then {_unit = [_type,_team,_position,resistance] Call CreateMan;_unit moveInCommander _vehicle};" \n
+ " };" \n
+ "} forEach _types;" \n
+ "" \n
+ "{_team addVehicle _x} forEach _vehicles;" \n
+ "" \n
+ "if (count _vehicles > 0) then {" \n
+ " {" \n
+ " emptyQueu = emptyQueu + [_x];" \n
+ " _x Spawn HandleEmptyVehicle;" \n
+ " } forEach _vehicles;" \n
+ "};" \n
+ "" \n
+ "_location setVariable [""activeStriker"",true];"/*%FSM</STATEINIT""">*/;
+ precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
+ class Links
+ {
+ /*%FSM<LINK "Wait">*/
+ class Wait
+ {
+ priority = 0.000000;
+ to="Activity";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/"time > _lastUpdate"/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ };
+ };
+ /*%FSM</STATE>*/
+ /*%FSM<STATE "End">*/
+ class End
+ {
+ name = "End";
+ init = /*%FSM<STATEINIT""">*/""/*%FSM</STATEINIT""">*/;
+ precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
+ class Links
+ {
+ };
+ };
+ /*%FSM</STATE>*/
+ /*%FSM<STATE "Respawn_units">*/
+ class Respawn_units
+ {
+ name = "Respawn_units";
+ init = /*%FSM<STATEINIT""">*/"_idleStart = time;"/*%FSM</STATEINIT""">*/;
+ precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
+ class Links
+ {
+ /*%FSM<LINK "_">*/
+ class _
+ {
+ priority = 0.000000;
+ to="Advanced_Init";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/"time - _idleStart > _rsi"/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ };
+ };
+ /*%FSM</STATE>*/
+ /*%FSM<STATE "Advanced_Init">*/
+ class Advanced_Init
+ {
+ name = "Advanced_Init";
+ init = /*%FSM<STATEINIT""">*/"_lastUpdate = -60;" \n
+ "_team = nil;" \n
+ "_travelTime = time;" \n
+ "" \n
+ "_location setVariable [""activeStriker"",false];"/*%FSM</STATEINIT""">*/;
+ precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
+ class Links
+ {
+ /*%FSM<LINK "Wait">*/
+ class Wait
+ {
+ priority = 0.000000;
+ to="Activity";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/"time > _lastUpdate"/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ };
+ };
+ /*%FSM</STATE>*/
+ /*%FSM<STATE "Idle">*/
+ class Idle
+ {
+ name = "Idle";
+ init = /*%FSM<STATEINIT""">*/""/*%FSM</STATEINIT""">*/;
+ precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
+ class Links
+ {
+ /*%FSM<LINK "Wait">*/
+ class Wait
+ {
+ priority = 0.000000;
+ to="Activity";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/"time > _lastUpdate"/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ };
+ };
+ /*%FSM</STATE>*/
+ };
+ initState="Init_Patrol";
+ finalStates[] =
+ {
+ "End"
+ };
+};
+/*%FSM</COMPILE>*/ \ No newline at end of file
diff --git a/Server/FSM/supplytruck.fsm b/Server/FSM/supplytruck.fsm
new file mode 100644
index 0000000..74e591d
--- /dev/null
+++ b/Server/FSM/supplytruck.fsm
@@ -0,0 +1,287 @@
+/*%FSM<COMPILE "D:\ArmA2\FSM Editor Personal Edition\scriptedFSM.cfg, supplytruck">*/
+/*%FSM<HEAD>*/
+/*
+item0[] = {"Truck_Init",0,250,-171.242203,-13.536451,-81.242249,36.463646,0.000000,"Truck Init"};
+item1[] = {"Truck_End",1,250,-303.115265,388.653168,-213.115280,438.653076,0.000000,"Truck End"};
+item2[] = {"Truck_is__dead_",4,218,-302.663574,272.303101,-212.663345,322.302917,1.000000,"Truck is " \n "dead?"};
+item3[] = {"Global__Checks",3,250,-170.493988,177.490768,-80.494026,227.490891,0.000000,"Global" \n " Checks"};
+item4[] = {"Loop",8,218,-171.007660,71.851631,-81.007713,121.851631,0.000000,"Loop"};
+item5[] = {"Can__Move_",4,218,-300.051117,178.466248,-210.051086,228.466232,0.000000,"Can " \n "Move?"};
+item6[] = {"Check__Locations",2,250,-299.279907,73.958237,-209.971802,123.266243,0.000000,"Check" \n " Locations"};
+item7[] = {"Deliver_",4,218,-170.476105,272.373291,-80.476044,322.373322,0.000000,"Deliver?"};
+item8[] = {"Delivery",2,250,-170.157013,387.966614,-80.156998,437.966614,0.000000,"Delivery"};
+item9[] = {"",7,210,49.830540,409.317871,57.830544,417.317871,0.000000,""};
+item10[] = {"",7,210,49.565125,92.576248,57.565128,100.576248,0.000000,""};
+item11[] = {"Destination_",4,218,-53.444309,177.966080,36.555691,227.966080,0.000000,"Destination?"};
+item12[] = {"Reload",2,250,-46.849068,102.598534,43.150940,152.598419,0.000000,"Reload"};
+link0[] = {0,4};
+link1[] = {2,1};
+link2[] = {3,2};
+link3[] = {3,5};
+link4[] = {3,7};
+link5[] = {3,11};
+link6[] = {4,3};
+link7[] = {5,6};
+link8[] = {6,4};
+link9[] = {7,8};
+link10[] = {8,9};
+link11[] = {9,10};
+link12[] = {10,4};
+link13[] = {11,12};
+link14[] = {12,4};
+globals[] = {0.000000,0,0,0,0,640,480,1,23,6316128,1,-459.421387,124.502724,528.344360,-109.468002,726,906,1};
+window[] = {2,-1,-1,-1,-1,921,175,1135,175,3,744};
+*//*%FSM</HEAD>*/
+class FSM
+{
+ fsmName = "supplytruck";
+ class States
+ {
+ /*%FSM<STATE "Truck_Init">*/
+ class Truck_Init
+ {
+ name = "Truck_Init";
+ init = /*%FSM<STATEINIT""">*/"_side = _this select 0;" \n
+ "_sideText = str _side;" \n
+ "" \n
+ "_type = Format ['WFBE_%1SUPPLYTRUCK',_sideText] Call GetNamespace;" \n
+ "_crew = Format [""WFBE_%1SOLDIER"",_sideText] Call GetNamespace;" \n
+ "_hq = (_sideText) Call GetSideHQ;" \n
+ "_vehicle = [_type,(GetPos _hq),_side,true] Call CreateVehi;" \n
+ "_team = CreateGroup _side;" \n
+ "_driver = [_crew,_team,(getpos _vehicle),_side] Call CreateMan;" \n
+ "[_driver] AllowGetIn true;" \n
+ "_driver MoveInDriver _vehicle;" \n
+ "[Format[""WFBE_%1_AISupplyTrucks"",_sideText],(Format[""WFBE_%1_AISupplyTrucks"",_sideText] Call GetNamespace) + [_vehicle],true] Call SetNamespace;" \n
+ "[_vehicle,GetPos _hq,30,50,true,false,true] Call PlaceNear;" \n
+ "" \n
+ "[_sideText,'VehiclesCreated',1] Call UpdateStatistics;" \n
+ "[_sideText,'UnitsCreated',1] Call UpdateStatistics;" \n
+ "" \n
+ "_spt = Format[""WFBE_%1SERVICEPOINTTYPE"",_sideText] Call GetNamespace;" \n
+ "" \n
+ "_SV = 1000;" \n
+ "_currentSV = 0;" \n
+ "_maxSV = 0;" \n
+ "_timer = 0;" \n
+ "_closest = objNull;" \n
+ "_sp = _hq;" \n
+ "_lastDestination = _hq;" \n
+ "_isDelivering = false;" \n
+ "_lastCheck = time;" \n
+ "_lastDelivery = time;"/*%FSM</STATEINIT""">*/;
+ precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
+ class Links
+ {
+ /*%FSM<LINK "Loop">*/
+ class Loop
+ {
+ priority = 0.000000;
+ to="Global__Checks";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/"time - _lastCheck > 15"/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ };
+ };
+ /*%FSM</STATE>*/
+ /*%FSM<STATE "Truck_End">*/
+ class Truck_End
+ {
+ name = "Truck_End";
+ init = /*%FSM<STATEINIT""">*/"if (alive _driver) then {_driver setDammage 1};" \n
+ "(_vehicle) spawn { sleep 120;if (alive _this) then {_this setDammage 1}};" \n
+ "[Format[""WFBE_%1_AISupplyTrucks"",_sideText],(Format[""WFBE_%1_AISupplyTrucks"",_sideText] Call GetNamespace) - [_vehicle],true] Call SetNamespace;"/*%FSM</STATEINIT""">*/;
+ precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
+ class Links
+ {
+ };
+ };
+ /*%FSM</STATE>*/
+ /*%FSM<STATE "Global__Checks">*/
+ class Global__Checks
+ {
+ name = "Global__Checks";
+ init = /*%FSM<STATEINIT""">*/"if (fuel _vehicle < 0.4) then {_vehicle setFuel 1};" \n
+ "_destinations = [];" \n
+ "{" \n
+ " _locationSide = (_x getVariable ""sideID"") Call GetSideFromID;" \n
+ " if (_locationSide == _side) then {_destinations = _destinations + [_x]};" \n
+ "} forEach towns;" \n
+ "" \n
+ "_hq = (_sideText) Call GetSideHQ;" \n
+ "if (_vehicle Distance _hq < 70 || _vehicle Distance _sp < 70) then {_SV = 1000;_lastDelivery = time};" \n
+ "" \n
+ "_timer = _timer + 15;" \n
+ "if (_timer > 30) then {_isDelivering = false;_timer = 0};" \n
+ "if (time - _lastDelivery > 600) then {_vehicle setDammage 1};" \n
+ "_lastCheck = time;"/*%FSM</STATEINIT""">*/;
+ precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
+ class Links
+ {
+ /*%FSM<LINK "Truck_is__dead_">*/
+ class Truck_is__dead_
+ {
+ priority = 1.000000;
+ to="Truck_End";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/"!(alive _driver)||!(alive _vehicle)|| isNull _driver || isNull _vehicle || !canMove _vehicle"/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ /*%FSM<LINK "Deliver_">*/
+ class Deliver_
+ {
+ priority = 0.000000;
+ to="Delivery";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/"_vehicle distance _closest < 60;"/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ /*%FSM<LINK "Destination_">*/
+ class Destination_
+ {
+ priority = 0.000000;
+ to="Reload";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/"count _destinations < 1"/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ /*%FSM<LINK "Can__Move_">*/
+ class Can__Move_
+ {
+ priority = 0.000000;
+ to="Check__Locations";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/"count _destinations > 0 && !_isDelivering"/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ };
+ };
+ /*%FSM</STATE>*/
+ /*%FSM<STATE "Check__Locations">*/
+ class Check__Locations
+ {
+ name = "Check__Locations";
+ init = /*%FSM<STATEINIT""">*/"_loc = [leader _team,_destinations] Call SortByDistance;" \n
+ "_closest = _loc select 0;" \n
+ "_possibleLoc = objNull;" \n
+ "_skip = false;" \n
+ "_isDelivering = true;" \n
+ "{" \n
+ " _currentSV = _x getVariable ""supplyValue"";" \n
+ " _maxSV = _x getVariable ""maxSupplyValue"";" \n
+ " if (_currentSV < _maxSV && !_skip && _x !=_lastDestination) then {_closest = _x;_skip = true};" \n
+ "} forEach _loc;" \n
+ "" \n
+ "_currentSV = _closest getVariable ""supplyValue"";" \n
+ "if (_SV <= _currentSV) then {" \n
+ " _skip = false;" \n
+ " {" \n
+ " _currentSV = _x getVariable ""supplyValue"";" \n
+ " if (_currentSV > _SV && !_skip && _x distance _vehicle < _hq distance _vehicle && _lastDestination != _x) then {_possibleLoc = _x;_skip = true};" \n
+ " } forEach _loc;" \n
+ " if (isNull _possibleLoc) then {_possibleLoc = _hq};" \n
+ "};" \n
+ "" \n
+ "if (!isNull _possibleLoc) then {" \n
+ " _closest = _possibleLoc;" \n
+ " if (_possibleLoc == _hq) then {" \n
+ " _buildings = (str _side) Call GetSideStructures;" \n
+ " _checks = [_side,_spt,_buildings] Call GetFactories;" \n
+ " if (count _checks > 0) then {" \n
+ " _sorted = [_vehicle,_checks] Call SortByDistance;" \n
+ " _nearest = _sorted select 0;" \n
+ " _deployed = (str _side) Call GetSideHQDeployed;" \n
+ " if (_nearest distance _vehicle < _vehicle distance _hq || !_deployed || getDammage _hq >= 1) then {_closest = _nearest;_sp = _nearest};" \n
+ " };" \n
+ " };" \n
+ "};" \n
+ "" \n
+ "driver _vehicle doMove ([GetPos _closest,10,20] Call GetRandomPosition);"/*%FSM</STATEINIT""">*/;
+ precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
+ class Links
+ {
+ /*%FSM<LINK "Loop">*/
+ class Loop
+ {
+ priority = 0.000000;
+ to="Global__Checks";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/"time - _lastCheck > 15"/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ };
+ };
+ /*%FSM</STATE>*/
+ /*%FSM<STATE "Delivery">*/
+ class Delivery
+ {
+ name = "Delivery";
+ init = /*%FSM<STATEINIT""">*/"_isDelivering = false;" \n
+ "_lastDestination = _closest;" \n
+ "if (_closest in towns) then {" \n
+ " _currentSV = _closest getVariable ""supplyValue"";" \n
+ " _maxSV = _closest getVariable ""maxSupplyValue"";" \n
+ " _sideDeliver = (_closest getVariable ""sideID"") Call GetSideFromID;" \n
+ " _upgrades = (_sideText) Call GetSideUpgrades;" \n
+ " _increaseOf = (Format[""WFBE_MAXSUPPLYTRUCKSSV%1"",_upgrades select 6] Call GetNamespace);" \n
+ " _requireChange = false;" \n
+ " if (_SV > _currentSV && _sideDeliver == _side) then {_currentSV = _currentSV + _increaseOf;_requireChange = true};" \n
+ " if (_currentSV > _maxSV) then {_currentSV = _maxSV;_requireChange = true};" \n
+ " if (_requireChange) then {_closest setVariable [""supplyValue"",_currentSV,true]};" \n
+ " _SV = _currentSV;" \n
+ "};" \n
+ "" \n
+ "_lastDelivery = time;" \n
+ "_closest = objNull;"/*%FSM</STATEINIT""">*/;
+ precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
+ class Links
+ {
+ /*%FSM<LINK "Loop">*/
+ class Loop
+ {
+ priority = 0.000000;
+ to="Global__Checks";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/"time - _lastCheck > 15"/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ };
+ };
+ /*%FSM</STATE>*/
+ /*%FSM<STATE "Reload">*/
+ class Reload
+ {
+ name = "Reload";
+ init = /*%FSM<STATEINIT""">*/""/*%FSM</STATEINIT""">*/;
+ precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
+ class Links
+ {
+ /*%FSM<LINK "Loop">*/
+ class Loop
+ {
+ priority = 0.000000;
+ to="Global__Checks";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/"time - _lastCheck > 15"/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ };
+ };
+ /*%FSM</STATE>*/
+ };
+ initState="Truck_Init";
+ finalStates[] =
+ {
+ "Truck_End"
+ };
+};
+/*%FSM</COMPILE>*/ \ No newline at end of file
diff --git a/Server/FSM/townpatrol.fsm b/Server/FSM/townpatrol.fsm
new file mode 100644
index 0000000..20b07da
--- /dev/null
+++ b/Server/FSM/townpatrol.fsm
@@ -0,0 +1,217 @@
+/*%FSM<COMPILE "D:\ArmA2\FSM Editor Personal Edition\scriptedFSM.cfg, townpatrol">*/
+/*%FSM<HEAD>*/
+/*
+item0[] = {"Init",0,4346,-27.775419,-111.166977,62.224556,-61.166962,0.000000,"Init"};
+item1[] = {"_",-1,250,-11.537962,23.713089,-8.193480,23.713089,0.000000,""};
+item2[] = {"_",8,218,-1.511484,-17.446537,36.912697,11.742107,0.000000,""};
+item3[] = {"Check",2,250,-28.138243,43.531616,61.861732,93.531563,0.000000,"Check"};
+item4[] = {"Team_is_Dead",4,218,96.689819,42.858948,186.689758,92.858955,1.000000,"Team is Dead"};
+item5[] = {"End",1,250,97.392929,120.390938,187.392944,170.390991,0.000000,"End"};
+item6[] = {"",7,210,203.696777,214.089935,211.696777,222.089935,0.000000,""};
+item7[] = {"Update",4,218,-27.899580,120.367233,62.100410,170.367279,0.000000,"Update"};
+item8[] = {"Change",2,250,-27.260115,192.051666,62.739876,242.051483,0.000000,"Change"};
+item9[] = {"",7,210,203.564392,-7.076275,211.564392,0.923725,0.000000,""};
+item10[] = {"Idle",4,218,-147.923401,44.465637,-57.923424,94.465645,0.000000,"Idle"};
+item11[] = {"Idle",2,250,-147.793304,-27.947792,-57.793274,22.052193,0.000000,"Idle"};
+version=1;
+class LayoutItems
+{
+ class Item1
+ {
+ class ItemInfo
+ {
+ FontFace="Arial";
+ FontHeight=10;
+ lStyle=1;
+ };
+ };
+};
+link0[] = {0,2};
+link1[] = {2,3};
+link2[] = {3,4};
+link3[] = {3,7};
+link4[] = {3,10};
+link5[] = {4,5};
+link6[] = {6,9};
+link7[] = {7,8};
+link8[] = {8,6};
+link9[] = {9,2};
+link10[] = {10,11};
+link11[] = {11,2};
+globals[] = {0.000000,0,0,0,0,640,480,1,33,6316128,1,-256.373871,339.914581,308.677979,-157.313736,659,515,1};
+window[] = {0,-1,-1,-1,-1,939,274,1534,304,1,677};
+*//*%FSM</HEAD>*/
+class FSM
+{
+ fsmName = "townpatrol";
+ class States
+ {
+ /*%FSM<STATE "Init">*/
+ class Init
+ {
+ name = "Init";
+ init = /*%FSM<STATEINIT""">*/"_location = _this select 0;" \n
+ "_team = _this select 1;" \n
+ "_sideID = _this select 2;" \n
+ "_focus = _this select 3;" \n
+ "_isReinforcement = _this select 4;" \n
+ "_name = vehicleVarName _location;" \n
+ "" \n
+ "_lastUpdate = - 60;" \n
+ "" \n
+ "_lastSV = _location getVariable 'supplyValue';" \n
+ "_startSV = _location getVariable 'startingSupplyValue';" \n
+ "_mode = ""patrol"";" \n
+ "_lastMode = ""nil"";" \n
+ "" \n
+ "_tudd = 'WFBE_TOWNUNITSDEFENSEDISTANCE' Call GetNamespace;" \n
+ "_tupd = 'WFBE_TOWNUNITSPATROLDISTANCE' Call GetNamespace;"/*%FSM</STATEINIT""">*/;
+ precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
+ class Links
+ {
+ /*%FSM<LINK "_">*/
+ class _
+ {
+ priority = 0.000000;
+ to="Check";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/"time - _lastUpdate > 30;"/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ };
+ };
+ /*%FSM</STATE>*/
+ /*%FSM<STATE "Check">*/
+ class Check
+ {
+ name = "Check";
+ init = /*%FSM<STATEINIT""">*/"_lastUpdate = time;" \n
+ "" \n
+ "_aliveTeam = if (count ((units _team) Call GetLiveUnits) == 0) then {false} else {true};" \n
+ "" \n
+ "_currentSV = _location getVariable 'supplyValue';" \n
+ "if (_currentSV < _lastSV || _currentSV < _startSV || _sideID != (_location getVariable 'sideID')) then {" \n
+ " _mode = ""defense"";" \n
+ "} else {" \n
+ " _mode = ""patrol"";" \n
+ "};" \n
+ "" \n
+ "_lastSV = _currentSV;"/*%FSM</STATEINIT""">*/;
+ precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
+ class Links
+ {
+ /*%FSM<LINK "Team_is_Dead">*/
+ class Team_is_Dead
+ {
+ priority = 1.000000;
+ to="End";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/"gameOver || !_aliveTeam || isNull _team"/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ /*%FSM<LINK "Idle">*/
+ class Idle
+ {
+ priority = 0.000000;
+ to="Idle";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/"_aliveTeam && !gameOver"/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ /*%FSM<LINK "Update">*/
+ class Update
+ {
+ priority = 0.000000;
+ to="Change";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/"_aliveTeam && _mode != _lastMode && !gameOver"/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ };
+ };
+ /*%FSM</STATE>*/
+ /*%FSM<STATE "End">*/
+ class End
+ {
+ name = "End";
+ init = /*%FSM<STATEINIT""">*/"if (_isReinforcement) then {" \n
+ " if (_sideID == RESISTANCEID) then {" \n
+ " _reinf = _location getVariable ""reinforcements"";" \n
+ " _reinf = _reinf - 1;" \n
+ " _location setVariable [""reinforcements"",_reinf];" \n
+ " } else {" \n
+ " _reinf = _location getVariable ""reinforcements_occ"";" \n
+ " _reinf = _reinf - 1;" \n
+ " _location setVariable [""reinforcements_occ"",_reinf];" \n
+ " };" \n
+ "};"/*%FSM</STATEINIT""">*/;
+ precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
+ class Links
+ {
+ };
+ };
+ /*%FSM</STATE>*/
+ /*%FSM<STATE "Change">*/
+ class Change
+ {
+ name = "Change";
+ init = /*%FSM<STATEINIT""">*/"_lastMode = _mode;" \n
+ "" \n
+ "if (_mode == ""patrol"") then {" \n
+ " if (isNull _focus) then {" \n
+ " [_team,_location,_tupd] Spawn AITownPatrol;" \n
+ " } else {" \n
+ " [_team,_focus,_tupd/4] Spawn AIPatrol;" \n
+ " };" \n
+ "} else {" \n
+ " [_team,getPos _location,_tudd,""Defend""] Spawn AITownResitance;" \n
+ "};"/*%FSM</STATEINIT""">*/;
+ precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
+ class Links
+ {
+ /*%FSM<LINK "_">*/
+ class _
+ {
+ priority = 0.000000;
+ to="Check";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/"time - _lastUpdate > 30;"/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ };
+ };
+ /*%FSM</STATE>*/
+ /*%FSM<STATE "Idle">*/
+ class Idle
+ {
+ name = "Idle";
+ init = /*%FSM<STATEINIT""">*/""/*%FSM</STATEINIT""">*/;
+ precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
+ class Links
+ {
+ /*%FSM<LINK "_">*/
+ class _
+ {
+ priority = 0.000000;
+ to="Check";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/"time - _lastUpdate > 30;"/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ };
+ };
+ /*%FSM</STATE>*/
+ };
+ initState="Init";
+ finalStates[] =
+ {
+ "End",
+ };
+};
+/*%FSM</COMPILE>*/ \ No newline at end of file
diff --git a/Server/FSM/updatecamp.fsm b/Server/FSM/updatecamp.fsm
new file mode 100644
index 0000000..9a6d79e
--- /dev/null
+++ b/Server/FSM/updatecamp.fsm
@@ -0,0 +1,259 @@
+/*%FSM<COMPILE "E:\Bohemia Interactive\ArmA 2\FSM Editor Personal Edition\scriptedFSM.cfg, updatecamp">*/
+/*%FSM<HEAD>*/
+/*
+item0[] = {"Init",0,250,-63.253571,-299.618378,26.746418,-249.618469,0.000000,"Init"};
+item1[] = {"End",1,250,-182.368073,-113.480629,-92.368042,-63.480659,0.000000,"End"};
+item2[] = {"Gameover",4,218,-182.650177,-187.482422,-92.650192,-137.482452,0.000000,"Gameover"};
+item3[] = {"_",8,218,-34.448154,-230.434799,-2.642141,-207.859543,0.000000,""};
+item4[] = {"Camp_Core",2,250,-63.405182,-187.376434,26.594841,-137.376434,0.000000,"Camp Core"};
+item5[] = {"Camp_Advanced",2,4346,-64.617218,-39.786873,25.382790,10.213146,0.000000,"Camp" \n "Advanced"};
+item6[] = {"Empty",4,218,57.329758,-187.310150,147.329803,-137.310150,0.000000,"Empty"};
+item7[] = {"Not_Empty",4,218,-63.807266,-111.064079,26.192720,-61.064079,0.000000,"Not Empty"};
+item8[] = {"Capture",4,218,-182.872635,-39.579437,-92.872635,10.420566,0.000000,"Capture"};
+item9[] = {"Skip",4,218,57.688011,-38.769463,147.687988,11.230536,0.000000,"Skip"};
+item10[] = {"",7,210,215.273621,-222.741318,223.273621,-214.741318,0.000000,""};
+item11[] = {"_",2,250,174.323486,-38.769455,264.323486,11.230541,0.000000,""};
+item12[] = {"Capture",2,250,-301.937958,-38.769463,-211.937988,11.230541,0.000000,"Capture"};
+item13[] = {"",7,210,-260.177917,-222.741318,-252.177872,-214.741318,0.000000,""};
+link0[] = {0,3};
+link1[] = {2,1};
+link2[] = {3,4};
+link3[] = {4,2};
+link4[] = {4,6};
+link5[] = {4,7};
+link6[] = {5,8};
+link7[] = {5,9};
+link8[] = {6,11};
+link9[] = {7,5};
+link10[] = {8,12};
+link11[] = {9,11};
+link12[] = {10,3};
+link13[] = {11,10};
+link14[] = {12,13};
+link15[] = {13,3};
+globals[] = {0.000000,0,0,0,0,640,480,1,29,6316128,1,-374.429932,315.755920,137.483551,-318.334381,885,911,1};
+window[] = {2,-1,-1,-1,-1,802,50,1435,50,3,903};
+*//*%FSM</HEAD>*/
+class FSM
+{
+ fsmName = "updatecamp";
+ class States
+ {
+ /*%FSM<STATE "Init">*/
+ class Init
+ {
+ name = "Init";
+ init = /*%FSM<STATEINIT""">*/"_lastUpdate = -5;" \n
+ "" \n
+ "_camp = _this Select 0;" \n
+ "_town = _this Select 1;" \n
+ "_flag = _this Select 2;" \n
+ "" \n
+ "_delay = 3;" \n
+ "_timeToCapture = 0;" \n
+ "_townName = str _town;" \n
+ "_campName = Str _camp;" \n
+ "" \n
+ "_townSideID = _town getVariable ""sideID"";" \n
+ "_supply = _town getVariable ""supplyValue"";" \n
+ "_tcmode = 'WFBE_TOWNCONQUESTMODE' Call GetNamespace;" \n
+ "_lastSupply = _supply;" \n
+ "" \n
+ "_awaits = _delay;"/*%FSM</STATEINIT""">*/;
+ precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
+ class Links
+ {
+ /*%FSM<LINK "_">*/
+ class _
+ {
+ priority = 0.000000;
+ to="Camp_Core";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/"time - _lastUpdate > _awaits"/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ };
+ };
+ /*%FSM</STATE>*/
+ /*%FSM<STATE "End">*/
+ class End
+ {
+ name = "End";
+ init = /*%FSM<STATEINIT""">*/""/*%FSM</STATEINIT""">*/;
+ precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
+ class Links
+ {
+ };
+ };
+ /*%FSM</STATE>*/
+ /*%FSM<STATE "Camp_Core">*/
+ class Camp_Core
+ {
+ name = "Camp_Core";
+ init = /*%FSM<STATEINIT""">*/"_lastUpdate = time + random(0.2);" \n
+ "" \n
+ "_objects = _camp NearEntities[""Man"",5];" \n
+ "_livingUnits = _objects Call GetLiveUnits;" \n
+ "_west = West CountSide _livingUnits;" \n
+ "_east = East CountSide _livingUnits;" \n
+ "" \n
+ "_awaits = (_delay) Call GetSleepFPS;"/*%FSM</STATEINIT""">*/;
+ precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
+ class Links
+ {
+ /*%FSM<LINK "Empty">*/
+ class Empty
+ {
+ priority = 0.000000;
+ to="_";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/"_east == 0 && _west == 0 && !gameOver"/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ /*%FSM<LINK "Not_Empty">*/
+ class Not_Empty
+ {
+ priority = 0.000000;
+ to="Camp_Advanced";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/"(_east != 0 || _west != 0) && !gameOver"/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ /*%FSM<LINK "Gameover">*/
+ class Gameover
+ {
+ priority = 0.000000;
+ to="End";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/"gameOver"/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ };
+ };
+ /*%FSM</STATE>*/
+ /*%FSM<STATE "Camp_Advanced">*/
+ class Camp_Advanced
+ {
+ name = "Camp_Advanced";
+ init = /*%FSM<STATEINIT""">*/"_skip = false;" \n
+ "_capture = false;" \n
+ "" \n
+ "_sideID = _camp getVariable ""sideID"";" \n
+ "_supply = _town getVariable ""supplyValue"";" \n
+ "_timeToCapture = _camp getVariable ""supplyValue"";" \n
+ "_townSideID = _town getVariable ""sideID"";" \n
+ "" \n
+ "if (_tcmode > 0) then {" \n
+ " if (_west > 0 && !(_town getVariable ""wfbe_cancap_w"") && (_townSideID != WESTID)) then {_west = 0;_skip = true};" \n
+ " if (_east > 0 && !(_town getVariable ""wfbe_cancap_e"") && (_townSideID != EASTID)) then {_east = 0; _skip = true};" \n
+ "};" \n
+ "" \n
+ "_force = (_east + _west) * _delay;" \n
+ "if (_sideID == EASTID && _east > 0) then {_timeToCapture = _timeToCapture + _east};" \n
+ "if (_sideID == EASTID && _west > 0) then {_timeToCapture = _timeToCapture - _west};" \n
+ "if (_sideID == WESTID && _west > 0) then {_timeToCapture = _timeToCapture + _west};" \n
+ "if (_sideID == WESTID && _east > 0) then {_timeToCapture = _timeToCapture - _east};" \n
+ "if (_sideID != EASTID && _sideID != WESTID) then {_timeToCapture = _timeToCapture - _force};" \n
+ "if (_timeToCapture > _supply) then {_timeToCapture = _supply};" \n
+ "if (_timeToCapture <= 0) then {_skip = true;_capture = true};" \n
+ "if (!_skip) then {" \n
+ " if (_timeToCapture == _lastSupply && _force == 0 && _sideID == _townSideID) then {_timeToCapture = _supply};" \n
+ " _lastSupply = _supply;" \n
+ " if (_timeToCapture == (_camp getVariable ""supplyValue"")) then {_skip = true};" \n
+ " if (!_skip) then {_camp setVariable [""supplyValue"",_timeToCapture,true]};" \n
+ "};"/*%FSM</STATEINIT""">*/;
+ precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
+ class Links
+ {
+ /*%FSM<LINK "Skip">*/
+ class Skip
+ {
+ priority = 0.000000;
+ to="_";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/"!_capture"/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ /*%FSM<LINK "Capture">*/
+ class Capture
+ {
+ priority = 0.000000;
+ to="Capture";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/"_capture"/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ };
+ };
+ /*%FSM</STATE>*/
+ /*%FSM<STATE "_">*/
+ class _
+ {
+ name = "_";
+ init = /*%FSM<STATEINIT""">*/""/*%FSM</STATEINIT""">*/;
+ precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
+ class Links
+ {
+ /*%FSM<LINK "_">*/
+ class _
+ {
+ priority = 0.000000;
+ to="Camp_Core";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/"time - _lastUpdate > _awaits"/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ };
+ };
+ /*%FSM</STATE>*/
+ /*%FSM<STATE "Capture">*/
+ class Capture
+ {
+ name = "Capture";
+ init = /*%FSM<STATEINIT""">*/"_captureSideID = WESTID;" \n
+ "if (_sideID == WESTID || (_sideID == RESISTANCEID && _east > 0)) then {_captureSideID = EASTID};" \n
+ "_side = _sideID Call GetSideFromID;" \n
+ "if (_sideID == WESTID || _sideID == EASTID) then {[""LostAt"",""Strongpoint"",_side,_town] Spawn SideMessage};" \n
+ "_camp setVariable [""sideID"",_captureSideID,true];" \n
+ "WFBE_CampCaptured = [nil,'CLTFNCCAMPCAPTURED',[_town,_captureSideID,_camp]];" \n
+ "publicVariable 'WFBE_CampCaptured';" \n
+ "if (isHostedServer) then {[nil,'CLTFNCCAMPCAPTURED',[_town,_captureSideID,_camp]] Spawn HandlePVF};" \n
+ "_side = _captureSideID Call GetSideFromID;" \n
+ "if (_captureSideID != RESISTANCEID) then {[""CapturedNear"",""Strongpoint"",_side,_town] Spawn SideMessage};" \n
+ "_texture = Format[""WFBE_%1FLAG"",str _side] Call GetNamespace;" \n
+ "_flag setFlagTexture _texture;" \n
+ "if (_townSideID == _captureSideID) then {_timeToCapture = _supply};" \n
+ "if (_townSideID != _captureSideID) then {_timeToCapture = _town getVariable ""startingSupplyValue""};" \n
+ "_sideID = _captureSideID;" \n
+ "_camp setVariable [""supplyValue"",_timeToCapture,true];"/*%FSM</STATEINIT""">*/;
+ precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
+ class Links
+ {
+ /*%FSM<LINK "_">*/
+ class _
+ {
+ priority = 0.000000;
+ to="Camp_Core";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/"time - _lastUpdate > _awaits"/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ };
+ };
+ /*%FSM</STATE>*/
+ };
+ initState="Init";
+ finalStates[] =
+ {
+ "End"
+ };
+};
+/*%FSM</COMPILE>*/ \ No newline at end of file
diff --git a/Server/FSM/updateresources.fsm b/Server/FSM/updateresources.fsm
new file mode 100644
index 0000000..1cc127d
--- /dev/null
+++ b/Server/FSM/updateresources.fsm
@@ -0,0 +1,212 @@
+/*%FSM<COMPILE "F:\ArmA2\FSM Editor Personal Edition\scriptedFSM.cfg, updateresources">*/
+/*%FSM<HEAD>*/
+/*
+item0[] = {"Init",0,250,66.287125,-127.850632,156.287064,-77.850792,0.000000,"Init"};
+item1[] = {"Update_Resources",2,4346,-66.836029,-56.267544,23.163887,-6.267582,0.000000,"Update" \n "Resources"};
+item2[] = {"End",1,250,-218.006683,15.304325,-128.006653,65.304314,0.000000,"End"};
+item3[] = {"Loop",4,218,65.605347,-56.267605,155.605377,-6.267574,0.000000,"Loop"};
+item4[] = {"Gameover",4,218,-216.668854,-56.267559,-126.668869,-6.267574,0.000000,"Gameover"};
+link0[] = {0,3};
+link1[] = {1,3};
+link2[] = {1,4};
+link3[] = {3,1};
+link4[] = {4,2};
+globals[] = {0.000000,0,0,0,0,640,480,1,15,6316128,1,-288.082031,288.081207,332.960358,-262.037384,673,695,1};
+window[] = {0,-1,-1,-1,-1,855,87,1570,45,1,691};
+*//*%FSM</HEAD>*/
+class FSM
+{
+ fsmName = "updateresources";
+ class States
+ {
+ /*%FSM<STATE "Init">*/
+ class Init
+ {
+ name = "Init";
+ init = /*%FSM<STATEINIT""">*/"_lastUpdate = time;" \n
+ "_is = 'WFBE_INCOMESYSTEM' Call GetNamespace;" \n
+ "_ii = 'WFBE_INCOMEINTERVAL' Call GetNamespace;" \n
+ "_allies = 'WFBE_ALLIES' Call GetNamespace;" \n
+ "" \n
+ "_wTeams = ('WFBE_WESTTEAMS' Call GetNamespace);" \n
+ "_eTeams = ('WFBE_EASTTEAMS' Call GetNamespace);" \n
+ "_awaits = _ii;" \n
+ "" \n
+ "_incomeCoef = 0;" \n
+ "_divisor = 0;" \n
+ "_com_income_w = 0;" \n
+ "_com_income_e = 0;" \n
+ "_ply_income_w = 0;" \n
+ "_ply_income_e = 0;" \n
+ "if (_is == 3) then {_incomeCoef = 'WFBE_INC_COEFFICIENT' Call GetNamespace;_divisor = 'WFBE_INC_DIVIDE_COM' Call GetNamespace;};"/*%FSM</STATEINIT""">*/;
+ precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
+ class Links
+ {
+ /*%FSM<LINK "Loop">*/
+ class Loop
+ {
+ priority = 0.000000;
+ to="Update_Resources";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/"time - _lastUpdate > _awaits && !gameOver"/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ };
+ };
+ /*%FSM</STATE>*/
+ /*%FSM<STATE "Update_Resources">*/
+ class Update_Resources
+ {
+ name = "Update_Resources";
+ init = /*%FSM<STATEINIT""">*/"_eastIncome = 0;" \n
+ "_westIncome = 0;" \n
+ "_eastSupply = 0;" \n
+ "_westSupply = 0;" \n
+ "" \n
+ "//--- Income Getter." \n
+ "{" \n
+ " _side = (_x getVariable ""sideID"") Call GetSideFromID;" \n
+ " if (_side == East) then {" \n
+ " switch (_is) do {" \n
+ " case 3: {_eastIncome = _eastIncome + ((_x getVariable ""supplyValue"")*_incomeCoef)};" \n
+ " default {_eastIncome = _eastIncome + (_x getVariable ""supplyValue"")};" \n
+ " };" \n
+ " _eastSupply = _eastSupply + (_x getVariable ""supplyValue"");" \n
+ " };" \n
+ " if (_side == West) then {" \n
+ " switch (_is) do {" \n
+ " case 3: {_westIncome = _westIncome + ((_x getVariable ""supplyValue"")*_incomeCoef)};" \n
+ " default {_westIncome = _westIncome + (_x getVariable ""supplyValue"")};" \n
+ " };" \n
+ " _westSupply = _westSupply + (_x getVariable ""supplyValue"");" \n
+ " };" \n
+ "} forEach towns;" \n
+ "" \n
+ "//--- Half Income." \n
+ "if (_is == 2) then {" \n
+ " _eastIncome = round(_eastIncome / 2);" \n
+ " _westIncome = round(_westIncome / 2);" \n
+ "};" \n
+ "" \n
+ "//--- Commander System" \n
+ "switch (_is) do {" \n
+ " case 3: {" \n
+ " _ply_income_w = round(_westIncome * (((100 - WestCommanderPercent)/100)/maxPlayers));" \n
+ " _ply_income_e = round(_eastIncome * (((100 - EastCommanderPercent)/100)/maxPlayers));" \n
+ " _com_income_w = round((_westIncome * (WestCommanderPercent/100)) / _divisor)+_ply_income_w;" \n
+ " _com_income_e = round((_eastIncome * (EastCommanderPercent/100)) / _divisor)+_ply_income_e;" \n
+ " };" \n
+ " case 4: {" \n
+ " _ply_income_w = round(_westIncome * (100 - WestCommanderPercent)/100);" \n
+ " _ply_income_e = round(_eastIncome * (100 - EastCommanderPercent)/100);" \n
+ " _com_income_w = round((_westIncome - _ply_income_w)*maxPlayers) + _ply_income_w;" \n
+ " _com_income_e = round((_eastIncome - _ply_income_e)*maxPlayers) + _ply_income_e;" \n
+ " };" \n
+ "};" \n
+ "" \n
+ "//---- East Income, only updates if necessary." \n
+ "if (_eastIncome > 0) then {" \n
+ " if !(paramMoneyOnly) then {[east, _eastSupply] Call ChangeSideSupply};" \n
+ " " \n
+ " _comTeam = (east) Call GetCommanderTeam;" \n
+ " if (isNull _comTeam) then {_comTeam = grpNull};" \n
+ "" \n
+ " {" \n
+ " if !(isNil '_x') then {" \n
+ " //--- AI." \n
+ " _income = 0;" \n
+ " switch (_is) do {" \n
+ " case 3: {_income = if (_comTeam != _x) then {_ply_income_e} else {_com_income_e}};" \n
+ " case 4: {_income = if (_comTeam != _x) then {_ply_income_e} else {_com_income_e}};" \n
+ " default {if !(isPlayer (leader _x)) then {_income = _eastIncome}};" \n
+ " };" \n
+ " " \n
+ " if (_income != 0) then {[_x,_income] Call ChangeTeamFunds};" \n
+ " };" \n
+ " } forEach _eTeams;" \n
+ "" \n
+ " if (isNull((east) Call GetCommanderTeam) && paramAIcom) then {" \n
+ " [east, _eastIncome] Call ChangeAICommanderFunds;" \n
+ " };" \n
+ "};" \n
+ "" \n
+ "//---- West Income, only updates if necessary." \n
+ "if (_westIncome > 0) then {" \n
+ " if !(paramMoneyOnly) then {[west, _westSupply] Call ChangeSideSupply};" \n
+ " " \n
+ " _comTeam = (west) Call GetCommanderTeam;" \n
+ " if (isNull _comTeam) then {_comTeam = grpNull};" \n
+ "" \n
+ " {" \n
+ " if !(isNil '_x') then {" \n
+ " //--- AI." \n
+ " _income = 0;" \n
+ " switch (_is) do {" \n
+ " case 3: {_income = if (_comTeam != _x) then {_ply_income_w} else {_com_income_w}};" \n
+ " case 4: {_income = if (_comTeam != _x) then {_ply_income_w} else {_com_income_w}};" \n
+ " default {if !(isPlayer (leader _x)) then {_income = _westIncome}};" \n
+ " };" \n
+ " " \n
+ " if (_income != 0) then {[_x,_income] Call ChangeTeamFunds};" \n
+ " };" \n
+ " } forEach _wTeams;" \n
+ "" \n
+ " if (isNull((west) Call GetCommanderTeam) && paramAIcom) then {" \n
+ " [west, _westIncome] Call ChangeAICommanderFunds;" \n
+ " };" \n
+ "};" \n
+ "" \n
+ "//--- Allies." \n
+ "if (_allies > 0) then {" \n
+ " westAlliesFunds = westAlliesFunds + _westIncome;" \n
+ " eastAlliesFunds = eastAlliesFunds + _eastIncome;" \n
+ "};" \n
+ "" \n
+ "_awaits = (_ii) Call GetSleepFPS;" \n
+ "_lastUpdate = time;"/*%FSM</STATEINIT""">*/;
+ precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
+ class Links
+ {
+ /*%FSM<LINK "Gameover">*/
+ class Gameover
+ {
+ priority = 0.000000;
+ to="End";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/"gameOver"/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ /*%FSM<LINK "Loop">*/
+ class Loop
+ {
+ priority = 0.000000;
+ to="Update_Resources";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/"time - _lastUpdate > _awaits && !gameOver"/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ };
+ };
+ /*%FSM</STATE>*/
+ /*%FSM<STATE "End">*/
+ class End
+ {
+ name = "End";
+ init = /*%FSM<STATEINIT""">*/""/*%FSM</STATEINIT""">*/;
+ precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
+ class Links
+ {
+ };
+ };
+ /*%FSM</STATE>*/
+ };
+ initState="Init";
+ finalStates[] =
+ {
+ "End"
+ };
+};
+/*%FSM</COMPILE>*/ \ No newline at end of file
diff --git a/Server/FSM/updateserver.fsm b/Server/FSM/updateserver.fsm
new file mode 100644
index 0000000..1a7cd75
--- /dev/null
+++ b/Server/FSM/updateserver.fsm
@@ -0,0 +1,424 @@
+/*%FSM<COMPILE "D:\ArmA2\FSM Editor Personal Edition\scriptedFSM.cfg, updateserver">*/
+/*%FSM<HEAD>*/
+/*
+item0[] = {"Init",0,250,68.844200,-235.317032,158.844086,-185.317093,0.000000,"Init"};
+item1[] = {"Loop",4,218,69.950378,-54.529591,159.950424,-4.529562,0.000000,"Loop"};
+item2[] = {"End",1,250,71.371758,179.546143,161.371826,229.546112,0.000000,"End"};
+item3[] = {"Loop",4,218,-30.854136,-55.398598,59.145935,-5.398569,0.000000,"Loop"};
+item4[] = {"Gameover",4,218,71.840584,101.891243,161.840546,151.891220,0.000000,"Gameover"};
+item5[] = {"_",8,218,96.687485,-169.297226,128.493500,-146.721985,0.000000,""};
+item6[] = {"Wait",2,250,67.782181,-122.639091,157.782181,-72.639091,0.000000,"Wait"};
+item7[] = {"Annihilation",2,250,-30.415300,33.022167,59.584702,83.022156,0.000000,"Annihilation"};
+item8[] = {"Assassination",2,250,70.389214,33.891174,160.389175,83.891144,0.000000,"Assassination"};
+item9[] = {"Loop",4,218,171.623901,-54.529591,261.623230,-4.529560,0.000000,"Loop"};
+item10[] = {"Supremacy",2,250,172.062729,33.891171,262.062012,83.891174,0.000000,"Supremacy"};
+item11[] = {"_",2,250,-61.980644,102.236549,28.019346,152.236542,0.000000,""};
+item12[] = {"_",4,218,-61.980686,179.758133,28.019318,229.758133,0.000000,""};
+item13[] = {"Town",2,250,275.342438,33.587734,365.342438,83.587723,0.000000,"Town"};
+item14[] = {"Loop",4,4314,275.618805,-53.185108,365.618805,-3.185127,0.000000,"Loop"};
+link0[] = {0,5};
+link1[] = {1,8};
+link2[] = {3,7};
+link3[] = {4,11};
+link4[] = {5,6};
+link5[] = {6,1};
+link6[] = {6,3};
+link7[] = {6,9};
+link8[] = {6,14};
+link9[] = {7,3};
+link10[] = {7,4};
+link11[] = {8,1};
+link12[] = {8,4};
+link13[] = {9,10};
+link14[] = {10,4};
+link15[] = {10,9};
+link16[] = {11,12};
+link17[] = {12,2};
+link18[] = {13,4};
+link19[] = {13,14};
+link20[] = {14,13};
+globals[] = {0.000000,0,0,0,0,640,480,1,24,6316128,1,-124.082573,468.916992,194.838867,-216.614029,595,514,1};
+window[] = {0,-1,-1,-1,-1,834,200,1460,200,1,613};
+*//*%FSM</HEAD>*/
+class FSM
+{
+ fsmName = "updateserver";
+ class States
+ {
+ /*%FSM<STATE "Init">*/
+ class Init
+ {
+ name = "Init";
+ init = /*%FSM<STATEINIT""">*/"_lastUpdate = time;" \n
+ "_winTime = time;" \n
+ "" \n
+ "_vc = 'WFBE_VICTORYCONDITION' Call GetNamespace;"/*%FSM</STATEINIT""">*/;
+ precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
+ class Links
+ {
+ /*%FSM<LINK "_">*/
+ class _
+ {
+ priority = 0.000000;
+ to="Wait";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/""/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ };
+ };
+ /*%FSM</STATE>*/
+ /*%FSM<STATE "End">*/
+ class End
+ {
+ name = "End";
+ init = /*%FSM<STATEINIT""">*/"diag_log Format[""[WFBE (OUTRO)][frameno:%1 | ticktime:%2] updateserver.fsm: Mission end - [Done]"",diag_frameno,diag_tickTime];" \n
+ "failMission ""END1"";"/*%FSM</STATEINIT""">*/;
+ precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
+ class Links
+ {
+ };
+ };
+ /*%FSM</STATE>*/
+ /*%FSM<STATE "Wait">*/
+ class Wait
+ {
+ name = "Wait";
+ init = /*%FSM<STATEINIT""">*/"_total = totalTowns;" \n
+ "_westTowns = 0;" \n
+ "_eastTowns = 0;" \n
+ "{_sideID = _x getVariable ""sideID"";if (_sideID == WESTID) then {_westTowns = _westTowns + 1};if (_sideID == EASTID) then {_eastTowns = _eastTowns + 1}} ForEach towns;" \n
+ ""/*%FSM</STATEINIT""">*/;
+ precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
+ class Links
+ {
+ /*%FSM<LINK "Loop">*/
+ class Loop
+ {
+ priority = 0.000000;
+ to="Annihilation";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/"time - _lastUpdate > 20 && !gameOver && _vc == 0"/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ /*%FSM<LINK "Loop_1">*/
+ class Loop_1
+ {
+ priority = 0.000000;
+ to="Supremacy";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/"time - _lastUpdate > 20 && !gameOver && _vc == 2"/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ /*%FSM<LINK "Loop_2">*/
+ class Loop_2
+ {
+ priority = 0.000000;
+ to="Town";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/"time - _lastUpdate > 20 && !gameOver && _vc == 3"/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ /*%FSM<LINK "Loop_3">*/
+ class Loop_3
+ {
+ priority = 0.000000;
+ to="Assassination";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/"time - _lastUpdate > 20 && !gameOver && _vc == 1"/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ };
+ };
+ /*%FSM</STATE>*/
+ /*%FSM<STATE "Annihilation">*/
+ class Annihilation
+ {
+ name = "Annihilation";
+ init = /*%FSM<STATEINIT""">*/"_westMHQ = WestMHQ;" \n
+ "_eastMHQ = EastMHQ;" \n
+ "_westBuildings = WestBaseStructures;" \n
+ "_eastBuildings = EastBaseStructures;" \n
+ "" \n
+ "_westMHQAlive = true;" \n
+ "_eastMHQAlive = true;" \n
+ "if (isNull _westMHQ || getDammage _westMHQ >= 1) then {_westMHQAlive = false};" \n
+ "if (isNull _eastMHQ || getDammage _eastMHQ >= 1) then {_eastMHQAlive = false};" \n
+ "" \n
+ "//--- East Win." \n
+ "if ((count _westBuildings == 0)&&(!_westMHQAlive) && !gameOver) then {" \n
+ " WFBE_EndGame = [nil,'CLTFNCENDGAME',[EASTID,_eastBuildings]];" \n
+ " publicVariable 'WFBE_EndGame';" \n
+ " if (isHostedServer) then {[nil,'CLTFNCENDGAME',[EASTID,_eastBuildings]] Spawn HandlePVF};" \n
+ " WF_Logic setVariable [""WF_Winner"",east];" \n
+ " gameOver = true;" \n
+ " _winTime = time;" \n
+ "};" \n
+ "" \n
+ "//--- West Win." \n
+ "if ((count _eastBuildings == 0)&&(!_eastMHQAlive) && !gameOver) then {" \n
+ " WFBE_EndGame = [nil,'CLTFNCENDGAME',[WESTID,_westBuildings]];" \n
+ " publicVariable 'WFBE_EndGame';" \n
+ " if (isHostedServer) then {[nil,'CLTFNCENDGAME',[WESTID,_westBuildings]] Spawn HandlePVF};" \n
+ " WF_Logic setVariable [""WF_Winner"",west];" \n
+ " gameOver = true;" \n
+ " _winTime = time;" \n
+ "};" \n
+ "" \n
+ "_lastUpdate = time;"/*%FSM</STATEINIT""">*/;
+ precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
+ class Links
+ {
+ /*%FSM<LINK "Gameover">*/
+ class Gameover
+ {
+ priority = 0.000000;
+ to="_";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/"gameOver"/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ /*%FSM<LINK "Loop">*/
+ class Loop
+ {
+ priority = 0.000000;
+ to="Annihilation";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/"time - _lastUpdate > 20 && !gameOver && _vc == 0"/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ };
+ };
+ /*%FSM</STATE>*/
+ /*%FSM<STATE "Assassination">*/
+ class Assassination
+ {
+ name = "Assassination";
+ init = /*%FSM<STATEINIT""">*/"_westMHQ = WestMHQ;" \n
+ "_eastMHQ = EastMHQ;" \n
+ "_westBuildings = WestBaseStructures;" \n
+ "_eastBuildings = EastBaseStructures;" \n
+ "" \n
+ "_westMHQAlive = true;" \n
+ "_eastMHQAlive = true;" \n
+ "if (isNull _westMHQ || getDammage _westMHQ >= 1) then {_westMHQAlive = false};" \n
+ "if (isNull _eastMHQ || getDammage _eastMHQ >= 1) then {_eastMHQAlive = false};" \n
+ "" \n
+ "_westTowns = 0;" \n
+ "_eastTowns = 0;" \n
+ "{_sideID = _x getVariable ""sideID"";if (_sideID == WESTID) then {_westTowns = _westTowns + 1};if (_sideID == EASTID) then {_eastTowns = _eastTowns + 1}} ForEach towns;" \n
+ "" \n
+ "//--- East Win." \n
+ "if (!_westMHQAlive || (_eastTowns == _total) && !gameOver) then {" \n
+ " WFBE_EndGame = [nil,'CLTFNCENDGAME',[EASTID,_eastBuildings]];" \n
+ " publicVariable 'WFBE_EndGame';" \n
+ " if (isHostedServer) then {[nil,'CLTFNCENDGAME',[EASTID,_eastBuildings]] Spawn HandlePVF};" \n
+ " WF_Logic setVariable [""WF_Winner"",east];" \n
+ " gameOver = true;" \n
+ " _winTime = time;" \n
+ "};" \n
+ "" \n
+ "//--- West Win." \n
+ "if (!_eastMHQAlive || (_westTowns == _total) && !gameOver) then {" \n
+ " WFBE_EndGame = [nil,'CLTFNCENDGAME',[WESTID,_westBuildings]];" \n
+ " publicVariable 'WFBE_EndGame';" \n
+ " if (isHostedServer) then {[nil,'CLTFNCENDGAME',[WESTID,_westBuildings]] Spawn HandlePVF};" \n
+ " WF_Logic setVariable [""WF_Winner"",west];" \n
+ " gameOver = true;" \n
+ " _winTime = time;" \n
+ "};" \n
+ "" \n
+ "_lastUpdate = time;"/*%FSM</STATEINIT""">*/;
+ precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
+ class Links
+ {
+ /*%FSM<LINK "Gameover">*/
+ class Gameover
+ {
+ priority = 0.000000;
+ to="_";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/"gameOver"/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ /*%FSM<LINK "Loop">*/
+ class Loop
+ {
+ priority = 0.000000;
+ to="Assassination";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/"time - _lastUpdate > 20 && !gameOver && _vc == 1"/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ };
+ };
+ /*%FSM</STATE>*/
+ /*%FSM<STATE "Supremacy">*/
+ class Supremacy
+ {
+ name = "Supremacy";
+ init = /*%FSM<STATEINIT""">*/"_westMHQ = WestMHQ;" \n
+ "_eastMHQ = EastMHQ;" \n
+ "_westBuildings = WestBaseStructures;" \n
+ "_eastBuildings = EastBaseStructures;" \n
+ "" \n
+ "_westMHQAlive = true;" \n
+ "_eastMHQAlive = true;" \n
+ "if (isNull _westMHQ || getDammage _westMHQ >= 1) then {_westMHQAlive = false};" \n
+ "if (isNull _eastMHQ || getDammage _eastMHQ >= 1) then {_eastMHQAlive = false};" \n
+ "" \n
+ "_westTowns = 0;" \n
+ "_eastTowns = 0;" \n
+ "{_sideID = _x getVariable ""sideID"";if (_sideID == WESTID) then {_westTowns = _westTowns + 1};if (_sideID == EASTID) then {_eastTowns = _eastTowns + 1}} ForEach towns;" \n
+ "" \n
+ "_westFactories = 0;" \n
+ "_eastFactories = 0;" \n
+ "{" \n
+ " _tmp = count([west,Format [""WFBE_WEST%1TYPE"",_x] Call GetNamespace,_westBuildings] Call GetFactories);" \n
+ " _westFactories = _westFactories + _tmp;" \n
+ " _tmp = count([east,Format [""WFBE_EAST%1TYPE"",_x] Call GetNamespace,_eastBuildings] Call GetFactories);" \n
+ " _eastFactories = _eastFactories + _tmp;" \n
+ "} forEach [""BARRACKS"",""LIGHT"",""HEAVY"",""AIRCRAFT""];" \n
+ "" \n
+ "//--- East Win." \n
+ "if (!_westMHQAlive && _westFactories == 0 || (_eastTowns == _total) && !gameOver) then {" \n
+ " WFBE_EndGame = [nil,'CLTFNCENDGAME',[EASTID,_eastBuildings]];" \n
+ " publicVariable 'WFBE_EndGame';" \n
+ " if (isHostedServer) then {[nil,'CLTFNCENDGAME',[EASTID,_eastBuildings]] Spawn HandlePVF};" \n
+ " WF_Logic setVariable [""WF_Winner"",east];" \n
+ " gameOver = true;" \n
+ " _winTime = time;" \n
+ "};" \n
+ "" \n
+ "//--- West Win." \n
+ "if (!_eastMHQAlive && _eastFactories == 0 || (_westTowns == _total) && !gameOver) then {" \n
+ " WFBE_EndGame = [nil,'CLTFNCENDGAME',[WESTID,_westBuildings]];" \n
+ " publicVariable 'WFBE_EndGame';" \n
+ " if (isHostedServer) then {[nil,'CLTFNCENDGAME',[WESTID,_westBuildings]] Spawn HandlePVF};" \n
+ " WF_Logic setVariable [""WF_Winner"",west];" \n
+ " gameOver = true;" \n
+ " _winTime = time;" \n
+ "};" \n
+ "" \n
+ "_lastUpdate = time;"/*%FSM</STATEINIT""">*/;
+ precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
+ class Links
+ {
+ /*%FSM<LINK "Loop">*/
+ class Loop
+ {
+ priority = 0.000000;
+ to="Supremacy";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/"time - _lastUpdate > 20 && !gameOver && _vc == 2"/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ /*%FSM<LINK "Gameover">*/
+ class Gameover
+ {
+ priority = 0.000000;
+ to="_";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/"gameOver"/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ };
+ };
+ /*%FSM</STATE>*/
+ /*%FSM<STATE "_">*/
+ class _
+ {
+ name = "_";
+ init = /*%FSM<STATEINIT""">*/""/*%FSM</STATEINIT""">*/;
+ precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
+ class Links
+ {
+ /*%FSM<LINK "_">*/
+ class _
+ {
+ priority = 0.000000;
+ to="End";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/"time - _winTime > 20"/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ };
+ };
+ /*%FSM</STATE>*/
+ /*%FSM<STATE "Town">*/
+ class Town
+ {
+ name = "Town";
+ init = /*%FSM<STATEINIT""">*/"_westTowns = 0;" \n
+ "_eastTowns = 0;" \n
+ "{_sideID = _x getVariable ""sideID"";if (_sideID == WESTID) then {_westTowns = _westTowns + 1};if (_sideID == EASTID) then {_eastTowns = _eastTowns + 1}} ForEach towns;" \n
+ "" \n
+ "//--- East Win." \n
+ "if (_eastTowns == _total && !gameOver) then {" \n
+ " _eastBuildings = EastBaseStructures;" \n
+ " WFBE_EndGame = [nil,'CLTFNCENDGAME',[EASTID,_eastBuildings]];" \n
+ " publicVariable 'WFBE_EndGame';" \n
+ " if (isHostedServer) then {[nil,'CLTFNCENDGAME',[EASTID,_eastBuildings]] Spawn HandlePVF};" \n
+ " WF_Logic setVariable [""WF_Winner"",east];" \n
+ " gameOver = true;" \n
+ " _winTime = time;" \n
+ "};" \n
+ "" \n
+ "//--- West Win." \n
+ "if (_westTowns == _total && !gameOver) then {" \n
+ " _westBuildings = WestBaseStructures;" \n
+ " WFBE_EndGame = [nil,'CLTFNCENDGAME',[WESTID,_westBuildings]];" \n
+ " publicVariable 'WFBE_EndGame';" \n
+ " if (isHostedServer) then {[nil,'CLTFNCENDGAME',[WESTID,_westBuildings]] Spawn HandlePVF};" \n
+ " WF_Logic setVariable [""WF_Winner"",west];" \n
+ " gameOver = true;" \n
+ " _winTime = time;" \n
+ "};" \n
+ "" \n
+ "_lastUpdate = time;"/*%FSM</STATEINIT""">*/;
+ precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
+ class Links
+ {
+ /*%FSM<LINK "Loop">*/
+ class Loop
+ {
+ priority = 0.000000;
+ to="Town";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/"time - _lastUpdate > 20 && !gameOver && _vc == 3"/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ /*%FSM<LINK "Gameover">*/
+ class Gameover
+ {
+ priority = 0.000000;
+ to="_";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/"gameOver"/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ };
+ };
+ /*%FSM</STATE>*/
+ };
+ initState="Init";
+ finalStates[] =
+ {
+ "End"
+ };
+};
+/*%FSM</COMPILE>*/
diff --git a/Server/FSM/updatetown.fsm b/Server/FSM/updatetown.fsm
new file mode 100644
index 0000000..d494788
--- /dev/null
+++ b/Server/FSM/updatetown.fsm
@@ -0,0 +1,595 @@
+/*%FSM<COMPILE "E:\Bohemia Interactive\ArmA 2\FSM Editor Personal Edition\scriptedFSM.cfg, updatetown">*/
+/*%FSM<HEAD>*/
+/*
+item0[] = {"Init",0,250,-63.537106,-304.001923,26.462904,-254.002228,0.000000,"Init"};
+item1[] = {"End",1,250,-182.368073,-113.480629,-92.368042,-63.480659,0.000000,"End"};
+item2[] = {"Gameover",4,218,-182.650177,-187.482422,-92.650192,-137.482452,0.000000,"Gameover"};
+item3[] = {"_",8,218,-34.448154,-230.434799,-2.642141,-207.859543,0.000000,""};
+item4[] = {"Town_Core",2,250,-63.405182,-187.376434,26.594841,-137.376434,0.000000,"Town Core"};
+item5[] = {"Time_Supply",4,218,53.706718,-187.309784,143.706726,-137.309799,0.000000,"Time" \n "Supply"};
+item6[] = {"Empty",4,218,-182.574295,-36.908699,-92.574234,13.091309,0.000000,"Empty"};
+item7[] = {"Not_Empty",4,218,-64.729942,42.105545,25.270105,92.105507,0.000000,"Not Empty"};
+item8[] = {"Normal_Supply",4,218,-63.477135,-114.415787,26.522726,-64.415848,0.000000,"Normal" \n "Supply"};
+item9[] = {"Check",2,250,-64.187141,-36.072510,25.812870,13.927521,0.000000,"Check"};
+item10[] = {"Time_Supply",2,250,54.842167,-111.734596,144.842194,-61.734596,0.000000,"Time Supply"};
+item11[] = {"_",8,218,84.156120,-22.145014,115.962143,0.430260,0.000000,""};
+item12[] = {"_",2,250,-300.613251,-37.831039,-210.613235,12.168960,0.000000,""};
+item13[] = {"",7,210,-260.014130,-223.295425,-252.014069,-215.295425,0.000000,""};
+item14[] = {"Town_Advanced",2,4346,-67.838142,416.225128,22.161905,466.225098,0.000000,"Town Advanced"};
+item15[] = {"Captured",4,218,48.796371,416.225128,138.796494,466.225098,0.000000,"Captured"};
+item16[] = {"Skip",4,218,-302.480042,416.225128,-212.479980,466.225159,0.000000,"Skip"};
+item17[] = {"Captured",2,250,169.032181,416.024658,259.032227,466.024719,0.000000,"Captured"};
+item18[] = {"",7,210,210.899033,-223.047119,218.899048,-215.047119,0.000000,""};
+item19[] = {"Pick_Capture_Mod",2,250,-64.359787,111.495216,25.640230,161.495224,0.000000,"Pick Capture" \n "Mode"};
+item20[] = {"Threshold",4,218,-66.673355,182.056427,23.326881,232.056427,0.000000,"Threshold"};
+item21[] = {"Classic",4,218,-182.347382,110.338463,-92.347397,160.338455,0.000000,"Classic"};
+item22[] = {"Set_Classic",2,250,-182.257019,253.936035,-92.256966,303.936127,0.000000,"Set Classic"};
+item23[] = {"Set_Threshold",2,250,-66.763634,253.774261,23.236481,303.774231,0.000000,"Set Threshold"};
+item24[] = {"_",8,218,-37.573990,342.842560,-4.796462,363.201202,0.000000,""};
+item25[] = {"All_Camps",4,218,58.254791,111.494164,148.254791,161.494156,0.000000,"All Camps"};
+item26[] = {"Set_All_Camps",2,250,58.345169,254.115845,148.345154,304.115936,0.000000,"Set All Camps"};
+link0[] = {0,3};
+link1[] = {2,1};
+link2[] = {3,4};
+link3[] = {4,2};
+link4[] = {4,5};
+link5[] = {4,8};
+link6[] = {5,10};
+link7[] = {6,12};
+link8[] = {7,19};
+link9[] = {8,9};
+link10[] = {9,6};
+link11[] = {9,7};
+link12[] = {10,11};
+link13[] = {11,9};
+link14[] = {12,13};
+link15[] = {13,3};
+link16[] = {14,15};
+link17[] = {14,16};
+link18[] = {15,17};
+link19[] = {16,12};
+link20[] = {17,18};
+link21[] = {18,3};
+link22[] = {19,20};
+link23[] = {19,21};
+link24[] = {19,25};
+link25[] = {20,23};
+link26[] = {21,22};
+link27[] = {22,24};
+link28[] = {23,24};
+link29[] = {24,14};
+link30[] = {25,26};
+link31[] = {26,24};
+globals[] = {0.000000,0,0,0,0,640,480,1,62,6316128,1,-329.233032,316.761841,541.239014,-274.360809,518,624,1};
+window[] = {0,-1,-1,-1,-1,944,175,1435,175,1,536};
+*//*%FSM</HEAD>*/
+class FSM
+{
+ fsmName = "updatetown";
+ class States
+ {
+ /*%FSM<STATE "Init">*/
+ class Init
+ {
+ name = "Init";
+ init = /*%FSM<STATEINIT""">*/"_lastUpdate = -10;" \n
+ "" \n
+ "_location = _this select 0;" \n
+ "_detectionRange = _this select 1;" \n
+ "_name = Str _location;" \n
+ "" \n
+ "_startingSupplyValue = _location getVariable ""startingSupplyValue"";" \n
+ "_maxSupplyValue = _location getVariable ""maxSupplyValue"";" \n
+ "_timeAttacked = time - 60;" \n
+ "_activeEnemies = 0;" \n
+ "_force = 0;" \n
+ "_lastUp = 0;" \n
+ "_mccr = 'WFBE_MAXCAMPCAPTURERATE' Call GetNamespace;" \n
+ "_ss = 'WFBE_SUPPLYSYSTEM' Call GetNamespace;" \n
+ "_ssi = 'WFBE_SUPPLYSYSTEMINCREASETIME' Call GetNamespace;" \n
+ "_tcr = 'WFBE_TOWNCAPTURERANGE' Call GetNamespace;" \n
+ "_tcrate = 'WFBE_TOWNCAPTURERATE' Call GetNamespace;" \n
+ "_tcmode = 'WFBE_TOWNCONQUESTMODE' Call GetNamespace;" \n
+ "" \n
+ "_delay = 5;" \n
+ "_awaits = _delay;" \n
+ "" \n
+ "_tcm = 'WFBE_TOWNCAPTUREMODE' Call GetNamespace;" \n
+ "if (_tcm == 1) then {_tcr = 'WFBE_TOWNCAPTURERANGETHRESHOLD' Call GetNamespace };//--- Threshold Mode." \n
+ "" \n
+ "_timeSupply = if (_ss == 1) then {true} else {false};" \n
+ "" \n
+ "_defenses = _location NearEntities['WFBE_RESISTANCEDEFENSENAMES' Call GetNamespace,_detectionRange];"/*%FSM</STATEINIT""">*/;
+ precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
+ class Links
+ {
+ /*%FSM<LINK "_">*/
+ class _
+ {
+ priority = 0.000000;
+ to="Town_Core";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/"time - _lastUpdate > _awaits"/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ };
+ };
+ /*%FSM</STATE>*/
+ /*%FSM<STATE "End">*/
+ class End
+ {
+ name = "End";
+ init = /*%FSM<STATEINIT""">*/""/*%FSM</STATEINIT""">*/;
+ precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
+ class Links
+ {
+ };
+ };
+ /*%FSM</STATE>*/
+ /*%FSM<STATE "Town_Core">*/
+ class Town_Core
+ {
+ name = "Town_Core";
+ init = /*%FSM<STATEINIT""">*/"_lastUpdate = time + random (0.2);" \n
+ "" \n
+ "_sideID = _location getVariable ""sideID"";" \n
+ "_objects = _location nearEntities[[eastSoldierBaseClass,westSoldierBaseClass,resistanceSoldierBaseClass,""Car"",""Motorcycle"",""Tank"",""Air""],_tcr];" \n
+ "" \n
+ "_awaits = (_delay) Call GetSleepFPS;"/*%FSM</STATEINIT""">*/;
+ precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
+ class Links
+ {
+ /*%FSM<LINK "Time_Supply">*/
+ class Time_Supply
+ {
+ priority = 0.000000;
+ to="Time_Supply";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/"_timeSupply && !gameOver"/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ /*%FSM<LINK "Normal_Supply">*/
+ class Normal_Supply
+ {
+ priority = 0.000000;
+ to="Check";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/"!_timeSupply && !gameOver"/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ /*%FSM<LINK "Gameover">*/
+ class Gameover
+ {
+ priority = 0.000000;
+ to="End";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/"gameOver"/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ };
+ };
+ /*%FSM</STATE>*/
+ /*%FSM<STATE "Check">*/
+ class Check
+ {
+ name = "Check";
+ init = /*%FSM<STATEINIT""">*/""/*%FSM</STATEINIT""">*/;
+ precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
+ class Links
+ {
+ /*%FSM<LINK "Not_Empty">*/
+ class Not_Empty
+ {
+ priority = 0.000000;
+ to="Pick_Capture_Mod";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/"count _objects > 0"/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ /*%FSM<LINK "Empty">*/
+ class Empty
+ {
+ priority = 0.000000;
+ to="_";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/"count _objects == 0"/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ };
+ };
+ /*%FSM</STATE>*/
+ /*%FSM<STATE "Time_Supply">*/
+ class Time_Supply
+ {
+ name = "Time_Supply";
+ init = /*%FSM<STATEINIT""">*/"_objects = _location NearEntities[[eastSoldierBaseClass,westSoldierBaseClass,resistanceSoldierBaseClass,""Car"",""Motorcycle"",""Tank"",""Air""],(_tcr*2)];" \n
+ "_objects = (_objects Call GetLiveUnits) unitsBelowHeight 200;" \n
+ "_side = _sideID Call GetSideFromID;" \n
+ "_activeEnemies = (East countSide _objects) + (Resistance countSide _objects);" \n
+ "if (_side == East) then {_activeEnemies = (West countSide _objects) + (Resistance countSide _objects)};" \n
+ "if (_sideID != RESISTANCEID && _activeEnemies == 0) then {" \n
+ " _lastUp = _lastUp + 5;" \n
+ " if (_lastUp >= _ssi) then {" \n
+ " _lastUp = 0;" \n
+ " _upgrades = (str _side) Call GetSideUpgrades;" \n
+ " _increaseOf = (Format[""WFBE_SUPPLYSYSTEMINCREASE%1"",_upgrades select 6] Call GetNamespace);" \n
+ " _supplyValue = _location getVariable ""supplyValue"";" \n
+ " _supplyValue = _supplyValue + _increaseOf;" \n
+ " if (_supplyValue > _maxSupplyValue) then {_supplyValue = _maxSupplyValue};" \n
+ " _location setVariable [""supplyValue"",_supplyValue,true];" \n
+ " };" \n
+ "};"/*%FSM</STATEINIT""">*/;
+ precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
+ class Links
+ {
+ /*%FSM<LINK "_">*/
+ class _
+ {
+ priority = 0.000000;
+ to="Check";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/""/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ };
+ };
+ /*%FSM</STATE>*/
+ /*%FSM<STATE "_">*/
+ class _
+ {
+ name = "_";
+ init = /*%FSM<STATEINIT""">*/""/*%FSM</STATEINIT""">*/;
+ precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
+ class Links
+ {
+ /*%FSM<LINK "_">*/
+ class _
+ {
+ priority = 0.000000;
+ to="Town_Core";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/"time - _lastUpdate > _awaits"/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ };
+ };
+ /*%FSM</STATE>*/
+ /*%FSM<STATE "Town_Advanced">*/
+ class Town_Advanced
+ {
+ name = "Town_Advanced";
+ init = /*%FSM<STATEINIT""">*/"if !(_skip) then {" \n
+ " if (_tcmode > 0) then {" \n
+ " if (_west > 0 && !(_location getVariable ""wfbe_cancap_w"")) then {_west = 0};" \n
+ " if (_east > 0 && !(_location getVariable ""wfbe_cancap_e"")) then {_east = 0};" \n
+ " };" \n
+ "" \n
+ " _rate = _tcrate;" \n
+ " if (_east > 0) then {_rate = _tcrate * ([_location,East] Call GetTotalCampsOnSide) / (_location Call GetTotalCamps) * _mccr};" \n
+ " if (_west > 0) then {_rate = _tcrate * ([_location,West] Call GetTotalCampsOnSide) / (_location Call GetTotalCamps) * _mccr};" \n
+ " if (_rate < 1) then {_rate = 1};" \n
+ " if (_sideID == EASTID && (_west > 0 || _resistance > 0) && time - _timeAttacked > 60) then {_timeAttacked = time;[""IsUnderAttack"",_location,East,_name] Spawn SideMessage};" \n
+ " if (_sideID == WESTID && (_east > 0 || _resistance > 0) && time - _timeAttacked > 60) then {_timeAttacked = time;[""IsUnderAttack"",_location,West,_name] Spawn SideMessage};" \n
+ " _supplyValue = _location getVariable ""supplyValue"";" \n
+ " _supplyValue = round(_supplyValue - (_resistance + _east + _west) * _rate);" \n
+ " _location setVariable [""supplyValue"",_supplyValue,true];" \n
+ " if (_supplyValue < 1) then {_captured = true};" \n
+ "};" \n
+ "" \n
+ "if (_protected) then {" \n
+ " _supplyValue = _location getVariable ""supplyValue"";" \n
+ " if (_supplyValue < _startingSupplyValue) then {" \n
+ " _supplyValue = _supplyValue + _force * _tcrate;" \n
+ " if (_supplyValue > _startingSupplyValue) then {_supplyValue = _startingSupplyValue};" \n
+ " _location setVariable [""supplyValue"",_supplyValue,true];" \n
+ " };" \n
+ "};"/*%FSM</STATEINIT""">*/;
+ precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
+ class Links
+ {
+ /*%FSM<LINK "Skip">*/
+ class Skip
+ {
+ priority = 0.000000;
+ to="_";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/"!_captured"/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ /*%FSM<LINK "Captured">*/
+ class Captured
+ {
+ priority = 0.000000;
+ to="Captured";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/"_captured"/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ };
+ };
+ /*%FSM</STATE>*/
+ /*%FSM<STATE "Captured">*/
+ class Captured
+ {
+ name = "Captured";
+ init = /*%FSM<STATEINIT""">*/"_location setVariable [""supplyValue"",_startingSupplyValue,true];" \n
+ "_side = ""R"";" \n
+ "if (_west > 0) then {_side = ""W""};" \n
+ "if (_east > 0) then {_side = ""E""};" \n
+ "" \n
+ "switch (_side) do {" \n
+ " case 'R': {" \n
+ " if (_sideID == WESTID) then {" \n
+ " WFBE_TownCaptured = [nil,'CLTFNCTOWNCAPTURED',[_location,RESISTANCEID,WESTID]];" \n
+ " publicVariable 'WFBE_TownCaptured';" \n
+ " if (isHostedServer) then {[nil,'CLTFNCTOWNCAPTURED',[_location,RESISTANCEID,WESTID]] Spawn HandlePVF};" \n
+ " [""Lost"",_location,West] Spawn SideMessage;" \n
+ " };" \n
+ " if (_sideID == EASTID) then {" \n
+ " WFBE_TownCaptured = [nil,'CLTFNCTOWNCAPTURED',[_location,RESISTANCEID,EASTID]];" \n
+ " publicVariable 'WFBE_TownCaptured';" \n
+ " if (isHostedServer) then {[nil,'CLTFNCTOWNCAPTURED',[_location,RESISTANCEID,EASTID]] Spawn HandlePVF};" \n
+ " [""Lost"",_location,East] Spawn SideMessage;" \n
+ " };" \n
+ " _location setVariable [""sideID"",RESISTANCEID,true];" \n
+ " };" \n
+ " case 'E': {" \n
+ " if (_sideID == WESTID) then {" \n
+ " WFBE_TownCapturedPublic = [nil,'CLTFNCTOWNCAPTUREDPUBLIC',[_location,EASTID]];" \n
+ " publicVariable 'WFBE_TownCapturedPublic';" \n
+ " if (isHostedServer) then {[nil,'CLTFNCTOWNCAPTUREDPUBLIC',[_location,EASTID]] Spawn HandlePVF};" \n
+ " [""Lost"",_location,West] Spawn SideMessage;" \n
+ " };" \n
+ " if (_sideID == RESISTANCEID) then {" \n
+ " WFBE_TownCaptured = [nil,'CLTFNCTOWNCAPTURED',[_location,EASTID,EASTID]];" \n
+ " publicVariable 'WFBE_TownCaptured';" \n
+ " if (isHostedServer) then {[nil,'CLTFNCTOWNCAPTURED',[_location,EASTID,EASTID]] Spawn HandlePVF};" \n
+ " };" \n
+ " if (paramKeepCamps) then {[_location,East,_sideID Call GetSideFromID] Spawn SetCampsToSide};" \n
+ " _location setVariable [""sideID"",EASTID,true];" \n
+ " [""Captured"",_location,East] Spawn SideMessage;" \n
+ " };" \n
+ " case 'W': {" \n
+ " if (_sideID == EASTID) then {" \n
+ " WFBE_TownCapturedPublic = [nil,'CLTFNCTOWNCAPTUREDPUBLIC',[_location,WESTID]];" \n
+ " publicVariable 'WFBE_TownCapturedPublic';" \n
+ " if (isHostedServer) then {[nil,'CLTFNCTOWNCAPTUREDPUBLIC',[_location,WESTID]] Spawn HandlePVF};" \n
+ " [""Lost"",_location,East] Spawn SideMessage;" \n
+ " };" \n
+ " if (_sideID == RESISTANCEID) then {" \n
+ " WFBE_TownCaptured = [nil,'CLTFNCTOWNCAPTURED',[_location,WESTID,WESTID]];" \n
+ " publicVariable 'WFBE_TownCaptured';" \n
+ " if (isHostedServer) then {[nil,'CLTFNCTOWNCAPTURED',[_location,WESTID,WESTID]] Spawn HandlePVF};" \n
+ " };" \n
+ " if (paramKeepCamps) then {[_location,West,_sideID Call GetSideFromID] Spawn SetCampsToSide};" \n
+ " _location setVariable [""sideID"",WESTID,true];" \n
+ " [""Captured"",_location,West] Spawn SideMessage;" \n
+ " };" \n
+ "};" \n
+ "" \n
+ "{" \n
+ " if (!isPlayer(Gunner _x)) then {" \n
+ " _unit = (gunner _x);" \n
+ " if !(isNull _unit) then {_unit setPos (getpos _x);deleteVehicle _unit};" \n
+ " deleteVehicle _x;" \n
+ " };" \n
+ "} forEach _defenses;"/*%FSM</STATEINIT""">*/;
+ precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
+ class Links
+ {
+ /*%FSM<LINK "_">*/
+ class _
+ {
+ priority = 0.000000;
+ to="Town_Core";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/"time - _lastUpdate > _awaits"/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ };
+ };
+ /*%FSM</STATE>*/
+ /*%FSM<STATE "Pick_Capture_Mod">*/
+ class Pick_Capture_Mod
+ {
+ name = "Pick_Capture_Mod";
+ init = /*%FSM<STATEINIT""">*/"_livingUnits = (_objects Call GetLiveUnits) unitsBelowHeight 200;" \n
+ "_west = West CountSide _livingUnits;" \n
+ "_east = East CountSide _livingUnits;" \n
+ "_resistance = Resistance CountSide _livingUnits;" \n
+ "_skip = false;" \n
+ "_protected = false;" \n
+ "_captured = false;"/*%FSM</STATEINIT""">*/;
+ precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
+ class Links
+ {
+ /*%FSM<LINK "Classic">*/
+ class Classic
+ {
+ priority = 0.000000;
+ to="Set_Classic";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/"_tcm == 0"/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ /*%FSM<LINK "All_Camps">*/
+ class All_Camps
+ {
+ priority = 0.000000;
+ to="Set_All_Camps";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/"_tcm == 2"/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ /*%FSM<LINK "Threshold">*/
+ class Threshold
+ {
+ priority = 0.000000;
+ to="Set_Threshold";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/"_tcm == 1"/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ };
+ };
+ /*%FSM</STATE>*/
+ /*%FSM<STATE "Set_Classic">*/
+ class Set_Classic
+ {
+ name = "Set_Classic";
+ init = /*%FSM<STATEINIT""">*/"if (_sideID == RESISTANCEID && _resistance > 0) then {_force = _resistance;_protected = true;_skip = true};" \n
+ "if (_sideID == EASTID && _east > 0) then {_force = _east;_protected = true;_skip = true};" \n
+ "if (_sideID == WESTID && _west > 0) then {_force = _west;_protected = true;_skip = true};" \n
+ "" \n
+ "if (_east > 0 && _west > 0) then {_skip = true};" \n
+ "if (_west > 0 && _resistance > 0) then {_skip = true};" \n
+ "if (_resistance > 0 && _east > 0) then {_skip = true};"/*%FSM</STATEINIT""">*/;
+ precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
+ class Links
+ {
+ /*%FSM<LINK "_">*/
+ class _
+ {
+ priority = 0.000000;
+ to="Town_Advanced";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/""/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ };
+ };
+ /*%FSM</STATE>*/
+ /*%FSM<STATE "Set_Threshold">*/
+ class Set_Threshold
+ {
+ name = "Set_Threshold";
+ init = /*%FSM<STATEINIT""">*/"_resistanceDominion = if (_resistance > _east && _resistance > _west) then {true} else {false};" \n
+ "_westDominion = if (_west > _east && _west > _resistance) then {true} else {false};" \n
+ "_eastDominion = if (_east > _west && _east > _resistance) then {true} else {false};" \n
+ "" \n
+ "if (_sideID == RESISTANCEID && _resistanceDominion) then {_force = _resistance;_protected = true;_skip = true};" \n
+ "if (_sideID == EASTID && _eastDominion) then {_force = _east;_protected = true;_skip = true};" \n
+ "if (_sideID == WESTID && _westDominion) then {_force = _west;_protected = true;_skip = true};" \n
+ "" \n
+ "if (_resistanceDominion) then {" \n
+ " _resistance = if (_east > _west) then {_resistance - _east} else {_resistance - _west};" \n
+ " _force = _resistance;" \n
+ " _east = 0; " \n
+ " _west = 0;" \n
+ "};" \n
+ "if (_westDominion) then {" \n
+ " _west = if (_east > _resistance) then {_west - _east} else {_west - _resistance};" \n
+ " _force = _west;" \n
+ " _east = 0;" \n
+ " _resistance = 0;" \n
+ "};" \n
+ "if (_eastDominion) then {" \n
+ " _east = if (_west > _resistance) then {_east - _west} else {_east - _resistance};" \n
+ " _force = _east;" \n
+ " _west = 0;" \n
+ " _resistance = 0;" \n
+ "};" \n
+ "" \n
+ "if (!_resistanceDominion && !_westDominion && !_eastDominion) then {_west = 0; _east = 0; _resistance = 0};"/*%FSM</STATEINIT""">*/;
+ precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
+ class Links
+ {
+ /*%FSM<LINK "_">*/
+ class _
+ {
+ priority = 0.000000;
+ to="Town_Advanced";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/""/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ };
+ };
+ /*%FSM</STATE>*/
+ /*%FSM<STATE "Set_All_Camps">*/
+ class Set_All_Camps
+ {
+ name = "Set_All_Camps";
+ init = /*%FSM<STATEINIT""">*/"_resistanceDominion = if (_resistance > _east && _resistance > _west) then {true} else {false};" \n
+ "_westDominion = if (_west > _east && _west > _resistance) then {true} else {false};" \n
+ "_eastDominion = if (_east > _west && _east > _resistance) then {true} else {false};" \n
+ "" \n
+ "if (_sideID == RESISTANCEID && _resistanceDominion) then {_force = _resistance;_protected = true;_skip = true};" \n
+ "if (_sideID == EASTID && _eastDominion) then {_force = _east;_protected = true;_skip = true};" \n
+ "if (_sideID == WESTID && _westDominion) then {_force = _west;_protected = true;_skip = true};" \n
+ "" \n
+ "if (_resistanceDominion) then {" \n
+ " _resistance = if (_east > _west) then {_resistance - _east} else {_resistance - _west};" \n
+ " _force = _resistance;" \n
+ " _east = 0; " \n
+ " _west = 0;" \n
+ "};" \n
+ "if (_westDominion) then {" \n
+ " _west = if (_east > _resistance) then {_west - _east} else {_west - _resistance};" \n
+ " _force = _west;" \n
+ " _east = 0;" \n
+ " _resistance = 0;" \n
+ "};" \n
+ "if (_eastDominion) then {" \n
+ " _east = if (_west > _resistance) then {_east - _west} else {_east - _resistance};" \n
+ " _force = _east;" \n
+ " _west = 0;" \n
+ " _resistance = 0;" \n
+ "};" \n
+ "" \n
+ "if (!_resistanceDominion && !_westDominion && !_eastDominion) then {_west = 0; _east = 0; _resistance = 0};" \n
+ "" \n
+ "_totalCamps = _location Call GetTotalCamps;" \n
+ "" \n
+ "if (_west > 0) then {" \n
+ " if (_totalCamps != ([_location,west] Call GetTotalCampsOnSide)) then {_skip = true};" \n
+ "};" \n
+ "if (_east > 0) then {" \n
+ " if (_totalCamps != ([_location,east] Call GetTotalCampsOnSide)) then {_skip = true};" \n
+ "};" \n
+ "//--- Resistance don't need all camps!" \n
+ "/*" \n
+ "if (_resistance > 0) then {" \n
+ " if (_totalCamps != ([_location,resistance] Call GetTotalCampsOnSide)) then {_skip = true};" \n
+ "};" \n
+ "*/"/*%FSM</STATEINIT""">*/;
+ precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
+ class Links
+ {
+ /*%FSM<LINK "_">*/
+ class _
+ {
+ priority = 0.000000;
+ to="Town_Advanced";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/""/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ };
+ };
+ /*%FSM</STATE>*/
+ };
+ initState="Init";
+ finalStates[] =
+ {
+ "End"
+ };
+};
+/*%FSM</COMPILE>*/ \ No newline at end of file
diff --git a/Server/FSM/updatetownai.fsm b/Server/FSM/updatetownai.fsm
new file mode 100644
index 0000000..4c0baa5
--- /dev/null
+++ b/Server/FSM/updatetownai.fsm
@@ -0,0 +1,1377 @@
+/*%FSM<COMPILE "E:\Bohemia Interactive\ArmA 2\FSM Editor Personal Edition\scriptedFSM.cfg, updatetownai">*/
+/*%FSM<HEAD>*/
+/*
+item0[] = {"Init",0,250,-81.542984,-257.577942,8.457038,-207.578140,0.000000,"Init"};
+item1[] = {"Loop",4,218,-81.400459,-164.956757,8.599551,-114.956772,0.000000,"Loop"};
+item2[] = {"Root",2,250,-81.695038,-84.595222,8.304958,-34.595226,0.000000,"Root"};
+item3[] = {"East____West",4,218,54.026054,-85.166306,144.026276,-35.166328,2.000000,"East || West"};
+item4[] = {"Resistance",4,218,-211.512375,-85.535400,-121.512367,-35.535374,1.000000,"Resistance"};
+item5[] = {"Enemies",2,250,-294.367432,85.381798,-204.367416,135.381744,0.000000,"Enemies"};
+item6[] = {"Enemies_1",2,250,121.220261,78.907684,211.220276,128.907654,0.000000,"Enemies"};
+item7[] = {"Clear",4,218,-437.596313,86.397621,-347.596313,136.397583,0.000000,"Clear"};
+item8[] = {"Hostile",4,218,-295.383301,171.725250,-205.383255,221.725250,0.000000,"Hostile"};
+item9[] = {"Hostile",4,218,121.220253,168.298737,211.220245,218.298767,0.000000,"Hostile"};
+item10[] = {"Clear",4,218,251.104004,79.940926,341.103973,129.940887,0.000000,"Clear"};
+item11[] = {"Update",2,250,-83.093033,145.655670,6.906990,195.655670,0.000000,"Update"};
+item12[] = {"East____West",4,218,51.054230,211.066879,141.054169,261.066833,2.000000,"East || West"};
+item13[] = {"Resistance",4,218,-225.570770,211.066833,-135.570770,261.066833,1.000000,"Resistance"};
+item14[] = {"Active",2,250,50.993599,303.105865,140.993622,353.105865,0.000000,"Active"};
+item15[] = {"Active_1",2,250,-226.321884,302.090027,-136.321869,352.090027,0.000000,"Active"};
+item16[] = {"Yes",4,218,-226.428909,389.984589,-136.428909,439.984589,0.000000,"Yes"};
+item17[] = {"No",4,218,-361.424255,303.105835,-271.424255,353.105835,0.000000,"No"};
+item18[] = {"Yes",4,218,50.993557,388.433655,140.993561,438.433655,0.000000,"Yes"};
+item19[] = {"No",4,218,180.001099,304.121643,270.001099,354.121643,0.000000,"No"};
+item20[] = {"Reinforcement",2,250,-228.026566,480.105957,-138.026550,530.105957,0.000000,"Reinforcement"};
+item21[] = {"Reinforcement_1",2,250,52.438057,477.071014,142.438080,527.070984,0.000000,"Reinforcement"};
+item22[] = {"Disabled",4,218,189.443558,474.997864,279.443420,524.997864,0.000000,"Disabled"};
+item23[] = {"Enabled",4,218,52.594284,569.904968,142.594299,619.904968,0.000000,"Enabled"};
+item24[] = {"Enabled",4,218,-227.136414,572.915527,-137.136414,622.915527,0.000000,"Enabled"};
+item25[] = {"Disabled",4,218,-356.889191,481.315216,-266.889191,531.315186,0.000000,"Disabled"};
+item26[] = {"Create_Teams",2,250,-504.760498,301.661316,-414.760498,351.661316,0.000000,"Create Teams"};
+item27[] = {"Filter_Out",2,250,312.391754,304.012329,402.391754,354.012329,0.000000,"Filter Out"};
+item28[] = {"Reinforce",2,250,-227.312881,661.195923,-137.312851,711.195923,0.000000,"Reinforce"};
+item29[] = {"Reinforce_1",2,4346,53.078735,665.977051,143.078766,715.977051,0.000000,"Reinforce"};
+item30[] = {"_",8,218,-61.027760,723.917419,-18.699284,749.470459,0.000000,""};
+item31[] = {"Resistance_Clean",2,250,-84.636703,800.070679,5.363308,850.070679,0.000000,"Resistance" \n "Clean" \n "Update"};
+item32[] = {"Activity",4,218,52.897964,800.575867,142.897949,850.575867,0.000000,"Activity"};
+item33[] = {"Skip",4,218,-84.158691,894.561279,5.841303,944.561279,1.000000,"Skip"};
+item34[] = {"Check_Time",2,250,197.415848,801.073425,287.415894,851.073425,0.000000,"Check Time"};
+item35[] = {"Occupation_Clean",2,250,-84.477402,988.013367,5.522614,1038.013428,0.000000,"Occupation" \n "Clean" \n "Update"};
+item36[] = {"_",8,218,516.491821,999.625427,558.820740,1025.178345,0.000000,""};
+item37[] = {"Activity",4,218,-227.812027,987.478455,-137.812027,1037.478271,0.000000,"Activity"};
+item38[] = {"Skip",4,218,-85.511490,1086.126953,4.488537,1136.126953,0.000000,"Skip"};
+item39[] = {"Check_Time_1",2,250,-362.144073,988.819214,-272.144043,1038.819214,0.000000,"Check Time"};
+item40[] = {"Skip",2,250,-356.665619,712.646545,-266.665619,762.646545,0.000000,"Skip"};
+item41[] = {"Skip_1",2,250,188.821106,711.607605,278.821106,761.607605,0.000000,"Skip"};
+item42[] = {"_",2,250,-720.830017,1086.698120,-630.829895,1136.698120,0.000000,""};
+item43[] = {"_",8,218,-614.807983,900.023926,-572.479492,925.577576,0.000000,""};
+item44[] = {"",7,210,-681.073242,-142.960266,-673.073242,-134.960266,0.000000,""};
+item45[] = {"Ground",4,218,313.725525,398.264923,403.725525,448.264923,0.000000,"Ground"};
+item46[] = {"",7,210,548.178650,101.751083,556.178650,109.751068,0.000000,""};
+item47[] = {"",7,210,557.477966,730.003906,565.478027,738.003906,0.000000,""};
+item48[] = {"",7,210,-641.013123,25.217754,-633.013123,33.217751,0.000000,""};
+item49[] = {"",7,210,-641.013062,733.310120,-633.013000,741.310120,0.000000,""};
+item50[] = {"Air",4,218,450.295349,303.113800,540.295410,353.113800,0.000000,"Air"};
+item51[] = {"Create_Teams_1",2,250,312.606049,503.490906,402.606079,553.490906,0.000000,"Create" \n "Teams"};
+item52[] = {"Create_AA_Teams",2,250,451.414673,503.490906,541.414734,553.490906,0.000000,"Create" \n "AA Teams"};
+item53[] = {"_",8,218,404.726166,577.962646,447.054626,603.515686,0.000000,""};
+item54[] = {"Civilians",4,218,-627.123352,300.957153,-537.123352,350.957153,0.000000,"Civilians"};
+item55[] = {"No_Civilians",4,218,-503.680084,396.450958,-413.680084,446.450958,0.000000,"No Civilians"};
+item56[] = {"Create_Civilians",2,250,-624.794250,497.767517,-534.794250,547.767517,0.000000,"Create Civilians"};
+item57[] = {"Skip_2",2,250,-503.680115,494.273926,-413.680084,544.273926,0.000000,"Skip"};
+item58[] = {"_",8,218,-546.874634,573.304443,-504.546204,598.857483,0.000000,""};
+item59[] = {"Gameover",4,218,-81.332367,-8.259530,8.667633,41.740471,0.000000,"Gameover"};
+item60[] = {"End",1,250,-79.733475,64.343887,10.266556,114.343887,0.000000,"End"};
+item61[] = {"Ready",4,218,345.695007,799.360779,435.695007,849.360779,0.000000,"Ready"};
+item62[] = {"Wait",4,218,198.982651,893.935669,288.982666,943.935669,0.000000,"Wait"};
+item63[] = {"Remove_Resistanc",2,250,493.620056,800.573181,583.620056,850.573181,0.000000,"Remove" \n "Resistance"};
+item64[] = {"Ready",4,218,-360.421417,889.169373,-270.421417,939.169373,0.000000,"Ready"};
+item65[] = {"Wait",4,218,-509.167969,988.333862,-419.167999,1038.333740,0.000000,"Wait"};
+item66[] = {"Remove_Occupatio",2,250,-510.321045,888.016357,-420.321045,938.016357,0.000000,"Remove" \n "Occupation"};
+item67[] = {"Occupation_Etat",2,250,177.150528,-86.332535,267.150513,-36.332535,0.000000,"Occupation" \n "Etat"};
+item68[] = {"No_Occupation",4,218,177.150635,-164.860199,267.150513,-114.860199,0.000000,"No" \n "Occupation"};
+item69[] = {"Idle",2,250,49.026558,-165.893478,139.026489,-115.893478,0.000000,"Idle"};
+item70[] = {"Occupation",4,218,121.354660,-3.671861,211.354614,46.328136,0.000000,"Occupation"};
+item71[] = {"Resistance_Etat",2,250,-349.607574,-84.825172,-259.607574,-34.825172,0.000000,"Resistance" \n "Etat"};
+item72[] = {"Resistance",4,218,-295.487061,-1.640314,-205.487045,48.359688,0.000000,"Resistance"};
+item73[] = {"No_Resistance",4,218,-495.933289,-84.825500,-405.933289,-34.825500,0.000000,"No" \n "Resistance"};
+item74[] = {"Idle_1",2,250,-637.440308,-84.593369,-547.440308,-34.593380,0.000000,"Idle"};
+link0[] = {0,1};
+link1[] = {1,2};
+link2[] = {2,3};
+link3[] = {2,4};
+link4[] = {2,59};
+link5[] = {3,67};
+link6[] = {4,71};
+link7[] = {5,7};
+link8[] = {5,8};
+link9[] = {6,9};
+link10[] = {6,10};
+link11[] = {7,48};
+link12[] = {8,11};
+link13[] = {9,11};
+link14[] = {10,46};
+link15[] = {11,12};
+link16[] = {11,13};
+link17[] = {12,14};
+link18[] = {13,15};
+link19[] = {14,18};
+link20[] = {14,19};
+link21[] = {15,16};
+link22[] = {15,17};
+link23[] = {16,20};
+link24[] = {17,26};
+link25[] = {18,21};
+link26[] = {19,27};
+link27[] = {20,24};
+link28[] = {20,25};
+link29[] = {21,22};
+link30[] = {21,23};
+link31[] = {22,41};
+link32[] = {23,29};
+link33[] = {24,28};
+link34[] = {25,40};
+link35[] = {26,54};
+link36[] = {26,55};
+link37[] = {27,45};
+link38[] = {27,50};
+link39[] = {28,30};
+link40[] = {29,30};
+link41[] = {30,31};
+link42[] = {31,32};
+link43[] = {31,33};
+link44[] = {32,34};
+link45[] = {33,35};
+link46[] = {34,61};
+link47[] = {34,62};
+link48[] = {35,37};
+link49[] = {35,38};
+link50[] = {36,35};
+link51[] = {37,39};
+link52[] = {38,42};
+link53[] = {39,64};
+link54[] = {39,65};
+link55[] = {40,30};
+link56[] = {41,30};
+link57[] = {42,44};
+link58[] = {43,42};
+link59[] = {44,1};
+link60[] = {45,51};
+link61[] = {46,47};
+link62[] = {47,41};
+link63[] = {48,49};
+link64[] = {49,40};
+link65[] = {50,52};
+link66[] = {51,53};
+link67[] = {52,53};
+link68[] = {53,41};
+link69[] = {54,56};
+link70[] = {55,57};
+link71[] = {56,58};
+link72[] = {57,58};
+link73[] = {58,40};
+link74[] = {59,60};
+link75[] = {61,63};
+link76[] = {62,35};
+link77[] = {63,36};
+link78[] = {64,66};
+link79[] = {65,42};
+link80[] = {66,43};
+link81[] = {67,68};
+link82[] = {67,70};
+link83[] = {68,69};
+link84[] = {69,1};
+link85[] = {70,6};
+link86[] = {71,72};
+link87[] = {71,73};
+link88[] = {72,5};
+link89[] = {73,74};
+link90[] = {74,44};
+globals[] = {0.000000,0,0,0,0,640,480,1,90,6316128,1,-779.566345,598.192566,1098.315674,-269.875427,720,715,1};
+window[] = {0,-1,-1,-1,-1,954,343,1756,94,1,738};
+*//*%FSM</HEAD>*/
+class FSM
+{
+ fsmName = "updatetownai";
+ class States
+ {
+ /*%FSM<STATE "Init">*/
+ class Init
+ {
+ name = "Init";
+ init = /*%FSM<STATEINIT""">*/"_location = _this select 0;" \n
+ "_resistance_teamtypes = _this select 1;" \n
+ "_probability = _this select 2;" \n
+ "" \n
+ "_location_patroldistance = 'WFBE_TOWNUNITSPATROLDISTANCE' Call GetNamespace;" \n
+ "_location_range = _location getVariable 'range';" \n
+ "_location_rangepatrol = _location_range * ('WFBE_DETECTIONTOPATROLRANGERATIO' Call GetNamespace);" \n
+ "_location_rangespawn = 'WFBE_TOWNUNITSPAWNRANGE' Call GetNamespace;" \n
+ "" \n
+ "_location setVariable [""reinforcements"",0];" \n
+ "_location setVariable [""reinforcements_occ"",0];" \n
+ "" \n
+ "_camps = _location getVariable 'camps';" \n
+ "_defensiveTeam = objNull;" \n
+ "_position = [];" \n
+ "_totalCamps = count _camps;" \n
+ "" \n
+ "_lastUpdate = 10;" \n
+ "" \n
+ "_occupation_aaactive = false;" \n
+ "_occupation_active = false;" \n
+ "_occupation_difficulty = 'WFBE_TOWNOCCUPATIONDIFFICULTY' Call GetNamespace;" \n
+ "_occupation_inactive = 0;" \n
+ "_occupation_inactivetime = 'WFBE_OCCUPATIONINACTIVETIME' Call GetNamespace;" \n
+ "_occupation_manable = 'WFBE_OCCUPATIONMAXDEFENSES' Call GetNamespace;" \n
+ "_occupation_lastreinforcement = 0;" \n
+ "_occupation_reinforcementdelay = 'WFBE_OCCUPATIONREINFORCEMENTDELAY' Call GetNamespace;" \n
+ "_occupation_reinforcementteamsmax = if ((_location getVariable ""maxSupplyValue"")< 60) then {1 + ('WFBE_TOWNRESISTANCEDIFFICULTY' Call GetNamespace)} else {2 + ('WFBE_TOWNRESISTANCEDIFFICULTY' Call GetNamespace)};" \n
+ "" \n
+ "_occupation_teams = [];" \n
+ "_occupation_vehicles = [];" \n
+ "" \n
+ "_occupation_aasvfloor1 = 'WFBE_OCCUPATIONAATEAM1' Call GetNamespace;" \n
+ "_occupation_aasvfloor2 = 'WFBE_OCCUPATIONAATEAM2' Call GetNamespace;" \n
+ "" \n
+ "_resistance_active = false;" \n
+ "_resistance_defenses = _location nearEntities['WFBE_RESISTANCEDEFENSENAMES' Call GetNamespace,_location_range];" \n
+ "_resistance_inactive = 0;" \n
+ "_resistance_inactivetime = 'WFBE_RESISTANCEINACTIVETIME' Call GetNamespace;" \n
+ "_resistance_lastreinforcement = 0;" \n
+ "_resistance_reinforcementdelay = 'WFBE_RESISTANCEREINFORCEMENTDELAY' Call GetNamespace;" \n
+ "_resistance_reinforcementteamsmax = if ((_location getVariable ""maxSupplyValue"")< 60) then {1 + ('WFBE_TOWNRESISTANCEDIFFICULTY' Call GetNamespace)} else {2 + ('WFBE_TOWNRESISTANCEDIFFICULTY' Call GetNamespace)};" \n
+ "" \n
+ "_civilians_enabled = if (('WFBE_CIVILIANFACTION' Call GetNamespace) > 0) then {true} else {false};" \n
+ "_civilians_teamstype = """";" \n
+ "_civilians_coef = 1;" \n
+ "if (_civilians_enabled) then {" \n
+ " if ((_location getVariable 'maxSupplyValue') <= 50) then {_civilians_teamstype = ""Villagers""};" \n
+ " if ((_location getVariable 'maxSupplyValue') > 50 && (_location getVariable ""maxSupplyValue"") < 120) then {_civilians_teamstype = ""Citizen"";_civilians_coef = 2};" \n
+ " if ((_location getVariable 'maxSupplyValue') >= 120) then {_civilians_teamstype = ""LargeCitizen"";_civilians_coef = 3};" \n
+ "};" \n
+ "" \n
+ "{_x addEventHandler [""Killed"",{[_this select 0,_this select 1,resistance] Spawn UnitKilled}]} forEach _resistance_defenses;"/*%FSM</STATEINIT""">*/;
+ precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
+ class Links
+ {
+ /*%FSM<LINK "Loop">*/
+ class Loop
+ {
+ priority = 0.000000;
+ to="Root";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/"time - _lastUpdate > 5;"/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ };
+ };
+ /*%FSM</STATE>*/
+ /*%FSM<STATE "Root">*/
+ class Root
+ {
+ name = "Root";
+ init = /*%FSM<STATEINIT""">*/"_lastUpdate = time;" \n
+ "" \n
+ "_sideID = _location getVariable 'sideID';" \n
+ "_side = _sideID Call GetSideFromID;" \n
+ "" \n
+ "_objects = _location nearEntities[[resistanceSoldierBaseClass,eastSoldierBaseClass,westSoldierBaseClass,""Car"",""Motorcycle"",""Tank"",""Air""],_location_range];" \n
+ "_objects = _objects unitsBelowHeight 200;" \n
+ "_resistanceEnemies = (West countSide _objects) + (East countSide _objects);" \n
+ "_occupationEnemies = if (_side == east) then {(west countSide _objects) + (resistance countSide _objects)} else {(east countSide _objects) + (resistance countSide _objects)};"/*%FSM</STATEINIT""">*/;
+ precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
+ class Links
+ {
+ /*%FSM<LINK "East____West">*/
+ class East____West
+ {
+ priority = 2.000000;
+ to="Occupation_Etat";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/"_sideID != RESISTANCEID && !gameOver"/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ /*%FSM<LINK "Resistance">*/
+ class Resistance
+ {
+ priority = 1.000000;
+ to="Resistance_Etat";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/"_sideID == RESISTANCEID && !gameOver"/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ /*%FSM<LINK "Gameover">*/
+ class Gameover
+ {
+ priority = 0.000000;
+ to="End";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/"gameOver"/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ };
+ };
+ /*%FSM</STATE>*/
+ /*%FSM<STATE "Enemies">*/
+ class Enemies
+ {
+ name = "Enemies";
+ init = /*%FSM<STATEINIT""">*/""/*%FSM</STATEINIT""">*/;
+ precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
+ class Links
+ {
+ /*%FSM<LINK "Hostile">*/
+ class Hostile
+ {
+ priority = 0.000000;
+ to="Update";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/"_resistanceEnemies > 0"/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ /*%FSM<LINK "Clear">*/
+ class Clear
+ {
+ priority = 0.000000;
+ to="Skip";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/"_resistanceEnemies == 0"/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ };
+ };
+ /*%FSM</STATE>*/
+ /*%FSM<STATE "Enemies_1">*/
+ class Enemies_1
+ {
+ name = "Enemies_1";
+ init = /*%FSM<STATEINIT""">*/""/*%FSM</STATEINIT""">*/;
+ precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
+ class Links
+ {
+ /*%FSM<LINK "Clear">*/
+ class Clear
+ {
+ priority = 0.000000;
+ to="Skip_1";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/"_occupationEnemies == 0"/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ /*%FSM<LINK "Hostile">*/
+ class Hostile
+ {
+ priority = 0.000000;
+ to="Update";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/"_occupationEnemies > 0"/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ };
+ };
+ /*%FSM</STATE>*/
+ /*%FSM<STATE "Update">*/
+ class Update
+ {
+ name = "Update";
+ init = /*%FSM<STATEINIT""">*/"if (_resistanceEnemies > 0) then {_resistance_inactive = time};" \n
+ "if (_occupationEnemies > 0) then {_occupation_inactive = time};"/*%FSM</STATEINIT""">*/;
+ precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
+ class Links
+ {
+ /*%FSM<LINK "East____West">*/
+ class East____West
+ {
+ priority = 2.000000;
+ to="Active";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/"_sideID != RESISTANCEID"/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ /*%FSM<LINK "Resistance">*/
+ class Resistance
+ {
+ priority = 1.000000;
+ to="Active_1";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/"_sideID == RESISTANCEID"/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ };
+ };
+ /*%FSM</STATE>*/
+ /*%FSM<STATE "Active">*/
+ class Active
+ {
+ name = "Active";
+ init = /*%FSM<STATEINIT""">*/""/*%FSM</STATEINIT""">*/;
+ precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
+ class Links
+ {
+ /*%FSM<LINK "No">*/
+ class No
+ {
+ priority = 0.000000;
+ to="Filter_Out";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/"!_occupation_active"/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ /*%FSM<LINK "Yes">*/
+ class Yes
+ {
+ priority = 0.000000;
+ to="Reinforcement_1";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/"_occupation_active"/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ };
+ };
+ /*%FSM</STATE>*/
+ /*%FSM<STATE "Active_1">*/
+ class Active_1
+ {
+ name = "Active_1";
+ init = /*%FSM<STATEINIT""">*/""/*%FSM</STATEINIT""">*/;
+ precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
+ class Links
+ {
+ /*%FSM<LINK "No">*/
+ class No
+ {
+ priority = 0.000000;
+ to="Create_Teams";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/"!_resistance_active"/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ /*%FSM<LINK "Yes">*/
+ class Yes
+ {
+ priority = 0.000000;
+ to="Reinforcement";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/"_resistance_active"/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ };
+ };
+ /*%FSM</STATE>*/
+ /*%FSM<STATE "Reinforcement">*/
+ class Reinforcement
+ {
+ name = "Reinforcement";
+ init = /*%FSM<STATEINIT""">*/""/*%FSM</STATEINIT""">*/;
+ precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
+ class Links
+ {
+ /*%FSM<LINK "Disabled">*/
+ class Disabled
+ {
+ priority = 0.000000;
+ to="Skip";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/"!paramResReinf || (_location getVariable ""reinforcements"") >= _resistance_reinforcementteamsmax || time - _resistance_lastreinforcement <= _resistance_reinforcementdelay"/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ /*%FSM<LINK "Enabled">*/
+ class Enabled
+ {
+ priority = 0.000000;
+ to="Reinforce";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/"paramResReinf && (_location getVariable ""reinforcements"") < _resistance_reinforcementteamsmax && time - _resistance_lastreinforcement > _resistance_reinforcementdelay"/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ };
+ };
+ /*%FSM</STATE>*/
+ /*%FSM<STATE "Reinforcement_1">*/
+ class Reinforcement_1
+ {
+ name = "Reinforcement_1";
+ init = /*%FSM<STATEINIT""">*/""/*%FSM</STATEINIT""">*/;
+ precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
+ class Links
+ {
+ /*%FSM<LINK "Enabled">*/
+ class Enabled
+ {
+ priority = 0.000000;
+ to="Reinforce_1";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/"paramOccReinf && (_location getVariable ""reinforcements_occ"") < _occupation_reinforcementteamsmax && time - _occupation_lastreinforcement > _occupation_reinforcementdelay"/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ /*%FSM<LINK "Disabled">*/
+ class Disabled
+ {
+ priority = 0.000000;
+ to="Skip_1";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/"!paramOccReinf || (_location getVariable ""reinforcements_occ"") >= _occupation_reinforcementteamsmax || time - _occupation_lastreinforcement <= _occupation_reinforcementdelay"/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ };
+ };
+ /*%FSM</STATE>*/
+ /*%FSM<STATE "Create_Teams">*/
+ class Create_Teams
+ {
+ name = "Create_Teams";
+ init = /*%FSM<STATEINIT""">*/"if (count _resistance_defenses > 0) then {" \n
+ " //--- Update the defenses." \n
+ " for '_i' from 0 to count(_resistance_defenses)-1 do {" \n
+ " if !(alive (_resistance_defenses select _i)) then {_resistance_defenses = _resistance_defenses - [_resistance_defenses select _i]};" \n
+ " };" \n
+ "" \n
+ " //--- Man the defenses that can be manned." \n
+ " {" \n
+ " if (_x emptyPositions ""gunner"" > 0) then {" \n
+ " if (isNull WF_ResistanceDefenseTeam) then {WF_ResistanceDefenseTeam = createGroup resistance};" \n
+ " _unit = ['WFBE_GUERSOLDIER' Call GetNamespace,WF_ResistanceDefenseTeam,(getPos _x),resistance] Call CreateMan;" \n
+ " _unit assignAsGunner _x;" \n
+ " [_unit] orderGetIn true;" \n
+ " _unit moveInGunner _x;" \n
+ " [WF_ResistanceDefenseTeam, 350, _unit] Call RevealArea;" \n
+ " };" \n
+ " } forEach _resistance_defenses;" \n
+ "};" \n
+ "" \n
+ "_resistance_active = true;" \n
+ "_resistance_teams = [];" \n
+ "_resistance_vehicles = [];" \n
+ "_ci = 0;" \n
+ "" \n
+ "//--- Create the teams." \n
+ "{ " \n
+ " _camp = objNull;" \n
+ " if (_ci < _totalCamps) then {" \n
+ " _position = ([getPos (_camps select _ci),8,40] Call GetRandomPosition);" \n
+ " _camp = _camps select _ci;" \n
+ " _ci = _ci + 1;" \n
+ " } else {" \n
+ " _position = ([getPos _location, _location_rangespawn, _location_rangepatrol] Call GetRandomPosition);" \n
+ " };" \n
+ " " \n
+ " _team = createGroup resistance;" \n
+ " _position = [_position, 50] Call GetSafePlace;" \n
+ " " \n
+ " _retVal = [Format[""WFBE_RES%1UNITS"",_x] Call GetNamespace, _position, resistance, paramResVehLock, _team, _probability] Call CreateTeamTemplate;" \n
+ " _vehicles = _retVal select 1;" \n
+ " " \n
+ " emptyQueu = emptyQueu + _vehicles;" \n
+ " {_x Spawn HandleEmptyVehicle} forEach _vehicles;" \n
+ " " \n
+ " _resistance_vehicles = _resistance_vehicles + _vehicles;" \n
+ " _resistance_teams = _resistance_teams + [_team];" \n
+ " " \n
+ " [_team, 350, _position] Call RevealArea;" \n
+ " [_location,_team,RESISTANCEID,_camp,false] ExecFSM ""Server\FSM\townpatrol.fsm"";" \n
+ " if (paramUPSMON) then {[(leader _team),Format ['UPSMON_TOWN_%1',str _location],""move"",""nofollow"",""fortify"",""reinforcement""] Spawn UPSMON};" \n
+ "} forEach _resistance_teamtypes;"/*%FSM</STATEINIT""">*/;
+ precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
+ class Links
+ {
+ /*%FSM<LINK "No_Civilians">*/
+ class No_Civilians
+ {
+ priority = 0.000000;
+ to="Skip_2";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/"!_civilians_enabled"/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ /*%FSM<LINK "Civilians">*/
+ class Civilians
+ {
+ priority = 0.000000;
+ to="Create_Civilians";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/"_civilians_enabled"/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ };
+ };
+ /*%FSM</STATE>*/
+ /*%FSM<STATE "Filter_Out">*/
+ class Filter_Out
+ {
+ name = "Filter_Out";
+ init = /*%FSM<STATEINIT""">*/"_isAirOnly = false;" \n
+ "if !(_occupation_aaactive) then {" \n
+ " _objects = _location nearEntities[[""Air""],_location_range*1.5];" \n
+ " _objects = [_objects Call GetLiveUnits,200,25] Call GetUnitsBelowHeight;" \n
+ "" \n
+ " _airEnemies = if (_side == East) then {(West countSide _objects) + (Resistance countSide _objects)} else {(East countSide _objects) + (Resistance countSide _objects)};" \n
+ " _isAirOnly = if (_airEnemies == _occupationEnemies) then {true} else {false};" \n
+ "};"/*%FSM</STATEINIT""">*/;
+ precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
+ class Links
+ {
+ /*%FSM<LINK "Air">*/
+ class Air
+ {
+ priority = 0.000000;
+ to="Create_AA_Teams";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/"_isAirOnly"/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ /*%FSM<LINK "Ground">*/
+ class Ground
+ {
+ priority = 0.000000;
+ to="Create_Teams_1";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/"!_isAirOnly"/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ };
+ };
+ /*%FSM</STATE>*/
+ /*%FSM<STATE "Reinforce">*/
+ class Reinforce
+ {
+ name = "Reinforce";
+ init = /*%FSM<STATEINIT""">*/"_resistance_lastreinforcement = time;" \n
+ "" \n
+ "//--- Create the team." \n
+ "_position = ([getPos _location, _location_rangespawn, _location_rangepatrol] Call GetRandomPosition);" \n
+ "_near = _position nearEntities 75;" \n
+ "_ctx = (east countSide _near) + (west countSide _near);" \n
+ "_i = 0;" \n
+ "while {_ctx > 0 && _i < 400} do {" \n
+ " _position = ([getPos _location, _location_rangespawn + 200, _location_rangepatrol] Call GetRandomPosition);" \n
+ " _near = _position nearEntities 75;" \n
+ " _ctx = (east countSide _near) + (west countSide _near);" \n
+ " _i = _i + 1;" \n
+ "};" \n
+ "" \n
+ "_team = createGroup resistance;" \n
+ "_position = [_position, 50] Call GetSafePlace;" \n
+ "" \n
+ "_retVal = [Format[""WFBE_RES%1UNITS"",_resistance_teamtypes select round (random ((count _resistance_teamtypes)-1))] Call GetNamespace, _position, resistance, paramResVehLock, _team, _probability] Call CreateTeamTemplate;" \n
+ "_vehicles = _retVal select 1;" \n
+ "" \n
+ "emptyQueu = emptyQueu + _vehicles;" \n
+ "{_x Spawn HandleEmptyVehicle} forEach _vehicles;" \n
+ "" \n
+ "_resistance_vehicles = _resistance_vehicles + _vehicles;" \n
+ "_resistance_teams = _resistance_teams + [_team];" \n
+ "" \n
+ "[_team, 350, _position] Call RevealArea;" \n
+ "[_location,_team,RESISTANCEID,objNull,true] ExecFSM ""Server\FSM\townpatrol.fsm"";" \n
+ "if (paramUPSMON) then {[(leader _team),Format ['UPSMON_TOWN_%1',str _location],""move"",""nofollow"",""fortify"",""reinforcement""] Spawn UPSMON};" \n
+ "" \n
+ "_existing = _location getVariable ""reinforcements"";" \n
+ "_location setVariable [""reinforcements"",_existing + 1];"/*%FSM</STATEINIT""">*/;
+ precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
+ class Links
+ {
+ /*%FSM<LINK "_">*/
+ class _
+ {
+ priority = 0.000000;
+ to="Resistance_Clean";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/""/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ };
+ };
+ /*%FSM</STATE>*/
+ /*%FSM<STATE "Reinforce_1">*/
+ class Reinforce_1
+ {
+ name = "Reinforce_1";
+ init = /*%FSM<STATEINIT""">*/"_occupation_lastreinforcement = time;" \n
+ "" \n
+ "//--- Create the team." \n
+ "_position = ([getPos _location, _location_rangespawn, _location_rangepatrol] Call GetRandomPosition);" \n
+ "_near = _position nearEntities 75;" \n
+ "_ctx = (east countSide _near) + (west countSide _near);" \n
+ "_i = 0;" \n
+ "while {_ctx > 0 && _i < 400} do {" \n
+ " _position = ([getPos _location, _location_rangespawn + 200, _location_rangepatrol] Call GetRandomPosition);" \n
+ " _near = _position nearEntities 75;" \n
+ " _ctx = (east countSide _near) + (west countSide _near);" \n
+ " _i = _i + 1;" \n
+ "};" \n
+ "" \n
+ "_team = createGroup _side;" \n
+ "_position = [_position, 50] Call GetSafePlace;" \n
+ "" \n
+ "_occupation_teamtypes = [_location getVariable 'supplyValue'] Call SelectOccupTeam;" \n
+ "" \n
+ "_retVal = [Format[""WFBE_%1%2UNITS"",str _side, _occupation_teamtypes select round (random ((count _occupation_teamtypes)-1))] Call GetNamespace, _position, _side, true, _team, _probability] Call CreateTeamTemplate;" \n
+ "_vehicles = _retVal select 1;" \n
+ "" \n
+ "_built = count(_retVal select 0);" \n
+ "_builtveh = count _vehicles;" \n
+ "" \n
+ "emptyQueu = emptyQueu + _vehicles;" \n
+ "{_x Spawn HandleEmptyVehicle; _x setVariable [""WFBE_Taxi_Prohib"", true]} forEach _vehicles;" \n
+ "" \n
+ "_occupation_vehicles = _occupation_vehicles + _vehicles;" \n
+ "_occupation_teams = _occupation_teams + [_team];" \n
+ "" \n
+ "[_team, 350, _position] Call RevealArea;" \n
+ "[_location,_team,_sideID,objNull,true] ExecFSM ""Server\FSM\townpatrol.fsm"";" \n
+ "if (paramUPSMON) then {[(leader _team),Format ['UPSMON_TOWN_%1',str _location],""move"",""nofollow"",""fortify"",""reinforcement""] Spawn UPSMON};" \n
+ "" \n
+ "if (_built > 0) then {[str _side,'UnitsCreated',_built] Call UpdateStatistics};" \n
+ "if (_builtveh > 0) then {[str _side,'VehiclesCreated',_builtveh] Call UpdateStatistics};" \n
+ "" \n
+ "_existing = _location getVariable ""reinforcements_occ"";" \n
+ "_location setVariable [""reinforcements_occ"",_existing + 1];"/*%FSM</STATEINIT""">*/;
+ precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
+ class Links
+ {
+ /*%FSM<LINK "_">*/
+ class _
+ {
+ priority = 0.000000;
+ to="Resistance_Clean";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/""/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ };
+ };
+ /*%FSM</STATE>*/
+ /*%FSM<STATE "Resistance_Clean">*/
+ class Resistance_Clean
+ {
+ name = "Resistance_Clean";
+ init = /*%FSM<STATEINIT""">*/""/*%FSM</STATEINIT""">*/;
+ precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
+ class Links
+ {
+ /*%FSM<LINK "Skip">*/
+ class Skip
+ {
+ priority = 1.000000;
+ to="Occupation_Clean";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/"!_resistance_active"/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ /*%FSM<LINK "Activity">*/
+ class Activity
+ {
+ priority = 0.000000;
+ to="Check_Time";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/"_resistance_active"/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ };
+ };
+ /*%FSM</STATE>*/
+ /*%FSM<STATE "Check_Time">*/
+ class Check_Time
+ {
+ name = "Check_Time";
+ init = /*%FSM<STATEINIT""">*/""/*%FSM</STATEINIT""">*/;
+ precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
+ class Links
+ {
+ /*%FSM<LINK "Wait">*/
+ class Wait
+ {
+ priority = 0.000000;
+ to="Occupation_Clean";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/"time - _resistance_inactive <= _resistance_inactivetime"/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ /*%FSM<LINK "Ready">*/
+ class Ready
+ {
+ priority = 0.000000;
+ to="Remove_Resistanc";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/"time - _resistance_inactive > _resistance_inactivetime"/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ };
+ };
+ /*%FSM</STATE>*/
+ /*%FSM<STATE "Occupation_Clean">*/
+ class Occupation_Clean
+ {
+ name = "Occupation_Clean";
+ init = /*%FSM<STATEINIT""">*/""/*%FSM</STATEINIT""">*/;
+ precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
+ class Links
+ {
+ /*%FSM<LINK "Skip">*/
+ class Skip
+ {
+ priority = 0.000000;
+ to="_";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/"!_occupation_active && !_occupation_aaactive"/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ /*%FSM<LINK "Activity">*/
+ class Activity
+ {
+ priority = 0.000000;
+ to="Check_Time_1";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/"_occupation_active || _occupation_aaactive"/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ };
+ };
+ /*%FSM</STATE>*/
+ /*%FSM<STATE "Check_Time_1">*/
+ class Check_Time_1
+ {
+ name = "Check_Time_1";
+ init = /*%FSM<STATEINIT""">*/""/*%FSM</STATEINIT""">*/;
+ precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
+ class Links
+ {
+ /*%FSM<LINK "Wait">*/
+ class Wait
+ {
+ priority = 0.000000;
+ to="_";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/"time - _occupation_inactive <= _occupation_inactivetime"/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ /*%FSM<LINK "Ready">*/
+ class Ready
+ {
+ priority = 0.000000;
+ to="Remove_Occupatio";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/"time - _occupation_inactive > _occupation_inactivetime"/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ };
+ };
+ /*%FSM</STATE>*/
+ /*%FSM<STATE "Skip">*/
+ class Skip
+ {
+ name = "Skip";
+ init = /*%FSM<STATEINIT""">*/""/*%FSM</STATEINIT""">*/;
+ precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
+ class Links
+ {
+ /*%FSM<LINK "_">*/
+ class _
+ {
+ priority = 0.000000;
+ to="Resistance_Clean";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/""/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ };
+ };
+ /*%FSM</STATE>*/
+ /*%FSM<STATE "Skip_1">*/
+ class Skip_1
+ {
+ name = "Skip_1";
+ init = /*%FSM<STATEINIT""">*/""/*%FSM</STATEINIT""">*/;
+ precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
+ class Links
+ {
+ /*%FSM<LINK "_">*/
+ class _
+ {
+ priority = 0.000000;
+ to="Resistance_Clean";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/""/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ };
+ };
+ /*%FSM</STATE>*/
+ /*%FSM<STATE "_">*/
+ class _
+ {
+ name = "_";
+ init = /*%FSM<STATEINIT""">*/""/*%FSM</STATEINIT""">*/;
+ precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
+ class Links
+ {
+ /*%FSM<LINK "Loop">*/
+ class Loop
+ {
+ priority = 0.000000;
+ to="Root";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/"time - _lastUpdate > 5;"/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ };
+ };
+ /*%FSM</STATE>*/
+ /*%FSM<STATE "Create_Teams_1">*/
+ class Create_Teams_1
+ {
+ name = "Create_Teams_1";
+ init = /*%FSM<STATEINIT""">*/"[""HostilesDetectedNear"",_location,_side] Spawn SideMessage;" \n
+ "" \n
+ "_occupation_defenses = _location nearEntities [(Format ['WFBE_%1DEFENSENAMES',str _side] Call GetNamespace),_location_patroldistance*1.4];" \n
+ "if (count _occupation_defenses > 0) then {" \n
+ " //--- Update the defenses." \n
+ " for '_i' from 0 to count(_occupation_defenses)-1 do {" \n
+ " if ((_occupation_defenses select _i) emptyPositions 'gunner' == 0) then {_occupation_defenses = _occupation_defenses - [_occupation_defenses select _i]};" \n
+ " };" \n
+ "" \n
+ " //--- Limit the defenses if we're above the limit." \n
+ " if (count _occupation_defenses > _occupation_manable) then {_occupation_defenses resize (_occupation_manable - 1)};" \n
+ "" \n
+ " _defensiveTeam = Call Compile Format [""WF_Defense%1Grp"",str _side];" \n
+ " if (isNull _defensiveTeam) then {Call Compile Format [""WF_Defense%1Grp = createGroup %1"",str _side];_defensiveTeam = Call Compile Format [""WF_Defense%1Grp"",str _side];};" \n
+ "" \n
+ " //--- Man the defenses." \n
+ " {" \n
+ " _unit = [Format [""WFBE_%1SOLDIER"",str _side] Call GetNamespace,_defensiveTeam,[(getPos _x select 0)+5,getPos _x select 1,0],_side] Call CreateMan;" \n
+ " _unit assignAsGunner _x;" \n
+ " [_unit] orderGetIn true;" \n
+ " _unit moveInGunner _x;" \n
+ " [_defensiveTeam, 350, _unit] Call RevealArea;" \n
+ " } forEach _occupation_defenses;" \n
+ "};" \n
+ "" \n
+ "_occupation_active = true;" \n
+ "_occupation_teamtypes = [_location getVariable 'supplyValue'] Call SelectOccupTeam;" \n
+ "_ci = 0;" \n
+ "_built = 0;" \n
+ "_builtveh = 0;" \n
+ "" \n
+ "//--- Create the teams." \n
+ "{ " \n
+ " _camp = objNull;" \n
+ " if (_ci < _totalCamps) then {" \n
+ " _position = ([getPos (_camps select _ci),8,40] Call GetRandomPosition);" \n
+ " _camp = _camps select _ci;" \n
+ " _ci = _ci + 1;" \n
+ " } else {" \n
+ " _position = ([getPos _location, _location_rangespawn, _location_rangepatrol] Call GetRandomPosition);" \n
+ " };" \n
+ " " \n
+ " _team = createGroup _side;" \n
+ " _position = [_position, 50] Call GetSafePlace;" \n
+ " " \n
+ " _retVal = [Format[""WFBE_%1%2UNITS"",str _side,_x] Call GetNamespace, _position, _side, true, _team, _probability] Call CreateTeamTemplate;" \n
+ " _vehicles = _retVal select 1;" \n
+ " " \n
+ " _built = _built + (count(_retVal select 0));" \n
+ " _builtveh = _builtveh + (count _vehicles);" \n
+ " " \n
+ " emptyQueu = emptyQueu + _vehicles;" \n
+ " {_x Spawn HandleEmptyVehicle; _x setVariable [""WFBE_Taxi_Prohib"", true]} forEach _vehicles;" \n
+ " " \n
+ " _occupation_vehicles = _occupation_vehicles + _vehicles;" \n
+ " _occupation_teams = _occupation_teams + [_team];" \n
+ " " \n
+ " [_team, 350, _position] Call RevealArea;" \n
+ " [_location,_team,_sideID,_camp,false] ExecFSM ""Server\FSM\townpatrol.fsm"";" \n
+ " if (paramUPSMON) then {[(leader _team),Format ['UPSMON_TOWN_%1',str _location],""move"",""nofollow"",""fortify"",""reinforcement""] Spawn UPSMON};" \n
+ "} forEach _occupation_teamtypes;" \n
+ "" \n
+ "if (_built > 0) then {[str _side,'UnitsCreated',_built] Call UpdateStatistics};" \n
+ "if (_builtveh > 0) then {[str _side,'VehiclesCreated',_builtveh] Call UpdateStatistics};"/*%FSM</STATEINIT""">*/;
+ precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
+ class Links
+ {
+ /*%FSM<LINK "_">*/
+ class _
+ {
+ priority = 0.000000;
+ to="Skip_1";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/""/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ };
+ };
+ /*%FSM</STATE>*/
+ /*%FSM<STATE "Create_AA_Teams">*/
+ class Create_AA_Teams
+ {
+ name = "Create_AA_Teams";
+ init = /*%FSM<STATEINIT""">*/"[""HostilesDetectedNear"",_location,_side] Spawn SideMessage;" \n
+ "_occupation_aaactive = true;" \n
+ "" \n
+ "_currentSV = _location getVariable ""supplyValue"";" \n
+ "_type = 'Small';" \n
+ "if (_currentSV < _occupation_aasvfloor1) then {_type = 'Small'};" \n
+ "if (_currentSV >= _occupation_aasvfloor1 && _currentSV < _occupation_aasvfloor2) then {_type = 'Medium'};" \n
+ "if (_currentSV > _occupation_aasvfloor2) then {_type = 'Large'};" \n
+ "" \n
+ "_grps = 1 + floor(_occupation_difficulty/2);" \n
+ "if (_type == 'Small') then {_grps = _grps + 1};" \n
+ "" \n
+ "_built = 0;" \n
+ "_builtveh = 0;" \n
+ "" \n
+ "//--- Create the teams." \n
+ "for '_i' from 0 to _grps do {" \n
+ " _position = ([getPos _location, _location_rangespawn, _location_rangepatrol] Call GetRandomPosition);" \n
+ " " \n
+ " _effectiveType = _type;" \n
+ " if (_i > 2) then {" \n
+ " if (_type == 'Medium' && random 100 > 75) then {_effectiveType = ['Small','Medium'] select round(random 1)};" \n
+ " if (_type == 'Large' && random 100 > 70) then {_effectiveType = ['Small','Medium','Large'] select round(random 2)};" \n
+ " };" \n
+ " " \n
+ " _team = createGroup _side;" \n
+ " _position = [_position, 50] Call GetSafePlace;" \n
+ " " \n
+ " _retVal = [Format [""WFBE_%1%2AATEAMUNITS"",_side,_effectiveType] Call GetNamespace, _position, _side, true, _team, _probability] Call CreateTeamTemplate;" \n
+ " _vehicles = _retVal select 1;" \n
+ " " \n
+ " _built = _built + (count(_retVal select 0));" \n
+ " _builtveh = _builtveh + (count _vehicles);" \n
+ " " \n
+ " emptyQueu = emptyQueu + _vehicles;" \n
+ " {_x Spawn HandleEmptyVehicle; _x setVariable [""WFBE_Taxi_Prohib"", true]} forEach _vehicles;" \n
+ " " \n
+ " _occupation_vehicles = _occupation_vehicles + _vehicles;" \n
+ " _occupation_teams = _occupation_teams + [_team];" \n
+ " " \n
+ " [_location,_team,_sideID,objNull,false] ExecFSM ""Server\FSM\townpatrol.fsm"";" \n
+ " " \n
+ " //--- AA Team are well informed about air units." \n
+ " {_team reveal _x} forEach _objects;" \n
+ "" \n
+ " //--- Use UPSMON AI if enabled." \n
+ " if (paramUPSMON) then {[(leader _team),Format ['UPSMON_TOWN_%1',str _location],""move"",""nofollow"",""reinforcement""] Spawn UPSMON};" \n
+ "};" \n
+ "" \n
+ "if (_built > 0) then {[str _side,'UnitsCreated',_built] Call UpdateStatistics};" \n
+ "if (_builtveh > 0) then {[str _side,'VehiclesCreated',_builtveh] Call UpdateStatistics};"/*%FSM</STATEINIT""">*/;
+ precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
+ class Links
+ {
+ /*%FSM<LINK "_">*/
+ class _
+ {
+ priority = 0.000000;
+ to="Skip_1";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/""/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ };
+ };
+ /*%FSM</STATE>*/
+ /*%FSM<STATE "Create_Civilians">*/
+ class Create_Civilians
+ {
+ name = "Create_Civilians";
+ init = /*%FSM<STATEINIT""">*/"_civilians_teams = [];" \n
+ "" \n
+ "//--- Create the teams." \n
+ "for '_i' from 0 to _civilians_coef do {" \n
+ " _position = ([getPos _location, _location_rangespawn, _location_rangepatrol] Call GetRandomPosition);" \n
+ " " \n
+ " _team = createGroup civilian;" \n
+ " _position = [_position, 50] Call GetSafePlace;" \n
+ " " \n
+ " _unitTypes = Format[""WFBE_CIV%1%2UNITS"",_civilians_teamstype,(1+round(random 3))] Call GetNamespace;" \n
+ " " \n
+ " {" \n
+ " _unit = _team createUnit [_x,_position,[],0.4,""FORM""];" \n
+ " _unit addEventHandler ['Killed',{[_this select 0,_this select 1] Spawn CivilianKilled}];" \n
+ " } forEach _unitTypes;" \n
+ "" \n
+ " _civilians_teams = _civilians_teams + [_team];" \n
+ " " \n
+ " [_team,_location,(_location_patroldistance/2)] Spawn AITownPatrol;" \n
+ "};"/*%FSM</STATEINIT""">*/;
+ precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
+ class Links
+ {
+ /*%FSM<LINK "_">*/
+ class _
+ {
+ priority = 0.000000;
+ to="Skip";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/""/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ };
+ };
+ /*%FSM</STATE>*/
+ /*%FSM<STATE "Skip_2">*/
+ class Skip_2
+ {
+ name = "Skip_2";
+ init = /*%FSM<STATEINIT""">*/""/*%FSM</STATEINIT""">*/;
+ precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
+ class Links
+ {
+ /*%FSM<LINK "_">*/
+ class _
+ {
+ priority = 0.000000;
+ to="Skip";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/""/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ };
+ };
+ /*%FSM</STATE>*/
+ /*%FSM<STATE "End">*/
+ class End
+ {
+ name = "End";
+ init = /*%FSM<STATEINIT""">*/""/*%FSM</STATEINIT""">*/;
+ precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
+ class Links
+ {
+ };
+ };
+ /*%FSM</STATE>*/
+ /*%FSM<STATE "Remove_Resistanc">*/
+ class Remove_Resistanc
+ {
+ name = "Remove_Resistanc";
+ init = /*%FSM<STATEINIT""">*/"_resistance_active = false;" \n
+ "" \n
+ "//--- Teams Units." \n
+ "{" \n
+ " if !(isNil '_x') then {" \n
+ " if !(isNull _x) then {" \n
+ " {deleteVehicle _x} forEach units _x;" \n
+ " deleteGroup _x;" \n
+ " };" \n
+ " };" \n
+ "} forEach _resistance_teams;" \n
+ "" \n
+ "//--- Teams vehicles." \n
+ "{" \n
+ " if (!isPlayer _x && side _x == resistance) then {deleteVehicle _x};" \n
+ "} forEach _resistance_vehicles;" \n
+ "" \n
+ "if (paramResReinf) then {_location setVariable [""reinforcements_alive"",0]};" \n
+ "" \n
+ "if (_civilians_enabled) then {" \n
+ " {" \n
+ " if !(isNil '_x') then {" \n
+ " if !(isNull _x) then {" \n
+ " {deleteVehicle _x} forEach units _x;" \n
+ " deleteGroup _x;" \n
+ " };" \n
+ " };" \n
+ " } forEach _civilians_teams;" \n
+ "};"/*%FSM</STATEINIT""">*/;
+ precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
+ class Links
+ {
+ /*%FSM<LINK "_">*/
+ class _
+ {
+ priority = 0.000000;
+ to="Occupation_Clean";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/""/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ };
+ };
+ /*%FSM</STATE>*/
+ /*%FSM<STATE "Remove_Occupatio">*/
+ class Remove_Occupatio
+ {
+ name = "Remove_Occupatio";
+ init = /*%FSM<STATEINIT""">*/"_occupation_active = false;" \n
+ "_occupation_aaactive = false;" \n
+ "" \n
+ "//--- Teams Units." \n
+ "{" \n
+ " if !(isNil '_x') then {" \n
+ " if !(isNull _x) then {" \n
+ " {deleteVehicle _x} forEach units _x;" \n
+ " deleteGroup _x;" \n
+ " };" \n
+ " };" \n
+ "} forEach _occupation_teams;" \n
+ "" \n
+ "//--- Teams vehicles." \n
+ "{" \n
+ " if !(isPlayer _x) then {deleteVehicle _x};" \n
+ "} forEach _occupation_vehicles;" \n
+ "" \n
+ "if (paramOccReinf) then {_location setVariable [""reinforcements_occ"",0]};" \n
+ "" \n
+ "{" \n
+ " if (!isNull(Gunner _x) && !isPlayer(Gunner _x)) then {" \n
+ " _unit = (gunner _x);" \n
+ " if (group _unit == _defensiveTeam) then {" \n
+ " _unit setPos (getpos _x);" \n
+ " deleteVehicle _unit;" \n
+ " };" \n
+ " };" \n
+ "} forEach _occupation_defenses;" \n
+ "_occupation_defenses = [];" \n
+ "_defensiveTeam = objNull;" \n
+ "" \n
+ "_occupation_teams = [];" \n
+ "_occupation_vehicles = [];"/*%FSM</STATEINIT""">*/;
+ precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
+ class Links
+ {
+ /*%FSM<LINK "_">*/
+ class _
+ {
+ priority = 0.000000;
+ to="_";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/""/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ };
+ };
+ /*%FSM</STATE>*/
+ /*%FSM<STATE "Occupation_Etat">*/
+ class Occupation_Etat
+ {
+ name = "Occupation_Etat";
+ init = /*%FSM<STATEINIT""">*/""/*%FSM</STATEINIT""">*/;
+ precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
+ class Links
+ {
+ /*%FSM<LINK "Occupation">*/
+ class Occupation
+ {
+ priority = 0.000000;
+ to="Enemies_1";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/"paramOccup"/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ /*%FSM<LINK "No_Occupation">*/
+ class No_Occupation
+ {
+ priority = 0.000000;
+ to="Idle";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/"!paramOccup"/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ };
+ };
+ /*%FSM</STATE>*/
+ /*%FSM<STATE "Idle">*/
+ class Idle
+ {
+ name = "Idle";
+ init = /*%FSM<STATEINIT""">*/""/*%FSM</STATEINIT""">*/;
+ precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
+ class Links
+ {
+ /*%FSM<LINK "Loop">*/
+ class Loop
+ {
+ priority = 0.000000;
+ to="Root";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/"time - _lastUpdate > 5;"/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ };
+ };
+ /*%FSM</STATE>*/
+ /*%FSM<STATE "Resistance_Etat">*/
+ class Resistance_Etat
+ {
+ name = "Resistance_Etat";
+ init = /*%FSM<STATEINIT""">*/""/*%FSM</STATEINIT""">*/;
+ precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
+ class Links
+ {
+ /*%FSM<LINK "No_Resistance">*/
+ class No_Resistance
+ {
+ priority = 0.000000;
+ to="Idle_1";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/"!paramRes"/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ /*%FSM<LINK "Resistance">*/
+ class Resistance
+ {
+ priority = 0.000000;
+ to="Enemies";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/"paramRes"/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ };
+ };
+ /*%FSM</STATE>*/
+ /*%FSM<STATE "Idle_1">*/
+ class Idle_1
+ {
+ name = "Idle_1";
+ init = /*%FSM<STATEINIT""">*/""/*%FSM</STATEINIT""">*/;
+ precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
+ class Links
+ {
+ /*%FSM<LINK "Loop">*/
+ class Loop
+ {
+ priority = 0.000000;
+ to="Root";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/"time - _lastUpdate > 5;"/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ };
+ };
+ /*%FSM</STATE>*/
+ };
+ initState="Init";
+ finalStates[] =
+ {
+ "End",
+ };
+};
+/*%FSM</COMPILE>*/ \ No newline at end of file
diff --git a/Server/FSM/updatetowndefenses.fsm b/Server/FSM/updatetowndefenses.fsm
new file mode 100644
index 0000000..b99616f
--- /dev/null
+++ b/Server/FSM/updatetowndefenses.fsm
@@ -0,0 +1,631 @@
+/*%FSM<COMPILE "D:\ArmA2\FSM Editor Personal Edition\scriptedFSM.cfg, updatetowndefenses">*/
+/*%FSM<HEAD>*/
+/*
+item0[] = {"Init",0,250,-63.339870,-329.544403,26.660130,-279.544769,0.000000,"Init"};
+item1[] = {"End",1,250,-182.368073,-113.480629,-92.368042,-63.480659,0.000000,"End"};
+item2[] = {"Gameover",4,218,-182.650177,-187.482422,-92.650192,-137.482452,0.000000,"Gameover"};
+item3[] = {"_",8,218,-35.668163,-247.514877,-3.862146,-224.939621,0.000000,""};
+item4[] = {"Defense_Core",2,250,-63.405182,-187.376434,26.594841,-137.376434,0.000000,"Defense Core"};
+item5[] = {"Resistance",4,218,-63.096802,-113.322952,26.903198,-63.322945,0.000000,"Resistance"};
+item6[] = {"Skip",4,218,51.723022,-187.995987,141.723053,-137.995987,0.000000,"Skip"};
+item7[] = {"_",8,218,392.190338,-190.067062,423.996338,-167.491791,0.000000,""};
+item8[] = {"Advanced_Defense",2,250,-63.899727,-37.846992,26.100292,12.153011,0.000000,"Advanced" \n "Defense"};
+item9[] = {"Skip",4,218,52.047401,-37.929413,142.047272,12.070588,0.000000,"Skip"};
+item10[] = {"Enemies",4,218,-63.950096,42.576328,26.049911,92.576347,0.000000,"Enemies"};
+item11[] = {"Active",4,218,49.450504,118.698433,139.450470,168.698425,0.000000,"Active"};
+item12[] = {"Update",2,250,-63.949944,119.619461,26.049990,169.619431,0.000000,"Update"};
+item13[] = {"_",2,250,357.586823,-300.604431,447.586670,-250.604416,0.000000,""};
+item14[] = {"Inactive",4,218,-63.968323,202.808212,26.031679,252.808212,0.000000,"Inactive"};
+item15[] = {"Spawn_Res",2,4346,505.445801,202.593475,595.445435,252.593460,0.000000,"Spawn Res"};
+item16[] = {"__1",2,250,173.981140,117.028183,263.981445,167.028183,0.000000,""};
+item17[] = {"Reinf_",4,218,321.587677,117.539032,411.587677,167.539017,0.000000,"Reinf?"};
+item18[] = {"no_Reinf",4,218,173.933121,40.630589,263.933228,90.630539,1.000000,"no Reinf"};
+item19[] = {"Reinforce",2,250,321.791260,38.423203,411.791290,88.423172,0.000000,"Reinforce"};
+item20[] = {"Passive",4,218,212.037048,-299.501312,302.036926,-249.501312,0.000000,"Passive"};
+item21[] = {"Active",4,218,358.437775,-380.021667,448.437714,-330.021667,0.000000,"Active"};
+item22[] = {"__2",2,250,96.136414,-339.761383,186.136520,-289.761505,0.000000,""};
+item23[] = {"__3",2,250,358.437653,-452.002045,448.437714,-402.002045,0.000000,""};
+item24[] = {"Time___1",4,218,215.696960,-494.702240,305.696960,-444.702209,0.000000,"Time >"};
+item25[] = {"Time__",4,218,210.816925,-367.821625,300.816895,-317.821625,0.000000,"Time <"};
+item26[] = {"Delete",2,250,90.036407,-493.482239,180.036377,-443.482239,0.000000,"Delete"};
+item27[] = {"Civilians",4,218,438.384674,124.400330,528.384521,174.400330,0.000000,"Civilians"};
+item28[] = {"No_Civilians",4,218,569.764099,125.541168,659.764099,175.541046,0.000000,"No Civilians"};
+item29[] = {"Spawn_Civilians",2,250,438.011932,38.918774,528.011597,88.918900,0.000000,"Spawn Civilians"};
+link0[] = {0,3};
+link1[] = {2,1};
+link2[] = {3,4};
+link3[] = {4,2};
+link4[] = {4,5};
+link5[] = {4,6};
+link6[] = {5,8};
+link7[] = {6,13};
+link8[] = {7,13};
+link9[] = {8,9};
+link10[] = {8,10};
+link11[] = {9,13};
+link12[] = {10,12};
+link13[] = {11,16};
+link14[] = {12,11};
+link15[] = {12,14};
+link16[] = {13,20};
+link17[] = {13,21};
+link18[] = {14,15};
+link19[] = {15,27};
+link20[] = {15,28};
+link21[] = {16,17};
+link22[] = {16,18};
+link23[] = {17,19};
+link24[] = {18,13};
+link25[] = {19,7};
+link26[] = {20,22};
+link27[] = {21,23};
+link28[] = {22,3};
+link29[] = {23,24};
+link30[] = {23,25};
+link31[] = {24,26};
+link32[] = {25,22};
+link33[] = {26,3};
+link34[] = {27,29};
+link35[] = {28,13};
+link36[] = {29,7};
+globals[] = {0.000000,0,0,0,0,640,480,1,84,6316128,1,-95.598221,725.231018,310.641174,-552.086548,862,906,1};
+window[] = {2,-1,-1,-1,-1,912,148,1473,71,3,880};
+*//*%FSM</HEAD>*/
+class FSM
+{
+ fsmName = "updatetowndefenses";
+ class States
+ {
+ /*%FSM<STATE "Init">*/
+ class Init
+ {
+ name = "Init";
+ init = /*%FSM<STATEINIT""">*/"_lastUpdate = time;" \n
+ "" \n
+ "_location = _this select 0;" \n
+ "_resistanceTeamTypes = _this select 1;" \n
+ "_probability = _this select 2;" \n
+ "_detectionRange = _this select 3;" \n
+ "_maxSV = _this select 4;" \n
+ "_name = str _location;" \n
+ "" \n
+ "_camps = _location getVariable 'camps';" \n
+ "_totalCamps = count _camps;" \n
+ "" \n
+ "_patrolRange = _detectionRange * ('WFBE_DETECTIONTOPATROLRANGERATIO' Call GetNamespace);" \n
+ "_resistanceActive = false;" \n
+ "_emptyDefenses = [];" \n
+ "_teams = [];" \n
+ "_vehicles = [];" \n
+ "_position = [];" \n
+ "_timeInactive = 0;" \n
+ "_lastReinf = -500;" \n
+ "_rit = 'WFBE_RESISTANCEINACTIVETIME' Call GetNamespace;" \n
+ "_tupd = 'WFBE_TOWNUNITSPATROLDISTANCE' Call GetNamespace;" \n
+ "_tusr = 'WFBE_TOWNUNITSPAWNRANGE' Call GetNamespace;" \n
+ "_useCivilians = if (('WFBE_CIVILIANFACTION' Call GetNamespace) > 0) then {true} else {false};" \n
+ "" \n
+ "_maxReinforcementTeams = if ((_location getVariable ""supplyValue"")< 60) then {1 + ('WFBE_TOWNRESISTANCEDIFFICULTY' Call GetNamespace)} else {2 + ('WFBE_TOWNRESISTANCEDIFFICULTY' Call GetNamespace)};" \n
+ "_location setVariable [""reinforcements"",0];" \n
+ "" \n
+ "_civTeams = """";" \n
+ "_cTeams = [];" \n
+ "_coef = 1;" \n
+ "if (_useCivilians) then {" \n
+ " if (_maxSV <= 50) then {_civTeams = ""Villagers""};" \n
+ " if (_maxSV > 50 && _maxSV < 120) then {_civTeams = ""Citizen"";_coef = 2};" \n
+ " if (_maxSV >= 120) then {_civTeams = ""LargeCitizen"";_coef = 3};" \n
+ "};" \n
+ "" \n
+ "_defenses = _location nearEntities['WFBE_RESISTANCEDEFENSENAMES' Call GetNamespace,_detectionRange];" \n
+ "{_x addEventHandler [""Killed"",{[_this select 0,_this select 1,resistance] Spawn UnitKilled}]} forEach _defenses;"/*%FSM</STATEINIT""">*/;
+ precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
+ class Links
+ {
+ /*%FSM<LINK "_">*/
+ class _
+ {
+ priority = 0.000000;
+ to="Defense_Core";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/""/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ };
+ };
+ /*%FSM</STATE>*/
+ /*%FSM<STATE "End">*/
+ class End
+ {
+ name = "End";
+ init = /*%FSM<STATEINIT""">*/""/*%FSM</STATEINIT""">*/;
+ precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
+ class Links
+ {
+ };
+ };
+ /*%FSM</STATE>*/
+ /*%FSM<STATE "Defense_Core">*/
+ class Defense_Core
+ {
+ name = "Defense_Core";
+ init = /*%FSM<STATEINIT""">*/"_lastUpdate = time + random(0.2);" \n
+ "" \n
+ "_sideID = _location getVariable ""sideID"";"/*%FSM</STATEINIT""">*/;
+ precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
+ class Links
+ {
+ /*%FSM<LINK "Resistance">*/
+ class Resistance
+ {
+ priority = 0.000000;
+ to="Advanced_Defense";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/"!gameOver && time - _lastUpdate > 10 && _sideID == RESISTANCEID"/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ /*%FSM<LINK "Skip">*/
+ class Skip
+ {
+ priority = 0.000000;
+ to="_";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/"!gameOver && time - _lastUpdate > 10 && _sideID != RESISTANCEID"/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ /*%FSM<LINK "Gameover">*/
+ class Gameover
+ {
+ priority = 0.000000;
+ to="End";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/"gameOver"/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ };
+ };
+ /*%FSM</STATE>*/
+ /*%FSM<STATE "Advanced_Defense">*/
+ class Advanced_Defense
+ {
+ name = "Advanced_Defense";
+ init = /*%FSM<STATEINIT""">*/"_objects = _location nearEntities[[eastSoldierBaseClass,westSoldierBaseClass,""Car"",""Motorcycle"",""Tank"",""Air""],_detectionRange];" \n
+ "_objects = [_objects Call GetLiveUnits,200] Call GetUnitsBelowHeight;" \n
+ "_enemies = (West countSide _objects) + (East countSide _objects);"/*%FSM</STATEINIT""">*/;
+ precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
+ class Links
+ {
+ /*%FSM<LINK "Enemies">*/
+ class Enemies
+ {
+ priority = 0.000000;
+ to="Update";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/"_enemies > 0"/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ /*%FSM<LINK "Skip">*/
+ class Skip
+ {
+ priority = 0.000000;
+ to="_";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/"_enemies <= 0"/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ };
+ };
+ /*%FSM</STATE>*/
+ /*%FSM<STATE "Update">*/
+ class Update
+ {
+ name = "Update";
+ init = /*%FSM<STATEINIT""">*/"_timeInactive = time;"/*%FSM</STATEINIT""">*/;
+ precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
+ class Links
+ {
+ /*%FSM<LINK "Inactive">*/
+ class Inactive
+ {
+ priority = 0.000000;
+ to="Spawn_Res";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/"!_resistanceActive"/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ /*%FSM<LINK "Active">*/
+ class Active
+ {
+ priority = 0.000000;
+ to="__1";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/"_resistanceActive"/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ };
+ };
+ /*%FSM</STATE>*/
+ /*%FSM<STATE "_">*/
+ class _
+ {
+ name = "_";
+ init = /*%FSM<STATEINIT""">*/""/*%FSM</STATEINIT""">*/;
+ precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
+ class Links
+ {
+ /*%FSM<LINK "Active">*/
+ class Active
+ {
+ priority = 0.000000;
+ to="__3";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/"_resistanceActive"/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ /*%FSM<LINK "Passive">*/
+ class Passive
+ {
+ priority = 0.000000;
+ to="__2";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/"!_resistanceActive"/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ };
+ };
+ /*%FSM</STATE>*/
+ /*%FSM<STATE "Spawn_Res">*/
+ class Spawn_Res
+ {
+ name = "Spawn_Res";
+ init = /*%FSM<STATEINIT""">*/"_teamCount = 0;" \n
+ "_totalTeams = count _resistanceTeamTypes;" \n
+ "_emptyDefenses = [];" \n
+ "" \n
+ "{if ((_x EmptyPositions ""gunner"" > 0)&&(alive _x)) then {_emptyDefenses = _emptyDefenses + [_x]}} forEach _defenses;" \n
+ "{" \n
+ " if (isNull WF_ResistanceDefenseTeam) then {WF_ResistanceDefenseTeam = createGroup resistance};" \n
+ " _unit = ['WFBE_GUERSOLDIER' Call GetNamespace,WF_ResistanceDefenseTeam,(getPos _x),resistance] Call CreateMan;" \n
+ " [_unit] allowGetIn true;" \n
+ " _unit assignAsGunner _x;" \n
+ " [_unit] orderGetIn true;" \n
+ " _unit moveInGunner _x;" \n
+ " [WF_ResistanceDefenseTeam, 350, _unit] Call RevealArea;" \n
+ "} forEach _emptyDefenses;" \n
+ "" \n
+ "_ci = 0;" \n
+ "while {_teamCount < _totalTeams} do {" \n
+ " _resistanceActive = true;" \n
+ " _unitTypes = Format[""WFBE_RES%1UNITS"",_resistanceTeamTypes select _teamCount] Call GetNamespace;" \n
+ " _leaderName = _unitTypes select 0;" \n
+ " _camp = objNull;" \n
+ " if (_ci < _totalCamps) then {" \n
+ " _position = ([getPos (_camps select _ci),8,40] Call GetRandomPosition);" \n
+ " _camp = _camps select _ci;" \n
+ " } else {" \n
+ " _position = ([getPos _location,_tusr,_patrolRange] Call GetRandomPosition);" \n
+ " };" \n
+ " _team = createGroup Resistance;" \n
+ " _leader = [_leaderName,_team,_position,resistance] Call CreateMan;" \n
+ " [_leader,_position,50] Call PlaceSafe;" \n
+ " _position = getPos _leader;" \n
+ " _teams = _teams + [_team];" \n
+ " _count = 1;" \n
+ " _total = count _unitTypes;" \n
+ " while {_count < _total} do {" \n
+ " _unitName = _unitTypes select _count;" \n
+ " if (random(100) < _probability) then {" \n
+ " if (_unitName isKindOf ""Man"") then {" \n
+ " _unit = [_unitName,_team,_position,resistance] Call CreateMan;" \n
+ " } else {" \n
+ " _vehicle = [_unitName,_position,resistance,paramResVehLock] Call CreateVehi;" \n
+ " _vehicles = _vehicles + [_vehicle];" \n
+ " emptyQueu = emptyQueu + [_vehicle];" \n
+ " _vehicle Spawn HandleEmptyVehicle;" \n
+ " _continue = true;" \n
+ " if (vehicle _leader == _leader) then {_leader moveInDriver _vehicle;_continue = false};" \n
+ " _type = if (_vehicle isKindOf 'Man') then {'WFBE_GUERSOLDIER' Call GetNamespace} else {if (_vehicle isKindOf 'Air') then {'WFBE_GUERPILOT' Call GetNamespace} else {'WFBE_GUERCREW' Call GetNamespace}};" \n
+ " if (_continue) then {_driver = [_type,_team,_position,resistance] Call CreateMan;_driver moveInDriver _vehicle};" \n
+ " if (_vehicle emptyPositions ""gunner"" > 0) then {_gunner = [_type,_team,_position,resistance] Call CreateMan;_gunner moveInGunner _vehicle};" \n
+ " if (_vehicle emptyPositions ""commander"" > 0) then {_commander = [_type,_team,_position,resistance] Call CreateMan;_commander moveInCommander _vehicle};" \n
+ " };" \n
+ " };" \n
+ " _count = _count + 1;" \n
+ " };" \n
+ " [_team, 350, _position] Call RevealArea;" \n
+ " [_location,_team,RESISTANCEID,_camp,false] ExecFSM ""Server\FSM\townpatrol.fsm"";" \n
+ " if (paramUPSMON) then {[(leader _team),Format ['UPSMON_TOWN_%1',str _location],""move"",""nofollow"",""fortify"",""reinforcement""] Spawn UPSMON};" \n
+ " _teamCount = _teamCount + 1;" \n
+ " _ci = _ci + 1;" \n
+ "};"/*%FSM</STATEINIT""">*/;
+ precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
+ class Links
+ {
+ /*%FSM<LINK "No_Civilians">*/
+ class No_Civilians
+ {
+ priority = 0.000000;
+ to="_";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/"!_useCivilians"/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ /*%FSM<LINK "Civilians">*/
+ class Civilians
+ {
+ priority = 0.000000;
+ to="Spawn_Civilians";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/"_useCivilians"/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ };
+ };
+ /*%FSM</STATE>*/
+ /*%FSM<STATE "__1">*/
+ class __1
+ {
+ name = "__1";
+ init = /*%FSM<STATEINIT""">*/""/*%FSM</STATEINIT""">*/;
+ precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
+ class Links
+ {
+ /*%FSM<LINK "no_Reinf">*/
+ class no_Reinf
+ {
+ priority = 1.000000;
+ to="_";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/"!paramResReinf || (_location getVariable ""reinforcements"") >= _maxReinforcementTeams || time - _lastReinf <= 300"/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ /*%FSM<LINK "Reinf_">*/
+ class Reinf_
+ {
+ priority = 0.000000;
+ to="Reinforce";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/"paramResReinf && (_location getVariable ""reinforcements"") < _maxReinforcementTeams && time - _lastReinf > 300"/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ };
+ };
+ /*%FSM</STATE>*/
+ /*%FSM<STATE "Reinforce">*/
+ class Reinforce
+ {
+ name = "Reinforce";
+ init = /*%FSM<STATEINIT""">*/"_lastReinf = time;" \n
+ "_unitTypes = Format[""WFBE_RES%1UNITS"",_resistanceTeamTypes select round (random ((count _resistanceTeamTypes)-1))] Call GetNamespace;" \n
+ "_leaderName = _unitTypes select 0;" \n
+ "_position = ([getPos _location,_tusr + 150,_patrolRange] Call GetRandomPosition);" \n
+ "_near = _position nearEntities 75;" \n
+ "_ctx = (east countSide _near) + (west countSide _near);" \n
+ "_i = 0;" \n
+ "while {_ctx > 0 && _i < 400} do {" \n
+ " _position = ([getPos _location,_tusr + 150,_patrolRange] Call GetRandomPosition);" \n
+ " _near = _position nearEntities 75;" \n
+ " _ctx = (east countSide _near) + (west countSide _near);" \n
+ " _i = _i + 1;" \n
+ "};" \n
+ "_team = createGroup Resistance;" \n
+ "_leader = [_leaderName,_team,_position,resistance] Call CreateMan;" \n
+ "[_leader,_position,50] Call PlaceSafe;" \n
+ "_position = getPos _leader;" \n
+ "_teams = _teams + [_team];" \n
+ "_count = 1;" \n
+ "_total = count _unitTypes;" \n
+ "while {_count < _total} do {" \n
+ " _unitName = _unitTypes select _count;" \n
+ " if (random(100) < _probability) then {" \n
+ " if (_unitName isKindOf ""Man"") then {" \n
+ " _unit = [_unitName,_team,_position,resistance] Call CreateMan;" \n
+ " } else {" \n
+ " _vehicle = [_unitName,_position,resistance,paramResVehLock] Call CreateVehi;" \n
+ " _vehicles = _vehicles + [_vehicle];" \n
+ " _continue = true;" \n
+ " emptyQueu = emptyQueu + [_vehicle];" \n
+ " _vehicle Spawn HandleEmptyVehicle;" \n
+ " if (vehicle _leader == _leader) then {_leader moveInDriver _vehicle;_continue = false};" \n
+ " _type = if (_vehicle isKindOf 'Man') then {'WFBE_GUERSOLDIER' Call GetNamespace} else {if (_vehicle isKindOf 'Air') then {'WFBE_GUERPILOT' Call GetNamespace} else {'WFBE_GUERCREW' Call GetNamespace}};" \n
+ " if (_continue) then {_driver = [_type,_team,_position,resistance] Call CreateMan;_driver moveInDriver _vehicle};" \n
+ " if (_vehicle emptyPositions ""gunner"" > 0) then {_gunner = [_type,_team,_position,resistance] Call CreateMan;_gunner moveInGunner _vehicle};" \n
+ " if (_vehicle emptyPositions ""commander"" > 0) then {_commander = [_type,_team,_position,resistance] Call CreateMan;_commander moveInCommander _vehicle};" \n
+ " };" \n
+ " };" \n
+ " _count = _count + 1;" \n
+ "};" \n
+ "" \n
+ "if (paramUPSMON) then {[(leader _team),Format ['UPSMON_TOWN_%1',str _location],""move"",""nofollow"",""fortify"",""reinforcement""] Spawn UPSMON};" \n
+ "" \n
+ "[_location,_team,RESISTANCEID,objNull,true] ExecFSM ""Server\FSM\townpatrol.fsm"";" \n
+ "" \n
+ "_existing = _location getVariable ""reinforcements"";" \n
+ "_location setVariable [""reinforcements"",_existing + 1];"/*%FSM</STATEINIT""">*/;
+ precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
+ class Links
+ {
+ /*%FSM<LINK "_">*/
+ class _
+ {
+ priority = 0.000000;
+ to="_";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/""/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ };
+ };
+ /*%FSM</STATE>*/
+ /*%FSM<STATE "__2">*/
+ class __2
+ {
+ name = "__2";
+ init = /*%FSM<STATEINIT""">*/""/*%FSM</STATEINIT""">*/;
+ precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
+ class Links
+ {
+ /*%FSM<LINK "_">*/
+ class _
+ {
+ priority = 0.000000;
+ to="Defense_Core";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/""/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ };
+ };
+ /*%FSM</STATE>*/
+ /*%FSM<STATE "__3">*/
+ class __3
+ {
+ name = "__3";
+ init = /*%FSM<STATEINIT""">*/""/*%FSM</STATEINIT""">*/;
+ precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
+ class Links
+ {
+ /*%FSM<LINK "Time__">*/
+ class Time__
+ {
+ priority = 0.000000;
+ to="__2";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/"time - _timeInactive <= _rit"/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ /*%FSM<LINK "Time___1">*/
+ class Time___1
+ {
+ priority = 0.000000;
+ to="Delete";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/"time - _timeInactive > _rit"/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ };
+ };
+ /*%FSM</STATE>*/
+ /*%FSM<STATE "Delete">*/
+ class Delete
+ {
+ name = "Delete";
+ init = /*%FSM<STATEINIT""">*/"_resistanceActive = false;" \n
+ "_count = 0;" \n
+ "_total = Count _teams;" \n
+ "" \n
+ "while {_count < _total} do {" \n
+ " _team = _teams Select _count;" \n
+ " if !(isNil '_team') then {" \n
+ " if !(isNull _team) then {" \n
+ " {deleteVehicle _x} forEach units _team;" \n
+ " deleteGroup _team;" \n
+ " };" \n
+ " };" \n
+ " _count = _count + 1;" \n
+ "};" \n
+ "" \n
+ "{if (side _x != west && side _x != east) then {deleteVehicle _x}} forEach _vehicles;" \n
+ "{if (!isNull(Gunner _x) && !isPlayer(Gunner _x)) then {_unit = (gunner _x);_unit setPos (getpos _x);deleteVehicle _unit}} forEach _defenses;" \n
+ "_vehicles = [];" \n
+ "_teams = [];" \n
+ "" \n
+ "if (paramResReinf) then {_location setVariable [""reinforcements_alive"",0]};" \n
+ "" \n
+ "if (_useCivilians) then {" \n
+ " _count = 0;" \n
+ " _total = count _cTeams;" \n
+ " while {_count < _total} do {" \n
+ " _team = _cTeams select _count;" \n
+ " {deleteVehicle _x} forEach units _team;" \n
+ " deleteGroup _team;" \n
+ " _count = _count + 1;" \n
+ " };" \n
+ " _cTeams = [];" \n
+ "};"/*%FSM</STATEINIT""">*/;
+ precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
+ class Links
+ {
+ /*%FSM<LINK "_">*/
+ class _
+ {
+ priority = 0.000000;
+ to="Defense_Core";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/""/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ };
+ };
+ /*%FSM</STATE>*/
+ /*%FSM<STATE "Spawn_Civilians">*/
+ class Spawn_Civilians
+ {
+ name = "Spawn_Civilians";
+ init = /*%FSM<STATEINIT""">*/"_teamCount = 0;" \n
+ "while {_teamCount < _coef} do {" \n
+ " _unitTypes = Format[""WFBE_CIV%1%2UNITS"",_civTeams,(1+round(random 3))] Call GetNamespace;" \n
+ " _leaderName = _unitTypes select 0;" \n
+ " _position = ([getPos _location,_tusr,_patrolRange] Call GetRandomPosition);" \n
+ " _team = createGroup Civilian;" \n
+ " _leader = _team createUnit [_leaderName,_position,[],0.4,""FORM""];" \n
+ " _leader addEventHandler ['Killed',{[_this select 0,_this select 1] Spawn CivilianKilled}];" \n
+ " [_leader,_position,50] Call PlaceSafe;" \n
+ " _position = getPos _leader;" \n
+ " _cTeams = _cTeams + [_team];" \n
+ " _count = 1;" \n
+ " _total = count _unitTypes;" \n
+ "" \n
+ " while {_count < _total} do {" \n
+ " _unitName = _unitTypes select _count;" \n
+ " _unit = _team createUnit [_unitName,_position,[],0.4,""FORM""];" \n
+ " _unit addEventHandler ['Killed',{[_this select 0,_this select 1] Spawn CivilianKilled}];" \n
+ " _count = _count + 1;" \n
+ " };" \n
+ "" \n
+ " _teamCount = _teamCount + 1;" \n
+ " [_team,_location,(_tupd/2)] Spawn AITownPatrol;" \n
+ "};"/*%FSM</STATEINIT""">*/;
+ precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
+ class Links
+ {
+ /*%FSM<LINK "_">*/
+ class _
+ {
+ priority = 0.000000;
+ to="_";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/""/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ };
+ };
+ /*%FSM</STATE>*/
+ };
+ initState="Init";
+ finalStates[] =
+ {
+ "End"
+ };
+};
+/*%FSM</COMPILE>*/ \ No newline at end of file
diff --git a/Server/FSM/updatetownoccupation.fsm b/Server/FSM/updatetownoccupation.fsm
new file mode 100644
index 0000000..b9d92b2
--- /dev/null
+++ b/Server/FSM/updatetownoccupation.fsm
@@ -0,0 +1,730 @@
+/*%FSM<COMPILE "D:\ArmA2\FSM Editor Personal Edition\scriptedFSM.cfg, updatetownoccupation">*/
+/*%FSM<HEAD>*/
+/*
+item0[] = {"Init",0,250,-185.449844,-271.783020,-95.449898,-221.783386,0.000000,"Init"};
+item1[] = {"End",1,250,-182.368073,-113.480629,-92.368042,-63.480659,0.000000,"End"};
+item2[] = {"Gameover",4,218,-182.650177,-187.482422,-92.650192,-137.482452,0.000000,"Gameover"};
+item3[] = {"_",8,218,-33.398170,-257.734375,-1.592157,-235.159103,0.000000,""};
+item4[] = {"Defense_Core",2,250,-63.405182,-187.376434,26.594841,-137.376434,0.000000,"Defense Core"};
+item5[] = {"Occupied",4,218,-63.096802,-113.322952,26.903198,-63.322945,0.000000,"Occupied"};
+item6[] = {"Resistance",4,218,51.723022,-187.995987,141.723053,-137.995987,0.000000,"Resistance"};
+item7[] = {"_",8,218,455.074921,-99.775017,486.880951,-77.199760,0.000000,""};
+item8[] = {"Advanced_Defense",2,250,-63.899727,-37.846992,26.100292,12.153011,0.000000,"Advanced" \n "Defense"};
+item9[] = {"Clear",4,218,52.047401,-37.929413,142.047272,12.070588,0.000000,"Clear"};
+item10[] = {"Enemies",4,218,-63.950096,42.576328,26.049911,92.576347,0.000000,"Enemies"};
+item11[] = {"Active",4,218,57.932362,119.758667,147.932343,169.758682,0.000000,"Active"};
+item12[] = {"Update",2,250,-63.949944,119.619461,26.049990,169.619431,0.000000,"Update"};
+item13[] = {"Status",2,250,246.226044,-113.680588,336.225677,-63.680626,0.000000,"Status"};
+item14[] = {"Inactive",4,218,-65.445023,202.808212,24.554951,252.808258,0.000000,"Inactive"};
+item15[] = {"Spawn",2,4346,332.534119,203.132462,422.533905,253.132477,0.000000,"Spawn"};
+item16[] = {"Action",2,250,186.626160,119.316673,276.626404,169.316635,0.000000,"Action"};
+item17[] = {"no_Reinf_occ",4,218,187.878845,30.874571,277.878967,80.874619,0.000000,"no Reinf" \n "occ"};
+item18[] = {"Reinf_occ",4,218,319.613403,120.090843,409.613129,170.090881,0.000000,"Reinf" \n "occ"};
+item19[] = {"Reinforce",2,250,319.318024,32.180855,409.318024,82.180870,0.000000,"Reinforce"};
+item20[] = {"Passive",4,218,205.209961,-219.674011,295.209961,-169.674026,0.000000,"Passive"};
+item21[] = {"Active",4,218,304.639740,-218.685745,394.639740,-168.685760,0.000000,"Active"};
+item22[] = {"Skip",2,250,55.112442,-272.279236,145.112457,-222.279205,0.000000,"Skip"};
+item23[] = {"Delay_Status",2,250,307.081726,-300.316772,397.081757,-250.316772,0.000000,"Delay Status"};
+item24[] = {"Timeout",4,218,306.751160,-390.142151,396.751343,-340.142151,0.000000,"Timeout"};
+item25[] = {"Ticking",4,218,180.878448,-300.777557,270.878479,-250.777557,0.000000,"Ticking"};
+item26[] = {"Delete",2,250,54.588959,-390.142120,144.588943,-340.142120,0.000000,"Delete"};
+item27[] = {"",7,210,92.196381,-92.931099,100.196358,-84.931099,0.000000,""};
+item28[] = {"Filter",2,250,74.266075,203.384094,164.266052,253.383881,0.000000,"Filter"};
+item29[] = {"Air",4,218,74.266052,289.476624,164.265518,339.476501,0.000000,"Air"};
+item30[] = {"Normal",4,218,199.817520,203.384094,289.817749,253.384003,0.000000,"Normal"};
+item31[] = {"Spawn_AA",2,250,423.418945,290.672302,513.419067,340.672119,0.000000,"Spawn AA"};
+item32[] = {"",7,210,464.831757,224.797241,472.831757,232.797226,0.000000,""};
+link0[] = {0,3};
+link1[] = {2,1};
+link2[] = {3,4};
+link3[] = {4,2};
+link4[] = {4,5};
+link5[] = {4,6};
+link6[] = {5,8};
+link7[] = {6,27};
+link8[] = {7,13};
+link9[] = {8,9};
+link10[] = {8,10};
+link11[] = {9,27};
+link12[] = {10,12};
+link13[] = {11,16};
+link14[] = {12,11};
+link15[] = {12,14};
+link16[] = {13,20};
+link17[] = {13,21};
+link18[] = {14,28};
+link19[] = {15,32};
+link20[] = {16,17};
+link21[] = {16,18};
+link22[] = {17,27};
+link23[] = {18,19};
+link24[] = {19,7};
+link25[] = {20,22};
+link26[] = {21,23};
+link27[] = {22,3};
+link28[] = {23,24};
+link29[] = {23,25};
+link30[] = {24,26};
+link31[] = {25,22};
+link32[] = {26,3};
+link33[] = {27,13};
+link34[] = {28,29};
+link35[] = {28,30};
+link36[] = {29,31};
+link37[] = {30,15};
+link38[] = {31,32};
+link39[] = {32,7};
+globals[] = {0.000000,0,0,0,0,640,480,1,90,6316128,1,-249.754089,662.279846,374.132294,-401.634460,763,649,1};
+window[] = {0,-1,-1,-1,-1,840,148,1600,71,1,781};
+*//*%FSM</HEAD>*/
+class FSM
+{
+ fsmName = "updatetownoccupation";
+ class States
+ {
+ /*%FSM<STATE "Init">*/
+ class Init
+ {
+ name = "Init";
+ init = /*%FSM<STATEINIT""">*/"_lastUpdate = time;" \n
+ "" \n
+ "_location = _this select 0;" \n
+ "_probability = _this select 1;" \n
+ "_detectionRange = _this select 2;" \n
+ "_name = Str _location;" \n
+ "" \n
+ "_isAirOnly = false;" \n
+ "_patrolRange = _detectionRange * ('WFBE_DETECTIONTOPATROLRANGERATIO' Call GetNamespace);" \n
+ "_occupationActive = false;" \n
+ "_occupationAAActive = false;" \n
+ "_updateVehi = false;" \n
+ "_teams = [];" \n
+ "_vehicles = [];" \n
+ "_position = [];" \n
+ "_timeInactive = 0;" \n
+ "_lastReinf = -500;" \n
+ "_tit = 'WFBE_TOWNOCCUPATIONINACTIVETIME' Call GetNamespace;" \n
+ "_tupd = 'WFBE_TOWNUNITSPATROLDISTANCE' Call GetNamespace;" \n
+ "_tusr = 'WFBE_TOWNUNITSPAWNRANGE' Call GetNamespace;" \n
+ "_defensiveTeam = objNull;" \n
+ "" \n
+ "_camps = _location getVariable 'camps';" \n
+ "_totalCamps = count _camps;" \n
+ "" \n
+ "_maxReinforcementTeams = 1 + ('WFBE_TOWNOCCUPATIONDIFFICULTY' Call GetNamespace);" \n
+ "_location setVariable [""reinforcements_occ"",0];" \n
+ "" \n
+ "_defenses = [];"/*%FSM</STATEINIT""">*/;
+ precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
+ class Links
+ {
+ /*%FSM<LINK "_">*/
+ class _
+ {
+ priority = 0.000000;
+ to="Defense_Core";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/""/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ };
+ };
+ /*%FSM</STATE>*/
+ /*%FSM<STATE "End">*/
+ class End
+ {
+ name = "End";
+ init = /*%FSM<STATEINIT""">*/""/*%FSM</STATEINIT""">*/;
+ precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
+ class Links
+ {
+ };
+ };
+ /*%FSM</STATE>*/
+ /*%FSM<STATE "Defense_Core">*/
+ class Defense_Core
+ {
+ name = "Defense_Core";
+ init = /*%FSM<STATEINIT""">*/"_lastUpdate = time + random(0.2);" \n
+ "" \n
+ "_sideID = _location getVariable ""sideID"";"/*%FSM</STATEINIT""">*/;
+ precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
+ class Links
+ {
+ /*%FSM<LINK "Occupied">*/
+ class Occupied
+ {
+ priority = 0.000000;
+ to="Advanced_Defense";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/"!gameOver && time - _lastUpdate > 10 && (_sideID == EASTID || _sideID == WESTID)"/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ /*%FSM<LINK "Resistance">*/
+ class Resistance
+ {
+ priority = 0.000000;
+ to="Status";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/"!gameOver && time - _lastUpdate > 10 && _sideID == RESISTANCEID"/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ /*%FSM<LINK "Gameover">*/
+ class Gameover
+ {
+ priority = 0.000000;
+ to="End";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/"gameOver"/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ };
+ };
+ /*%FSM</STATE>*/
+ /*%FSM<STATE "Advanced_Defense">*/
+ class Advanced_Defense
+ {
+ name = "Advanced_Defense";
+ init = /*%FSM<STATEINIT""">*/"_objects = _location NearEntities[[eastSoldierBaseClass,westSoldierBaseClass,resistanceSoldierBaseClass,""Car"",""Motorcycle"",""Tank"",""Air""],_detectionRange];" \n
+ "_objects = [_objects Call GetLiveUnits,200,-10] Call GetUnitsBelowHeight;" \n
+ "_side = _sideID Call GetSideFromID;" \n
+ "_enemies = if (_side == East) then {(West countSide _objects) + (Resistance countSide _objects)} else {(East countSide _objects) + (Resistance countSide _objects)};"/*%FSM</STATEINIT""">*/;
+ precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
+ class Links
+ {
+ /*%FSM<LINK "Enemies">*/
+ class Enemies
+ {
+ priority = 0.000000;
+ to="Update";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/"_enemies > 0"/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ /*%FSM<LINK "Clear">*/
+ class Clear
+ {
+ priority = 0.000000;
+ to="Status";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/"_enemies == 0"/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ };
+ };
+ /*%FSM</STATE>*/
+ /*%FSM<STATE "Update">*/
+ class Update
+ {
+ name = "Update";
+ init = /*%FSM<STATEINIT""">*/"_timeInactive = time;"/*%FSM</STATEINIT""">*/;
+ precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
+ class Links
+ {
+ /*%FSM<LINK "Inactive">*/
+ class Inactive
+ {
+ priority = 0.000000;
+ to="Filter";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/"!_occupationActive"/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ /*%FSM<LINK "Active">*/
+ class Active
+ {
+ priority = 0.000000;
+ to="Action";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/"_occupationActive"/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ };
+ };
+ /*%FSM</STATE>*/
+ /*%FSM<STATE "Status">*/
+ class Status
+ {
+ name = "Status";
+ init = /*%FSM<STATEINIT""">*/""/*%FSM</STATEINIT""">*/;
+ precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
+ class Links
+ {
+ /*%FSM<LINK "Active">*/
+ class Active
+ {
+ priority = 0.000000;
+ to="Delay_Status";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/"_occupationActive || _occupationAAActive"/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ /*%FSM<LINK "Passive">*/
+ class Passive
+ {
+ priority = 0.000000;
+ to="Skip";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/"!_occupationActive && !_occupationAAActive"/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ };
+ };
+ /*%FSM</STATE>*/
+ /*%FSM<STATE "Spawn">*/
+ class Spawn
+ {
+ name = "Spawn";
+ init = /*%FSM<STATEINIT""">*/"[""HostilesDetectedNear"",_location,_side] Spawn SideMessage;" \n
+ "" \n
+ "_teamCount = 0;" \n
+ "_vehiBuilt = 0;" \n
+ "_built = 0;" \n
+ "_currentSV = _location getVariable ""supplyValue"";" \n
+ "_probaOccupation = 75;" \n
+ "_occupationsTeamTypes = [_currentSV] Call SelectOccupTeam;" \n
+ "_totalTeams = count _occupationsTeamTypes;" \n
+ "" \n
+ "_ci = 0;" \n
+ "while {_teamCount < _totalTeams} do {" \n
+ " _occupationActive = true;" \n
+ " _unitTypes = Format[""WFBE_%1%2UNITS"",str _side,_occupationsTeamTypes select _teamCount] Call GetNamespace;" \n
+ " _leaderName = _unitTypes select 0;" \n
+ " _camp = objNull;" \n
+ " if (_ci < _totalCamps) then {" \n
+ " _position = ([getPos (_camps select _ci),8,40] Call GetRandomPosition);" \n
+ " _camp = _camps select _ci;" \n
+ " } else {" \n
+ " _position = ([getPos _location,_tusr,_patrolRange] Call GetRandomPosition);" \n
+ " };" \n
+ " _team = createGroup _side;" \n
+ " _leader = [_leaderName,_team,_position,_side] Call CreateMan;" \n
+ " [_leader,_position,50] Call PlaceSafe;" \n
+ " _position = getPos _leader;" \n
+ " _teams = _teams + [_team];" \n
+ " _count = 1;" \n
+ " _total = count _unitTypes;" \n
+ " _built = _built + 1;" \n
+ " while {_count < _total} do {" \n
+ " _unitName = _unitTypes select _count;" \n
+ " if (random(100) < _probaOccupation) then {" \n
+ " if (_unitName isKindOf ""Man"") then {" \n
+ " _unit = [_unitName,_team,_position,_side] Call CreateMan;" \n
+ " _built = _built + 1;" \n
+ " } else {" \n
+ " _vehicle = [_unitName,_position,_side,true] Call CreateVehi;" \n
+ " _vehicles = _vehicles + [_vehicle];" \n
+ " emptyQueu = emptyQueu + [_vehicle];" \n
+ " _vehicle Spawn HandleEmptyVehicle;" \n
+ " _vehiBuilt = _vehiBuilt + 1;" \n
+ " _continue = true;" \n
+ " if (vehicle _leader == _leader) then {_leader MoveInDriver _vehicle;_continue = false};" \n
+ " _type = Format [""WFBE_%1SOLDIER"",str _side] Call GetNamespace;" \n
+ " if (typeOf _vehicle == ""Tank"") then {_type = Format [""WFBE_%1CREW"",str _side] Call GetNamespace};" \n
+ " if (_continue) then {_driver = [_type,_team,_position,_side] Call CreateMan;_driver moveInDriver _vehicle;_built = _built + 1;};" \n
+ " if (_vehicle emptyPositions ""gunner"" > 0) then {_gunner = [_type,_team,_position,_side] Call CreateMan;_gunner moveInGunner _vehicle;_built = _built + 1;};" \n
+ " if (_vehicle emptyPositions ""commander"" > 0) then {_commander = [_type,_team,_position,_side] Call CreateMan;_commander moveInCommander _vehicle;_built = _built + 1;};" \n
+ " };" \n
+ " };" \n
+ " _count = _count + 1;" \n
+ " };" \n
+ "" \n
+ " [_team, 350, _position] Call RevealArea;" \n
+ " [_location,_team,_sideID,_camp,false] ExecFSM ""Server\FSM\townpatrol.fsm"";" \n
+ "" \n
+ " if (paramUPSMON) then {[(leader _team),Format ['UPSMON_TOWN_%1',str _location],""move"",""nofollow"",""fortify"",""reinforcement""] Spawn UPSMON};" \n
+ " _teamCount = _teamCount + 1;" \n
+ " _ci = _ci + 1;" \n
+ "};" \n
+ "" \n
+ "_temp = _location nearEntities [(Format ['WFBE_%1DEFENSENAMES',str _side] Call GetNamespace),_tupd*1.4];" \n
+ "_defensiveTeam = Call Compile Format [""WF_Defense%1Grp"",str _side];" \n
+ "if (isNull _defensiveTeam) then {Call Compile Format [""WF_Defense%1Grp = createGroup %1"",str _side]};" \n
+ "_count = 0;" \n
+ "{" \n
+ " if (_x emptyPositions 'gunner' > 0 && alive _x) then {" \n
+ " _defenses = _defenses + [_x];" \n
+ " _unit = [Format [""WFBE_%1SOLDIER"",str _side] Call GetNamespace,_defensiveTeam,[(getPos _x select 0)+5,getPos _x select 1,0],_side] Call CreateMan;" \n
+ " [_unit] allowGetIn true;" \n
+ " _unit assignAsGunner _x;" \n
+ " [_unit] orderGetIn true;" \n
+ " _unit moveInGunner _x;" \n
+ " [_defensiveTeam, 350, _unit] Call RevealArea;" \n
+ " _count = _count + 1;" \n
+ " };" \n
+ "" \n
+ " if (_count > 25) exitWith {};" \n
+ "} forEach _temp;" \n
+ "" \n
+ "[str _side,'UnitsCreated',_built] Call UpdateStatistics;" \n
+ "if (_vehiBuilt > 0) then {[str _side,'VehiclesCreated',_vehiBuilt] Call UpdateStatistics};"/*%FSM</STATEINIT""">*/;
+ precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
+ class Links
+ {
+ /*%FSM<LINK "_">*/
+ class _
+ {
+ priority = 0.000000;
+ to="Status";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/""/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ };
+ };
+ /*%FSM</STATE>*/
+ /*%FSM<STATE "Action">*/
+ class Action
+ {
+ name = "Action";
+ init = /*%FSM<STATEINIT""">*/""/*%FSM</STATEINIT""">*/;
+ precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
+ class Links
+ {
+ /*%FSM<LINK "Reinf_occ">*/
+ class Reinf_occ
+ {
+ priority = 0.000000;
+ to="Reinforce";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/"paramOccReinf && (_location getVariable ""reinforcements_occ"") < _maxReinforcementTeams && time - _lastReinf > 300"/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ /*%FSM<LINK "no_Reinf_occ">*/
+ class no_Reinf_occ
+ {
+ priority = 0.000000;
+ to="Status";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/"!paramOccReinf || (_location getVariable ""reinforcements_occ"") >= _maxReinforcementTeams || time - _lastReinf <= 300"/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ };
+ };
+ /*%FSM</STATE>*/
+ /*%FSM<STATE "Reinforce">*/
+ class Reinforce
+ {
+ name = "Reinforce";
+ init = /*%FSM<STATEINIT""">*/"_lastReinf = time;" \n
+ "_currentSV = _location getVariable ""supplyValue"";" \n
+ "_probaOccupation = 75;" \n
+ "_occupationsTeamTypes = [_currentSV] Call SelectOccupTeam;" \n
+ "" \n
+ "_unitTypes = Format[""WFBE_%1%2UNITS"",str _side,_occupationsTeamTypes select round(random((count _occupationsTeamTypes)-1))] Call GetNamespace;" \n
+ "_leaderName = _unitTypes select 0;" \n
+ "_position = ([getPos _location,_tusr + 150,_patrolRange] Call GetRandomPosition);" \n
+ "_near = _position nearEntities 75;" \n
+ "_ctx = (east countSide _near) + (west countSide _near);" \n
+ "_i = 0;" \n
+ "while {_ctx > 0 && _i < 400} do {" \n
+ " _position = ([getPos _location,_tusr + 150,_patrolRange] Call GetRandomPosition);" \n
+ " _near = _position nearEntities 75;" \n
+ " _ctx = (east countSide _near) + (west countSide _near);" \n
+ " _i = _i + 1;" \n
+ "};" \n
+ "_team = createGroup _side;" \n
+ "_leader = [_leaderName,_team,_position,_side] Call CreateMan;" \n
+ "[_leader,_position,50] Call PlaceSafe;" \n
+ "_position = getPos _leader;" \n
+ "_teams = _teams + [_team];" \n
+ "_count = 1;" \n
+ "_total = count _unitTypes;" \n
+ "_built = 1;" \n
+ "_vehiBuilt = 0;" \n
+ "while {_count < _total} do {" \n
+ " _unitName = _unitTypes select _count;" \n
+ " if (random(100) < _probaOccupation) then {" \n
+ " if (_unitName isKindOf ""Man"") then {" \n
+ " _unit = [_unitName,_team,_position,_side] Call CreateMan;" \n
+ " _built = _built + 1;" \n
+ " } else {" \n
+ " _vehicle = [_unitName,_position,_side,true] Call CreateVehi;" \n
+ " _vehicles = _vehicles + [_vehicle];" \n
+ " emptyQueu = emptyQueu + [_vehicle];" \n
+ " _vehicle Spawn HandleEmptyVehicle;" \n
+ " _vehiBuilt = _vehiBuilt + 1;" \n
+ " _continue = true;" \n
+ " if (vehicle _leader == _leader) then {_leader MoveInDriver _vehicle;_continue = false};" \n
+ " _type = Format [""WFBE_%1SOLDIER"",str _side] Call GetNamespace;" \n
+ " if (typeOf _vehicle == ""Tank"") then {_type = Format [""WFBE_%1CREW"",str _side] Call GetNamespace};" \n
+ " if (_continue) then {_driver = [_type,_team,_position,_side] Call CreateMan;_driver moveInDriver _vehicle;_built = _built + 1;};" \n
+ " if (_vehicle emptyPositions ""gunner"" > 0) then {_gunner = [_type,_team,_position,_side] Call CreateMan;_gunner moveInGunner _vehicle;_built = _built + 1;};" \n
+ " if (_vehicle emptyPositions ""commander"" > 0) then {_commander = [_type,_team,_position,_side] Call CreateMan;_commander moveInCommander _vehicle;_built = _built + 1;};" \n
+ " };" \n
+ " };" \n
+ " _count = _count + 1;" \n
+ "};" \n
+ "" \n
+ "if (paramUPSMON) then {[(leader _team),Format ['UPSMON_TOWN_%1',str _location],""move"",""nofollow"",""fortify"",""reinforcement""] Spawn UPSMON};" \n
+ "" \n
+ "[_location,_team,_sideID,objNull,true] ExecFSM ""Server\FSM\townpatrol.fsm"";" \n
+ "" \n
+ "[str _side,'UnitsCreated',_built] Call UpdateStatistics;" \n
+ "if (_vehiBuilt > 0) then {[str _side,'VehiclesCreated',_vehiBuilt] Call UpdateStatistics};" \n
+ "" \n
+ "_existing = _location getVariable ""reinforcements_occ"";" \n
+ "_location setVariable [""reinforcements_occ"",_existing + 1];"/*%FSM</STATEINIT""">*/;
+ precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
+ class Links
+ {
+ /*%FSM<LINK "_">*/
+ class _
+ {
+ priority = 0.000000;
+ to="Status";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/""/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ };
+ };
+ /*%FSM</STATE>*/
+ /*%FSM<STATE "Skip">*/
+ class Skip
+ {
+ name = "Skip";
+ init = /*%FSM<STATEINIT""">*/""/*%FSM</STATEINIT""">*/;
+ precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
+ class Links
+ {
+ /*%FSM<LINK "_">*/
+ class _
+ {
+ priority = 0.000000;
+ to="Defense_Core";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/""/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ };
+ };
+ /*%FSM</STATE>*/
+ /*%FSM<STATE "Delay_Status">*/
+ class Delay_Status
+ {
+ name = "Delay_Status";
+ init = /*%FSM<STATEINIT""">*/""/*%FSM</STATEINIT""">*/;
+ precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
+ class Links
+ {
+ /*%FSM<LINK "Ticking">*/
+ class Ticking
+ {
+ priority = 0.000000;
+ to="Skip";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/"time - _timeInactive <= _tit"/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ /*%FSM<LINK "Timeout">*/
+ class Timeout
+ {
+ priority = 0.000000;
+ to="Delete";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/"time - _timeInactive > _tit"/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ };
+ };
+ /*%FSM</STATE>*/
+ /*%FSM<STATE "Delete">*/
+ class Delete
+ {
+ name = "Delete";
+ init = /*%FSM<STATEINIT""">*/"_occupationActive = false;" \n
+ "_occupationAAActive = false;" \n
+ "" \n
+ "_count = 0;" \n
+ "_total = count _teams;" \n
+ "while {_count < _total} do {" \n
+ " _team = _teams select _count;" \n
+ " if !(isNil '_team') then {" \n
+ " if !(isNull _team) then {" \n
+ " {deleteVehicle _x} forEach units _team;" \n
+ " deleteGroup _team;" \n
+ " };" \n
+ " };" \n
+ " _count = _count + 1;" \n
+ "};" \n
+ "" \n
+ "{" \n
+ " _del = true;" \n
+ " if (count(crew _x) > 0) then {" \n
+ " if (isPlayer(leader (crew _x select 0))) then {_del = false};" \n
+ " };" \n
+ " if (_del) then {deleteVehicle _x};" \n
+ "} forEach _vehicles;" \n
+ "" \n
+ "_vehicles = [];" \n
+ "_teams = [];" \n
+ "" \n
+ "if (paramOccReinf) then {_location setVariable [""reinforcements_occ"",0]};" \n
+ "" \n
+ "{" \n
+ " if (!isNull(Gunner _x) && !isPlayer(Gunner _x)) then {" \n
+ " _unit = (gunner _x);" \n
+ " if (group _unit == _defensiveTeam) then {" \n
+ " _unit setPos (getpos _x);" \n
+ " deleteVehicle _unit;" \n
+ " };" \n
+ " };" \n
+ "} forEach _defenses;" \n
+ "_defenses = [];" \n
+ "_defensiveTeam = objNull;"/*%FSM</STATEINIT""">*/;
+ precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
+ class Links
+ {
+ /*%FSM<LINK "_">*/
+ class _
+ {
+ priority = 0.000000;
+ to="Defense_Core";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/""/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ };
+ };
+ /*%FSM</STATE>*/
+ /*%FSM<STATE "Filter">*/
+ class Filter
+ {
+ name = "Filter";
+ init = /*%FSM<STATEINIT""">*/"if !(_occupationAAActive) then {" \n
+ " _objects = _location NearEntities[[""Air""],_detectionRange];" \n
+ " _objects = [_objects Call GetLiveUnits,200,25] Call GetUnitsBelowHeight;" \n
+ "" \n
+ " _airEnemies = if (_side == East) then {(West countSide _objects) + (Resistance countSide _objects)} else {(East countSide _objects) + (Resistance countSide _objects)};" \n
+ " _isAirOnly = if (_airEnemies == _enemies) then {true} else {false};" \n
+ "} else {" \n
+ " _isAirOnly = false;" \n
+ "};"/*%FSM</STATEINIT""">*/;
+ precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
+ class Links
+ {
+ /*%FSM<LINK "Normal">*/
+ class Normal
+ {
+ priority = 0.000000;
+ to="Spawn";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/"!_isAirOnly"/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ /*%FSM<LINK "Air">*/
+ class Air
+ {
+ priority = 0.000000;
+ to="Spawn_AA";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/"_isAirOnly"/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ };
+ };
+ /*%FSM</STATE>*/
+ /*%FSM<STATE "Spawn_AA">*/
+ class Spawn_AA
+ {
+ name = "Spawn_AA";
+ init = /*%FSM<STATEINIT""">*/"[""HostilesDetectedNear"",_location,_side] Spawn SideMessage;" \n
+ "_occupationAAActive = true;" \n
+ "" \n
+ "_currentSV = _location getVariable ""supplyValue"";" \n
+ "" \n
+ "_sv1 = 'WFBE_OCCUPATIONAATEAM1' Call GetNamespace;" \n
+ "_sv2 = 'WFBE_OCCUPATIONAATEAM2' Call GetNamespace;" \n
+ "" \n
+ "//--- Set the team type to spawn." \n
+ "_type = 'Small';" \n
+ "if (_currentSV < _sv1) then {_type = 'Small'};" \n
+ "if (_currentSV >= _sv1 && _currentSV < _sv2) then {_type = 'Medium'};" \n
+ "if (_currentSV > _sv2) then {_type = 'Large'};" \n
+ "" \n
+ "_grps = 1 + floor(('WFBE_TOWNOCCUPATIONDIFFICULTY' Call GetNamespace)/2);" \n
+ "if (_type == 'Small') then {_grps = _grps + 1};" \n
+ "" \n
+ "_i = 0;" \n
+ "_infantry = 0;" \n
+ "_aaVehicles = [];" \n
+ "while {_i < _grps} do {" \n
+ " _position = ([getPos _location,_tusr/2,_patrolRange] Call GetRandomPosition);" \n
+ " _safePos = [_position,50] Call GetSafePlace;" \n
+ " " \n
+ " _effectiveType = _type;" \n
+ " if (_grps > 2) then {" \n
+ " if (_type == 'Medium' && random 100 > 75) then {_effectiveType = ['Small','Medium'] select round(random 1)};" \n
+ " if (_type == 'Large' && random 100 > 70) then {_effectiveType = ['Small','Medium','Large'] select round(random 2)};" \n
+ " };" \n
+ " " \n
+ " _teamType = Format [""WFBE_%1%2AATEAMUNITS"",_side,_effectiveType] Call GetNamespace;" \n
+ " " \n
+ " _retVal = [_teamType,_safePos,_side,false] Call CreateTeamTemplate;" \n
+ " _aaVehicles = _retVal select 1;" \n
+ " _team = _retVal select 2;" \n
+ " " \n
+ " {emptyQueu = emptyQueu + [_x];_x Spawn HandleEmptyVehicle} forEach _aaVehicles;" \n
+ " " \n
+ " _teams = _teams + [_team];" \n
+ " _vehicles = _vehicles + _aaVehicles;" \n
+ " _infantry = _infantry + (count (_retVal select 0)) + (count(_retVal select 3));" \n
+ " " \n
+ " [_location,_team,_sideID,objNull,false] ExecFSM ""Server\FSM\townpatrol.fsm"";" \n
+ " " \n
+ " //--- AA Team are well informed about air units." \n
+ " {_team reveal _x} forEach _objects;" \n
+ "" \n
+ " //--- Use UPSMON AI if enabled." \n
+ " if (paramUPSMON) then {[(leader _team),Format ['UPSMON_TOWN_%1',str _location],""move"",""nofollow"",""reinforcement""] Spawn UPSMON};" \n
+ " " \n
+ " _i = _i + 1;" \n
+ "};" \n
+ "" \n
+ "if (_infantry > 0) then {[str _side,'UnitsCreated',_infantry] Call UpdateStatistics};" \n
+ "if (count _aaVehicles > 0) then {[str _side,'VehiclesCreated',count _aaVehicles] Call UpdateStatistics};"/*%FSM</STATEINIT""">*/;
+ precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
+ class Links
+ {
+ /*%FSM<LINK "_">*/
+ class _
+ {
+ priority = 0.000000;
+ to="Status";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/""/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ };
+ };
+ /*%FSM</STATE>*/
+ };
+ initState="Init";
+ finalStates[] =
+ {
+ "End"
+ };
+};
+/*%FSM</COMPILE>*/ \ No newline at end of file
diff --git a/Server/FSM/weather.fsm b/Server/FSM/weather.fsm
new file mode 100644
index 0000000..8795dea
--- /dev/null
+++ b/Server/FSM/weather.fsm
@@ -0,0 +1,100 @@
+/*%FSM<COMPILE "D:\ArmA2\FSM Editor Personal Edition\scriptedFSM.cfg, weather">*/
+/*%FSM<HEAD>*/
+/*
+item0[] = {"Init",0,250,-81.542984,-257.577942,8.457038,-207.578140,0.000000,"Init"};
+item1[] = {"End",1,250,-216.387955,-52.508366,-126.387947,-2.508394,0.000000,"End"};
+item2[] = {"Update_Weather",2,4346,-82.090652,-139.314026,7.909359,-89.314034,0.000000,"Update Weather"};
+item3[] = {"Loop",4,218,53.846153,-139.681244,143.846161,-89.681236,0.000000,"Loop"};
+item4[] = {"Gameover",4,218,-216.387955,-139.464890,-126.387947,-89.464890,0.000000,"Gameover"};
+item5[] = {"_",8,218,-51.736092,-184.192123,-21.083296,-163.272247,0.000000,""};
+link0[] = {0,5};
+link1[] = {2,3};
+link2[] = {2,4};
+link3[] = {3,2};
+link4[] = {4,1};
+link5[] = {5,2};
+globals[] = {0.000000,0,0,0,0,640,480,1,8,6316128,1,-348.696411,348.696136,79.849762,-328.514618,921,617,1};
+window[] = {0,-1,-1,-1,-1,762,25,1438,25,1,939};
+*//*%FSM</HEAD>*/
+class FSM
+{
+ fsmName = "weather";
+ class States
+ {
+ /*%FSM<STATE "Init">*/
+ class Init
+ {
+ name = "Init";
+ init = /*%FSM<STATEINIT""">*/"WF_Logic setVariable [""overCast"",random(1),true];" \n
+ "_wt = 'WFBE_WEATHERTRANSITION' Call GetNamespace;" \n
+ "_delay = ((_wt * 2) + 100);" \n
+ "_lastUpdate = time;"/*%FSM</STATEINIT""">*/;
+ precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
+ class Links
+ {
+ /*%FSM<LINK "_">*/
+ class _
+ {
+ priority = 0.000000;
+ to="Update_Weather";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/""/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ };
+ };
+ /*%FSM</STATE>*/
+ /*%FSM<STATE "End">*/
+ class End
+ {
+ name = "End";
+ init = /*%FSM<STATEINIT""">*/""/*%FSM</STATEINIT""">*/;
+ precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
+ class Links
+ {
+ };
+ };
+ /*%FSM</STATE>*/
+ /*%FSM<STATE "Update_Weather">*/
+ class Update_Weather
+ {
+ name = "Update_Weather";
+ init = /*%FSM<STATEINIT""">*/"_overCast = random(1);" \n
+ "if (isDedicated) then {_wt setOvercast _overCast};" \n
+ "WF_Logic setVariable [""overCast"",_overCast,true];" \n
+ "_lastUpdate = time;"/*%FSM</STATEINIT""">*/;
+ precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
+ class Links
+ {
+ /*%FSM<LINK "Gameover">*/
+ class Gameover
+ {
+ priority = 0.000000;
+ to="End";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/"gameOver"/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ /*%FSM<LINK "Loop">*/
+ class Loop
+ {
+ priority = 0.000000;
+ to="Update_Weather";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/"!gameOver && time - _lastUpdate > _delay"/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ };
+ };
+ /*%FSM</STATE>*/
+ };
+ initState="Init";
+ finalStates[] =
+ {
+ "End"
+ };
+};
+/*%FSM</COMPILE>*/ \ No newline at end of file
diff --git a/Server/FSM/workers.fsm b/Server/FSM/workers.fsm
new file mode 100644
index 0000000..98cd7d8
--- /dev/null
+++ b/Server/FSM/workers.fsm
@@ -0,0 +1,323 @@
+/*%FSM<COMPILE "D:\ArmA2\FSM Editor Personal Edition\scriptedFSM.cfg, workers">*/
+/*%FSM<HEAD>*/
+/*
+item0[] = {"Init",0,250,-81.542984,-257.577942,8.457038,-207.578140,0.000000,"Init"};
+item1[] = {"End",1,250,-341.327942,-139.587799,-251.327972,-89.587807,0.000000,"End"};
+item2[] = {"Update_Worker",2,250,-82.090652,-139.314026,7.909359,-89.314034,0.000000,"Update Worker"};
+item3[] = {"Loop",4,218,53.846153,-139.681244,143.846161,-89.681236,0.000000,"Loop"};
+item4[] = {"Gameover",4,218,-216.387955,-139.464890,-126.387947,-89.464890,0.000000,"Gameover"};
+item5[] = {"_",8,218,-51.736092,-184.192123,-21.083296,-163.272247,0.000000,""};
+item6[] = {"No_Job",4,218,-18.119097,-70.317200,71.880913,-20.317196,0.000000,"No Job"};
+item7[] = {"Job",4,218,-129.429321,-69.559975,-39.429314,-19.559986,0.000000,"Job"};
+item8[] = {"Update_Job",2,4346,-129.807770,17.519415,-39.807682,67.519424,0.000000,"Update Job"};
+item9[] = {"Idle_or_Assign",2,250,-17.740370,16.005005,72.259621,66.005020,0.000000,"Idle or Assign"};
+item10[] = {"",7,210,23.149067,111.413750,31.149073,119.413750,0.000000,""};
+item11[] = {"",7,210,94.437599,110.454597,102.437599,118.454597,0.000000,""};
+item12[] = {"Build",4,218,-259.291138,17.519421,-169.291153,67.519417,0.000000,"Build"};
+item13[] = {"Maintenance",4,218,-259.231995,82.296516,-169.232025,132.296509,0.000000,"Maintenance"};
+item14[] = {"Update_Build",2,250,-375.901794,18.161104,-285.901794,68.161102,0.000000,"Update Build"};
+item15[] = {"Update_Maintenan",2,250,-375.085449,82.180977,-285.085449,132.181000,0.000000,"Update" \n "Maintenance"};
+item16[] = {"",7,210,-405.433075,39.363052,-397.433075,47.363045,0.000000,""};
+item17[] = {"",7,210,-404.876038,105.391983,-396.876038,113.391983,0.000000,""};
+item18[] = {"",7,210,-406.079773,223.920914,-398.079773,231.920914,0.000000,""};
+item19[] = {"",7,210,23.259628,223.163696,31.259632,231.163696,0.000000,""};
+link0[] = {0,5};
+link1[] = {2,4};
+link2[] = {2,6};
+link3[] = {2,7};
+link4[] = {3,2};
+link5[] = {4,1};
+link6[] = {5,2};
+link7[] = {6,9};
+link8[] = {7,8};
+link9[] = {8,12};
+link10[] = {8,13};
+link11[] = {9,10};
+link12[] = {10,11};
+link13[] = {11,3};
+link14[] = {12,14};
+link15[] = {13,15};
+link16[] = {14,16};
+link17[] = {15,17};
+link18[] = {16,17};
+link19[] = {17,18};
+link20[] = {18,19};
+link21[] = {19,10};
+globals[] = {0.000000,0,0,0,0,640,480,1,28,6316128,1,-573.943970,177.921814,238.376556,-265.316376,921,617,1};
+window[] = {0,-1,-1,-1,-1,837,100,1513,100,1,939};
+*//*%FSM</HEAD>*/
+class FSM
+{
+ fsmName = "workers";
+ class States
+ {
+ /*%FSM<STATE "Init">*/
+ class Init
+ {
+ name = "Init";
+ init = /*%FSM<STATEINIT""">*/"_worker = _this select 0;" \n
+ "_side = _this select 1;" \n
+ "_index = _this select 2;" \n
+ "" \n
+ "_assignedConstruction = objNull;" \n
+ "_action = """";" \n
+ "_pos = getPos _worker;" \n
+ "_idleFor = 0;" \n
+ "_lastMoveOrdered = -40;" \n
+ "" \n
+ "_speed = 'WFBE_WORKERS_RATIO' Call GetNamespace;" \n
+ "_distance = 'WFBE_WORKERS_BUILDDISTANCE' Call GetNamespace;" \n
+ "_maxDistance = 'WFBE_WORKERS_MAXRANGE' Call GetNamespace;" \n
+ "_repairs = 'WFBE_WORKERS_REPAIR' Call GetNamespace;" \n
+ "" \n
+ "_animations = [""AinvPknlMstpSlayWrflDnon_AmovPknlMstpSnonWnonDnon"", ""AinvPknlMstpSlayWrflDnon_AmovPknlMstpSnonWnonDnon"", ""AinvPknlMstpSlayWrflDnon_AmovPercMstpSrasWrflDnon"", ""AinvPknlMstpSlayWrflDnon_medic""];" \n
+ "" \n
+ "_lastUpdate = time;"/*%FSM</STATEINIT""">*/;
+ precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
+ class Links
+ {
+ /*%FSM<LINK "_">*/
+ class _
+ {
+ priority = 0.000000;
+ to="Update_Worker";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/""/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ };
+ };
+ /*%FSM</STATE>*/
+ /*%FSM<STATE "End">*/
+ class End
+ {
+ name = "End";
+ init = /*%FSM<STATEINIT""">*/"_workers = Call Compile Format [""WF_%1Workers"",str _side];" \n
+ "_workers set [_index, objNull];" \n
+ "Call Compile Format [""WF_%1Workers = _workers; publicVariable 'WF_%1Workers';"",str _side];"/*%FSM</STATEINIT""">*/;
+ precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
+ class Links
+ {
+ };
+ };
+ /*%FSM</STATE>*/
+ /*%FSM<STATE "Update_Worker">*/
+ class Update_Worker
+ {
+ name = "Update_Worker";
+ init = /*%FSM<STATEINIT""">*/"_lastUpdate = time;" \n
+ "" \n
+ "_temp = (Format [""WFBE_WORKERS_%1LOGIC"",str _side]) Call GetNamespace;" \n
+ "" \n
+ "//--- Range calculation." \n
+ "_buildList = [];" \n
+ "{if (_x distance _worker < _maxDistance) then {_buildList = _buildList + [_x]}} forEach _temp;"/*%FSM</STATEINIT""">*/;
+ precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
+ class Links
+ {
+ /*%FSM<LINK "No_Job">*/
+ class No_Job
+ {
+ priority = 0.000000;
+ to="Idle_or_Assign";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/"alive _worker && isNull _assignedConstruction|| count _buildList == 0"/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ /*%FSM<LINK "Job">*/
+ class Job
+ {
+ priority = 0.000000;
+ to="Update_Job";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/"alive _worker && !isNull _assignedConstruction && count _buildList > 0 || _action == ""Maintenance"""/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ /*%FSM<LINK "Gameover">*/
+ class Gameover
+ {
+ priority = 0.000000;
+ to="End";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/"gameOver || !alive _worker"/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ };
+ };
+ /*%FSM</STATE>*/
+ /*%FSM<STATE "Update_Job">*/
+ class Update_Job
+ {
+ name = "Update_Job";
+ init = /*%FSM<STATEINIT""">*/"if (_pos distance (getPos _worker) < 5 && _worker distance _assignedConstruction > _distance) then {" \n
+ " _idleFor = _idleFor + 5;" \n
+ "} else {" \n
+ " _idleFor = 0;" \n
+ "};" \n
+ "" \n
+ "if (_idleFor > 30) then {" \n
+ " _idleFor = 0;" \n
+ " [_worker, getPos _worker, 40] Call PlaceSafe;" \n
+ "};" \n
+ "" \n
+ "if (behaviour _worker != ""CARELESS"") then {_worker setBehaviour ""CARELESS""};" \n
+ "" \n
+ "_pos = getPos _worker;"/*%FSM</STATEINIT""">*/;
+ precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
+ class Links
+ {
+ /*%FSM<LINK "Maintenance">*/
+ class Maintenance
+ {
+ priority = 0.000000;
+ to="Update_Maintenan";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/"_action == ""Maintenance"""/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ /*%FSM<LINK "Build">*/
+ class Build
+ {
+ priority = 0.000000;
+ to="Update_Build";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/"_action == ""Build"" || _action == ""Repair"""/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ };
+ };
+ /*%FSM</STATE>*/
+ /*%FSM<STATE "Idle_or_Assign">*/
+ class Idle_or_Assign
+ {
+ name = "Idle_or_Assign";
+ init = /*%FSM<STATEINIT""">*/"if (count _buildList > 0) then {" \n
+ " _temp = [_worker, _buildList] Call SortByDistance;" \n
+ " {" \n
+ " if !(isNull _assignedConstruction) exitWith {}; " \n
+ "" \n
+ " _get = _x getVariable ""WFBE_B_Completion"";" \n
+ " " \n
+ " if !(isNil '_get') then {" \n
+ " if (_get <= 100) then {" \n
+ " _action = if (_x getVariable ""WFBE_B_Repair"") then {""Repair""} else {""Build""};" \n
+ " _assignedConstruction = _x;" \n
+ " };" \n
+ " };" \n
+ " } forEach _temp;" \n
+ "};" \n
+ "" \n
+ "//--- Maintenance?" \n
+ "if (count _buildList == 0) then {" \n
+ " _structures = (_side) Call GetSideStructures;" \n
+ "" \n
+ " _structures = [_worker, _structures] Call SortByDistance;" \n
+ "" \n
+ " {" \n
+ " if (getDammage _x > 0 && alive _x) exitWith {_assignedConstruction = _x;_action = ""Maintenance"";}" \n
+ " } forEach _structures;" \n
+ "};"/*%FSM</STATEINIT""">*/;
+ precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
+ class Links
+ {
+ /*%FSM<LINK "Loop">*/
+ class Loop
+ {
+ priority = 0.000000;
+ to="Update_Worker";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/"!gameOver && time - _lastUpdate > 4"/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ };
+ };
+ /*%FSM</STATE>*/
+ /*%FSM<STATE "Update_Build">*/
+ class Update_Build
+ {
+ name = "Update_Build";
+ init = /*%FSM<STATEINIT""">*/"if (_assignedConstruction in _buildList) then {" \n
+ " _completion = _assignedConstruction getVariable ""WFBE_B_Completion"";" \n
+ " _ratio = _assignedConstruction getVariable ""WFBE_B_CompletionRatio"";" \n
+ "" \n
+ " if (_completion < 100) then {" \n
+ " if (_worker distance _assignedConstruction > _distance) then {" \n
+ " if (time - _lastMoveOrdered > 40) then {_worker commandMove (getPos _assignedConstruction);_lastMoveOrdered = time};" \n
+ " } else {" \n
+ " _worker playMove (_animations select round(random((count _animations)-1)));" \n
+ " _ratio = (_speed * _ratio) + _completion;" \n
+ " if (_ratio > 100) then {_ratio = 100};" \n
+ " _assignedConstruction setVariable [""WFBE_B_Completion"", _ratio];" \n
+ " };" \n
+ " } else {" \n
+ " _action = """";" \n
+ " _assignedConstruction = objNull;" \n
+ " };" \n
+ "} else {" \n
+ " _action = """";" \n
+ " _assignedConstruction = objNull;" \n
+ "};"/*%FSM</STATEINIT""">*/;
+ precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
+ class Links
+ {
+ /*%FSM<LINK "Loop">*/
+ class Loop
+ {
+ priority = 0.000000;
+ to="Update_Worker";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/"!gameOver && time - _lastUpdate > 4"/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ };
+ };
+ /*%FSM</STATE>*/
+ /*%FSM<STATE "Update_Maintenan">*/
+ class Update_Maintenan
+ {
+ name = "Update_Maintenan";
+ init = /*%FSM<STATEINIT""">*/"if (alive _assignedConstruction && getDammage _assignedConstruction > 0) then {" \n
+ " if (_worker distance _assignedConstruction > _distance) then {" \n
+ " if (time - _lastMoveOrdered > 30) then {_worker commandMove (getPos _assignedConstruction);_lastMoveOrdered = time};" \n
+ " } else {" \n
+ " _worker playMove (_animations select round(random((count _animations)-1)));" \n
+ " _damages = (getDammage _assignedConstruction) - _repairs;" \n
+ " if (_damages < 0) then {_damages = 0};" \n
+ " _assignedConstruction setDammage _damages;" \n
+ " };" \n
+ "} else {" \n
+ " _action = """";" \n
+ " _assignedConstruction = objNull;" \n
+ "};"/*%FSM</STATEINIT""">*/;
+ precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
+ class Links
+ {
+ /*%FSM<LINK "Loop">*/
+ class Loop
+ {
+ priority = 0.000000;
+ to="Update_Worker";
+ precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
+ condition=/*%FSM<CONDITION""">*/"!gameOver && time - _lastUpdate > 4"/*%FSM</CONDITION""">*/;
+ action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
+ };
+ /*%FSM</LINK>*/
+ };
+ };
+ /*%FSM</STATE>*/
+ };
+ initState="Init";
+ finalStates[] =
+ {
+ "End",
+ };
+};
+/*%FSM</COMPILE>*/ \ No newline at end of file
diff --git a/Server/Functions/Server_AlliesBuyUnit.sqf b/Server/Functions/Server_AlliesBuyUnit.sqf
new file mode 100644
index 0000000..8a40f0e
--- /dev/null
+++ b/Server/Functions/Server_AlliesBuyUnit.sqf
@@ -0,0 +1,144 @@
+Private ["_building","_built","_config","_crew","_direction","_dir","_distance","_factoryPosition","_factoryType","_id","_index","_isVehicle","_longest","_position","_queu","_queu2","_ret","_side","_sideText","_soldier","_team","_turrets","_type","_unitType","_vehicle","_waitTime"];
+_id = _this select 0;
+_building = _this select 1;
+_unitType = _this select 2;
+_side = _this select 3;
+_team = _this select 4;
+_isVehicle = _this select 5;
+
+_sideText = str _side;
+
+if ((!alive _building)||(isNull _building)) exitWith {diag_log Format ["[WFBE (INFORMATION)][frameno:%2 | ticktime:%3] Server_AlliesBuyUnit.sqf: Canceled unit '%1', the factory is destroyed.",_unitType,diag_frameno,diag_tickTime];};
+
+diag_log Format["[WFBE (INFORMATION)][frameno:%3 | ticktime:%4] Server_AlliesBuyUnit: AI Team %1 has purchased a '%2'",_team,_unitType,diag_frameno,diag_tickTime];
+
+_queu = _building getVariable "queu";
+if (isNil "_queu") then {_queu = []};
+_queu = _queu + [_id select 0];
+_building setVariable ["queu",_queu];
+
+_type = typeOf _building;
+if (_type == "CDF_WarfareBBarracks" || _type == "Ins_WarfareBBarracks") then {_type = Call Compile Format ["%1BAR",str _side]};
+if (_type == "CDF_WarfareBLightFactory" || _type == "Ins_WarfareBLightFactory") then {_type = Call Compile Format ["%1LVF",str _side]};
+if (_type == "CDF_WarfareBHeavyFactory" || _type == "Ins_WarfareBHeavyFactory") then {_type = Call Compile Format ["%1HEAVY",str _side]};
+if (_type == "CDF_WarfareBAircraftFactory" || _type == "Ins_WarfareBAircraftFactory") then {_type = Call Compile Format ["%1AIR",str _side]};
+
+_index = (Format ["WFBE_%1STRUCTURENAMES",_sideText] Call GetNamespace) find _type;
+_distance = (Format ["WFBE_%1STRUCTUREDISTANCES",_sideText] Call GetNamespace) select _index;
+_direction = (Format ["WFBE_%1STRUCTUREDIRECTIONS",_sideText] Call GetNamespace) select _index;
+_factoryType = (Format ["WFBE_%1STRUCTURES",_sideText] Call GetNamespace) select _index;
+
+_waitTime = (_unitType Call GetNamespace) select QUERYUNITTIME;
+_position = [getPos _building,_distance,getDir _building + _direction] Call GetPositionFrom;
+_longest = Format ["WFBE_LONGEST%1BUILDTIME",_factoryType] Call GetNamespace;
+
+_ret = 0;
+_queu2 = [0];
+
+if (count _queu > 0) then {
+ _queu2 = _building getVariable "queu";
+};
+
+while {_id select 0 != _queu select 0} do {
+ sleep 4;
+ _ret = _ret + 4;
+ _queu = _building getVariable "queu";
+
+ if (!(alive _building)||(isNull _building)) exitWith {
+ _queu = _building getVariable "queu";
+ _queu = _queu - [_queu select 0];
+ _building setVariable ["queu",_queu];
+ diag_log Format ["[WFBE (INFORMATION)][frameno:%2 | ticktime:%3] Server_BuyUnit.sqf: Canceled unit '%1', the factory is destroyed.",_unitType,diag_frameno,diag_tickTime];
+ };
+
+ if (_queu select 0 == _queu2 select 0) then {
+ if (_ret > _longest) then {
+ if (count _queu > 0) then {
+ _queu = _building getVariable "queu";
+ _queu = _queu - [_queu select 0];
+ _building setVariable ["queu",_queu];
+ };
+ };
+ };
+ if (count _queu != count _queu2) then {
+ _ret = 0;
+ _queu2 = _building getVariable "queu";
+ };
+};
+
+sleep _waitTime;
+
+_queu = _building getVariable "queu";
+_queu = _queu - [_id select 0];
+_building setVariable ["queu",_queu];
+
+if ((!alive _building)||(isNull _building)) exitWith {diag_log Format ["[WFBE (INFORMATION)][frameno:%2 | ticktime:%3] Server_AlliesBuyUnit.sqf: Canceled unit '%1', the factory is destroyed.",_unitType,diag_frameno,diag_tickTime];};
+
+if (_unitType isKindOf "Man") then {
+ _soldier = [_unitType,_team,_position,_side] Call CreateMan;
+ [_sideText,'UnitsCreated',1] Call UpdateStatistics;
+
+ //--- Infantry can use the team vehicles as cargo.
+ _vehicle = [_team,true] Call GetTeamVehicles;
+ {_team addVehicle _x} forEach _vehicle;
+} else {
+ _crew = Format["WFBE_%1ALLIESSOLDIER",_sideText] Call GetNamespace;
+ if (_unitType isKindOf "Tank") then {_crew = Format ["WFBE_%1ALLIESCREW",_sideText] Call GetNamespace};
+ if (_unitType isKindOf "Air") then {_crew = Format ["WFBE_%1ALLIESPILOT",_sideText] Call GetNamespace};
+ _vehicle = [_unitType,_position,_side,true] Call CreateVehi;
+ _factoryPosition = getPos _building;
+ _dir = -((((_position select 1) - (_factoryPosition select 1)) atan2 ((_position select 0) - (_factoryPosition select 0))) - 90);
+ _vehicle setDir _dir;
+ _vehicle setVelocity [0,0,-1];
+ //--- AI Can fly...? (*roll eyes at the harriers*).
+ if (_vehicle isKindOf "Plane") then {
+ _vehicle setPos [_position select 0,_position select 1,1500];
+ _vehicle setVelocity [(sin _direction) * 250,(cos _direction) * 250,0];
+ };
+
+ /* Clear the vehicle */
+ clearWeaponCargo _vehicle;
+ clearMagazineCargo _vehicle;
+
+ emptyQueu = emptyQueu + [_vehicle];
+ _vehicle Spawn HandleEmptyVehicle;
+ _soldier = [_crew,_team,_position,_side] Call CreateMan;
+ [_soldier] allowGetIn true;
+ [_soldier] orderGetIn true;
+ _soldier assignAsDriver _vehicle;
+ _soldier moveInDriver _vehicle;
+
+ [_sideText,'VehiclesCreated',1] Call UpdateStatistics;
+ _built = 1;
+ if (_isVehicle select 1) then {
+ _soldier = [_crew,_team,_position,_side] Call CreateMan;
+ [_soldier] allowGetIn true;
+ [_soldier] orderGetIn true;
+ _soldier assignAsGunner _vehicle;
+ _soldier moveInGunner _vehicle;
+ _built = _built + 1;
+ };
+ if (_isVehicle select 2) then {
+ _soldier = [_crew,_team,_position,_side] Call CreateMan;
+ [_soldier] allowGetIn true;
+ [_soldier] orderGetIn true;
+ _soldier assignAsCommander _vehicle;
+ _soldier moveInCommander _vehicle;
+ _built = _built + 1;
+ };
+ if (_isVehicle select 3) then {
+ Private ["_get","_turrets"];
+ _get = _unitType Call GetNamespace;
+ _turrets = _get select QUERYUNITTURRETS;
+
+ {
+ if (isNull (_vehicle turretUnit _x)) then {
+ _soldier = [_crew,_team,_position,_side] Call CreateMan;
+ [_soldier] allowGetIn true;
+ _soldier moveInTurret [_vehicle, _x];
+ _built = _built + 1;
+ };
+ } forEach _turrets;
+ };
+ [_sideText,'UnitsCreated',_built] Call UpdateStatistics;
+}; \ No newline at end of file
diff --git a/Server/Functions/Server_BuildingDamaged.sqf b/Server/Functions/Server_BuildingDamaged.sqf
new file mode 100644
index 0000000..034a8ef
--- /dev/null
+++ b/Server/Functions/Server_BuildingDamaged.sqf
@@ -0,0 +1,18 @@
+Private["_currentDammages","_damage","_damagedBy","_side","_structure","_timeAttacked"];
+
+_structure = _this Select 0;
+_damagedBy = _this Select 1;
+_damage = _this Select 2;
+_currentDammages = getDammage _structure;
+
+_side = east;
+if ((typeOf _structure) in ('WFBE_WESTSTRUCTURENAMES' Call GetNamespace)) then {_side = west};
+
+_timeAttacked = Format["WFBE_%1_TimeUnderAttack",str _side] Call GetNamespace;
+
+if (_side != Side _damagedBy) then {
+ if (time - _timeAttacked > 30 && _damage > 0.05 && ((_currentDammages + _damage) < 1)) then {
+ [Format["WFBE_%1_TimeUnderAttack",str _side],time,true] Call SetNamespace;
+ ["IsUnderAttack",TypeOf _structure ,_side] Spawn SideMessage;
+ };
+}; \ No newline at end of file
diff --git a/Server/Functions/Server_BuildingHandleDamages.sqf b/Server/Functions/Server_BuildingHandleDamages.sqf
new file mode 100644
index 0000000..f5b5913
--- /dev/null
+++ b/Server/Functions/Server_BuildingHandleDamages.sqf
@@ -0,0 +1,22 @@
+Private ['_building','_dammages','_origin','_side','_sideBuilding','_side'];
+
+_building = _this select 0;
+_dammages = _this select 1;
+_origin = _this select 2;
+_sideBuilding = _this select 3;
+
+_side = civilian;
+if (side _origin == sideEnemy) then {
+ if (_origin isKindOf westSoldierBaseClass) then {_side = west};
+ if (_origin isKindOf eastSoldierBaseClass) then {_side = east};
+} else {
+ _side = side _origin;
+};
+
+if (_sideBuilding == _side) then {
+ _dammages = false;
+} else {
+ _dammages = [_building, _dammages] Call HandleBuildingDamage;
+};
+
+_dammages \ No newline at end of file
diff --git a/Server/Functions/Server_BuildingKilled.sqf b/Server/Functions/Server_BuildingKilled.sqf
new file mode 100644
index 0000000..77b3f2c
--- /dev/null
+++ b/Server/Functions/Server_BuildingKilled.sqf
@@ -0,0 +1,72 @@
+Private ['_current','_find','_killer','_structure','_structures','_side','_tked','_type','_uid'];
+_structure = _this select 0;
+_killer = _this select 1;
+_side = _this select 2;
+_type = _this select 3;
+
+diag_log Format["[WFBE (INFORMATION)][frameno:%3 | ticktime:%4] Server_BuildingKilled: A %1 %2 Structure has been destroyed (By: %5)",str _side,_type,diag_frameno,diag_tickTime,_killer];
+
+//--- Building Teamkill.
+if ((side _killer == _side)&&(isPlayer(_killer))) then {
+ _uid = getPlayerUID _killer;
+ if !(paramShowUID) then {_uid = "xxxxxxx"};
+ _tked = [_type, 'displayName'] Call GetConfigInfo;
+ WFBE_LocalizeMessage = [_side,'CLTFNCLOCALIZEMESSAGE',['BuildingTeamkill',name _killer,_uid,_tked]];
+ publicVariable 'WFBE_LocalizeMessage';
+ if (isHostedServer) then {[_side,'CLTFNCLOCALIZEMESSAGE',['BuildingTeamkill',name _killer,_uid,_tked]] Spawn HandlePVF};
+ if (mysql) then {
+ WF_Logic setVariable ["WF_MYSQL_SERVER",(WF_Logic getVariable "WF_MYSQL_SERVER") + [Format ["MYSQLDATA?WFBE_Update?%1?%2?teamkillstr?%3",_uid,name _killer,worldName]]];
+ };
+
+ diag_log Format["[WFBE (INFORMATION)][frameno:%3 | ticktime:%4] Server_BuildingKilled: Player %1 (%2) has teamkilled a friendly building.",name _killer,_uid,diag_frameno,diag_tickTime];
+};
+
+if (mysql) then {
+ if ((side _killer != _side)&&(isPlayer(_killer))) then {
+ WF_Logic setVariable ["WF_MYSQL_SERVER",(WF_Logic getVariable "WF_MYSQL_SERVER") + [Format ["MYSQLDATA?WFBE_InsertOrUpdate_PKAI?%1?%2?%3?%4?3?%5",_type,getPlayerUID _killer,name _killer,"killed",worldName]]];
+ };
+};
+
+//--- Decrement building limit.
+_find = (Format ['WFBE_%1STRUCTURENAMES',_side] Call GetNamespace) find _type;
+if (_find != -1) then {
+ _current = Call Compile Format ['%1BuildingsCurrent',_side];
+ _current set [_find - 1, (_current select (_find-1)) - 1];
+ Call Compile Format ['%1BuildingsCurrent = _current',_side];
+ publicVariable Format ['%1BuildingsCurrent',_side];
+};
+
+Call Compile Format ["%1BaseStructures = %1BaseStructures - [_structure] - [objNull]; publicVariable '%1BaseStructures';",str _side];
+
+["Destroyed",_type,_side] Spawn SideMessage;
+
+//--- Can be fixed with workers.
+if (paramUseWorkers) then {
+ Private ["_nearLogic","_position","_sold"];
+
+ _sold = _structure getVariable "sold";
+
+ if (isNil '_sold') then {
+ //--- Grab the logic.
+ _position = getPos _structure;
+ _nearLogic = _position nearEntities [["LocationLogicStart"],15];
+ if (count _nearLogic > 0) then {_nearLogic = ([_position, _nearLogic] Call SortByDistance) select 0} else {_nearLogic = objNull};
+
+ if (isNull _nearLogic) exitWith {};
+
+ //--- Completed at 25% on destruction, dropping until it reach 0 (delete).
+ _nearLogic setVariable ["WFBE_B_Completion", 25];
+ //--- The ratio gets lower after each destruction.
+ _nearLogic setVariable ["WFBE_B_CompletionRatio", (_nearLogic getVariable "WFBE_B_CompletionRatio")*0.8];
+ //--- Can be repaired.
+ _nearLogic setVariable ["WFBE_B_Repair", true];
+
+ [Format ["WFBE_WORKERS_%1LOGIC",str _side],((Format ["WFBE_WORKERS_%1LOGIC",str _side]) Call GetNamespace) + [_nearLogic],true] Call SetNamespace;
+
+ [_nearLogic, typeOf _structure, _side, _find - 1] Spawn HandleBuildingRepair;
+ };
+};
+
+sleep 10;
+
+deleteVehicle _structure;
diff --git a/Server/Functions/Server_BuyUnit.sqf b/Server/Functions/Server_BuyUnit.sqf
new file mode 100644
index 0000000..e028685
--- /dev/null
+++ b/Server/Functions/Server_BuyUnit.sqf
@@ -0,0 +1,163 @@
+Private ["_building","_built","_config","_crew","_direction","_dir","_distance","_factoryType","_factoryPosition","_gbq","_id","_index","_isVehicle","_longest","_position","_queu","_queu2","_ret","_side","_sideText","_soldier","_team","_turrets","_type","_unitType","_vehicle","_waitTime"];
+_id = _this select 0;
+_building = _this select 1;
+_unitType = _this select 2;
+_side = _this select 3;
+_team = _this select 4;
+_isVehicle = _this select 5;
+
+_sideText = str _side;
+
+if (!(alive _building)||(isPlayer (leader _team))) exitWith {
+ _gbq = (_team getVariable "queue") - _id;
+ _team setVariable ["queue",_gbq];
+ if !(alive _building) then {diag_log Format ["[WFBE (INFORMATION)][frameno:%2 | ticktime:%3] Server_BuyUnit: Canceled unit '%1', the factory is destroyed.",_unitType,diag_frameno,diag_tickTime]};
+ if (isPlayer (leader _team)) then {diag_log Format ["[WFBE (INFORMATION)][frameno:%3 | ticktime:%4] Server_BuyUnit: Canceled unit '%1', Player %2 has replaced the AI Team leader.",_unitType, name (leader _team),diag_frameno,diag_tickTime]};
+};
+
+diag_log Format["[WFBE (INFORMATION)][frameno:%4 | ticktime:%5] Server_BuyUnit: %1 Team '%2' has purchased a %3",_side,_team,_unitType,diag_frameno,diag_tickTime];
+
+_queu = _building getVariable "queu";
+if (isNil "_queu") then {_queu = []};
+_queu = _queu + [_id select 0];
+_building setVariable ["queu",_queu,true];
+
+_type = typeOf _building;
+_index = (Format ["WFBE_%1STRUCTURENAMES",_sideText] Call GetNamespace) find _type;
+_distance = (Format ["WFBE_%1STRUCTUREDISTANCES",_sideText] Call GetNamespace) select _index;
+_direction = (Format ["WFBE_%1STRUCTUREDIRECTIONS",_sideText] Call GetNamespace) select _index;
+_factoryType = (Format ["WFBE_%1STRUCTURES",_sideText] Call GetNamespace) select _index;
+_waitTime = (_unitType Call GetNamespace) select QUERYUNITTIME;
+_position = [getPos _building,_distance,getDir _building + _direction] Call GetPositionFrom;
+_longest = Format ["WFBE_LONGEST%1BUILDTIME",_factoryType] Call GetNamespace;
+
+_ret = 0;
+_queu2 = [0];
+
+if (count _queu > 0) then {
+ _queu2 = _building getVariable "queu";
+};
+
+while {_id select 0 != _queu select 0} do {
+ sleep 4;
+ _ret = _ret + 4;
+ _queu = _building getVariable "queu";
+
+ if (!(alive _building)||(isNull _building)||(isPlayer (leader _team))) exitWith {
+ _gbq = (_team getVariable "queue") - _id;
+ _team setVariable ["queue",_gbq];
+ _queu = _building getVariable "queu";
+ _queu = _queu - [_queu select 0];
+ _building setVariable ["queu",_queu,true];
+ if !(alive _building) then {diag_log Format ["[WFBE (INFORMATION)][frameno:%2 | ticktime:%3] Server_BuyUnit: Canceled unit '%1', the factory is destroyed.",_unitType,diag_frameno,diag_tickTime]};
+ if (isPlayer (leader _team)) then {diag_log Format ["[WFBE (INFORMATION)][frameno:%3 | ticktime:%4] Server_BuyUnit: Canceled unit '%1', Player %2 has replaced the AI Team leader.",_unitType, name (leader _team),diag_frameno,diag_tickTime]};
+ };
+
+ if (_queu select 0 == _queu2 select 0) then {
+ if (_ret > _longest) then {
+ if (count _queu > 0) then {
+ _queu = _building getVariable "queu";
+ _queu = _queu - [_queu select 0];
+ _building setVariable ["queu",_queu,true];
+ };
+ };
+ };
+ if (count _queu != count _queu2) then {
+ _ret = 0;
+ _queu2 = _building getVariable "queu";
+ };
+};
+
+sleep _waitTime;
+
+_queu = _building getVariable "queu";
+_queu = _queu - [_id select 0];
+_building setVariable ["queu",_queu,true];
+
+if (!(alive _building)||(isPlayer (leader _team))) exitWith {
+ _gbq = (_team getVariable "queue") - _id;
+ _team setVariable ["queue",_gbq];
+ if !(alive _building) then {diag_log Format ["[WFBE (INFORMATION)][frameno:%2 | ticktime:%3] Server_BuyUnit: Canceled unit '%1', the factory is destroyed.",_unitType,diag_frameno,diag_tickTime]};
+ if (isPlayer (leader _team)) then {diag_log Format ["[WFBE (INFORMATION)][frameno:%3 | ticktime:%4] Server_BuyUnit: Canceled unit '%1', Player %2 has replaced the AI Team leader.",_unitType, name (leader _team),diag_frameno,diag_tickTime]};
+};
+
+if (_unitType isKindOf "Man") then {
+ _soldier = [_unitType,_team,_position,_side] Call CreateMan;
+ [_sideText,'UnitsCreated',1] Call UpdateStatistics;
+} else {
+ _crew = Format ["WFBE_%1SOLDIER",_sideText] Call GetNamespace;
+ if (_unitType isKindOf "Tank") then {_crew = Format ["WFBE_%1CREW",_sideText] Call GetNamespace};
+ if (_unitType isKindOf "Air") then {_crew = Format ["WFBE_%1PILOT",_sideText] Call GetNamespace};
+ _vehicle = [_unitType,_position,_side,true] Call CreateVehi;
+ _factoryPosition = getPos _building;
+ _dir = -((((_position select 1) - (_factoryPosition select 1)) atan2 ((_position select 0) - (_factoryPosition select 0))) - 90);
+ _vehicle setDir _dir;
+ _vehicle setVelocity [0,0,-1];
+ //--- AI Can fly.
+ if (_vehicle isKindOf "Air") then {
+ _vehicle flyInHeight 120;
+ if (_vehicle isKindOf "Plane") then {
+ _vehicle setPos [_position select 0,_position select 1,1500];
+ _vehicle setVelocity [sin _dir * 250,cos _dir * 250,0];
+ };
+ };
+
+ emptyQueu = emptyQueu + [_vehicle];
+ _vehicle Spawn HandleEmptyVehicle;
+ if (_vehicle distance (leader _team) < 200) then {(units _team) allowGetIn true;_team addVehicle _vehicle};
+
+ /* Clear the vehicle */
+ clearWeaponCargo _vehicle;
+ clearMagazineCargo _vehicle;
+
+ _soldier = [_crew,_team,_position,_side] Call CreateMan;
+ [_soldier] allowGetIn true;
+ [_soldier] orderGetIn true;
+ if (_unitType in ('WFBE_BALANCEDUNITS' Call GetNamespace) && paramBalancing) then {[_vehicle] Spawn BalanceInit};
+ _soldier assignAsDriver _vehicle;
+ _soldier moveInDriver _vehicle;
+ [_sideText,'VehiclesCreated',1] Call UpdateStatistics;
+ _built = 1;
+ if (_isVehicle select 1) then {
+ _soldier = [_crew,_team,_position,_side] Call CreateMan;
+ [_soldier] allowGetIn true;
+ [_soldier] orderGetIn true;
+ _soldier assignAsGunner _vehicle;
+ _soldier moveInGunner _vehicle;
+ _built = _built + 1;
+ };
+ if (_isVehicle select 2) then {
+ if (vehicle leader _team == leader _team && leader _team distance _vehicle < 200 && alive leader _team) then {
+ [leader _team] allowGetIn true;
+ [leader _team] orderGetIn true;
+ (leader _team) assignAsCommander _vehicle;
+ (leader _team) moveInCommander _vehicle;
+ } else {
+ _soldier = [_crew,_team,_position,_side] Call CreateMan;
+ [_soldier] allowGetIn true;
+ [_soldier] orderGetIn true;
+ _soldier assignAsCommander _vehicle;
+ _soldier moveInCommander _vehicle;
+ };
+ _built = _built + 1;
+ };
+
+ if (_isVehicle select 3) then {
+ Private ["_get","_turrets"];
+ _get = _unitType Call GetNamespace;
+ _turrets = _get select QUERYUNITTURRETS;
+
+ {
+ if (isNull (_vehicle turretUnit _x)) then {
+ _soldier = [_crew,_team,_position,_side] Call CreateMan;
+ [_soldier] allowGetIn true;
+ _soldier moveInTurret [_vehicle, _x];
+ _built = _built + 1;
+ };
+ } forEach _turrets;
+ };
+ [_sideText,'UnitsCreated',_built] Call UpdateStatistics;
+};
+
+_gbq = (_team getVariable "queue") - _id;
+_team setVariable ["queue",_gbq]; \ No newline at end of file
diff --git a/Server/Functions/Server_CanUpdateTeam.sqf b/Server/Functions/Server_CanUpdateTeam.sqf
new file mode 100644
index 0000000..e4863b7
--- /dev/null
+++ b/Server/Functions/Server_CanUpdateTeam.sqf
@@ -0,0 +1,19 @@
+/*
+ Author: Benny
+ Name: Server_CanUpdateTeam.sqf
+ Parameters:
+ 0 - Group
+ Description:
+ This function detect whether a human commander is in command or not and if a team is in the 'main' teams.
+*/
+
+Private ['_canUpdate','_commander','_team'];
+_team = _this;
+
+_canUpdate = true;
+if (((leader _team) Call GetClientID) != 0) then {
+ _commander = (side _team) Call GetCommanderTeam;
+ if !(isNull _commander) then {_canUpdate = false};
+};
+
+_canUpdate \ No newline at end of file
diff --git a/Server/Functions/Server_ChangeAICommanderFunds.sqf b/Server/Functions/Server_ChangeAICommanderFunds.sqf
new file mode 100644
index 0000000..447fd09
--- /dev/null
+++ b/Server/Functions/Server_ChangeAICommanderFunds.sqf
@@ -0,0 +1,7 @@
+Private ["_amount","_funds","_side"];
+_side = _this select 0;
+_amount = _this select 1;
+
+_funds = (_side) Call GetAICommanderFunds;
+
+[Format ["WFBE_%1_AICommanderFunds",_side], _funds + _amount, true] Call SetNamespace; \ No newline at end of file
diff --git a/Server/Functions/Server_CreateDefenseTemplate.sqf b/Server/Functions/Server_CreateDefenseTemplate.sqf
new file mode 100644
index 0000000..ae00769
--- /dev/null
+++ b/Server/Functions/Server_CreateDefenseTemplate.sqf
@@ -0,0 +1,36 @@
+Private ["_created","_current","_dir","_i","_object","_origin","_relDir","_relPos","_skip","_template","_toplace","_toWorld"];
+_origin = _this select 0;
+_template = _this select 1;
+_existingTemplate = if (count _this > 2) then {_this select 2} else {[]};
+
+_dir = getDir _origin;
+_created = [];
+_toplace = objNull;
+
+for '_i' from 0 to count(_template)-1 do {
+ _current = _template select _i;
+ _object = _current select 0;
+ _relPos = _current select 1;
+ _relDir = _current select 2;
+
+ _skip = false;
+ if (_i < count(_existingTemplate)) then {
+ if (alive(_existingTemplate select _i)) then {_skip = true};
+ };
+
+ if !(_skip) then {
+ _toplace = _object createVehicle [0,0,0];
+
+ _toWorld = _origin modelToWorld _relPos;
+ _toWorld set [2,0];
+
+ _toplace setDir (_dir - _relDir);
+ _toplace setPos _toWorld;
+ } else {
+ _toplace = _existingTemplate select _i;
+ };
+
+ _created = _created + [_toplace];
+};
+
+_created \ No newline at end of file
diff --git a/Server/Functions/Server_CreateTeam.sqf b/Server/Functions/Server_CreateTeam.sqf
new file mode 100644
index 0000000..83f9151
--- /dev/null
+++ b/Server/Functions/Server_CreateTeam.sqf
@@ -0,0 +1,47 @@
+Private ['_canCreate','_commander','_crews','_ctype','_driver','_firstDone','_gunner','_list','_lockVehicles','_position','_probability','_side','_team','_type','_unit','_units','_vehicle','_vehicles'];
+
+_list = _this select 0;
+_position = _this select 1;
+_side = _this select 2;
+_lockVehicles = _this select 3;
+_team = _this select 4;
+_probability = if (count _this > 5) then {_this select 5} else {-1};
+_units = [];
+_vehicles = [];
+_crews = [];
+_firstDone = false;
+
+//--- Create a group if none are given as a parameter.
+if (isNull _team) then {_team = createGroup _side};
+
+_ctype = switch (_side) do {case West: {'WEST'}; case East: {'EAST'}; case Resistance: {'GUER'}; case Civilian: {'CIV'}};
+
+//--- Create.
+{
+ _canCreate = true;
+ if (_probability != -1) then {
+ if (random 100 > _probability && _firstDone) then {_canCreate = false};
+ _firstDone = true;
+ };
+
+ if (_canCreate) then {
+ if (_x isKindOf 'Man') then {
+ _unit = [_x,_team,_position,_side] Call CreateMan;
+ _units = _units + [_unit];
+ } else {
+ _vehicle = [_x,_position,_side,_lockVehicles] Call CreateVehi;
+ _type = if (_vehicle isKindOf 'Man') then {Format ['WFBE_%1SOLDIER',_ctype] Call GetNamespace} else {if (_vehicle isKindOf 'Air') then {Format ['WFBE_%1PILOT',_ctype] Call GetNamespace} else {Format ['WFBE_%1CREW',_ctype] Call GetNamespace}};
+ if (_vehicle emptyPositions 'driver' > 0) then {_driver = [_type,_team,_position,_side] Call CreateMan;_driver moveInDriver _vehicle;_crews = _crews + [_driver]};
+ if (_vehicle emptyPositions 'gunner' > 0) then {_gunner = [_type,_team,_position,_side] Call CreateMan;_gunner moveInGunner _vehicle;_crews = _crews + [_gunner]};
+ if (_vehicle emptyPositions 'commander' > 0) then {_commander = [_type,_team,_position,_side] Call CreateMan;_commander moveInCommander _vehicle;_crews = _crews + [_commander]};
+ _vehicles = _vehicles + [_vehicle];
+ };
+ };
+} forEach _list;
+
+//--- Add vehicles.
+{
+ _team addVehicle _x;
+} forEach _vehicles;
+
+[_units,_vehicles,_team,_crews] \ No newline at end of file
diff --git a/Server/Functions/Server_GetAICommanderFunds.sqf b/Server/Functions/Server_GetAICommanderFunds.sqf
new file mode 100644
index 0000000..841814d
--- /dev/null
+++ b/Server/Functions/Server_GetAICommanderFunds.sqf
@@ -0,0 +1 @@
+Format ["WFBE_%1_AICommanderFunds",_this] Call GetNamespace \ No newline at end of file
diff --git a/Server/Functions/Server_HQKilled.sqf b/Server/Functions/Server_HQKilled.sqf
new file mode 100644
index 0000000..b24be73
--- /dev/null
+++ b/Server/Functions/Server_HQKilled.sqf
@@ -0,0 +1,46 @@
+Private ["_deployed","_dir","_hq","_HQName","_killer","_kname","_kuid","_MHQ","_pos","_side","_tked","_type","_uid"];
+_hq = _this select 0;
+_killer = _this select 1;
+_side = _this select 2;
+_type = _this select 3;
+
+_pos = getPos _hq;
+_dir = getDir _hq;
+_kuid = if (isPlayer _killer) then {getPlayerUID _killer} else {'0'};
+_kname = name _killer;
+
+_deployed = (str _side) Call GetSideHQDeployed;
+
+diag_log Format["[WFBE (INFORMATION)][frameno:%2 | ticktime:%3] Server_HQKilled: The %1 MHQ has been destroyed",str _side,diag_frameno,diag_tickTime];
+
+//--- Building Teamkill.
+if ((side _killer == _side)&&(isPlayer(_killer))) then {
+ _uid = if !(paramShowUID) then {_uid = 'xxxxxxx'} else {_kuid};
+ _tked = [_type, 'displayName'] Call GetConfigInfo;
+ WFBE_LocalizeMessage = [_side,'CLTFNCLOCALIZEMESSAGE',['BuildingTeamkill',name _killer,_uid,_tked]];
+ publicVariable 'WFBE_LocalizeMessage';
+ if (isHostedServer) then {[_side,'CLTFNCLOCALIZEMESSAGE',['BuildingTeamkill',name _killer,_uid,_tked]] Spawn HandlePVF};
+
+ diag_log Format["[WFBE (INFORMATION)][frameno:%3 | ticktime:%4] Server_HQKilled: Player %1 (%2) has teamkilled the MHQ.",name _killer,_uid,diag_frameno,diag_tickTime];
+};
+
+sleep random(2);
+if (_deployed) then {
+ _HQName = Format["WFBE_%1MHQNAME",_side] Call GetNamespace;
+ _MHQ = _HQName createVehicle _pos;
+ _MHQ setDir _dir;
+ _MHQ setDammage 1;
+
+ Call Compile Format ["%1MHQ = _MHQ; %1MHQDeployed = false; publicVariable '%1MHQ'; publicVariable '%1MHQDeployed';",str _side];
+};
+
+if (mysql) then {
+ if ((side _killer != _side)&&(isPlayer(_killer))) then {
+ WF_Logic setVariable ["WF_MYSQL_SERVER",(WF_Logic getVariable "WF_MYSQL_SERVER") + [Format ["MYSQLDATA?WFBE_Update?%1?%2?killedhq?%3",getPlayerUID _killer,name _killer,worldName]]];
+ WF_Logic setVariable ["WF_MYSQL_SERVER",(WF_Logic getVariable "WF_MYSQL_SERVER") + [Format ["MYSQLDATA?WFBE_InsertOrUpdate_PKAI?%1?%2?%3?%4?%5?%6",_type,_kuid,_kname,"killed",4,worldName]]];
+ };
+};
+
+if (_type == WESTHQ) then {_type = 'WFBE_WESTMHQNAME' Call GetNamespace};
+if (_type == EASTHQ) then {_type = 'WFBE_EASTMHQNAME' Call GetNamespace};
+['Destroyed',_type,_side] Spawn SideMessage;
diff --git a/Server/Functions/Server_HandleBuildingDamage.sqf b/Server/Functions/Server_HandleBuildingDamage.sqf
new file mode 100644
index 0000000..31da5c2
--- /dev/null
+++ b/Server/Functions/Server_HandleBuildingDamage.sqf
@@ -0,0 +1,3 @@
+Private ["_difference"];
+_difference = ((_this select 1) - (getDammage (_this select 0)))/('WFBE_BUILDINGDAMAGEREDUCTION' Call GetNamespace);
+((getDammage (_this select 0))+_difference) \ No newline at end of file
diff --git a/Server/Functions/Server_HandleBuildingRepair.sqf b/Server/Functions/Server_HandleBuildingRepair.sqf
new file mode 100644
index 0000000..04e082c
--- /dev/null
+++ b/Server/Functions/Server_HandleBuildingRepair.sqf
@@ -0,0 +1,104 @@
+Private ["_bindex","_degradation","_direction","_etat","_group","_lastCompletionCheck","_logic","_position","_ruins","_ruinsType","_side","_type"];
+
+_logic = _this select 0;
+_type = _this select 1;
+_side = _this select 2;
+_bindex = _this select 3;
+
+_lastCompletionCheck = 0;
+_degradation = 'WFBE_WORKERS_DEGRADATION' Call GetNamespace;
+
+_ruinsType = "WFBE_WORKERS_RUINS" Call GetNamespace;
+_position = _logic getVariable "WFBE_B_Position";
+_direction = _logic getVariable "WFBE_B_Direction";
+
+//--- Create ruins wherever the building get destroyed.
+_ruins = _ruinsType createVehicle _position;
+_ruins setDir _direction;
+_ruins setPos _position;
+
+while {true} do {
+ _etat = _logic getVariable 'WFBE_B_Completion';
+
+ //--- Completed.
+ if (_etat >= 100) exitWith {
+ Private ["_buildingsCosts","_buildingsNames","_buildingsType","_current","_index","_limit","_site"];
+ _buildingsType = Format["WFBE_%1STRUCTURES",str _side] Call GetNamespace;
+ _buildingsType = _buildingsType - [_buildingsType select 0];
+ _buildingsNames = Format["WFBE_%1STRUCTURENAMES",str _side] Call GetNamespace;
+ _buildingsNames = _buildingsNames - [_buildingsNames select 0];
+ _buildingsCosts = Format["WFBE_%1STRUCTURECOSTS",str _side] Call GetNamespace;
+
+ //--- Place if limits allows us to do so.
+ _index = _buildingsNames find _type;
+
+ if (_index != -1) then {
+ _current = Call Compile Format ['%1BuildingsCurrent',str _side];
+ _limit = (Format['WFBE_BUILDINGMAX%1',(_buildingsType select _index)]) Call GetNamespace;
+ if (isNil '_limit') then {_limit = 4}; //--- Default.
+
+ //--- We can build, the limist hasn't been reached yet.
+ if ((_current select _index) < _limit) then {
+ _site = _type createVehicle _position;
+ _site setDir _direction;
+ _site setPos _position;
+
+ ["Constructed",_type,_side] Spawn SideMessage;
+
+ //--- Site is created, we add the rest.
+ if !(isNull _site) then {
+ _current set [_bindex, (_current select _bindex) + 1];
+ Call Compile Format ['%1BuildingsCurrent = _current',_side];
+ publicVariable Format ['%1BuildingsCurrent',_side];
+
+ Call Compile Format ["%1BaseStructures = %1BaseStructures + [_site]; publicVariable '%1BaseStructures';",str _side];
+
+ _site setVehicleInit Format["[this,false,%1] ExecVM 'Client\Init\Init_BaseStructure.sqf'",_side];
+ processInitCommands;
+
+ _site addEventHandler ["hit",{_this Spawn BuildingDamaged}];
+ if (paramHandleFF) then {
+ Call Compile Format ["_site addEventHandler ['handleDamage',{[_this select 0,_this select 2,_this select 3, %1] Call BuildingHandleDamages}]",_side];
+ } else {
+ _site addEventHandler ['handleDamage',{getDammage (_this select 0)+((_this select 2)/('WFBE_BUILDINGDAMAGEREDUCTION' Call GetNamespace))}];
+ };
+ Call Compile Format ["_site AddEventHandler ['killed',{[_this select 0,_this select 1,%1,'%2'] Spawn BuildingKilled}];",_side,_type];
+
+ if !(paramMoneyOnly) then {
+ [_side, -round((_buildingsCosts select _index)/2)] Call ChangeSideSupply;
+ };
+
+ diag_log Format["[WFBE (INFORMATION)][frameno:%3 | ticktime:%4] Server_HandleBuildingRepair: A %1 %2 has been repaired",str _side,_type,diag_frameno,diag_tickTime];
+ };
+
+ _logic setVariable ["WFBE_B_Repair",false];
+ };
+ };
+
+ [Format ["WFBE_WORKERS_%1LOGIC",str _side],((Format ["WFBE_WORKERS_%1LOGIC",str _side]) Call GetNamespace) - [_logic],true] Call SetNamespace;
+ };
+
+ sleep 5;
+
+ //--- Has the etat changed?
+ if ((_logic getVariable 'WFBE_B_Completion') == _etat) then {_lastCompletionCheck = _lastCompletionCheck + 5} else {_lastCompletionCheck = 0};
+
+ //--- Degradation if nothing happened.
+ if (_lastCompletionCheck > 30) then {
+ _etat = (_logic getVariable "WFBE_B_Completion") - _degradation;
+ if (_etat < 0) then {_etat = 0};
+ _logic setVariable ["WFBE_B_Completion",_etat];
+ _lastCompletionCheck = 0;
+ };
+
+ //--- If the etat reach 0, the building is lost.
+ if (_etat <= 0) exitWith {
+ [Format ["WFBE_WORKERS_%1LOGIC",str _side],((Format ["WFBE_WORKERS_%1LOGIC",str _side]) Call GetNamespace) - [_logic],true] Call SetNamespace;
+
+ _group = group _logic;
+ deleteVehicle _logic;
+ deleteGroup _group;
+ };
+};
+
+deleteVehicle _ruins; \ No newline at end of file
diff --git a/Server/Functions/Server_HandleDefense.sqf b/Server/Functions/Server_HandleDefense.sqf
new file mode 100644
index 0000000..8182271
--- /dev/null
+++ b/Server/Functions/Server_HandleDefense.sqf
@@ -0,0 +1,40 @@
+Private ["_buildings","_closest","_defense","_direction","_distance","_index","_position","_side","_soldier","_team","_type","_unit"];
+_defense = _this select 0;
+_side = _this select 1;
+_team = _this select 2;
+_closest = _this select 3;
+
+while {alive _defense} do {
+ if (isNull(gunner _defense) || !alive gunner _defense) then {
+
+ sleep 7;
+
+ if (alive _closest && !(isNull _closest )) then {
+ _type = typeOf _closest;
+ _index = (Format["WFBE_%1STRUCTURENAMES",str _side] Call GetNamespace) find _type;
+ _distance = (Format["WFBE_%1STRUCTUREDISTANCES",str _side] Call GetNamespace) select _index;
+ _direction = (Format["WFBE_%1STRUCTUREDIRECTIONS",str _side] Call GetNamespace) select _index;
+ _position = [getPos _closest,_distance,getDir (_closest) + _direction] Call GetPositionFrom;
+
+ _type = Format ["WFBE_%1SOLDIER",str _side] Call GetNamespace;
+ _soldier = [_type,_team,_position,_side] Call CreateMan;
+ [_soldier] allowGetIn true;
+ _soldier assignAsGunner _defense;
+ [_soldier] orderGetIn true;
+
+ [str _side,'UnitsCreated',1] Call UpdateStatistics;
+
+ diag_log Format["[WFBE (INFORMATION)][frameno:%3 | ticktime:%4] Server_HandleDefense: A Soldier has been dispatched to the %1 defense %2",str _side,_type,diag_frameno,diag_tickTime];
+
+ //--- Calculate the average time in function of the distance and the speed.
+ sleep ((((_soldier distance _defense)/(14*1000))*3600)+20);
+
+ if ((vehicle _soldier != _defense)&& alive _soldier &&(!isNull _soldier)) then {
+ if ((_defense EmptyPositions "gunner" > 0) && alive _defense && (!isNull _defense)) then {_soldier MoveInGunner _defense} else {deleteVehicle _soldier};
+ };
+ } else {
+ diag_log Format["[WFBE (INFORMATION)][frameno:%1 | ticktime:%2] Server_HandleDefense.sqf: Canceled auto manning, the barracks is destroyed.",diag_frameno,diag_tickTime];
+ };
+ };
+ sleep 420;
+}; \ No newline at end of file
diff --git a/Server/Functions/Server_HandleEmptyVehicle.sqf b/Server/Functions/Server_HandleEmptyVehicle.sqf
new file mode 100644
index 0000000..29307a8
--- /dev/null
+++ b/Server/Functions/Server_HandleEmptyVehicle.sqf
@@ -0,0 +1,36 @@
+Private ['_abtimer','_exit','_skip','_timer','_trash','_vehicle'];
+
+_vehicle = _this;
+
+_exit = false;
+_timer = 0;
+_abtimer = ('WFBE_ABANDONVEHICLETIMER' Call GetNamespace);
+
+while {!_exit} do {
+ sleep 20;
+ _skip = false;
+ if (!(alive _vehicle) && !(isNull _vehicle)) then {
+ _skip = true;
+ _exit = true;
+ if !(_vehicle in trashQueu) then {
+ trashQueu = trashQueu + [_vehicle];
+ _vehicle Spawn TrashObject;
+ };
+ };
+ if (!(isNull _vehicle) && !_skip) then {
+ if (({alive _x} count (crew _vehicle)) > 0) then {_timer = 0};
+ if (_timer > _abtimer) then {
+ _exit = true;
+ if (someAmmo _vehicle) then {_vehicle setVehicleAmmo 0};
+ _vehicle setDammage 1;
+ sleep 2;
+ if !(_vehicle in trashQueu) then {
+ trashQueu = trashQueu + [_vehicle];
+ (_vehicle) Spawn TrashObject;
+ };
+ };
+ _timer = _timer + 20;
+ } else {_exit = true};
+};
+
+emptyQueu = emptyQueu - [_vehicle]; \ No newline at end of file
diff --git a/Server/Functions/Server_HandleReloadDefense.sqf b/Server/Functions/Server_HandleReloadDefense.sqf
new file mode 100644
index 0000000..61eeee2
--- /dev/null
+++ b/Server/Functions/Server_HandleReloadDefense.sqf
@@ -0,0 +1,71 @@
+private ["_defense", "_side", "_sideID", "_turret", "_closestTown", "_reload", "_buildings", "_mhq", "_magazine"];
+
+_defense = _this select 0;
+_side = _this select 1;
+_sideID = _side Call GetSideID;
+
+if(!isArray(configFile >> "CfgVehicles" >> (typeOf _defense) >> "Turrets" >> "MainTurret" >> "weapons")) exitWith { };
+
+_turret = getArray(configFile >> "CfgVehicles" >> (typeOf _defense) >> "Turrets" >> "MainTurret" >> "weapons") select 0;
+_closestTown = [_defense] Call GetClosestLocation;
+
+if(isNull _closestTown || _closestTown distance _defense > 400) then
+{
+ _closestTown = ObjNull;
+};
+
+// 0: no auto reloading
+if(paramDefenseReloading == 0) exitWith { };
+
+while { alive _defense } do
+{
+ sleep 10;
+ if((_defense ammo _turret) == 0) then
+ {
+ _reload = false;
+
+ // 3: Reload everywhere
+ if(paramDefenseReloading == 3) then
+ {
+ _reload = true;
+ };
+
+ // 2: Reload near towns or base/HQ
+ if(!_reload && paramDefenseReloading == 2) then
+ {
+ _reload = false;
+ if(!isNull _closestTown && (_closestTown getVariable "sideID") == _sideID) then
+ {
+ _reload = true;
+ };
+ };
+
+ // 1: Reload near base/HQ
+ if(!_reload && (paramDefenseReloading == 1 || paramDefenseReloading == 2)) then
+ {
+ _buildings = (str _side) Call GetSideStructures;
+ _mhq = call compile format ["%1MHQ", str _side];
+
+ if(!isNil "_mhq") then
+ {
+ _buildings = _buildings + [ _mhq ];
+ };
+
+ {
+ if(_defense distance _x < 200) exitWith
+ {
+ _reload = true;
+ }
+ } forEach(_buildings);
+ };
+
+ if(_reload) then
+ {
+ _magazine = (_defense magazinesTurret [0]) select 0;
+ if(!isNil "_magazine") then
+ {
+ ["ACE_sys_crewserved_remadd", [_defense, _magazine, 1]] call CBA_fnc_globalEvent;
+ };
+ };
+ };
+}; \ No newline at end of file
diff --git a/Server/Functions/Server_HandleSPVF.sqf b/Server/Functions/Server_HandleSPVF.sqf
new file mode 100644
index 0000000..3b955bf
--- /dev/null
+++ b/Server/Functions/Server_HandleSPVF.sqf
@@ -0,0 +1,16 @@
+/*
+ description:
+ - New network system handler.
+ note:
+ - addPublicVariableEventHandler is triggered everywhere BUT on the caller.
+ usage:
+ - [server PVF to run, parameters]
+*/
+
+Private ["_parameters","_publicVar","_script"];
+_publicVar = _this;
+
+_script = _publicVar select 0;
+_parameters = if (count _publicVar > 1) then {_publicVar select 1} else {[]};
+
+_parameters Spawn (Call Compile _script); \ No newline at end of file
diff --git a/Server/Functions/Server_HandleSpecial.sqf b/Server/Functions/Server_HandleSpecial.sqf
new file mode 100644
index 0000000..fc3fec8
--- /dev/null
+++ b/Server/Functions/Server_HandleSpecial.sqf
@@ -0,0 +1,48 @@
+Private['_args','_base','_dropPosX','_dropPosY','_dropPosZ','_droppos1','_droppos2','_playerTeam','_side','_st','_target'];
+
+_args = _this;
+_side = _args select 1;
+
+switch (_args select 0) do {
+ case "Paratroops": {
+ _args spawn KAT_Paratroopers;
+ };
+
+ case "ParaVehi": {
+ _args spawn KAT_ParaVehicles;
+ };
+
+ case "ParaAmmo": {
+ _args spawn KAT_ParaAmmo;
+ };
+
+ case "RespawnST": {
+ _st = Format ["WFBE_%1_AISupplyTrucks",Str _side] Call GetNamespace;
+ {if (!isNull (driver _x)) then {driver _x setDammage 1};_x setDammage 1} forEach _st;
+ diag_log Format["[WFBE (INFORMATION)][frameno:%2 | ticktime:%3] Server_HandleSpecial: The %1 supply trucks have been respawned.",str _side,diag_frameno,diag_tickTime];
+ };
+
+ case "uav": {
+ _args spawn KAT_UAV;
+ };
+
+ case "upgrade": {["NewIntelAvailable","",_side,""] Spawn SideMessage};
+
+ case "ICBM": {
+ _base = (_args select 2);
+ _target = (_args select 3);
+ _playerTeam = (_args select 4);
+ diag_log Format["[WFBE (INFORMATION)][frameno:%4 | ticktime:%5] Server_HandleSpecial: The %1 %2 Team (Leader: %3) has called an ICBM Nuke.",str _side,_playerTeam,name (leader _playerTeam),diag_frameno,diag_tickTime];
+ if (isNull _target || !alive _target) exitWith {};
+ _dropPosX = getPos _base select 0;
+ _dropPosY = getPos _base select 1;
+ _dropPosZ = getPos _base select 2;
+ _droppos1 = [_dropPosX + 4, _dropPosY + 4, _dropPosZ];
+ _droppos2 = [_dropPosX + 8, _dropPosY + 8, _dropPosZ];
+ waitUntil {!alive _target || isNull _target};
+ det1 = "BO_GBU12_LGB" createVehicle [(getpos _target select 0),(getpos _target select 1), 0];
+ det2 = createVehicle ["BO_GBU12_LGB",_droppos1,[], 0, "None"];
+ det3 = createVehicle ["BO_GBU12_LGB",_droppos2,[], 0, "None"];
+ [_base] Spawn NukeDammage;
+ };
+}; \ No newline at end of file
diff --git a/Server/Functions/Server_MHQRepair.sqf b/Server/Functions/Server_MHQRepair.sqf
new file mode 100644
index 0000000..ae8b533
--- /dev/null
+++ b/Server/Functions/Server_MHQRepair.sqf
@@ -0,0 +1,38 @@
+Private ["_commanderTeam","_direction","_hq","_HQName","_MHQ","_position","_side","_sideText","_text"];
+_side = _this select 0;
+_sideText = str _side;
+
+_hq = (_sideText) Call GetSideHQ;
+_position = getPos _hq;
+_direction = getDir _hq;
+
+_commanderTeam = (_side) Call GetCommanderTeam;
+if !(isNull _commanderTeam) then {
+ WFBE_SetHQStatus = [vehicleVarName (leader _commanderTeam),'CLTFNCSETHQSTATUS',false];
+ publicVariable 'WFBE_SetHQStatus';
+ if (isHostedServer) then {[vehicleVarName (leader _commanderTeam),'CLTFNCSETHQSTATUS',false] Spawn HandlePVF};
+};
+
+sleep 15;
+
+_HQName = Format["WFBE_%1MHQNAME",_sideText] Call GetNamespace;
+_MHQ = _HQName createVehicle _position;
+
+Call Compile Format ["%1MHQ = _MHQ; publicVariable '%1MHQ';",_sideText];
+
+_MHQ setDir _direction;
+_MHQ setVelocity [0,0,-1];
+
+Call Compile Format ["_MHQ AddEventHandler ['killed',{[_this select 0,_this select 1,%1,'%2'] Spawn HQKilled}];",_side,typeOf _MHQ];
+
+_text = "";
+if (('WFBE_INCOMINGMISSILEMAXRANGE' Call GetNamespace) != 0) then {_text = "this addEventHandler ['IncomingMissile', {_this Spawn HandleIncomingMissile}];"};
+_MHQ setVehicleInit Format["['Headquarters','ColorGreen',[1,1],'','HQUndeployed',this,0.2,false,'','',false,%1] ExecVM 'Common\Common_MarkerUpdate.sqf';%2",_side,_text];
+processInitCommands;
+
+deleteVehicle _hq;
+
+Call Compile Format ["%1MHQDeployed = false; publicVariable '%1MHQDeployed';",_sideText];
+WF_Logic setVariable [Format ["%1MHQRepair",_sideText],false,true];
+
+diag_log Format["[WFBE (INFORMATION)][frameno:%2 | ticktime:%3] Server_MHQRepair: The %1 MHQ was repaired.",_sideText,diag_frameno,diag_tickTime]; \ No newline at end of file
diff --git a/Server/Functions/Server_PlaceJoiningUnit.sqf b/Server/Functions/Server_PlaceJoiningUnit.sqf
new file mode 100644
index 0000000..99deb63
--- /dev/null
+++ b/Server/Functions/Server_PlaceJoiningUnit.sqf
@@ -0,0 +1,18 @@
+Private ["_buildings","_hq","_placeAt","_side","_unit"];
+
+_unit = _this select 0;
+_side = _this select 1;
+
+waitUntil {!isNil Format["%1StartingLocation",str _side]};
+
+_buildings = (str _side) Call GetSideStructures;
+_hq = (str _side) Call GetSideHQ;
+
+_placeAt = objNull;
+if (count _buildings > 0) then {
+ _placeAt = ([_hq, _buildings] Call SortByDistance) select 0;
+} else {
+ _placeAt = _hq;
+};
+
+_unit setPos ([getPos _placeAt,20,30] Call GetRandomPosition); \ No newline at end of file
diff --git a/Server/Functions/Server_SelectOccupTeam.sqf b/Server/Functions/Server_SelectOccupTeam.sqf
new file mode 100644
index 0000000..a28bf3c
--- /dev/null
+++ b/Server/Functions/Server_SelectOccupTeam.sqf
@@ -0,0 +1,41 @@
+private ["_difficulty","_probaOccupation","_oc1","_oc2","_oc3","_oc4","_oc5","_oc6","_ran1","_ran2","_supplyValue","_teams","_type","_x"];
+_supplyValue = _this select 0;
+_type = [];
+_teams = [];
+
+_oc1 = 'WFBE_OCCUPATIONTEAM1' Call GetNamespace;
+_oc2 = 'WFBE_OCCUPATIONTEAM2' Call GetNamespace;
+_oc3 = 'WFBE_OCCUPATIONTEAM3' Call GetNamespace;
+_oc4 = 'WFBE_OCCUPATIONTEAM4' Call GetNamespace;
+_oc5 = 'WFBE_OCCUPATIONTEAM5' Call GetNamespace;
+_oc6 = 'WFBE_OCCUPATIONTEAM6' Call GetNamespace;
+
+_probaOccupation = 75;
+if ((_supplyValue >= _oc1)&&(_supplyValue < _oc2)) then {_type = ["SmallTeam"];_probaOccupation = 95};
+if ((_supplyValue >= _oc2)&&(_supplyValue < _oc3)) then {_type = ["SmallTeam","SmallVehTeam"];_probaOccupation = 85};
+if ((_supplyValue >= _oc3)&&(_supplyValue < _oc4)) then {_type = ["SmallTeam","MediumTeam","MediumVehTeam"];_probaOccupation = 75};
+if ((_supplyValue >= _oc4)&&(_supplyValue < _oc5)) then {_type = ["SmallTeam","MediumTeam","LargeTeam","MediumVehTeam"];_probaOccupation = 65};
+if ((_supplyValue >= _oc5)&&(_supplyValue < _oc6)) then {_type = ["SmallTeam","MediumTeam","LargeTeam","MediumVehTeam","LargeVehTeam"];_probaOccupation = 60};
+if (_supplyValue >= _oc6) then {_type = ["SmallTeam","MediumTeam","LargeTeam","SmallVehTeam","MediumVehTeam","LargeVehTeam"];_probaOccupation = 55};
+
+_difficulty = 'WFBE_TOWNOCCUPATIONDIFFICULTY' Call GetNamespace;
+if (_difficulty == 5) then {
+ if (diag_fps >= 35) then {_difficulty = 4};
+ if (diag_fps >= 25 && diag_fps < 30) then {_difficulty = 3};
+ if (diag_fps >= 15 && diag_fps < 25) then {_difficulty = 2};
+ if (diag_fps < 15) then {_difficulty = 1};
+} else {
+ _probaOccupation = _probaOccupation - (_difficulty * 5);
+ if (_probaOccupation < 10) then {_probaOccupation = 10};
+};
+
+for [{_z = 0},{_z <= _difficulty},{_z = _z + 1}] do {
+ _ran1 = random 100;
+ if (_ran1 < _probaOccupation) then {
+ {_ran2 = round(1 + random 2);_teams = _teams + [Format ["%1%2",_x,_ran2]]} forEach _type;
+ };
+};
+
+if (count _teams < 1) then {_teams = ["SmallTeam1"]};
+
+_teams \ No newline at end of file
diff --git a/Server/Functions/Server_SelectResTeam.sqf b/Server/Functions/Server_SelectResTeam.sqf
new file mode 100644
index 0000000..63e1218
--- /dev/null
+++ b/Server/Functions/Server_SelectResTeam.sqf
@@ -0,0 +1,144 @@
+Private ['_difficulty','_factor','_infAssign','_minInfSpawnRatio','_minVehSpawnRatio','_poolInf','_poolVeh','_ratioInfantry','_ranArr','_ratioVehicle','_teams','_try','_vehAssign'];
+
+_difficulty = _this select 0;
+
+_ratioVehicle = 0;
+_ratioInfantry = 0;
+
+_teams = [];
+_poolInf = [];
+_poolVeh = [];
+
+_vehAssign = 0;
+_infAssign = 0;
+_minInfSpawnRatio = 0;
+_minVehSpawnRatio = 0;
+_try = 0;
+
+switch (_difficulty) do {
+ case 'light1': {
+ _ratioVehicle = 10;
+ _ratioInfantry = 90;
+ _try = 3;
+ _minInfSpawnRatio = 15;
+ _minVehSpawnRatio = 35;
+
+ _poolInf = ['Group','Patrol1','Patrol2','Militia'];
+ _poolVeh = ['MotorizedGroup'];
+ };
+ case 'light2': {
+ _ratioVehicle = 20;
+ _ratioInfantry = 80;
+ _try = 4;
+ _minInfSpawnRatio = 20;
+ _minVehSpawnRatio = 40;
+
+ _poolInf = ['Group','GroupWeapons','ATTeam','Patrol2','Militia'];
+ _poolVeh = ['Technical'];
+ };
+ case 'medium1': {
+ _ratioVehicle = 20;
+ _ratioInfantry = 80;
+ _try = 5;
+ _minInfSpawnRatio = 18;
+ _minVehSpawnRatio = 35;
+
+ _poolInf = ['Group','GroupWeapons','ATTeam','GroupAssault','SniperTeam'];
+ _poolVeh = ['Technical'];
+ };
+ case 'medium2': {
+ _ratioVehicle = 40;
+ _ratioInfantry = 60;
+ _try = 5;
+ _minInfSpawnRatio = 22;
+ _minVehSpawnRatio = 39;
+
+ _poolInf = ['Group','GroupWeapons','ATTeam','GroupAssault','AATeam'];
+ _poolVeh = ['MechanizedGroup','MechanizedPatrol','LightArmor','Technical','MotorizedGroup'];
+ };
+ case 'medium3': {
+ _ratioVehicle = 30;
+ _ratioInfantry = 70;
+ _try = 5;
+ _minInfSpawnRatio = 26;
+ _minVehSpawnRatio = 32;
+
+ _poolInf = ['Group','GroupWeapons','ATTeam','GroupAssault'];
+ _poolVeh = ['MechanizedGroup','MechanizedPatrol','MotorizedAATeam','LightArmor','Technical','MotorizedGroup'];
+ };
+ case 'medium4': {
+ _ratioVehicle = 35;
+ _ratioInfantry = 65;
+ _try = 5;
+ _minInfSpawnRatio = 28;
+ _minVehSpawnRatio = 32;
+
+ _poolInf = ['Group','GroupWeapons','ATTeam','GroupAssault','AATeam'];
+ _poolVeh = ['MechanizedGroup','MechanizedPatrol','MotorizedAATeam','LightArmor','Technical','HeavyArmor'];
+ };
+ case 'large1': {
+ _ratioVehicle = 30;
+ _ratioInfantry = 70;
+ _try = 5;
+ _minInfSpawnRatio = 25;
+ _minVehSpawnRatio = 35;
+
+ _poolInf = ['GroupWeapons','ATTeam','GroupAssault','SniperTeam'];
+ _poolVeh = ['MechanizedGroup','MechanizedPatrol','LightArmor','LightArmor','HeavyArmor','Technical'];
+ };
+ case 'large2': {
+ _ratioVehicle = 45;
+ _ratioInfantry = 55;
+ _try = 6;
+ _minInfSpawnRatio = 25;
+ _minVehSpawnRatio = 32;
+
+ _poolInf = ['Group','GroupWeapons','ATTeam','GroupAssault','AATeam','SniperTeam'];
+ _poolVeh = ['MechanizedGroup','MechanizedPatrol','MotorizedAATeam','LightArmor','HeavyArmor','HeavyArmor','Technical'];
+ };
+ case 'huge1': {
+ _ratioVehicle = 50;
+ _ratioInfantry = 50;
+ _try = 6;
+ _minInfSpawnRatio = 30;
+ _minVehSpawnRatio = 35;
+
+ _poolInf = ['Group','GroupWeapons','ATTeam','GroupAssault','AATeam','SniperTeam'];
+ _poolVeh = ['MechanizedGroup','MechanizedPatrol','MotorizedAATeam','LightArmor','LightArmor','HeavyArmor','HeavyArmor','Technical'];
+ };
+ case 'huge2': {
+ _ratioVehicle = 50;
+ _ratioInfantry = 50;
+ _try = 7;
+ _minInfSpawnRatio = 35;
+ _minVehSpawnRatio = 35;
+
+ _poolInf = ['Group','GroupWeapons','ATTeam','GroupAssault','AATeam','SniperTeam'];
+ _poolVeh = ['MechanizedGroup','MechanizedPatrol','MotorizedAATeam','LightArmor','LightArmor','HeavyArmor','HeavyArmor','Technical'];
+ };
+};
+
+_try = _try * ('WFBE_TOWNRESISTANCEDIFFICULTY' Call GetNamespace);
+_vehAssign = round(_try * (_ratioVehicle / 100));
+_infAssign = round(_try * (_ratioInfantry / 100));
+
+for [{_z = 0},{_z < _try},{_z = _z + 1}] do {
+ if (_vehAssign > 0) then {
+ _vehAssign = _vehAssign - 1;
+ if (random 100 > _minVehSpawnRatio) then {
+ _ranArr = round(random((count _poolVeh)-1));
+ _teams = _teams + [_poolVeh select _ranArr];
+ };
+ };
+ if (_infAssign > 0) then {
+ _infAssign = _infAssign - 1;
+ if (random 100 > _minInfSpawnRatio) then {
+ _ranArr = round(random((count _poolInf)-1));
+ _teams = _teams + [_poolInf select _ranArr];
+ };
+ };
+};
+
+if (count _teams < 1) then {_teams = ['Group']};
+
+_teams \ No newline at end of file
diff --git a/Server/Functions/Server_SetCampsToSide.sqf b/Server/Functions/Server_SetCampsToSide.sqf
new file mode 100644
index 0000000..36df4d6
--- /dev/null
+++ b/Server/Functions/Server_SetCampsToSide.sqf
@@ -0,0 +1,30 @@
+Private["_camp","_camps","_count","_notifyAllSides","_objects","_previousSide","_side","_sideID","_startingSV","_texture","_town"];
+
+_town = _this Select 0;
+_side = _this Select 1;
+_previousSide = _this Select 2;
+
+_sideID = _side Call GetSideID;
+_camps = _town getVariable "camps";
+_startingSV = _town getVariable "supplyValue";
+
+for [{_count = Count _camps - 1},{_count >= 0},{_count = _count - 1}] do {
+ _camp = _camps Select _count;
+ _camp setVariable ["sideID",_sideID,true];
+ _camp setVariable ["supplyValue",_startingSV,true];
+
+ _texture = Format["WFBE_%1FLAG",str _side] Call GetNamespace;
+
+ _objects = _camp nearEntities[[WFFLAG],20];
+ if (count _objects > 0) then {(_objects Select 0) setFlagTexture _texture};
+};
+
+sleep 0.5;
+
+_notifyAllSides = (_previousSide == East || _previousSide == West);
+
+WFBE_AllCampsCaptured = [nil,'CLTFNCALLCAMPSCAPTURED',[_town,_sideID,_notifyAllSides]];
+publicVariable 'WFBE_AllCampsCaptured';
+if (isHostedServer) then {[nil,'CLTFNCALLCAMPSCAPTURED',[_town,_sideID,_notifyAllSides]] Spawn HandlePVF};
+
+diag_log Format["[WFBE (INFORMATION)][frameno:%3 | ticktime:%4] Server_SetCampsToSide: '%1' Camps have been set to %2",_town,str _side,diag_frameno,diag_tickTime];
diff --git a/Server/Functions/Server_SideMessage.sqf b/Server/Functions/Server_SideMessage.sqf
new file mode 100644
index 0000000..b2bdad0
--- /dev/null
+++ b/Server/Functions/Server_SideMessage.sqf
@@ -0,0 +1,94 @@
+Private ["_canSpeak","_extra","_localizedString","_locRaw","_receiver","_rlName","_side","_speaker","_special","_specialb","_topicSide","_value"];
+_special = _this select 0;
+_specialb = _this select 1;
+_side = _this select 2;
+_extra = "";
+if (count _this > 3) then {_extra = _this select 3};
+
+_speaker = BIS_WF_HQEAST; _receiver = BIS_WF_HQEAST2; _topicSide = BIS_WF_HQEAST_TI;
+if (_side == west) then {_speaker = BIS_WF_HQWEST;_receiver = BIS_WF_HQWEST2; _topicSide = BIS_WF_HQWEST_TI};
+
+//--- Radio: Base building / attacks / destruction.
+if (_special in ["Destroyed","IsUnderAttack","Constructed"]) then {
+ _localizedString = localize "strwfbarracks";
+ _value = "Barracks";
+ switch (typeName _specialb) do {
+ case "OBJECT": {
+ _localizedString = _specialb getVariable "name";
+ _value = _extra;
+ };
+ case "STRING": {
+ if (_specialb == ('WFBE_WESTMHQNAME' Call GetNamespace) || _specialb == ('WFBE_EASTMHQNAME' Call GetNamespace)) then {_localizedString = localize "STRHeadquarters";_value = "Headquarters";if (_special == "Constructed") then {_special = "Mobilized"}};
+ if (_specialb == WESTHQ || _specialb == EASTHQ) then {_localizedString = localize "STRHeadquarters";_value = "Headquarters";if (_special == "Constructed") then {_special = "Deployed"}};
+ if (_specialb == WESTLVF || _specialb == EASTLVF) then {_localizedString = localize "STRLightVehicleSupply";_value = "LightVehicleSupply"};
+ if (_specialb == WESTCC || _specialb == EASTCC) then {
+ _localizedString = localize "STR_WF_CommandCenter";
+ _value = "UAVTerminal";
+ if (WF_A2_Arrowhead || (WF_A2_CombinedOps && _side == west)) then {_value = "CommandPost"};
+ };
+ if (_specialb == WESTHEAVY || _specialb == EASTHEAVY) then {_localizedString = localize "STRHeavyVehicleSupply";_value = "HeavyVehicleSupply"};
+ if (_specialb == WESTAIR || _specialb == EASTAIR) then {_localizedString = localize "STRHelipad";_value = "Helipad"};
+ if (_specialb == WESTSP || _specialb == EASTSP) then {_localizedString = localize "STRServicePoint";_value = "ServicePoint"};
+ if (_specialb == WESTAAR || _specialb == EASTAAR) then {_localizedString = localize "STRAntiAirRadar";_value = "AntiAirRadar"};
+ };
+ };
+ _speaker kbTell [_receiver, _topicSide, _special,["1","",_localizedString,[_value]],true];
+};
+
+//--- Radio: Town Capture/Loss.
+if (_special in ["Lost","Captured","HostilesDetectedNear"]) then {
+ _locRaw = str _specialb;
+ _rlName = _specialb getVariable "name";
+ _canSpeak = if (_side == east && WF_A2_CombinedOps && worldName in ('WFBE_WORLDWHITELISTVA' Call GetNamespace)) then {true} else {false};
+ if !(_canSpeak) then {_canSpeak = if (_side == west && WF_A2_CombinedOps && worldName in ('WFBE_WORLDWHITELISTOA' Call GetNamespace)) then {true} else {false}};
+ if !(_canSpeak) then {_canSpeak = if (WF_A2_Vanilla && worldName in ('WFBE_WORLDWHITELISTVA' Call GetNamespace)) then {true} else {false}};
+ if !(_canSpeak) then {_canSpeak = if (WF_A2_Arrowhead && worldName in ('WFBE_WORLDWHITELISTOA' Call GetNamespace)) then {true} else {false}};
+
+ if !(_canSpeak) then {_locRaw = "Town"} else {
+ switch (_locRaw) do {
+ case "Vyshnoye": {_locRaw = "Vyshnoe"};
+ case "Shahbaz": {_locRaw = "Town"};
+ case "Qeslaq": {_locRaw = "Town"};
+ };
+ };
+ _speaker kbTell [_receiver, _topicSide, _special,["1","",_rlName,[_locRaw]],true];
+};
+
+//--- Radio: Voting for a new commander.
+if (_special in ["VotingForNewCommander","NewIntelAvailable"]) then {_speaker kbTell [_receiver, _topicSide, _special,true]};
+
+//--- Radio: Camp Capture/Loss.
+if (_special in ["CapturedNear","LostAt"]) then {
+ _locRaw = str _extra;
+ _rlName = _extra getVariable "name";
+ _canSpeak = if (_side == east && WF_A2_CombinedOps && worldName in ('WFBE_WORLDWHITELISTVA' Call GetNamespace)) then {true} else {false};
+ if !(_canSpeak) then {_canSpeak = if (_side == west && WF_A2_CombinedOps && worldName in ('WFBE_WORLDWHITELISTOA' Call GetNamespace)) then {true} else {false}};
+ if !(_canSpeak) then {_canSpeak = if (WF_A2_Vanilla && worldName in ('WFBE_WORLDWHITELISTVA' Call GetNamespace)) then {true} else {false}};
+ if !(_canSpeak) then {_canSpeak = if (WF_A2_Arrowhead && worldName in ('WFBE_WORLDWHITELISTOA' Call GetNamespace)) then {true} else {false}};
+
+ if !(_canSpeak) then {_locRaw = "Town"} else {
+ switch (_locRaw) do {
+ case "Vyshnoye": {_locRaw = "Vyshnoe"};
+ case "Shahbaz": {_locRaw = "Town"};
+ case "Qeslaq": {_locRaw = "Town"};
+ };
+ };
+ _speaker kbTell [_receiver, _topicSide, _special,["1","",_specialb,[_specialb]],["2","",_rlName,[_locRaw]],true];
+};
+
+if (paramSecondaryMissions) then {
+ //--- Radio: Mission.
+ if (_special in ['MMissionFailed','NewMissionAvailable']) then {
+ _speaker kbTell [_receiver, _topicSide, _special,true];
+ };
+
+ //--- Radio: Mission Complete.
+ if (_special == 'MMissionComplete') then {
+ _speaker kbTell [_receiver, _topicSide, _special,["1","",_specialb,[_extra]],true];
+ };
+
+ //--- Radio: Extraction Team.
+ if (_special in ['ExtractionTeam','ExtractionTeamCancel']) then {
+ _speaker kbTell [_receiver, _topicSide, _special,["1","",_specialb,[_specialb]],true];
+ };
+}; \ No newline at end of file
diff --git a/Server/Functions/Server_TrashObject.sqf b/Server/Functions/Server_TrashObject.sqf
new file mode 100644
index 0000000..bb983f1
--- /dev/null
+++ b/Server/Functions/Server_TrashObject.sqf
@@ -0,0 +1,34 @@
+/*
+ Author: Benny
+ Name: Server_TrashObject.sqf
+ Parameters:
+ 0 - Object
+ Description:
+ This function will remove an object after the defined amount of time.
+*/
+
+private ["_alive","_group","_isMan","_object","_get"];
+_object = _this;
+
+if !(isNull _object) then {
+ _group = [];
+ _isMan = if (_object isKindOf "Man") then {true} else {false};
+
+ if (_isMan) then {_group = group _object};
+
+ sleep ('WFBE_UNITREMOVEDLAY' Call GetNamespace);
+ trashQueu = trashQueu - [_object];
+
+ if (_isMan) then {hideBody _object; sleep 6};
+
+ deleteVehicle _object;
+
+ if (_isMan) then {
+ if !(isNull _group) then {
+ _get = _group getVariable 'queue';
+ if (isNil '_get') then {
+ if (count (units _group) <= 0) then {deleteGroup _group;};
+ };
+ };
+ };
+}; \ No newline at end of file
diff --git a/Server/Functions/Server_UpdateTeam.sqf b/Server/Functions/Server_UpdateTeam.sqf
new file mode 100644
index 0000000..274c420
--- /dev/null
+++ b/Server/Functions/Server_UpdateTeam.sqf
@@ -0,0 +1,8 @@
+Private ['_formations','_team'];
+_team = _this;
+
+_formations = ['FILE','DIAMOND','STAG COLUMN','WEDGE'];
+_team setFormation (_formations select round(random(count _formations -1)));
+_team setBehaviour "AWARE";
+_team setSpeedMode "NORMAL";
+_team setCombatMode "YELLOW"; \ No newline at end of file
diff --git a/Server/Init/Init_Defenses.sqf b/Server/Init/Init_Defenses.sqf
new file mode 100644
index 0000000..3b45b4e
--- /dev/null
+++ b/Server/Init/Init_Defenses.sqf
@@ -0,0 +1,109 @@
+/* Structures */
+['WFBE_NEURODEF_BARRACKS_WALLS',[
+ ['Land_HBarrier_large',[8,0,0],90],
+ ['Land_HBarrier_large',[8,10,0],90],
+ ['Land_HBarrier_large',[8,-7.5,0],90],
+ ['Land_HBarrier_large',[5,-11,0],180],
+ ['Land_HBarrier_large',[0.5,-11,0],180],
+ ['Land_HBarrier_large',[-6,-11,0],180],
+ ['Land_HBarrier_large',[-9.5,-7.5,0],90],
+ ['Land_HBarrier_large',[-9.5,2.5,0],90],
+ ['Land_HBarrier_large',[5,13,0],180],
+ ['Land_HBarrier_large',[0.5,13,0],180],
+ ['Land_HBarrier_large',[-6,13,0],180],
+ ['Land_HBarrier_large',[-9.5,9.5,0],90]
+],true] Call SetNamespace;
+
+['WFBE_NEURODEF_LIGHT_WALLS',[
+ ['Land_HBarrier_large',[10,-1,0],90],
+ ['Land_HBarrier_large',[10,9,0],-90],
+ ['Land_HBarrier_large',[10,-8.5,0],90],
+ ['Land_HBarrier_large',[7,-12,0],180],
+ ['Land_HBarrier_large',[0,-12,0],180],
+ ['Land_HBarrier_large',[-7,-12,0],180],
+ ['Land_HBarrier_large',[7,12,0],180],
+ ['Land_HBarrier_large',[0,12,0],180],
+ ['Land_HBarrier_large',[-7,12,0],180],
+ ['Land_HBarrier_large',[-11,-9,0],90],
+ ['Land_HBarrier_large',[-11,-1.5,0],90],
+ ['Land_HBarrier_large',[-11,6,0],90],
+ ['Land_HBarrier_large',[-11,9,0],90]
+],true] Call SetNamespace;
+
+['WFBE_NEURODEF_COMMANDCENTER_WALLS',[
+ ['Land_HBarrier_large',[4,-3.5,0],90],
+ ['Land_HBarrier_large',[4,4,0],90],
+ ['Land_HBarrier_large',[1,7.5,0],180],
+ ['Land_HBarrier_large',[-2.5,7.5,0],180],
+ ['Land_HBarrier_large',[-5.5,4,0],90],
+ ['Land_HBarrier_large',[-5.5,-3.5,0],90],
+ ['Land_HBarrier5',[4,-6.5,0],180]
+],true] Call SetNamespace;
+
+['WFBE_NEURODEF_SERVICEPOINT_WALLS',[
+ ['Land_HBarrier_large',[4,-3.5,0],90],
+ ['Land_HBarrier_large',[4,4,0],90],
+ ['Land_HBarrier_large',[1,7.5,0],180],
+ ['Land_HBarrier_large',[-2.5,7.5,0],180],
+ ['Land_HBarrier_large',[-5.5,4,0],90],
+ ['Land_HBarrier_large',[-5.5,-3.5,0],90],
+ ['Land_HBarrier5',[4,-6.5,0],180]
+],true] Call SetNamespace;
+
+['WFBE_NEURODEF_HEAVY_WALLS',[
+ ['Land_HBarrier_large',[14,-1,0],90],
+ ['Land_HBarrier_large',[14,9,0],-90],
+ ['Land_HBarrier_large',[14,-8.5,0],90],
+ ['Land_HBarrier_large',[14,-11,0],90],
+ ['Land_HBarrier_large',[11,-14.5,0],180],
+ ['Land_HBarrier_large',[4.5,-14.5,0],180],
+ ['Land_HBarrier_large',[-3,-14.5,0],180],
+ ['Land_HBarrier_large',[-10.5,-14.5,0],180],
+ ['Land_HBarrier_large',[-14,-11,0],90],
+ ['Land_HBarrier_large',[-14,-3.5,0],90],
+ ['Land_HBarrier_large',[-14,4,0],90],
+ ['Land_HBarrier_large',[-14,9.5,0],90],
+ ['Land_HBarrier_large',[11,13,0],180],
+ ['Land_HBarrier_large',[3.5,13,0],180],
+ ['Land_HBarrier_large',[-4,13,0],180],
+ ['Land_HBarrier_large',[-11,13,0],-180]
+],true] Call SetNamespace;
+
+['WFBE_NEURODEF_AIRCRAFT_WALLS',[
+ ['Land_HBarrier_large',[10,-1,0],90],
+ ['Land_HBarrier_large',[10,9,0],-90],
+ ['Land_HBarrier_large',[10,-8.5,0],90],
+ ['Land_HBarrier_large',[7,-12,0],180],
+ ['Land_HBarrier_large',[0,-12,0],180],
+ ['Land_HBarrier_large',[-7,-12,0],180],
+ ['Land_HBarrier_large',[7,12,0],180],
+ ['Land_HBarrier_large',[0,12,0],180],
+ ['Land_HBarrier_large',[-7,12,0],180],
+ ['Land_HBarrier_large',[-11,-9,0],90],
+ ['Land_HBarrier_large',[-11,-1.5,0],90],
+ ['Land_HBarrier_large',[-11,6,0],90],
+ ['Land_HBarrier_large',[-11,9,0],90]
+],true] Call SetNamespace;
+
+['WFBE_NEURODEF_MG',[
+ [if (WF_A2_Vanilla) then {'Land_fortified_nest_small'} else {'Land_fortified_nest_small_EP1'},[0.25,0,0],180],
+ ['Land_fort_bagfence_corner',[-1,-3,0],0]
+],true] Call SetNamespace;
+
+['WFBE_NEURODEF_AAPOD',[
+ ['Land_fort_bagfence_round',[0,2,0],0],
+ ['Land_fort_bagfence_long',[-2.8,-1.7,0],90],
+ ['Land_fort_bagfence_long',[2.8,-1.7,0],90],
+ ['Land_fort_bagfence_long',[1.4,-5.5,0],0],
+ ['Land_fort_bagfence_corner',[-1.8,-5,0],0]
+],true] Call SetNamespace;
+
+['WFBE_NEURODEF_MASH',[
+ ['Land_fort_bagfence_corner',[-3,3,0],270],
+ ['Land_fort_bagfence_long',[-3.5,-0.2,0],90],
+ ['Land_fort_bagfence_corner',[-2.5,-3.5,0],0],
+ ['Land_fort_bagfence_long',[0.5,-4,0],0],
+ ['Land_fort_bagfence_corner',[3.5,-3,0],90],
+ ['Land_fort_bagfence_long',[4,-0.2,0],90],
+ ['Land_fort_bagfence_corner',[3,3.5,0],180]
+],true] Call SetNamespace; \ No newline at end of file
diff --git a/Server/Init/Init_Server.sqf b/Server/Init/Init_Server.sqf
new file mode 100644
index 0000000..7fa2a3d
--- /dev/null
+++ b/Server/Init/Init_Server.sqf
@@ -0,0 +1,532 @@
+if (!isServer || time > 30) exitWith {diag_log Format["[WFBE (WARNING)][frameno:%1 | ticktime:%2] Init_Server: The server initialization cannot be called more than once.",diag_frameno,diag_tickTime]};
+
+Private ['_BIS_WF_HQEASTgrp','_BIS_WF_HQEASTgrp2','_BIS_WF_HQWESTgrp','_BIS_WF_HQWESTgrp2','_WF_GroupLogic','_WF_GroupLogic2','_WF_GroupLogic3','_WF_GroupLogic4','_alice','_allies','_attempts','_eastLocation','_i','_locationLogics','_nearLogics','_oc','_ran','_ssd','_starterVehicle','_total','_type','_upArray','_vehicle','_weat','_westLocation'];
+
+diag_log Format["[WFBE (INIT)][frameno:%2 | ticktime:%3] Init_Server: Init Start at %1",time,diag_frameno,diag_tickTime];
+
+//--- Allow resistance group to be spawned without a placeholder.
+createCenter resistance;
+resistance setFriend [west,0];
+resistance setFriend [east,0];
+
+if (paramAI) then {
+ AIBuyUnit = Compile preprocessFile "Server\Functions\Server_BuyUnit.sqf";
+ if (WF_A2_Vanilla) then {AISquadRespawn = Compile preprocessFile "Server\AI\AI_SquadRespawn.sqf"};
+};
+if !(WF_A2_Vanilla) then {AIAdvancedRespawn = Compile preprocessFile "Server\AI\AI_AdvancedRespawn.sqf"};
+AIMoveTo = Compile preprocessFile "Server\AI\Orders\AI_MoveTo.sqf";
+AIPatrol = Compile preprocessFile "Server\AI\Orders\AI_Patrol.sqf";
+AITownPatrol = Compile preprocessFile "Server\AI\Orders\AI_TownPatrol.sqf";
+AITownResitance = Compile preprocessFile "Server\AI\AI_Resistance.sqf";
+AIUpgrade = Compile preprocessFile "Server\AI\AI_Upgrade.sqf";
+AIWPAdd = Compile preprocessFile "Server\AI\Orders\AI_WPAdd.sqf";
+AIWPRemove = Compile preprocessFile "Server\AI\Orders\AI_WPRemove.sqf";
+BuildingDamaged = Compile preprocessFile "Server\Functions\Server_BuildingDamaged.sqf";
+if (paramHandleFF) then {BuildingHandleDamages = Compile preprocessFile "Server\Functions\Server_BuildingHandleDamages.sqf"};
+BuildingKilled = Compile preprocessFile "Server\Functions\Server_BuildingKilled.sqf";
+CanUpdateTeam = Compile preprocessFile "Server\Functions\Server_CanUpdateTeam.sqf";
+ChangeAICommanderFunds = Compile preprocessFile "Server\Functions\Server_ChangeAICommanderFunds.sqf";
+ConstructDefense = Compile preprocessFile "Server\Construction\Construction_StationaryDefense.sqf";
+CreateTeamTemplate = Compile preprocessFile "Server\Functions\Server_CreateTeam.sqf";
+CreateDefenseTemplate = Compile preprocessFile "Server\Functions\Server_CreateDefenseTemplate.sqf";
+if (paramUseWorkers) then {HandleBuildingRepair = Compile preprocessFile "Server\Functions\Server_HandleBuildingRepair.sqf"};
+GetAICommanderFunds = Compile preprocessFile "Server\Functions\Server_GetAICommanderFunds.sqf";
+HandleBuildingDamage = Compile preprocessFile "Server\Functions\Server_HandleBuildingDamage.sqf";
+HandleDefense = Compile preprocessFile "Server\Functions\Server_HandleDefense.sqf";
+HandleReloadDefense = Compile preprocessFile "Server\Functions\Server_HandleReloadDefense.sqf";
+HandleEmptyVehicle = Compile preprocessFile "Server\Functions\Server_HandleEmptyVehicle.sqf";
+HandleSPVF = Compile preprocessFile "Server\Functions\Server_HandleSPVF.sqf";
+HandleSpecial = Compile preprocessFile "Server\Functions\Server_HandleSpecial.sqf";
+HQKilled = Compile preprocessFile "Server\Functions\Server_HQKilled.sqf";
+MHQRepair = Compile preprocessFile "Server\Functions\Server_MHQRepair.sqf";
+SelectOccupTeam = Compile preprocessFile "Server\Functions\Server_SelectOccupTeam.sqf";
+SetCampsToSide = Compile preprocessFile "Server\Functions\Server_SetCampsToSide.sqf";
+SideMessage = Compile preprocessFile "Server\Functions\Server_SideMessage.sqf";
+SVoteForCommander = Compile preprocessFile "Server\Server_VoteForCommander.sqf";
+TrashObject = Compile preprocessFile "Server\Functions\Server_TrashObject.sqf";
+UpdateTeam = Compile preprocessFile "Server\Functions\Server_UpdateTeam.sqf";
+UpdateSupplyTruck = Compile preprocessFile "Server\AI\AI_UpdateSupplyTruck.sqf";
+
+//--- Support Functions.
+KAT_ParaAmmo = Compile preProcessfile "Server\Support\Support_ParaAmmo.sqf";
+KAT_Paratroopers = Compile preProcessfile "Server\Support\Support_Paratroopers.sqf";
+KAT_ParaVehicles = Compile preProcessfile "Server\Support\Support_ParaVehicles.sqf";
+KAT_UAV = Compile preProcessfile "Server\Support\Support_UAV.sqf";
+
+//--- Call in NEURO System (Taxi Advanced Script).
+[] Call Compile preprocessFile "Server\Module\NEURO\NEURO.sqf";
+
+//--- NEURO: Special Condition.
+missionNamespace setVariable["NEURO_TAXI_CONDITION", "isNil {_x getVariable 'WFBE_Taxi_Prohib'} && local _x"];
+
+//--- Server Init is now complete.
+serverInitComplete = true;
+
+diag_log Format["[WFBE (INIT)][frameno:%1 | ticktime:%2] Init_Server: Functions - [Done]",diag_frameno,diag_tickTime];
+
+//--- Run the MySQL Module if defined.
+if (mysql) then {
+ WF_Logic setVariable ["WF_MYSQL_CLIENT",[],true];
+ WF_Logic setVariable ["WF_MYSQL_SERVER",[Format ["MYSQLDATA?WFBE_Insert_Island?%1?%2",worldName,getText (configFile >> "CfgWorlds" >> worldName >> "description")]]];
+ [] ExecFSM "Server\FSM\queryhandler.fsm";
+
+ diag_log Format["[WFBE (INIT)][frameno:%1 | ticktime:%2] Init_Server: MySQL Module - [Done]",diag_frameno,diag_tickTime];
+};
+
+//--- JIP Handler, handle the joining and leaving players.
+onPlayerConnected "[_uid,_name] ExecVM 'Server\Server_PlayerConnected.sqf'";
+onPlayerDisconnected "[_uid,_name] ExecVM 'Server\Server_PlayerDisconnected.sqf'";
+
+diag_log Format["[WFBE (INIT)][frameno:%1 | ticktime:%2] Init_Server: JIP - [Done]",diag_frameno,diag_tickTime];
+
+startingLocations = [];
+_total = 0;
+
+//--- Getting all locations.
+while {!isNil Format["StartingLocation%1",_total]} do {
+ startingLocations = startingLocations + [Call Compile Format["StartingLocation%1",_total]];
+ _total = _total + 1;
+};
+
+diag_log Format["[WFBE (INIT)][frameno:%1 | ticktime:%2] Init_Server: Starting Locations - [Done]",diag_frameno,diag_tickTime];
+
+//--- Waiting for the common part to be executed.
+waitUntil {commonInitComplete && townInit};
+
+[] Call Compile preprocessFile 'Server\Init\Init_Defenses.sqf';
+
+//--- Fast Time.
+if (('WFBE_FASTTIMERATE' Call GetNamespace) > 0) then {
+ [] ExecFSM "Server\FSM\fasttime.fsm";
+ diag_log Format["[WFBE (INIT)][frameno:%1 | ticktime:%2] Init_Server: Fast Time Module - [Done]",diag_frameno,diag_tickTime];
+};
+
+//--- Weather.
+_weat = 'WFBE_WEATHER' Call GetNamespace;
+if (_weat == 3) then {
+ [] ExecFSM "Server\FSM\weather.fsm";
+} else {
+ if (isDedicated) then {
+ _oc = 0.05;
+ switch (_weat) do {
+ case 0: {_oc = 0};
+ case 1: {_oc = 0.5};
+ case 2: {_oc = 1};
+ };
+ 60 setOvercast _oc;
+ };
+};
+
+diag_log Format["[WFBE (INIT)][frameno:%1 | ticktime:%2] Init_Server: Weather Module - [Done]",diag_frameno,diag_tickTime];
+
+//--- Static defenses in town main group, they exchange information about enemies.
+WF_ResistanceDefenseTeam = createGroup resistance;
+
+diag_log Format["[WFBE (INIT)][frameno:%1 | ticktime:%2] Init_Server: Common and Towns - [Done]",diag_frameno,diag_tickTime];
+
+//--- Select whether the spawn restriction is enabled or not.
+_locationLogics = [];
+if (paramSpawnRestriction) then {
+ {
+ _nearLogics = _x nearEntities[["LocationLogic"],2000];
+ if (count _nearLogics > 0) then {{if !(_x in _locationLogics) then {_locationLogics = _locationLogics + [_x]}} forEach _nearLogics};
+ } forEach towns;
+ if (count _locationLogics < 3) then {{if !(_x in _locationLogics) then {_locationLogics = _locationLogics + [_x]}} forEach [StartingLocation0,StartingLocation1]};
+ diag_log Format["[WFBE (INIT)][frameno:%1 | ticktime:%2] Init_Server: Spawn Restriction - [Done]",diag_frameno,diag_tickTime];
+} else {
+ _locationLogics = startingLocations;
+};
+
+_total = count _locationLogics;
+
+//--- Getting locations that have a distance above the SIDESTARTINGDISTANCE variable.
+_westLocation = StartingLocation0;
+_eastLocation = StartingLocation0;
+switch ('WFBE_STARTINGLOCATIONMODE' Call GetNamespace) do {
+ case 0: {_westLocation = StartingLocation0; _eastLocation = StartingLocation1};//--- West North, East South.
+ case 1: {_westLocation = StartingLocation1; _eastLocation = StartingLocation0};//--- West South, East North.
+ case 2: {
+ //--- Random. Attempt to get a location above the given range.
+ _attempts = 0;
+ _ssd = 'WFBE_SIDESTARTINGDISTANCE' Call GetNamespace;
+
+ //--- Random range?.
+ if (_ssd == -1) then {_ssd = floor(random(9500))};
+
+ while {_eastLocation distance _westLocation < _ssd && _attempts <= 500} do {
+ _eastLocation = _locationLogics select (random (_total - 1));
+ _westLocation = _locationLogics select (random (_total - 1));
+ _attempts = _attempts + 1;
+ };
+
+ //--- Couldn't find a starting location in range.
+ if (_attempts >= 500) then {
+ if (paramSpawnRestriction) then {
+ _westLocation = _locationLogics select 0;
+ _eastLocation = _locationLogics select ((count _locationLogics)-1);
+ } else {
+ _westLocation = StartingLocation0;
+ _eastLocation = StartingLocation1;
+ };
+ };
+ };
+};
+
+diag_log Format["[WFBE (INIT)][frameno:%1 | ticktime:%2] Init_Server: Starting Location Mode (%3) - [Done]",diag_frameno,diag_tickTime,('WFBE_STARTINGLOCATIONMODE' Call GetNamespace)];
+
+//--- Moving each non-owner objects to the location.
+EastMHQ setPos getPos _eastLocation;
+WestMHQ setPos getPos _westLocation;
+
+//--- NEURO Protection.
+EastMHQ setVariable ["WFBE_Taxi_Prohib", true];
+WestMHQ setVariable ["WFBE_Taxi_Prohib", true];
+
+diag_log Format["[WFBE (INIT)][frameno:%1 | ticktime:%2] Init_Server: HQ Placement - [Done]",diag_frameno,diag_tickTime];
+
+//--- Friendly Fire handler.
+if (paramHandleFF) then {
+ EastMHQ addEventHandler ['handleDamage',{[_this select 0,_this select 2,_this select 3, east] Call BuildingHandleDamages}];
+ WestMHQ addEventHandler ['handleDamage',{[_this select 0,_this select 2,_this select 3, west] Call BuildingHandleDamages}];
+ diag_log Format["[WFBE (INIT)][frameno:%1 | ticktime:%2] Init_Server: Friendly Fire Handling - [Done]",diag_frameno,diag_tickTime];
+};
+
+eastStartingLocation = _eastLocation;
+westStartingLocation = _westLocation;
+
+publicVariable "eastStartingLocation";
+publicVariable "westStartingLocation";
+
+//--- Adding a killed EH to both MHQ.
+Call Compile Format ["EastMHQ AddEventHandler ['killed',{[_this select 0,_this select 1,%1,'%2'] Spawn HQKilled}];",east,typeOf EastMHQ];
+Call Compile Format ["WestMHQ AddEventHandler ['killed',{[_this select 0,_this select 1,%1,'%2'] Spawn HQKilled}];",west,typeOf WestMHQ];
+
+//--- Radio System - Server.
+_WF_GroupLogic = createGroup sideLogic;
+_WF_GroupLogic2 = createGroup sideLogic;
+_WF_GroupLogic3 = createGroup sideLogic;
+_WF_GroupLogic4 = createGroup sideLogic;
+
+_BIS_WF_HQEASTgrp = createGroup east;
+_BIS_WF_HQWESTgrp = createGroup west;
+_BIS_WF_HQEASTgrp2 = createGroup east;
+_BIS_WF_HQWESTgrp2 = createGroup west;
+
+BIS_WF_HQEAST = _WF_GroupLogic createUnit ["Logic",[0,0,0],[],0,"NONE"]; [BIS_WF_HQEAST] joinSilent _BIS_WF_HQEASTgrp;
+BIS_WF_HQWEST = _WF_GroupLogic2 createUnit ["Logic",[0,0,0],[],0,"NONE"]; [BIS_WF_HQWEST] joinSilent _BIS_WF_HQWESTgrp;
+BIS_WF_HQEAST2 = _WF_GroupLogic3 createUnit ["Logic",[0,0,0],[],0,"NONE"]; [BIS_WF_HQEAST2] joinSilent _BIS_WF_HQEASTgrp2;
+BIS_WF_HQWEST2 = _WF_GroupLogic4 createUnit ["Logic",[0,0,0],[],0,"NONE"]; [BIS_WF_HQWEST2] joinSilent _BIS_WF_HQWESTgrp2;
+
+BIS_WF_HQEAST_TI = ('WFBE_EASTANNOUNCERS' Call GetNamespace) select round(random((count ('WFBE_EASTANNOUNCERS' Call GetNamespace))-1));
+BIS_WF_HQWEST_TI = ('WFBE_WESTANNOUNCERS' Call GetNamespace) select round(random((count ('WFBE_WESTANNOUNCERS' Call GetNamespace))-1));
+
+BIS_WF_HQEAST setIdentity BIS_WF_HQEAST_TI;
+BIS_WF_HQEAST setRank 'COLONEL';
+BIS_WF_HQEAST setGroupId ["HQ"];
+BIS_WF_HQEAST kbAddTopic [BIS_WF_HQEAST_TI,"Client\kb\hq.bikb","Client\kb\hq.fsm",{call compile preprocessFileLineNumbers "Client\kb\hq.sqf"}];
+
+BIS_WF_HQWEST setIdentity BIS_WF_HQWEST_TI;
+BIS_WF_HQWEST setRank 'COLONEL';
+BIS_WF_HQWEST setGroupId ["HQ"];
+BIS_WF_HQWEST kbAddTopic [BIS_WF_HQWEST_TI,"Client\kb\hq.bikb","Client\kb\hq.fsm",{call compile preprocessFileLineNumbers "Client\kb\hq.sqf"}];
+
+publicVariable 'BIS_WF_HQEAST';
+publicVariable 'BIS_WF_HQEAST_TI';
+publicVariable 'BIS_WF_HQWEST';
+publicVariable 'BIS_WF_HQWEST_TI';
+
+diag_log Format["[WFBE (INIT)][frameno:%1 | ticktime:%2] Init_Server: Registered Radio Announcers (West: %3 East: %4) - [Done]",diag_frameno,diag_tickTime,BIS_WF_HQWEST_TI,BIS_WF_HQEAST_TI];
+
+['WFBE_West_TimeUnderAttack',0,true] Call SetNamespace;
+['WFBE_East_TimeUnderAttack',0,true] Call SetNamespace;
+
+['WFBE_West_LastCommander',objNull,true] Call SetNamespace;
+['WFBE_East_LastCommander',objNull,true] Call SetNamespace;
+
+['WFBE_West_AIBase',false,true] Call SetNamespace;
+['WFBE_East_AIBase',false,true] Call SetNamespace;
+
+['WFBE_West_AISupplyTrucks',[],true] Call SetNamespace;
+['WFBE_East_AISupplyTrucks',[],true] Call SetNamespace;
+
+['WFBE_West_AICommanderFunds',round(('WFBE_WESTSTARTINGMONEY' Call GetNamespace)*1.5),true] Call SetNamespace;
+['WFBE_East_AICommanderFunds',round(('WFBE_EASTSTARTINGMONEY' Call GetNamespace)*1.5),true] Call SetNamespace;
+
+//--- MHQ Tracking.
+_text = "";
+if (('WFBE_INCOMINGMISSILEMAXRANGE' Call GetNamespace) != 0) then {_text = "this addEventHandler ['IncomingMissile', {_this Spawn HandleIncomingMissile}];"};
+EastMHQ setVehicleInit Format["['Headquarters','ColorGreen',[1,1],'','HQUndeployed',this,0.2,false,'','',false,East] ExecVM 'Common\Common_MarkerUpdate.sqf';%1",_text];
+processInitCommands;
+WestMHQ setVehicleInit Format["['Headquarters','ColorGreen',[1,1],'','HQUndeployed',this,0.2,false,'','',false,West] ExecVM 'Common\Common_MarkerUpdate.sqf';%1",_text];
+processInitCommands;
+
+//--- Statistics variables.
+WF_Logic setVariable ["eastUnitsCreated",0,true];
+WF_Logic setVariable ["eastCasualties",0,true];
+WF_Logic setVariable ["eastVehiclesCreated",0,true];
+WF_Logic setVariable ["eastVehiclesLost",0,true];
+WF_Logic setVariable ["westUnitsCreated",0,true];
+WF_Logic setVariable ["westCasualties",0,true];
+WF_Logic setVariable ["westVehiclesCreated",0,true];
+WF_Logic setVariable ["westVehiclesLost",0,true];
+
+WF_Logic setVariable ["WF_CHQInUse_West",false];
+WF_Logic setVariable ["WF_CHQInUse_East",false];
+
+diag_log Format["[WFBE (INIT)][frameno:%1 | ticktime:%2] Init_Server: Stats Variable - [Done]",diag_frameno,diag_tickTime];
+
+//--- Structures (en: it's possible to add location in the array, just make sure that they match the defined type in config_structures).
+EastBaseStructures = [];
+WestBaseStructures = [];
+publicVariable "EastBaseStructures";
+publicVariable "WestBaseStructures";
+
+emptyQueu = [];
+trashQueu = [];
+ignoreQueu = [];
+
+//--- Starting Vehicles East.
+{
+ _vehicle = [_x,(getPos EastMHQ),east,false] Call CreateVehi;
+ [_vehicle,getPos EastMHQ,45,60,true,false,true] Call PlaceNear;
+ clearWeaponCargo _vehicle;
+ clearMagazineCargo _vehicle;
+ emptyQueu = emptyQueu + [_vehicle];
+ _vehicle Spawn HandleEmptyVehicle;
+} forEach ('WFBE_EASTSTARTINGVEHICLES' Call GetNamespace);
+//--- Starting Vehicles West.
+{
+ _vehicle = [_x,(getPos WestMHQ),west,false] Call CreateVehi;
+ [_vehicle,getPos WestMHQ,45,60,true,false,true] Call PlaceNear;
+ clearWeaponCargo _vehicle;
+ clearMagazineCargo _vehicle;
+ emptyQueu = emptyQueu + [_vehicle];
+ _vehicle Spawn HandleEmptyVehicle;
+} forEach ('WFBE_WESTSTARTINGVEHICLES' Call GetNamespace);
+
+if (paramAI) then {
+ //--- Loadout replacement & positioning & variables.
+ _i = 1;
+ {
+ if !(isNil "_x") then {
+ if (!isPlayer (leader _x) && alive (leader _x)) then {
+ _ran = 1 + round(random(2));
+ (leader _x) setPos ([getPos _eastLocation,20,30] Call GetRandomPosition);
+ [(leader _x),Format ["WFBE_EASTLEADERWEAPONS0%1",_ran] Call GetNamespace,Format ["WFBE_EASTLEADERAMMO0%1",_ran] Call GetNamespace] Call EquipLoadout;
+ };
+ _x setVariable ["queue",[]];
+ Call Compile Format ["EastSlot%1Funds = %2; publicVariable 'EastSlot%1Funds';",_i,'WFBE_EASTSTARTINGMONEY' Call GetNamespace];
+ [_x, false] Call SetTeamAutonomous;
+ [_x, ""] Call SetTeamRespawn;
+ [_x, -1] Call SetTeamType;
+ [_x, "towns"] Call SetTeamMoveMode;
+ [_x, [0,0,0]] Call SetTeamMovePos;
+ if (('WFBE_ISIS' Call GetNamespace) != 0) then {(leader _x) addEventHandler['handleDamage',{_this Call ISIS_Wound}]};
+ if !(WF_A2_Vanilla) then {(_x) Call Compile preprocessFile 'Server\AI\AI_AddMultiplayerRespawnEH.sqf'};
+ diag_log Format["[WFBE (INIT)][frameno:%1 | ticktime:%2] Init_Server: East AI Team (%3) Full Init - [Done]",diag_frameno,diag_tickTime,_x];
+ };
+ _i = _i + 1;
+ } forEach ('WFBE_EASTTEAMS' Call GetNamespace);
+ _i = 1;
+ {
+ if !(isNil "_x") then {
+ if (!isPlayer (leader _x) && alive (leader _x)) then {
+ _ran = 1 + round(random(2));
+ (leader _x) setPos ([getPos _westLocation,20,30] Call GetRandomPosition);
+ [(leader _x),Format ["WFBE_WESTLEADERWEAPONS0%1",_ran] Call GetNamespace,Format ["WFBE_WESTLEADERAMMO0%1",_ran] Call GetNamespace] Call EquipLoadout;
+ };
+ _x setVariable ["queue",[]];
+ Call Compile Format ["WestSlot%1Funds = %2; publicVariable 'WestSlot%1Funds';",_i,'WFBE_WESTSTARTINGMONEY' Call GetNamespace];
+ [_x, false] Call SetTeamAutonomous;
+ [_x, ""] Call SetTeamRespawn;
+ [_x, -1] Call SetTeamType;
+ [_x, "towns"] Call SetTeamMoveMode;
+ [_x, [0,0,0]] Call SetTeamMovePos;
+ if (('WFBE_ISIS' Call GetNamespace) != 0) then {(leader _x) addEventHandler['handleDamage',{_this Call ISIS_Wound}]};
+ if !(WF_A2_Vanilla) then {(_x) Call Compile preprocessFile 'Server\AI\AI_AddMultiplayerRespawnEH.sqf'};
+ diag_log Format["[WFBE (INIT)][frameno:%1 | ticktime:%2] Init_Server: West AI Team (%3) Full Init - [Done]",diag_frameno,diag_tickTime,_x];
+ };
+ _i = _i + 1;
+ } forEach ('WFBE_WESTTEAMS' Call GetNamespace);
+
+ //--- AI Supply Trucks.
+ if (('WFBE_SUPPLYSYSTEM' Call GetNamespace) == 0) then {
+ [east] Spawn UpdateSupplyTruck;
+ [west] Spawn UpdateSupplyTruck;
+ diag_log Format["[WFBE (INIT)][frameno:%1 | ticktime:%2] Init_Server: Truck Supply System - [Done]",diag_frameno,diag_tickTime];
+ };
+
+ //--- AI Teams (Don't pause the server initialization process).
+ [] Spawn {
+ waitUntil{townInit};
+ {if (!isNil "_x") then {[_x] ExecFSM "Server\FSM\aiteam.fsm"}} forEach ('WFBE_EASTTEAMS' Call GetNamespace);
+ {if (!isNil "_x") then {[_x] ExecFSM "Server\FSM\aiteam.fsm"}} forEach ('WFBE_WESTTEAMS' Call GetNamespace);
+ diag_log Format["[WFBE (INIT)][frameno:%1 | ticktime:%2] Init_Server: AI Teams FSM - [Done]",diag_frameno,diag_tickTime];
+ };
+} else {
+ _i = 1;
+ {
+ if !(isNil "_x") then {
+ Call Compile Format ["EastSlot%1Funds = %2; publicVariable 'EastSlot%1Funds';",_i,'WFBE_EASTSTARTINGMONEY' Call GetNamespace];
+ _x setVariable ["identification", Format["EastSlot%1",_i]];
+ [_x, false] Call SetTeamAutonomous;
+ [_x, ""] Call SetTeamRespawn;
+ [_x, -1] Call SetTeamType;
+ diag_log Format["[WFBE (INIT)][frameno:%1 | ticktime:%2] Init_Server: East AI Team (%3) Partial Init - [Done]",diag_frameno,diag_tickTime,_x];
+ };
+ _i = _i + 1;
+ } forEach ('WFBE_EASTTEAMS' Call GetNamespace);
+ _i = 1;
+ {
+ if !(isNil "_x") then {
+ Call Compile Format ["WestSlot%1Funds = %2; publicVariable 'WestSlot%1Funds';",_i,'WFBE_WESTSTARTINGMONEY' Call GetNamespace];
+ _x setVariable ["identification", Format["WestSlot%1",_i]];
+ [_x, false] Call SetTeamAutonomous;
+ [_x, ""] Call SetTeamRespawn;
+ [_x, -1] Call SetTeamType;
+ diag_log Format["[WFBE (INIT)][frameno:%1 | ticktime:%2] Init_Server: West AI Team (%3) Partial Init - [Done]",diag_frameno,diag_tickTime,_x];
+ };
+ _i = _i + 1;
+ } forEach ('WFBE_WESTTEAMS' Call GetNamespace);
+};
+
+//--- Town starting mode.
+if (('WFBE_TOWNSTARTINGMODE' Call GetNamespace) != 0 || ('WFBE_RESPATROL' Call GetNamespace) > 0 || ('WFBE_RESSTRIKER' Call GetNamespace) > 0) then {[] Call Compile preprocessFile "Server\Init\Init_Towns.sqf"};
+
+diag_log Format["[WFBE (INIT)][frameno:%1 | ticktime:%2] Init_Server: Starting Vehicles - [Done]",diag_frameno,diag_tickTime];
+
+//--- Pre-initialization of the Garbage Collector & Empty vehicle collector.
+if (WF_A2_Vanilla) then {WF_Logic setVariable ["trash",[],true]};
+WF_Logic setVariable ["emptyVehicles",[],true];
+
+//--- Civilians Module.
+if (('WFBE_CIVILIANFACTION' Call GetNamespace) > 0) then {
+ //--- Create a group center.
+ createCenter civilian;
+ //--- Civilian Kill function.
+ CivilianKilled = Compile preprocessFile "Common\Functions\Common_CivilianKilled.sqf";
+ //--- Execute the config file.
+ [] Call Compile preprocessFile "Server\Config\Config_Civilians.sqf";
+};
+
+//--- Don't pause the server init script.
+[] Spawn {
+ waitUntil {townInit};
+ [] ExecFSM "Server\FSM\updateserver.fsm";
+ diag_log Format["[WFBE (INIT)][frameno:%1 | ticktime:%2] Init_Server (Delayed): Server Module - [Done]",diag_frameno,diag_tickTime];
+ [] ExecFSM "Server\FSM\updateresources.fsm";
+ diag_log Format["[WFBE (INIT)][frameno:%1 | ticktime:%2] Init_Server (Delayed): Ressources Module - [Done]",diag_frameno,diag_tickTime];
+
+ if (('WFBE_TOWNCONQUESTMODE' Call GetNamespace) > 0) then {[] ExecFSM "Server\FSM\conquest.fsm"};
+};
+[] ExecFSM "Server\FSM\garbagecollector.fsm";
+diag_log Format["[WFBE (INIT)][frameno:%1 | ticktime:%2] Init_Server: Garbage Collector Module - [Done]",diag_frameno,diag_tickTime];
+[] ExecFSM "Server\FSM\emptyvehiclescollector.fsm";
+diag_log Format["[WFBE (INIT)][frameno:%1 | ticktime:%2] Init_Server: Empty Vehicles Collector Module - [Done]",diag_frameno,diag_tickTime];
+
+//--- Network System Part 2.
+EastMHQDeployed = false; publicVariable 'EastMHQDeployed';
+WestMHQDeployed = false; publicVariable 'WestMHQDeployed';
+
+WFBE_East_Upgrading = false; publicVariable 'WFBE_East_Upgrading';
+WFBE_West_Upgrading = false; publicVariable 'WFBE_West_Upgrading';
+
+if !(paramMoneyOnly) then {
+ WF_Logic setVariable ["EastSupplies",EastSupplies,true];
+ WF_Logic setVariable ["WestSupplies",WestSupplies,true];
+};
+
+WF_Logic setVariable ["EastCommanderVoteTime",60,true];
+WF_Logic setVariable ["WestCommanderVoteTime",60,true];
+
+WF_Logic setVariable ["EastCommanderTeam",EastCommanderTeam,true];
+WF_Logic setVariable ["WestCommanderTeam",WestCommanderTeam,true];
+
+WF_Logic setVariable ["EastMHQRepair",false,true];
+WF_Logic setVariable ["WestMHQRepair",false,true];
+
+//--- Upgrades.
+_upArray = if (paramUpgradesEast) then {[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]} else {'WFBE_UPGRADELEVELS' Call GetNamespace};
+EASTUpgrades = _upArray;
+PublicVariable 'EASTUpgrades';
+_upArray = if (paramUpgradesWest) then {[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]} else {'WFBE_UPGRADELEVELS' Call GetNamespace};
+WESTUpgrades = _upArray;
+PublicVariable 'WESTUpgrades';
+
+//--- Building Limits.
+WestBuildingsCurrent = [];
+EastBuildingsCurrent = [];
+for '_i' from 0 to ((count ('WFBE_WESTSTRUCTURES' Call GetNamespace))-2) do {WestBuildingsCurrent set [_i, 0]};
+for '_i' from 0 to ((count ('WFBE_EASTSTRUCTURES' Call GetNamespace))-2) do {EastBuildingsCurrent set [_i, 0]};
+PublicVariable 'WestBuildingsCurrent';
+PublicVariable 'EastBuildingsCurrent';
+
+if (paramRespawnMASH) then {
+ WF_Logic setVariable ["EastMASH",objNull,true];
+ WF_Logic setVariable ["WestMASH",objNull,true];
+};
+
+//--- Base Area (grouped base)
+if (paramBaseArea) then {
+ WF_Logic setVariable ["EastArea",[],true];
+ WF_Logic setVariable ["WestArea",[],true];
+
+ [] ExecFSM "Server\FSM\basearea.fsm";
+};
+
+diag_log Format["[WFBE (INIT)][frameno:%1 | ticktime:%2] Init_Server: Network Variables - [Done]",diag_frameno,diag_tickTime];
+
+//--- Allies base.
+_allies = 'WFBE_ALLIES' Call GetNamespace;
+if (_allies > 0 && (WF_A2_Vanilla || WF_A2_CombinedOps)) then {
+ AlliesBuyUnit = Compile preprocessFile "Server\Functions\Server_AlliesBuyUnit.sqf";
+ [] Call Compile preprocessFile "Server\Config\Config_Allies.sqf";
+ if (_allies in [1,3]) then {[west] ExecFSM "Server\FSM\allies.fsm"};
+ if (_allies in [2,3]) then {[east] ExecFSM "Server\FSM\allies.fsm"};
+
+ diag_log Format["[WFBE (INIT)][frameno:%1 | ticktime:%2] Init_Server: Allies Module - [Done]",diag_frameno,diag_tickTime];
+};
+
+//--- Use Workers?
+if (paramUseWorkers) then {
+ WF_WestWorkers = [];
+ publicVariable "WF_WestWorkers";
+ WF_EastWorkers = [];
+ publicVariable "WF_EastWorkers";
+
+ ["WFBE_WORKERS_WESTLOGIC",[],true] Call SetNamespace;
+ ["WFBE_WORKERS_EASTLOGIC",[],true] Call SetNamespace;
+};
+
+//--- Create base / town defenses group.
+WF_DefenseWestGrp = createGroup west;
+WF_DefenseEastGrp = createGroup east;
+
+//--- ALICE Module.
+if (paramAlice) then {
+ _type = if (WF_A2_Vanilla) then {'AliceManager'} else {'Alice2Manager'};
+ (createGroup sideLogic) createUnit [_type,[0,0,0],[],0,"NONE"];
+
+ diag_log Format["[WFBE (INIT)][frameno:%1 | ticktime:%2] Init_Server: ALICE Module - [Done]",diag_frameno,diag_tickTime];
+};
+
+//--- Mission Module
+if (paramSecondaryMissions) then {
+ ExecFSM 'Server\FSM\missions.fsm';
+
+ diag_log Format["[WFBE (INIT)][frameno:%1 | ticktime:%2] Init_Server: Missions Init - [Done]",diag_frameno,diag_tickTime];
+};
+
+//--- UPSMON AI
+if (paramUPSMON) then {
+ Call Compile preprocessFileLineNumbers "Server\Module\UPSMON\Init_UPSMON.sqf";
+};
+
+diag_log Format["[WFBE (INIT)][frameno:%2 | ticktime:%3] Init_Server: Init End at %1",time,diag_frameno,diag_tickTime];
+
+//--- Waiting until that the game is launched.
+waitUntil {time > 0};
+
+//--- Launch votes.
+[East] Spawn SVoteForCommander;
+[West] Spawn SVoteForCommander; \ No newline at end of file
diff --git a/Server/Init/Init_Towns.sqf b/Server/Init/Init_Towns.sqf
new file mode 100644
index 0000000..98e6995
--- /dev/null
+++ b/Server/Init/Init_Towns.sqf
@@ -0,0 +1,214 @@
+private ['_half','_wStart','_eStart','_nearTownsW','_nearTownsE','_near','_x','_camps','_total','_limit','_defenses','_require',
+'_initied','_towns','_town','_boundaries','_minus','_total','_z'];
+
+waitUntil {townInit};
+
+//--- Special Towns mode.
+switch ('WFBE_TOWNSTARTINGMODE' Call GetNamespace) do {
+ //--- 50-50.
+ case 1: {
+ _half = round ((count towns) / 2 );
+ _wStart = westStartingLocation;
+ _eStart = eastStartingLocation;
+
+ _nearTownsW = [];
+ _nearTownsE = [];
+
+ _near = [_wStart,towns] Call SortByDistance;
+ if (count _near > 0) then {
+ for [{_z = 0},{_z < _half},{_z = _z + 1}] do {_nearTownsW = _nearTownsW + [_near select _z]};
+ };
+
+ _nearTownsE = (towns - _nearTownsW);
+
+ {
+ _x setVariable ['sideID',WESTID,true];
+ _camps = _x getVariable "camps";
+ {_x setVariable ['sideID',WESTID,true]} forEach _camps;
+ } forEach _nearTownsW;
+ {
+ _x setVariable ['sideID',EASTID,true];
+ _camps = _x getVariable "camps";
+ {_x setVariable ['sideID',EASTID,true]} forEach _camps;
+ } forEach _nearTownsE;
+ };
+
+ //--- Nearby Towns.
+ case 2: {
+ _total = count towns;
+ _wStart = westStartingLocation;
+ _eStart = eastStartingLocation;
+ _limit = floor(_total / 6);
+ _nearTownsW = [];
+ _nearTownsE = [];
+
+ _near = [_wStart,towns] Call SortByDistance;
+ if (count _near > 0) then {
+ for [{_z = 0},{_z < _limit},{_z = _z + 1}] do {_nearTownsW = _nearTownsW + [_near select _z]};
+ };
+
+ _near = [_eStart,(towns - _nearTownsW)] Call SortByDistance;
+ if (count _near > 0) then {
+ for [{_z = 0},{_z < _limit},{_z = _z + 1}] do {_nearTownsE = _nearTownsE + [_near select _z]};
+ };
+
+ {
+ _x setVariable ['sideID',WESTID,true];
+ _camps = _x getVariable "camps";
+ {_x setVariable ['sideID',WESTID,true]} forEach _camps;
+ _defenses = _x nearEntities['WFBE_RESISTANCEDEFENSENAMES' Call GetNamespace,_x getVariable "range"];
+ {deleteVehicle _x} forEach _defenses;
+ } forEach _nearTownsW;
+ {
+ _x setVariable ['sideID',EASTID,true];
+ _camps = _x getVariable "camps";
+ {_x setVariable ['sideID',EASTID,true]} forEach _camps;
+ _defenses = _x nearEntities['WFBE_RESISTANCEDEFENSENAMES' Call GetNamespace,_x getVariable "range"];
+ {deleteVehicle _x} forEach _defenses;
+ } forEach _nearTownsE;
+ };
+
+ //--- Random Towns (25% East, 25% West, 50% Res).
+ case 3: {
+ _total = count towns;
+ _half = round(count towns)/4;
+ _minus = round(count towns)/2;
+ _boundaries = 'WFBE_BOUNDARIESXY' Call GetNamespace;
+ _nearTownsW = [];
+ _resTowns = [];
+ _towns = +towns;
+
+ //--- Use boundaries to determinate the center if possible.
+ if !(isNil '_boundaries') then {
+ Private ["_dis1","_dis2","_e","_posF1","_posF2","_posx","_posy","_searchArea","_size"];
+ //--- Attempt to set the center of the island resistance.
+ _searchArea = [(_boundaries / 2)-0.1,(_boundaries / 2)+0.1,0];
+ _posx = _searchArea select 0;
+ _posy = _searchArea select 0;
+ _size = _boundaries/5;
+ _e = sqrt((_size)^2 - (_size)^2);
+ _posF1 = [_posx + (sin (90) * _e),_posy + (cos (90) * _e)];
+ _posF2 = [_posx - (sin (90) * _e),_posy - (cos (90) * _e)];
+ _total = 2 * _size;
+
+ //--- Determinate resistance towns.
+ {
+ _position = getPos _x;
+
+ _dis1 = _position distance _posF1;
+ _dis2 = _position distance _posF2;
+ if (_dis1+_dis2 < _total) then {
+ _resTowns = _resTowns + [_x];
+ };
+
+ if (count _resTowns >= _minus) exitWith {};
+ } forEach towns;
+
+ //--- Update Towns.
+ _towns = _towns - _resTowns;
+ _e = count _towns;
+
+ //--- Check if we couldn't reach 50% Res.
+ if (count _resTowns < _minus) then {
+ for '_z' from 0 to _e-1 do {
+ _town = _towns select round(random((count _towns)-1));
+ _towns = _towns - [_town];
+
+ _resTowns = _resTowns + [_town];
+
+ if (count _resTowns >= _minus) exitWith {};
+ };
+ };
+
+ //--- Update Towns Again.
+ _towns = _towns - _resTowns;
+ _e = count _towns;
+
+ //--- Assign west or east towns.
+ for '_z' from 0 to totalTowns-_minus-1 do {
+ _town = _towns select round(random((count _towns)-1));
+ _towns = _towns - [_town];
+ if (count _nearTownsW < _half) then {
+ _nearTownsW = _nearTownsW + [_town];
+ _town setVariable ['sideID',WESTID,true];
+ _camps = _town getVariable "camps";
+ {_x setVariable ['sideID',WESTID,true]} forEach _camps;
+ _defenses = _town nearEntities['WFBE_RESISTANCEDEFENSENAMES' Call GetNamespace,_town getVariable "range"];
+ {deleteVehicle _x} forEach _defenses;
+ } else {
+ _town setVariable ['sideID',EASTID,true];
+ _camps = _town getVariable "camps";
+ {_x setVariable ['sideID',EASTID,true]} forEach _camps;
+ _defenses = _town nearEntities['WFBE_RESISTANCEDEFENSENAMES' Call GetNamespace,_town getVariable "range"];
+ {deleteVehicle _x} forEach _defenses;
+ };
+ };
+ } else {
+ //--- No boundaries defined, we use a random system.
+ for '_z' from 0 to _minus-1 do {
+ _town = _towns select round(random((count _towns)-1));
+ _towns = _towns - [_town];
+ if (count _nearTownsW < _half) then {
+ _nearTownsW = _nearTownsW + [_town];
+ _town setVariable ['sideID',WESTID,true];
+ _camps = _town getVariable "camps";
+ {_x setVariable ['sideID',WESTID,true]} forEach _camps;
+ _defenses = _town nearEntities['WFBE_RESISTANCEDEFENSENAMES' Call GetNamespace,_town getVariable "range"];
+ {deleteVehicle _x} forEach _defenses;
+ } else {
+ _town setVariable ['sideID',EASTID,true];
+ _camps = _town getVariable "camps";
+ {_x setVariable ['sideID',EASTID,true]} forEach _camps;
+ _defenses = _town nearEntities['WFBE_RESISTANCEDEFENSENAMES' Call GetNamespace,_town getVariable "range"];
+ {deleteVehicle _x} forEach _defenses;
+ };
+ };
+ };
+
+
+ };
+};
+
+//--- Resistance Patrols.
+if (('WFBE_TOWNSTARTINGMODE' Call GetNamespace) != 1 && ('WFBE_RESPATROL' Call GetNamespace > 0)) then {
+ _require = if (('WFBE_RESPATROL' Call GetNamespace) > count towns) then {count towns} else {'WFBE_RESPATROL' Call GetNamespace};
+ _initied = 0;
+ _towns = towns;
+
+ //--- Don't bother with the randomizer if the amount set in RESPATROLMAX is >= count towns.
+ while {_initied < _require} do {
+ if (_require == count towns) then {
+ [_towns select _initied] ExecFSM "Server\FSM\respatrol.fsm";
+ _initied = _initied + 1;
+ } else {
+ if (random 2 > 1) then {
+ _town = [_towns select (round(random((count _towns)-1)))] ExecFSM "Server\FSM\respatrol.fsm";
+ _towns = _towns - [_town];
+ _initied = _initied + 1;
+ };
+ };
+ };
+};
+
+//--- Resistance Strikers.
+if (('WFBE_TOWNSTARTINGMODE' Call GetNamespace) != 1 && ('WFBE_RESSTRIKER' Call GetNamespace) > 0) then {
+ _require = if (('WFBE_RESSTRIKER' Call GetNamespace) > count towns) then {count towns} else {'WFBE_RESSTRIKER' Call GetNamespace};
+ _initied = 0;
+ _towns = towns;
+
+ //--- Don't bother with the randomizer if the amount set in RESSTRIKERMAX is >= count towns.
+ while {_initied < _require} do {
+ if (_require == count towns) then {
+ [_towns select _initied] ExecFSM "Server\FSM\resstriker.fsm";
+ _initied = _initied + 1;
+ } else {
+ if (random 2 > 1) then {
+ _town = [_towns select (round(random((count _towns)-1)))] ExecFSM "Server\FSM\resstriker.fsm";
+ _towns = _towns - [_town];
+ _initied = _initied + 1;
+ };
+ };
+ };
+};
+
+diag_log Format["[WFBE (INIT)][frameno:%1 | ticktime:%2] Init_Towns (Server): Towns starting mode initialization - [Done]",diag_frameno,diag_tickTime]; \ No newline at end of file
diff --git a/Server/Missions/M_BASE_Attack/m_init.sqf b/Server/Missions/M_BASE_Attack/m_init.sqf
new file mode 100644
index 0000000..d16b977
--- /dev/null
+++ b/Server/Missions/M_BASE_Attack/m_init.sqf
@@ -0,0 +1,169 @@
+/* Base Attack Script (Hybrid) */
+Private ['_attackAfter','_attempts','_boundariesxy','_cpt','_group','_groups','_grps','_hq','_i','_inRange','_isHQDeployed','_jipHandler','_marker','_markerSize','_near','_pos','_position','_retVal','_runFor','_size','_spawnLocations','_structures','_target','_teamType','_uniqueIndex','_uniqueLabel','_vehicles'];
+
+_uniqueLabel = _this select 0;
+_uniqueIndex = _this select 1;
+_runFor = _this select 2;
+
+//--- Make sure that at least one building is available.
+_structures = (_runFor) Call GetSideStructures;
+if (count _structures == 0) exitWith{
+ [Format['_WFBE_M_RUNNINGMISSIONS_%1',_runFor],((Format['_WFBE_M_RUNNINGMISSIONS_%1',_runFor]) Call GetNamespace) - 1, true] Call SetNamespace;
+};
+
+/* Radio the designated team that a new mission is available */
+['NewMissionAvailable','',_runFor] Spawn SideMessage;
+
+//--- Grab the HQ.
+_isHQDeployed = (_runFor) Call GetSideHQDeployed;
+if (_isHQDeployed) then {
+ _hq = (_runFor) Call GetSideHQ;
+ if (alive _hq) then {_structures = _structures + [_hq]};
+};
+
+//--- Pick a target.
+_target = _structures select floor(random (count _structures));
+
+//--- Progressive difficulty.
+_grps = 2 + ('WFBE_TOWNRESISTANCEDIFFICULTY' Call GetNamespace);
+
+//--- Create the groups.
+_groups = [];
+for [{_i = 0},{_i < _grps},{_i = _i + 1}] do {
+ _groups = _groups + [createGroup resistance];
+};
+
+_markerSize = 700;
+_size = _markerSize;
+
+//--- Plan the attack delay.
+_attackAfter = (300)+(random 100)-(random 100);
+
+//--- Warn the client.
+WFBE_M_BASE_Attack = [_runFor,'CLTFNCM_BASE_ATTACK',[_size/2,_uniqueLabel,_uniqueIndex,_target,_groups]];
+publicVariable 'WFBE_M_BASE_Attack';
+if (isHostedServer || local player) then {[_runFor,'CLTFNCM_BASE_ATTACK',[_size/2,_uniqueLabel,_uniqueIndex,_target,_groups]] Spawn HandlePVF};
+_jipHandler = [_runFor,_size,_uniqueLabel,_uniqueIndex,_target,_groups] Spawn {
+ Private ['_groups','_oldPlayerList','_runFor','_size','_target','_uniqueLabel','_uniqueIndex','_update'];
+ _runFor = _this select 0;
+ _size = (_this select 1)/2;
+ _uniqueLabel = _this select 2;
+ _uniqueIndex = _this select 3;
+ _target = _this select 4;
+ _groups = _this select 5;
+
+ while {true} do {
+ _oldPlayerList = playableUnits;
+ sleep 15;
+ _update = false;
+ {
+ if !(_x in _oldPlayerList) then {_update = true};
+ } forEach playableUnits;
+
+ if (_update) then {
+ WFBE_M_BASE_Attack = [_runFor,'CLTFNCM_BASE_ATTACK',[_size,_uniqueLabel,_uniqueIndex,_target,_groups]];
+ publicVariable 'WFBE_M_BASE_Attack';
+ if (isHostedServer || local player) then {[_runFor,'CLTFNCM_BASE_ATTACK',[_size,_uniqueLabel,_uniqueIndex,_target,_groups]] Spawn HandlePVF};
+ };
+ };
+};
+
+sleep _attackAfter;
+
+//--- Targert died?
+if !(alive _target) then {
+ //--- Pick another target if possible, else send them to the HQ (DoA).
+ _structures = (_runFor) Call GetSideStructures;
+ if (count _structures == 0) then {
+ _hq = (_runFor) Call GetSideHQ;
+ _target = _hq;
+ } else {
+ _target = _structures select floor(random (count _structures));
+ };
+};
+
+//--- UPSMON Area Definition.
+_marker = "";
+if (paramUPSMON) then {
+ _marker = Format['UPSMON_%1%2',_uniqueLabel,_uniqueIndex];
+ createMarkerLocal [_marker, getPos _target];
+ _marker setMarkerColorLocal "ColorBlue";
+ _marker setMarkerShapeLocal "RECTANGLE";
+ _marker setMarkerBrushLocal "BORDER";
+ _marker setMarkerSizeLocal [300,300];
+ _marker setMarkerAlphaLocal 0;
+};
+
+_spawnLocations = [];
+_attempts = 0;
+while {count _spawnLocations < 8} do {
+ sleep 0.05;
+ _position = ([getPos _target,(_markerSize * 0.75),(_markerSize)] Call GetRandomPosition);
+ _pos = [_position, 50] Call GetSafePlace;
+
+ _inRange = true;
+ if (paramBoundaries) then {
+ _boundariesxy = 'WFBE_BOUNDARIESXY' Call GetNamespace;
+ if (((_pos select 0) < (_markerSize / 2) || (_pos select 0) > (_boundariesxy - (_markerSize / 2))) || ((_pos select 1) < (_markerSize / 2) || (_pos select 1) > (_boundariesxy - (_markerSize / 2)))) then {
+ _inRange = false;
+ };
+ };
+
+ _near = _pos nearEntities [['Man','Car','Motorcycle','Ship','Air','Tank','StaticCannon'],_markerSize/8];
+
+ if (east countSide _near == 0 && west countSide _near == 0 && _inRange) then {_spawnLocations = _spawnLocations + [_pos];_size = 650};
+ _attempts = _attempts + 1;
+
+ if (_attempts > 50) then {
+ _attempts = 0;
+ _size = _size + (_markerSize/5);
+ };
+};
+
+_i = 0;
+_vehicles = [];
+while {_i < _grps} do {
+ _teamType = Format ["WFBE_RESPATROLTYPE%1%2",1 + round(random 2),round(random 2)] Call GetNamespace;
+ _group = _groups select _i;
+ _pos = _spawnLocations select floor(random(count _spawnLocations));
+
+ _retVal = [_teamType,_pos,resistance,paramResVehLock,_group] Call CreateTeamTemplate;
+ _vehicles = _vehicles + (_retVal select 1);
+
+ _group setFormation (['COLUMN','ECH RIGHT','LINE','FILE','DIAMOND'] select floor(random 5));
+
+ _group setBehaviour 'COMBAT';
+ _group setCombatMode 'RED';
+ _group move (getPos _target);
+
+ //--- If UPS is enabled, the ai will do a bit more than sitting in base.
+ if (paramUPSMON) then {[(leader _group),_marker,"move","nofollow","reinforcement"] Spawn UPSMON};
+
+ _i = _i + 1;
+};
+
+//--- Wait until everyone's dead.
+waitUntil {
+ sleep 1;
+
+ _cpt = 0;
+ {
+ if !(isNil '_x') then {
+ _cpt = _cpt + (count ((units _x) Call GetLiveUnits));
+ };
+ } forEach _groups;
+
+ _cpt == 0
+};
+
+//--- Kill the spawned thread if it still runs.
+if !(scriptDone _jipHandler) then {terminate _jipHandler};
+
+//--- Wait for the client to end up his sync.
+sleep 35;
+
+//--- Free the mission.
+[Format['_WFBE_M_RUNNINGMISSIONS_%1',_runFor],((Format['_WFBE_M_RUNNINGMISSIONS_%1',_runFor]) Call GetNamespace) - 1, true] Call SetNamespace;
+
+//--- Delete UPSMON Marker if necessary.
+if (paramUPSMON) then {deleteMarkerLocal _marker}; \ No newline at end of file
diff --git a/Server/Missions/M_PLAYERS_Attack_Air/m_init.sqf b/Server/Missions/M_PLAYERS_Attack_Air/m_init.sqf
new file mode 100644
index 0000000..d874c2e
--- /dev/null
+++ b/Server/Missions/M_PLAYERS_Attack_Air/m_init.sqf
@@ -0,0 +1,128 @@
+/* Players Attack Script (Hybrid) */
+Private ["_boundaries","_chopper","_group","_jipHandler","_list","_pilot","_players","_ran","_ranDir","_runFor","_ranPos","_target","_targets","_turrets","_uniqueIndex","_uniqueLabel","_vehicle"];
+
+_uniqueLabel = _this select 0;
+_uniqueIndex = _this select 1;
+_runFor = _this select 2;
+
+//--- Retrieve the players on a side.
+_players = [];
+_list = Format ["WFBE_%1TEAMS",_runFor] Call GetNamespace;
+{
+ if !(isNil '_x') then {
+ if (side _x == _runFor) then {
+ if (isPlayer(leader _x) && alive(leader _x)) then {_players = _players + [leader _x]};
+ };
+ };
+} forEach _list;
+
+//--- Ensure that the team already has a town.
+if (count _players == 0) exitWith {
+ [Format['_WFBE_M_RUNNINGMISSIONS_%1',_runFor],((Format['_WFBE_M_RUNNINGMISSIONS_%1',_runFor]) Call GetNamespace) - 1, true] Call SetNamespace;
+};
+
+//--- Radio the designated team that a new mission is available.
+['NewMissionAvailable','',_runFor] Spawn SideMessage;
+
+//--- Define the chopper spawn position.
+_boundaries = "WFBE_BOUNDARIESXY" Call GetNamespace;
+
+_ranPos = [];
+_ranDir = [];
+
+_bd = 'WFBE_BOUNDARIESXY' Call GetNamespace;
+if !(isNil '_bd') then {
+ _ranPos = [
+ [0+random(200),0+random(200),400+random(200)],
+ [0+random(200),_bd-random(200),400+random(200)],
+ [_bd-random(200),_bd-random(200),400+random(200)],
+ [_bd-random(200),0+random(200),400+random(200)]
+ ];
+ _ranDir = [45,145,225,315];
+} else {
+ _ranPos = [[0+random(200),0+random(200),400+random(200)],[10000+random(200),0+random(200),400+random(200)]];
+ _ranDir = [45,315];
+};
+
+_ran = round(random((count _ranPos)-1));
+
+//--- This script use PMC units.
+_chopper = "Ka60_PMC";
+_group = createGroup resistance;
+_vehicle = createVehicle [_chopper,(_ranPos select _ran), [], (_ranDir select _ran), "FLY"];
+_vehicle addEventHandler ['Killed',{[_this select 0,_this select 1,resistance] Spawn UnitKilled}];
+
+//--- Man the chopper.
+_pilot = ["Soldier_Pilot_PMC",_group,[0,0,0],resistance] Call CreateMan;
+_pilot moveInDriver _vehicle;
+_pilot = ["Soldier_Pilot_PMC",_group,[0,0,0],resistance] Call CreateMan;
+_pilot moveInGunner _vehicle;
+
+//--- Man the extra turrets.
+_config = configFile >> "CfgVehicles" >> _chopper >> "Turrets";
+_turrets = [_config] call BIS_fnc_returnVehicleTurrets;
+if (count _turrets > 0) then {[_turrets, [], _vehicle, "Soldier_Pilot_PMC", _group] call SpawnTurrets};
+
+//--- Warn the client.
+WFBE_M_PLAYERS_Attack_Air = [_runFor,'CLTFNCM_PLAYERS_ATTACK_AIR',[_vehicle,_uniqueLabel,_uniqueIndex]];
+publicVariable 'WFBE_M_PLAYERS_Attack_Air';
+if (isHostedServer || local player) then {[_runFor,'CLTFNCM_PLAYERS_ATTACK_AIR',[_vehicle,_uniqueLabel,_uniqueIndex]] Spawn HandlePVF};
+_jipHandler = [_vehicle,_uniqueLabel,_uniqueIndex] Spawn {
+ Private ['_chopper','_oldPlayerList','_runFor','_uniqueLabel','_uniqueIndex','_update'];
+ _chopper = _this select 0;
+ _uniqueLabel = _this select 1;
+ _uniqueIndex = _this select 1;
+
+ while {true} do {
+ _oldPlayerList = playableUnits;
+ sleep 15;
+ _update = false;
+ {
+ if !(_x in _oldPlayerList) then {_update = true};
+ } forEach playableUnits;
+
+ if (_update) then {
+ WFBE_M_PLAYERS_Attack_Air = [_runFor,'CLTFNCM_PLAYERS_ATTACK_AIR',[_chopper,_uniqueLabel,_uniqueIndex]];
+ publicVariable 'WFBE_M_PLAYERS_Attack_Air';
+ if (isHostedServer || local player) then {[_runFor,'CLTFNCM_PLAYERS_ATTACK_AIR',[_chopper,_uniqueLabel,_uniqueIndex]] Spawn HandlePVF};
+ };
+ };
+};
+
+//--- Move the chopper toward the target.
+while {true} do {
+ sleep 20;
+
+ _players = [];
+ {
+ if !(isNil '_x') then {
+ if (side _x == _runFor) then {
+ if (isPlayer(leader _x) && alive(leader _x)) then {_players = _players + [leader _x]};
+ };
+ };
+ } forEach _list;
+
+ if (count _players == 0 || !alive _vehicle || !alive(driver _vehicle) || !canMove _vehicle) exitWith {};
+
+ _targets = [_vehicle, _players] Call SortByDistance;
+ _target = _targets select 0;
+ {
+ if (vehicle _x == _x && !((vehicle _x) isKindOf "Air")) exitWith {_target = _x};
+ } forEach _targets;
+
+ if !(someAmmo _vehicle) then {[_vehicle,resistance] Call RearmVehicle};
+
+ _vehicle doMove (getPos _target);
+ {_group reveal _x} forEach (vehicle _target nearEntities 200);
+};
+
+if (alive _vehicle || count _players == 0) then {_vehicle setDammage 1};
+{if (alive _x || count _players == 0) then {_x setDammage 1}} forEach (units _group);
+
+//--- Kill the spawned thread if it still runs.
+if !(scriptDone _jipHandler) then {terminate _jipHandler};
+
+//--- Wait for the client to end up his sync.
+sleep 35;
+
+[Format['_WFBE_M_RUNNINGMISSIONS_%1',_runFor],((Format['_WFBE_M_RUNNINGMISSIONS_%1',_runFor]) Call GetNamespace) - 1, true] Call SetNamespace; \ No newline at end of file
diff --git a/Server/Missions/M_TOWN_Attack/m_init.sqf b/Server/Missions/M_TOWN_Attack/m_init.sqf
new file mode 100644
index 0000000..b687535
--- /dev/null
+++ b/Server/Missions/M_TOWN_Attack/m_init.sqf
@@ -0,0 +1,160 @@
+/* Town Attack Script (Hybrid) */
+Private ['_attackAfter','_attempts','_boundariesxy','_cpt','_group','_groups','_grps','_i','_inRange','_jipHandler','_markerSize','_near','_pos','_position','_resTypes','_retVal','_runFor','_sideID','_size','_spawnLocations','_sup','_teamType','_town','_towns','_uniqueIndex','_uniqueLabel','_vehicles'];
+
+_uniqueLabel = _this select 0;
+_uniqueIndex = _this select 1;
+_runFor = _this select 2;
+
+//--- Retrieve towns.
+_towns = [];
+_sideID = (_runFor) Call GetSideID;
+{
+ if (_x getVariable 'sideID' == _sideID) then {_towns = _towns + [_x]};
+} forEach towns;
+
+//--- Ensure that the team already has a town.
+if (count _towns == 0) exitWith {
+ [Format['_WFBE_M_RUNNINGMISSIONS_%1',_runFor],((Format['_WFBE_M_RUNNINGMISSIONS_%1',_runFor]) Call GetNamespace) - 1, true] Call SetNamespace;
+};
+
+/* Radio the designated team that a new mission is available */
+['NewMissionAvailable','',_runFor] Spawn SideMessage;
+
+//--- Pick a town.
+_town = _towns select round(random((count _towns)-1));
+
+_markerSize = 500;
+_size = _markerSize;
+
+//--- Get the groups depending on the SV.
+_sup = _town getVariable 'supplyValue';
+_grps = 1;
+if (_sup < 30) then {_grps = 2};
+if (_sup >= 30 && _sup < 50) then {_grps = 3};
+if (_sup >= 50 && _sup < 80) then {_grps = 4};
+if (_sup >= 80 && _sup < 100) then {_grps = 5};
+if (_sup >= 100 && _sup < 120) then {_grps = 6};
+if (_sup >= 120) then {_grps = 7};
+
+//--- Create the groups.
+_groups = [];
+for [{_i = 0},{_i < _grps},{_i = _i + 1}] do {
+ _groups = _groups + [createGroup resistance];
+};
+
+//--- Plan the attack delay.
+_attackAfter = (200)+(random 100)-(random 100);
+
+//--- Warn the client.
+WFBE_M_TOWN_Attack = [_runFor,'CLTFNCM_TOWN_ATTACK',[_size/2,_uniqueLabel,_uniqueIndex,_town,_groups]];
+publicVariable 'WFBE_M_TOWN_Attack';
+if (isHostedServer || local player) then {[_runFor,'CLTFNCM_TOWN_ATTACK',[_size/2,_uniqueLabel,_uniqueIndex,_town,_groups]] Spawn HandlePVF};
+_jipHandler = [_runFor,_size,_uniqueLabel,_uniqueIndex,_town,_groups] Spawn {
+ Private ['_groups','_oldPlayerList','_runFor','_size','_town','_uniqueLabel','_uniqueIndex','_update'];
+ _runFor = _this select 0;
+ _size = (_this select 1)/2;
+ _uniqueLabel = _this select 2;
+ _uniqueIndex = _this select 3;
+ _town = _this select 4;
+ _groups = _this select 5;
+
+ while {true} do {
+ _oldPlayerList = playableUnits;
+ sleep 15;
+ _update = false;
+ {
+ if !(_x in _oldPlayerList) then {_update = true};
+ } forEach playableUnits;
+
+ if (_update) then {
+ WFBE_M_TOWN_Attack = [_runFor,'CLTFNCM_TOWN_ATTACK',[_size,_uniqueLabel,_uniqueIndex,_town,_groups]];
+ publicVariable 'WFBE_M_TOWN_Attack';
+ if (isHostedServer || local player) then {[_runFor,'CLTFNCM_TOWN_ATTACK',[_size,_uniqueLabel,_uniqueIndex,_town,_groups]] Spawn HandlePVF};
+ };
+ };
+};
+
+//--- Wait...
+sleep _attackAfter;
+
+_spawnLocations = [];
+_attempts = 0;
+while {count _spawnLocations < 8} do {
+ sleep 0.05;
+ _position = ([getPos _town,(_markerSize * 0.75),(_markerSize)] Call GetRandomPosition);
+ _pos = [_position, 50] Call GetSafePlace;
+
+ _inRange = true;
+ if (paramBoundaries) then {
+ _boundariesxy = 'WFBE_BOUNDARIESXY' Call GetNamespace;
+ if (((_pos select 0) < (_markerSize / 2) || (_pos select 0) > (_boundariesxy - (_markerSize / 2))) || ((_pos select 1) < (_markerSize / 2) || (_pos select 1) > (_boundariesxy - (_markerSize / 2)))) then {
+ _inRange = false;
+ };
+ };
+
+ _near = _pos nearEntities [['Man','Car','Motorcycle','Ship','Air','Tank','StaticCannon'],_markerSize/8];
+
+ if (east countSide _near == 0 && west countSide _near == 0 && _inRange) then {_spawnLocations = _spawnLocations + [_pos];_size = 650};
+ _attempts = _attempts + 1;
+
+ if (_attempts > 50) then {
+ _attempts = 0;
+ _size = _size + (_markerSize/5);
+ };
+};
+
+_resTypes = _town getVariable 'resistanceTypes';
+_sideID = _town getVariable 'sideID';
+
+_i = 0;
+_vehicles = [];
+while {_i < _grps} do {
+ _teamType = Format ["WFBE_RES%1UNITS",_resTypes select floor(random(count _resTypes))] Call GetNamespace;
+ _group = _groups select _i;
+ _pos = _spawnLocations select floor(random(count _spawnLocations));
+
+ _retVal = [_teamType,_pos,resistance,paramResVehLock,_group] Call CreateTeamTemplate;
+ _vehicles = _vehicles + [_retVal select 1];
+
+ _group setFormation (['COLUMN','ECH RIGHT','LINE','FILE','DIAMOND'] select floor(random 5));
+
+ if (_sideID == RESISTANCEID) then {
+ //--- Town is held by the resistance.
+ _group setBehaviour 'AWARE';
+ _group setCombatMode 'YELLOW';
+ [_group,_town,150] Spawn AITownPatrol;
+ } else {
+ _group setBehaviour 'COMBAT';
+ _group setCombatMode 'RED';
+ _group move (getPos _town);
+ //--- Town is held by the occupation.
+ };
+
+ //--- Enhance the experience with UPSMON.
+ if (paramUPSMON) then {[(leader _group),Format ['UPSMON_TOWN_%1',str _town],"move","nofollow","reinforcement"] Spawn UPSMON};
+
+ _i = _i + 1;
+};
+
+//--- Wait until everyone's dead.
+waitUntil {
+ sleep 1;
+
+ _cpt = 0;
+ {
+ if !(isNil '_x') then {
+ _cpt = _cpt + (count ((units _x) Call GetLiveUnits));
+ };
+ } forEach _groups;
+
+ _cpt == 0
+};
+
+//--- Kill the spawned thread if it still runs.
+if !(scriptDone _jipHandler) then {terminate _jipHandler};
+
+//--- Wait for the client to end up his sync.
+sleep 35;
+
+//--- Free the mission.
+[Format['_WFBE_M_RUNNINGMISSIONS_%1',_runFor],((Format['_WFBE_M_RUNNINGMISSIONS_%1',_runFor]) Call GetNamespace) - 1, true] Call SetNamespace; \ No newline at end of file
diff --git a/Server/Missions/M_UAV_RetrieveModule/m_init.sqf b/Server/Missions/M_UAV_RetrieveModule/m_init.sqf
new file mode 100644
index 0000000..b9d8388
--- /dev/null
+++ b/Server/Missions/M_UAV_RetrieveModule/m_init.sqf
@@ -0,0 +1,503 @@
+/* UAV Retrieve Module Script */
+Private ['_attempts','_boundariesxy','_completeList','_completeListTr','_crashed','_craters','_defensePos','_east','_eastUAV','_ecomplete','_end','_espos','_eteam','_eteamname','_eteamrunning','_jipHandler','_list','_markerSize','_near','_nearUav','_pos','_ran','_randomPos','_resistance','_returned','_safeRadius','_size','_spawnUnits','_team','_uav','_uavModel','_uniqueIndex','_uniqueLabel','_unit','_units','_vehicles','_waitFor','_wcomplete','_west','_westUAV','_winner','_wspos','_wteam','_wteamname','_wteamrunning'];
+
+_uniqueLabel = _this select 0;
+_uniqueIndex = _this select 1;
+
+_randomPos = [];
+
+//--- Marker size.
+_markerSize = 750;
+
+//--- Is boundaries enabled?
+_boundariesxy = 'WFBE_BOUNDARIESXY' Call GetNamespace;
+if !(isNil '_boundariesxy') then {
+ //--- Use the boundaries to get a position, limit it to a possible location (not outside of the map).
+ _boundariesxy = _boundariesxy - (_markerSize*2);
+ if (_boundariesxy <= 0) then {_boundariesxy = ('WFBE_BOUNDARIESXY' Call GetNamespace)};
+
+ _safeRadius = 750;
+ _attempts = 0;
+
+ //--- Get a safe 'clear' position for a crash site.
+ while {_attempts != -1} do {
+ sleep 0.005;
+
+ _attempts = _attempts + 1;
+
+ _randomPos = [_markerSize + (random _boundariesxy),_markerSize + (random _boundariesxy),0];
+
+ //--- Water-free & building free
+ if (count (_randomPos isFlatEmpty [20/8,0,0.6,20,0,false,objNull]) > 0) then {
+ //--- We don't want any 'living' units around.
+ if (count(_randomPos nearEntities [['Man','Car','Motorcycle','Ship','Air','Tank','StaticWeapon'],_safeRadius/2]) == 0) exitWith {_attempts = -1};
+
+ //--- Result may vary.
+ if (_attempts > 250 && _safeRadius > 10) then {
+ _attempts = 0;
+ _safeRadius = _safeRadius - 100;
+ if (_safeRadius < 10) then {_safeRadius = 10};
+ };
+ };
+ };
+} else {
+ //--- Get a random location around a town.
+ _pos = getPos (towns select round(random((count towns) -1)));
+
+ _safeRadius = 500;
+ _attempts = 0;
+
+ //--- Get a safe 'clear' position for a crash site.
+ while {_attempts != -1} do {
+ sleep 0.01;
+
+ _attempts = _attempts + 1;
+
+ _randomPos = [(_pos select 0) + random(_safeRadius)-random(_safeRadius),(_pos select 1) + random(_safeRadius)-random(_safeRadius),0];
+
+ //--- Water-free & building free
+ if (count (_randomPos isFlatEmpty [20/8,0,0.6,20,0,false,objNull]) > 0) then {
+ //--- We don't want any 'living' units around.
+ if (count(_randomPos nearEntities [['Man','Car','Motorcycle','Ship','Air','Tank','StaticWeapon'],_safeRadius/2]) == 0) exitWith {_attempts = -1};
+
+ //--- Result may vary.
+ if (_attempts > 50) then {
+ _attempts = 0;
+ _safeRadius = _safeRadius + 200;
+ if (_safeRadius > 1500) then {attempts = -1;_randomPos = []};
+ };
+ };
+ };
+};
+
+//--- No suitable position found? exit.
+if (count _randomPos == 0) exitWith {
+ diag_log Format["[WFBE (INFORMATION)][frameno:%1 | ticktime:%2] M_UAV_RetrieveModule: Unable to determine a spawn location.",diag_frameno,diag_tickTime];
+ ['_WFBE_M_RUNNINGMISSIONS_WEST',('_WFBE_M_RUNNINGMISSIONS_WEST' Call GetNamespace) - 1, true] Call SetNamespace;
+ ['_WFBE_M_RUNNINGMISSIONS_EAST',('_WFBE_M_RUNNINGMISSIONS_EAST' Call GetNamespace) - 1, true] Call SetNamespace;
+};
+
+//--- Define the context.
+_eastUAV = 'WFBE_EASTUAV' Call GetNamespace;
+_westUAV = 'WFBE_WESTUAV' Call GetNamespace;
+
+//--- No suitable UAV models? exit.
+if (_eastUAV == '' && _westUAV == '') exitWith {
+ diag_log Format["[WFBE (INFORMATION)][frameno:%1 | ticktime:%2] M_UAV_RetrieveModule: No suitable UAV Models defined for WFBE_EASTUAV & WFBE_WESTUAV.",diag_frameno,diag_tickTime];
+ ['_WFBE_M_RUNNINGMISSIONS_WEST',('_WFBE_M_RUNNINGMISSIONS_WEST' Call GetNamespace) - 1, true] Call SetNamespace;
+ ['_WFBE_M_RUNNINGMISSIONS_EAST',('_WFBE_M_RUNNINGMISSIONS_EAST' Call GetNamespace) - 1, true] Call SetNamespace;
+};
+
+/* Radio both side for a new mission available */
+['NewMissionAvailable','',West] Spawn SideMessage;
+['NewMissionAvailable','',East] Spawn SideMessage;
+
+//--- Determine which one to use.
+_crashed = civilian;
+if (_eastUAV != '') then {
+ //--- West UAV tend to fall more often ;)
+ _crashed = if (random 100 > 25) then {west} else {east};
+} else {
+ _crashed = west;
+};
+
+//--- Place and destroy the uav.
+_uavModel = if (_crashed == west) then {_westUAV} else {_eastUAV};
+_uav = _uavModel createVehicle (_randomPos);
+_uav setDammage 1;
+
+//--- Garbage protection.
+if !(WF_A2_Vanilla) then {ignoreQueu = ignoreQueu + [_uav]};
+_uav setVariable ['keepAlive',true,true]; //--- Salvager protection.
+
+//--- Determine if the uav is held by resistance forces or not.
+_spawnUnits = 0 Spawn {};
+_team = objNull;
+_units = [];
+_vehicles = [];
+if (random 100 > 35) then {
+ //--- Pick a resistance patrol template (Only the light & medium one).
+ _list = Format["WFBE_RESPATROLTYPE%1%2",ceil(random 3),round(random 2)] Call GetNamespace;
+
+ //--- Get the team spawn position.
+ _defensePos = [[(_randomPos select 0)+random(150)-random(150),(_randomPos select 1)+random(150)-random(150)], 250] Call GetSafePlace;
+
+ //--- Create the team.
+ _returned = [_list,_defensePos,resistance,paramResVehLock,objNull] Call CreateTeamTemplate;
+ _units = _returned select 0;
+ _vehicles = _returned select 1;
+ _team = _returned select 2;
+
+ //--- Start the hunt/guard script.
+ _spawnUnits = [_units,_vehicles,_randomPos,_markerSize] Spawn {
+ Private ['_area','_guard','_objects','_target','_targets','_units','_vehicles'];
+ _units = _this select 0;
+ _vehicles = _this select 1;
+ _guard = _this select 2;
+ _area = _this select 3;
+
+ while {({alive _x} count _units) > 0} do {
+ sleep 20;
+
+ _targets = _guard nearEntities [['Man','Car','Motorcycle','Ship','Air','Tank','StaticWeapon'],_area];
+ _objects = _targets;
+ {
+ if !(_x isKindOf 'Man') then {if (count (crew _x) == 0) then {_objects = _objects - [_x]}};
+ if (side _x == resistance || side _x == civilian) then {_objects = _objects - [_x]};
+ } forEach _targets;
+
+ _targets = [_guard,_objects] Call SortByDistance;
+
+ if (count _targets > 0) then {
+ _target = _targets select 0;
+ (_units) commandMove [(getPos _target select 0)-random(60)+random(60), (getPos _target select 1)-random(60)+random(60), 0];
+ };
+ };
+ };
+};
+
+//--- Send to client, task, size, etc.
+WFBE_M_UAV_RetrieveModule = [nil,'CLTFNCM_UAV_RETRIEVEMODULE',[_markerSize,_uniqueLabel,_uniqueIndex,_uav]];
+publicVariable 'WFBE_M_UAV_RetrieveModule';
+if (isHostedServer || local player) then {[nil,'CLTFNCM_UAV_RETRIEVEMODULE',[_markerSize,_uniqueLabel,_uniqueIndex,_uav]] Spawn HandlePVF};
+_jipHandler = [_markerSize,_uniqueLabel,_uniqueIndex,_uav] Spawn {
+ Private ['_oldPlayerList','_update'];
+ while {true} do {
+ _oldPlayerList = playableUnits;
+ sleep 15;
+ _update = false;
+ {
+ if !(_x in _oldPlayerList) exitWith {_update = true};
+ } forEach playableUnits;
+
+ if (_update) then {
+ WFBE_M_UAV_RetrieveModule = [nil,'CLTFNCM_UAV_RETRIEVEMODULE',_this];
+ publicVariable 'WFBE_M_UAV_RetrieveModule';
+ if (isHostedServer || local player) then {[nil,'CLTFNCM_UAV_RETRIEVEMODULE',_this] Spawn HandlePVF};
+ };
+ };
+};
+
+//--- Choose the module extraction team.
+_wteam = [];
+_eteam = [];
+//--- Vanilla.
+if (WF_A2_Vanilla) then {
+ _wteam = ['FR_Miles','FR_OHara','FR_Rodriguez','FR_Sykes'];
+ _eteam = ['RUS_Soldier_TL','RUS_Soldier_GL','RUS_Soldier2','RUS_Soldier2'];
+} else {
+ //--- Combined Ops.
+ if (WF_A2_CombinedOps) then {
+ if (WF_Camo) then {
+ if (random 100 > 50) then {
+ _wteam = ['FR_Miles','FR_OHara','FR_Rodriguez','FR_Sykes'];
+ } else {
+ if (paramDLCBAF) then {
+ _wteam = ['BAF_Soldier_SL_W','BAF_Soldier_W','BAF_Soldier_W','BAF_Soldier_Medic_W'];
+ } else {
+ _wteam = ['CZ_Special_Forces_TL_DES_EP1','CZ_Special_Forces_DES_EP1','CZ_Special_Forces_DES_EP1','CZ_Special_Forces_GL_DES_EP1'];
+ };
+ };
+ _eteam = ['RUS_Soldier_TL','RUS_Soldier_GL','RUS_Soldier2','RUS_Soldier2'];
+ } else {
+ if (random 100 > 50) then {
+ if (paramDLCBAF && random 100 > 50) then {
+ _wteam = ['BAF_Soldier_SL_DDPM','BAF_Soldier_DDPM','BAF_Soldier_DDPM','BAF_Soldier_Medic_DDPM'];
+ } else {
+ _wteam = ['CZ_Special_Forces_TL_DES_EP1','CZ_Special_Forces_DES_EP1','CZ_Special_Forces_DES_EP1','CZ_Special_Forces_GL_DES_EP1'];
+ };
+ _eteam = ['RUS_Soldier_TL','RUS_Soldier_GL','RUS_Soldier2','RUS_Soldier2'];
+ } else {
+ if (random 100 > 50) then {
+ _wteam = ['GER_Soldier_TL_EP1','GER_Soldier_EP1','GER_Soldier_EP1','GER_Soldier_Medic_EP1'];
+ } else {
+ _wteam = ['US_Delta_Force_TL_EP1','US_Delta_Force_EP1','US_Delta_Force_EP1','US_Delta_Force_Medic_EP1'];
+ };
+ _eteam = ['TK_Special_Forces_TL_EP1','TK_Special_Forces_EP1','TK_Special_Forces_EP1','TK_Special_Forces_MG_EP1'];
+ };
+ };
+ } else {
+ //--- Arowwhead.
+ if (random 100 > 50) then {
+ if (paramDLCBAF && random 100 > 50) then {
+ _wteam = ['BAF_Soldier_SL_DDPM','BAF_Soldier_DDPM','BAF_Soldier_DDPM','BAF_Soldier_Medic_DDPM'];
+ } else {
+ _wteam = ['GER_Soldier_TL_EP1','GER_Soldier_EP1','GER_Soldier_EP1','GER_Soldier_Medic_EP1'];
+ };
+ _eteam = ['RUS_Soldier_TL','RUS_Soldier_GL','RUS_Soldier2','RUS_Soldier2'];
+ } else {
+ if (random 100 > 50) then {
+ _wteam = ['CZ_Special_Forces_TL_DES_EP1','CZ_Special_Forces_DES_EP1','CZ_Special_Forces_DES_EP1','CZ_Special_Forces_GL_DES_EP1'];
+ } else {
+ _wteam = ['US_Delta_Force_TL_EP1','US_Delta_Force_EP1','US_Delta_Force_EP1','US_Delta_Force_Medic_EP1'];
+ };
+ _eteam = ['TK_Special_Forces_TL_EP1','TK_Special_Forces_EP1','TK_Special_Forces_EP1','TK_Special_Forces_MG_EP1'];
+ };
+ };
+};
+
+//--- Handle the 'Middle part'.
+_end = false;
+_wteamrunning = objNull;
+_eteamrunning = objNull;
+_wteamname = "";
+_eteamname = "";
+_waitFor = 0;
+_wspos = [];
+_espos = [];
+_wcomplete = false;
+_ecomplete = false;
+_completeList = ['WellDoneOut','GoodJobOut'];
+_completeListTr = ['Well done, out.','Good job, out.'];
+while {!_end} do {
+ sleep 5;
+
+ if (isNull _uav) exitWith {};
+
+ //--- Todo, player radio HQ for extraction team.
+ _nearUav = _uav nearEntities 50;
+
+ _west = west countSide _nearUav;
+ _east = east countSide _nearUav;
+ _resistance = resistance countSide _nearUav;
+
+ //--- Team checkups (west).
+ if !(isNull _wteamrunning) then {
+ if (count ((units _wteamrunning) Call GetLiveUnits) == 0) then {
+ if (_waitFor <= 0) then {
+ ['ExtractionTeamCancel',_wteamname,West] Spawn SideMessage;
+ _wteamrunning = objNull;
+ _waitFor = 60;
+ };
+ } else {
+ if (_waitFor < -200) then {
+ _waitFor = -1;
+ (units _wteamrunning) commandMove (getPos _uav);
+ };
+ if (((leader _wteamrunning) distance _uav) < 50 && !_ecomplete && !_wcomplete) then {
+ _waitFor = 70;
+ _wcomplete = true;
+
+ _uav setVariable ['side', West, true];
+
+ _wteamrunning setCombatMode "RED";
+ _wteamrunning setBehaviour "COMBAT";
+ };
+ };
+ };
+
+ //--- Team checkups (east).
+ if !(isNull _eteamrunning) then {
+ if (count ((units _eteamrunning) Call GetLiveUnits) == 0) then {
+ if (_waitFor <= 0) then {
+ ['ExtractionTeamCancel',_wteamname,East] Spawn SideMessage;
+ _eteamrunning = objNull;
+ _waitFor = 60;
+ };
+ } else {
+ if (_waitFor < -200) then {
+ _waitFor = -1;
+ (units _eteamrunning) commandMove (getPos _uav);
+ };
+ if (((leader _eteamrunning) distance _uav) < 50 && !_wcomplete && !_ecomplete) then {
+ _waitFor = 70;
+ _ecomplete = true;
+
+ _uav setVariable ['side', East, true];
+
+ _eteamrunning setCombatMode "RED";
+ _eteamrunning setBehaviour "COMBAT";
+ };
+ };
+
+ };
+
+ if (_resistance == 0 && _waitFor <= 0) then {
+ if (_west > 0 && isNull(_wteamrunning)) then {
+ //--- Warn the side that the extraction team is coming.
+ _wteamname = ['Reaper','Fatman','Anvil'] select (round(random 2));
+ ['ExtractionTeam',_wteamname,West] Spawn SideMessage;
+
+ //--- Get a spawn position for the team.
+ _pos = [];
+ _attempts = 0;
+ _size = _markerSize;
+ while {true} do {
+ sleep 0.05;
+ _pos = [_randomPos, _size] Call GetSafePlace;
+
+ _near = _pos nearEntities [['Man','Car','Motorcycle','Ship','Air','Tank','StaticWeapon'],_markerSize/5];
+
+ if (east countSide _near == 0 && resistance countSide _near == 0) exitWith {};
+ _attempts = _attempts + 1;
+
+ if (_attempts > 20) then {
+ _attempts = 0;
+ _size = _size + (_markerSize/5);
+ };
+ };
+ _wspos = _pos;
+ _wteamrunning = createGroup west;
+
+ {
+ _unit = [_x,_wteamrunning,_pos,west] Call CreateMan;
+ } forEach _wteam;
+
+ (units _wteamrunning) commandMove (getPos _uav);
+ };
+ if (_east > 0 && isNull(_eteamrunning)) then {
+ //--- Warn the side that the extraction team is coming.
+ _eteamname = ['Frostbite','Sabre','Hammer'] select (round(random 2));
+ ['ExtractionTeam',_eteamname,East] Spawn SideMessage;
+
+ //--- Get a spawn position for the team.
+ _pos = [];
+ _size = _markerSize;
+ while {true} do {
+ sleep 0.05;
+ _pos = [_randomPos, _size] Call GetSafePlace;
+
+ _near = _pos nearEntities [['Man','Car','Motorcycle','Ship','Air','Tank','StaticWeapon'],_markerSize/5];
+
+ if (west countSide _near == 0 && resistance countSide _near == 0) exitWith {};
+ _attempts = _attempts + 1;
+
+ if (_attempts > 20) then {
+ _attempts = 0;
+ _size = _size + (_markerSize/5);
+ };
+ };
+ _espos = _pos;
+ _eteamrunning = createGroup east;
+
+ {
+ _unit = [_x,_eteamrunning,_pos,east] Call CreateMan;
+ } forEach _eteam;
+
+ (units _eteamrunning) commandMove (getPos _uav);
+ };
+ };
+
+ //--- Mission ends (west).
+ if (_wcomplete && _waitFor <= 0) then {
+ //--- if the team is dead, then we're not done yet.
+ if (count ((units _wteamrunning) Call GetLiveUnits) > 0) then {
+ _end = true;
+ _ran = round(random (count(_completeList)-1));
+ ['MMissionComplete',_completeListTr select _ran,West,_completeList select _ran] Spawn SideMessage;
+ ['MMissionFailed','',East] Spawn SideMessage;
+
+ _wteamrunning setCombatMode "YELLOW";
+ _wteamrunning setBehaviour "AWARE";
+ (units _wteamrunning) commandMove _wspos;
+ } else {
+ _wcomplete = false;
+ };
+ };
+ //--- Missions ends (east)
+ if (_ecomplete && _waitFor <= 0) then {
+ //--- if the team is dead, then we're not done yet.
+ if (count ((units _eteamrunning) Call GetLiveUnits) > 0) then {
+ _end = true;
+ _ran = round(random (count(_completeList)-1));
+ ['MMissionComplete',_completeListTr select _ran,East,_completeList select _ran] Spawn SideMessage;
+ ['MMissionFailed','',West] Spawn SideMessage;
+
+ _eteamrunning setCombatMode "YELLOW";
+ _eteamrunning setBehaviour "AWARE";
+ (units _eteamrunning) commandMove _espos;
+ } else {
+ _ecomplete = false;
+ };
+ };
+
+ _waitFor = _waitFor - 5;
+};
+
+//--- Extraction teams removal (West).
+if ({alive _x} count (units _wteamrunning) > 0) then {
+ //--- West.
+ [_wteamrunning,_wspos] Spawn {
+ Private ['_startPos','_team'];
+ _team = _this select 0;
+ _startPos = _this select 1;
+
+ //--- Relative Infantry wait time.
+ sleep (((((leader _team) distance _startPos)/(14*1000))*3600));
+
+ //--- Remove vehicles.
+ {if !(_x in trashQueu) then {deleteVehicle _x}} forEach (units _team);
+
+ //--- Group hasn't been removed yet.
+ if !(isNull _team) then {deleteGroup _team};
+ };
+};
+
+//--- Extraction teams removal (East).
+if ({alive _x} count (units _eteamrunning) > 0) then {
+ //--- East.
+ [_eteamrunning,_espos] Spawn {
+ Private ['_startPos','_team'];
+ _team = _this select 0;
+ _startPos = _this select 1;
+
+ //--- Relative Infantry wait time.
+ sleep (((((leader _team) distance _startPos)/(14*1000))*3600));
+
+ //--- Remove vehicles.
+ {if !(_x in trashQueu) then {deleteVehicle _x}} forEach (units _team);
+
+ //--- Group hasn't been removed yet.
+ if !(isNull _team) then {deleteGroup _team};
+ };
+};
+
+//--- Kill the spawned thread if it still runs.
+if !(scriptDone _jipHandler) then {terminate _jipHandler};
+if !(scriptDone _spawnUnits) then {terminate _spawnUnits};
+
+//--- Tell the patrolling units (if there's any, to go away and dissapear).
+if (({alive _x} count _units) > 0) then {
+ //--- Clean up.
+ [_units, _vehicles, _team, [[(_randomPos select 0)+random(_markerSize)-random(_markerSize),(_randomPos select 1)+random(_markerSize)-random(_markerSize)], 250] Call GetSafePlace] Spawn {
+ Private ['_pos','_team','_units','_vehicles'];
+ _units = _this select 0;
+ _vehicles = _this select 1;
+ _team = _this select 2;
+ _pos = _this select 3;
+
+ //--- Move.
+ (_units) commandMove _pos;
+
+ //--- Relative Infantry wait time.
+ sleep (((((leader _team) distance _pos)/(14*1000))*3600));
+
+ //--- Remove vehicles.
+ {if !(_x in trashQueu) then {if (isPlayer (driver _x)) then {emptyQueu = emptyQueu + [_x]} else {deleteVehicle _x}}} forEach _vehicles;
+ {if !(_x in trashQueu) then {deleteVehicle _x}} forEach _units;
+
+ //--- Group hasn't been removed yet.
+ if !(isNull _grp) then {deleteGroup _grp};
+ };
+};
+
+//--- Lift the ignore rule on the uav (garbage protection).
+if !(WF_A2_Vanilla) then {ignoreQueu = ignoreQueu - [_uav]};
+
+//--- Remove crates if we've generated any.
+_craters = nearestObjects [_randomPos, ['CraterLong'], 250];
+{deleteVehicle _x} forEach _craters;
+if !(isNull _uav) then {deleteVehicle _uav};
+
+//--- Give the 'winning' side an award.
+_winner = if (_ecomplete) then {east} else {west};
+WFBE_LocalizeMessage = [_winner,'CLTFNCLOCALIZEMESSAGE',['SecondaryAward','$',1000]];
+publicVariable 'WFBE_LocalizeMessage';
+if (isHostedServer) then {[_winner,'CLTFNCLOCALIZEMESSAGE',['SecondaryAward','$',1000]] Spawn HandlePVF};
+
+//--- Wait for the client to end up his sync.
+sleep 35;
+
+//--- Free the mission.
+['_WFBE_M_RUNNINGMISSIONS_WEST',('_WFBE_M_RUNNINGMISSIONS_WEST' Call GetNamespace) - 1, true] Call SetNamespace;
+['_WFBE_M_RUNNINGMISSIONS_EAST',('_WFBE_M_RUNNINGMISSIONS_EAST' Call GetNamespace) - 1, true] Call SetNamespace; \ No newline at end of file
diff --git a/Server/Module/NEURO/NEURO.sqf b/Server/Module/NEURO/NEURO.sqf
new file mode 100644
index 0000000..53f7ad2
--- /dev/null
+++ b/Server/Module/NEURO/NEURO.sqf
@@ -0,0 +1,240 @@
+/*
+ * Neuro Taxi System by Benny.
+ * Use the missionNamspace to set a condition for boarding the vehicle (NEURO_TAXI_CONDITION), _x define the vehicle.
+ * i.e: missionNamespace setVariable["NEURO_TAXI_CONDITION", "isNil {_x getVariable 'WFBE_Taxi_Prohib'}"];
+ */
+
+NEURO_BE_ClearVehiclePositions = {
+ {
+ if (!alive _x || _x distance _this > 900) then {unassignVehicle _x};
+ } forEach (assignedCargo _this);
+
+ {
+ if !(isNull _x) then {if (!alive _x || _x distance _this > 900) then {unassignVehicle _x}};
+ } forEach [assignedDriver _this, assignedGunner _this, assignedCommander _this];
+};
+
+NEURO_BE_GetVehicleEmptiness = {
+ Private ["_cargo","_commander","_driver","_gunner","_hasCommander","_hasDriver","_hasGunner","_isFull","_isEmpty","_vehicleCargo"];
+ //--- Update the ETAT.
+ (_this) Call NEURO_BE_ClearVehiclePositions;
+
+ _driver = _this emptyPositions "driver";
+ _gunner = _this emptyPositions "gunner";
+ _commander = _this emptyPositions "commander";
+ _cargo = _this emptyPositions "cargo";
+
+ _hasDriver = false;
+ _hasGunner = false;
+ _hasCommander = false;
+ _vehicleCargo = count (assignedCargo _this);
+ if !(isNull(assignedDriver _this)) then {_driver = 0;_hasDriver = true;};
+ if !(isNull(assignedGunner _this)) then {_gunner = 0;_hasGunner = true;};
+ if !(isNull(assignedCommander _this)) then {_commander = 0;_hasCommander = true;};
+
+ _cargo = abs (_cargo - _vehicleCargo);
+
+ _isFull = if (_driver == 0 && _gunner == 0 && _commander == 0 && _cargo == 0) then {true} else {false};
+ _isEmpty = if (!_hasDriver && !_hasGunner && !_hasCommander) then {true} else {false};
+
+ [_driver,_gunner,_commander,_cargo,_isFull,_isEmpty]
+};
+
+NEURO_BE_GetNonAssignedUnits = {
+ Private ["_list"];
+ _list = [];
+
+ {
+ if (isNull(assignedVehicle _x)) then {_list = _list + [_x]};
+ } forEach _this;
+
+ _list
+};
+
+NEURO_BE_GetSuitableVehicles = {
+ Private ["_list","_nearest","_process","_side"];
+ _nearest = _this select 0;
+ _side = _this select 1;
+
+ _list = [];
+ {
+ if (canMove _x && fuel _x > 0.2 && (side _x) in [civilian, _side]) then {
+ _process = true;
+ if !(isNull(driver _x)) then {if (!local(driver _x) || (side driver _x) != _side) then {_process = false}};
+ if (!(isNull(assignedDriver _x)) && _process) then {if (!local(assignedDriver _x) || (side assignedDriver _x) != _side) then {_process = false}};
+
+ if (_process) then {
+ if (Call Compile (missionNamespace getVariable 'NEURO_TAXI_CONDITION')) then {
+ _list = _list + [_x];
+ };
+ };
+
+ };
+ } forEach _nearest;
+
+ _list
+};
+
+NEURO_BE_GetGroupWPDestination = {
+ Private ["_destination"];
+ _destination = [0,0,0];
+
+ if (isNull _this) exitWith {_destination};
+
+ if (count waypoints _this > 0) then {
+ _destination = waypointPosition [_this, currentWaypoint _this];
+ };
+
+ _destination
+};
+
+NEURO_BE_GetVehicleZOffset = {
+ (getPos _this) select 2
+};
+
+NEURO_BE_HandleArrivalCargo = {
+ Private ["_vehicle"];
+ _vehicle = vehicle _this;
+
+ //--- Paradrop or unload.
+ if ((_vehicle) Call NEURO_BE_GetVehicleZOffset > 25) then {
+ {
+ if !(surfaceIsWater(getPos _vehicle)) then {
+ if (alive _x && _vehicle == vehicle _x && local _x) then {
+ unassignVehicle _x;
+ [_x] orderGetIn false;
+ _x action ["EJECT", _vehicle];
+ sleep 1.2;
+ };
+ } else {
+ unassignVehicle _x;
+ [_x] orderGetIn false;
+ };
+ } forEach (assignedCargo _vehicle);
+ } else {
+ {
+ if (alive _x && _vehicle == vehicle _x && local _x) then {
+ unassignVehicle _x;
+ [_x] orderGetIn false;
+ sleep 0.4;
+ };
+ } forEach (assignedCargo _vehicle);
+ };
+};
+
+NEURO_BE_UpdateTeamDestination = {
+ Private ["_assignedVehicle","_destinationDriver","_forceOut","_group","_groupDestination"];
+ _group = _this;
+ _forceOut = [];
+
+ _groupDestination = (_group) Call NEURO_BE_GetGroupWPDestination;
+
+ {
+ _assignedVehicle = assignedVehicle _x;
+
+ if !(isNull _assignedVehicle) then {
+ if (isNull(driver _assignedVehicle) && isNull(assignedDriver _assignedVehicle) || isPlayer(_assignedVehicle)) then {
+ _forceOut = _forceOut + [_x];
+ } else {
+ _destinationDriver = (group (driver _assignedVehicle)) Call NEURO_BE_GetGroupWPDestination;
+ if (_groupDestination distance _destinationDriver > 600) then {
+ if (_x in (assignedCargo _assignedVehicle)) then {_forceOut = _forceOut + [_x]};
+ };
+ };
+ };
+ } forEach (units _group);
+
+ if (count _forceOut > 0) then {
+ {unassignVehicle _x} forEach _forceOut;
+ _forceOut orderGetIn false;
+ };
+};
+
+NEURO_BE_AssignToVehicle = {
+ Private ["_assignedUnits","_cargoEmptiness","_emptiness","_group","_isEmpty","_isFull","_isPlayerVehicle","_near","_position","_process","_range","_unit","_units","_vehicle"];
+ _group = _this select 0;
+ _position = _this select 1;
+ _range = 500;
+
+ _groupUnits = units _group;
+ _units = (_groupUnits) Call NEURO_BE_GetNonAssignedUnits;
+ if (count _units == 0) exitWith {};
+
+ _near = _position nearEntities [["Motorcycle","Car","Tank","Helicopter"], _range];
+ _near = [_near, side _group] Call NEURO_BE_GetSuitableVehicles;
+ if (count _near == 0) exitWith {};
+
+ _assignedUnits = [];
+
+ {
+ _vehicle = _x;
+ _emptiness = (_vehicle) Call NEURO_BE_GetVehicleEmptiness;
+ _cargoEmptiness = _emptiness select 3;
+
+ _isFull = if (_emptiness select 4) then {true} else {false};
+ _isEmpty = if (_emptiness select 5) then {true} else {false};
+ _isPlayerVehicle = if (isPlayer(_vehicle)) then {true} else {false};
+
+ //--- Vehicle is not full.
+ if (!_isFull && !_isPlayerVehicle) then {
+ //--- Driver, Gunner, Commander.
+ if (_isEmpty || (effectiveCommander _vehicle) in _groupUnits) then {
+ //--- Driver
+ if ((_emptiness select 0) > 0) then {
+ (_units select 0) assignAsDriver _vehicle;
+ _assignedUnits = _assignedUnits + [_units select 0];
+ _units = _units - [_units select 0];
+ };
+
+ //--- Gunner.
+ if ((_emptiness select 1) > 0 && count _units > 0) then {
+ (_units select 0) assignAsGunner _vehicle;
+ _assignedUnits = _assignedUnits + [_units select 0];
+ _units = _units - [_units select 0];
+ };
+
+ //--- Commander.
+ if ((_emptiness select 2) > 0 && count _units > 0) then {
+ (_units select 0) assignAsCommander _vehicle;
+ _assignedUnits = _assignedUnits + [_units select 0];
+ _units = _units - [_units select 0];
+ };
+ };
+
+ //--- Cargo.
+ if (_cargoEmptiness > 0 && count _units > 0) then {
+ _count = count _units;
+
+ //--- Make sure that the vehicle is going around the squad's destination.
+ _process = true;
+ if !(isNull(driver _vehicle)) then {
+ _driverMoveTo = (group driver _vehicle) Call NEURO_BE_GetGroupWPDestination;
+ _distance = _driverMoveTo distance ((_group) Call NEURO_BE_GetGroupWPDestination);
+
+ if (_distance > 600 || (_driverMoveTo select 0 == 0 && _driverMoveTo select 1 == 0)) then {_process = false};
+ };
+
+ //--- All condition are met, the ai may be able to board the vehicle.
+ if (_process) then {
+ for '_i' from 0 to _count-1 do {
+ _unit = _units select _i;
+
+ if (_unit distance _vehicle < 500) then {
+ _unit assignAsCargo _vehicle;
+ _assignedUnits = _assignedUnits + [_unit];
+ _cargoEmptiness = _cargoEmptiness - 1;
+ };
+
+ if (_cargoEmptiness <= 0) exitWith {};
+ };
+ };
+ };
+
+ _units = _units - _assignedUnits;
+ };
+
+ if (count _units == 0) exitWith {};
+ } forEach _near;
+
+ if (count _assignedUnits > 0) then {_assignedUnits orderGetIn true};
+}; \ No newline at end of file
diff --git a/Server/Module/UPSMON/Init_UPSMON.sqf b/Server/Module/UPSMON/Init_UPSMON.sqf
new file mode 100644
index 0000000..b1929a8
--- /dev/null
+++ b/Server/Module/UPSMON/Init_UPSMON.sqf
@@ -0,0 +1,576 @@
+// =========================================================================================================
+// UPSMON - Urban Patrol Script Mon
+// Version: 5.1.0
+// Author: Monsada (chs.monsada@gmail.com)
+//
+// Wiki: http://dev-heaven.net/projects/upsmon/wiki
+// Forum: http://forums.bistudio.com/showthread.php?t=91696
+// Share your missions with upsmon: http://dev-heaven.net/projects/upsmon/boards/86
+// ---------------------------------------------------------------------------------------------------------
+// Based on Urban Patrol Script
+// Version: 2.0.3
+// Author: Kronzky (www.kronzky.info / kronzky@gmail.com)
+// ---------------------------------------------------------------------------------------------------------
+// Some little fixes: !Rafalsky (v5.0.8 - 5.0.9)
+// ---------------------------------------------------------------------------------------------------------
+
+//Adding eventhandlers
+ "KRON_UPS_EAST_SURRENDED" addPublicVariableEventHandler { if (_this select 1) then { nul=[east] execvm "Server\Module\UPSMON\UPSMON\MON_surrended.sqf";};};
+ "KRON_UPS_WEST_SURRENDED" addPublicVariableEventHandler { if (_this select 1) then { nul=[west] execvm "Server\Module\UPSMON\UPSMON\MON_surrended.sqf";};};
+ "KRON_UPS_GUER_SURRENDED" addPublicVariableEventHandler { if (_this select 1) then { nul=[resistance] execvm "Server\Module\UPSMON\UPSMON\MON_surrended.sqf";};};
+ "MON_LOCAL_EXEC" addPublicVariableEventHandler { if (local ((_this select 1)select 0)) then {
+ call ( compile format[(_this select 1)select 1,(_this select 1)select 0] );
+ };
+ };
+
+
+if (!isServer) exitWith {};
+
+//---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
+// These Variables should be checked and set as required, to make the mission runs properly.
+//---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
+
+// ACE Wounds System for AI (set TRUE to On, set FALSE to Off) !
+ace_sys_wounds_noai = false; // set it as required
+
+//1=Enable or 0=disable debug. In debug could see a mark positioning de leader and another mark of the destination of movement, very useful for editing mission
+KRON_UPS_Debug = 0;
+
+//1=Enable or 0=disable. In game display global chat info about who just killed a civilian.
+//numbers of Civilians killed by players could be read from array 'KILLED_CIV_COUNTER' -> [Total,by West,by East,by Res]
+R_WHO_IS_CIV_KILLER_INFO = 1;
+
+
+// if you are spotted by AI group, how close the other AI group have to be to You , to be informed about your present position. over this, will lose target
+KRON_UPS_sharedist = 600;
+
+// If enabled IA communication between them with radio defined sharedist distance, 0/2
+// (must be set to 2 in order to use reinforcement !R)
+KRON_UPS_comradio = 2;
+
+//Sides that are enemies of resistance
+KRON_UPS_Res_enemy = [east];
+
+// Distance from destination for searching vehicles. (Search area is about 200m),
+// If your destination point is further than KRON_UPS_searchVehicledist, AI will try to find a vehicle to go there.
+KRON_UPS_searchVehicledist = 600; // 700, 900
+
+//Enables or disables AI to use static weapons
+KRON_UPS_useStatics = true;
+
+//Enables or disables AI to put mines if armoured enemies near
+KRON_UPS_useMines = true;
+
+//------------------------------------------------------------------------------------------------------------------------------
+// These Variables can be changed if needed but it is not necessary.
+//------------------------------------------------------------------------------------------------------------------------------
+
+//% of chanse to use smoke by team members when someone wounded or killed in the group in %(default 13 & 35).
+// set both to 0 -> to switch off this function
+R_USE_SMOKE_wounded = 13;
+R_USE_SMOKE_killed = 35;
+
+//Height that heli will fly this input will be randomised in a 10%
+KRON_UPS_flyInHeight = 80;
+
+//Percentage of units to surrender.
+KRON_UPS_EAST_SURRENDER = 0; // 10
+KRON_UPS_WEST_SURRENDER = 0; // 10
+KRON_UPS_GUER_SURRENDER = 0; // 10
+
+// knowsAbout 1.03 , 1.49 to add this enemy to "target list" (1-4) the higher number the less detect ability (original in 5.0.7 was 0.5)
+// it does not mean the AI will not shoot at you. This mean what must be knowsAbout you to AI start asking by radio for help other groups in KRON_UPS_sharedist from you
+R_knowsAboutEnemy = 1.49;
+
+// units will react (change the beahaviour) when dead bodies found
+R_deadBodiesReact = false; // true OR flase
+
+// ---------------------------------------------------------------------------------------------------------------------
+// Better do not change these variables if you aren't sure !R
+// ---------------------------------------------------------------------------------------------------------------------
+
+//Efective distance for doing perfect ambush (max distance is this x2)
+KRON_UPS_ambushdist = 70;
+
+//Max distance to target for doing para-drop, will be randomised between 0 and 100% of this value.
+KRON_UPS_paradropdist = 250;
+
+//Frequency for doing calculations for each squad.
+KRON_UPS_Cycle = 10; //org 20
+
+//Time that lider wait until doing another movement, this time reduced dynamically under fire, and on new targets
+KRON_UPS_react = 60;
+
+//Min time to wait for doing another reaction
+KRON_UPS_minreact = 20; // org 30
+
+//Max waiting is the maximum time patrol groups will wait when arrived to target for doing another target.
+KRON_UPS_maxwaiting = 30;
+
+// how long AI units should be in alert mode after initially spotting an enemy
+KRON_UPS_alerttime = 90;
+
+// how far opfors should move away if they're under attack
+KRON_UPS_safedist = 250; //org 300
+
+// how close unit has to be to target to generate a new one target or to enter stealth mode
+KRON_UPS_closeenough = 300; //org 300
+
+//Enable it to send reinforcements, better done it in a trigger inside your mission.
+KRON_UPS_reinforcement = false;
+
+//Artillery support, better control if set in trigger
+KRON_UPS_ARTILLERY_EAST_FIRE = false; //set to true for doing east to fire
+KRON_UPS_ARTILLERY_WEST_FIRE = false; //set to true for doing west to fire
+KRON_UPS_ARTILLERY_GUER_FIRE = false; //set to true for doing resistance to fire
+
+//---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
+// Do not touch these variables !!!! !R
+//---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
+ R_GOTHIT_ARRAY =[0];
+ AcePresent = isClass(configFile/"CfgPatches"/"ace_main");
+ UPSMON_Version = "UPSMON 5.1.0 beta1";
+ KILLED_CIV_COUNTER = [0,0,0,0,0];
+ KRON_UPS_flankAngle = 45; //Angulo de flanqueo
+ KRON_UPS_INIT = 0; //Variable que indica que ha sido inicializado
+ KRON_UPS_EAST_SURRENDED = false;
+ KRON_UPS_WEST_SURRENDED = false;
+ KRON_UPS_GUER_SURRENDED = false;
+ KRON_AllWest=[]; //All west AI
+ KRON_AllEast=[]; //All east AI
+ KRON_AllRes=[]; //All resistance AI
+ KRON_UPS_East_enemies = [];
+ KRON_UPS_West_enemies = [];
+ KRON_UPS_Guer_enemies = [];
+ KRON_UPS_East_friends = [];
+ KRON_UPS_West_friends = [];
+ KRON_UPS_Guer_friends = [];
+ KRON_targets0 =[];//objetivos west
+ KRON_targets1 =[];//objetivos east
+ KRON_targets2 =[];//resistence
+ KRON_targetsPos =[];//Posiciones de destino actuales.
+ KRON_NPCs = []; //Lideres de los grupos actuales
+ KRON_UPS_Instances=0;
+ KRON_UPS_Total=0;
+ KRON_UPS_Exited=0;
+ KRON_UPS_East_Total = 0;
+ KRON_UPS_West_Total = 0;
+ KRON_UPS_Guer_Total = 0;
+ KRON_UPS_ARTILLERY_UNITS = [];
+ KRON_UPS_ARTILLERY_WEST_TARGET = objnull;
+ KRON_UPS_ARTILLERY_EAST_TARGET = objnull;
+ KRON_UPS_ARTILLERY_GUER_TARGET = objnull;
+ KRON_UPS_TEMPLATES = [];
+ KRON_UPS_MG_WEAPONS = ["MG36","M249","M240","MK_48","PK","PKm","Pecheneg","M249 Para","M249 Para M145","M240G M145","M60"];
+
+
+//----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
+
+ // ***************************************** SERVER INITIALIZATION *****************************************
+ if (isNil("KRON_UPS_INIT") || KRON_UPS_INIT == 0) then {
+
+ //Init library function, Required Version: 5.0 of mon_functions
+ call compile preprocessFileLineNumbers "Server\Module\UPSMON\UPSMON\common\MON_functions.sqf";
+
+ //init !R functions
+ call compile preprocessFileLineNumbers "Server\Module\UPSMON\UPSMON\!R\R_functions.sqf";
+
+ if (isNil "RE") then {[] execVM "\ca\Modules\MP\data\scripts\MPframework.sqf"};
+
+ //scripts initialization
+ UPSMON = compile preprocessFile "Server\Module\UPSMON\UPSMON.sqf";
+ UPSMON_surrended = compile preprocessFile "Server\Module\UPSMON\UPSMON\MON_surrended.sqf";
+
+ // declaracin de variables privadas
+ private["_obj","_trg","_l","_pos"];
+
+ // global functions
+ KRON_randomPos = {private["_cx","_cy","_rx","_ry","_cd","_sd","_ad","_tx","_ty","_xout","_yout"];_cx=_this select 0; _cy=_this select 1; _rx=_this select 2; _ry=_this select 3; _cd=_this select 4; _sd=_this select 5; _ad=_this select 6; _tx=random (_rx*2)-_rx; _ty=random (_ry*2)-_ry; _xout=if (_ad!=0) then {_cx+ (_cd*_tx - _sd*_ty)} else {_cx+_tx}; _yout=if (_ad!=0) then {_cy+ (_sd*_tx + _cd*_ty)} else {_cy+_ty}; [_xout,_yout]};
+ KRON_PosInfo = {private["_pos","_lst","_bld","_bldpos"];_pos=_this select 0; _lst=_pos nearObjects ["House",12]; if (count _lst==0) then {_bld=0;_bldpos=0} else {_bld=_lst select 0; _bldpos=[_bld] call KRON_BldPos}; [_bld,_bldpos]};
+ KRON_PosInfo3 = {private["_pos","_lst","_bld","_bldpos"];_pos=_this select 0; _lst= nearestObjects [_pos, [], 3];
+ if (count _lst==0) then {_bld=objnull;_bldpos=0} else {_bld = nearestbuilding (_lst select 0);
+ _bldpos=[_bld] call KRON_BldPos2}; [_bld,_bldpos]};
+ KRON_BldPos = {private ["_bld","_bldpos","_posZ","_maxZ"];_bld=_this select 0;_maxZ=0;_bi=0;_bldpos=0;while {_bi>=0} do {if (((_bld BuildingPos _bi) select 0)==0) then {_bi=-99} else {_bz=((_bld BuildingPos _bi) select 2); if (((_bz)>4) && ((_bz>_maxZ) || ((_bz==_maxZ) && (random 1>.8)))) then {_maxZ=_bz; _bldpos=_bi}};_bi=_bi+1};_bldpos};
+ KRON_BldPos2 = {private ["_bld","_bldpos"];
+ _bld=_this select 0; _bldpos = 1;
+ while {format ["%1", _bld buildingPos _bldpos] != "[0,0,0]"} do {_bldpos = _bldpos + 1;};
+ _bldpos = _bldpos - 1; _bldpos;};
+
+
+ KRON_getDirPos = {private["_a","_b","_from","_to","_return"]; _from = _this select 0; _to = _this select 1; _return = 0; _a = ((_to select 0) - (_from select 0)); _b = ((_to select 1) - (_from select 1)); if (_a != 0 || _b != 0) then {_return = _a atan2 _b}; if ( _return < 0 ) then { _return = _return + 360 }; _return};
+ KRON_distancePosSqr = {round(((((_this select 0) select 0)-((_this select 1) select 0))^2 + (((_this select 0) select 1)-((_this select 1) select 1))^2)^0.5)};
+ KRON_relPos = {private["_p","_d","_a","_x","_y","_xout","_yout"];_p=_this select 0; _x=_p select 0; _y=_p select 1; _d=_this select 1; _a=_this select 2; _xout=_x + sin(_a)*_d; _yout=_y + cos(_a)*_d;[_xout,_yout,0]};
+ KRON_rotpoint = {private["_cp","_a","_tx","_ty","_cd","_sd","_cx","_cy","_xout","_yout"];_cp=_this select 0; _cx=_cp select 0; _cy=_cp select 1; _a=_this select 1; _cd=cos(_a*-1); _sd=sin(_a*-1); _tx=_this select 2; _ty=_this select 3; _xout=if (_a!=0) then {_cx+ (_cd*_tx - _sd*_ty)} else {_cx+_tx}; _yout=if (_a!=0) then {_cy+ (_sd*_tx + _cd*_ty)} else {_cy+_ty}; [_xout,_yout,0]};
+ KRON_stayInside = {
+ private["_np","_nx","_ny","_cp","_cx","_cy","_rx","_ry","_d","_tp","_tx","_ty","_fx","_fy"];
+ _np=_this select 0; _nx=_np select 0; _ny=_np select 1;
+ _cp=_this select 1; _cx=_cp select 0; _cy=_cp select 1;
+ _rx=_this select 2; _ry=_this select 3; _d=_this select 4;
+ _tp = [_cp,_d,(_nx-_cx),(_ny-_cy)] call KRON_rotpoint;
+ _tx = _tp select 0; _fx=_tx;
+ _ty = _tp select 1; _fy=_ty;
+ if (_tx<(_cx-_rx)) then {_fx=_cx-_rx};
+ if (_tx>(_cx+_rx)) then {_fx=_cx+_rx};
+ if (_ty<(_cy-_ry)) then {_fy=_cy-_ry};
+ if (_ty>(_cy+_ry)) then {_fy=_cy+_ry};
+ if ((_fx!=_tx) || (_fy!=_ty)) then {_np = [_cp,_d*-1,(_fx-_cx),(_fy-_cy)] call KRON_rotpoint};
+ _np;
+ };
+ // Misc
+ KRON_UPSgetArg = {private["_cmd","_arg","_list","_a","_v"]; _cmd=_this select 0; _arg=_this select 1; _list=_this select 2; _a=-1; {_a=_a+1; _v=format["%1",_list select _a]; if (_v==_cmd) then {_arg=(_list select _a+1)}} foreach _list; _arg};
+ KRON_UPSsetArg = {private["_cmd","_arg","_list","_a","_v"];
+ _cmd=_this select 0;
+ _arg=_this select 1;
+ _list=_this select 2;
+ _a=-1;
+ {
+ _a=_a+1;
+ _v= format ["%1", _list select _a];
+ if (_v==_cmd) then {
+ _a=_a+1;
+ _list set [_a,_arg];
+ };
+ } foreach _list;
+ _list};
+ KRON_deleteDead = {private["_u","_s"];_u=_this select 0; _s= _this select 1; _u removeAllEventHandlers "killed"; sleep _s; deletevehicle _u};
+
+
+
+
+
+ // ***********************************************************************************************************
+ // MAIN UPSMON SERVER FUNCTION
+ // ***********************************************************************************************************
+ MON_MAIN_server = {
+
+ private["_obj","_trg","_l","_pos","_countWestSur","_countEastSur","_countResSur","_WestSur","_EastSur","_ResSur","_target","_targets","_targets0","_targets1","_targets2","_npc","_cycle"
+ ,"_arti","_side","_range","_rounds","_area","_maxcadence","_mincadence","_bullet","_fire","_knownpos","_sharedenemy","_enemyside","_timeout"];
+ _cycle = 10; //Time to do a call to commander
+ _arti = objnull;
+ _side = "";
+ _range = 0;
+ _rounds = 0;
+ _area = 0;
+ _maxcadence = 0;
+ _mincadence = 0;
+ _bullet = "";
+ _fire = false;
+ _target = objnull;
+ _knownpos =[0,0,0];
+ _enemyside = [];
+
+ _WestSur = KRON_UPS_WEST_SURRENDED;
+ _EastSur = KRON_UPS_EAST_SURRENDED;
+ _ResSur = KRON_UPS_GUER_SURRENDED;
+
+
+ //Main loop
+ while {true} do
+ {
+ _countWestSur = round ( KRON_UPS_West_Total * KRON_UPS_WEST_SURRENDER / 100);
+ _countEastSur = round ( KRON_UPS_East_Total * KRON_UPS_EAST_SURRENDER / 100);
+ _countResSur = round ( KRON_UPS_Guer_Total * KRON_UPS_GUER_SURRENDER / 100);
+
+ //Checks for WEST surrender
+ if (KRON_UPS_WEST_SURRENDER > 0 && !KRON_UPS_WEST_SURRENDED ) then {
+ {
+ if (!alive _x || !canmove _x) then {KRON_AllWest = KRON_AllWest-[_x]};
+ }foreach KRON_AllWest;
+
+ if ( count KRON_AllWest <= _countWestSur ) then {
+ KRON_UPS_WEST_SURRENDED = true;
+ publicvariable "KRON_AllWest";
+ publicvariable "KRON_UPS_WEST_SURRENDED";
+ };
+ };
+
+ //Checks for EAST surrender
+ if (KRON_UPS_EAST_SURRENDER > 0 && !KRON_UPS_EAST_SURRENDED ) then {
+ {
+ if (!alive _x || !canmove _x) then {KRON_AllEast = KRON_AllEast-[_x]};
+ }foreach KRON_AllEast;
+
+ if ( count KRON_AllEast <= _countEastSur ) then {
+ KRON_UPS_EAST_SURRENDED = true;
+ publicvariable "KRON_AllEast";
+ publicvariable "KRON_UPS_EAST_SURRENDED";
+ };
+ };
+
+ //Checks for RESISTANCE surrender
+ if (KRON_UPS_GUER_SURRENDER > 0 && !KRON_UPS_GUER_SURRENDED ) then {
+ {
+ if (!alive _x || !canmove _x) then {KRON_AllRes = KRON_AllRes-[_x]};
+ }foreach KRON_AllRes;
+
+ if ( count KRON_AllRes <= _countResSur ) then {
+ KRON_UPS_GUER_SURRENDED = true;
+ publicvariable "KRON_AllRes";
+ publicvariable "KRON_UPS_GUER_SURRENDED";
+ };
+ };
+
+ //Exec surrended script
+ if (KRON_UPS_WEST_SURRENDED && !_WestSur ) then {
+ _WestSur = true;
+ [west] spawn UPSMON_surrended;
+ };
+ if (KRON_UPS_EAST_SURRENDED && !_EastSur ) then {
+ _EastSur = true;
+ [east] spawn UPSMON_surrended;
+ };
+ if (KRON_UPS_GUER_SURRENDED && !_ResSur ) then {
+ _ResSur = true;
+ [Resistance] spawn UPSMON_surrended;
+ };
+ sleep 0.5;
+
+ _sharedenemy = 0;
+ _targets0 = [];
+ _targets1 = [];
+ _targets2 = [];
+ {
+ if (!isnull _x && alive _x && !captive _x ) then {
+ _npc = _x;
+ _targets = [];
+
+ switch (side _npc) do {
+ //West targets
+ case west: {
+ _sharedenemy = 0;
+ _enemyside = [east];
+ };
+ //East targets
+ case east: {
+ _sharedenemy = 1;
+ _enemyside = [west];
+ };
+ //Resistance targets
+ case resistance: {
+ _sharedenemy = 2;
+ _enemyside = KRON_UPS_Res_enemy;
+ };
+ };
+
+ if (side _npc in KRON_UPS_Res_enemy) then {
+ _enemyside = _enemyside + [resistance];
+ };
+
+ //Gets known targets on each leader for comunicating enemy position
+ //Has better performance with targetsquery
+ //_targets = _npc nearTargets KRON_UPS_sharedist;
+ _targets = _npc targetsQuery ["","","","",""];
+
+ {
+ //_target = _x select 4; //Neartargets
+ _target = _x select 1; //Targetsquery
+ if ( side _target in _enemyside ) then {
+ // if (KRON_UPS_Debug>0) then {player globalchat format["%1: knows about %2, enemies=%3",_npc getVariable ("UPSMON_grpid"),_npc knowsabout _target, _npc countEnemy _targets ]};
+
+ if (!isnull _target && alive _target && canmove _target && !captive _target && _npc knowsabout _target > R_knowsAboutEnemy
+ && ( _target iskindof "Land" || _target iskindof "Air" || _target iskindof "Ship" )
+ && !( _target iskindof "Animal")
+ && ( _target emptyPositions "Gunner" == 0 && _target emptyPositions "Driver" == 0
+ || (!isnull (gunner _target) && canmove (gunner _target))
+ || (!isnull (driver _target) && canmove (driver _target)))
+ ) then {
+ //Saves last known position
+ //_knownpos = _x select 0; //Neartargets
+ _knownpos = _x select 4;//Targetsquery
+ _target setvariable ["UPSMON_lastknownpos", _knownpos, false];
+ // _npc setVariable ["R_knowsAboutTarget", true, false]; // !R
+
+ call (compile format ["_targets%1 = _targets%1 - [_target]",_sharedenemy]);
+ call (compile format ["_targets%1 = _targets%1 + [_target]",_sharedenemy]);
+ };
+ };
+ sleep 0.01;
+ } foreach _targets;
+ };
+ sleep 0.01;
+ }foreach KRON_NPCs;
+
+ //Share targets
+ KRON_targets0 = _targets0;
+ KRON_targets1 = _targets1;
+ KRON_targets2 = _targets2;
+
+ //Target debug console
+ if (KRON_UPS_Debug>0) then {hintsilent parseText format["%1<br/>--------------------------<br/><t color='#33CC00'>West(A=%2 C=%3 T=%4)</t><br/><t color='#FF0000'>East(A=%5 C=%6 T=%7)</t><br/><t color='#00CCFF'>Res(A=%8 C=%9 T=%10)</t><br/>"
+ ,UPSMON_Version
+ ,KRON_UPS_West_Total, count KRON_AllWest, count KRON_targets0
+ ,KRON_UPS_East_Total, count KRON_AllEast, count KRON_targets1
+ ,KRON_UPS_Guer_Total, count KRON_AllRes, count KRON_targets2 ]};
+ sleep 0.5;
+
+ //Artillery module control
+ {
+ _arti = _x select 0;
+ _rounds = _x select 1;
+ _range = _x select 2;
+ _area = _x select 3;
+ _maxcadence = _x select 4;
+ _mincadence = _x select 5;
+ _bullet = _x select 6;
+ _salvobreak = _x select 7;
+
+ if (isnil{_arti getVariable ("timeout")}) then {
+ _arti setVariable ["timeout", time, false];
+ sleep 0.1;
+ };
+
+ _timeout = _arti getVariable ("timeout");
+
+ if (!isnull (gunner _arti) && canmove (gunner _arti) && (time >= _timeout)) then {
+ _side = side gunner _arti;
+ _fire = call (compile format ["KRON_UPS_ARTILLERY_%1_FIRE",_side]);
+
+
+
+ //If fire enabled gets a known target pos for doing fire if no friendly squads near.
+ if (_fire) then {
+ _target = call (compile format ["KRON_UPS_ARTILLERY_%1_TARGET",_side]);
+ if (isnil "_target" ) then {_target = objnull;};
+
+ switch (_side) do {
+ //West targets
+ case west: {
+ _targets = KRON_targets0;
+ };
+ //East targets
+ case east: {
+ _targets = KRON_targets1;
+ };
+ //Resistance targets
+ case resistance: {
+ _targets = KRON_targets2;
+ };
+ };
+
+ //Check if has a target
+ if (!(_target in _targets ) || isnull _target || !alive _target) then {
+ _target = objnull;
+ {
+ _auxtarget = _x;
+ _targetPos = _auxtarget getvariable ("UPSMON_lastknownpos");
+ if (!isnil "_targetPos") then {
+ //If target in range check no friendly squad near
+ if (alive _auxtarget && !(_auxtarget iskindof "Air") && (round([position _arti,_targetPos] call KRON_distancePosSqr)) <= _range) then {
+ _target = _auxtarget;
+ //Must check if no friendly squad near fire position
+ {
+ if (!isnull _x && _side == side _x) then {
+ if ((round([position _x,_targetPos] call KRON_distancePosSqr)) < (KRON_UPS_safedist * 0.7)) exitwith {_target = objnull;};
+ };
+ } foreach KRON_NPCs;
+ };
+ };
+
+ //If target found exit
+ if (!isnull _target) exitwith {};
+ } foreach _targets;
+ };
+
+ //If target fires artillery
+ if (!isnull _target) then {
+ //Fix current target
+ call (compile format ["KRON_UPS_ARTILLERY_%1_TARGET = _target",_side]);
+ _targetPos = _target getvariable ("UPSMON_lastknownpos");
+ if (!isnil "_targetPos") then {
+
+ _arti removeAllEventHandlers "fired"; sleep 0.01;
+ // chatch the bullet in the air and delete it
+ _arti addeventhandler["fired", {deletevehicle (nearestobject[_this select 0, _this select 4])}];
+ [_arti,_targetPos,_rounds,_area,_maxcadence,_mincadence,_bullet,_salvobreak] spawn MON_artillery_dofire;
+ };
+ };
+ };
+ };
+ sleep 0.5;
+ } foreach KRON_UPS_ARTILLERY_UNITS;
+
+
+ // if (KRON_UPS_Debug>0) then {player globalchat format["Init_upsmon artillery=%1",count KRON_UPS_ARTILLERY_UNITS]};
+ sleep _cycle;
+ };
+ };
+ };
+
+
+// ***********************************************************************************************************
+// INITIALIZATION OF UPSMON
+// ***********************************************************************************************************
+
+ _l = allunits + vehicles;
+ {
+ if ((_x iskindof "AllVehicles") && (side _x != civilian)) then {
+ _s = side _x;
+ switch (_s) do {
+ case west:
+ { KRON_AllWest=KRON_AllWest+[_x]; };
+ case east:
+ { KRON_AllEast=KRON_AllEast+[_x]; };
+ case resistance:
+ { KRON_AllRes=KRON_AllRes+[_x]; };
+ };
+ };
+ } forEach _l;
+ _l = nil;
+
+ if (isNil("KRON_UPS_Debug")) then {KRON_UPS_Debug=0};
+
+ KRON_UPS_East_enemies = KRON_AllWest;
+ KRON_UPS_West_enemies = KRON_AllEast;
+
+ if (east in KRON_UPS_Res_enemy ) then {
+ KRON_UPS_East_enemies = KRON_UPS_East_enemies+KRON_AllRes;
+ KRON_UPS_Guer_enemies = KRON_AllEast;
+ } else {
+ KRON_UPS_East_friends = KRON_UPS_East_friends+KRON_AllRes;
+ KRON_UPS_Guer_friends = KRON_AllEast;
+ };
+
+ if (west in KRON_UPS_Res_enemy ) then {
+ KRON_UPS_West_enemies = KRON_UPS_West_enemies+KRON_AllRes;
+ KRON_UPS_Guer_enemies = KRON_UPS_Guer_enemies+KRON_AllWest;
+ } else {
+ KRON_UPS_West_friends = KRON_UPS_West_friends+KRON_AllRes;
+ KRON_UPS_Guer_friends = KRON_UPS_Guer_friends+KRON_AllWest;
+ };
+
+ KRON_UPS_West_Total = count KRON_AllWest;
+ KRON_UPS_East_Total = count KRON_AllEast;
+ KRON_UPS_Guer_Total = count KRON_AllRes;
+
+ //Initialization done
+ KRON_UPS_INIT=1;
+
+
+ //killciv EH
+ _l = allunits;
+ {
+ if (side _x == civilian) then {
+
+
+ _x AddEventHandler ["firedNear", {nul = _this spawn R_SN_EHFIREDNEAR}];
+ sleep 0.01;
+
+
+ _x AddEventHandler ["killed", {nul = _this spawn R_SN_EHKILLEDCIV}];
+ sleep 0.01;
+ };
+ } forEach _l;
+ _l = nil;
+
+
+
+
+// ---------------------------------------------------------------------------------------------------------
+processInitCommands;
+
+//Executes de main process of server
+[] SPAWN MON_MAIN_server;
+
+diag_log "--------------------------------";
+diag_log (format["UPSMON started"]);
+if(true) exitWith {}; \ No newline at end of file
diff --git a/Server/Module/UPSMON/UPSMON.sqf b/Server/Module/UPSMON/UPSMON.sqf
new file mode 100644
index 0000000..af4860b
--- /dev/null
+++ b/Server/Module/UPSMON/UPSMON.sqf
@@ -0,0 +1,2575 @@
+// =========================================================================================================
+// UPSMON - Urban Patrol Script
+// version 5.1.0 beta 1
+//
+// Author: Monsada (chs.monsada@gmail.com)
+// Comunidad Hispana de Simulacin:
+//
+// Wiki: http://dev-heaven.net/projects/upsmon/wiki
+// Forum: http://forums.bistudio.com/showthread.php?t=91696
+// Share your missions with upsmon: http://dev-heaven.net/projects/upsmon/boards/86
+// ---------------------------------------------------------------------------------------------------------
+// Based on Urban Patrol Script v2.0.3
+// Author: Kronzky (www.kronzky.info / kronzky@gmail.com)
+// ---------------------------------------------------------------------------------------------------------
+// Some little fixes: !Rafalsky (v5.0.8 - 5.1.0)
+// Code improvements: shay_gman(Artillery), Nordin("noveh")
+// ---------------------------------------------------------------------------------------------------------
+
+// Required parameters:
+// unit = Unit to patrol area (1st argument)
+// markername = Name of marker that covers the active area. (2nd argument)
+//
+// Patrol squad samples: (put in the leader's init field)
+// nul=[this,"area0"] execVM "scripts\upsmon.sqf";
+//
+// Defensive squad samples:
+// nul=[this,"area0","nomove"] execVM "scripts\upsmon.sqf";
+//
+// Reinforcement
+// nul=[this,"area0","reinforcement:",1] execVM "scripts\UPSMON.sqf";
+// (in trigger call: KRON_UPS_reinforcement1 = true;
+// (call pos marker mkr1): KRON_UPS_reinforcement1_pos = getMarkerPos "mkr1";
+//
+//
+// Optional parameters: _
+// random = Place unit at random start position.
+// randomdn = Only use random positions on ground level.
+// randomup = Only use random positions at top building positions.
+// min:n/max:n = Create a random number (between min and max) of 'clones'. ("min:",2,"max:",5)
+// init:string = Custom init string for created clones.
+// nomove = Unit will stay or hide in the near buildings until enemy is spotted.
+// nofollow = Unit will only follow an enemy within the marker area.(When fight sometimes can go outside)
+// onroad = Unit will get target destination only on the roads
+// nosmoke = Units will not use smoke when s/o wounded or die.
+// delete:n = Delete dead units after 'n' seconds.
+// nowait = Do not wait at patrol end points.
+// noslow = Keep default behaviour of unit (don't change to "safe" and "limited").
+// noai = Don't use enhanced AI for evasive and flanking maneuvers.
+// trigger = Display a message when no more units are left in sector.
+// empty:n = Consider area empty, even if 'n' units are left.
+// reinforcement = Makes squad as reinforcement, when alarm KRON_UPS_reinforcement==true this squad will go where enemy were.
+// reinforcement:x = Makes squad as reinforcement id, when alarm KRON_UPS_reinforcementx==true this squad will go where enemy were.
+// fortify = makes leader order to take positions on nearly buildings at distance 200 meters, squad fortified moves less than "nomove"
+// aware,combat,stealth,careless defines default behaviour of squad
+// noveh = the group will not search for transport vehicles (unless in fight and only combat vehicles)
+// nowp = No waypoints will be created for this squad UNTIL ENEMY DETECTED, this squad will comunicate enemies but will not be moved by UPSMON until enemy detected, after that upsmon takes control of squad
+// nowp2 = No waypoints will be created for this squad UNTIL ENEMY DETECTED and damaged, this squad will comunicate enemies but will not be moved by UPSMON until enemy detected and damaged, after that upsmon takes control of squad
+// nowp3 = No waypoints will be created for this squad in any way, this squad will comunicate enemies but will not be moved by UPSMON.
+// ambush = Ambush squad will not move until in combat, will lay mines if enabled and wait for incoming enemies stealth and ambush when near or discovered.
+// ambush2 = Ambush squad will not move until in combat, will NOT LAY MINES and wait for incoming enemies stealth and ambush when near or discovered.
+// ambush:n = Creates an anbush and wait maximun the especified time n in seconds. you can put 0 seconds for putting mines and go away if combined with "move" for example
+// ambush2:n = Same as ambush:n but without laying mines.
+// respawn = allow squad to respawn when all members are dead and no targets near
+// respawn:x = allows to define the number of times squad may respawn.
+// showmarker = Display the area marker.
+// track = Display a position and destination marker for each unit.
+
+// spawned = use only with squads created in runtime, this feature will add squad to UPSMON correctly.
+// aware,combat,stealth,careless defines default behaviour of squad
+
+// numbers of Civilians killed by players could be read from the array 'KILLED_CIV_COUNTER' -> [Total, by West, by East, by Res, The Killer]
+
+
+if (!isServer) exitWith {};
+
+
+if (isNil("KRON_UPS_INIT")) then {
+ KRON_UPS_INIT=0;
+};
+
+waitUntil {KRON_UPS_INIT==1};
+
+// convert argument list to uppercase
+ _UCthis = [];
+ for [{_i=0},{_i<count _this},{_i=_i+1}] do {_e=_this select _i; if (typeName _e=="STRING") then {_e=toUpper(_e)};_UCthis set [_i,_e]};
+
+ if ((count _this)<2) exitWith {
+ if (format["%1",_this]!="INIT") then {hint "UPS: Unit and marker name have to be defined!"};
+ };
+
+
+
+// Postioning
+private["_targetX","_targetY","_relTX","_relTY","_relUX","_relUY","_waiting","_pursue","_react","_newpos","_currPos","_orgPos","_targetPos","_attackPos","_flankPos","_avoidPos", "_speedmode"];
+private["_dist","_lastdist","_lastmove1","_lastmove2","_gothit", "_supressed" , "_flankdist","_nBuilding","_nBuildingt","_distnbuid","_distnbuidt"];
+private["_objsflankPos1","_cntobjs1","_objsflankPos2","_cntobjs2","_targettext","_dir1","_dir2","_dir3","_dd","_timeontarget","_dirf1","_dirf2","_fightmode",
+ "_flankPos2","_cosU","_sinU","_cosT","_sinT","_reinforcement","_reinforcementsent","_target","_targets","_flankdir","_prov","_lastpos","_newtarget","_planta","_nomove",
+ "_newflankAngle","_sharedist" ,"_targetPosOld","_fldest","_grpidx","_grpid","_i","_unitpos","_Behaviour", "_incar", "_inheli" , "_inboat","_gunner","_driver"
+ ,"_vehicle","_minreact","_lastreact","_CombatMode","_rnd","_GetOutDist","_GetOut","_GetIn_NearestVehicles","_makenewtarget","_index","_wp","_grp","_wptype","_wpformation","_i"
+ ,"_targetdead","_frontPos","_GetIn","_dist1","_dist2","_dist3","_fldestfront","_fldest2","_bld","_blddist","_bldunitin","_flyInHeight","_fortify","_buildingdist","_rfid","_rfidcalled","_Mines"
+ ,"_enemytanks","_enemytanksnear","_friendlytanksnear","_mineposition","_enemytanknear","_roads","_timeout","_lastcurrpos","_wait","_countfriends","_side","_SURRENDER","_spawned","_nowp","_unitsIn"
+ ,"_ambush","_ambushed","_ambushdist","_friendside","_enemyside","_newattackPos","_fixedtargetpos","_NearestEnemy","_targetdist","_cargo","_targetsnear","_landing","_ambushwait"
+ ,"_membertypes","_respawn","_respawnmax","_lead","_safemode","_vehicles","_dist3","_lastwptype","_template","_unittype","_initstr","_fortifyorig","_nowpType","_ambushtype" ,"_vehicletypes", "_onroad","_loop2", "_tries2","_targetPosTemp","_sokilled","_sowounded","_nosmoke","_newunit","_rlastpos","_rcurrpos","_jumpers","_isSoldier","_noveh","_deadBodiesReact"];
+
+
+_grpid =0;
+_exit = false;
+_fldest = 0;
+_unitpos = "AUTO";
+_vehicle = objnull;
+_minreact = KRON_UPS_minreact;
+_lastreact = KRON_UPS_minreact;
+_rnd = 0.0;
+_GetOutDist = 0;
+_GetOut=false;
+_index = 0;
+_wp=[];
+_wptype="HOLD";
+_wpformation = "VEE";
+_targetdead = false;
+_GetIn=false;
+_dist3 = 0;
+_fldestfront = 0;
+_fldest2=0;
+_bld = objnull;
+_flyInHeight = 0;
+_rfid = 0;
+_rfidcalled = false;
+_Mines = 3;
+_enemytanks = [];
+_friendlytanks =[];
+_enemytanksnear = false;
+_friendlytanksnear = false;
+_mineposition = [0,0,0];
+_enemytanknear = objnull;
+_NearestEnemy = objnull;
+_roads = [];
+_timeout = 0;
+_wait=90;
+_countfriends = 0;
+_side="";
+_friendside=[];
+_enemyside=[];
+_SURRENDER = 0;
+_surrended = false;
+_inheli = false;
+_spawned = false;
+_nowp = false;
+_unitsIn = [];
+_ambush = false;
+_ambushed = false;
+_ambushdist = KRON_UPS_ambushdist;
+_deadBodiesreact = R_deadBodiesReact;
+_dist2 = 0;
+_targetdist = 10000;
+_cargo = [];
+_targetsnear = false;
+_landing=false;
+_ambushwait = 10000;
+_membertypes = [];
+_vehicletypes =[];
+_respawn = false;
+_respawnmax = 10000;
+_lead=objnull;
+_safemode=["CARELESS","SAFE"];
+_vehicles = [];
+_dist3=0;
+_lastwptype = "";
+_unittype = "";
+_initstr = "";
+_fortifyorig= false;
+_rlastPos = [0,0,0];
+
+// unit that's moving
+_obj = leader (_this select 0); //group or leader
+_npc = _obj;
+
+
+
+// give this group a unique index
+KRON_UPS_Instances = KRON_UPS_Instances + 1;
+_grpid = KRON_UPS_Instances;
+_grpidx = format["%1",_grpid];
+_grpname = format["%1_%2",(side _npc),_grpidx];
+_side = side _npc;
+
+
+
+
+//To not run all at the same time we hope to have as many seconds as id's
+_rnd = _grpid;
+sleep _rnd ;
+
+
+
+
+// == set "UPSMON_grpid" to units in the group and EH===============================
+ {
+ _x setVariable ["UPSMON_grpid", _grpid, false];
+ sleep 0.05;
+
+
+ if (side _x != civilian) then
+ {//soldiers
+ _x AddEventHandler ["hit", {nul = _this spawn R_SN_EHHIT}];
+ sleep 0.05;
+ _x AddEventHandler ["killed", {nul = _this spawn R_SN_EHKILLED}];
+ sleep 0.05;
+ }
+ else
+ {//civ
+
+ _x removeAllEventHandlers "firedNear";
+ sleep 0.05;
+ _x AddEventHandler ["firedNear", {nul = _this spawn R_SN_EHFIREDNEAR}];
+ sleep 0.05;
+
+ _x removeAllEventHandlers "killed";
+ sleep 0.05;
+ _x AddEventHandler ["killed", {nul = _this spawn R_SN_EHKILLEDCIV}];
+ sleep 0.05;
+ };
+ } foreach units _npc;
+
+ //if is vehicle will not be in units so must set manually
+ if (isnil {_npc getVariable ("UPSMON_grpid")}) then {
+ _npc setVariable ["UPSMON_grpid", _grpid, false];
+ sleep 0.05;
+
+ if (side _npc != civilian) then
+ {//soldiers
+ _npc AddEventHandler ["hit", {nul = _this spawn R_SN_EHHIT}];
+ sleep 0.05;
+ _npc AddEventHandler ["killed", {nul = _this spawn R_SN_EHKILLED}];
+ sleep 0.05;
+ }
+ else
+ { //civilian
+ _npc removeAllEventHandlers "firedNear";
+ sleep 0.05;
+ _npc AddEventHandler ["firedNear", {nul = _this spawn R_SN_EHFIREDNEAR}];
+ sleep 0.05;
+
+
+
+ _npc removeAllEventHandlers "killed";
+ sleep 0.05;
+ _npc AddEventHandler ["killed", {nul = _this spawn R_SN_EHKILLEDCIV}];
+ sleep 0.05;
+ }
+ };
+ //the index will be _grpid
+ R_GOTHIT_ARRAY = R_GOTHIT_ARRAY + [0];
+
+
+
+if (KRON_UPS_Debug>0) then {player sidechat format["%1: New instance %2 %3 %4",_grpidx,_npc getVariable ("UPSMON_grpid")]};
+
+
+
+
+
+
+
+// == get the name of area marker ==============================================
+ _areamarker = _this select 1;
+ if (isNil ("_areamarker")) exitWith {
+ hint "UPS: Area marker not defined.\n(Typo, or name not enclosed in quotation marks?)";
+ };
+
+ // remember center position of area marker
+ _centerpos = getMarkerPos _areamarker;
+ _centerX = abs(_centerpos select 0);
+ _centerY = abs(_centerpos select 1);
+ _centerpos = [_centerX,_centerY];
+
+ // show/hide area marker
+ _showmarker = if ("SHOWMARKER" in _UCthis) then {"SHOWMARKER"} else {"HIDEMARKER"};
+ if (_showmarker=="HIDEMARKER") then {
+ //_areamarker setMarkerCondition "false"; // VBS2
+ _areamarker setMarkerPos [-abs(_centerX),-abs(_centerY)];
+ };
+
+// is anybody alive in the group?
+ _exit = true;
+ if (typename _npc=="OBJECT") then {
+ if (!isnull group _npc) then {
+ _npc = [_npc,units (group _npc)] call MON_getleader;
+ }else{
+ _vehicles = [_npc,2] call MON_nearestSoldiers;
+ if (count _vehicles>0) then {
+ _npc = [_vehicles select 0,units (_vehicles select 0)] call MON_getleader;
+ };
+ };
+ } else {
+ if (count _obj>0) then {
+ _npc = [_obj,count _obj] call MON_getleader;
+ };
+ };
+
+
+ // set the leader in the vehilce
+ if (!(_npc iskindof "Man")) then {
+ if (!isnull(commander _npc) ) then {
+ _npc = commander _npc;
+ }else{
+ if (!isnull(driver _npc) ) then {
+ _npc = driver _npc;
+ }else{
+ _npc = gunner _npc;
+ };
+ };
+ group _npc selectLeader _npc;
+ };
+
+// ===============================================
+ if (alive _npc) then {_exit = false;};
+ if (KRON_UPS_Debug>0 && _exit) then {player sidechat format["%1 There is no alive members %1 %2 %3",_grpidx,typename _npc,typeof _npc, count units _npc]};
+
+
+ // exit if something went wrong during initialization (or if unit is on roof)
+ if (_exit) exitWith {
+ if (KRON_UPS_DEBUG>0) then {hint "Initialization aborted"};
+ };
+
+
+
+// remember the original group members, so we can later find a new leader, in case he dies
+ _members = units _npc;
+ KRON_UPS_Total = KRON_UPS_Total + (count _members);
+
+//Fills member soldier types
+ _vehicles = [];
+ {
+ if (vehicle _x != _x ) then {
+ _vehicles = _vehicles - [vehicle _x];
+ _vehicles = _vehicles + [vehicle _x];
+ };
+ _membertypes = _membertypes + [typeof _x];
+ } foreach _members;
+
+//Fills member vehicle types
+ {
+ _vehicletypes = _vehicletypes + [typeof _x];
+ } foreach _vehicles;
+
+// what type of "vehicle" is _npc ?
+ _isman = "Man" countType [ vehicle _npc]>0;
+ _iscar = "LandVehicle" countType [vehicle _npc]>0;
+ _isboat = "Ship" countType [vehicle _npc]>0;
+ _isplane = "Air" countType [vehicle _npc]>0;
+
+// we just have to brute-force it for now, and declare *everyone* an enemy who isn't a civilian
+ _isSoldier = _side != civilian;
+
+ _friends=[];
+ _enemies=[];
+ _sharedenemy=0;
+
+ if (_isSoldier) then {
+ switch (_side) do {
+ case west:
+ { _sharedenemy=0;
+ _friendside = [west];
+ _enemyside = [east];
+ };
+ case east:
+ { _sharedenemy=1;
+ _friendside = [east];
+ _enemyside = [west];
+ };
+ case resistance:
+ {
+ _sharedenemy=2;
+ _enemyside = KRON_UPS_Res_enemy;
+
+ if (!(east in _enemyside)) then {
+ _friendside = [east];
+ };
+ if (!(west in _enemyside)) then {
+ _friendside = [west];
+ };
+ };
+ };
+ };
+
+ if (_side in KRON_UPS_Res_enemy) then {
+ _enemyside = _enemyside + [resistance];
+ }else {
+ _friendside = _friendside + [resistance];
+ };
+ sleep .05;
+
+//Sets min units alive for surrender
+ _surrender = call (compile format ["KRON_UPS_%1_SURRENDER",_side]);
+
+
+
+ // Tanks friendlys are contabiliced
+{
+ if ( side _x in _friendside && ( _x iskindof "Tank" || _x iskindof "Wheeled_APC" )) then {
+ _friendlytanks = _friendlytanks + [_x];
+ };
+}foreach vehicles;
+
+// global unit variable to externally influence script
+//call compile format ["KRON_UPS_%1=1",_npcname];
+
+// X/Y range of target area
+_areasize = getMarkerSize _areamarker;
+_rangeX = _areasize select 0;
+_rangeY = _areasize select 1;
+_area = abs((_rangeX * _rangeY) ^ 0.5);
+// marker orientation (needed as negative value!)
+_areadir = (markerDir _areamarker) * -1;
+
+
+// store some trig calculations
+_cosdir=cos(_areadir);
+_sindir=sin(_areadir);
+
+// minimum distance of new target position
+_mindist=(_rangeX^2+_rangeY^2)/3;
+if (_rangeX==0) exitWith {
+ hint format["UPS: Cannot patrol Sector: %1\nArea Marker doesn't exist",_areamarker];
+};
+
+// remember the original mode & speed
+_orgMode = behaviour _npc;
+_orgSpeed = speedmode _npc;
+
+// set first target to current position (so we'll generate a new one right away)
+_currPos = getpos _npc;
+_orgPos = _currPos;
+_orgDir = getDir _npc;
+_orgWatch=[_currPos,50,_orgDir] call KRON_relPos;
+_lastpos = _currPos;
+
+_avoidPos = [0,0];
+_flankPos = [0,0];
+_attackPos = [0,0];
+_newattackPos = [0,0];
+_fixedtargetpos = [0,0];
+_frontPos = [0,0];
+_dirf1 = 0;_dirf2=0;_flankPos2=[0,0];
+_dist = 10000;
+_lastdist = 0;
+_lastmove1 = 0;
+_lastmove2 = 0;
+_maxmove=0;
+_moved=0;
+
+_damm=0;
+_dammchg=0;
+_lastdamm = 0;
+_timeontarget = 0;
+
+_fightmode = "walk";
+_fm=0;
+_gothit = false;
+_pursue = false;
+_hitPos=[0,0,0];
+_react = 0;
+_lastknown = 0;
+_opfknowval = 0;
+
+_sin0=1;
+_sin90=1; _cos90=0;
+_sin270=-1; _cos270=0;
+_targetX =0; _targetY=0;
+_relTX=0;_relTY=0;
+_relUX=0;_relUY=0;
+_supressed = false;
+_flankdist=0;
+_nBuilding=nil;
+_nBuildingt =nil;
+_speedmode="Limited";
+_distnbuid = 0;
+_distnbuidt = 0;
+_objsflankPos1 = [];
+_cntobjs1 = 0;
+_objsflankPos2 = [];
+_cntobjs2 = 0;
+_targettext ="";
+_dir1 =0;_dir2=0;_dir3=0;_dd=0;
+_timeontarget=0;
+_reinforcement ="";
+_reinforcementsent = false;
+_target = objnull;
+_newtarget=objnull;
+_flankdir=0; //1 tendencia a flankpos1, 2 tendencia a flankpos2
+_prov=0;
+_targets=[];
+_planta=0; //Indice de plantas en edificios
+_newflankAngle = 0;
+_closeenough = KRON_UPS_closeenough;
+_gunner = objnull;
+_driver = objnull;
+_fortify = false;
+_buildingdist= 60;//Distance to search buildings near
+_Behaviour = "SAFE";
+_grp = grpnull;
+_grp = group _npc;
+_template = 0;
+_nowpType = 1;
+_ambushtype = 1;
+_rstuckControl = 0;
+_makenewtarget=true;
+
+
+
+// set target tolerance high for choppers & planes
+if (_isplane) then {_closeenough = KRON_UPS_closeenough * 2};
+
+// ***************************************** optional arguments *****************************************
+
+// wait at patrol end points
+_pause = if ("NOWAIT" in _UCthis) then {"NOWAIT"} else {"WAIT"};
+// don't move until an enemy is spotted
+_nomove = if ("NOMOVE" in _UCthis) then {"NOMOVE"} else {"MOVE"};
+
+//fortify group in near places
+ _fortify= if ("FORTIFY" in _UCthis) then {true} else {false};
+ _fortifyorig = _fortify;
+ if (_fortify) then {
+ _nomove="NOMOVE";
+ _minreact = KRON_UPS_minreact * 3;
+ _buildingdist = _buildingdist * 2;
+ _makenewtarget = false;
+ _wait = 3000;
+ };
+
+// create _targerpoint on the roads only (by this group)
+ _onroad = if ("ONROAD" in _UCthis) then {true} else {false};
+// do not use smoke (by this group)
+ _nosmoke = if ("NOSMOKE" in _UCthis) then {true} else {false};
+// do not search for vehicles (unless in fight and combat vehicles)
+_noveh = if ("NOVEH" in _UCthis) then {true} else {false};
+
+
+
+// don't make waypoints
+ _nowp = if ("NOWP" in _UCthis) then {true} else {false};
+ _nowp = if ("NOWP2" in _UCthis) then {true} else {_nowp};
+ _nowp = if ("NOWP3" in _UCthis) then {true} else {_nowp};
+ _nowpType = if ("NOWP2" in _UCthis) then {2} else {_nowpType};
+ _nowpType = if ("NOWP3" in _UCthis) then {3} else {_nowpType};
+
+//Ambush squad will no move until in combat or so close enemy
+ _ambush= if ("AMBUSH" in _UCthis) then {true} else {false};
+ _ambush= if ("AMBUSH:" in _UCthis) then {true} else {_ambush};
+ _ambush= if ("AMBUSH2" in _UCthis) then {true} else {_ambush};
+ _ambushwait = ["AMBUSH:",_ambushwait,_UCthis] call KRON_UPSgetArg;
+ _ambushwait = ["AMBUSH2:",_ambushwait,_UCthis] call KRON_UPSgetArg;
+ _ambushType = if ("AMBUSH2" in _UCthis) then {2} else {_ambushType};
+ _ambushType = if ("AMBUSH2:" in _UCthis) then {2} else {_ambushType};
+
+// respawn
+ _respawn = if ("RESPAWN" in _UCthis) then {true} else {false};
+ _respawn = if ("RESPAWN:" in _UCthis) then {true} else {_respawn};
+ _respawnmax = ["RESPAWN:",_respawnmax,_UCthis] call KRON_UPSgetArg;
+ if (!_respawn) then {_respawnmax = 0};
+
+// any init strings?
+ _initstr = ["INIT:","",_UCthis] call KRON_UPSgetArg;
+
+// don't follow outside of marker area
+ _nofollow = if ("NOFOLLOW" in _UCthis) then {"NOFOLLOW"} else {"FOLLOW"};
+// share enemy info
+ _shareinfo = if ("NOSHARE" in _UCthis) then {"NOSHARE"} else {"SHARE"};
+// "area cleared" trigger activator
+ _areatrigger = if ("TRIGGER" in _UCthis) then {"TRIGGER"} else {if ("NOTRIGGER" in _UCthis) then {"NOTRIGGER"} else {"SILENTTRIGGER"}};
+
+ // suppress fight behaviour
+ if ("NOAI" in _UCthis) then {_isSoldier=false};
+
+ // adjust cycle delay
+ _cycle = ["CYCLE:",KRON_UPS_Cycle,_UCthis] call KRON_UPSgetArg;
+ _currcycle=_cycle;
+
+ //spawned for squads created in runtime
+ _spawned= if ("SPAWNED" in _UCthis) then {true} else {false};
+ if (_spawned) then {
+ if (KRON_UPS_Debug>0) then {player sidechat format["%1: squad has been spawned, respawns %2",_grpidx,_respawnmax]};
+ switch (side _npc) do {
+ case west:
+ { KRON_AllWest=KRON_AllWest + units _npc;
+ };
+ case east:
+ { KRON_AllEast=KRON_AllEast + units _npc; };
+ case resistance:
+ {
+ KRON_AllRes=KRON_AllRes + units _npc;
+ if (east in KRON_UPS_Res_enemy ) then {
+ KRON_UPS_East_enemies = KRON_UPS_East_enemies+units _npc;
+ } else {
+ KRON_UPS_East_friends = KRON_UPS_East_friends+units _npc;
+ };
+ if (west in KRON_UPS_Res_enemy ) then {
+ KRON_UPS_West_enemies = KRON_UPS_West_enemies+units _npc;
+ } else {
+ KRON_UPS_West_friends = KRON_UPS_West_friends+units _npc;
+ };
+ };
+ };
+ call (compile format ["KRON_UPS_%1_Total = KRON_UPS_%1_Total + count (units _npc)",side _npc]);
+
+ _vehicletypes = ["VEHTYPE:",_vehicletypes,_UCthis] call KRON_UPSgetArg;
+
+ };
+
+// set drop units at random positions
+ _initpos = "ORIGINAL";
+ if ("RANDOM" in _UCthis) then {_initpos = "RANDOM"};
+ if ("RANDOMUP" in _UCthis) then {_initpos = "RANDOMUP"};
+ if ("RANDOMDN" in _UCthis) then {_initpos = "RANDOMDN"};
+ // don't position groups or vehicles on rooftops
+ if ((_initpos!="ORIGINAL") && ((!_isman) || (count _members)>1)) then {_initpos="RANDOMDN"};
+
+ // set behaviour modes (or not)
+ _orgMode = "SAFE";
+ if ("CARELESS" in _UCthis) then {_orgMode = "CARELESS"};
+ if ("AWARE" in _UCthis) then {_orgMode = "AWARE"};
+ if ("COMBAT" in _UCthis) then {_orgMode = "COMBAT"};
+ if ("STEALTH" in _UCthis) then {_orgMode = "STEALTH"};
+
+// set original beahviour
+ if (!_isSoldier) then {
+ _Behaviour = "CARELESS";
+ } else {
+ _Behaviour = _orgMode;
+ };
+ _npc setbehaviour _Behaviour;
+
+
+// set initial speed
+ _noslow = if ("NOSLOW" in _UCthis) then {"NOSLOW"} else {"SLOW"};
+ if (_noslow!="NOSLOW") then {
+ _orgSpeed = "limited";
+ } else {
+ _orgSpeed = "FULL";
+ };
+ _speedmode = _orgSpeed;
+ _npc setspeedmode _speedmode;
+
+// set If enemy detected reinforcements will be sent REIN1
+ _reinforcement= if ("REINFORCEMENT" in _UCthis) then {"REINFORCEMENT"} else {"NOREINFORCEMENT"}; //rein_yes
+ _rfid = ["REINFORCEMENT:",0,_UCthis] call KRON_UPSgetArg; // rein_#
+
+ if (_rfid>0) then {
+ _reinforcement="REINFORCEMENT";
+ //if (KRON_UPS_Debug>0) then {hintsilent format["%1: reinforcement group %2",_grpidx,_rfid,_rfidcalled,_reinforcement]};
+ };
+
+//set Is a template for spawn module?
+ _template = ["TEMPLATE:",_template,_UCthis] call KRON_UPSgetArg;
+ //Fills template array for spawn
+ if (_template > 0 && !_spawned) then {
+ KRON_UPS_TEMPLATES = KRON_UPS_TEMPLATES + ( [[_template]+[_side]+[_membertypes]+[_vehicletypes]] );
+ //if (KRON_UPS_Debug>0) then {diag_log format["%1 Adding TEMPLATE %2 _spawned %3",_grpidx,_template,_spawned]};
+ //if (KRON_UPS_Debug>0) then {player globalchat format["KRON_UPS_TEMPLATES %1",count KRON_UPS_TEMPLATES]};
+ };
+
+// make start position random
+ if (_initpos!="ORIGINAL") then {
+ // find a random position (try a max of 20 positions)
+ _try=0;
+ _bld=0;
+ _bldpos=0;
+ while {_try<20} do {
+ _currPos=[_centerX,_centerY,_rangeX,_rangeY,_cosdir,_sindir,_areadir] call KRON_randomPos;
+ _posinfo=[_currPos] call KRON_PosInfo3;
+ // _posinfo: [0,0]=no house near, [obj,-1]=house near, but no roof positions, [obj,pos]=house near, with roof pos
+ _bld=_posinfo select 0;
+ _bldpos=_posinfo select 1;
+ if (_isplane || _isboat || !(surfaceiswater _currPos)) then {
+ if (((_initpos=="RANDOM") || (_initpos=="RANDOMUP")) && (_bldpos>0)) then {_try=99};
+ if (((_initpos=="RANDOM") || (_initpos=="RANDOMDN")) && (_bldpos==0)) then {_try=99};
+ };
+ _try=_try+1;
+ sleep .01;
+ };
+ if (_bldpos==0) then {
+
+ { //man
+ if (vehicle _x == _x) then {
+ _x setpos _currPos;
+ };
+ } foreach units _npc;
+
+ sleep .5;
+ { // vehicles
+ _targetpos = _currPos findEmptyPosition [10, 100];
+ sleep .4;
+ if (count _targetpos <= 0) then {_targetpos = _currpos};
+ _x setPos _targetpos;
+ } foreach _vehicles;
+
+ } else {
+ // put the unit on top of a building
+ _npc setPos (_bld buildingPos _bldpos);
+ _currPos = getPos _npc;
+ _nowp=true; // don't move if on roof
+ };
+ };
+
+// track unit ======================================================================================
+ _track = if (("TRACK" in _UCthis) || (KRON_UPS_Debug>0)) then {"TRACK"} else {"NOTRACK"};
+ _trackername = "";
+ _destname = "";
+ if (_track=="TRACK") then {
+ _track = "TRACK";
+ _trackername=format["trk_%1",_grpidx];
+ _markerobj = createMarker[_trackername,[0,0]];
+ _markerobj setMarkerShape "ICON";
+ _markertype = if (isClass(configFile >> "cfgMarkers" >> "WTF_Dot")) then {"WTF_DOT"} else {"DOT"};
+ _trackername setMarkerType _markertype;
+ _markercolor = switch (side _npc) do {
+ case west: {"ColorGreen"};
+ case east: {"ColorRed"};
+ case resistance: {"ColorBlue"};
+ default {"ColorBlack"};
+ };
+ _trackername setMarkerColor _markercolor;
+ _trackername setMarkerText format["%1",_grpidx];
+ _trackername setmarkerpos _currPos;
+
+ _destname=format["dest_%1",_grpidx];
+ _markerobj = createMarker[_destname,[0,0]];
+ _markerobj setMarkerShape "ICON";
+ _markertype = if (isClass(configFile >> "cfgMarkers" >> "WTF_Flag")) then {"WTF_FLAG"} else {"FLAG"};
+ _destname setMarkerType _markertype;
+ _destname setMarkerColor _markercolor;
+ _destname setMarkerText format["%1",_grpidx];
+ _destname setMarkerSize [.5,.5];
+ };
+
+
+// delete dead units ==============================================================================
+ _deletedead = ["DELETE:",0,_UCthis] call KRON_UPSgetArg;
+ if (_deletedead>0) then {
+ {
+ _x addEventHandler['killed',format["[_this select 0,%1] spawn KRON_deleteDead",_deletedead]];
+ sleep 0.01;
+ }forEach _members;
+ };
+
+// how many group clones? =========================================================================
+// TBD: add to global side arrays?
+ _mincopies = ["MIN:",0,_UCthis] call KRON_UPSgetArg;
+ _maxcopies = ["MAX:",0,_UCthis] call KRON_UPSgetArg;
+ if (_mincopies>_maxcopies) then {_maxcopies = _mincopies};
+ if (_maxcopies>140) exitWith {hint "Cannot create more than 140 groups!"};
+ if (_maxcopies>0) then {
+ _copies = _mincopies + random (_maxcopies-_mincopies);
+
+ // create the clones
+ for "_grpcnt" from 1 to _copies do {
+ // copy groups
+ if (isNil ("KRON_grpindex")) then {KRON_grpindex = 0};
+ KRON_grpindex = KRON_grpindex+1;
+ // copy group leader
+ _unittype = typeof _npc;
+ // make the clones civilians
+ // use random Civilian models for single unit groups
+ if ((_unittype=="Civilian") && (count _members==1)) then {_rnd=1+round(random 20); if (_rnd>1) then {_unittype=format["Civilian%1",_rnd]}};
+
+ _grp=createGroup side _npc;
+ _lead = _grp createUnit [_unittype, getpos _npc, [], 0, "form"];
+ _lead setVehicleVarName format["l%1",KRON_grpindex];
+ call compile format["l%1=_lead",KRON_grpindex];
+ _lead setBehaviour _orgMode;
+ _lead setSpeedmode _orgSpeed;
+ _lead setSkill skill _npc;
+ _lead setVehicleInit _initstr;
+ [_lead] join _grp;
+ _grp selectLeader _lead;
+ // copy team members (skip the leader)
+ _i=0;
+ {
+ _i=_i+1;
+ if (_i>1) then {
+ _newunit = _grp createUnit [typeof _x, getpos _x, [],0,"form"];
+ _newunit setBehaviour _orgMode;
+ _newunit setSpeedMode _orgSpeed;
+ _newunit setSkill skill _x;
+ _newunit setVehicleInit _initstr;
+ [_newunit] join _grp;
+ };
+ } foreach _members;
+
+ nul=[_lead,_areamarker,_pause,_noslow,_nomove,_nofollow,_initpos,_track,_showmarker,_shareinfo,"DELETE:",_dead] execVM "scripts\upsmon.sqf";
+ //sleep .05;
+ };
+ processInitCommands;
+ sleep .05;
+ };
+
+
+// units that can be left for area to be "cleared" =============================================================================================
+ _zoneempty = ["EMPTY:",0,_UCthis] call KRON_UPSgetArg;
+
+// create area trigger =========================================================================================================================
+ if (_areatrigger!="NOTRIGGER") then {
+ _trgside = switch (side _npc) do { case west: {"WEST"}; case east: {"EAST"}; case resistance: {"GUER"}; case civilian: {"CIV"};};
+ //_trgside = switch (side _npc) do { case west: {"EAST"}; case east: {"WEST"}; case resistance: {"ANY"}; case civilian: {"ANY"};};
+ _trgname="KRON_Trig_"+_trgside+"_"+_areamarker;
+ _flgname="KRON_Cleared_"+_areamarker;
+ // has the trigger been created already?
+ KRON_TRGFlag=-1;
+ call compile format["%1=false",_flgname];
+ call compile format["KRON_TRGFlag=%1",_trgname];
+ if (isNil ("KRON_TRGFlag")) then {
+ // trigger doesn't exist yet, so create one (make it a bit bigger than the marker, to catch path finding 'excursions' and flanking moves)
+ call compile format["%1=createTrigger['EmptyDetector',_centerpos]",_trgname];
+ call compile format["%1 setTriggerArea[_rangeX*1.5,_rangeY*1.5,markerDir _areamarker,true]",_trgname];
+ call compile format["%1 setTriggerActivation[_trgside,'PRESENT',true]",_trgname];
+ call compile format["%1 setEffectCondition 'true'",_trgname];
+ call compile format["%1 setTriggerTimeout [5,7,10,true]",_trgname];
+ if (_areatrigger!="SILENTTRIGGER") then {
+ call compile format["%1 setTriggerStatements['count thislist<=%6', 'titletext [''SECTOR <%2> LIMPIO'',''PLAIN''];''%2'' setmarkerpos [-%4,-%5];%3=true;', 'titletext [''SECTOR <%2> HA SIDO REOCUPADO'',''PLAIN''];''%2'' setmarkerpos [%4,%5];%3=false;']", _trgname,_areamarker,_flgname,_centerX,_centerY,_zoneempty];
+
+ } else {
+ call compile format["%1 setTriggerStatements['count thislist<=%3', '%2=true;', '%2=false;']", _trgname,_flgname,_zoneempty];
+ };
+ };
+ sleep .05;
+ };
+
+//If a soldier has a useful building takes about ======================================================================================================================
+ if ( _nomove=="NOMOVE" ) then {
+ sleep 10;
+ _unitsIn = [_grpid,_npc,150] call MON_GetIn_NearestStatic;
+ if ( count _unitsIn > 0 ) then { sleep 10};
+ [_npc, _buildingdist,false,_wait,true] spawn MON_moveNearestBuildings;
+ };
+
+// init done
+ _newpos = false;
+ _targetPos = [0,0,0];//_currPos;
+ _targettext ="_currPos";
+ _swimming = false;
+ _waiting = if (_nomove=="NOMOVE") then {9999} else {0};
+ _sharedist = if (_nomove=="NOMOVE") then {KRON_UPS_sharedist} else {KRON_UPS_sharedist*1.5};
+
+
+//Gets position of waypoint if no targetpos
+ if (format ["%1", _targetPos] == "[0,0,0]") then {
+ _index = (count waypoints _grp) - 1;
+ _wp = [_grp,_index];
+ _targetPos = waypointPosition _wp;
+ if (([_currpos,_targetPos] call KRON_distancePosSqr)<= 20) then {_targetPos = [0,0,0];};
+ };
+
+// ***********************************************************************************************************
+// ************************************************ MAIN LOOP ************************************************
+// ***********************************************************************************************************
+_loop=true;
+
+scopeName "main";
+while {_loop} do {
+
+
+//if (KRON_UPS_Debug>0) then {player sidechat format["%1: _cycle=%2 _currcycle=%3 _react=%4 _waiting=%5",_grpidx,_cycle,_currcycle,_react,_waiting]};
+ _timeontarget=_timeontarget+_currcycle;
+ _react=_react+_currcycle;
+ _waiting = _waiting - _currcycle;
+ _lastreact = _lastreact + _currcycle;
+ _newpos = false;
+
+
+
+ _sokilled = false;
+ _sowounded = false;
+
+
+ // CHECK IF did anybody in the group got hit or die?
+ if ((R_GOTHIT_ARRAY select _grpId) != 0) then
+ {
+ _gothit = true;
+
+ if ((R_GOTHIT_ARRAY select _grpId) == 1) then
+ {
+ _sowounded = true;
+ }
+ else
+ {
+ _sokilled = true;
+ };
+ sleep 0.01;
+ R_GOTHIT_ARRAY set [_grpId, 0];
+ };
+
+
+
+
+
+ // nobody left alive, exit routine
+ if (count _members==0) then {
+ _exit=true;
+ } else {
+ // did the leader die?
+ _npc = [_npc,_members] call MON_getleader;
+ if (!alive _npc || !canmove _npc || isplayer _npc ) exitwith {_exit=true;};
+ };
+
+ //exits from loop
+ if (_exit) exitwith {};
+
+
+ //Checks if surrender is enabled
+ if ( _surrender > 0 ) then {
+ _surrended = call (compile format ["KRON_UPS_%1_SURRENDED",_side]);
+ };
+
+ //If surrended exits from script
+ if (_surrended) exitwith {
+ {
+ [_x] spawn MON_surrender;
+ }foreach _members;
+
+ if (KRON_UPS_Debug>0) then {_npc globalchat format["%1: %2 SURRENDED",_grpidx,_side]};
+ };
+
+ //Assign the current leader of the group in the array of group leaders
+ KRON_NPCs set [_grpid,_npc];
+
+ // current position
+ _currPos = getpos _npc; _currX = _currPos select 0; _currY = _currPos select 1;
+ if (_track=="TRACK" || KRON_UPS_Debug>0) then { _trackername setmarkerpos _currPos; };
+
+
+ // if the AI is a civilian we don't have to bother checking for enemy encounters
+ if ( _isSoldier && !_exit) then {
+ _pursue=false;
+ //_Behaviour = Behaviour _npc;
+
+ //Variables to see if the leader is in a vehicle
+ _incar = "LandVehicle" countType [vehicle (_npc)]>0;
+ _inheli = "Air" countType [vehicle (_npc)]>0;
+ _inboat = "Ship" countType [vehicle (_npc)]>0;
+
+
+ //If the group is strengthened and the enemies have been detected are sent to target
+ if (_rfid > 0 ) then {
+ _rfidcalled = call (compile format ["KRON_UPS_reinforcement%1",_rfid]); // will be TRUE when variable in triger will be true.
+ if (isnil "_rfidcalled") then {_rfidcalled=false};
+ _fixedtargetPos = call (compile format ["KRON_UPS_reinforcement%1_pos",_rfid]); // will be position os setfix target of sending reinforcement
+ if (isnil "_fixedtargetPos") then {
+ _fixedtargetPos=[0,0];
+ }else{
+ _fixedtargetPos = [abs(_fixedtargetPos select 0),abs(_fixedtargetPos select 1)];
+ _target = objnull;
+ };
+ };
+ sleep .01;
+
+ //Reinforcement control
+ if (_reinforcement=="REINFORCEMENT") then {
+ // (global call OR id call) AND !send yet
+ if ( (KRON_UPS_reinforcement || _rfidcalled) && (!_reinforcementsent)) then {
+ _reinforcementsent=true;
+ _fortify = false;
+ _minreact = KRON_UPS_minreact;
+ _buildingdist = 60;
+ _react = _react + 100;
+ _waiting = -1;
+ if (format ["%1",_fixedtargetPos] != "[0,0]") then {_nowp = false};
+ if (KRON_UPS_Debug>0) then {player sidechat format["%1 called for reinforcement %2",_grpidx,_fixedtargetPos]};
+ } else {
+ // !(global or id call) AND send
+ if ( !(KRON_UPS_reinforcement || _rfidcalled) && (_reinforcementsent)) then {
+ _fixedtargetPos = [0,0];
+ _attackPos = [0,0];
+ _fortify = _fortifyorig;
+ _reinforcementsent=false;
+ if (_rfid > 0 ) then {
+ call (compile format ["KRON_UPS_reinforcement%1_pos = [0,0]",_rfid]);
+ call (compile format ["KRON_UPS_reinforcement%1 = false",_rfid]);
+ };
+ if (KRON_UPS_Debug>0) then {player sidechat format["%1 reinforcement canceled",_grpidx]};
+ };
+ };
+ };
+
+ //Gets targets from radio
+ _targets = call (compile format ["KRON_targets%1",_sharedenemy]);
+
+ // if (KRON_UPS_Debug>0) then {player globalchat format["targets from global upsmon: %1",_targets]};
+ //Reveal targets found by members to leader
+ {
+ //_NearestEnemy = assignedTarget _x;
+ //if (KRON_UPS_Debug>0) then {player globalchat format["Nearest Enemy %1, know about %2",_NearestEnemy,_x knowsabout _NearestEnemy]};
+ _NearestEnemy = _x findnearestenemy _x;
+ if (_x knowsabout _NearestEnemy > R_knowsAboutEnemy && (_npc knowsabout _NearestEnemy <= R_knowsAboutEnemy || count _targets <= 0 )) then {
+
+ if (_npc knowsabout _NearestEnemy <= R_knowsAboutEnemy ) then {
+ _npc reveal _NearestEnemy;
+ if (KRON_UPS_Debug>0) then {player globalchat format["%1: %2 reveals target %3 to leader",_grpidx,typeof _x, typeof _NearestEnemy]};
+ };
+
+ //If no targets adds this
+ if (count _targets <= 0) then {
+ //_target = _NearestEnemy;
+ _targets = _targets + [_NearestEnemy];
+ _NearestEnemy setvariable ["UPSMON_lastknownpos", position _NearestEnemy, false];
+ //if (KRON_UPS_Debug>0) then {player globalchat format["%1: %3 added to targets",_grpidx,typeof _x, typeof _target]};
+ };
+ };
+ } foreach units _npc;
+
+
+ //if no target but _npc knows enemy then this is _target
+ if (isNull (_target)) then {
+ {
+ if ((_npc knowsabout _x > R_knowsAboutEnemy) && (alive _x) && (canmove _x)) then {
+ _target =_x;
+ if (!isNull (_target)) exitWith{};
+ };
+ } foreach _targets;
+ };
+
+
+
+
+ //Resets distance to target
+ _dist = 10000;
+
+ //Gets current known position of target and distance
+ if ( !isNull (_target) && alive _target ) then {
+ _newattackPos = _target getvariable ("UPSMON_lastknownpos");
+
+ if ( !isnil "_newattackPos" ) then {
+ _attackPos=_newattackPos;
+ //Gets distance to target known pos
+ _dist = ([_currpos,_attackPos] call KRON_distancePosSqr);
+ };
+ };
+
+
+ //Initialization for geting new targets
+ //If the current target is dead or no prior knowledge is cleaned
+ if (isNull (_target) || !alive _target || !canmove _target ) then {
+ _lastknown = 0;
+ _opfknowval = 0;
+ _target = objnull;
+ };
+
+ _newtarget = _target;
+
+
+ if ((_shareinfo=="SHARE")) then {
+
+ //Requests for radio the enemy's position, if it is within the range of acts
+ if ((KRON_UPS_comradio == 2)) then
+ {
+ _targetsnear = false;
+
+ //I we have a close target alive do not search another
+ if (!alive _target || !canmove _target || _dist > _closeenough) then {
+ {
+ if ( !isnull _x && canmove _x && alive _x ) then {
+
+ _newattackPos = _x getvariable ("UPSMON_lastknownpos");
+
+ if ( !isnil "_newattackPos" ) then {
+ _dist3 = ([_currpos,_newattackPos] call KRON_distancePosSqr);
+
+ //Sets if near targets to begin warning
+ IF ( _dist3 <= (_closeenough + KRON_UPS_safedist)) then { _targetsnear = true };
+
+ //Sets new target
+ if ( ( isnull (_newtarget) || captive _newtarget|| !alive _newtarget|| !canmove _newtarget || _dist3 < _dist )
+ && ( _dist3 <= _sharedist || _reinforcementsent )
+ && ( !(_x iskindof "Air") || (_x iskindof "Air" && _isplane ))
+ && ( !(_x iskindof "Ship") || (_x iskindof "Ship" && _isboat ))
+ && ( _x emptyPositions "Gunner" == 0 && _x emptyPositions "Driver" == 0
+ || (!isnull (gunner _x) && canmove (gunner _x))
+ || (!isnull (driver _x) && canmove (driver _x)))
+ ) then {
+ _newtarget = _x;
+ _opfknowval = _npc knowsabout _x;
+ _dist = _dist3;
+ if (_dist < _closeenough) exitWith {};
+ };
+ };
+ };
+ } foreach _targets;
+ sleep 0.5;
+ };
+ };
+
+ //If you change the target changed direction flanking initialize
+ if ( !isNull (_newtarget) && alive _newtarget && canmove _newtarget && (_newtarget != _target || isNull (_target)) ) then {
+ _timeontarget = 0;
+ _targetdead = false;
+ _flankdir= if (random 100 <= 10) then {0} else {_flankdir};
+ _target = _newtarget;
+ };
+ };
+
+ // use smoke when hit or s/o killed
+ if !_nosmoke then {
+ {
+ //when hit
+ if (_sowounded && random 100 < R_USE_SMOKE_wounded) then {
+ nul = [_x,_target] spawn MON_throw_grenade;
+ // if (KRON_UPS_Debug>0) then {player sidechat format["%1: We got wounded smoking!",_grpidx]};
+ };
+
+ //when die
+ if (_sokilled && random 100 < R_USE_SMOKE_killed) then {
+ nul = [_x,_target] spawn MON_throw_grenade;
+ //if (KRON_UPS_Debug>0) then {player sidechat format["%1: We got killed one, smoking!",_grpidx]};
+ };
+ sleep 0.1;
+ } foreach _members;
+ };
+
+
+
+ //Gets current known position of target and distance
+ if ( !isNull (_target) && alive _target ) then {
+ //Enemy detected
+ if (_fightmode != "fight" ) then {
+ _fightmode = "fight";
+ _npc setCombatMode "RED"; // !R
+ _react = KRON_UPS_react;
+ if (KRON_UPS_Debug>0) then {player sidechat format["%1: Enemy detected %2",_grpidx, typeof _target]};
+
+ if (_nowpType == 1) then {
+ nul = [_npc] call R_FN_deleteObsoleteWaypoints;
+ _nowp = false;
+ };
+ };
+
+ _newattackPos = _target getvariable ("UPSMON_lastknownpos");
+
+ if ( !isnil "_newattackPos" ) then {
+ _attackPos=_newattackPos;
+ //Gets distance to target known pos
+ _dist = ([_currpos,_attackPos] call KRON_distancePosSqr);
+ //Looks at target known pos
+ _members lookat _attackPos;
+ };
+ };
+
+ //If the enemy has moved away from the radio coverage is not a reinforcement sent we will have lost track
+ if ( _fightmode != "walk" && !isnull(_target) && _dist < 15 && _npc knowsabout _target < R_knowsAboutEnemy ) then {
+ //If squad is near last position and no target clear position of target
+ if (KRON_UPS_Debug>0) then {player sidechat format["%1: Target lost",_grpidx]};
+ _fightmode="walk";
+ _speedmode = _orgSpeed;
+ _target = objnull;
+ _Behaviour = _orgMode;
+ _waiting = -1;
+ _unitpos = "AUTO";
+ _pursue=false;
+ _targetdead = true;
+ _makenewtarget = true; //Go back to the original position
+ };
+
+ //If knowledge of the target increases accelerate the reaction
+ if (_opfknowval>_lastknown ) then {
+ _react = _react + 20;
+ };
+
+ // if spotted an enemy or got shot, so start pursuit, if in combat and exceed time to react or movecompleted
+ if (!_ambushed && (_fightmode != "walk") && ((_react >= KRON_UPS_react && _lastreact >=_minreact) || moveToCompleted _npc )) then {
+ _pursue=true;
+ };
+
+
+ //Ambush ==========================================================================================================
+ if (_ambush && !_ambushed) then {
+ _ambushed = true;
+ _nowp = true;
+ _currcycle = 2;
+ _grp setFormation "LINE";
+ _npc setBehaviour "STEALTH";
+ _npc setSpeedMode "FULL";
+
+
+ /*
+ sleep 12;
+ {
+ [_x,"DOWN"] spawn MON_setUnitPos;
+ sleep 2;
+ _x stop true;
+ player sidechat format["%1 %2",_x,_npc];
+
+ } foreach units _npc;
+ */
+
+ //Puts a mine if near road
+ if ( _ambushType == 1 ) then {
+ if (KRON_UPS_Debug>0) then {player sidechat format["%1: Puting mine for ambush",_grpidx]};
+ _npc setBehaviour "careless";
+ _dir1 = getDir _npc;
+ _mineposition = [position _npc,_dir1, (KRON_UPS_ambushdist / 1.2)] call MON_GetPos2D;
+ _roads = _mineposition nearroads 25;
+ // if (KRON_UPS_Debug>0) then {player sidechat format["%1: Roads #:%2",_grpidx, (count _roads)]};
+
+ while {_Mines > 0} do
+ {
+ _i = 0;
+ // if (KRON_UPS_Debug>0) then {player sidechat format["%1 Current Roads #:%2 _Mines:%3",_grpidx, (count _roads),_Mines]};
+ if (count _roads > 0) then {
+ _rnd = floor (random (count _roads));
+ _mineposition = position (_roads select _rnd);
+ _roads = _roads - [_roads select _rnd];
+ if ([_npc,_mineposition] call MON_CreateMine) then {_Mines = _Mines -1; _i = 1;};
+ } else {
+ _mineposition = [position _npc,(_dir1-30) mod 360, (KRON_UPS_ambushdist / 1.2 ) + random 10] call MON_GetPos2D;
+ if ([_npc,_mineposition] call MON_CreateMine) then {_Mines = _Mines -1; _i = 1;};
+ };
+ sleep 0.1;
+ if (_i != 1) then {_Mines = _Mines -1;} //in case no mine was set
+ };
+
+ _npc setBehaviour "carelesscareless";
+ sleep 30;
+ {
+ if (!stopped _x) then {
+ _x domove position _npc;
+ waituntil {moveToCompleted _x || moveToFailed _x || !alive _x || !canmove _x || _x distance _npc <= 5};
+ };
+ } foreach units _npc;
+ };
+
+
+
+ // did the leader die?
+ _npc = [_npc,_members] call MON_getleader;
+ if (!alive _npc || !canmove _npc || isplayer _npc ) exitwith {_exit=true;};
+
+
+ _grp setFormation "LINE";
+ _npc setBehaviour "AWARE";
+ sleep 10;
+
+ sleep 0.1;
+ _unitpos ="DOWN";
+ {
+ [_x,_unitpos] spawn MON_setUnitPos;
+ sleep 0.5;
+ _x stop true;
+ } foreach units _npc;
+ _npc setBehaviour "STEALTH";
+ _pursue = false;
+
+ }; // end of ambush mine
+
+
+
+
+
+ //Ambushr enemy is nearly aproach
+ //_ambushdist = 50;
+ // if (_npc knowsabout _NearestEnemy <= R_knowsAboutEnemy )
+
+ if (_ambush) then {
+ _prov = ((_ambushdist*2 - (_npc distance _NearestEnemy))*3) - 40;
+ // if (KRON_UPS_Debug>0) then {player sidechat format["%1:%6 _ambushdist=%5 last=%2 dist=%3 prov=%4",_grpidx,_lastdist,_npc distance _NearestEnemy,_prov,_ambushdist,typeof _NearestEnemy]};
+
+ if (_gothit || _reinforcementsent || time > _ambushwait
+ || ( "Air" countType [_NearestEnemy]<=0
+ && ( _npc distance _NearestEnemy <= _ambushdist + random 10
+ || (!isNull (_NearestEnemy) && (( random 100 <= _prov && _npc distance _NearestEnemy > _lastdist)
+ || _npc distance _NearestEnemy > _ambushdist*3 && _lastdist < _ambushdist*3 && _lastdist > 0))
+ ))
+ ) then {
+ sleep ((random 1) + 1); // let the enemy then get in the area
+ if (KRON_UPS_Debug>0) then {player sidechat format["%1: ATTACK !",_grpidx]};
+ _nowp = false;
+ _ambush = false;
+ _ambushed = false;
+ _currcycle = _cycle;
+ {
+ _x stop false;
+ _x setUnitPos "Auto";
+ } foreach _members;
+ _npc setBehaviour "STEALTH";
+ _npc setCombatMode "RED";
+
+ //No engage yet
+ _pursue = false;
+ };
+
+ //Sets distance to target
+ _lastdist = _npc distance _NearestEnemy;
+ }; // end of ambush
+
+
+
+ //if (KRON_UPS_Debug>0) then {player sidechat format["%1: _nowp=%2 in vehicle=%3 _inheli=%4 _npc=%5",_grpidx,_nowp,vehicle (_npc) ,_inheli,typeof _npc ]};
+
+ //If in vehicle take driver if not controlled by user
+ if (alive _npc && !_nowp) then {
+ if (!_isman || (vehicle (_npc) != _npc && !_inboat && !(vehicle (_npc) iskindof "StaticWeapon"))) then {
+
+ //If new target is close enough getout vehicle (not heli)
+ _unitsin = [];
+
+ if (!_inheli) then {
+ if (_fightmode == "walk") then {
+ _GetOutDist = _area / 20;
+ }else{
+ _GetOutDist = _closeenough * ((random .4) + 0.6);
+ };
+
+
+
+
+ //If near target or stuck getout of vehicle and lock or gothit exits inmediately
+ if (_gothit || _dist <= _closeenough * 1.5 || (_lastcurrpos select 0 == _currpos select 0 && _lastcurrpos select 1 == _currpos select 1 && moveToFailed (vehicle (_npc))) || moveTocompleted (vehicle (_npc))) then
+ {
+ _GetOutDist = 10000;
+ };
+ //if (KRON_UPS_Debug>0) then {player sidechat format["%1: vehicle=%2 _npc=%3",_grpidx,vehicle (_npc) ,typeof _npc ]};
+
+ _unitsin = [_npc] call R_FN_allUnitsInCargo; // return units in cargo in all vehs used by the group
+
+ private ["_handle1"];
+ _handle1 = [_npc,_targetpos,_GetOutDist] spawn R_SN_GetOutDist; // getout if as close as _GetOutDist to the target
+ _timeout = time + 10;
+ waitUntil {scriptDone _handle1 || time > _timeout};
+
+ } else {
+ _GetOutDist = 0;
+ };
+
+
+
+ // if there was getout of the cargo
+ if (count _unitsin > 0) then {
+ //if (KRON_UPS_Debug>0) then {player sidechat format["%1: Geting out of vehicle, dist=%2 atdist=%3 _area=%4",_grpidx,([_currpos,_targetpos] call KRON_distancePosSqr),_GetOutDist,_area]};
+ _timeout = time + 7;
+ {
+ waituntil {vehicle _x == _x || !canmove _x || !alive _x || time > _timeout || movetofailed _x };
+ } foreach _unitsin;
+
+
+ // did the leader die?
+ _npc = [_npc,_members] call MON_getleader;
+ if (!alive _npc || !canmove _npc || isplayer _npc ) exitwith {_exit=true;};
+
+ if (_fightmode == "fight" || _gothit) then {
+ _npc setBehaviour "COMBAT"; // AWARE
+ _groupOne = group _npc;
+ _groupOne setFormation "DIAMOND";
+ nul = [_npc,30] spawn MON_move;
+ };
+
+ sleep 0.2;
+ // select leader outside of vehicle
+ {
+ if (alive _x && canmove _x) exitwith {group _x selectLeader _x; _npc = _x};
+ } foreach _unitsin;
+
+
+
+ if (_fightmode == "fight") then {
+ _pursue = true;
+ }else
+ {
+ _pursue = false;
+ _makenewtarget=true;
+ };
+ };
+ };
+ };
+
+
+ //If under attack or increasing knowledge speeds up the response and regain control of the AI
+ if (_gothit) then {
+ _react = if (!_supressed) then {_react + 30};
+ if (_fightmode != "walk") then {
+ if (_nowpType != 3) then {
+ nul = [_npc] call R_FN_deleteObsoleteWaypoints;
+ _nowp = false;
+ };
+ };
+ };
+
+ //If there is no objective order is canceled persecution
+ if ((isNull (_target) || !alive _target )) then {
+ _pursue=false;
+
+ if (_gothit && !_fortify && !_nowp) then {
+ if ((_fightmode == "walk")) then
+ {
+ //It could be a sniper, better be alert and move in case
+ _Behaviour = "COMBAT";
+ _speedmode = "FULL";
+ _unitpos = "AUTO";
+ _gothit = false;
+ _makenewtarget = true;
+ _waiting = -1;
+ if ((random 100 < 20) && !_nosmoke) then {
+ nul= [_npc,_target] spawn MON_throw_grenade;
+ };
+ if (KRON_UPS_Debug>0) then {player sidechat format["%1: Have been damaged moving",_grpidx,_makenewtarget]};
+ } else {
+ if ((_react >= KRON_UPS_react && _lastreact >=_minreact && count _targets <= 0) || _sowounded) then {
+ //We shoot and we have no target, we move from position
+ if (KRON_UPS_Debug>0) then {player sidechat format["%1: Under fire by unkown target, moving to newpos",_grpidx]};
+ //Covers the group with a smoke grenade
+ if (!_supressed && (random 100 < 80) && !_nosmoke) then {
+ nul= [_npc,_target] spawn MON_throw_grenade;
+ };
+ _gothit = false;
+ _makenewtarget = true;
+ _waiting = -1;
+ _pause="NOWAIT";
+ _speedmode = "FULL";
+ _unitpos = "middle";
+ _Behaviour = "AWARE";
+ } else {
+ if (_lastreact >=_minreact && !_targetdead) then
+ {
+ _targetdead = true;
+ _pursue = true;
+ //We have run out of targets continue to search
+ if (KRON_UPS_Debug>0) then {player sidechat format["%1: Target defeated, searching",_grpidx]};
+ };
+ };
+ };
+ };
+ };
+
+
+
+
+
+
+ //If no fixed target check if current target is available
+ if (format ["%1",_fixedtargetPos] != "[0,0]") then {
+ //If fixed target check if close enough or near enemy and gothit
+ if (([_currpos,_fixedtargetpos] call KRON_distancePosSqr) <= _closeenough || (_dist <= _closeenough && _gothit)) then {
+ _fixedtargetPos = [0,0];
+ } else {
+ _pursue = false;
+ _attackPos=_fixedtargetPos;
+ if (_react >= KRON_UPS_react && _lastreact >=_minreact) then {
+ _makenewtarget = true;
+ _unitpos = "AUTO";
+ _speed = "FULL";
+ };
+ };
+ };
+
+
+
+
+
+ //If captive or surrended do not pursue
+ if ( isnil "_attackPos") then {_pursue = false;};
+ if ( captive _target || format ["%1", _attackPos] == "[0,0]") then {_pursue = false;};
+
+ //If no waypoint do not move
+ if (_nowp) then {
+ _makenewtarget = false;
+ _pursue = false;
+ };
+
+ if (_inheli) then {
+ _landing = _heli getVariable "UPSMON_landing";
+ if (isnil ("_landing")) then {_landing=false;};
+ if (_landing) then {
+ _pursue = false;
+ };
+ };
+ sleep 0.5;
+
+// **********************************************************************************************************************
+// PURSUE: CHASE BEGINS THE LENS
+// **********************************************************************************************************************
+
+ if (_pursue) then {
+
+
+ // if (KRON_UPS_Debug>0) then {player sidechat format["%1: is in pursure",_grpidx]};
+
+ _pursue = false;
+ _newpos = true;
+ _react = 0;
+ _lastreact = 0;
+ _timeontarget = 0;
+ _makenewtarget = false;
+ _fm = 1;
+ //Cancel supress effect when reaction time
+ _supressed = false;
+
+ // did the leader die?
+ _npc = [_npc,_members] call MON_getleader;
+ if (!alive _npc || !canmove _npc || isplayer _npc ) exitwith {_exit=true;};
+
+ // get position of spotted unit in player group, and watch that spot
+ _targetPos = _attackPos;
+ _targetX = _targetPos select 0; _targetY = _targetPos select 1;
+ _currPos = getpos _npc;
+
+ // also go into "combat mode"
+ _pause="NOWAIT";
+ _waiting=0;
+
+ // angle from unit to target
+ _dir1 = [_currPos,_targetPos] call KRON_getDirPos;
+ // angle from target to unit (reverse direction)
+ _dir2 = (_dir1+180) mod 360;
+
+ //Establecemos una distancia de flanqueo
+ _flankdist = ((random 0.5)+0.7)*KRON_UPS_safedist;
+
+ //La distancia de flanqueo no puede ser superior a la distancia del objetivo o nos pordra pillar por la espalda
+ _flankdist = if ((_flankdist*1.40) >= _dist) then {_dist*.65} else {_flankdist};
+
+ if (_inheli) then {_flankdist = _flankdist / 2;};
+
+ // avoidance position (right or left of unit)
+ _avoidPos = [_currPos,_dir2, KRON_UPS_safedist] call MON_GetPos2D;
+
+ //Calculamos posicin de avance frontal
+ _frontPos = [_targetPos,_dir2, _flankdist] call MON_GetPos2D;
+
+
+ //Adaptamos el ngulo de flanqueo a la distancia
+ _newflankAngle = ((random(KRON_UPS_flankAngle)+1) * 2 * (_flankdist / KRON_UPS_safedist )) + (KRON_UPS_flankAngle/1.4) ;
+ if (_newflankAngle > KRON_UPS_flankAngle) then {_newflankAngle = KRON_UPS_flankAngle};
+
+ //Calculamos posicin de flanqueo 1 45
+ _dirf1 = (_dir2+_newflankAngle) mod 360;
+ _flankPos = [_targetPos,_dirf1, _flankdist] call MON_GetPos2D;
+
+
+ //Calculamos posicin de flanqueo 2 -45
+ _dirf2 = (_dir2-_newflankAngle+360) mod 360;
+ _flankPos2 = [_targetPos,_dirf2, _flankdist] call MON_GetPos2D;
+
+ if (KRON_UPS_Debug>0) then {
+ "flank1" setmarkerpos _flankPos; "flank2" setmarkerpos _flankPos2; "target" setmarkerpos _attackPos;
+ };
+
+
+ //Decidir por el mejor punto de flanqueo
+ //Contamos las posiciones de destino de otros grupos ms alejadas
+ _fldest = 0;
+ _fldest2 = 0;
+ _fldestfront = 0;
+ _i = 0;
+
+ {
+ if (_i != _grpid && format ["%1", _x] != "[0,0]") then {
+ _dist1 = [_x,_flankPos] call KRON_distancePosSqr;
+ _dist2 = [_x,_flankPos2] call KRON_distancePosSqr;
+ _dist3 = [_x,_frontPos] call KRON_distancePosSqr;
+ if (_dist1 <= _flankdist/1.5 || _dist2 <= _flankdist/1.5 || _dist3 <= _flankdist/1.5) then {
+ if (_dist1 < _dist2 && _dist1 < _dist3) then {_fldest = _fldest + 1;};
+ if (_dist2 < _dist1 && _dist2 < _dist3) then {_fldest2 = _fldest2 + 1;};
+ if (_dist3 < _dist1 && _dist3 < _dist2) then {_fldestfront = _fldestfront + 1;};
+ };
+ };
+ _i = _i + 1;
+
+ sleep 0.01;
+ } foreach KRON_targetsPos;
+
+
+ //We have the positions of other groups more distant
+ _i = 0;
+ {
+ if (_i != _grpid && !isnull(_x)) then {
+ _dist1 = [getpos(_x),_flankPos] call KRON_distancePosSqr;
+ _dist2 = [getpos(_x),_flankPos2] call KRON_distancePosSqr;
+ _dist3 = [getpos(_x),_frontPos] call KRON_distancePosSqr;
+ if (_dist1 <= _flankdist/1.5 || _dist2 <= _flankdist/1.5 || _dist3 <= _flankdist/1.5) then {
+ if (_dist1 < _dist2 && _dist1 < _dist3) then {_fldest = _fldest + 1;};
+ if (_dist2 < _dist1 && _dist2 < _dist3) then {_fldest2 = _fldest2 + 1;};
+ if (_dist3 < _dist1 && _dist3 < _dist2) then {_fldestfront = _fldestfront + 1;};
+ };
+ };
+ _i = _i + 1;
+ sleep 0.01;
+ } foreach KRON_NPCs;
+
+
+
+ //La preferencia es la eleccin inicial de direccin
+ switch (_flankdir) do {
+ case 1:
+ {_prov = 125};
+ case 2:
+ {_prov = -25};
+ default
+ {_prov = 50};
+ };
+
+
+ //Si es positivo significa que hay ms destinos existentes lejanos a la posicion de flanqueo1, tomamos primariamente este
+ if (_fldest<_fldest2) then {_prov = _prov + 50;};
+ if (_fldest2<_fldest) then {_prov = _prov - 50;};
+
+ //Si la provablilidad es negativa indica que tomar el flank2 por lo tanto la provabilidad de coger 1 es 0
+ if (_prov<0) then {_prov = 0;};
+
+
+ //Evaluamos la direccin en base a la provablilidad calculada
+ if ((random 100) <= _prov) then {
+ _flankdir =1;
+ _flankPos = _flankPos; _targettext = "_flankPos";
+ } else {
+ _flankdir =2;
+ _flankPos = _flankPos2; _targettext = "_flankPos2";
+ };
+
+
+ //Posicin de ataque por defecto el flanco
+ _targetPos = _flankPos;
+ _targettext = "_flankPos";
+
+
+ if ((surfaceIsWater _flankPos && !(_isplane || _isboat)) ) then {
+ _targetPos = _attackPos;_targettext ="_attackPos";
+ _flankdir =0;
+ } else {
+ if (_fldestfront < _fldest && _fldestfront < _fldest2) then {
+ _targetPos = _frontPos;_targettext ="_frontPos";
+ };
+ };
+
+
+ //Establish the type of waypoint
+ //DESTROY has worse behavior with and sometimes do not move
+ _wptype = "MOVE";
+
+ //Set speed and combat mode
+ _rnd = random 100;
+ if (_dist <= _closeenough) then {
+ //If we are so close we prioritize discretion fire
+ if ( _dist <= _closeenough/2 ) then {
+ //Close combat modeo
+ _speedmode = "LIMITED";
+ _wpformation = "LINE";
+ _unitpos = "AUTO"; //"Middle"
+ _react = _react + KRON_UPS_react / 2;
+ _minreact = KRON_UPS_minreact / 2;
+ if ((_nomove == "NOMOVE" && _rnd < 25) && !_reinforcementsent) then {
+ //Defensive combat
+ _Behaviour = "STEALTH";
+ _wptype = "HOLD";
+ } else {
+ if (_rnd < 80) then {
+ _Behaviour = "COMBAT"; // (combat / stealth)
+ } else {
+ _Behaviour = "AWARE";
+ };
+ _wptype = "MOVE";
+ _npc setCombatMode "RED";
+ }
+ } else {
+ //If the troop has the role of not moving tend to keep the position
+ _speedmode = "NORMAL";
+ _wpformation = "VEE"; //or VEE
+ _unitpos = "AUTO";// "Middle"
+ _minreact = KRON_UPS_minreact / 1.5;
+ if ((_nomove == "NOMOVE" && _rnd < 50) && !_reinforcementsent) then {
+ //Combate defensivo
+ _Behaviour = "COMBAT";
+ _wptype = "HOLD";
+ } else {
+ if (_rnd < 70) then {
+ _Behaviour = "AWARE";
+ } else {
+ _Behaviour = "COMBAT";
+ };
+ _wptype = "MOVE";
+ _npc setCombatMode "YELLOW";
+ };
+ };
+ } else {
+ if (( _dist <= (_closeenough + KRON_UPS_safedist))) then {
+ _speedmode = "FULL";
+ _wpformation = "WEDGE";
+ _unitpos = if (_rnd < 90) then {"Middle"} else {"AUTO"};
+ _minreact = KRON_UPS_minreact;
+ if ((_nomove=="NOMOVE" && _rnd < 75) && !_reinforcementsent) then {
+ //Combate defensivo
+ _Behaviour = "COMBAT"; //AWARE
+ _wptype = "HOLD";
+ } else {
+ //Movimiento con precaucin (ms rpido)
+ _Behaviour = "AWARE";
+ _wptype = "MOVE";
+ };
+ } else {
+ //In May distance of radio patrol act..
+ if (( _dist < KRON_UPS_sharedist )) then {
+ //Platoon from the target must move fast and to the point
+ _Behaviour = "AWARE";
+ _speedmode = "FULL";
+ _unitpos = if (_rnd < 60) then {"Middle"} else {"AUTO"};
+ _minreact = KRON_UPS_minreact * 2;
+ if ((_nomove=="NOMOVE" && _rnd < 95) && !_reinforcementsent) then {
+ _wptype = "HOLD";
+ _wpformation = "WEDGE";
+ } else {
+ _wptype = "MOVE";
+ _wpformation = "WEDGE";
+ };
+ } else {
+ //Platoon very far from the goal if not move nomove role
+ _Behaviour = "SAFE";
+ _speedmode = "FULL";
+ _unitpos = "AUTO";
+ _minreact = KRON_UPS_minreact * 3;
+
+ if (((_nomove=="NOMOVE") || (_nomove=="MOVE" && _rnd < 70)) && !_reinforcementsent) then {
+ _wptype = "HOLD";
+ _wpformation = "WEDGE";
+ }else{
+ _wptype = "MOVE";
+ _wpformation = "FILE"; //COLUMN
+ };
+ };
+ };
+ };
+
+
+
+ //Always keep the brackets fortified position
+ if ( _fortify && random 100 < 99) then {_wptype = "HOLD"};
+
+ // did the leader die?
+ _npc = [_npc,_members] call MON_getleader;
+ if (!alive _npc || !canmove _npc || isplayer _npc ) exitwith {_exit=true;};
+
+ //If leader is in vehicle will move in anyway
+ if (vehicle _npc != _npc || !_isman) then {
+ _wptype = "MOVE";
+ _Behaviour = "AWARE";
+ if ( _inheli ) then {
+ _speedmode = "FULL";
+ _unitpos = "AUTO";
+ _targetPos = _AttackPos;
+ };
+ };
+
+
+
+
+
+ //Establecemos el target
+ KRON_targetsPos set [_grpid,_targetPos];
+ sleep 0.01;
+
+ //If use statics are enabled leader searches for static weapons near.
+ // Tanks enemies are contabiliced
+ if ( KRON_UPS_useMines && _Mines > 0 ) then {
+ _enemytanksnear = false;
+ {
+ if ( ("Tank" countType [_x] > 0 || "Wheeled_APC" countType [_x] >0
+ || "Tank" countType [vehicle _x] > 0 || "Wheeled_APC" countType [vehicle _x] >0 )
+ && alive _x && canMove _x && _npc distance _x <= _closeenough + KRON_UPS_safedist )
+ exitwith { _enemytanksnear = true; _enemytanknear = _x;};
+ } foreach _targets;
+
+
+
+ //If use mines are enabled and enemy armors near and no friendly armor put mine.
+ if ( _enemytanksnear && !isnull _enemytanknear && alive _enemytanknear ) then {
+ _friendlytanksnear = false;
+ {
+ if (!( alive _x && canMove _x)) then {_friendlytanks = _friendlytanks - [_x]};
+ if (alive _x && canMove _x && _npc distance _x <= _closeenough + KRON_UPS_safedist ) exitwith { _friendlytanksnear = true;};
+ }foreach _friendlytanks;
+
+ if (!_friendlytanksnear && random(100)<30 ) then {
+ _dir1 = [_currPos,position _enemytanknear] call KRON_getDirPos;
+ _mineposition = [position _npc,_dir1, 25] call MON_GetPos2D;
+ _roads = _mineposition nearroads 50;
+ if (count _roads > 0) then {_mineposition = position (_roads select 0);};
+ if ([_npc,_mineposition] call MON_CreateMine) then {
+ _Mines = _Mines -1;
+ if (KRON_UPS_Debug>0) then {player sidechat format["%1: %3 puting mine for %2",_grpidx,typeof _enemytanknear, side _npc]};
+ };
+ };
+ };
+ };
+
+
+
+
+
+ //Si es unidad de refuerzo siempre acosar al enemigo
+ if (_reinforcementsent) then {
+ _wptype="MOVE";
+ _newpos=true;
+ _makenewtarget = false;
+ };
+
+ if (_nofollow=="NOFOLLOW" && _wptype != "HOLD") then {
+ _targetPos = [_targetPos,_centerpos,_rangeX,_rangeY,_areadir] call KRON_stayInside;
+ _targetdist = [_currPos,_targetPos] call KRON_distancePosSqr;
+ if ( _targetdist <= 1 ) then {
+ _wptype="HOLD";
+ };
+ };
+
+ if (_wptype == "HOLD") then {
+ _targetPos = _currPos; _targettext ="_currPos";
+ };
+
+ //Is updated with the latest value, changing the target
+ _lastknown = _opfknowval;
+
+ //If for whatever reason cancels the new position should make clear the parameters that go into pursuit
+ if (!_newpos) then {
+ //If the unit has decided to maintain position but is being attacked is being suppressed, should have the opportunity to react
+ _newpos = _gothit;
+
+ if (!_newpos) then {
+ _targetPos=_lastpos;
+ if (KRON_UPS_Debug>0) then {player sidechat format["%1 Mantaining orders %2",_grpidx,_nomove]};
+ };
+ };
+ if (KRON_UPS_Debug>=1) then {
+ "avoid" setmarkerpos _avoidPos; "flank" setmarkerpos _flankPos; _destname setMarkerPos _targetPos;
+ };
+ }; //END PURSUE
+ sleep 0.1;
+ }; //((_isSoldier) && ((count _enemies)>0)
+
+
+// **********************************************************************************************************************
+// NO NEWS
+// **********************************************************************************************************************
+ if !(_newpos) then {
+ // did the leader die?
+ _npc = [_npc,_members] call MON_getleader;
+ if (!alive _npc || !canmove _npc || isplayer _npc ) exitwith {_exit=true;};
+
+ // calculate new distance
+ // if we're waiting at a waypoint, no calculating necessary
+ _currpos = getpos _npc;
+
+
+
+ //Sets behaviour of squad if nearly changes of target
+ if (_targetsnear) then{
+ if (( toUpper(_Behaviour) IN _safemode) && _isSoldier) then {
+ _Behaviour = "AWARE";
+ _npc setBehaviour _Behaviour;
+ };
+ };
+
+
+
+ //If in safe mode if find dead bodies change behaviour
+ if ((toUpper(_Behaviour) IN _safemode) && _deadBodiesReact)then {
+ _unitsin = [_npc,_buildingdist] call MON_deadbodies;
+ if (count _unitsin > 0) then {
+ if !_isSoldier then {
+ _npc setSpeedMode "FULL";
+ } else {
+ if ( random 100 < 75) then {
+ _Behaviour = "AWARE";
+ } else {
+ _Behaviour = "COMBAT";
+ };
+ _react = _react + 30;
+ _npc setBehaviour _Behaviour;
+ if (KRON_UPS_Debug>0) then {player sidechat format["%1 dead bodies found! set %2",_grpidx,_Behaviour, count _targets]};
+ };
+ };
+ };
+
+
+ //Stuck control
+ if (!_nowp && alive _npc && canmove _npc && _wptype == "MOVE" && _timeontarget >= 60 && _lastcurrpos select 0 == _currpos select 0 && _lastcurrpos select 1 == _currpos select 1) then {
+ [_npc] call MON_cancelstop;
+ _makenewtarget = true;
+ if (KRON_UPS_Debug>0) then {player sidechat format["%1 stucked, moving",_grpidx]};
+ };
+
+ _lastpos = _targetPos;
+ _lastcurrpos = _currpos; //sets last currpos for avoiding stuk
+
+ if (_waiting<0) then {
+ //Gets distance to targetpos
+ _targetdist = [_currPos,_targetPos] call KRON_distancePosSqr;
+
+ //It assesses whether it has exceeded the maximum waiting time and the objective is already shot to return to the starting position.
+ if (_fightmode!="walk") then {
+ if (_timeontarget > KRON_UPS_alerttime && count _targets <= 0 && ( isNull (_target) || !alive (_target) || captive _target)) then {
+ _pursue = false;
+ _gothit = false;
+ _targetdead = true;
+ _fightmode = "walk";
+ _speedmode = _orgSpeed;
+ _targetPos = _currPos;
+ _reinforcementsent = false;
+ _target = objnull;
+ _fixedtargetPos = [0,0];
+ _Behaviour = _orgMode;
+ _waiting = -1;
+ _unitpos = "AUTO";
+ _wpformation = "WEDGE";
+
+ KRON_UPS_reinforcement = false; //there is no threat
+ if (_rfid > 0 ) then {
+ call (compile format ["KRON_UPS_reinforcement%1 = false;",_rfid]);
+ };
+
+ {[_x,"AUTO"] spawn MON_setUnitPos;} foreach units _npc;
+ _npc setBehaviour _orgMode;
+
+ if (KRON_UPS_Debug>0) then {player sidechat format["%1 Without objectives, leaving combat mode",_grpidx]};
+ };
+ };
+
+
+ //if (KRON_UPS_Debug>0) then {player globalchat format["%1 _targetdist %2 atdist=%3 dist=%4",_grpidx, _targetdist, _area/8,_dist]};
+ // if not in combat and we're either close enough, seem to be stuck, or are getting damaged, so find a new target
+ if (!_nowp && (!_gothit) && (!_swimming) && (_fightmode == "walk") && (( _targetdist <= (_area/4) || moveToFailed _npc) && (_timeontarget > KRON_UPS_maxwaiting))) then {
+ _makenewtarget=true;
+ _unitpos = "AUTO";
+ _Behaviour = _orgMode;
+ };
+
+ // make new target
+ if (_makenewtarget) then
+ {
+ _gothit = false;
+ _react = 0;
+ _lastreact = 0;
+ _makenewtarget = false;
+ _timeontarget = 0;
+ _wptype = "MOVE";
+
+ if (format ["%1",_fixedtargetPos] !="[0,0]") then {
+ _targetPos = _fixedtargetPos; _targettext ="Reinforcement";
+ } else {
+
+ if ((_nomove=="NOMOVE") && (_timeontarget>KRON_UPS_alerttime)) then {
+ if (KRON_UPS_Debug>0) then {player sidechat format["nomove: %1",_nomove]};
+ if (([_currPos,_orgPos] call KRON_distancePosSqr)<_closeenough) then {
+ _newpos = false;
+ _wptype = "HOLD";
+ _waiting = 9999;
+ if (_fortify) then {
+ _minreact = KRON_UPS_minreact * 3;
+ _buildingdist = _buildingdist * 2;
+ _wait = 3000;
+ };
+ } else {
+ _targetPos=_orgPos; _targettext ="_orgPos";
+ };
+ } else {
+
+ //rStuckControl !R
+ _rcurrPos = getpos _npc;
+ if (_rlastPos select 0 == _rcurrPos select 0 && _rlastPos select 1 == _rcurrPos select 1) then {
+
+ if (KRON_UPS_Debug>0) then {player sidechat format["%1 !RstuckControl try to move",_grpidx]};
+ if (vehicle _npc != _npc) then {
+ _rstuckControl = _rstuckControl + 1;
+ if (_rstuckControl > 1) then {
+ _jumpers = crew (vehicle _npc);
+ {
+ _x spawn MON_doGetOut;
+ sleep 0.5;
+ } forEach _jumpers;
+
+ } else {
+ nul = [vehicle _npc] spawn MON_domove;
+ }
+
+ } else {
+ nul = [_npc,25] spawn MON_domove;
+ };
+
+ } else {
+ _rstuckControl = 0;
+ };
+ _rlastPos = _rcurrPos;
+
+
+
+ // re-read marker position/size
+ _centerpos = getMarkerPos _areamarker; _centerX = abs(_centerpos select 0); _centerY = abs(_centerpos select 1);
+ _centerpos = [_centerX,_centerY];
+ _areasize = getMarkerSize _areamarker; _rangeX = _areasize select 0; _rangeY = _areasize select 1;
+ _areadir = (markerDir _areamarker) * -1;
+
+ // find a new target that's not too close to the current position
+ _targetPos=_currPos; _targettext ="newTarget";
+ _tries=0;
+
+ while {((([_currPos,_targetPos] call KRON_distancePosSqr) < _mindist)) && (_tries<50)} do {
+ _tries=_tries+1;
+ // generate new target position
+ _targetPos = [_centerX,_centerY,_rangeX,_rangeY,_cosdir,_sindir,_areadir] call KRON_randomPos;
+
+ _loop2=FALSE;
+ // boat or plane
+ // if (KRON_UPS_Debug>0) then {player sidechat format["%1, type: %2",_npc, typeOf _npc]}; sleep 4;
+ // if (KRON_UPS_Debug>0) then {player sidechat format["%1 isplane",_isplane]}; sleep 4;
+ if (_isplane || _isboat) then {
+ // boat
+ if (_isboat) then {
+ _tries2=0;
+ while {(!_loop2) && (_tries2 <50)} do {
+ _tries2=_tries2+1;
+ _targetPosTemp = [_centerX,_centerY,_rangeX,_rangeY,_cosdir,_sindir,_areadir] call KRON_randomPos;
+ if (surfaceIsWater _targetPosTemp) then {
+ _targetPos = _targetPosTemp;
+ _loop2 = TRUE;
+ // if (KRON_UPS_Debug>0) then {player sidechat format["%1 Boat just got new targetPos",_grpidx]};
+ };
+ sleep 0.05;
+ };
+
+ // plane
+ } else {
+ _targetPos = [_centerX,_centerY,_rangeX,_rangeY,_cosdir,_sindir,_areadir] call KRON_randomPos;
+ // if (KRON_UPS_Debug>0) then {player sidechat format["%1 Plane just got new targetPos",_grpidx]};
+ };
+
+ // man or car
+ } else {
+ // "_onroad"
+ if _onroad then {
+ _tries2=0;
+ while {(!_loop2) && (_tries2 <100)} do {
+ _tries2=_tries2+1;
+
+ _targetPosTemp = [_centerX,_centerY,_rangeX,_rangeY,_cosdir,_sindir,_areadir] call KRON_randomPos;
+ _roads = (_targetPosTemp nearRoads 50);
+ if ((count _roads) > 0) then {
+ _targetPosTemp = getpos (_roads select 0);
+ _targetPos = _targetPosTemp;
+ _loop2 = TRUE;
+ // if (KRON_UPS_Debug>0) then {player sidechat format["%1 Onroad just got new targetPos",_grpidx]};
+ };
+ sleep 0.05;
+ };
+ // any place on ground
+ } else {
+
+ _tries2=0;
+ while {(!_loop2) && (_tries2 <100)} do {
+ _tries2=_tries2+1;
+ _targetPosTemp = [_centerX,_centerY,_rangeX,_rangeY,_cosdir,_sindir,_areadir] call KRON_randomPos;
+ if (!surfaceIsWater _targetPosTemp) then {
+ _targetPos = _targetPosTemp;
+ _loop2 = TRUE;
+ //if (KRON_UPS_Debug>0) then {player sidechat format["%1 Man just got new TP %2, %3",_grpidx,_targetPos,_tries2]};
+ };
+ sleep 0.05;
+ };
+
+ };
+ };
+ };
+ };
+ };
+ sleep 0.05;
+
+
+ // distance to target position
+ _avoidPos = [0,0]; _flankPos = [0,0]; _attackPos = [0,0]; _frontPos = [0,0];
+ _fm=0;
+ _newpos=true;
+ };
+ };
+ };
+
+ // if in water, get right back out of it again
+ if (surfaceIsWater _currPos) then {
+ if (_isman && !_swimming) then {
+ _drydist=999;
+ // look around, to find a dry spot
+ for [{_a=0}, {_a<=270}, {_a=_a+90}] do {
+ _dp=[_currPos,30,_a] call KRON_relPos;
+ if !(surfaceIsWater _dp) then {_targetPos=_dp};
+ };
+ _newpos=true;
+ _swimming=true;
+ };
+ } else {
+ _swimming=false;
+ };
+
+ sleep 0.5;
+
+
+// **********************************************************************************************************************
+// NEWPOS: SE EJECUTA LA ORDEN DE MOVIMIENTO
+// **********************************************************************************************************************
+// if (KRON_UPS_Debug>0) then {player sidechat format["%1 rea=%2 wai=%3 tim=%4 tg=%5 %6",_grpidx,_react,_waiting,_timeontarget,typeof _target,alive _target]};
+ if ((_waiting<=0) && _newpos) then {
+
+ // did the leader die?
+ _npc = [_npc,_members] call MON_getleader;
+ if (!alive _npc || !canmove _npc || isplayer _npc ) exitwith {_exit=true;};
+
+ _currPos = getpos _npc;
+ _newpos = false;
+ _waiting = -1;
+ _swimming=false;
+ _GetIn_NearestVehicles = false;
+
+ //Gets distance to targetpos
+ _targetdist = [_currPos,_targetPos] call KRON_distancePosSqr;
+
+ //If gothit and not in vehicle
+ if (_gothit && _npc == vehicle (_npc) && alive _npc ) then {
+
+ //Unidad suprimida
+ if ((random 100) <50) then {
+ //if (KRON_UPS_Debug>0) then {player sidechat format["%1 supressed by fire",_grpidx]};
+
+ //The unit is deleted, delete the current waypoint
+ _supressed = true;
+ _targetPos = _currPos; _targettext ="SUPRESSED";
+ _wptype = "HOLD";
+
+ //Prone
+ {
+ //Motion vanishes
+ if ( _x iskindof "Man" && canmove _x && alive _x) then {
+ if ((random 100)<40 || (primaryWeapon _x ) in KRON_UPS_MG_WEAPONS) then {[_x,"DOWN",20] spawn MON_setUnitPosTime;
+ }else{ [_x,"Middle"] spawn MON_setUnitPos;};
+ };
+ sleep 0.01;
+ } foreach units _npc;
+
+ //All Retreat!!
+ if ((random 100)<=60 && morale _npc < 0) then {
+ _targetPos = _avoidPos;_targettext = "_avoidPos";
+ _wptype = "MOVE";
+ _flankdir = 0;
+ if (!_newpos && KRON_UPS_Debug>0) then {player sidechat format["%1 All Retreat!!!",_grpidx]};
+ };
+ };
+
+ if ((random 100) < 15 && _targettext == "_avoidPos" && !_nosmoke) then {
+ [_npc,_target] call MON_throw_grenade;
+ };
+ sleep 0.5;
+ };
+
+
+
+
+ // did the leader die?
+ _npc = [_npc,_members] call MON_getleader;
+ if (!alive _npc || !canmove _npc || isplayer _npc ) exitwith {_exit=true;};
+
+ //If you have not been removed progress continue
+ if (alive _npc) then {
+ _currPos = getpos _npc;
+
+ if ( _wptype == "MOVE") then {
+
+ //Try to avoid stucked soldiers out of vehicles
+ if ( _npc == vehicle _npc) then {
+ {
+ if (alive _x && canmove _x) then {
+ //[_x] spawn MON_cancelstop;
+ [_x] dofollow _npc;
+ };
+ } foreach _members;
+ };
+ sleep 0.05;
+
+ //Search for vehicle
+ if ((!_gothit && _targetdist >= ( KRON_UPS_searchVehicledist )) && _isSoldier && !_noveh) then {
+
+ if ( vehicle _npc == _npc && _dist > _closeenough ) then {
+
+ _unitsIn = [_grpid,_npc] call MON_GetIn_NearestVehicles;
+
+ if ( count _unitsIn > 0) then {
+ _GetIn_NearestVehicles = true;
+ _speedmode = "FULL";
+ _unitpos = "AUTO";
+ _npc setbehaviour "SAFE";
+ _npc setspeedmode "FULL";
+ _timeout = time + 60;
+
+ _vehicle = objnull;
+ _vehicles = [];
+ {
+ waituntil {vehicle _x != _x || !canmove _x || !canstand _x || !alive _x || time > _timeout || movetofailed _x};
+
+ if ( vehicle _x != _x && (isnull _vehicle || _vehicle != vehicle _x)) then {
+ _vehicle = vehicle _x ;
+ _vehicles = _vehicles + [_vehicle]
+ };
+ }foreach _unitsIn;
+ sleep 1;
+
+ {
+ _vehicle = _x;
+ _cargo = _vehicle getvariable ("UPSMON_cargo");
+ if ( isNil("_cargo")) then {_cargo = [];};
+ _cargo ordergetin true;
+
+ //Wait for other groups to getin
+ {
+ waituntil {vehicle _x != _x || !canmove _x || !canstand _x || !alive _x || time > _timeout || movetofailed _x};
+ } foreach _cargo;
+
+ //Starts gunner control
+ nul = [_vehicle] spawn MON_Gunnercontrol;
+ sleep 0.1;
+ // nul = [_x,30] spawn MON_domove; //!R just little kick to make sure it moves
+ } foreach _vehicles;
+
+ //Cheks if leader has dead until wait
+ _npc = [_npc,_members] call MON_getleader;
+ if (!alive _npc || !canmove _npc) exitwith {_exit=true;};
+
+
+ if ( "Air" countType [vehicle (_npc)]>0) then {
+ _rnd = (random 2) * 0.1;
+ _flyInHeight = round(KRON_UPS_flyInHeight * (0.9 + _rnd));
+ vehicle _npc flyInHeight _flyInHeight;
+
+ //If you just enter the helicopter landing site is defined
+ if (_GetIn_NearestVehicles) then {
+ _GetOutDist = round(((KRON_UPS_paradropdist ) * (random 100) / 100 ) + 150);
+
+ [vehicle _npc, _TargetPos, _GetOutDist, 90] spawn MON_doParadrop; // org _flyInHeight
+ sleep 1;
+ //Execute control stuck for helys
+ [vehicle _npc] spawn MON_HeliStuckcontrol;
+ if (KRON_UPS_Debug>0 ) then {player sidechat format["%1: flyingheiht=%2 paradrop at dist=%3",_grpidx, _flyInHeight, _GetOutDist,_rnd]};
+ };
+ };
+ };
+ };
+ };
+ };
+ sleep 0.05;
+
+
+ //Get in combat vehicles
+ if (!_gothit && !_GetIn_NearestVehicles && _fightmode != "walk" && _isSoldier) then {
+ _dist2 = _dist / 4;
+ if ( _dist2 <= 100 ) then {
+ _unitsIn = [];
+ _unitsIn = [_grpid,_npc,_dist2,false] call MON_GetIn_NearestCombat;
+ _timeout = time + (_dist2/2);
+
+ if ( count _unitsIn > 0) then {
+ if (KRON_UPS_Debug>0 ) then {player sidechat format["%1: Geting in combat vehicle targetdist=%2",_grpidx,_npc distance _target]};
+ _npc setbehaviour "SAFE";
+ _npc setspeedmode "FULL";
+
+ {
+ waituntil {vehicle _x != _x || !canmove _x || !canstand _x || !alive _x || time > _timeout || movetofailed _x};
+ }foreach _unitsIn;
+
+ // did the leader die?
+ _npc = [_npc,_members] call MON_getleader;
+ if (!alive _npc || !canmove _npc || isplayer _npc ) exitwith {_exit=true;};
+
+ //Return to combat mode
+ _npc setbehaviour _Behaviour;
+ _timeout = time + 150;
+ {
+ waituntil {vehicle _x != _x || !canmove _x || !alive _x || time > _timeout || movetofailed _x};
+ }foreach _unitsIn;
+
+ {
+ if ( vehicle _x iskindof "Air") then {
+ //moving hely for avoiding stuck
+ if (driver vehicle _x == _x) then {
+ _vehicle = vehicle (_x);
+ nul = [_vehicle,1000] spawn MON_domove;
+ //Execute control stuck for helys
+ [_vehicle] spawn MON_HeliStuckcontrol;
+ if (KRON_UPS_Debug>0 ) then {player sidechat format["%1: Geting in combat vehicle after",_grpidx,_npc distance _target]};
+ };
+ };
+
+ if (driver vehicle _x == _x) then {
+ //Starts gunner control
+ nul = [vehicle _x] spawn MON_Gunnercontrol;
+ };
+ sleep 0.01;
+ }foreach _unitsIn;
+ };
+
+ };
+ };
+
+
+
+ sleep 0.05;
+ // did the leader die?
+ _npc = [_npc,_members] call MON_getleader;
+ if (!alive _npc || !canmove _npc || isplayer _npc ) exitwith {_exit=true;};
+
+ //If use statics are enabled leader searches for static weapons near.
+ if ((KRON_UPS_useStatics && (vehicle _npc == _npc) && !_GetIn_NearestVehicles && _isSoldier ) && ((_wptype == "HOLD" && (random 100) < 80) || (_wptype != "HOLD" && (random 100) < 60))) then {
+
+ _unitsIn = [_grpid,_npc,_buildingdist] call MON_GetIn_NearestStatic;
+
+ if ( count _unitsIn > 0) then {
+ _npc setbehaviour "SAFE";
+ _npc setspeedmode "FULL";
+ _timeout = time + 60;
+
+ {
+ waituntil {vehicle _x != _x || !canmove _x || !alive _x || time > _timeout || movetofailed _x};
+ }foreach _unitsIn;
+
+ };
+ sleep 0.05;
+ };
+ // did the leader die?
+ _npc = [_npc,_members] call MON_getleader;
+ if (!alive _npc || !canmove _npc || isplayer _npc ) exitwith {_exit=true;};
+
+ //Buildings usage.
+ if (!_GetIn_NearestVehicles) then {
+ if ( _wptype == "HOLD" && vehicle _npc == _npc && ( _fortify ||(random 100) < 60) ) then {
+ //if (KRON_UPS_Debug>0) then {player sidechat format["%1: Moving to nearest buildings",_grpidx]};
+ [_npc,_buildingdist,false,_wait] spawn MON_moveNearestBuildings;
+ } else {
+ //If we are close enough patrol in buildings for searching enemies
+ if ((( _wptype != "HOLD" && vehicle _npc == _npc && (random 100) < 90 )
+ && _npc == vehicle _npc && _dist <= ( _closeenough ))) then {
+ [_npc,_buildingdist,true] spawn MON_moveNearestBuildings;
+ };
+ };
+ sleep 0.05;
+ };
+
+ // did the leader die?
+ _npc = [_npc,_members] call MON_getleader;
+ if (!alive _npc || !canmove _npc || isplayer _npc ) exitwith {_exit=true;};
+
+ if (isnull _grp || _grp != group _npc) then {
+ _grp = group _npc;
+ };
+
+
+ _index = currentWaypoint _grp;
+
+ //If the waypoing is different than it has or is different from what we set hold
+ IF (_wptype != "HOLD" || _lastwptype != _wptype) then {
+ //Has not completed or are waypoints
+ //_index = 1 Waypoint by default, not use.
+ if ( _index == 1 || _index > count waypoints _grp && !isnull _grp) then {
+ _wp = _grp addWaypoint [_targetPos, 0];
+ _index = _wp select 1;
+ // if (KRON_UPS_Debug>0) then {player sidechat format["%1: created wp %2 index %3",_grpidx,_wp, _index]};
+ } else {
+ _wp = [_grp,_index];
+ // if (KRON_UPS_Debug>0) then {player globalchat format["%1: not created wp %2 index %3 %4",_grpidx,_wp, _index,_targetPos]};
+ };
+ };
+
+ // _wp = [_grp,_index];
+
+
+
+ // if iscar the run fast if targetpost is far.
+ if ((!_gothit && _targetdist >= (_closeenough * 1.5)) && (vehicle _npc != _npc)) then {
+ _speedmode = "FULL";
+ } else {
+ // _speedmode = _orgSpeed;
+ };
+
+
+
+ //We define the parameters of the new waypoint
+ _wp setWaypointType _wptype;
+ _wp setWaypointPosition [_targetPos, 0];
+ _wp setWaypointFormation _wpformation;
+ _wp setWaypointSpeed _speedmode;
+ _lastwptype = _wptype;
+
+
+ //If you have more than 1 waypoints delete the obsolete
+ {
+ if ( _x select 1 < _index ) then {
+ deleteWaypoint _x;
+ };
+ sleep 0.05;
+ } foreach waypoints _grp;
+
+
+ //if (KRON_UPS_Debug>0) then {diag_log format["%1: waypoints %2 %3 %4 %5",_grpidx,count waypoints _grp, _grp, group _npc, group (leader _npc)]};
+
+ //Sets behaviour
+ if (toupper(behaviour _npc) != toupper (_Behaviour)) then {
+ _npc setBehaviour _Behaviour;
+ };
+
+ //Refresh position vector
+ KRON_targetsPos set [_grpid,_targetPos];
+
+ //Although there are predefined type of movement to a small percentage will vary on an individual level
+
+
+ {
+ if ((random 100)<95 && _x == vehicle _x && _x iskindof "Man" && !((primaryWeapon _x ) in KRON_UPS_MG_WEAPONS)) then {
+ nul = [_x,_unitpos] spawn MON_setUnitPos;
+ }else{
+ nul = [_x,"AUTO"] spawn MON_setUnitPos;
+ };
+ } foreach units _npc;
+
+
+ //If closeenough will leave some soldiers doing supress fire
+ if (_gothit || _dist <= _closeenough) then {
+ {
+ if (!canStand _x || ((primaryWeapon _x ) in KRON_UPS_MG_WEAPONS) || (vehicle _x == _x && _x iskindof "Man" && (random 100) < 50) ) then {
+ _x suppressFor 15;
+ };
+ } foreach units _npc;
+ };
+ };
+
+
+ _gothit = false;
+
+
+ //if (KRON_UPS_Debug>0) then {player sidechat format["%1: %2 %3 %4 %5 %6 %7 %8 %9 %10",_grpidx, _wptype, _targettext,_dist, _speedmode, _unitpos, _Behaviour, _wpformation,_fightmode,count waypoints _grp];};
+ };
+
+ if (_track=="TRACK") then {
+ switch (_fm) do {
+ case 1:
+ {_destname setmarkerSize [.4,.4]};
+ case 2:
+ {_destname setmarkerSize [.6,.6]};
+ default
+ {_destname setmarkerSize [.5,.5]};
+ };
+ _destname setMarkerPos _targetPos;
+
+ };
+
+ //If in hely calculations must done faster
+ if (_isplane || _inheli) then {
+ _currcycle = _cycle/2;
+ _flyInHeight = KRON_UPS_flyInHeight;
+ vehicle _npc flyInHeight _flyInHeight;
+
+ };
+
+ if ((_exit) || (isNil("_npc"))) then {
+ _loop=false;
+ } else {
+ // slowly increase the cycle duration after an incident
+ sleep _currcycle;
+ };
+
+}; //while {_loop}
+
+
+ if (KRON_UPS_Debug>0) then {hint format["%1 exiting mainloop",_grpidx]};
+
+ //Limpiamos variables globales de este grupo
+ KRON_targetsPos set [_grpid,[0,0]];
+ KRON_NPCs set [_grpid,objnull];
+ KRON_UPS_Exited=KRON_UPS_Exited+1;
+
+ if (_track=="TRACK") then {
+ //_trackername setMarkerType "Dot";
+ _trackername setMarkerType "Empty";
+ _destname setMarkerType "Empty";
+ };
+
+ //Gets dist from orinal pos
+ if (!isnull _target) then {
+ _dist = ([_orgpos,position _target] call KRON_distancePosSqr);
+ };
+ // if (KRON_UPS_Debug>0) then {player sidechat format["%1 _dist=%2 _closeenough=%3",_grpidx,_dist,_closeenough]};
+
+ //does respawn of group =====================================================================================================
+ if (_respawn && _respawnmax > 0 && !_surrended && _dist > _closeenough) then {
+ if (KRON_UPS_Debug>0) then {player sidechat format["%1 doing respawn",_grpidx]};
+
+ // copy group leader
+ _unittype = _membertypes select 0;
+
+ // make the clones civilians
+ // use random Civilian models for single unit groups
+ if ((_unittype=="Civilian") && (count _members==1)) then {_rnd=1+round(random 20); if (_rnd>1) then {_unittype=format["Civilian%1",_rnd]}};
+
+ _grp=createGroup _side;
+ _lead = _grp createUnit [_unittype, _orgpos, [], 0, "form"];
+ _lead setVehicleInit _initstr;
+ [_lead] join _grp;
+ _grp selectLeader _lead;
+
+ // copy team members (skip the leader)
+ _i=0;
+ {
+ _i=_i+1;
+ if (_i>1) then {
+ _newunit = _grp createUnit [_x, _orgpos, [],0,"form"];
+ _newunit setVehicleInit _initstr;
+ [_newunit] join _grp;
+ sleep 0.1;
+ };
+ } foreach _membertypes;
+
+
+ if ( _lead == vehicle _lead) then {
+ {
+ if (alive _x && canmove _x) then {
+ [_x] dofollow _lead;
+ };
+ sleep 0.1;
+ } foreach units _lead;
+ };
+
+ {
+ _targetpos = _orgpos findEmptyPosition [10, 200];
+ sleep .4;
+ if (count _targetpos <= 0) then {_targetpos = _orgpos};
+ //if (KRON_UPS_Debug>0) then {player globalchat format["%1 create vehicle _newpos %2 ",_x,_targetpos]};
+ _newunit = _x createvehicle (_targetpos);
+ } foreach _vehicletypes;
+
+
+ //if (KRON_UPS_Debug>0) then {player globalchat format["%1 _vehicletypes: %2",_grpidx, _vehicletypes]};
+
+ //Set new parameters
+ if (!_spawned) then {
+
+ _UCthis = _UCthis + ["SPAWNED"];
+
+ if ((count _vehicletypes) > 0) then {
+ _UCthis = _UCthis + ["VEHTYPE:"] + ["dummyveh"];
+ };
+ };
+
+
+ _UCthis set [0,_lead];
+ _respawnmax = _respawnmax - 1;
+ _UCthis = ["RESPAWN:",_respawnmax,_UCthis] call KRON_UPSsetArg;
+ sleep 0.1;
+ _UCthis = ["VEHTYPE:",_vehicletypes,_UCthis] call KRON_UPSsetArg;
+
+
+ // if (KRON_UPS_Debug>0) then {player globalchat format["%1 _UCthis: %2",_grpidx,_UCthis]};
+ //Exec UPSMON script
+ _UCthis SPAWN UPSMON;
+ sleep 0.1;
+ processInitCommands;
+ };
+
+ _friends=nil;
+ _enemies=nil;
+ _enemytanks = nil;
+ _friendlytanks = nil;
+ _roads = nil;
+ _targets = nil;
+ _members = nil;
+ _membertypes = nil;
+ _UCthis = nil;
+
+ if (!alive _npc) then {
+ deleteGroup _grp;
+ }; \ No newline at end of file
diff --git a/Server/Module/UPSMON/UPSMON/!R/R_functions.sqf b/Server/Module/UPSMON/UPSMON/!R/R_functions.sqf
new file mode 100644
index 0000000..396892f
--- /dev/null
+++ b/Server/Module/UPSMON/UPSMON/!R/R_functions.sqf
@@ -0,0 +1,343 @@
+/*
+ autor: !R
+
+ 5.1.0
+*/
+
+
+
+// get new position [x,y,x] from pos in distance and angle.
+// [_pos, _distance, _angle] call R_relPos3D;
+// [newX,newY,Z]
+R_relPos3D =
+ {
+ private["_p","_d","_a","_x","_y","_z","_xout","_yout"];
+ _p=_this select 0;
+ _x=_p select 0;
+ _y=_p select 1;
+ _z=_p select 2;
+ _d=_this select 1;
+ _a=_this select 2;
+ _xout=_x + sin(_a) * _d;
+ _yout=_y + cos(_a) * _d;
+ [_xout,_yout,_z]
+ };
+
+
+// [_unit] spawn R_ThrowSmoke;
+R_ThrowSmoke =
+ {
+ private ["_unit","_shell",
+ "_moves","_unitPos","_pos","_flare","_direction"];
+
+ /*
+ _stanThrow = ["AwopPercMstpSgthWrflDnon_Start1", "AwopPercMstpSgthWrflDnon_Throw1","AwopPercMstpSgthWrflDnon_End1"];
+ _kneeThrow = ["AwopPknlMstpSgthWrflDnon_Start", "AwopPknlMstpSgthWrflDnon_Throw" ,"AwopPknlMstpSgthWrflDnon_End"];
+ _proneThrow= ["AwopPpneMstpSgthWrflDnon_Start", "AwopPpneMstpSgthWrflDnon_Throw" ,"AwopPpneMstpSgthWrflDnon_End"];
+ */
+
+ _moves = ["AwopPercMstpSgthWrflDnon_Start1","AwopPknlMstpSgthWrflDnon_Start","AwopPpneMstpSgthWrflDnon_Start"];
+
+ _unit = _this select 0;
+ _shell = "SmokeShell";
+ _unitPos = unitPos _unit;
+
+ //Animation
+ switch (_unitPos) do {
+
+ case "Auto":
+ {
+ _unit playMove (_moves select 1);
+ };
+
+ case "Up":
+ {
+ _unit playMove (_moves select 0);
+ };
+
+ case "Middle":
+ {
+ _unit playMove (_moves select 1);
+ };
+
+ case "Down":
+ {
+ _unit playMove (_moves select 2);
+ };
+ };
+
+ sleep 4;
+ _direction = direction _unit;
+
+ // use such bypass as setvelocity does not work in MP
+ _pos = position _unit;
+ _pos = [(_pos select 0),(_pos select 1),(_pos select 2)+1.5];
+ _pos = [_pos, 18, _direction] call R_relPos3D;
+
+ if (alive _unit && canmove _unit) then {
+ _flare = _shell createVehicle _pos;
+ };
+
+ // setvelocity does not work in MP http://dev-heaven.net/issues/17949
+ /*
+ _vector = [18,direction _unit,0] call C B A_fnc_polar2vect;
+
+ _pos=position _unit;
+ _pos=[(_pos select 0),(_pos select 1),(_pos select 2)+2];
+ _flare = _shell createVehicle _pos;
+ _flare setPos _pos;
+ _flare setvelocity _vector;
+
+ */
+ };
+
+
+
+ // [_unit] call R_FN_deleteObsoleteWaypoints;
+ // leave only the last way point
+ R_FN_deleteObsoleteWaypoints =
+ {
+ private ["_unit","_grp"];
+
+ _unit = _this select 0;
+ _grp = group _unit;
+ while {(count (waypoints _grp)) > 1} do
+ {
+ deleteWaypoint ((waypoints _grp) select 0);
+ };
+ };
+
+
+
+ // array = [_npc] call R_FN_vehiclesUsedByGroup;
+ // return array of vehicles used by group
+ R_FN_vehiclesUsedByGroup =
+ {
+ private ["_npc","_vehicles"];
+
+ _npc = _this select 0;
+ _vehicles = [];
+
+ if (!alive _npc) exitwith {};
+
+ {
+ if (( vehicle _x != _x || !(_x iskindof "Man")) && !((vehicle _x) in _vehicles)) then {
+ _vehicles = _vehicles + [vehicle _x];
+ };
+ } foreach units _npc;
+
+ _vehicles
+ };
+
+
+ // array = [_vehicle] call R_FN_unitsInCargo;
+ // array of units in cargo of the vehicle (in vehicle and assigned as cargo)
+ R_FN_unitsInCargo =
+ {
+ private ["_vehicle","_x","_unitsInCargo"];
+
+ _vehicle = _this select 0;
+ _unitsInCargo = [];
+ {
+ if( (assignedVehicleRole _x) select 0 == "Cargo") then
+ {
+ _unitsInCargo = _unitsInCargo + [_x];
+ };
+ } forEach crew _vehicle;
+
+ _unitsInCargo
+ };
+
+
+
+
+
+ // array = [_npc] call R_FN_allUnitsInCargo;
+ // array of all units in cargo of the group (not driver, commander or gunner)
+ R_FN_allUnitsInCargo =
+ {
+ private ["_npc","_vehicles","_unitsInCargo","_allUnitsInCargo"];
+
+ _npc = _this select 0;
+ if (!alive _npc) exitwith {};
+
+ _allUnitsInCargo =[];
+
+ _vehicles = [_npc] call R_FN_vehiclesUsedByGroup;
+
+ {
+ _unitsInCargo = [_x] call R_FN_unitsInCargo;
+ _allUnitsInCargo = _allUnitsInCargo + _unitsInCargo;
+
+ } foreach _vehicles;
+
+ _allUnitsInCargo
+ };
+
+
+ // old MON_GetOutDist
+ // <- _npc
+ // <- _targetPos: position for exiting(if no waypoint used)
+ // <- _atdist: minimal dist to the _targetpos do getout
+ // -> nothing
+ // nul = [_npc,_targetpos,_atdist] spawn R_SN_GetOutDist;
+ R_SN_GetOutDist = {
+ private["_vehicle","_npc","_target","_atdist","_getout","_dogetout","_driver","_commander","_targetpos","_dist","_vehpos","_vehicles"];
+
+ _npc = _this select 0;
+ _targetpos = _this select 1;
+ _atdist = _this select 2; // minimal dist to the target to do getOut
+
+ _dogetout = []; // units to do getout
+ _vehicles = []; // vehs used by the group
+
+ if (!alive _npc) exitwith{};
+
+ _vehicle = vehicle _npc;
+ _vehpos = getpos _vehicle;
+
+ _dist = round([_vehpos,_targetpos] call KRON_distancePosSqr); // dist to the target
+
+ // if (KRON_UPS_Debug>0) then {player sidechat format["%1: Getoutdist dist=%2 atdist=%3 ",typeof _vehicle,_dist, _atdist]};
+
+ // if _npc is in vehicle
+ if ( _vehicle != _npc || !(_npc iskindof "Man")) then {
+
+ if ( (_dist) <= _atdist ) then {
+ _vehicles = [_npc] call R_FN_vehiclesUsedByGroup; // vehicles use by the group
+ {
+ _dogetout = [_x] call R_FN_unitsInCargo; // units cargo in the vehicle
+ _driver = driver _x;
+
+ if ( count _dogetout > 0 ) then {
+ //Stop the veh for 5.5 sek
+ nul = [_vehicle,5] spawn MON_doStop;
+
+ sleep 0.8; // give time to actualy stop
+
+ {
+ _x spawn MON_GetOut;
+ sleep 0.3;
+ } foreach _dogetout;
+
+ //We removed the id to the vehicle so it can be reused
+ _x setVariable ["UPSMON_grpid", 0, false];
+ _x setVariable ["UPSMON_cargo", [], false];
+
+ [_npc,_x, _driver] spawn MON_checkleaveVehicle; // if every one outside, make sure driver can walk
+ sleep 0.01;
+ };
+ } foreach _vehicles;
+ };
+ };
+ };
+
+ // #define GOTHIT(X) ([X] call R_FN_GOTHIT)
+ // nul = [_grpId] call R_FN_GOTHIT;
+ R_FN_GOTHIT =
+ {
+ _grpId = _this select 0;
+ if ((R_GOTHIT_ARRAY select _grpId) != 0) then
+ {
+ true
+ }
+ else
+ {
+ false
+ }
+ };
+
+ // use in gothit proces
+ // nul = [_unit, _shooter] spawn R_SN_EHHIT;
+ R_SN_EHHIT =
+ {
+ private ["_unit","_shooter","_grpId"];
+ _unit = _this select 0;
+ _shooter = _this select 1;
+ _grpId = _unit getVariable ("UPSMON_grpid");
+
+ if ((side _unit != side _shooter) && (R_GOTHIT_ARRAY select _grpId) == 0) then
+ {
+ R_GOTHIT_ARRAY set [_grpId, 1];
+ // if (KRON_UPS_Debug > 0) then {player globalchat format["UNIT: %1, SHOOTER :%2 %3",_unit,_shooter,side _shooter]};
+ };
+ };
+
+
+ // use in gothit proces
+ // nul = [_unit, _shooter] spawn R_SN_EHKILLED;
+ R_SN_EHKILLED =
+ {
+ private ["_unit","_shooter","_grpId"];
+
+ _unit = _this select 0;
+ _shooter = _this select 1;
+ _grpId = _unit getVariable ("UPSMON_grpid");
+
+ if ((side _unit != side _shooter) && (R_GOTHIT_ARRAY select _grpId) == 0) then
+ {
+ R_GOTHIT_ARRAY set [_grpId, 2];
+ // if (KRON_UPS_Debug > 0) then {player globalchat format["UNIT: %1, SHOOTER :%2 %3",_unit,_shooter,side _shooter]};
+ };
+ };
+
+
+ // logic is needed to display rGlobalChat
+ private ["_center","_group"];
+ _center = createCenter sideLogic; _group = createGroup _center;
+ R_Logic_civkill = _group createUnit ["LOGIC", [2,2,1], [], 0, "NONE"];
+ _group = nil;
+ _center = nil;
+
+
+ // used in gothit proces
+ // nul = [_unit, _shooter] spawn R_SN_EHKILLEDCIV;
+ R_SN_EHKILLEDCIV =
+ {
+ private ["_killer","_side"];
+ _killer = _this select 1;
+
+ //only if player killed a civilian
+ if (isPlayer _killer) then {
+
+ KILLED_CIV_COUNTER set [0,(KILLED_CIV_COUNTER select 0) + 1];
+
+ // if (KRON_UPS_Debug > 0) then {player globalchat format["KILLER: %1, %2", side _killer,KILLED_CIV_COUNTER ]};
+ switch (side _killer) do
+ {
+ case west:
+ {
+ KILLED_CIV_COUNTER set [1,(KILLED_CIV_COUNTER select 1) + 1];
+ };
+
+ case east:
+ {
+ KILLED_CIV_COUNTER set [2,(KILLED_CIV_COUNTER select 2) + 1];
+ };
+
+ case resistance:
+ {
+ KILLED_CIV_COUNTER set [3,(KILLED_CIV_COUNTER select 3) + 1];
+ };
+ };
+ KILLED_CIV_COUNTER set [4,_killer];
+
+ //if (KRON_UPS_Debug > 0) then {player globalchat format["KILLER: %1", side _killer ]};
+ if (KRON_UPS_Debug > 0) then {player globalchat format["KILLED_CIV_COUNTER: %1",KILLED_CIV_COUNTER]};
+ if (R_WHO_IS_CIV_KILLER_INFO > 0) then {
+ [R_Logic_civkill, nil , rglobalChat, format ["A CIVILIAN WAS KILLED BY %1",_killer]] call RE;
+ };
+ };
+ };
+
+
+ //firedNear
+ R_SN_EHFIREDNEAR =
+ {
+ private ["_civ"];
+ _civ = leader (_this select 0);
+ _civ setspeedmode "FULL";
+ };
+
+
+ \ No newline at end of file
diff --git a/Server/Module/UPSMON/UPSMON/!R/markerAlpha.sqf b/Server/Module/UPSMON/UPSMON/!R/markerAlpha.sqf
new file mode 100644
index 0000000..7b0ea31
--- /dev/null
+++ b/Server/Module/UPSMON/UPSMON/!R/markerAlpha.sqf
@@ -0,0 +1,14 @@
+/* =============================================
+ !R
+ Hide area markers.
+
+ create Game Logic Object
+ put in initialization field:
+
+ nul = call compile preprocessFile "scripts\UPSMON\!R\markerAlpha.sqf";
+
+ all markers area must be named area0, area1...area13
+
+================================================= */
+
+{ _x setmarkeralpha 0; } foreach ["area0", "area1", "area2","area3","area4","area5","area6","area7","area8","area9","area10","area11","area12","area13"]; \ No newline at end of file
diff --git a/Server/Module/UPSMON/UPSMON/MON_artillery_add.sqf b/Server/Module/UPSMON/UPSMON/MON_artillery_add.sqf
new file mode 100644
index 0000000..ecaec71
--- /dev/null
+++ b/Server/Module/UPSMON/UPSMON/MON_artillery_add.sqf
@@ -0,0 +1,64 @@
+/* =====================================================================================================
+ MON_spawn.sqf
+ Author: Monsada (chs.monsada@gmail.com)
+ Comunidad Hispana de Simulacin:
+ http://www.simulacion-esp.com
+ =====================================================================================================
+ Parmeters: [_artillery,(_range,_rounds,_area,_cadence,_mincadence)] execvm "scripts\UPSMON\MON_artillery_add.sqf";
+ <- _artillery object to attach artillery script, must be an object with gunner.
+ <- ( _rounds ) rounds to fire each time, default 1
+ <- ( _range ) range of artillery, default 800
+ <- ( _area ) Dispersion area, 150m by default
+ <- ( _maxcadence ) Cadence of fire, is random between min, default 10s
+ <- ( _mincadence ) Minimum cadence, default 5s
+ <- ( _bullet ) Class of bullet to fire, default ARTY_Sh_81_HE
+ =====================================================================================================
+ 1. Place a static weapon on map.
+ 2. Exec module in int of static weapon
+
+ nul=[this] execVM "scripts\UPSMON\MON_artillery_add.sqf";
+
+ 1. Be sure static weapon has a gunner or place a "fortify" squad near, this will make squad to take static weapon.
+ 2. Create a trigger in your mission for setting when to fire. Set side artillery variable to true:
+
+ KRON_UPS_ARTILLERY_EAST_FIRE = true;
+
+ This sample will do east artilleries to fire on known enemies position, when you want to stop fire set to false.
+
+ For more info:
+ http://dev-heaven.net/projects/upsmon/wiki/Artillery_module
+ =====================================================================================================*/
+if (!isserver) exitWith {};
+
+//Waits until UPSMON is init
+waitUntil {!isNil("KRON_UPS_INIT")};
+waitUntil {KRON_UPS_INIT==1};
+
+private ["_artillery","_smoke1","_i","_area","_position","_maxcadence","_mincadence","_sleep","_rounds","_dummypos","_salvobreak"];
+_range = 800;
+_area = 150;
+_maxcadence = 10;
+_mincadence = 5;
+_sleep = 0;
+_rounds = 1;
+_bullet = "ARTY_Sh_81_HE";
+_vector =[];
+_salvobreak = 10;
+
+_artillery = _this select 0;
+//if (KRON_UPS_Debug>0) then {player globalchat format["MON_artillery_add before %1 %2 %3",isnull _artillery,alive _artillery]};
+if (isnull _artillery || !alive _artillery) exitwith{};
+if ((count _this) > 1) then {_rounds = _this select 1;};
+if ((count _this) > 2) then {_range = _this select 2;};
+if ((count _this) > 3) then {_area = _this select 3;};
+if ((count _this) > 4) then {_maxcadence = _this select 4;};
+if ((count _this) > 5) then {_mincadence = _this select 5;};
+if ((count _this) > 6) then {_bullet = _this select 6;};
+if ((count _this) > 7) then {_salvobreak = _this select 7;};
+//Add artillery to array of artilleries
+_vector = [_artillery,_rounds,_range,_area,_maxcadence,_mincadence,_bullet,_salvobreak];
+if (isnil "KRON_UPS_ARTILLERY_UNITS" ) then {KRON_UPS_ARTILLERY_UNITS = []};
+KRON_UPS_ARTILLERY_UNITS = KRON_UPS_ARTILLERY_UNITS + [_vector];
+
+_dummypos = [getpos _artillery, 50, getdir _artillery] call R_relPos3D;
+(gunner _artillery) lookAt [_dummypos select 0, _dummypos select 1,(_dummypos select 2)+100];
diff --git a/Server/Module/UPSMON/UPSMON/MON_spawn.sqf b/Server/Module/UPSMON/UPSMON/MON_spawn.sqf
new file mode 100644
index 0000000..e952752
--- /dev/null
+++ b/Server/Module/UPSMON/UPSMON/MON_spawn.sqf
@@ -0,0 +1,115 @@
+/* =====================================================================================================
+ MON_spawn.sqf
+ Author: Monsada (chs.monsada@gmail.com)
+ Comunidad Hispana de Simulacin:
+ http://www.simulacion-esp.com
+ =====================================================================================================
+ Parmeters: [Param1,Param2,Param3,[Param4]] EXECVM "SCRIPTS\UPSMON\MON_SPAWN.SQF";
+ <- Param1 Id of the template to copy.
+ <- Param2 Position to create new squad.
+ <- Param3 N of squads to create
+ <- Param4 Array of parameters of UPSMON, first must be name of marc to patrol
+ =====================================================================================================
+ Function that allows to spawn UPSMON squads.
+
+ 1- create a squad in editor. Exec UPSMON and set TEMPLATE id, this will save members of squad, not equipement.
+ nul = [this,"town","TEMPLATE:",1] execVM "scripts\upsmon.sqf";
+ 2- Exec MON_spawn on trigger or where you want telling the copy of the template to create
+ and the position.
+ nul = [1,[0,0,0],3,[mark, upsmon optional params]] EXECVM "SCRIPTS\UPSMON\MON_SPAWN.SQF";
+ =====================================================================================================*/
+if (!isserver) exitWith {};
+
+//Waits until UPSMON is init
+waitUntil {!isNil("KRON_UPS_INIT")};
+waitUntil {KRON_UPS_INIT==1};
+private ["_template","_position","_params","_copies","_membertypes","_unittype","_side","_UCthis","_initstr","_grp","_lead","_newunit","_i","_newpos","_vehicle","_initlstr"];
+
+//Parameter reading
+_template = _this select 0;
+_position = _this select 1;
+_copies = _this select 2;
+_params = _this select 3;
+
+//Initialization
+_membertypes = [];
+_side = "";
+_UCthis = [];
+_initstr = "";
+_initlstr = "";
+_grp = grpnull;
+_lead = objnull;
+_newunit = objnull;
+_newpos=[];
+_vehicle=[];
+
+//Gets parameters of UPSMON
+for [{_i=0},{_i<count _params},{_i=_i+1}] do {_e=_params select _i; if (typeName _e=="STRING") then {_e=toUpper(_e)};_UCthis set [_i,_e]};
+_initstr = ["INIT:","",_UCthis] call KRON_UPSgetArg;
+_initlstr = ["INITL:","",_UCthis] call KRON_UPSgetArg;
+_initlstr = _initlstr + _initstr;
+_spawned= if ("SPAWNED" in _UCthis) then {true} else {false};
+if (!_spawned) then {_UCthis = _UCthis + ["SPAWNED"]};
+
+if (KRON_UPS_Debug>0) then {player globalchat format["Spawning %3 copies of template %1",_template,_position,_copies,count KRON_UPS_TEMPLATES]};
+//if (KRON_UPS_Debug>0) then {diag_log format["Spawning %3 copies of template %1 on %2 templates %4",_template,_position,_copies,count KRON_UPS_TEMPLATES]};
+
+//Search if any template
+{
+ if ((_x select 0) == _template) then {
+ _side = _x select 1;
+ _membertypes = _x select 2;
+ _vehicletypes = _x select 3;
+ //Gets leader type
+ _unittype= _membertypes select 0;
+
+ //if (KRON_UPS_Debug>0) then {player globalchat format["template %1:%2 ",_template,_membertypes]};
+
+ for [{_i=1},{_i<=_copies},{_i=_i+1}] do {
+
+ // make the clones civilians
+ // use random Civilian models for single unit groups
+ if ((_unittype=="Civilian") && (count _members==1)) then {_rnd=1+round(random 20); if (_rnd>1) then {_unittype=format["Civilian%1",_rnd]}};
+
+ _grp=createGroup _side;
+
+ _lead = _grp createUnit [_unittype, _position, [], 0, "form"];
+ _lead setVehicleInit _initlstr;
+ [_lead] join _grp;
+ _grp selectLeader _lead;
+ sleep 1;
+
+ // copy team members (skip the leader)
+ _c=0;
+ {
+ _c=_c+1;
+ if (_c>1) then {
+ _newpos = _position findEmptyPosition [10, 200];
+ sleep .4;
+ if (count _newpos <= 0) then {_newpos = _position};
+ _newunit = _grp createUnit [_x, _newpos, [],0,"form"];
+ _newunit setVehicleInit _initstr;
+ [_newunit] join _grp;
+ };
+ } foreach _membertypes;
+
+
+ {
+ _newpos = _position findEmptyPosition [10, 200];
+ sleep .4;
+ if (count _newpos <= 0) then {_newpos = _position};
+ _newunit = _x createvehicle (_newpos);
+ } foreach _vehicletypes;
+
+ //Set new parameters
+ _params = [_lead] + _UCthis;
+
+ //Exec UPSMON script
+ _params SPAWN UPSMON;
+
+ processInitCommands;
+ };
+ };
+}foreach KRON_UPS_TEMPLATES;
+
+if (true) exitwith{};
diff --git a/Server/Module/UPSMON/UPSMON/MON_surrended.sqf b/Server/Module/UPSMON/UPSMON/MON_surrended.sqf
new file mode 100644
index 0000000..15c4ee7
--- /dev/null
+++ b/Server/Module/UPSMON/UPSMON/MON_surrended.sqf
@@ -0,0 +1,23 @@
+// =========================================================================================================
+// Script for adding the action of follow player.
+// Version: 1.0
+// Author: Monsada (smirall@hotmail.com)
+// ---------------------------------------------------------------------------------------------------------
+private ["_side","_soldiers"];
+_side = _this select 0;
+
+_soldiers = switch (_side) do {
+ case west: {KRON_AllWest};
+ case east: {KRON_AllEast};
+ case resistance: {KRON_AllRes};
+};
+
+{
+ if ( leader _x == _x ) then {
+ _x addaction ["Order your men to follow me", "scripts\UPSMON\actions\followme.sqf", [], 1, false];
+ } else {
+ _x addaction ["Follow me", "scripts\UPSMON\actions\followme.sqf", [], 1, false];
+ };
+}foreach _soldiers;
+
+if (true) exitWith {};
diff --git a/Server/Module/UPSMON/UPSMON/actions/followme.sqf b/Server/Module/UPSMON/UPSMON/actions/followme.sqf
new file mode 100644
index 0000000..1d325c5
--- /dev/null
+++ b/Server/Module/UPSMON/UPSMON/actions/followme.sqf
@@ -0,0 +1,93 @@
+// =========================================================================================================
+// Script for action follow me when surrended, adds the soldier to player squad in a random choice.
+// Version: 1.0
+// Author: Monsada (smirall@hotmail.com)
+// ---------------------------------------------------------------------------------------------------------
+private ["_obj","_caller","_id","_objtype","_rnd","_join","_direction"];
+_npc = _this select 0;
+_caller = _this select 1;
+_id = _this select 2;
+
+_rnd = 0;
+_join=true;
+_npc switchmove "";
+
+_direction = ((getpos _caller select 0) - (getpos _npc select 0)) atan2 ((getpos _caller select 1) - (getpos _npc select 1));
+
+//If positive values are needed then use:
+if(_direction < 0) then {_direction = _direction + 360};
+_npc setdir _direction;
+_npc dowatch _caller;
+_npc setSpeedMode "LIMITED";
+_npc domove position _caller;
+
+
+sleep 0.5;
+
+_rnd = random 100;
+_npc setmimic "Sad";
+
+if (_rnd <= 30 ) then {
+ _npc globalchat "Ok";
+};
+
+if (_rnd > 30 && _rnd <= 50) then {
+ _npc globalchat "Yes";
+};
+
+
+if (_rnd > 50 && _rnd <= 100) then {
+ _join=false;
+ _rnd = random 100;
+
+ if (_rnd < 20) then {
+ _npc setmimic "angry";
+ _npc switchmove "CtsPercMstpSnonWnonDnon_idle31rejpaniVnose";
+ _npc globalchat "Kiss my ass";
+ };
+
+ if (_rnd > 20 && _rnd <= 40) then {
+ _npc setmimic "Agresive";
+ _npc switchmove "CtsPercMstpSnonWnonDnon_idle33rejpaniVzadku";
+ sleep 3;
+ _npc globalchat "Que te den";
+ };
+
+ if (_rnd > 40 && _rnd <= 60) then {
+ _npc setmimic "Agresive";
+ _npc switchmove "CtsPercMstpSnonWnonDnon_idle33rejpaniVzadku";
+ sleep 1;
+ _npc globalchat "Fuck you";
+ };
+
+ if (_rnd > 60 && _rnd <= 80) then {
+ _npc setmimic "Agresive";
+ _npc switchmove "CtsPercMstpSnonWnonDnon_idle32podrbaniNanose";
+ sleep 0.5;
+ _npc globalchat "Follow your mother";
+ };
+
+ if (_rnd > 80 && _rnd <= 100) then {
+ _npc setmimic "angry";
+ sleep 0.1;
+ _npc switchmove "CtsPercMstpSnonWnonDnon_idle32podrbaniNanose";
+ _npc globalchat "Fuck you";
+ };
+};
+
+if (_join) then {
+ // remove the action once it is activated
+ _npc stop false;
+ if (_npc == leader _npc) then {
+ _npc globalchat "All follow that man";
+ {
+ _x switchmove "";
+ [_x] joinSilent _caller;
+ }foreach units _npc;
+ } else {
+ _npc removeAction _id;
+ [_npc] joinSilent _caller;
+ };
+};
+
+if (true) exitWith {};
diff --git a/Server/Module/UPSMON/UPSMON/common/MON_functions.sqf b/Server/Module/UPSMON/UPSMON/common/MON_functions.sqf
new file mode 100644
index 0000000..8adf336
--- /dev/null
+++ b/Server/Module/UPSMON/UPSMON/common/MON_functions.sqf
@@ -0,0 +1,2204 @@
+// =========================================================================================================
+// Biblioteca de funciones comunes
+// Version: 5.1.0
+// Author: Monsada (smirall@hotmail.com)
+// http://www.simulacion-esp.com/
+// Comunidad Hispana de Simulacin
+// =========================================================================================================
+
+MON_bugged_vehicles = ["BIS_alice_emptydoor","ACE_Grenade_Geometry"];
+
+// in Vanilia extra bugged vehicle
+if !(AcePresent) then {
+ MON_bugged_vehicles = MON_bugged_vehicles + ["HMMWV_M998A2_SOV_DES_EP1"];
+};
+
+// ---------------------------------------------------------------------------------------------------------
+//Funcin que permite posicionar objetos a la altura definida
+//param1: objeto
+//param2: altura
+MON_subir = {
+if (!isserver) exitwith{};
+private ["_object","_altura","_pos","_x","_y","_z","_bld","_bldpos"];
+
+_object = _this select 0;
+_altura = _this select 1;
+
+_x = 0;
+_y = 0;
+_z = 0;
+_pos =0;
+_bld = objnull;
+_bldpos =0;
+
+_pos = getposasl _object;
+
+_x = _pos select 0;
+_y = ( _pos select 1 );
+_z = ( _pos select 2 ) + _altura;
+_object setposasl [_x,_y ,_z];
+};
+//Retorna la direccin entre dos posiciones
+MON_getDirPos = {private["_a","_b","_from","_to","_return"]; _from = _this select 0; _to = _this select 1; _return = 0; _a = ((_to select 0) - (_from select 0)); _b = ((_to select 1) - (_from select 1)); if (_a != 0 || _b != 0) then {_return = _a atan2 _b}; if ( _return < 0 ) then { _return = _return + 360 }; _return};
+// ---------------------------------------------------------------------------------------------------------
+//Funcin de borra unidades que han sido matadas
+//param1: objeto a borrar cuando muera
+//param2: tiempo a esperar antes de borrar el objeto
+MON_deleteDead = {private["_u","_s"];_u=_this select 0; _s= _this select 1; _u removeAllEventHandlers "killed"; sleep _s; deletevehicle _u};
+MON_deleteDeadDist = {private["_u","_s","_dist","_OCercanos","_cicle","_deleted","_isplayer"];
+ _i = 0;
+ _cicle = 10;
+ _deleted = false;
+ _isplayer = false;
+ _u = _this select 0; _s = _this select 1; _dist = _this select 2;
+ _u removeAllEventHandlers "killed";
+ sleep _s;
+
+ while {!_deleted} do {
+ _isplayer = false;
+ //Buscamos objetos cercanos
+ _OCercanos = nearestObjects [_u, ["Man"] , _dist];
+
+ //Validamos si alguno de los soldados cerca es un jugador y est vivo
+ {if (isplayer _x && alive _x) exitwith {_isplayer = true;}}foreach _OCercanos;
+
+ if (!_isplayer) then {
+ deletevehicle _u;
+ _deleted = true;
+ };
+ sleep _cicle;
+ };
+};
+// ---------------------------------------------------------------------------------------------------------
+//Funcin tomada de UPS, busca el comando en la lista y devuelve el siguiente elemento
+//param1: comando a buscar
+//param2: valor por defecto del comando
+//param3: array con los comandos
+//Retorna valor del comando encontrado o valor por defecto
+MON_getArg = {private["_cmd","_arg","_list","_a","_v"]; _cmd=_this select 0; _arg=_this select 1; _list=_this select 2; _a=-1; {_a=_a+1; _v=format["%1",_list select _a];
+if (_v==_cmd) then {_arg=(_list select _a+1)}} foreach _list; _arg};
+
+// ---------------------------------------------------------------------------------------------------------
+//Funcin que devuelve una posicin en 3D a partir de otra, una direccin y una distancia
+//param1: posicin
+//param2: direccin
+//param3: distancia
+//Retorna vector de posicion en 3D [0,0,0]
+MON_GetPos =
+{
+ private ["_pos","_dir","_dist","_cosU","_cosT","_relTX","_sinU","_sinT","_relTY","_newPos","_newPosX","_newPosY", "_targetZ" ];
+ _pos = _this select 0;
+ _dir = _this select 1;
+ _dist = _this select 2;
+
+ _targetX = _pos select 0; _targetY = _pos select 1; _targetZ = _pos select 2;
+
+ //Calculamos posicin
+ _cosU = [_dir] call MON_GetCOS; _sinU = [_dir] call MON_GetSIN;
+ _cosT = abs cos(_dir); _sinT = abs sin(_dir);
+ _relTX = _sinT * _dist * _cosU; _relTY = _cosT * _dist * _sinU;
+ _newPosX = _targetX + _relTX; _newPosY = _targetY + _relTY;
+ _newPos = [_newPosX,_newPosY,_targetZ];
+ _newPos;
+};
+
+// ---------------------------------------------------------------------------------------------------------
+//Funcin que devuelve una posicin en 2D a partir de otra, una direccin y una distancia
+//param1: posicin
+//param2: direccin
+//param3: distancia
+//Retorna vector de posicion en 2D [0,0]
+MON_GetPos2D =
+{
+ private ["_pos","_dir","_dist","_cosU","_cosT","_relTX","_sinU","_sinT","_relTY","_newPos","_newPosX","_newPosY" ];
+ _pos = _this select 0;
+ _dir = _this select 1;
+ _dist = _this select 2;
+
+ _targetX = _pos select 0; _targetY = _pos select 1;
+
+ //Calculamos posicin
+ _cosU = [_dir] call MON_GetCOS; _sinU = [_dir] call MON_GetSIN;
+ _cosT = abs cos(_dir); _sinT = abs sin(_dir);
+ _relTX = _sinT * _dist * _cosU; _relTY = _cosT * _dist * _sinU;
+ _newPosX = _targetX + _relTX; _newPosY = _targetY + _relTY;
+ _newPos = [_newPosX,_newPosY];
+ _newPos;
+};
+
+// ---------------------------------------------------------------------------------------------------------
+//Funcin que devuelve las posiciones que se pueden ocupar dentro de un edificio
+//param1: objeto location
+//Retorna numero de posiciones que tiene el edificio
+MON_BldPos = {private ["_bld","_bldpos"];
+ _bld=_this; _bldpos = 1;
+ while {format ["%1", _bld buildingPos _bldpos] != "[0,0,0]"} do {_bldpos = _bldpos + 1;};
+ _bldpos = _bldpos - 1; _bldpos;};
+
+// ---------------------------------------------------------------------------------------------------------
+//Funcin que devuelve la casa que hay ms cerca del objeto param1 y las posiciones que se pueden ocupar dentro de ella.
+//param1: objeto
+//Retorna vector con [objeto location, posiciones que tiene]
+MON_PosInfo = {
+ private["_obj","_bld","_bldpos"];
+ _obj=_this;
+ _bld = nearestbuilding _obj;
+ _bldpos= _bld call MON_BldPos;
+ [_bld,_bldpos];
+ };
+
+// ---------------------------------------------------------------------------------------------------------
+//Funcin que devuelve el valor negativo o positivo del seno en base a un angulo
+MON_GetSIN = {
+ private["_dir","_sin","_cos"];
+ _dir=_this select 0;
+ if (_dir<90) then
+ {
+ _sin=1;
+ } else
+ {
+ if (_dir<180) then
+ {
+ _sin=-1;
+ } else
+ {
+ if (_dir<270) then
+ {
+ _sin=-1;
+ }
+ else
+ {
+ _sin=1;
+ };
+ };
+ };
+ _sin
+};
+
+// ---------------------------------------------------------------------------------------------------------
+//Funcin que devuelve el valor negativo o positivo del coseno en base a un angulo
+MON_GetCOS = {
+ private["_dir","_cos"];
+ _dir=_this select 0;
+ if (_dir<90) then
+ {
+ _cos=1;
+ } else
+ {
+ if (_dir<180) then
+ {
+ _cos=1;
+ } else
+ {
+ if (_dir<270) then
+ {
+ _cos=-1;
+ }
+ else
+ {
+ _cos=-1;
+ };
+ };
+ };
+ _cos
+};
+
+//Funcin que busca vehiculos cercanos y hace entrar a las unidades del lider
+//Parmeters: [_grpid,_npc]
+// <- _grpid: id of group to assign to vehicle
+// <- _npc: lider
+// -> _getin: true if any getin
+MON_GetIn_NearestVehicles = {
+ private["_vehicles","_npc","_units","_unitsIn","_grpid","_getin"];
+ _grpid = _this select 0;
+ _npc = _this select 1;
+
+ _vehicles=[[]];
+ _air=[[]];
+ _units = [];
+ _unitsIn = [];
+ _getin=false;
+
+ if (leader _npc == _npc) then {
+ _units = units _npc;
+ } else
+ {
+ _units = _units + [_npc];
+ };
+
+ {
+ if ( (_x!= vehicle _x && !((vehicle _x) iskindof "StaticWeapon" )) || !(_x iskindof "Man") || !alive _x || !canmove _x || !canstand _x) then {_units = _units-[_x];};
+ }foreach _units;
+
+ _unitsIn = _units;
+
+ //First catch combat vehicles
+ if ( (count _units) > 0) then {
+ _air = [_npc,200] call MON_NearestsAirTransports;
+ {if (_npc knowsabout (_x select 0) <= 0.5) then{ _air = _air - [_x]};}foreach _air;
+ _units = [_grpid, _units, _air, false] call MON_selectvehicles;
+ };
+ sleep 0.05;
+ if ( (count _units) > 1) then {
+ _vehicles = [_npc,200,true] call MON_NearestsLandCombat;
+ {if (_npc knowsabout(_x select 0) <= 0.5) then{ _vehicles = _vehicles - [_x]};}foreach _vehicles;
+ _units = [_grpid, _units, _vehicles, false] call MON_selectvehicles;
+ };
+ sleep 0.05;
+ if ( (count _units) > 0) then {
+ _vehicles = [_npc,200] call MON_NearestsLandTransports;
+ {if (_npc knowsabout (_x select 0) <= 0.5) then{ _vehicles = _vehicles - [_x]};}foreach _vehicles;
+ _units = [_grpid, _units, _vehicles, false] call MON_selectvehicles;
+ };
+ sleep 0.05;
+ if ( (count _units) > 0 && (count _vehicles) > 0) then {
+ sleep 1;
+ _vehicles = _vehicles + _air;
+ _units = [_grpid, _units, _vehicles, true] call MON_selectvehicles;
+ };
+ sleep 0.05;
+ _unitsIn = _unitsIn - _units;
+
+ _unitsIn;
+ //sleep 0.05;
+};
+
+//Funcin que busca vehiculos cercanos y hace entrar a las unidades del lider
+//Parmeters: [_grpid,_npc]
+// <- _grpid: id of group to assign to vehicle
+// <- _npc: lider
+// -> _getin: true if any getin
+MON_GetIn_NearestCombat = {
+ private["_vehicles","_npc","_units","_unitsIn","_grpid","_getin","_dist","_all"];
+ _grpid = _this select 0;
+ _npc = _this select 1;
+ _dist = _this select 2;
+ _all = _this select 3;
+
+ _vehicles=[[]];
+ _units = [];
+ _unitsIn = [];
+ _getin=false;
+
+ if (leader _npc == _npc) then {
+ _units = units _npc;
+ } else
+ {
+ _units = _units + [_npc];
+ };
+
+ {
+ if ( (_x!= vehicle _x && !((vehicle _x) iskindof "StaticWeapon" )) || !(_x iskindof "Man") || !alive _x || !canmove _x || !canstand _x) then {_units = _units-[_x];};
+ }foreach _units;
+
+ //If suficient units leader will not get in
+ if (!all) then {
+ if (count _units > 2 ) then {_units = _units - [leader _npc]};
+ };
+
+ _unitsIn = _units;
+
+ //We need 2 units available if not any leave vehicle to another squad
+ if ( (count _units) > 1) then {
+ _vehicles = [_npc,_dist,_all] call MON_NearestsAirCombat;
+ {if (_npc knowsabout (_x select 0) <= 0.5) then{ _vehicles = _vehicles - [_x]};}foreach _vehicles;
+ _units = [_grpid, _units, _vehicles, false] call MON_selectvehicles;
+ };
+ sleep 0.05;
+
+ if ( (count _units) > 1) then {
+ _vehicles = [_npc,_dist,_all] call MON_NearestsLandCombat;
+ {if (_npc knowsabout(_x select 0) <= 0.5) then{ _vehicles = _vehicles - [_x]};}foreach _vehicles;
+ _units = [_grpid, _units, _vehicles, false] call MON_selectvehicles;
+ };
+
+ _unitsIn = _unitsIn - _units;
+
+ _unitsIn;
+};
+
+//Funcin que busca vehiculos cercanos y hace entrar a las unidades del lider
+//Parmeters: [_grpid,_npc]
+// <- _grpid: id of group to assign to vehicle
+// <- _npc: lider
+// -> _getin: true if any getin
+MON_GetIn_NearestBoat = {
+ private["_vehicles","_npc","_units","_unitsIn","_grpid","_getin","_dist"];
+ _grpid = _this select 0;
+ _npc = _this select 1;
+ _dist = _this select 2;
+
+ _vehicles=[[]];
+ _units = [];
+ _unitsIn = [];
+ _getin=false;
+
+ if (leader _npc == _npc) then {
+ _units = units _npc;
+ } else
+ {
+ _units = _units + [_npc];
+ };
+
+ {
+ if ( (_x!= vehicle _x && !((vehicle _x) iskindof "StaticWeapon" )) || !(_x iskindof "Man") || !alive _x || !canmove _x || !canstand _x) then {_units = _units-[_x];};
+ }foreach _units;
+
+ _unitsIn = _units;
+
+ //We need 2 units available if not any leave vehicle to another squad
+ if ( (count _units) > 0) then {
+ _vehicles = [_npc,_dist] call MON_Nearestsboats;
+ {if (_npc knowsabout (_x select 0) <= 0.5) then{ _vehicles = _vehicles - [_x]};}foreach _vehicles;
+ _units = [_grpid, _units, _vehicles, false] call MON_selectvehicles;
+ };
+
+ if ( (count _units) > 1 && (count _vehicles) > 0) then {
+ sleep 1;
+ _units = [_grpid, _units, _vehicles, true] call MON_selectvehicles;
+ };
+
+ _unitsIn = _unitsIn - _units;
+ _unitsIn;
+};
+
+//Funcin que busca staticos cercanos y hace entrar a las unidades del lider
+//Parmeters: [_grpid,_npc]
+// <- _grpid: id of group to assign to vehicle
+// <- _npc: lider
+// -> _getin: true if any getin
+MON_GetIn_NearestStatic = {
+ private["_vehicles","_npc","_units","_unitsIn","_grpid","_getin","_count"];
+ _grpid = _this select 0;
+ _npc = _this select 1;
+ _count = 0;
+ _distance = 100;
+ if ((count _this) > 2) then {_distance = _this select 2;};
+
+ _vehicles=[];
+ _units = [];
+ _unitsIn = [];
+ _getin=false;
+
+ //Buscamos staticos cerca
+ _vehicles = [_npc,_distance] call MON_NearestsStaticWeapons;
+
+ if ( count _vehicles == 0) exitwith {_unitsIn;};
+
+ if (leader _npc == _npc) then {
+ _units = (units _npc) - [_npc];
+ } else
+ {
+ _units = _units + [_npc];
+ };
+
+ //Solo tomamos las unidades vivas y que no estn en vehiculo
+ {
+ if ( (_x iskindof "Man") && _x == vehicle _x && alive _x && canmove _x && canstand _x) then {
+ _unitsIn = _unitsIn + [_x];
+ };
+ }foreach _units;
+
+ //Intentamos tomar solo las que estn disponibles
+ _units = [];
+ {
+ if (unitready _x) then {
+ _units = _units + [_x];
+ };
+ }foreach _unitsin;
+
+ //Si hay unidades disponibles las usamos
+ if (count _units > 0) then {
+ _unitsIn = _units;
+ };
+
+ //if (KRON_UPS_Debug>0 ) then {player sidechat format["%1: Found %2 estatic weapons %3 men available",_grpid,count _vehicles, count _unitsIn]};
+
+ _units = _unitsIn;
+ if ( count _unitsIn > 0) then {
+ _units = [_grpid, _units, _vehicles, true] call MON_selectvehicles;
+ };
+
+ _unitsIn = _unitsIn - _units;
+
+ _unitsIn;
+};
+
+//Function to assign units to vehicles
+//Parmeters: [_grpid,_unitsin,_vehicle]
+// <- _grpid: id of group to assign to vehicle
+// <- _units: array of units to getin
+// <- _vehicles: array of vehicles to use
+// -> _untis: array of units getin
+ MON_selectvehicles = {
+ private["_vehicles","_emptypositions","_units","_unitsIn","_i","_grpid","_vehgrpid","_unit","_wp","_any","_index","_cargo"];
+ _grpid = _this select 0;
+ _units = _this select 1;
+ _vehicles = _this select 2;
+ _any = _this select 3; //meter en cualquier vehiculo
+
+ _wp = [];
+ _vehicle = [];
+ _unitsIn = [];
+ _emptypositions = 0;
+ _i = 0;
+ _vehgrpid = 0;
+ _unit = objnull;
+ _index = 0;
+ _cargo = [];
+
+ {
+ if ((count _units) == 0 ) exitwith {};
+
+ _vehicle = _x select 0 ;
+ _emptypositions = _x select 1;
+ _unitsIn = [];
+ _i = 0;
+ _vehgrpid = _vehicle getvariable ("UPSMON_grpid");
+ _cargo = _vehicle getvariable ("UPSMON_cargo");
+ if ( isNil("_vehgrpid") ) then {_vehgrpid = 0;};
+ if ( isNil("_cargo") ) then {_cargo = [];};
+
+ //Asignamos el vehiculo a a la escuadra si contiene las posiciones justas
+ if (_vehgrpid == 0) then {
+ _vehicle setVariable ["UPSMON_grpid", _grpid, false];
+ _vehicle setVariable ["UPSMON_cargo", _unitsIn, false];
+ _vehgrpid = _grpid;
+ };
+
+ {
+ if (!alive _x || !canmove _x) then {_cargo = _cargo - [_x]; };
+ }foreach _cargo;
+
+ _emptypositions = _emptypositions - (count _cargo - count ( crew _vehicle) );
+
+
+ //if (KRON_UPS_Debug>0) then {player sidechat format["%1 %2 positions=%3 cargo=%4 crew=%5",_grpid, typeof _vehicle, _emptypositions, count _cargo,count (crew _vehicle)]};
+ //ahora buscamos en cualquier vehiculo
+ if ( _vehgrpid == _grpid || (_emptypositions > 0 && _any)) then {
+
+ while {_i < _emptypositions && _i < count _units} do
+ {
+ _unit = _units select _i;
+ _unitsIn = _unitsIn + [_unit];
+ _i = _i + 1;
+ };
+ _units = _units - _unitsIn;
+
+ if ( (count _unitsIn) > 0) then {
+ //Metemos las unidades en el vehiculo
+ [_grpid,_unitsIn,_vehicle] spawn MON_UnitsGetIn;
+ if (KRON_UPS_Debug>0 ) then {player sidechat format["%1: Get in %2 %3 units of %4 available",_grpid,typeof _vehicle,count _unitsIn,_emptypositions]};
+ //if (KRON_UPS_Debug>0 ) then {diag_log format["%1: Moving %3 units into %2 with %4 positions",_grpid,typeof _vehicle,count _unitsIn,_emptypositions]};
+ };
+ };
+ _index = _index + 1;
+ sleep 0.05;
+ } foreach _vehicles;
+
+ _units;
+ };
+
+
+//Funcion que mete la tropa en el vehiculo
+//Parmeters: [_grpid,_unitsin,_vehicle]
+// <- _grpid: id of group to assign to vehicle
+// <- _unitsin: array of units to getin
+// <- _vehicle
+MON_UnitsGetIn = {
+ private["_grpid","_vehicle","_npc","_driver","_gunner", "_unitsin", "_units" , "_Commandercount","_Drivercount","_Gunnercount","_cargo",
+ "_Cargocount","_emptypositions","_commander","_vehgrpid","_cargo"];
+
+ _grpid = _this select 0;
+ _unitsin = _this select 1;
+ _vehicle = _this select 2;
+
+ _units = _unitsin;
+ _driver = objnull;
+ _gunner = objnull;
+ _commander = objnull;
+ _Cargocount = 0;
+ _Gunnercount = 0;
+ _Commandercount = 0;
+ _Drivercount = 0;
+ _cargo = [];
+
+ _Cargocount = (_vehicle) emptyPositions "Cargo";
+ _Gunnercount = (_vehicle) emptyPositions "Gunner";
+ _Commandercount = (_vehicle) emptyPositions "Commander";
+ _Drivercount = (_vehicle) emptyPositions "Driver";
+
+ //Obtenemos el identificador del vehiculo
+ _vehgrpid = _vehicle getvariable ("UPSMON_grpid");
+ _cargo = _vehicle getvariable ("UPSMON_cargo");
+ if ( isNil("_vehgrpid") ) then {_vehgrpid = 0;};
+ if ( isNil("_cargo") ) then {_cargo = [];};
+
+ _cargo = _cargo - _unitsin; //Para evitar duplicados
+ _cargo = _cargo + _unitsin; //Aadimos a la carga
+ _vehicle setVariable ["UPSMON_cargo", _cargo, false];
+
+ //Hablitamos a la IA para entrar en el vehiculo
+ {
+ [_x,0] call MON_dostop;
+
+ if ("StaticWeapon" countType [vehicle (_x)]>0) then
+ {
+ _x spawn MON_doGetOut;
+ };
+
+ unassignVehicle _x;
+ _x spawn MON_Allowgetin;
+ }foreach _units;
+
+ //Assigned to the leader as commander or cargo
+ {
+ if ( _vehgrpid == _grpid && _x == leader _x && _Commandercount > 0 ) exitwith
+ {
+ _Commandercount = 0;
+ _commander = _x;
+ _commander assignAsCommander _vehicle;
+ _units = _units - [_x];
+ [_x] orderGetIn true;
+ };
+
+ if ( _x == leader _x && _Cargocount > 0 ) exitwith
+ {
+ _x assignAsCargo _vehicle;
+ _units = _units - [_x];
+ _Cargocount = _Cargocount - 1;
+ [_x] orderGetIn true;
+ };
+ }foreach _units;
+ //if (KRON_UPS_Debug>0 ) then {player sidechat format["%1: _vehgrpid %2 ,_Gunnercount %3, %4",_grpid,_vehgrpid,_Gunnercount,count _units]};
+
+ //Si el vehiculo pertenece al grupo asignamos posiciones de piloto, sin solo de carga
+ if ( _vehgrpid == _grpid ) then {
+
+ //Asignamos el conductor
+ if ( _Drivercount > 0 && count (_units) > 0 ) then {
+ _driver = _units select (count _units - 1);
+ [_driver,_vehicle,0] spawn MON_assignasdriver;
+ _units = _units - [_driver];
+ };
+
+ //Asignamos el artillero
+ if ( _Gunnercount > 0 && count (_units) > 0 ) then {
+ _gunner = [_vehicle,_units] call MON_getNearestSoldier;
+ [_gunner,_vehicle] spawn MON_assignasgunner;
+ _units = _units - [_gunner];
+ };
+ };
+
+ //if (KRON_UPS_Debug>0 ) then {player sidechat format["%1: _vehgrpid=%2 units=%4",_grpid,_vehgrpid,_cargocount,count _units]};
+ //Movemos el resto como carga
+ if ( _Cargocount > 0 && count (_units) > 0 ) then {
+ {
+ _x assignAsCargo _vehicle;
+ [_x] orderGetIn true;
+ sleep 0.05;
+ } forEach _units;
+ };
+
+ {
+ [_x] spawn MON_avoidDissembark;
+ } forEach _unitsin - [_driver] - [_gunner] -[_commander];
+
+};
+
+MON_getNearestSoldier = {
+ private["_units","_obj","_near"];
+
+ _obj = _this select 0;
+ _units = _this select 1;
+
+ _near = objnull;
+
+ {
+ if (isnull _near) then {
+ _near = _x;
+ } else {
+ if ( _x distance _obj < _near distance _obj ) then {_near = _x;};
+ };
+ }foreach _units;
+ _near;
+};
+
+MON_avoidDissembark = {
+ private["_npc","_vehicle","_timeout"];
+
+ _npc = _this select 0;
+ _vehicle = vehicle _npc ;
+
+ _timeout = 120;
+ _timeout = time + _timeout;
+
+ while {_npc == vehicle _npc && alive _npc && canmove _npc && time < _timeout} do {
+ sleep 1;
+ };
+
+ if (!alive _npc || !canmove _npc || time >= _timeout || driver vehicle _npc == _npc) exitwith{};
+ _npc stop true;
+
+ while {_npc != vehicle _npc && alive _npc && canmove _npc} do {sleep 1;};
+ _npc stop false;
+ sleep 0.5;
+
+ if (!alive _npc || !canmove _npc) exitwith{};
+};
+
+
+//Funcin que devuelve un vehiculo de transporte cercano
+//Parmeters: [_npc]
+// <- _npc: object for position search
+// -> _vehicle: vehicle
+MON_NearestLandTransport = {
+ private["_vehicle","_npc","_transportSoldier","_OCercanos","_driver", "_Commandercount","_Drivercount","_Gunnercount","_Cargocount"];
+
+ _npc = _this;
+
+ _OCercanos = [];
+ _transportSoldier = 0;
+ _vehicle = objnull;
+ _Cargocount = 0;
+ _Gunnercount = 0;
+ _Commandercount = 0;
+ _Drivercount = 0;
+
+
+ //Buscamos objetos cercanos
+ _OCercanos = nearestObjects [_npc, ["Car","TANK","Truck","Motorcycle"] , 150];
+
+ {
+ _Cargocount = (_x) emptyPositions "Cargo";
+ _Gunnercount = (_x) emptyPositions "Gunner";
+ _Commandercount = (_x) emptyPositions "Commander";
+ _Drivercount = (_x) emptyPositions "Driver";
+
+ _transportSoldier = _Cargocount + _Gunnercount + _Commandercount + _Drivercount;
+
+ if (!locked _x && canMove _x && _transportSoldier >= count (units _npc) && !(typeof _x in MON_bugged_vehicles)
+ && (_drivercount > 0 || side _npc == side _x )) exitwith {_vehicle = _x;};
+ }foreach _OCercanos;
+
+ _vehicle;
+};
+
+//Funcin que devuelve un array con los vehiculos terrestres ms cercanos
+//Parmeters: [_npc,_distance]
+// <- _npc: object for position search
+// <- _distance: max distance from npc
+// -> _vehicles: array of vehicles
+MON_NearestsLandTransports = {
+ private["_vehicles","_npc","_emptypositions","_OCercanos","_driver", "_Commandercount","_Drivercount","_Gunnercount","_Cargocount","_distance"];
+
+ _npc = _this select 0;
+ _distance = _this select 1;
+
+ _OCercanos = [];
+ _emptypositions = 0;
+ _vehicles = [];
+ _Cargocount = 0;
+ _Gunnercount = 0;
+ _Commandercount = 0;
+ _Drivercount = 0;
+
+ //Buscamos objetos cercanos
+ _OCercanos = nearestObjects [_npc, ["Car","TANK","Truck","Motorcycle"] , _distance];
+
+ {
+ _Cargocount = (_x) emptyPositions "Cargo";
+ _Gunnercount = (_x) emptyPositions "Gunner";
+ _Commandercount = (_x) emptyPositions "Commander";
+ _Drivercount = (_x) emptyPositions "Driver";
+
+ _emptypositions = _Cargocount + _Gunnercount + _Commandercount + _Drivercount;
+
+ if (!locked _x && _emptypositions > 0 && canMove _x && !(typeof _x in MON_bugged_vehicles)
+ && (_drivercount > 0 || side _npc == side _x )) then { _vehicles = _vehicles + [[_x,_emptypositions]];};
+ }foreach _OCercanos;
+
+ _vehicles;
+};
+
+//Funcin que devuelve un array con los vehiculos terrestres ms cercanos
+//Parmeters: [_npc,_distance]
+// <- _npc: object for position search
+// <- _distance: max distance from npc
+// -> _vehicles: array of vehicles
+MON_NearestsLandCombat = {
+ private["_vehicles","_npc","_emptypositions","_OCercanos","_driver", "_Commandercount","_Drivercount","_Gunnercount","_Cargocount","_distance","_all"];
+
+ _npc = _this select 0;
+ _distance = _this select 1;
+ _all = _this select 2;
+
+ _OCercanos = [];
+ _emptypositions = 0;
+ _vehicles = [];
+ _Cargocount = 0;
+ _Gunnercount = 0;
+ _Commandercount = 0;
+ _Drivercount = 0;
+
+ //Buscamos objetos cercanos
+ _OCercanos = nearestObjects [_npc, ["Car","TANK","Truck","Motorcycle"] , _distance];
+
+ {
+ if (_all) then {
+ _Cargocount = (_x) emptyPositions "Cargo";
+ };
+ _Gunnercount = (_x) emptyPositions "Gunner";
+ _Drivercount = (_x) emptyPositions "Driver";
+ _Commandercount = (_x) emptyPositions "Commander";
+
+ _emptypositions = _Cargocount + _Gunnercount + _Commandercount + _Drivercount;
+
+ if (!locked _x && _Gunnercount > 0 && canMove _x && !(typeof _x in MON_bugged_vehicles)
+ && (_drivercount > 0 || side _npc == side _x )) then { _vehicles = _vehicles + [[_x,_emptypositions]];};
+ }foreach _OCercanos;
+
+ _vehicles;
+};
+
+//Funcin que devuelve un array con los vehiculos aereos ms cercanos
+//Parmeters: [_npc,_distance]
+// <- _npc: object for position search
+// <- _distance: max distance from npc
+// -> _vehicles: array of vehicles
+MON_NearestsAirTransports = {
+ private["_vehicles","_npc","_emptypositions","_OCercanos","_driver", "_Commandercount","_Drivercount","_Gunnercount","_Cargocount","_distance"];
+
+ _npc = _this select 0;
+ _distance = _this select 1;
+
+ _OCercanos = [];
+ _emptypositions = 0;
+ _vehicles = [];
+ _Cargocount = 0;
+ _Gunnercount = 0;
+ _Commandercount = 0;
+ _Drivercount = 0;
+
+ //Buscamos objetos cercanos
+ _OCercanos = nearestObjects [_npc, ["Helicopter"] , _distance];
+
+ {
+ _Cargocount = (_x) emptyPositions "Cargo";
+ _Gunnercount = (_x) emptyPositions "Gunner";
+ _Commandercount = (_x) emptyPositions "Commander";
+ _Drivercount = (_x) emptyPositions "Driver";
+
+ _emptypositions = _Cargocount + _Gunnercount + _Commandercount + _Drivercount;
+
+ if (!locked _x && _emptypositions > 0 && canMove _x && !(typeof _x in MON_bugged_vehicles)
+ && (_drivercount > 0 || side _npc == side _x )) then { _vehicles = _vehicles + [[_x,_emptypositions]];};
+ }foreach _OCercanos;
+
+ _vehicles;
+};
+
+//Function that returns an array with the closest air vehicles
+//Parmeters: [_npc,_distance]
+// <- _npc: object for position search
+// <- _distance: max distance from npc
+// -> _vehicles: array of vehicles
+MON_NearestsAirCombat = {
+ private["_vehicles","_npc","_emptypositions","_OCercanos","_driver", "_Commandercount","_Drivercount","_Gunnercount","_Cargocount","_distance","_all"];
+
+ _npc = _this select 0;
+ _distance = _this select 1;
+ _all = _this select 2;
+
+ _OCercanos = [];
+ _emptypositions = 0;
+ _vehicles = [];
+ _Cargocount = 0;
+ _Gunnercount = 0;
+ _Commandercount = 0;
+ _Drivercount = 0;
+
+
+
+ //Buscamos objetos cercanos
+ _OCercanos = nearestObjects [_npc, ["Helicopter"] , _distance];
+
+ {
+ if (_all) then {
+ _Cargocount = (_x) emptyPositions "Cargo";
+ };
+
+ // _Gunnercount = [_x] call RAF_numberOfTurrets;
+ _Gunnercount = (_x) emptyPositions "Gunner";
+ _Drivercount = (_x) emptyPositions "Driver";
+ _Commandercount = (_x) emptyPositions "Commander";
+
+ _emptypositions = _Cargocount + _Gunnercount + _Commandercount + _Drivercount;
+
+ if (!locked _x && _Gunnercount > 0 && canMove _x && !(typeof _x in MON_bugged_vehicles)
+ && (_drivercount > 0 || side _npc == side _x )) then { _vehicles = _vehicles + [[_x,_emptypositions]];};
+ }foreach _OCercanos;
+ _vehicles //return
+};
+
+//Funcin que devuelve un array con los vehiculos staticos ms cercanos
+//Parmeters: [_npc,_distance]
+// <- _npc: object for position search
+// <- _distance: max distance from npc
+// -> _vehicles: array of vehicles
+MON_NearestsStaticWeapons = {
+ private["_vehicles","_npc","_emptypositions","_OCercanos","_driver", "_Commandercount","_Drivercount","_Gunnercount","_Cargocount","_distance"];
+
+ _npc = _this select 0;
+ _distance = _this select 1;
+
+ _OCercanos = [];
+ _emptypositions = 0;
+ _vehicles = [];
+ _Cargocount = 0;
+ _Gunnercount = 0;
+ _Commandercount = 0;
+ _Drivercount = 0;
+
+ //Buscamos objetos cercanos
+ _OCercanos = nearestObjects [_npc, ["StaticWeapon"] , _distance];
+
+ {
+ _Gunnercount = (_x) emptyPositions "Gunner";
+ _emptypositions = _Gunnercount;
+ if (!locked _x && alive _x && _emptypositions > 0 && !(typeof _x in MON_bugged_vehicles) ) then { _vehicles = _vehicles + [[_x,_emptypositions]];};
+ }foreach _OCercanos;
+
+ _vehicles //return
+ };
+
+//Funcin que devuelve un array con los vehiculos marinos ms cercanos
+//Parmeters: [_npc,_distance]
+// <- _npc: object for position search
+// <- _distance: max distance from npc
+// -> _vehicles: array of vehicles
+MON_Nearestsboats = {
+ private["_vehicles","_npc","_emptypositions","_OCercanos","_driver", "_Commandercount","_Drivercount","_Gunnercount","_Cargocount","_distance"];
+
+ _npc = _this select 0;
+ _distance = _this select 1;
+
+ _OCercanos = [];
+ _emptypositions = 0;
+ _vehicles = [];
+ _Cargocount = 0;
+ _Gunnercount = 0;
+ _Commandercount = 0;
+ _Drivercount = 0;
+
+ //Buscamos objetos cercanos
+ _OCercanos = nearestObjects [_npc, ["Ship"] , _distance];
+
+ {
+ _Cargocount = (_x) emptyPositions "Cargo";
+ _Gunnercount = (_x) emptyPositions "Gunner";
+ _Commandercount = (_x) emptyPositions "Commander";
+ _Drivercount = (_x) emptyPositions "Driver";
+
+ _emptypositions = _Cargocount + _Gunnercount + _Commandercount + _Drivercount;
+
+ if (!locked _x && _emptypositions > 0 && canMove _x && (_drivercount > 0 || side _npc == side _x )) then { _vehicles = _vehicles + [[_x,_emptypositions]];};
+ }foreach _OCercanos;
+
+ _vehicles //return
+ };
+
+//Function to delay the taking of the steering wheel and the vehicle will not have time to rise and
+MON_assignasdriver = {
+ private["_vehicle","_driver","_wait"];
+ _driver = _this select 0;
+ _vehicle = _this select 1;
+ _wait = _this select 2;
+
+ [_driver,_wait] spawn MON_dostop;
+ sleep _wait;
+
+ unassignVehicle _driver;
+ _driver assignasdriver _vehicle;
+ [_driver] orderGetIn true;
+
+ //if (KRON_UPS_Debug>0) then {player sidechat format["%1: assigning to driver of %2 ",_driver, typeof _vehicle]};
+};
+
+MON_assignasgunner = {
+ private["_vehicle","_gunner","_dist"];
+ _gunner = _this select 0;
+ _vehicle = _this select 1;
+ _dist=0;
+
+ _gunner assignasgunner _vehicle;
+ [_gunner] orderGetIn true;
+
+ waituntil { _gunner != vehicle _gunner || !alive _gunner || !canmove _gunner ||!alive _vehicle || !canfire _vehicle};
+
+ if ( alive _gunner && alive _vehicle && canmove _gunner && canfire _vehicle) then {
+ _dist = _gunner distance _vehicle;
+ if (_dist < 3) then {
+ _gunner moveInTurret [_vehicle, [0]] ;
+ };
+ };
+};
+
+
+//Allow getin
+MON_Allowgetin = {
+ //Hablitamos a la IA para entrar en el vehiculo
+ [_this] allowGetIn true;
+};
+
+
+//If every on is outside, make sure driver can move
+ MON_checkleaveVehicle={
+ _npc = _this select 0;
+ _vehicle = _this select 1;
+ _driver = _this select 2;
+ _in = false;
+
+ //Take time to go all units
+ sleep 5;
+ {
+ if (_x != vehicle _x) then {_in = true};
+ }foreach units _npc;
+
+
+ // if no one is inside
+ if (!_in) then {
+ _driver enableAI "MOVE";
+ sleep 1;
+ _driver stop false;
+ sleep 1;
+ _driver leaveVehicle _vehicle;
+ sleep 1;
+ };
+ };
+
+
+//Function for order a unit to exit if no gunner
+//Parmeters: [_npc]
+// <- _npc:
+MON_GetOut = {
+ private["_vehicle","_npc","_getout" ,"_gunner"];
+
+ _npc = _this;
+ _vehicle = vehicle (_npc);
+ _gunner = objnull;
+ _gunner = gunner _vehicle;
+
+ sleep 0.05;
+ if (!alive _npc) exitwith{};
+
+ //If no leave the vehicle gunner
+ if ( isnull _gunner || !alive _gunner || !canmove _gunner || (_gunner != _npc && driver _vehicle != _npc && commander _vehicle != _npc) ) then {
+ [_npc] allowGetIn false;
+ _npc spawn MON_doGetOut;
+ unassignVehicle _npc;
+
+ //sleep 0.2;
+ };
+ };
+
+//Function for order a unit to exit
+//Parmeters: [_npc]
+// <- _npc:
+MON_doGetOut = {
+ private["_vehicle","_npc","_getout" ,"_gunner","_groupOne","_timeout","_dir"];
+
+ _npc = _this;
+ _vehicle = vehicle (_npc);
+
+ sleep 0.05;
+ if (_vehicle == _npc) exitwith{};
+
+ //Wait until vehicle is stopped
+ waituntil {!alive _npc || !canmove _npc || !alive _vehicle || ( (abs(velocity _vehicle select 0)) <= 0.1 && (abs(velocity _vehicle select 1)) <= 0.1 )
+ || ( _vehicle iskindof "Air" && ((position _vehicle) select 2) <= 1)};
+
+ if (!alive _npc || !canmove _npc) exitwith{};
+ unassignVehicle _npc;
+ _npc action ["getOut", _vehicle];
+ doGetOut _npc;
+ [_npc] allowGetIn false;
+ nul = [_npc] spawn MON_cancelstop;
+
+ waituntil {!alive _npc || !canmove _npc || vehicle _npc == _npc};
+ if (!alive _npc || !canmove _npc) exitwith{};
+
+ if (leader _npc != _npc) then {
+ //Moves out with dispersion of 45
+ _dir = getDir _npc;
+ _dir = _dir + 45 - (random 90);
+ nul = [_npc,25,_dir] spawn MON_domove;
+ //if (KRON_UPS_Debug>0 ) then { player globalchat format["%1 Moving away from %2 %2",_npc, typeof _vehicle,_dir];};
+ };
+};
+
+//Function for exiting of heli
+//Parmeters: [_heli,_targetPos,_atdist]
+// <- _heli:
+// <- _targetPos: position for exiting(if no waypoint used)
+// <- _atdist: distance for doing paradrop or landing
+MON_doParadrop = {
+ if (KRON_UPS_Debug>0 ) then { player globalchat format["Mon_doParadrop started"];};
+ private["_heli","_npc","_getout" ,"_gunner","_targetpos","_helipos","_dist","_index","_grp","_wp","_targetPosWp","_targetP","_units","_crew","_timeout","_jumpers"];
+ _heli = _this select 0;
+ _targetPos = [0,0];
+ _atdist = 250;
+ _flyingheigh = KRON_UPS_flyInHeight;
+ _landonBeh = ["CARELESS","SAFE"];
+ _timeout=0;
+
+ //Gets optional parameters
+ if ((count _this) > 1) then {_targetPos = _this select 1;};
+ if ((count _this) > 2) then {_atdist = _this select 2;};
+ if ((count _this) > 3) then {_flyingheigh = _this select 3;};
+
+ _helipos = [0,0];
+ _targetposWp = [0,0];
+ _gunner = objnull;
+ _gunner = gunner _heli;
+ _dist = 1000000;
+ _index = 0;
+ _grp = GRPNULL;
+ _wp = [];
+ _units =[];
+ _crew =[];
+
+ waituntil {count crew _heli > 0 || !alive _heli || !canmove _heli};
+ _grp = group ((crew _heli) select 0);
+ _npc = leader ((crew _heli) select 0);
+ _units = units _npc;
+
+ while { (_dist >= _atdist || _dist < 10) && alive _heli && canmove _heli && count crew _heli > 0} do {
+ _heli flyInHeight _flyingheigh;
+
+
+ /*
+ //Take last waypoint
+ _index = (count waypoints _grp) - 1;
+ _wp = [_grp,_index];
+ _targetPosWp = waypointPosition _wp;
+ if (format ["%1", _targetPosWp] == "[0,0,0]") then {_targetPosWp = _targetPos};
+ */
+
+ _targetPosWp = _targetPos;
+
+ _helipos = position _heli;
+ _dist = round([_helipos,_targetPosWp] call KRON_distancePosSqr);
+ //if (KRON_UPS_Debug>0 ) then {player globalchat format["Goiing to drop zone _dist=%1, _atdist=%2", _dist, _atdist ];};
+ sleep 1;
+ };
+
+ if (!alive _heli || count crew _heli == 0) exitwith{};
+ _crew = crew _heli;
+
+ //Jump
+ if (((position _heli) select 2) >= 90 && !surfaceIsWater position _heli && (!(toupper (behaviour _npc) IN _landonBeh) || (random 100) < 20)) then {
+ //moving hely for avoiding stuck
+ if (KRON_UPS_Debug>0 ) then {_heli globalchat format["doing paradrop high %1 dist=%2",(position _heli) select 2,_dist,_atdist];};
+
+ _jumpers = [_heli] call R_FN_unitsInCargo;
+
+ //Do paradrop
+ {
+ if( (assignedVehicleRole _x) select 0 == "Cargo")then
+ {
+ unassignVehicle _x;
+ _x action ["EJECT", _heli] ;
+ _x stop false;
+ [_x] allowGetIn false;
+ [_x] spawn MON_ACE_Watersurvival;
+
+ };
+ sleep 0.5;
+ } forEach crew _heli;
+ [_heli,700] spawn MON_domove;
+
+ //Clear Hely vars
+ _heli setVariable ["UPSMON_grpid", 0, false];
+ _heli setVariable ["UPSMON_cargo", [], false];
+
+ // set orginal fly hight
+ // _flyingheigh = KRON_UPS_flyInHeight;
+ // _heli flyInHeight _flyingheigh;
+
+ //Waits until all units are down
+ _timeout = time + 60;
+ {
+ waituntil {(_x == vehicle _x ) || !alive _x || !canmove _x || isnull _x || time > _timeout};
+ //Fix bug of ACE that sometimes AI gets in stand animation
+ //_x switchMove "AmovPercMsprSlowWrflDf_AmovPpneMstpSrasWrflDnon_2";
+ } foreach _jumpers;
+
+
+ if ( _npc == vehicle _npc) then {
+ {
+ if (alive _x && canmove _x) then {
+ [_x] dofollow _npc;
+ };
+ } foreach units _npc;
+ };
+
+
+
+ //if (KRON_UPS_Debug>0) then {player globalchat format["%1 after paradrop",_npc]};
+
+ if (alive _npc && canmove _npc) then {
+ _npc move _targetPosWp;
+ }else{
+ {if (alive _x && canmove _x) exitwith { _x move _targetPosWp;}}foreach _crew;
+ };
+
+ //If only pilot land heli
+ if (count crew _heli <=1) then {
+ [_heli] spawn MON_landHely;
+ };
+ } else {
+ //land
+
+ if ( ((position _heli) select 2) >= 60 && !surfaceIsWater _helipos && ((random 100)<20 || !canmove _heli || (toupper (behaviour _npc) IN _landonBeh))) then {
+ [_heli] spawn MON_landHely;
+
+ }
+ else {
+ If (alive _heli && canmove _heli && count crew _heli > 0) then {
+ if (KRON_UPS_Debug>0 ) then {_heli globalchat format["%1 failed paradrop, trying another time",typeof _heli];};
+ //Try another time
+ _heli flyInHeight _flyingheigh;
+ sleep 3;
+ [_heli, _targetPos, _atdist*1.5,_flyingheigh] spawn MON_doParadrop;
+ };
+ };
+ };
+};
+
+//Lands hely
+MON_landHely = {
+ private["_heli","_npc","_crew","_NearestEnemy","_timeout","_landing","_targetpos","_jumpers"];
+ _heli = _this select 0;
+ _crew =[];
+ _targetpos=[0,0];
+ _timeout = 0;
+ _landing = false;
+
+ sleep 0.05;
+ if (!alive _heli || !canmove _heli ) exitwith{};
+ _crew = crew _heli;
+ _npc = leader (_crew select 0);
+
+ //Checks hely is already landing
+ _landing = _heli getVariable "UPSMON_landing";
+ if (isnil ("_landing")) then {_landing=false; _heli setVariable ["UPSMON_landing", false, false];};
+ if (_landing) exitwith {};
+
+ //Orders to land heli
+ _heli land "LAND";
+ if (KRON_UPS_Debug>0 ) then {player globalchat format["%1 is landing",typeof _heli];};
+
+ //Puts a mark for knowing hely is landing
+ _heli setVariable ["UPSMON_landing", true, false];
+
+ //Waits for land position
+ waituntil {!alive _heli || toUpper(landResult _heli) != "NOTREADY" };
+ if (alive _heli && (toUpper(landResult _heli) == "NOTFOUND")) exitwith {
+ if (KRON_UPS_Debug>0 ) then { player globalchat format["%1 no landing zone, doing paradrop",typeof _heli];};
+ _heli setVariable ["UPSMON_landing", false, false];
+ [_heli] spawn MON_doparadrop;
+ };
+
+ //1rt try-Waits until velocity and heigh are good for getting out
+ _timeout = 60 + time;
+ waituntil {!alive _heli || time > _timeout || ((abs(velocity _heli select 2)) <= 1 && ((position _heli) select 2) <= 0.7)};
+
+ //2nd try-Waits until velocity and heigh are good for getting out
+ if (((position _heli) select 2) > 2 && ((position _heli) select 2) < 30 && !surfaceiswater position _heli) then {
+ _heli land "LAND";
+ _timeout = 30 + time;
+ waituntil {!alive _heli || time > _timeout || ((position _heli) select 2) > 30 || ( (abs(velocity _heli select 2)) <= 1 && ((position _heli) select 2) <= 0.7)};
+
+ //Failed landing doing paradrop
+ if ( ((position _heli) select 2) > 30) exitwith {
+ if (KRON_UPS_Debug>0 ) then { player globalchat format["%1 landing timeout, doing paradrop",typeof _heli];};
+ _heli setVariable ["UPSMON_landing", false, false];
+ sleep 5;
+ [_heli] spawn MON_doparadrop;
+ };
+ };
+
+ //Chechs if alive before continuing
+ if (!alive _heli) exitwith{};
+
+
+ //If there is pilot and gunner, get out only cargo
+ if ((!isnull gunner _heli) && (!isnull driver _heli)) then {
+ _jumpers = [_heli] call R_FN_unitsInCargo;
+ } else {
+ _jumpers = crew _heli;
+ };
+
+
+ //dogetout each of _jumpers
+ {
+ _x spawn MON_doGetOut;
+ sleep 0.5;
+ } forEach _jumpers;
+
+ _timeout = 20 + time;
+
+ //Waits until all getout of heli
+ {
+ waituntil {vehicle _x == _x || !canmove _x || !alive _x || movetofailed _x || time > _timeout };
+ } forEach _jumpers;
+
+ sleep 1;
+ _heli land "NONE";
+ sleep 1;
+ [_heli,700] spawn MON_domove;
+
+
+
+
+ // If leader alive sets combat mode
+ if (alive _npc && canmove _npc) then {
+ //Gets nearest known enemy for putting in combat mode
+ _NearestEnemy = _npc findNearestEnemy _npc;
+ if (!isnull _NearestEnemy ) then {
+ _npc setBehaviour "AWARE";
+ _groupOne = group _npc;
+ _groupOne setFormation "DIAMOND";
+ };
+
+ //Moves to current target Position
+ _grpid = _npc getvariable "UPSMON_grpid";
+ if !(isnil "_grpid") then {
+ _targetpos =(KRON_targetsPos select _grpid);
+ _npc move _targetpos;
+ if (KRON_UPS_Debug>0 ) then { player globalchat format["%1 landed, moving to %2 %3",_grpid,_targetpos,count KRON_targetsPos];};
+ };
+ };
+
+ //Quitamos el id al vehiculo para que pueda ser reutilizado
+ _heli setVariable ["UPSMON_grpid", 0, false];
+ _heli setVariable ["UPSMON_cargo", [], false];
+ _heli setVariable ["UPSMON_landing", false, false];
+};
+
+//Controls that heli not stoped flying
+MON_HeliStuckcontrol = {
+ private["_heli","_landing","_stuckcontrol","_dir1","_targetPos","_lastpos"];
+ _heli = _this select 0;
+
+ _landing = false;
+ _stuckcontrol = false;
+ _targetPos=[0,0,0];
+ _dir1 = 0;
+
+ sleep 0.05;
+ if ( !alive _heli || !canmove _heli ) exitwith{};
+
+ //Checks stuckcontrol not active
+ _stuckcontrol = _heli getVariable "UPSMON_stuckcontrol";
+ if (isnil ("_stuckcontrol")) then {_stuckcontrol=false};
+ if (_stuckcontrol) exitwith {};
+
+ _heli setVariable ["UPSMON_stuckcontrol", true, false];
+ //if (KRON_UPS_Debug>0 ) then {player globalchat format["%1 stuck control begins",typeof _heli];};
+
+ //Stuck loop control
+ while {(alive _heli) && (count crew _heli) > 0 } do {
+ sleep 5;
+ if ((abs(velocity _heli select 0)) <= 5 && (abs(velocity _heli select 1)) <= 5 && (abs(velocity _heli select 2)) <= 5 && ((position _heli) select 2) >= 30) then {
+
+ _landing = _heli getVariable "UPSMON_landing";
+ if (isnil ("_landing")) then {_landing=false;};
+
+ if (!_landing) then {
+ //moving hely for avoiding stuck
+ [_heli,800] spawn MON_domove;
+ if (KRON_UPS_Debug>0 ) then {player GLOBALCHAT format["%1 stucked at %2m height, moving",typeof _heli,(position _heli) select 2];};
+ sleep 25;
+ };
+ };
+ };
+ //if (KRON_UPS_Debug>0 ) then {player globalchat format["%1 exits from stuck control",typeof _heli];};
+ _heli setVariable ["UPSMON_stuckcontrol", false, false];
+};
+
+//Function that checks is gunner is alive, if not moves a cargo
+MON_Gunnercontrol = {
+ private["_vehicle","_gunnercontrol","_hasgunner","_crew","_crew2"];
+ _vehicle = _this select 0;
+
+ _targetPos=[0,0,0];
+ _dir1 = 0;
+ _gunnercontrol = false;
+ _hasgunner = (_vehicle) emptyPositions "Gunner" > 0 || !isnull gunner _vehicle;
+ _crew = [];
+ _crew2 = []; //Without driver and gunner
+
+ sleep 0.05;
+ if ( !alive _vehicle || !canmove _vehicle ) exitwith{};
+
+ //Checks stuckcontrol not active
+ _gunnercontrol = _vehicle getVariable "UPSMON_gunnercontrol";
+ if (isnil ("_gunnercontrol")) then {_gunnercontrol=false};
+ if (_gunnercontrol) exitwith {};
+
+ _vehicle setVariable ["UPSMON_gunnercontrol", true, false];
+
+ _crew = crew _vehicle;
+ //gunner and driver loop control
+ while { alive _vehicle && canmove _vehicle && count _crew > 0} do {
+ _crew = crew _vehicle;
+ {
+ if (!canmove _x || !alive _x) then {_crew = _crew -[_x];};
+ }foreach _crew;
+
+ //Driver control
+ if ((isnull (driver _vehicle) || !alive (driver _vehicle) || !canmove (driver _vehicle)) && count _crew > 0) then {
+ _crew2 = _crew - [gunner _vehicle];
+ if (count _crew2 > 0) then {
+ (_crew2 select (count _crew2 - 1)) spawn MON_movetodriver;
+ };
+ };
+
+ //Gunner control
+ if ( _hasgunner && (isnull (gunner _vehicle) || !alive (gunner _vehicle) || !canmove (gunner _vehicle)) && count _crew > 1) then {
+ _crew2 = _crew - [driver _vehicle];
+ if (count _crew2 > 0) then {
+ (_crew2 select (count _crew2 - 1)) spawn MON_movetogunner;
+ }else{
+ (_crew select 0) spawn MON_movetogunner;
+ };
+ };
+ sleep 20;
+ //if (KRON_UPS_Debug>0 ) then {player globalchat format["%1 crew=%2",typeof _vehicle, count _crew];};
+ };
+ //if (KRON_UPS_Debug>0 ) then {player globalchat format["%1 exits from gunner control",typeof _vehicle];};
+ _vehicle setVariable ["UPSMON_gunnercontrol", false, false];
+};
+
+
+//Mueve a todo el grupo adelante
+MON_move = {
+ private["_npc","_dir1","_targetPos","_dist"];
+ _npc = _this select 0;
+ _dist = _this select 1;
+
+ sleep 0.05;
+ if (!alive _npc || !canmove _npc ) exitwith{};
+
+ _dir1 = getDir _npc;
+ _targetPos = [position _npc,_dir1, _dist] call MON_GetPos2D;
+ _npc move _targetPos;
+};
+
+//Mueve al soldado adelante
+MON_domove = {
+ private["_npc","_dir1","_targetPos","_dist"];
+ _npc = _this select 0;
+ _dist = _this select 1;
+ if ((count _this) > 2) then {_dir1 = _this select 2;} else{_dir1 = getDir _npc;};
+
+ sleep 0.05;
+ if (!alive _npc || !canmove _npc ) exitwith{};
+
+ _targetPos = [position _npc,_dir1, _dist] call MON_GetPos2D;
+ //If position water and not boat not go
+ if (surfaceIsWater _targetPos && !(_npc iskindof "boat" || _npc iskindof "air") ) exitwith {};
+ _npc domove _targetPos;
+};
+
+//Funcin que detiene al soldado y lo hace esperar x segundos
+MON_doStop = {
+ private["_sleep","_npc"];
+
+ _npc = _this select 0;
+ _sleep = _this select 1;
+
+ sleep 0.05;
+ if (!alive _npc || !canmove _npc ) exitwith{};
+ if ( _sleep == 0 ) then {_sleep = 0.1};
+
+ //Restauramos valores por defecto de movimiento
+ //_npc disableAI "MOVE";
+ dostop _npc ;
+ sleep _sleep;
+ [_npc] spawn MON_cancelstop;
+};
+
+//Funcin que detiene al soldado y lo hace esperar x segundos
+MON_cancelstop = {
+ private["_npc"];
+ _npc = _this select 0;
+ _npc stop false;
+};
+
+//Make grenade dodge animation
+MON_evadeGrenade = {
+ if (!alive _this || (vehicle _this) != _this || !canmove _this) exitwith{};
+
+ _this playmovenow "AmovPercMstpSlowWrflDnon_ActsPpneMstpSlowWrflDr_GrenadeEscape";
+ sleep 8;
+ if (!alive _this || (vehicle _this) != _this || !canmove _this) exitwith{};
+ _this switchmove "AmovPpneMstpSrasWrflDnon_AmovPpneMevaSlowWrflDr"; //croqueta
+ _this playmovenow "AmovPpneMstpSrasWrflDnon"; //prone
+};
+
+//Realiza la animacin de la croqueta
+MON_animCroqueta = {
+ if (!alive _this || (vehicle _this) != _this || !canmove _this || !(_this iskindof "Man")) exitwith{};
+
+ if ((random 1)<=.50) then {
+ _this switchmove "AmovPpneMstpSrasWrflDnon_AmovPpneMevaSlowWrflDl"; //croqueta
+ } else {
+ _this switchmove "AmovPpneMstpSrasWrflDnon_AmovPpneMevaSlowWrflDr"; //croqueta
+ };
+};
+
+//Throw a grenade
+MON_throw_grenade = {
+ private["_target","_npc"];
+ _npc = _this select 0;
+ _target = _this select 1;
+ sleep random 1.5;
+ if (!alive _npc || (vehicle _npc) != _npc || !canmove _npc) exitwith{};
+ [_npc,_target] spawn MON_dowatch;
+ sleep 0.1;
+
+ // R_Functions
+ [_npc] spawn R_ThrowSmoke;
+
+
+ /*
+
+ _npc addMagazine "SmokeShell";
+ _npc selectWeapon "throw";
+ sleep .1;
+ _npc fire ["SmokeShellMuzzle","SmokeShellMuzzle","SmokeShell"];
+ */
+};
+
+//Establece el tipo de posicin
+MON_setUnitPos = {
+ private["_pos","_npc"];
+ _npc = _this select 0;
+ _pos = _this select 1;
+
+ sleep 0.5;
+ if (!alive _npc || !canmove _npc || _npc != vehicle _npc || !(_npc iskindof "Man")) exitwith{};
+ _npc setUnitPos _pos;
+ sleep 1;
+};
+//Establece el tipo de posicin
+MON_setUnitPosTime = {
+ private["_pos","_npc"];
+ _npc = _this select 0;
+ _pos = _this select 1;
+ _time = _this select 2;
+
+ if (!alive _npc || !canmove _npc) exitwith{};
+ _npc setUnitPos _pos;
+ sleep _time;
+ _npc setUnitPos "AUTO";
+ sleep 1;
+};
+
+// Funcin para mirar en una direccin
+MON_dowatch = {
+ private["_target","_npc"];
+ _npc = _this select 0;
+ _target = _this select 1;
+
+ if (!alive _npc) exitwith{};
+ _npc dowatch _target;
+ sleep 1;
+};
+
+//Funcin que mueve al soldado a la posicin de conductor
+//Parmeters: [_npc,_vehicle]
+// <- _npc: unit to move to driver pos
+// <- _vehicle
+MON_movetoDriver = {
+ private["_vehicle","_npc"];
+ _npc = _this ;
+ _vehicle = vehicle _npc;
+
+ //Si est muerto
+ if (vehicle _npc == _npc || !alive _npc || !canmove _npc || !(_npc iskindof "Man")) exitwith{};
+
+ if (isnull(driver _vehicle) || !alive(driver _vehicle) || !canmove(driver _vehicle)) then {
+ //if (KRON_UPS_Debug>0) then {player sidechat format["%1: Moving to driver of %2 ",_npc,typeof _vehicle]};
+ _npc action ["getOut", _vehicle];
+ doGetOut _npc;
+ WaitUntil {vehicle _npc==_npc || !alive _npc || !canmove _npc};
+ //Si est muerto
+ if (!alive _npc || !canmove _npc) exitwith{};
+ unassignVehicle _npc;
+ _npc assignasdriver _vehicle;
+ _npc moveindriver _vehicle;
+ };
+};
+
+//Funcin que mueve al soldado a la posicin de conductor
+//Parmeters: [_npc,_vehicle]
+// <- _npc: unit to move to driver pos
+// <- _vehicle
+MON_movetogunner = {
+ private["_vehicle","_npc"];
+ _npc = _this ;
+ _vehicle = vehicle _npc;
+
+ sleep 0.05;
+ //Si est muerto
+ if (vehicle _npc == _npc || !alive _npc || !canmove _npc || !(_npc iskindof "Man")) exitwith{};
+
+ if (isnull(gunner _vehicle) || !alive(gunner _vehicle) || !canmove(gunner _vehicle)) then {
+ if (KRON_UPS_Debug>0) then {player sidechat format["%1: Moving to gunner of %2 ",_npc,typeof _vehicle]};
+ _npc action ["getOut", _vehicle];
+ doGetOut _npc;
+ WaitUntil {vehicle _npc==_npc || !alive _npc || !canmove _npc};
+ //Si est muerto
+ if (!alive _npc || !canmove _npc) exitwith{};
+ unassignVehicle _npc;
+ _npc assignasgunner _vehicle;
+ _npc moveingunner _vehicle;
+ };
+};
+
+//Funcin que retorna array de arrays con edificios y sus plantas
+//Parmeters: [_object,(_distance,_minfloors)]
+// <- _object: soldier to get near buildings
+// <- _distance: distance to search buildings (optional, 25 by default)
+// <- _minfloors: min floors of building (optional) if not especified min floors is 2
+// -> [_bld,_bldpos]
+MON_GetNearestBuildings = {
+ private ["_object","_altura","_pos","_bld","_bldpos","_posinfo","_minfloors","_OCercanos","_distance","_blds"];
+ _distance = 25;
+ _minfloors = 2;
+ _altura = 0;
+ _blds = [];
+
+ _object = _this select 0;
+ if ((count _this) > 1) then {_distance = _this select 1;};
+ if ((count _this) > 2) then {_minfloors = _this select 2;};
+
+ _pos =0;
+ _bld = objnull;
+ _bldpos =0;
+ _posinfo=[];
+
+ //La altura mnima es 2 porque hay muchos edificios q devuelven 2 de altura pero no se puede entrar en ellos.
+ if ( minfloors == 0 ) then {
+ minfloors = 2;
+ };
+
+ // _posinfo: [0,0]=no house near, [obj,0]=house near, but no roof positions, [obj,pos]=house near, with roof pos
+ //_posinfo= _object call MON_PosInfo;
+ _OCercanos = nearestObjects [_object, ["house","building"] , _distance];
+
+ {
+ _bldpos = _x call MON_BldPos;
+ if ( _bldpos >= _minfloors && damage _x <= 0 ) then { _blds = _blds + [[_x,_bldpos]];};
+ //player sidechat format["%1 cerca de edificio con %2 plantas %5",typeof _object,_bldpos];
+ }foreach _OCercanos;
+
+ _blds;
+};
+
+//Function to move al units of squad to near buildings
+//Parmeters: [_npc,(_patrol,_minfloors)]
+// <- _npc: lider
+// <- _distance: distance to search buildings (optional, 25 by default)
+// <- _patrol: wheter must patrol or not
+MON_moveNearestBuildings = {
+ private ["_npc","_altura","_pos","_bld","_bldpos","_posinfo","_blds","_distance","_cntobjs1","_bldunitin","_blddist","_patrol","_wait","_all"];
+ _distance = 30;
+ _altura = 0;
+ _patrol = false;
+ _wait=60;
+ _all = false;
+
+ _npc = _this select 0;
+ if ((count _this) > 1) then {_distance = _this select 1;};
+ if ((count _this) > 2) then {_patrol = _this select 2;};
+ if ((count _this) > 3) then {_wait = _this select 3;};
+ if ((count _this) > 4) then {_all = _this select 4;};
+
+
+ _pos =0;
+ _bld = objnull;
+ _bldpos =0;
+ _cntobjs1=0;
+ _bldunitsin=[];
+ _units=[];
+ _blds=[];
+
+ //If all soldiers move leader too
+ if (_all) then {
+ _units = (units _npc);
+ }else{
+ _units = (units _npc) - [_npc];
+ };
+
+ sleep 0.05;
+ {
+ if (_x iskindof "Man" && unitReady _x && _x == vehicle _x && canmove _x && alive _x && canstand _x) then {_bldunitsin = _bldunitsin + [_x]}
+ }foreach _units;
+
+ if (count _bldunitsin == 0) exitwith {};
+
+ //Obtenemos los edificios cercanos al lider
+ _blds = [_npc,_distance] call MON_GetNearestBuildings;
+
+ if (count _blds==0) exitwith {};
+
+ //Movemos a la unidades a los edificios cercanos.
+ [_bldunitsin, _blds, _patrol,_wait,_all] spawn MON_moveBuildings;
+
+};
+
+
+//Function to move al units of squad to near buildings
+//Parmeters: [_npc,(_patrol,_minfloors)]
+// <- _units: array of units
+// <- _blds: array of buildingsinfo [_bld,pos]
+// <- _patrol: wheter must patrol or not
+// -> _bldunitsin: array of units moved to builidings
+MON_moveBuildings = {
+ private ["_npc","_altura","_pos","_bld","_bldpos","_posinfo","_blds","_cntobjs1","_bldunitin","_blddist","_i","_patrol","_wait","_all","_minpos","_blds2"];
+ _patrol = false;
+ _wait = 60;
+ _minpos = 2;
+ _all = false;
+
+ _units = _this select 0;
+ _blds = _this select 1;
+ if ((count _this) > 2) then {_patrol = _this select 2;};
+ if ((count _this) > 3) then {_wait = _this select 3;};
+ if ((count _this) > 4) then {_all = _this select 4;};
+ if ((count _this) > 5) then {_minpos = _this select 5;};
+
+ _altura = 0;
+ _pos =0;
+ _bld = objnull;
+ _bldpos =0;
+ _cntobjs1=0;
+ _bldunitsin=[];
+ _movein=[];
+ _blds2 =[];
+
+ //if (KRON_UPS_Debug>0) then {player globalchat format["MON_moveBuildings _units=%1 _blds=%2",count _units, count _blds]; };
+ //if (KRON_UPS_Debug>0) then {diag_log format["MON_moveBuildings _units=%1 _blds=%2",count _units, count _blds];};
+
+ {
+ _bld = _x select 0;
+ _bldpos = _x select 1;
+
+ if ( _bldpos >= _minpos ) then {
+ _cntobjs1 = 1;
+ _movein = [];
+ _i = 0;
+
+ if (_patrol) then {
+ if (_bldpos >= 8) then { _cntobjs1 = 2 };
+ } else {
+ if (_bldpos >= 8) then { _cntobjs1 = round(random 3) + 1;};
+ };
+
+ //Buscamos una unidad cercana para recorrerlo
+ {
+ if (_x iskindof "Man" && unitReady _x && canmove _x && alive _x && vehicle _x == _x && _i < _cntobjs1) then{
+ _movein = _movein + [_x];
+ _i = _i + 1;
+ };
+ } foreach _units;
+
+ //if (KRON_UPS_Debug>0) then {player globalchat format["_units=%3 _bldunitsin %4 _movein=%1",_movein, typeof _bld, count _units, count _bldunitsin];}
+ //if (KRON_UPS_Debug>0) then {diag_log format["_units=%3 _bldunitsin %4 _movein=%1 %2 %5",_movein, typeof _bld, count _units, count _bldunitsin,_x];};
+
+ if (count _movein > 0) then {
+ _bldunitsin = _bldunitsin + _movein;
+ _units = _units - _bldunitsin;
+ if (_patrol) then {
+ {
+ [_x,_bld,_bldpos] spawn MON_patrolBuilding;
+ }foreach _movein;
+ } else {
+ {
+ _altura = floor(random(_bldpos));
+ if (_altura<2) then {_altura = _minpos};
+ [_x,_bld,_altura,_wait] spawn MON_movetoBuilding;
+ }foreach _movein;
+ };
+ };
+ };
+
+ if (count _units == 0) exitwith {};
+ }foreach _blds;
+
+ //If need to enter all units in building and rest try with a superior lvl
+ if ( _all && count _units > 0 ) then {
+ _blds2 = [];
+ _minpos = _minpos + 3;
+ {
+ if ( (_x select 1) >= _minpos) then {
+ _blds2 = _blds2 + [_x];
+ };
+ }foreach _blds;
+
+ //if (KRON_UPS_Debug>0) then {player globalchat format["MON_moveBuildings exit _units=%1 _blds=%2",count _units, count _blds2]; };
+ //if (KRON_UPS_Debug>0) then {diag_log format["MON_moveBuildings exit _units=%1 _blds=%2",count _units, count _blds2];};
+
+ if (count _blds2 > 0 ) then {
+ [_units, _blds2, _patrol,_wait,_all,_minpos] call MON_moveBuildings;
+ };
+ _bldunitsin = _bldunitsin + _units;
+ };
+ _bldunitsin;
+};
+
+//Function to move a unit to a position in a building
+//Parmeters: [_npc,(_patrol,_minfloors)]
+// <- _npc: soldier
+// <- _bld: building
+// <- _altura: building
+// <- _wait: time to wait in position
+MON_movetoBuilding = {
+
+ private ["_npc","_altura","_bld","_wait","_dist","_retry","_soldiers"];
+ _wait = 60;
+ _timeout = 120;
+ _dist = 0;
+ _retry = false;
+
+ _npc = _this select 0;
+ _bld = _this select 1;
+ _altura = _this select 2;
+ if ((count _this) > 3) then {_wait = _this select 3;};
+
+ //Si est en un vehiculo ignoramos la orden
+ if (vehicle _npc != _npc || !alive _npc || !canmove _npc) exitwith{};
+
+ //Si ya est en un edificio ignoramos la orden
+ _inbuilding = _npc getvariable ("UPSMON_inbuilding");
+ if ( isNil("_inbuilding") ) then {_inbuilding = false;};
+ if (_inbuilding) exitwith{};
+
+ _npc domove (_bld buildingPos _altura);
+ _npc setVariable ["UPSMON_inbuilding", _inbuilding, false];
+ _npc setvariable ["UPSMON_buildingpos", nil, false];
+ _timeout = time + _timeout;
+
+ //if (KRON_UPS_Debug>0) then {player globalchat format["%4|_bld=%1 | %2 | %3",typeof _bld, _npc, typeof _npc ,_altura];};
+ //if (KRON_UPS_Debug>0) then {diag_log format["%4|_bld=%1 | %2 | %3",typeof _bld, _npc, typeof _npc ,_altura];};
+
+ waitUntil {moveToCompleted _npc || moveToFailed _npc || !alive _npc || !canmove _npc || _timeout < time};
+
+ if (moveToCompleted _npc && alive _npc && canmove _npc) then {
+ _dist = [position _npc,_bld buildingPos _altura] call KRON_distancePosSqr;
+
+ _soldiers = [_npc,1] call MON_nearestSoldiers;
+
+ //If more soldiers in same floor see to keep or goout.
+ if (count _soldiers > 0) then {
+ {
+ if (!isnil{_x getvariable ("UPSMON_buildingpos")}) exitwith {_retry = true};
+ }foreach _soldiers;
+ };
+
+ if (!_retry && _dist <= 2) then {
+ _npc setvariable ["UPSMON_buildingpos", _altura, false];
+ sleep 0.1;
+ [_npc,_wait] spawn MON_dostop;
+ };
+ };
+
+ if (!alive _npc || !canmove _npc) exitwith{};
+ _npc setVariable ["UPSMON_inbuilding", false, false];
+
+
+ //Down one position.
+ if (_retry ) then {
+ _altura = _altura + 1;
+ _bldpos = _bld call MON_BldPos;
+
+ if (_altura <= _bldpos) then {
+ [_npc,_bld,_altura] spawn MON_movetoBuilding;
+ };
+ };
+};
+
+
+//Funcin para mover a una unidad al edificio ms cercano
+//Parmeters: [_npc,_bld,(_BldPos)]
+// <- _npc: soldier to move
+// <- _bld:building to patrol
+// <- _BldPos: positions of builiding (optional)
+MON_patrolBuilding = {
+ private ["_npc","_bld","_bldpos","_posinfo","_minfloors","_OCercanos","_distance","_timeout","_pos","_inbuilding","_rnd","_NearestEnemy","_patrolto","_time"];
+ _bldpos = 0;
+ _pos = 0;
+ _timeout = 0;
+ _i = 1;
+ _inbuilding = false;
+ _rnd = 0;
+ _patrolto = 0;
+ _NearestEnemy = objnull;
+ _time = 0;
+
+ _npc = _this select 0;
+ _bld = _this select 1;
+ if ((count _this) > 2) then {_bldpos = _this select 2;} else {_bldpos = _x call MON_BldPos;};
+
+ if (_i > _bldpos) then {_i = _bldpos};
+ _patrolto = round ( 10 + random (_bldpos) );
+
+ if (_patrolto > _bldpos) then {_patrolto = _bldpos};
+
+ //Si ya est muerto o no se puede mover se ignora
+ if (!(_npc iskindof "Man") || !alive _npc || !canmove _npc) exitwith{};
+
+ //Si ya est en un edificio ignoramos la orden
+ _inbuilding = _npc getvariable ("UPSMON_inbuilding");
+ if ( isNil("_inbuilding") ) then {_inbuilding = false;};
+
+ //Asignamos el vehiculo a a la escuadra si contiene las posiciones justas
+ if (!_inbuilding) then {
+ _inbuilding = true;
+ _npc setVariable ["UPSMON_inbuilding", _inbuilding, false];
+ [_npc,"Middle"] spawn MON_setUnitPos;
+ _timeout = time + 60;
+
+ //player sidechat format["%1 patrol building %2 from %3 to %4",typeof _npc, typeof _bld,_i, _patrolto];
+
+ while { _i <= _patrolto && alive _npc && canmove _npc} do{
+
+ _npc domove (_bld buildingPos _i);
+
+
+ _time = time + 30;
+ waitUntil {moveToCompleted _npc or moveToFailed _npc or !alive _npc or _time < time};
+
+ if (moveToCompleted _npc) then {
+ _timeout = time + 60;
+ _i = _i + 1;
+ } else {
+ if (moveToFailed _npc || !canmove _npc || !alive _npc || _timeout < time) then {
+ //player sidechat format["%1 Cancelando patrulla en %2",_npc, typeof _bld];
+ _i = _patrolto + 1;
+ };
+ };
+ sleep 0.05;
+ };
+
+ //Si est en un vehiculo ignoramos la orden
+ if (!alive _npc || !canmove _npc) exitwith{};
+
+ //Volvemos con el lider
+ _npc domove (position leader _npc);
+
+ //Marcamos que ya hemos finalizado
+ sleep 60; //Damos tiempo para salir del edificio
+ _npc setVariable ["UPSMON_inbuilding", false, false];
+ };
+};
+
+//Function to put a mine
+//Parmeters: [_npc,(_position)]
+// <- _npc: leader
+// <- _position:location for mine (optional)
+MON_CreateMine = {
+ private ["_npc","_rnd","_soldier","_mine","_dir","_position"];
+ _soldier = _this select 0;
+ if ((count _this) > 1) then {_position = _this select 1;} else {_position = [0,0];};
+
+ _mine = objnull;
+ _rnd = 0;
+ _dir = 0;
+ _npc = leader _soldier;
+
+ if (_soldier == _npc ) then {
+ _rnd = round (random ( count ((units _npc))));
+ _soldier = (units _npc) select _rnd;
+ };
+
+ //leader only control not work
+ //Si est en un vehiculo ignoramos la orden
+ if (!(_soldier iskindof "Man" ) || _soldier == _npc || _soldier!=vehicle _soldier || !alive _soldier || !canmove _soldier) exitwith {false};
+
+ //Animacin para montar el arma
+ if ((count _this) > 1) then {
+ [_soldier,_position] spawn MON_doCreateMine;
+ }else{
+ [_soldier] spawn MON_doCreateMine;
+ };
+ true;
+};
+
+MON_doCreateMine = {
+ private ["_npc","_rnd","_soldier","_mine","_dir","_position"];
+ _position = [0,0];
+
+ _soldier = _this select 0;
+ if ((count _this) > 1) then {_position = _this select 1;};
+
+ //If not is Man or dead exit
+ if (!(_x iskindof "Man" ) || _soldier!=vehicle _soldier || !alive _soldier || !canmove _soldier) exitwith {false};
+
+ _soldier stop false;
+ [_soldier,"AUTO"] spawn MON_setUnitPos;
+
+ if ((count _this) > 1) then {
+ _soldier domove _position;
+ waituntil {unitReady _soldier || moveToCompleted _soldier || moveToFailed _soldier || !alive _soldier || !canmove _soldier};
+ };
+
+ if (moveToFailed _soldier || !alive _soldier || _soldier != vehicle _soldier || !canmove _soldier) exitwith {false};
+
+ //Crouche
+ _soldier playMovenow "ainvpknlmstpslaywrfldnon_1";
+ sleep 1;
+
+ if (!alive _soldier || !canmove _soldier) exitwith{};
+ _dir = getdir _soldier;
+ _position = [position _soldier,_dir, 0.5] call MON_GetPos2D;
+ _mine = createMine ["MineMine", _position , [], 0];
+
+ //Prepare mine
+ _soldier playMoveNow "AinvPknlMstpSlayWrflDnon_medic";
+ sleep 5;
+
+ //Return to formation
+ _soldier domove position ( leader _soldier );
+};
+
+//Function to surrender AI soldier
+//Parmeters: [_npc]
+// <- _npc: soldier to surrender
+MON_surrender = {
+ private ["_npc","_vehicle"];
+ _npc = _this select 0;
+
+ if (!alive _npc || !canmove _npc) exitwith {};
+
+ _npc addrating -1000;
+ _npc setcaptive true;
+ sleep 0.5;
+
+ _vehicle = vehicle _npc;
+
+ if ( _npc != _vehicle || !(_npc iskindof "Man" )) then {
+ _vehicle setcaptive true;
+
+ if ( "Air" countType [_vehicle]>0) then {
+
+ //Si acaba de entrar en el heli se define punto de aterrizaje
+ if (_npc == driver _vehicle ) then {
+ [_vehicle] call MON_landHely;
+ };
+ } else {
+ _npc spawn MON_doGetOut;
+ };
+
+ //Esperamos a que est parado
+ waituntil {_npc == vehicle _npc || !alive _npc};
+ };
+
+ if (!alive _npc || !canmove _npc) exitwith {};
+ _npc setcaptive true;
+ _npc stop true;
+
+ [_npc,"UP"] call MON_setUnitPos;
+ removeAllWeapons _npc;
+ sleep 1;
+ _npc playMoveNow "AmovPercMstpSnonWnonDnon_AmovPercMstpSsurWnonDnon";
+
+};
+
+//Returns leader if was dead
+MON_getleader = {
+ private ["_npc","_members"];
+ _npc = _this select 0;
+ _members = _this select 1;
+
+ sleep 0.05;
+ if (!alive _npc ) then {
+ //takes commder a soldier not in vehicle
+ {
+ if (alive _x && canmove _x && _x == vehicle _x && !isplayer _x) exitwith {
+ _npc = _x;
+ };
+ } foreach _members;
+
+ //if no soldier out of vehicle takes any
+ if (!alive _npc ) then {
+ {
+ if (alive _x && canmove _x) exitwith {_npc = _x;};
+ } foreach _members;
+ };
+
+ //If not alive or already leader or is player exits
+ if (isPlayer _npc || !alive _npc || !canmove _npc ) then
+ {
+ {
+ if (alive _x && !isPlayer _x) exitwith {_npc = [_npc, _members] call MON_getleader;};
+ }foreach _members;
+ };
+
+ if (leader _npc == _npc) exitwith {_npc};
+
+ //Set new _npc as leader
+ group _npc selectLeader _npc;
+ };
+ _npc // return
+};
+
+MON_ACE_Watersurvival = {
+ private ["_lb","_pos","_ejector","_in","_grpid","_rnd"];
+ _in =[];
+ _rnd = 0;
+ _ejector = _this select 0;
+ //if (KRON_UPS_Debug>0) then {player globalchat format["MON_ACE_Watersurvival %1",typeof _ejector]};
+
+ waitUntil { !canmove _ejector || !alive _ejector || isnull (_ejector) || ((getPos vehicle _ejector) select 2 < 1) };
+ if ( !surfaceIsWater (getpos _ejector) || !canmove _ejector || !alive _ejector || isnull (_ejector) ) exitWith {};
+
+ //Miramos de entrar en un barco cercano
+ _grpid = _ejector getvariable "UPSMON_grpid";
+ if (isnil "_grpid") then {_grpid = 0};
+ _in = [_grpid,_ejector,30] call MON_GetIn_NearestBoat;
+
+ //If no boat near creates a zodiac
+ if (count _in <= 0) then {
+ if (!(isNil "ace_main")) then {
+ _lb = "ACE_Lifeboat_US" createVehicle getposASL _ejector;
+ }else{
+ _lb = "Zodiac" createVehicle getposASL _ejector;
+ };
+ _pos = getposASL _ejector;
+ _pos set [0, ((_pos select 0) + 2)];
+ _pos set [1, ((_pos select 1) + 2)];
+ //_pos set [2, 0];
+ _lb setPos _pos;
+
+ //Moves in boat
+ if !(isPlayer _ejector) then {
+ [_ejector,_lb,0] call MON_assignasdriver;
+ };
+ };
+
+ //Wait until reached eart
+ waitUntil { !canmove _ejector || !alive _ejector || isnull (_ejector) || !surfaceIsWater (position _ejector) };
+ if (KRON_UPS_Debug>0) then {player globalchat format["Exit from boat%1",typeof _lb]};
+ _ejector spawn MON_dogetout;
+};
+
+//=============================================================Changed by Shay_gman========================================================================================
+//Function to do artillery
+//Parmeters: [_position,(_rounds,_area,_cadence,_mincadence)]
+// <- _arti:
+// <- _position: center of fire create artillery
+// <- _rounds: rounds of fire
+// <- _area: Dispersion area
+// <- _maxcadence: Cadence of fire, is random between min
+// <- _mincadence: Minimum cadence
+// <- _bullet: class of bullet to fire, default ARTY_Sh_81_HE
+
+MON_artillery_dofire = {
+ if (!isserver) exitWith {};
+ private ["_smoke1","_i","_area","_position","_maxcadence","_mincadence","_sleep","_rounds","_arti","_timeout","_salvo_break"];
+ _area = 150;
+ _maxcadence = 10;
+ _mincadence = 5;
+ _sleep = 0;
+ _rounds = 5;
+ _bullet = "ARTY_Sh_81_HE";
+ _position =[];
+ _salvo_break = 10;
+
+ _arti = _this select 0;
+ _position = _this select 1;
+ if ((count _this) > 2) then {_rounds = _this select 2;};
+ if ((count _this) > 3) then {_area = _this select 3;};
+ if ((count _this) > 4) then {_maxcadence = _this select 4;};
+ if ((count _this) > 5) then {_mincadence = _this select 5;};
+ if ((count _this) > 6) then {_bullet = _this select 6;};
+ if ((count _this) > 7) then {_salvo_break = _this select 7;};
+
+ // set reload time for 1000 make do not fire untill this salvo finish
+ _timeout = time + 1000;
+ _arti setVariable ["timeout", _timeout, false];
+
+ _area2 = _area * 2;
+ if (KRON_UPS_Debug>0) then { player globalchat format["artillery doing fire on %1",_position] };
+ for [{_i=0}, {_i<_rounds}, {_i=_i+1}] do
+ {
+ _arti fire (weapons _arti select 0);
+ _sleep = random _maxcadence;
+ if (_sleep < _mincadence) then {_sleep = _mincadence};
+ sleep _sleep;
+ _smoke1 = _bullet createVehicle [(_position select 0)+ random _area2 - _area, (_position select 1)+ random _area2 - _area, (_position select 2)+ 100];
+ _arti setVehicleAmmo 1;
+ };
+
+ // set reload time for next salvo
+ _timeout = time + _salvo_break;
+ _arti setVariable ["timeout", _timeout, false];
+ };
+
+//Funcin que devuelve un array con los vehiculos terrestres ms cercanos
+//Parmeters: [_npc,_distance]
+// <- _npc: object for position search
+// <- _distance: max distance from npc
+// -> _vehicles: array of vehicles
+MON_deadbodies = {
+ private["_vehicles","_npc","_bodies","_OCercanos","_distance","_side"];
+
+ _npc = _this select 0;
+ _distance = _this select 1;
+ //_side = _this select 2;
+
+ _OCercanos = [];
+ _bodies = [];
+
+ //Buscamos objetos cercanos
+ _OCercanos = nearestObjects [_npc, ["Man"] , _distance];
+
+ {
+ if (_npc knowsabout _x >0.5 && (!canmove _x || !alive _x)) then { _bodies = _bodies + [_x];};
+ }foreach _OCercanos;
+
+ _bodies;
+ };
+
+//Funcin que devuelve un array con los vehiculos terrestres ms cercanos
+//Parmeters: [_npc,_distance]
+// <- _npc: object for position search
+// <- _distance: max distance from npc
+// -> _vehicles: array of vehicles
+MON_nearestSoldiers = {
+ private["_vehicles","_npc","_soldiers","_OCercanos","_distance","_side"];
+
+ _npc = _this select 0;
+ _distance = _this select 1;
+
+ if (isnull _npc) exitwith {};
+
+ _OCercanos = [];
+ _soldiers = [];
+
+ //Buscamos objetos cercanos
+ _OCercanos = nearestObjects [_npc, ["Man"] , _distance];
+ _OCercanos = _OCercanos - [_npc];
+
+ {
+ if ( alive _x && canmove _x ) then { _soldiers = _soldiers + [_x];};
+ }foreach _OCercanos;
+
+ _soldiers;
+}; \ No newline at end of file
diff --git a/Server/PVFunctions/RequestChangeScore.sqf b/Server/PVFunctions/RequestChangeScore.sqf
new file mode 100644
index 0000000..2d7bec8
--- /dev/null
+++ b/Server/PVFunctions/RequestChangeScore.sqf
@@ -0,0 +1,12 @@
+Private["_oldScore","_newScore","_playerChanged"];
+
+_playerChanged = _this select 0;
+_newScore = _this select 1;
+
+_oldScore = score _playerChanged;
+_playerChanged addScore -_oldScore;
+_playerChanged addScore _newScore;
+
+WFBE_ChangeScore = [nil,'CLTFNCCHANGESCORE',[_playerChanged,_newScore]];
+publicVariable 'WFBE_ChangeScore';
+if (isHostedServer) then {[nil,'CLTFNCCHANGESCORE',[_playerChanged,_newScore]] Spawn HandlePVF};
diff --git a/Server/PVFunctions/RequestCommanderVote.sqf b/Server/PVFunctions/RequestCommanderVote.sqf
new file mode 100644
index 0000000..cff13d4
--- /dev/null
+++ b/Server/PVFunctions/RequestCommanderVote.sqf
@@ -0,0 +1,20 @@
+Private["_commanderTeam","_side","_team"];
+
+_side = _this;
+
+if ((WF_Logic getVariable Format["%1CommanderVoteTime",str _side]) <= 0) then {
+ _team = -1;
+ _commanderTeam = (_side) Call GetCommanderTeam;
+
+ if (!IsNull _commanderTeam) then {
+ _team = (Format["WFBE_%1TEAMS",str _side] Call GetNamespace) find _commanderTeam;
+ };
+
+ [_side,_team] Call SetCommanderVotes;
+ [_side] Spawn SVoteForCommander;
+ ["VotingForNewCommander","",_side,""] Spawn SideMessage;
+
+ WFBE_VoteForCommander = [_side,'CLTFNCVOTEFORCOMMANDER'];
+ publicVariable 'WFBE_VoteForCommander';
+ if (isHostedServer) then {[_side,'CLTFNCVOTEFORCOMMANDER'] Spawn HandlePVF};
+};
diff --git a/Server/PVFunctions/RequestDefense.sqf b/Server/PVFunctions/RequestDefense.sqf
new file mode 100644
index 0000000..70d6a5d
--- /dev/null
+++ b/Server/PVFunctions/RequestDefense.sqf
@@ -0,0 +1,11 @@
+private ["_defenseType","_dir","_index","_manned","_pos","_side"];
+_side = _this select 0;
+_defenseType = _this select 1;
+_pos = _this select 2;
+_dir = _this select 3;
+_manned = _this select 4;
+
+_index = (Format["WFBE_%1DEFENSENAMES",str _side] Call GetNamespace) find _defenseType;
+if (_index != -1) then {
+ [_defenseType,_side,_pos,_dir,_manned,false] Call ConstructDefense;
+}; \ No newline at end of file
diff --git a/Server/PVFunctions/RequestJoin.sqf b/Server/PVFunctions/RequestJoin.sqf
new file mode 100644
index 0000000..010dff6
--- /dev/null
+++ b/Server/PVFunctions/RequestJoin.sqf
@@ -0,0 +1,28 @@
+Private["_canJoin","_get","_name","_side","_sideOrigin","_uid","_varname"];
+
+_uid = _this select 0;
+_side = _this select 1;
+_name = _this select 2;
+_varname = _this select 3;
+
+_canJoin = true;
+
+_get = Format["WFBE_JIP_USER%1",_uid] Call GetNamespace;
+
+if !(isNil '_get') then {
+ _sideOrigin = _get select 3;
+
+ if (_sideOrigin != _side) then {
+ if !(paramShowUID) then {_uid = "xxxxxxx"};
+
+ WFBE_LocalizeMessage = [nil,'CLTFNCLOCALIZEMESSAGE',['Teamswap',_name,_uid,_sideOrigin,_side]];
+ publicVariable 'WFBE_LocalizeMessage';
+
+ _canJoin = false;
+
+ diag_log Format["[WFBE (INFORMATION)][frameno:%4 | ticktime:%5] RequestJoin: Player %1 <%2> (%3) has been sent back to the lobby for teamswapping.",_name,_varname,_get select 0,diag_frameno,diag_tickTime];
+ };
+};
+
+WFBE_CanJoin = [_varname,'CLTFNCCANJOIN',[_varname,_canJoin]];
+publicVariable 'WFBE_CanJoin'; \ No newline at end of file
diff --git a/Server/PVFunctions/RequestMHQRepair.sqf b/Server/PVFunctions/RequestMHQRepair.sqf
new file mode 100644
index 0000000..087a7a1
--- /dev/null
+++ b/Server/PVFunctions/RequestMHQRepair.sqf
@@ -0,0 +1 @@
+[_this] Spawn MHQRepair; \ No newline at end of file
diff --git a/Server/PVFunctions/RequestSpecial.sqf b/Server/PVFunctions/RequestSpecial.sqf
new file mode 100644
index 0000000..3455c98
--- /dev/null
+++ b/Server/PVFunctions/RequestSpecial.sqf
@@ -0,0 +1 @@
+_this Spawn HandleSpecial; \ No newline at end of file
diff --git a/Server/PVFunctions/RequestStructure.sqf b/Server/PVFunctions/RequestStructure.sqf
new file mode 100644
index 0000000..ad6b610
--- /dev/null
+++ b/Server/PVFunctions/RequestStructure.sqf
@@ -0,0 +1,12 @@
+Private ['_dir','_index','_pos','_script','_side','_structure','_structureType'];
+
+_side = _this select 0;
+_structureType = _this select 1;
+_pos = _this select 2;
+_dir = _this select 3;
+
+_index = (Format ["WFBE_%1STRUCTURENAMES",str _side] Call GetNamespace) find _structureType;
+if (_index != -1) then {
+ _script = (Format ["WFBE_%1STRUCTURESCRIPTS",str _side] Call GetNamespace) select _index;
+ [_structureType,_side,_pos,_dir,_index] ExecVM (Format["Server\Construction\Construction_%1.sqf",_script]);
+}; \ No newline at end of file
diff --git a/Server/PVFunctions/RequestTeamUpdate.sqf b/Server/PVFunctions/RequestTeamUpdate.sqf
new file mode 100644
index 0000000..892c182
--- /dev/null
+++ b/Server/PVFunctions/RequestTeamUpdate.sqf
@@ -0,0 +1,26 @@
+private ["_args","_team"];
+
+_args = _this;
+_team = _args select 0;
+
+//--- One team.
+if (typeName _team == "ARRAY") then {
+ {
+ _x setBehaviour (_args select 1);
+ _x setCombatMode (_args select 2);
+ _x setFormation (_args select 3);
+ _x setSpeedMode (_args select 4);
+ diag_log Format["[WFBE (INFORMATION)][frameno:%6 | ticktime:%7] RequestTeamUpdate: The %1 Team properties has been updated (Behavior: %2 | Combat Mode: %3 | Formation: %4 | Speed Mode: %5)",_x,(_args select 1),(_args select 2),(_args select 3),(_args select 4),diag_frameno,diag_tickTime];
+ } forEach _team;
+};
+
+//--- The whole team.
+if (typeName _team == "SIDE") then {
+ {
+ _x setBehaviour (_args select 1);
+ _x setCombatMode (_args select 2);
+ _x setFormation (_args select 3);
+ _x setSpeedMode (_args select 4);
+ } forEach (Format["WFBE_%1TEAMS",str _team] Call GetNamespace);
+ diag_log Format["[WFBE (INFORMATION)][frameno:%6 | ticktime:%7] RequestTeamUpdate: The %1 Teams properties have been updated (Behavior: %2 | Combat Mode: %3 | Formation: %4 | Speed Mode: %5)",_team,(_args select 1),(_args select 2),(_args select 3),(_args select 4),diag_frameno,diag_tickTime];
+}; \ No newline at end of file
diff --git a/Server/PVFunctions/RequestUpgrade.sqf b/Server/PVFunctions/RequestUpgrade.sqf
new file mode 100644
index 0000000..f811ca5
--- /dev/null
+++ b/Server/PVFunctions/RequestUpgrade.sqf
@@ -0,0 +1 @@
+_this Spawn AIUpgrade; \ No newline at end of file
diff --git a/Server/PVFunctions/RequestVehicleLock.sqf b/Server/PVFunctions/RequestVehicleLock.sqf
new file mode 100644
index 0000000..299ca0e
--- /dev/null
+++ b/Server/PVFunctions/RequestVehicleLock.sqf
@@ -0,0 +1,10 @@
+private ["_locked","_vehicle"];
+
+_vehicle = _this select 0;
+_locked = _this select 1;
+
+_vehicle lock _locked;
+
+WFBE_SetVehicleLock = [nil,'CLTFNCSETVEHICLELOCK',[_vehicle,_locked]];
+publicVariable 'WFBE_SetVehicleLock';
+if (isHostedServer) then {[nil,'CLTFNCSETVEHICLELOCK',[_vehicle,_locked]] Spawn HandlePVF};
diff --git a/Server/PVFunctions/RequestWorker.sqf b/Server/PVFunctions/RequestWorker.sqf
new file mode 100644
index 0000000..3c891dc
--- /dev/null
+++ b/Server/PVFunctions/RequestWorker.sqf
@@ -0,0 +1,19 @@
+Private["_group","_index","_model","_models","_position","_side","_unit"];
+
+_side = _this select 0;
+_position = _this select 1;
+_index = _this select 2;
+
+_models = Format ["WFBE_WORKERS_MODELS_%1",str _side] Call GetNamespace;
+_model = _models select (round(random((count _models)-1)));
+_group = createGroup _side;
+_position = [getPos _position, 30] Call GetSafePlace;
+_unit = [_model,_group,_position,_side] Call CreateMan;
+
+_group setSpeedMode "LIMITED";
+
+_workers = Call Compile Format ["WF_%1Workers",str _side];
+_workers set [_index, _unit];
+Call Compile Format ["WF_%1Workers = _workers; publicVariable 'WF_%1Workers';",str _side];
+
+[_unit,_side,_index] ExecFSM "Server\FSM\workers.fsm"; \ No newline at end of file
diff --git a/Server/Server_PlayerConnected.sqf b/Server/Server_PlayerConnected.sqf
new file mode 100644
index 0000000..b8856a4
--- /dev/null
+++ b/Server/Server_PlayerConnected.sqf
@@ -0,0 +1,109 @@
+/*
+ Author: Benny
+ Name: Server_PlayerConnected.sqf
+ Parameters:
+ 0 - User ID
+ 1 - User Name
+ Description:
+ This file is called upon a player connection, the player's information are stored or retrieved before being updated.
+*/
+Private ['_attempts','_funds','_get','_name','_sideJoined','_sideOrigin','_slotIndex','_team','_uid','_units'];
+_uid = _this select 0;
+_name = _this select 1;
+
+diag_log Format["[WFBE (INFORMATION)][frameno:%3 | ticktime:%4] Server_PlayerConnected: Player %1 (%2) has joined the game",_name,_uid,diag_frameno,diag_tickTime];
+
+sleep (0.1+random(0.1));
+
+//--- Don't bother with the server.
+if (_name == '__SERVER__' || _uid == '') exitWith {};
+
+//--- Attempt to get the player's team.
+_attempts = 0;
+_team = objNull;
+while {_attempts < 12 && isNull _team} do {
+ sleep 1;
+ {if ((getPlayerUID (leader _x)) == _uid) then {_team = _x}} forEach ('WFBE_EASTTEAMS' Call GetNamespace);
+ {if ((getPlayerUID (leader _x)) == _uid) then {_team = _x}} forEach ('WFBE_WESTTEAMS' Call GetNamespace);
+ _attempts = _attempts + 1;
+};
+
+//--- Not found, exit.
+if (isNull _team) exitWith {diag_log Format ["[WFBE (INFORMATION)][frameno:%3 | ticktime:%4] Server_PlayerConnected: Player %1 (%2) is not defined within the west and east teams.",_name,_uid,diag_frameno,diag_tickTime]};
+
+_sideJoined = civilian;
+
+//--- Nasty hack, a leader side can be enemy so we do a class check.
+if ((leader _team) isKindOf westSoldierBaseClass) then {_sideJoined = west};
+if ((leader _team) isKindOf eastSoldierBaseClass) then {_sideJoined = east};
+
+//--- Type not found.
+if (_sideJoined == civilian) exitWith {diag_log Format ["[WFBE (INFORMATION)][frameno:%3 | ticktime:%4] Server_PlayerConnected: Player %1 (%2) side couldn't be found.",_name,_uid,diag_frameno,diag_tickTime]};
+
+//--- Retrieve the player's team.
+_slotIndex = (Format["WFBE_%1TEAMS",str _sideJoined] Call GetNamespace) find _team;
+if (_slotIndex == -1) exitWith {diag_log Format ["[WFBE (INFORMATION)][frameno:%3 | ticktime:%4] Server_PlayerConnected: Player %1 (%2) team's wasn't found.",_name,_uid,diag_frameno,diag_tickTime]};
+
+//--- MySQL Update.
+if (mysql) then {
+ WF_Logic setVariable ["WF_MYSQL_SERVER",(WF_Logic getVariable "WF_MYSQL_SERVER") + [Format ["MYSQLDATA?WFBE_Insert_Players?%1?%2",_uid,_name]]];
+};
+
+//--- Grab the player info (if they exist).
+_get = Format["WFBE_JIP_USER%1",_uid] Call GetNamespace;
+
+//--- Force the unit out if it's in a vehicle.
+if !(isNull(assignedVehicle (leader _team))) then {
+ unassignVehicle (leader _team);
+ [leader _team] orderGetIn false;
+ [leader _team] allowGetIn false;
+};
+
+//--- Do we keep the AI over JIP?.
+if !(paramKeepAI) then {
+ diag_log Format ["[WFBE (INFORMATION)][frameno:%7 | ticktime:%8] Server_PlayerConnected: Removing units (Team: %1, Team Side: %2, Team Leader: %3) for Player %4 (%5) DEBUG:%6.",_team,side _team,name (leader _team),_name,_uid,_get,diag_frameno,diag_tickTime];
+ _units = units _team;
+ _units = _units - [(leader _team)];
+ _units = _units + ([_team,false] Call GetTeamVehicles);
+ {deleteVehicle _x} forEach _units;
+};
+
+//--- 'Sanitize' the player.
+_team Call AIWPRemove;
+(leader _team) setDammage 0;
+
+//--- ISIS.
+if (('WFBE_ISIS' Call GetNamespace) != 0) then {(leader _team) removeAllEventHandlers "handleDamage"};
+
+//--- Player didn't d/c.
+if (isNil '_get') exitWith {
+ /*
+ UID | Slot Index | Cash | Side | Current Side | (mysql) time | Vehicle Var Name
+ This new method allows the server to execute the code faster, it will also prevent any possible 'wrong indexing' with the array (JIP Scripts are ExecVM'ed
+ by the engine), note that this method also sanitize the values, preventing them from being modified by anything else than the server.
+ */
+ [Format["WFBE_JIP_USER%1",_uid],[_uid,_slotIndex,0,_sideJoined,_sideJoined,if (mysql) then {round(time)} else {0},vehicleVarName (leader _team)],true] Call SetNamespace;
+
+ Call Compile Format ["%1Funds = %2; publicVariable '%1Funds';",_team getVariable 'identification',Format ["WFBE_%1STARTINGMONEY",str _sideJoined] Call GetNamespace];
+};
+
+//--- Player d/c before, update info.
+_get set [1,_slotIndex];
+_get set [4,_sideJoined];
+if (mysql) then {_get set [5,round(time)]};
+_get set [6,vehicleVarName (leader _team)];
+
+//--- Player d/c before, grab the info.
+_funds = _get select 2;
+_sideOrigin = _get select 3;
+
+//--- Update.
+[Format["WFBE_JIP_USER%1",_uid],_get,true] Call SetNamespace;
+
+//--- Did the player teamswap?.
+if (_sideOrigin != _sideJoined) then {
+ _funds = Format ["WFBE_%1STARTINGMONEY",str _sideJoined] Call GetNamespace;
+};
+
+//--- Set the cash.
+Call Compile Format ["%1Funds = _funds; publicVariable '%1Funds';",_team getVariable 'identification']; \ No newline at end of file
diff --git a/Server/Server_PlayerDisconnected.sqf b/Server/Server_PlayerDisconnected.sqf
new file mode 100644
index 0000000..8242514
--- /dev/null
+++ b/Server/Server_PlayerDisconnected.sqf
@@ -0,0 +1,87 @@
+/*
+ Author: Benny
+ Name: Server_PlayerDisconnected.sqf
+ Parameters:
+ 0 - User ID
+ 1 - User Name
+ Description:
+ This file is called upon a player disconnection, the player's information are updated.
+*/
+Private ['_buildings','_closestRespawn','_cmdrTeam','_funds','_get','_hq','_name','_respawnLoc','_side','_sideText','_slotIndex','_team','_units','_uid'];
+_uid = _this select 0;
+_name = _this select 1;
+
+diag_log Format["[WFBE (INFORMATION)][frameno:%3 | ticktime:%4] Server_PlayerDisconnected: Player %1 (%2) has left the game",_name,_uid,diag_frameno,diag_tickTime];
+
+//--- Grab the player info (if they exist).
+_get = Format["WFBE_JIP_USER%1",_uid] Call GetNamespace;
+if (isNil '_get') exitWith {diag_log Format ["[WFBE (INFORMATION)][frameno:%3 | ticktime:%4] Server_PlayerDisconnected: Player %1 (%2) don't have any information stored.",_name,_uid,diag_frameno,diag_tickTime]};
+
+//--- Check this mess.
+_side = _get select 4;
+_sideText = str _side;
+_slotIndex = _get select 1;
+_team = Call Compile Format ["group %1",_get select 6];
+if (isNull _team) exitWith {diag_log Format ["[WFBE (INFORMATION)][frameno:%3 | ticktime:%4] Server_PlayerDisconnected: Player %1 (%2) team is null.",_name,_uid,diag_frameno,diag_tickTime]};
+
+//--- MySQL Update.
+if (mysql && !gameOver) then {
+ Private ['_strTrans'];
+ _strTrans = if (_side == west) then {'west'} else {'east'};
+ WF_Logic setVariable ["WF_MYSQL_SERVER",(WF_Logic getVariable "WF_MYSQL_SERVER") + [Format ["MYSQLDATA?WFBE_Disconnect_Player?%1?%2?%3?%4?%5",_uid,_name,round(time - (_get select 5)),_strTrans,worldName]]];
+};
+
+//--- Force the unit out if it has a vehicle.
+if !(isNull(assignedVehicle (leader _team))) then {
+ unassignVehicle (leader _team);
+ [leader _team] orderGetIn false;
+ [leader _team] allowGetIn false;
+};
+
+//--- Is unit driving the HQ?
+_hq = (_sideText) Call GetSideHQ;
+if (vehicle(leader _team) == _hq) then {(leader _team) action ["EJECT", _hq]};
+
+//--- Keep AI over JIP?
+if !(paramKeepAI) then {
+ diag_log Format ["[WFBE (INFORMATION)][frameno:%7 | ticktime:%8] Server_PlayerDisconnected: Removing units (Team: %1, Team Side: %2, Team Leader: %3) for Player %4 (%5) DEBUG:%6.",_team,side _team,leader _team,_name,_uid,_get,diag_frameno,diag_tickTime];
+ _units = units _team;
+ _units = _units - [leader _team];
+ _units = _units + ([_team,false] Call GetTeamVehicles) - [_hq];
+ {deleteVehicle _x} forEach _units;
+};
+
+//--- Save the Client Cash.
+_funds = _team Call GetTeamFunds;
+_get set [2,_funds];
+
+//--- SetPos the AI.
+_buildings = (_sideText) Call GetSideStructures;
+_respawnLoc = _hq;
+if (count _buildings > 0) then {
+ _closestRespawn = [leader _team,_buildings] Call SortByDistance;
+ _respawnLoc = _closestRespawn select 0;
+};
+(leader _team) setPos ([getPos _respawnLoc,20,30] Call GetRandomPosition);
+
+//--- ISIS.
+if (('WFBE_ISIS' Call GetNamespace) != 0) then {(leader _team) addEventHandler['handleDamage',{_this Call ISIS_Wound}]};
+
+//--- Update.
+[Format["WFBE_JIP_USER%1",_uid],_get,true] Call SetNamespace;
+
+//--- Player was commander?.
+_cmdrTeam = (_side) Call GetCommanderTeam;
+if !(isNull (_cmdrTeam)) then {
+ if (_team == _cmdrTeam) then {
+ WF_Logic setVariable [Format ["%1CommanderTeam",_sideText],objNull,true];
+ WFBE_LocalizeMessage = [_side,'CLTFNCLOCALIZEMESSAGE',['CommanderDisconnected']];
+ publicVariable 'WFBE_LocalizeMessage';
+
+ //--- High Command (Remove).
+ if (paramHighCommand && count (hcAllGroups (leader _team)) > 0) then {HCRemoveAllGroups (leader _team)};
+
+ //--- AI Can move freely now & respawn at the default location.
+ {[_x,false] Call SetTeamAutonomous;[_x, ""] Call SetTeamRespawn;} forEach (Format["WFBE_%1TEAMS",_sideText] Call GetNamespace);
+ };
+}; \ No newline at end of file
diff --git a/Server/Server_VoteForCommander.sqf b/Server/Server_VoteForCommander.sqf
new file mode 100644
index 0000000..6a4d2a4
--- /dev/null
+++ b/Server/Server_VoteForCommander.sqf
@@ -0,0 +1,38 @@
+Private ['_aibase','_commanderTeam','_comVoteTime','_delay','_side','_sideText'];
+_side = _this select 0;
+_sideText = _side;
+
+_comVoteTime = 'WFBE_VOTETIME' Call GetNamespace;
+WF_Logic setVariable [Format["%1CommanderVoteTime",_sideText],_comVoteTime,true];
+
+while {_comVoteTime > 0} do {
+ sleep 1;
+ _comVoteTime = _comVoteTime - 1;
+ WF_Logic setVariable [Format["%1CommanderVoteTime",_sideText],_comVoteTime,true];
+};
+
+WF_Logic setVariable [Format["%1CommanderVoteTime",_sideText],_comVoteTime,true];
+
+_commanderTeam = [_side] Call GetCommanderFromVotes;
+if (!IsNull _commanderTeam) then {WF_Logic setVariable [Format ["%1CommanderTeam",_sideText],_commanderTeam,true]} else {WF_Logic setVariable [Format ["%1CommanderTeam",_sideText],objNull,true]};
+
+_delay = 0;
+if (_side == East) then {_delay = 1};
+
+sleep _delay;
+
+WFBE_CommanderVote = [_side,'CLTFNCCOMMANDERVOTE',_commanderTeam];
+publicVariable 'WFBE_CommanderVote';
+if (isHostedServer) then {[_side,'CLTFNCCOMMANDERVOTE',_commanderTeam] Spawn HandlePVF};
+
+[Format["WFBE_%1_LastCommander",_sideText],_commanderTeam,true] Call SetNamespace;
+
+_aibase = Format["WFBE_%1_AIBase",_sideText] Call GetNamespace;
+// if (isNull _commanderTeam && paramAIcom && !_aibase) then {[_side] ExecFSM "Server\FSM\aibase.fsm"};
+if (isNull _commanderTeam && paramAIcom && !_aibase) then {[_side] ExecFSM "Server\FSM\aicommander.fsm"};
+
+if (isNull _commanderTeam) then {
+ diag_log Format["[WFBE (INFORMATION)][frameno:%2 | ticktime:%3] Server_VoteForCommander: %1 Commander = AI Commander.",_sideText,diag_frameno,diag_tickTime];
+} else {
+ diag_log Format["[WFBE (INFORMATION)][frameno:%3 | ticktime:%4] Server_VoteForCommander: %1 Commander = %2.",_sideText,name (leader _commanderTeam),diag_frameno,diag_tickTime];
+}; \ No newline at end of file
diff --git a/Server/Support/Support_ParaAmmo.sqf b/Server/Support/Support_ParaAmmo.sqf
new file mode 100644
index 0000000..2176b72
--- /dev/null
+++ b/Server/Support/Support_ParaAmmo.sqf
@@ -0,0 +1,107 @@
+Private['_args','_bd','_cargo','_grp','_pilot','_playerTeam','_positionCoord','_ran','_ranDir','_ranPos','_side','_timeStart','_vehicle','_vehicleCoord'];
+
+_args = _this;
+_side = _args select 1;
+
+_playerTeam = (_args select 3);
+diag_log Format["[WFBE (INFORMATION)][frameno:%4 | ticktime:%5] Server_HandleSpecial: The %1 %2 Team (Leader: %3) has called an Ammunition Paradroping",str _side,_playerTeam,name (leader _playerTeam),diag_frameno,diag_tickTime];
+_ranPos = [];
+_ranDir = [];
+
+_bd = 'WFBE_BOUNDARIESXY' Call GetNamespace;
+if !(isNil '_bd') then {
+ _ranPos = [
+ [0+random(200),0+random(200),400+random(200)],
+ [0+random(200),_bd-random(200),400+random(200)],
+ [_bd-random(200),_bd-random(200),400+random(200)],
+ [_bd-random(200),0+random(200),400+random(200)]
+ ];
+ _ranDir = [45,145,225,315];
+} else {
+ _ranPos = [[0+random(200),0+random(200),400+random(200)],[15000+random(200),0+random(200),400+random(200)]];
+ _ranDir = [45,315];
+};
+
+_timeStart = time;
+_ran = round(random((count _ranPos)-1));
+_grp = createGroup _side;
+_vehicle = createVehicle [Format ["WFBE_%1PARAVEHI",str _side] Call GetNamespace,(_ranPos select _ran), [], (_ranDir select _ran), "FLY"];
+_pilot = [Format ["WFBE_%1PILOT",str _side] Call GetNamespace,_grp,[100,12000,0],_side] Call CreateMan;
+[str _side,'VehiclesCreated',1] Call UpdateStatistics;
+[str _side,'UnitsCreated',1] Call UpdateStatistics;
+_pilot moveInDriver _vehicle;
+_grp setBehaviour 'CARELESS';
+_grp setCombatMode 'STEALTH';
+_pilot disableAI 'AUTOTARGET';
+_pilot disableAI 'TARGET';
+[_grp,(_args select 2),"MOVE",10] Call AIMoveTo;
+Call Compile Format ["_vehicle addEventHandler ['Killed',{[_this select 0,_this select 1,%1] Spawn UnitKilled}]",_side];
+_vehicle setVehicleInit Format["[this,%1] ExecVM 'Common\Common_InitUnit.sqf';",_side];
+processInitCommands;
+_vehicle flyInHeight (200 + random(20));
+_cargo = (crew _vehicle) - [driver _vehicle, gunner _vehicle, commander _vehicle];
+
+while {true} do {
+ sleep 1;
+ if (!alive _pilot || !alive _vehicle || isNull _vehicle || isNull _pilot) exitWith {};
+ if (!(isPlayer (leader _playerTeam)) || time - _timeStart > 500) exitWith {{_x setDammage 1} forEach (_cargo+[_pilot,_vehicle]);deleteGroup _grp};
+ _vehicleCoord = [getPos _pilot select 0,getpos _pilot select 1];
+ _positionCoord = [(_args select 2) select 0,(_args select 2) select 1];
+ if (_vehicleCoord distance _positionCoord < 100) exitWith {};
+};
+
+[_vehicle,_side] Spawn {
+ Private ['_ammo','_ammos','_chopper','_chute','_side'];
+ _chopper = _this select 0;
+ _side = _this select 1;
+
+ _ammos = Format["WFBE_%1PARAAMMO",_side] Call GetNamespace;
+ if (typeName _ammos != 'ARRAY') exitWith {diag_log Format["[WFBE (INFORMATION)] Server_HandleSpecial: Expected array, given %1 for ammunitions.",typeName _ammos]};
+
+ {
+ _ammo = _x createVehicle [0,0,0];
+
+ [_chopper,_ammo,_side] Spawn {
+ Private ['_ammo','_chopper','_chute','_pos','_side','_type'];
+ _chopper = _this select 0;
+ _ammo = _this select 1;
+ _side = _this select 2;
+
+ _chute = (Format['WFBE_%1PARACHUTE',str _side] Call GetNamespace) createVehicle [0,0,20];
+ _chute setPos [getPos _chopper select 0, getPos _chopper select 1, (getPos _chopper select 2) - 11];
+ _chute setDir (getDir _chopper);
+
+ _ammo setPos getPos _chute;
+ _ammo attachTo [_chute,[0,0,0]];
+ waitUntil {getPos _ammo select 2 < 3};
+ detach _ammo;
+
+ _type = typeOf _ammo;
+ _pos = getPos _ammo;
+ deleteVehicle _ammo;
+ _ammo = _type createVehicle _pos;
+
+ Call Compile Format ["_ammo addEventHandler ['Killed',{[_this select 0,_this select 1,%1] Spawn UnitKilled}]",_side];
+
+ sleep 5;
+
+ deleteVehicle _chute;
+ };
+
+ sleep 0.8;
+ } forEach _ammos;
+};
+
+[_grp,(_ranPos select _ran),"MOVE",10] Call AIMoveTo;
+
+while {true} do {
+ sleep 1;
+ if (!alive _pilot || !alive _vehicle || isNull _vehicle || isNull _pilot) exitWith {};
+ _vehicleCoord = [getPos _pilot select 0,getpos _pilot select 1];
+ _positionCoord = [(_ranPos select _ran) select 0,(_ranPos select _ran) select 1];
+ if (_vehicleCoord distance _positionCoord < 200) exitWith {};
+};
+
+deleteVehicle _pilot;
+deleteVehicle _vehicle;
+deleteGroup _grp; \ No newline at end of file
diff --git a/Server/Support/Support_ParaVehicles.sqf b/Server/Support/Support_ParaVehicles.sqf
new file mode 100644
index 0000000..837d97e
--- /dev/null
+++ b/Server/Support/Support_ParaVehicles.sqf
@@ -0,0 +1,89 @@
+Private['_args','_bd','_cargo','_cargoVehicle','_grp','_pilot','_playerTeam','_positionCoord','_ran','_ranDir','_ranPos','_side','_timeStart','_vehicle','_vehicleCoord'];
+
+_args = _this;
+_side = _args select 1;
+
+_playerTeam = (_args select 3);
+diag_log Format["[WFBE (INFORMATION)][frameno:%4 | ticktime:%5] Server_HandleSpecial: The %1 %2 Team (Leader: %3) has called a Vehicle Paradroping",str _side,_playerTeam,name (leader _playerTeam),diag_frameno,diag_tickTime];
+_ranPos = [];
+_ranDir = [];
+
+_bd = 'WFBE_BOUNDARIESXY' Call GetNamespace;
+if !(isNil '_bd') then {
+ _ranPos = [
+ [0+random(200),0+random(200),400+random(200)],
+ [0+random(200),_bd-random(200),400+random(200)],
+ [_bd-random(200),_bd-random(200),400+random(200)],
+ [_bd-random(200),0+random(200),400+random(200)]
+ ];
+ _ranDir = [45,145,225,315];
+} else {
+ _ranPos = [[0+random(200),0+random(200),400+random(200)],[15000+random(200),0+random(200),400+random(200)]];
+ _ranDir = [45,315];
+};
+
+_timeStart = time;
+_ran = round(random((count _ranPos)-1));
+_grp = createGroup _side;
+_vehicle = createVehicle [Format ["WFBE_%1PARAVEHI",str _side] Call GetNamespace,(_ranPos select _ran), [], (_ranDir select _ran), "FLY"];
+[str _side,'VehiclesCreated',1] Call UpdateStatistics;
+[str _side,'UnitsCreated',1] Call UpdateStatistics;
+_pilot = [Format ["WFBE_%1PILOT",str _side] Call GetNamespace,_grp,[100,12000,0],_side] Call CreateMan;
+_pilot moveInDriver _vehicle;
+_pilot doMove (_args select 2);
+_grp setBehaviour 'CARELESS';
+_grp setCombatMode 'STEALTH';
+_pilot disableAI 'AUTOTARGET';
+_pilot disableAI 'TARGET';
+[_grp,(_args select 2),"MOVE",10] Call AIMoveTo;
+Call Compile Format ["_vehicle addEventHandler ['Killed',{[_this select 0,_this select 1,%1] Spawn UnitKilled}]",_side];
+_vehicle setVehicleInit Format["[this,%1] ExecVM 'Common\Common_InitUnit.sqf';",_side];
+processInitCommands;
+_vehicle flyInHeight (300 + random(75));
+_cargo = (crew _vehicle) - [driver _vehicle, gunner _vehicle, commander _vehicle];
+_cargoVehicle = [Format ["WFBE_%1PARAVEHICARGO",str _side] Call GetNamespace,[0,0,50],_side,false] Call CreateVehi;
+_cargoVehicle attachTo [_vehicle,[0,0,-3]];
+
+emptyQueu = emptyQueu + [_cargoVehicle];
+_cargoVehicle Spawn HandleEmptyVehicle;
+
+while {true} do {
+ sleep 1;
+ if (!alive _pilot || !alive _vehicle || isNull _vehicle || isNull _pilot || !alive _cargoVehicle) exitWith {};
+ if (!(isPlayer (leader _playerTeam)) || time - _timeStart > 500) exitWith {{_x setDammage 1} forEach (_cargo+[_pilot,_vehicle,_cargoVehicle]);deleteGroup _grp};
+ _vehicleCoord = [getPos _pilot select 0,getpos _pilot select 1];
+ _positionCoord = [(_args select 2) select 0,(_args select 2) select 1];
+ if (_vehicleCoord distance _positionCoord < 100) exitWith {};
+};
+
+detach _cargoVehicle;
+
+[_cargoVehicle,_side] Spawn {
+ Private ['_chute','_side','_vehicle'];
+ _vehicle = _this select 0;
+ _side = _this select 1;
+ sleep 2;
+ if (!alive _vehicle) exitWith {};
+ _chute = (Format['WFBE_%1PARACHUTE',str _side] Call GetNamespace) createVehicle [0,0,20];
+ _chute setPos [getPos _vehicle select 0, getPos _vehicle select 1, (getPos _vehicle select 2) - 11];
+ _chute setDir (getDir _vehicle);
+ _vehicle attachTo [_chute,[0,0,0]];
+ waitUntil {getPos _vehicle select 2 < 10 || !alive _vehicle};
+ detach _vehicle;
+ sleep 10;
+ deleteVehicle _chute;
+};
+
+[_grp,(_ranPos select _ran),"MOVE",10] Call AIMoveTo;
+
+while {true} do {
+ sleep 1;
+ if (!alive _pilot || !alive _vehicle || isNull _vehicle || isNull _pilot) exitWith {};
+ _vehicleCoord = [getPos _pilot select 0,getpos _pilot select 1];
+ _positionCoord = [(_ranPos select _ran) select 0,(_ranPos select _ran) select 1];
+ if (_vehicleCoord distance _positionCoord < 200) exitWith {};
+};
+
+deleteVehicle _pilot;
+deleteVehicle _vehicle;
+deleteGroup _grp; \ No newline at end of file
diff --git a/Server/Support/Support_Paratroopers.sqf b/Server/Support/Support_Paratroopers.sqf
new file mode 100644
index 0000000..684e233
--- /dev/null
+++ b/Server/Support/Support_Paratroopers.sqf
@@ -0,0 +1,79 @@
+Private['_args','_bd','_built','_cargo','_currentLevel','_currentUpgrades','_delay','_grp','_pilot','_playerTeam','_positionCoord','_ran','_ranDir','_ranPos','_side','_timeStart','_unit','_units','_vehicle','_vehicleCoord'];
+
+_args = _this;
+_side = _args select 1;
+
+_playerTeam = (_args select 3);
+diag_log Format["[WFBE (INFORMATION)][frameno:%4 | ticktime:%5] Server_HandleSpecial: The %1 %2 Team (Leader: %3) has called a Paratroops Reinforcement",str _side,_playerTeam,name (leader _playerTeam),diag_frameno,diag_tickTime];
+_ranPos = [];
+_ranDir = [];
+
+_bd = 'WFBE_BOUNDARIESXY' Call GetNamespace;
+if !(isNil '_bd') then {
+ _ranPos = [
+ [0+random(200),0+random(200),400+random(200)],
+ [0+random(200),_bd-random(200),400+random(200)],
+ [_bd-random(200),_bd-random(200),400+random(200)],
+ [_bd-random(200),0+random(200),400+random(200)]
+ ];
+ _ranDir = [45,145,225,315];
+} else {
+ _ranPos = [[0+random(200),0+random(200),400+random(200)],[15000+random(200),0+random(200),400+random(200)]];
+ _ranDir = [45,315];
+};
+
+_timeStart = time;
+_ran = round(random((count _ranPos)-1));
+_grp = createGroup _side;
+_vehicle = createVehicle [Format ["WFBE_%1PARACARGO",str _side] Call GetNamespace,(_ranPos select _ran), [], (_ranDir select _ran), "FLY"];
+[str _side,'VehiclesCreated',1] Call UpdateStatistics;
+_pilot = [Format ["WFBE_%1PILOT",str _side] Call GetNamespace,_grp,[100,12000,0],_side] Call CreateMan;
+_pilot moveInDriver _vehicle;
+_pilot doMove (_args select 2);
+_grp setBehaviour 'CARELESS';
+_grp setCombatMode 'STEALTH';
+_pilot disableAI 'AUTOTARGET';
+_pilot disableAI 'TARGET';
+_built = 1;
+[_grp,(_args select 2),"MOVE",10] Call AIMoveTo;
+Call Compile Format ["_vehicle addEventHandler ['Killed',{[_this select 0,_this select 1,%1] Spawn UnitKilled}]",_side];
+_vehicle setVehicleInit Format["[this,%1] ExecVM 'Common\Common_InitUnit.sqf';",_side];
+processInitCommands;
+_vehicle flyInHeight (300 + random(75));
+_currentUpgrades = (str _side) Call GetSideUpgrades;
+_currentLevel = _currentUpgrades select 4;
+_units = Format ["WFBE_%1PARACHUTELEVEL%2",Str _side,_currentLevel] Call GetNamespace;
+{
+ _unit = [_x,_grp,[100,12000,0],_side] Call CreateMan;
+ _unit moveInCargo _vehicle;
+ _built = _built + 1;
+} forEach _units;
+
+[str _side,'UnitsCreated',_built] Call UpdateStatistics;
+_cargo = (crew _vehicle) - [driver _vehicle, gunner _vehicle, commander _vehicle];
+
+while {true} do {
+ sleep 1;
+ if (!alive _pilot || !alive _vehicle || isNull _vehicle || isNull _pilot) exitWith {};
+ if (!(isPlayer (leader _playerTeam)) || time - _timeStart > 500) exitWith {{_x setDammage 1} forEach (_cargo+[_pilot,_vehicle]);deleteGroup _grp};
+ _vehicleCoord = [getPos _pilot select 0,getpos _pilot select 1];
+ _positionCoord = [(_args select 2) select 0,(_args select 2) select 1];
+ if (_vehicleCoord distance _positionCoord < 200) exitWith {};
+};
+
+_delay = 1;
+if (_side == WEST) then {_delay = 0.3};
+{_x action ["EJECT",_vehicle];sleep _delay;[_x] join (leader _playerTeam)} forEach _cargo;
+[_grp,(_ranPos select _ran),"MOVE",10] Call AIMoveTo;
+
+while {true} do {
+ sleep 1;
+ if (!alive _pilot || !alive _vehicle || isNull _vehicle || isNull _pilot) exitWith {};
+ _vehicleCoord = [getPos _pilot select 0,getpos _pilot select 1];
+ _positionCoord = [(_ranPos select _ran) select 0,(_ranPos select _ran) select 1];
+ if (_vehicleCoord distance _positionCoord < 200) exitWith {};
+};
+
+deleteVehicle _pilot;
+deleteVehicle _vehicle;
+deleteGroup _grp; \ No newline at end of file
diff --git a/Server/Support/Support_UAV.sqf b/Server/Support/Support_UAV.sqf
new file mode 100644
index 0000000..aded9a0
--- /dev/null
+++ b/Server/Support/Support_UAV.sqf
@@ -0,0 +1,20 @@
+Private["_args","_driver","_gunner","_playerTeam","_side","_uav"];
+
+_args = _this;
+_side = _args select 1;
+
+_uav = (_args select 2);
+_driver = driver _uav;
+_gunner = gunner _uav;
+_playerTeam = (_args select 3);
+
+diag_log Format["[WFBE (INFORMATION)][frameno:%4 | ticktime:%5] Server_HandleSpecial: The %1 %2 Team (Leader: %3) has called an UAV",str _side,_playerTeam,name (leader _playerTeam),diag_frameno,diag_tickTime];
+
+while {true} do {
+ sleep 5;
+ if (!(isPlayer (leader _playerTeam)) || !alive _uav) exitWith {};
+};
+
+if (!isNull _driver) then {if (alive _driver) then {_driver setDammage 1};if (!(_driver in trashQueu)) then {trashQueu = trashQueu + [_driver];_driver Spawn TrashObject}};
+if (!isNull _gunner) then {if (alive _gunner) then {_gunner setDammage 1};if (!(_gunner in trashQueu)) then { trashQueu = trashQueu + [_gunner];_gunner Spawn TrashObject}};
+if (!isNull _uav) then {if (alive _uav) then {_uav setDammage 1};if (!(_uav in trashQueu)) then { trashQueu = trashQueu + [_uav];_uav Spawn TrashObject}}; \ No newline at end of file
diff --git a/briefing.html b/briefing.html
new file mode 100644
index 0000000..5b1b16d
--- /dev/null
+++ b/briefing.html
@@ -0,0 +1,2 @@
+<html>
+</html> \ No newline at end of file
diff --git a/briefing.sqf b/briefing.sqf
new file mode 100644
index 0000000..e991423
--- /dev/null
+++ b/briefing.sqf
@@ -0,0 +1,8 @@
+//--- Author [ICE]
+player createDiaryRecord["Diary", ["Upgrades", "<br/>To be able to purchase higher levels of equipment or units, the factories need to be upgraded by the commander. The commander will need both cash and supply points to do this. He may ask for contributions from other team players to help out. Each factory has 3 levels."]];
+player createDiaryRecord["Diary", ["Supplies", "<br/>Each captured town has an Actual and Potential Value. On the map you will see this represented as 2 numbers seperated by a / for example; Zelenogorsk, once captured will start as 30/120. This means that the current supplies to each player from this town is $30 per minute. Each time a supply truck arrives at the town depot its value will increase by 10. Remember though, the supply truck must be either fully loaded from the HQ or a Supply point or, have come from a town with a higher actual value. you will also receive 4 x the actual value as cash if you or one of your squad drives the truck. Supply runs should be the responsibility of all. The best way to win Warfare is to work together capping and then supping up the town before moving to another."]];
+player createDiaryRecord["Diary", ["Building", "<br/>The commander builds a base. Each side starts with one Mobile Headqarters (MHQ). This is a vehicle the commander can use to build th headquarters (HQ) anywhere on the map. After the HQ is built, other buildings can be constructed. Only the commander can build factories and defenses around the base using the HQ. The HQ can also be packed up back as MHQ again and moved to another location."]];
+player createDiaryRecord["Diary", ["Team", "<br/>All players and AI soldiers can buy subordinates, equipment and vehicles from the main base as well as some vehicles from the captured town forts. You can access all available facilities through the Purchase interface from inside the main base perimeter or anywhere on the map once a Command Center has been erected. Accessible supply factories are indicated by icons on right edge of the screen. If a Barracks has been built, select the Purchase Gear button to purchase weapons and ammunition. The equipment you purchase here will also be your starting kit when you respawn. In Purchase Units button, you will find a list of unit type icons along the top. Here you can buy empty or manned units from soldiers to aircraft."]];
+player createDiaryRecord["Diary", ["Commander", "<br/>The Commander can be controlled either by player or by AI. He has access to extra resources and abilities: developing the base, setting objectives for teams, and defining the strategy of your side."]];
+player createDiaryRecord["Diary", ["Voting", "<br/>After starting the warfare mission, you are confronted with the Vote Commander screen. Click on any name in the player list to cast your vote. If you join a game that has already started, you will not see the Vote Commander screen. A new vote for a new Commander can be started anytime using the Vote option in the Options interface. The commander assigns a mission and a role to a team leader, whether it be AI or human player. The role can include the type of equipment and vehicles the AI teams will use. Players have control of what they will use in their team. Mission is the task for the team to perform. You may disable the Commander Vote Pop-up in the Team Menu."]];
+player createDiaryRecord["Diary", ["Summary", "<br/>Warfare is a blend of a team-based multiplayer mission and realtime strategy, where BLUFOR and OPFOR fight for the island control. Key objectives are to capture towns, defend your base and destroy the base of enemy. Both sides are lead by a commander, who influences his side's strategy. There are two kinds of resources: Supply points are used by the commander for building factories. Money is used to purchase weapons, units and vehicles."]]; \ No newline at end of file
diff --git a/description.ext b/description.ext
new file mode 100644
index 0000000..8402e86
--- /dev/null
+++ b/description.ext
@@ -0,0 +1,107 @@
+/*
+ WARFARE Benny Edition
+ Note: This mission was made from scratch.
+ Status: Work in Progress.
+ Contact: benny_boy66@hotmail.fr
+
+ Description:
+ Warfare is a gamemode which focus on the PvPvAI (Player versus Player versus AI),
+ each team has a commander which have to build a base and perform upgrades.
+
+ The others players have to conquer towns in order to gain more supply, this supply is used
+ to build a base and perform upgrades, a town generate a variable income each x min (Supply
+ and Funds), the funds are used to purchase different assets (Infantry, Vehicles, Support...)
+
+ Each team has a MHQ, This last one is used to build the base, once that the MHQ is lost,
+ The commander won't be able to build a base until that the MHQ get fixed with a repair
+ truck.
+
+ The towns are defended by resistance, once that all resistance is neutralized, the town
+ will belong to the team who took it, depending on the Supply Value of the town, a defense
+ team will spawn in that town to prevent enemy from taking it.
+
+ The game will end as soon as all towns are captured by a side or once that all of a side's base
+ is destroyed.
+
+ Credits:
+ Benny - Mission Maker
+ MrNiceGuy - UI Design - Beer provider
+*/
+
+//--- Define which 'part' of the game to run.
+#include "version.sqf"
+
+//--- Header contains the mission tite.
+#include "Rsc\Header.hpp"
+
+//--- Styles
+#include "Rsc\Styles.hpp"
+
+//--- Parameters contains the mission parameters.
+#include "Rsc\Parameters.hpp"
+//--- Ressource contains the dialog ressources.
+#include "Rsc\Ressources.hpp"
+//--- Dialogs contain all the interfaces (dialogs).
+#include "Rsc\Dialogs.hpp"
+//--- Titles contains the titles (overlay).
+#include "Rsc\Titles.hpp"
+//--- Sounds contains all missions related sounds.
+#include "Rsc\Sounds.hpp"
+
+//--- Include Identities (OA/CO Only).
+#ifndef VANILLA
+ #include "Rsc\Identities.hpp"
+#endif
+
+#ifdef ACE
+// Special code to enable artillery computer for crew served mortars only...
+
+class Extended_GetIn_Eventhandlers
+{
+ class ACE_2b14_82mm
+ {
+ class ACE_2b14_82mm_GetIn
+ {
+ scope = 0;
+ getin = "if(!paramArtyComputer && isPlayer (_this select 2) && local (_this select 2)) then { enableEngineArtillery true }";
+ };
+ };
+
+ class ACE_M252
+ {
+ class ACE_M252_GetIn
+ {
+ scope = 0;
+ getin = "if(!paramArtyComputer && isPlayer (_this select 2) && local (_this select 2)) then { enableEngineArtillery true }";
+ };
+ };
+};
+
+class Extended_GetOut_Eventhandlers
+{
+ class ACE_2b14_82mm
+ {
+ class ACE_2b14_82mm_GetOut
+ {
+ scope = 0;
+ getout = "if(!paramArtyComputer && isPlayer (_this select 2) && local (_this select 2)) then { enableEngineArtillery false }";
+ };
+ };
+
+ class ACE_M252
+ {
+ class ACE_M252_GetOut
+ {
+ scope = 0;
+ getout = "if(!paramArtyComputer && isPlayer (_this select 2) && local (_this select 2)) then { enableEngineArtillery false }";
+ };
+ };
+};
+
+class Extended_PreInit_EventHandlers {
+ class WarfareBE_ACE {
+ serverInit = "if ((paramsArray select 62) == 1) then { ace_sys_wounds_enabled = true; publicVariable 'ace_sys_wounds_enabled' }";
+ };
+};
+
+#endif \ No newline at end of file
diff --git a/initJIPCompatible.sqf b/initJIPCompatible.sqf
new file mode 100644
index 0000000..6385e24
--- /dev/null
+++ b/initJIPCompatible.sqf
@@ -0,0 +1,301 @@
+//--- Global Init, first file called.
+diag_log Format["[WFBE (INIT)][frameno:%1 | ticktime:%2] Init_JIPCompatible.sqf: Executing the JIP script..",diag_frameno,diag_tickTime];
+
+//--- Client Init.
+if (!isServer || local player) then {
+ diag_log Format["[WFBE (INIT)][frameno:%1 | ticktime:%2] Init_JIPCompatible.sqf: Client detected... waiting for non null result...",diag_frameno,diag_tickTime];
+ waitUntil {!isNull(player)};
+ diag_log Format["[WFBE (INIT)][frameno:%1 | ticktime:%2] Init_JIPCompatible.sqf: Client is not null...",diag_frameno,diag_tickTime];
+ /* Client Init - Begin the blackout on Layer 1 */
+ 12452 cutText [(localize 'STR_WF_Loading')+"...","BLACK"];
+ isHostedServer = if (!isMultiplayer || (isServer && local player)) then {true} else {false};
+ isClient = true;
+} else {
+ if (isNil 'EastMHQ' || isNil 'WestMHQ') exitWith {};
+ isHostedServer = if (!isMultiplayer || (isServer && local player)) then {true} else {false};
+ diag_log Format["[WFBE (INIT)][frameno:%1 | ticktime:%2] Init_JIPCompatible.sqf: Server detected...",diag_frameno,diag_tickTime];
+ isClient = false;
+};
+
+//--- Server & Client default View Distance.
+setViewDistance 1000;
+
+clientInitComplete = false;
+commonInitComplete = false;
+serverInitComplete = false;
+gameOver = false;
+townInit = false;
+towns = [];
+
+//--- Define which 'part' of the game to run.
+#include "version.sqf"
+
+WF_A2_Vanilla = false;
+#ifdef VANILLA
+ WF_A2_Vanilla = true;
+#endif
+
+WF_A2_Arrowhead = false;
+#ifdef ARROWHEAD
+ WF_A2_Arrowhead = true;
+#endif
+
+WF_A2_CombinedOps = false;
+#ifdef COMBINEDOPS
+ WF_A2_CombinedOps = true;
+#endif
+
+WF_Debug = false;
+#ifdef WF_DEBUG
+ WF_Debug = true;
+#endif
+
+WF_Camo = false;
+#ifdef WF_CAMO
+ WF_Camo = true;
+#endif
+
+WF_ACE = false;
+#ifdef ACE
+ WF_ACE = true;
+#endif
+
+mysql=false;
+//--- Gameplay variables.
+paramMobileRespawn = true;
+paramBalancing = false;
+paramAI = true;
+paramAIcom = true;
+paramRestrictionKamov = false;
+paramShowUID = true;
+paramArty = true;
+paramArtyUI = false;
+paramTrackAI = true;
+paramTrackPlayer = true;
+paramRes = true;
+paramOccup = true;
+paramGearRespawn = true;
+paramGearRestriction = false;
+paramHangars = true;
+paramAARadar = false;
+paramCounterMeasures = false;
+paramVolumClouds = true;
+paramICBM = true;
+paramHighCommand = true;
+paramBaseArea = true;
+paramSpawnRestriction = true;
+paramUpgradesEast = true;
+paramUpgradesWest = true;
+paramKickTeamswappers = true;
+paramRespawnMASH = true;
+paramResReinf = false;
+paramOccReinf = false;
+paramPurchaseInfDepot = true;
+paramHandleFF = false;
+paramBoundaries = true;
+paramBasePatrols = false;
+paramAlice = false;
+paramEASA = true;
+paramDLCBAF = true;
+paramDLCPMC = true;
+paramBounty = true;
+paramResVehLock = false;
+paramExtendedInventory = false;
+paramSecondaryMissions = true;
+paramUPSMON = true;
+paramDefenseCollide = true;
+paramKeepCamps = true;
+paramUseWorkers = false;
+paramMandoMissiles = false;
+paramMoneyOnly = false;
+
+//--- Multiplayers Parameter, the order it the same as Parameters.hpp
+if !(isNil "paramsArray") then {
+ Private['_u'];
+ _u = 0;
+ missionNamespace setVariable ['WFBE_MAXGROUPSIZEAI',(paramsArray select _u)];_u = _u + 1;
+ missionNamespace setVariable ['WFBE_MAXGROUPSIZE',(paramsArray select _u)];_u = _u + 1;
+ if ((paramsArray select _u) == 0) then {paramKeepAI = false} else {paramKeepAI = true};_u = _u + 1; //--- Keep AI Units over JIP.
+ if ((paramsArray select _u) == 0) then {paramAI = false} else {paramAI = true};_u = _u + 1; //--- AI Enabled.
+ if ((paramsArray select _u) == 0) then {paramArty = false} else {paramArty = true};_u = _u + 1; //--- Enable Artillery.
+ if !(WF_A2_Vanilla) then {missionNamespace setVariable ['WFBE_ARTILLERYCOMPUTER',(paramsArray select _u)];_u = _u + 1};
+ if ((paramsArray select _u) == 0) then {paramArtyUI = false} else {paramArtyUI = true};_u = _u + 1; //--- Enable Artillery Interface (Artillery Module).
+ missionNamespace setVariable ['WFBE_ARTILLERYMAXRANGE',(paramsArray select _u)];_u = _u + 1;
+ if ((paramsArray select _u) == 0) then {paramAIcom = false} else {paramAIcom = true};_u = _u + 1; //--- AI Commander Enabled.
+ if !(WF_A2_Arrowhead) then {missionNamespace setVariable ['WFBE_ALLIES',(paramsArray select _u)];_u = _u + 1};
+ if ((paramsArray select _u) == 0) then {paramAARadar = false} else {paramAARadar = true};_u = _u + 1; //--- Anti Air Radar.
+ if ((paramsArray select _u) == 0) then {paramBaseArea = false} else {paramBaseArea = true};_u = _u + 1; //--- Base Area.
+ missionNamespace setVariable ['WFBE_BASEAREAMAX',(paramsArray select _u)];_u = _u + 1;
+ missionNamespace setVariable ['WFBE_AIDEFENSE',(paramsArray select _u)];_u = _u + 1;
+ missionNamespace setVariable ['WFBE_DEFENSEMANRANGE',(paramsArray select _u)];_u = _u + 1;
+ //--- Building Limits.
+ missionNamespace setVariable ['WFBE_BUILDINGMAXBARRACKS',(paramsArray select _u)];
+ missionNamespace setVariable ['WFBE_BUILDINGMAXLIGHT',(paramsArray select _u)];
+ missionNamespace setVariable ['WFBE_BUILDINGMAXCOMMANDCENTER',(paramsArray select _u)];
+ missionNamespace setVariable ['WFBE_BUILDINGMAXHEAVY',(paramsArray select _u)];
+ missionNamespace setVariable ['WFBE_BUILDINGMAXAIRCRAFT',(paramsArray select _u)];
+ missionNamespace setVariable ['WFBE_BUILDINGMAXSERVICEPOINT',(paramsArray select _u)*2];_u = _u + 1;
+ if ((paramsArray select _u) == 0) then {paramUseWorkers = false} else {paramUseWorkers = true};_u = _u + 1;
+ if ((paramsArray select _u) == 0) then {paramDefenseCollide = false} else {paramDefenseCollide = true};_u = _u + 1;
+ missionNamespace setVariable ['WFBE_HQDEPLOYPRICE',(paramsArray select _u)];_u = _u + 1;
+ missionNamespace setVariable ['WFBE_HQDEPLOYRANGE',(paramsArray select _u)];_u = _u + 1;
+ if ((paramsArray select _u) == 0) then {paramBasePatrols = false} else {paramBasePatrols = true};_u = _u + 1; //--- Base patrols.
+ if ((paramsArray select _u) == 0) then {paramSpawnRestriction = false} else {paramSpawnRestriction = true};_u = _u + 1; //--- Restrict the Spawn logic to 2km within a town.
+ missionNamespace setVariable ['WFBE_SIDESTARTINGDISTANCE',(paramsArray select _u)];_u = _u + 1;
+ missionNamespace setVariable ['WFBE_STARTINGLOCATIONMODE',(paramsArray select _u)];_u = _u + 1;
+ if ((paramsArray select _u) == 0) then {paramMoneyOnly = false} else {paramMoneyOnly = true};_u = _u + 1;
+ missionNamespace setVariable ['WFBE_INCOMEINTERVAL',(paramsArray select _u)];_u = _u + 1;
+ missionNamespace setVariable ['WFBE_INCOMESYSTEM',(paramsArray select _u)];_u = _u + 1;
+ //--- Funds.
+ missionNamespace setVariable ['WFBE_EASTSTARTINGMONEY',(paramsArray select _u)];_u = _u + 1;
+ missionNamespace setVariable ['WFBE_WESTSTARTINGMONEY',(paramsArray select _u)];_u = _u + 1;
+ //--- Supply.
+ EastSupplies = (paramsArray select _u);_u = _u + 1;
+ WestSupplies = (paramsArray select _u);_u = _u + 1;
+ missionNamespace setVariable ['WFBE_SUPPLYSYSTEM',(paramsArray select _u)];_u = _u + 1;
+ missionNamespace setVariable ['WFBE_FASTTIMERATE', paramsArray select _u];_u = _u + 1;
+ if (time < 2) then {setDate [(date select 0),(date select 1),(date select 2),(paramsArray select _u),(date select 3)]};_u = _u + 1; //--- Time of Day.
+ missionNamespace setVariable ['WFBE_WEATHER',(paramsArray select _u)];_u = _u + 1;
+ if !(WF_A2_Vanilla) then {if ((paramsArray select _u) == 0) then {paramDLCBAF = false} else {paramDLCBAF = true};_u = _u + 1};
+ if !(WF_A2_Vanilla) then {if ((paramsArray select _u) == 0) then {paramDLCPMC = false} else {paramDLCPMC = true};_u = _u + 1};
+ if ((paramsArray select _u) == 0) then {paramAlice = false} else {paramAlice = true};_u = _u + 1; //--- Ambient Civilians.
+ if ((paramsArray select _u) == 0) then {paramHangars = false} else {paramHangars = true};_u = _u + 1; //--- Airport Hangars.
+ missionNamespace setVariable ['WFBE_UNITREMOVEDLAY',(paramsArray select _u)];_u = _u + 1;
+ if (WF_ACE) then {paramDefenseReloading = (paramsArray select _u);_u = _u + 1};
+ missionNamespace setVariable ['WFBE_ABANDONVEHICLETIMER', paramsArray select _u];_u = _u + 1;
+ if ((paramsArray select _u) == 0) then {paramExtendedInventory = false} else {paramExtendedInventory = true};_u = _u + 1;
+ missionNamespace setVariable ['WFBE_FASTTRAVEL',(paramsArray select _u)];_u = _u + 1;
+ if ((paramsArray select _u) == 0) then {paramHandleFF = false} else {paramHandleFF = true};_u = _u + 1; //--- Base Friendly Fire.
+ missionNamespace setVariable ['WFBE_MAXCLUTTERDISTANCE',(paramsArray select _u)];_u = _u + 1;
+ if ((paramsArray select _u) == 0) then {paramKickTeamswappers = false} else {paramKickTeamswappers = true};_u = _u + 1; //--- Kick teamswappers.
+ if ((paramsArray select _u) == 0) then {paramBoundaries = false} else {paramBoundaries = true};_u = _u + 1; //--- Prevent players from going outside of the map, they're killed after x seconds.
+ missionNamespace setVariable ['WFBE_MAPCOLORATION',(paramsArray select _u)];_u = _u + 1;
+ missionNamespace setVariable ['WFBE_INCOMINGMISSILEMAXRANGE',(paramsArray select _u)];_u = _u + 1;
+ if ((paramsArray select _u) == 0) then {paramSecondaryMissions = false} else {paramSecondaryMissions = true};_u = _u + 1;
+ if ((paramsArray select _u) == 0) then {paramShowUID = false} else {paramShowUID = true};_u = _u + 1; //--- Show User ID.
+ missionNamespace setVariable ['WFBE_BALANCEPRICE',(paramsArray select _u)];_u = _u + 1;
+ missionNamespace setVariable ['WFBE_THERMALIMAGING',(paramsArray select _u)];_u = _u + 1;
+ if ((paramsArray select _u) == 0) then {paramTrackAI = false} else {paramTrackAI = true};_u = _u + 1; //--- Track AI (Yellow dots) on map.
+ if ((paramsArray select _u) == 0) then {paramTrackPlayer = false} else {paramTrackPlayer = true};_u = _u + 1; //--- Track players.
+ if ((paramsArray select _u) == 0) then {paramBalancing = false} else {paramBalancing = true};_u = _u + 1; //--- Balance the given units weapon loadout.
+ if ((paramsArray select _u) == 0) then {paramBounty = false} else {paramBounty = true};_u = _u + 1;
+ if ((paramsArray select _u) == 0) then {paramUpgradesEast = false} else {paramUpgradesEast = true};_u = _u + 1; //--- Upgrades.
+ if ((paramsArray select _u) == 0) then {paramUpgradesWest = false} else {paramUpgradesWest = true};_u = _u + 1; //--- Upgrades.
+ missionNamespace setVariable ['WFBE_VICTORYCONDITION',(paramsArray select _u)];_u = _u + 1;
+ missionNamespace setVariable ['WFBE_MAXVIEWDISTANCE',(paramsArray select _u)];_u = _u + 1;
+ if (WF_ACE) then {if ((paramsArray select _u) == 0) then {paramAceWounds = false} else {paramAceWounds = true};_u = _u + 1;} else {paramAceWounds = false}; //--- ACE Wounds
+ if (WF_A2_Vanilla) then {if ((paramsArray select _u) == 0) then {paramCounterMeasures = false} else {paramCounterMeasures = true};_u = _u + 1}; //--- Countermeasures.
+ if ((paramsArray select _u) == 0) then {paramEASA = false} else {paramEASA = true};_u = _u + 1; //--- EASA.
+ if ((paramsArray select _u) == 0) then {paramHighCommand = false} else {paramHighCommand = true};_u = _u + 1; //--- High Command.
+ if ((paramsArray select _u) == 0) then {paramICBM = false} else {paramICBM = true};_u = _u + 1; //--- ICBM.
+ missionNamespace setVariable ['WFBE_ISIS',(paramsArray select _u)];_u = _u + 1;
+ if ((paramsArray select _u) == 0) then {paramVolumClouds = false} else {paramVolumClouds = true};_u = _u + 1; //--- Volumetric Clouds.
+ missionNamespace setVariable ['WFBE_RESPAWNCAMPSMODE',(paramsArray select _u)];_u = _u + 1;
+ missionNamespace setVariable ['WFBE_RESPAWNCAMPSRULEMODE',(paramsArray select _u)];_u = _u + 1;
+ missionNamespace setVariable ['WFBE_RESPAWNDELAY',(paramsArray select _u)];_u = _u + 1;
+ if ((paramsArray select _u) == 0) then {paramRespawnMASH = false} else {paramRespawnMASH = true};_u = _u + 1; //--- MASH respawn's enabled.
+ if ((paramsArray select _u) == 0) then {paramMobileRespawn = false} else {paramMobileRespawn = true};_u = _u + 1; //--- Mobile respawn's enabled.
+ missionNamespace setVariable ['WFBE_RESPAWNPENALTY',(paramsArray select _u)];_u = _u + 1;
+ missionNamespace setVariable ['WFBE_RESPAWNRANGE',(paramsArray select _u)];_u = _u + 1;
+ missionNamespace setVariable ['WFBE_RESTRICTIONADVAIR',(paramsArray select _u)];_u = _u + 1;
+ if ((paramsArray select _u) == 0) then {paramGearRestriction = false} else {paramGearRestriction = true};_u = _u + 1; //--- Player have a gear restriction in camps.
+ if !(WF_A2_Arrowhead) then {if ((paramsArray select _u) == 0) then {paramRestrictionKamov = false} else {paramRestrictionKamov = true};_u = _u + 1}; //--- Kamov enabled.
+ _u = _u + 1; //--- Town Amount System, leave blank.
+ missionNamespace setVariable ['WFBE_RESSTRIKER',(paramsArray select _u)];_u = _u + 1;
+ if ((paramsArray select _u) == 0) then {paramKeepCamps = false} else {paramKeepCamps = true};_u = _u + 1;
+ missionNamespace setVariable ['WFBE_TOWNCAPTUREMODE',(paramsArray select _u)];_u = _u + 1;
+ missionNamespace setVariable ['WFBE_CIVILIANFACTION',(paramsArray select _u)];_u = _u + 1;
+ missionNamespace setVariable ['WFBE_TOWNCONQUESTMODE',(paramsArray select _u)];_u = _u + 1;
+ missionNamespace setVariable ['WFBE_TOWNGEAR',(paramsArray select _u)];_u = _u + 1;
+ if ((paramsArray select _u) == 0) then {paramOccup = false} else {paramOccup = true};_u = _u + 1; //--- Town Occupation.
+ missionNamespace setVariable ['WFBE_TOWNOCCUPATIONDIFFICULTY',(paramsArray select _u)];_u = _u + 1;
+ missionNamespace setVariable ['WFBE_OCCUPATIONEASTFACTION',(paramsArray select _u)];_u = _u + 1;
+ missionNamespace setVariable ['WFBE_OCCUPATIONWESTFACTION',(paramsArray select _u)];_u = _u + 1;
+ if ((paramsArray select _u) == 0) then {paramOccReinf = false} else {paramOccReinf = true};_u = _u + 1; //--- Town Occupation Reinforcement.
+ missionNamespace setVariable ['WFBE_RESPATROL',(paramsArray select _u)];_u = _u + 1;
+ missionNamespace setVariable ['WFBE_TOWNBUILDPROTECTIONRANGE',(paramsArray select _u)];_u = _u + 1;
+ if ((paramsArray select _u) == 0) then {paramPurchaseInfDepot = false} else {paramPurchaseInfDepot = true};_u = _u + 1; //--- Town Milita Purchase.
+ if ((paramsArray select _u) == 0) then {paramRes = false} else {paramRes = true};_u = _u + 1; //--- Town Resistance.
+ missionNamespace setVariable ['WFBE_TOWNRESISTANCEDIFFICULTY',(paramsArray select _u)];_u = _u + 1;
+ missionNamespace setVariable ['WFBE_RESISTANCEFACTION',(paramsArray select _u)];_u = _u + 1;
+ if ((paramsArray select _u) == 0) then {paramResReinf = false} else {paramResReinf = true};_u = _u + 1; //--- Town Resistance Reinforcement.
+ if ((paramsArray select _u) == 0) then {paramResVehLock = false} else {paramResVehLock = true};_u = _u + 1; //--- Town Resistance Vehicles Lock.
+ missionNamespace setVariable ['WFBE_TOWNSTARTINGMODE',(paramsArray select _u)];_u = _u + 1;
+};
+
+//--- Debug.
+if (WF_Debug) then {
+ paramUpgradesEast = false;
+ paramUpgradesWest = false;
+ paramRes = false;
+ paramOccup = false;
+};
+
+//--- All parameters are set and ready.
+initJIP = true;
+
+//---- Server store the groups once in for all.
+if (isServer) then {
+ //--- BUG workaround: "attempt" to ensure that the client is really a client and not a server
+ if !(isNil "WFBE_EASTTEAMS") exitWith {};
+ WFBE_EASTTEAMS = [Group EastSlot1,Group EastSlot2,Group EastSlot3,Group EastSlot4,Group EastSlot5,Group EastSlot6,Group EastSlot7,Group EastSlot8,Group EastSlot9,Group EastSlot10,Group EastSlot11,Group EastSlot12,Group EastSlot13,Group EastSlot14,Group EastSlot15,Group EastSlot16];
+ WFBE_WESTTEAMS = [Group WestSlot1,Group WestSlot2,Group WestSlot3,Group WestSlot4,Group WestSlot5,Group WestSlot6,Group WestSlot7,Group WestSlot8,Group WestSlot9,Group WestSlot10,Group WestSlot11,Group WestSlot12,Group WestSlot13,Group WestSlot14,Group WestSlot15,Group WestSlot16];
+
+ for '_i' from 0 to count(WFBE_EASTTEAMS)-1 do {
+ if (isNil {WFBE_WESTTEAMS select _i}) then {WFBE_WESTTEAMS set [_i, grpNull]};
+ if (isNil {WFBE_EASTTEAMS select _i}) then {WFBE_EASTTEAMS set [_i, grpNull]};
+ };
+
+ publicVariable "WFBE_EASTTEAMS";
+ publicVariable "WFBE_WESTTEAMS";
+
+ diag_log Format["[WFBE (INIT)][frameno:%1 | ticktime:%2] init_JIPCompatible.sqf: Server East teams set and sent %3",diag_frameno,diag_tickTime,WFBE_EASTTEAMS];
+ diag_log Format["[WFBE (INIT)][frameno:%1 | ticktime:%2] init_JIPCompatible.sqf: Server West teams set and sent %3",diag_frameno,diag_tickTime,WFBE_WESTTEAMS];
+};
+
+//--- Cli Exec - Wait for sync.
+// if (!isServer) then {
+ diag_log format ["client waiting for broadcasted teams!"];
+ waitUntil{!isNil 'WFBE_EASTTEAMS' && !isNil 'WFBE_WESTTEAMS'};
+ diag_log Format["[WFBE (INIT)][frameno:%1 | ticktime:%2] init_JIPCompatible.sqf: Received Teams West %3",diag_frameno,diag_tickTime,WFBE_WESTTEAMS];
+ diag_log Format["[WFBE (INIT)][frameno:%1 | ticktime:%2] init_JIPCompatible.sqf: Received Teams East %3",diag_frameno,diag_tickTime,WFBE_EASTTEAMS];
+// };
+
+missionNamespace setVariable ['WFBE_EASTTEAMS', WFBE_EASTTEAMS];
+missionNamespace setVariable ['WFBE_WESTTEAMS', WFBE_WESTTEAMS];
+
+//--- Slot names.
+{
+ Private ["_temp"];
+ _temp = [];
+ {_temp = _temp + [if !(isNull _x) then {vehicleVarName (leader _x)} else {""}]} forEach (_x select 0);
+ missionNamespace setVariable [_x select 1, _temp];
+} forEach [[WFBE_EASTTEAMS,"WFBE_EASTSLOTNAMES"],[WFBE_WESTTEAMS,"WFBE_WESTSLOTNAMES"]];
+
+//--- Maximum players, try to keep the same amount of player on east & west.
+maxPlayers = count (missionNamespace getVariable 'WFBE_EASTTEAMS');
+
+//--- Execute the common files.
+ExecVM "Common\Init\Init_Common.sqf";
+//--- Execute the towns file.
+ExecVM "Common\Init\Init_Towns.sqf";
+
+//--- Run the client's part.
+if (isClient) then {
+ diag_log Format["[WFBE (INIT)][frameno:%1 | ticktime:%2] init_JIPCompatible.sqf: Executing Client Initialization...",diag_frameno,diag_tickTime];
+ ExecVM "Client\Init\Init_Client.sqf";
+};
+
+//--- Run the server's part.
+if (isServer) then {
+ if (isNil 'EastMHQ' || isNil 'WestMHQ') exitWith {diag_log Format["[WFBE (FATAL ERROR)][frameno:%1 | ticktime:%2] init_JIPCompatible.sqf: The client has attempted to trigger the server part!",diag_frameno,diag_tickTime];};
+
+ diag_log Format["[WFBE (INIT)][frameno:%1 | ticktime:%2] init_JIPCompatible.sqf: Executing Server Initialization...",diag_frameno,diag_tickTime];
+ ExecVM "Server\Init\Init_Server.sqf";
+};
+
+//--- Fast Get/Set.
+_i = 1;
+{if !(isNil '_x') then {_x setVariable ["identification", Format["EastSlot%1",_i]]};_i = _i + 1} forEach (missionNamespace getVariable 'WFBE_EASTTEAMS');
+_i = 1;
+{if !(isNil '_x') then {_x setVariable ["identification", Format["WestSlot%1",_i]]};_i = _i + 1} forEach (missionNamespace getVariable 'WFBE_WESTTEAMS'); \ No newline at end of file
diff --git a/mission.sqm b/mission.sqm
new file mode 100644
index 0000000..bc70707
--- /dev/null
+++ b/mission.sqm
@@ -0,0 +1,4402 @@
+version=11;
+class Mission
+{
+ addOns[]=
+ {
+ "cacharacters2",
+ "cacharacters_e",
+ "chernarus",
+ "ca_modules_functions",
+ "warfarebuildings",
+ "CAWheeled_E_stryker",
+ "CAWheeled2_BTR90",
+ "caweapons_warfare_weapons",
+ "ca_highcommand",
+ "warfare2vehicles",
+ "cacharacters_baf",
+ "cawheeled_w_baf",
+ "catracked_w_baf",
+ "caair_baf_ch_47f",
+ "caair_baf",
+ "caweapons_baf",
+ "cacharacters_pmc",
+ "cawheeled_pmc_armoredsuv",
+ "caair_pmc_ka60"
+ };
+ addOnsAuto[]=
+ {
+ "cacharacters_e",
+ "cacharacters2",
+ "ca_modules_functions",
+ "ca_highcommand",
+ "CAWheeled_E_stryker",
+ "CAWheeled2_BTR90",
+ "warfarebuildings",
+ "caweapons_warfare_weapons",
+ "chernarus"
+ };
+ randomSeed=10034581;
+ class Intel
+ {
+ briefingName="Warfare BE V2.071 ACE [Chux 1.8] - Chernarus";
+ briefingDescription="By Benny; ACE by Joehunk; Add'l configs by woore";
+ resistanceWest=0;
+ startWeather=0;
+ forecastWeather=0;
+ year=2008;
+ month=10;
+ day=11;
+ hour=9;
+ minute=20;
+ };
+ class Groups
+ {
+ items=73;
+ class Item0
+ {
+ side="WEST";
+ class Vehicles
+ {
+ items=1;
+ class Item0
+ {
+ position[]={2285.0437,514.65796,15296.224};
+ id=0;
+ side="WEST";
+ vehicle="FR_R";
+ player="PLAYER COMMANDER";
+ leader=1;
+ rank="LIEUTENANT";
+ skill=0.60000002;
+ text="WestSlot1";
+ };
+ };
+ };
+ class Item1
+ {
+ side="WEST";
+ class Vehicles
+ {
+ items=1;
+ class Item0
+ {
+ position[]={2287.1726,514.82703,15296.234};
+ id=1;
+ side="WEST";
+ vehicle="FR_R";
+ player="PLAY CDG";
+ leader=1;
+ rank="LIEUTENANT";
+ skill=0.60000002;
+ text="WestSlot2";
+ };
+ };
+ };
+ class Item2
+ {
+ side="WEST";
+ class Vehicles
+ {
+ items=1;
+ class Item0
+ {
+ position[]={2289.1504,514.9906,15296.259};
+ id=2;
+ side="WEST";
+ vehicle="FR_TL";
+ player="PLAY CDG";
+ leader=1;
+ rank="LIEUTENANT";
+ skill=0.60000002;
+ text="WestSlot3";
+ };
+ };
+ };
+ class Item3
+ {
+ side="WEST";
+ class Vehicles
+ {
+ items=1;
+ class Item0
+ {
+ position[]={2290.9888,515.14014,15296.259};
+ id=3;
+ side="WEST";
+ vehicle="FR_TL";
+ player="PLAY CDG";
+ leader=1;
+ rank="LIEUTENANT";
+ skill=0.60000002;
+ text="WestSlot4";
+ };
+ };
+ };
+ class Item4
+ {
+ side="WEST";
+ class Vehicles
+ {
+ items=1;
+ class Item0
+ {
+ position[]={2292.6414,515.27637,15296.283};
+ id=4;
+ side="WEST";
+ vehicle="USMC_SoldierS_Sniper";
+ player="PLAY CDG";
+ leader=1;
+ rank="LIEUTENANT";
+ skill=0.60000002;
+ text="WestSlot5";
+ };
+ };
+ };
+ class Item5
+ {
+ side="WEST";
+ class Vehicles
+ {
+ items=1;
+ class Item0
+ {
+ position[]={2294.2241,515.39917,15296.258};
+ id=5;
+ side="WEST";
+ vehicle="USMC_SoldierS_Sniper";
+ player="PLAY CDG";
+ leader=1;
+ rank="LIEUTENANT";
+ skill=0.60000002;
+ text="WestSlot6";
+ };
+ };
+ };
+ class Item6
+ {
+ side="WEST";
+ class Vehicles
+ {
+ items=1;
+ class Item0
+ {
+ position[]={2295.7368,515.52393,15296.282};
+ id=6;
+ side="WEST";
+ vehicle="USMC_SoldierS_Engineer";
+ player="PLAY CDG";
+ leader=1;
+ rank="LIEUTENANT";
+ skill=0.60000002;
+ text="WestSlot7";
+ };
+ };
+ };
+ class Item7
+ {
+ side="WEST";
+ class Vehicles
+ {
+ items=1;
+ class Item0
+ {
+ position[]={2297.366,515.65424,15296.282};
+ id=7;
+ side="WEST";
+ vehicle="USMC_SoldierS_Engineer";
+ player="PLAY CDG";
+ leader=1;
+ rank="LIEUTENANT";
+ skill=0.60000002;
+ text="WestSlot8";
+ };
+ };
+ };
+ class Item8
+ {
+ side="WEST";
+ class Vehicles
+ {
+ items=1;
+ class Item0
+ {
+ position[]={2298.832,515.77533,15296.307};
+ id=8;
+ side="WEST";
+ vehicle="USMC_SoldierS_Engineer";
+ player="PLAY CDG";
+ leader=1;
+ rank="LIEUTENANT";
+ skill=0.60000002;
+ text="WestSlot9";
+ };
+ };
+ };
+ class Item9
+ {
+ side="WEST";
+ class Vehicles
+ {
+ items=1;
+ class Item0
+ {
+ position[]={2300.4373,515.90906,15296.328};
+ id=9;
+ side="WEST";
+ vehicle="USMC_SoldierS_Engineer";
+ player="PLAY CDG";
+ leader=1;
+ rank="LIEUTENANT";
+ skill=0.60000002;
+ text="WestSlot10";
+ };
+ };
+ };
+ class Item10
+ {
+ side="WEST";
+ class Vehicles
+ {
+ items=1;
+ class Item0
+ {
+ position[]={2285.0437,514.43585,15294.746};
+ id=10;
+ side="WEST";
+ vehicle="FR_Commander";
+ player="PLAY CDG";
+ leader=1;
+ rank="LIEUTENANT";
+ skill=0.60000002;
+ text="WestSlot11";
+ };
+ };
+ };
+ class Item11
+ {
+ side="WEST";
+ class Vehicles
+ {
+ items=1;
+ class Item0
+ {
+ position[]={2287.1726,514.60437,15294.757};
+ id=11;
+ side="WEST";
+ vehicle="FR_Sapper";
+ player="PLAY CDG";
+ leader=1;
+ rank="LIEUTENANT";
+ skill=0.60000002;
+ text="WestSlot12";
+ };
+ };
+ };
+ class Item12
+ {
+ side="WEST";
+ class Vehicles
+ {
+ items=1;
+ class Item0
+ {
+ position[]={2289.1504,514.76813,15294.781};
+ id=12;
+ side="WEST";
+ vehicle="USMC_Soldier_Medic";
+ player="PLAY CDG";
+ leader=1;
+ rank="LIEUTENANT";
+ skill=0.60000002;
+ text="WestSlot13";
+ };
+ };
+ };
+ class Item13
+ {
+ side="WEST";
+ class Vehicles
+ {
+ items=1;
+ class Item0
+ {
+ position[]={2290.9888,514.91766,15294.781};
+ id=13;
+ side="WEST";
+ vehicle="USMC_Soldier_Medic";
+ player="PLAY CDG";
+ leader=1;
+ rank="LIEUTENANT";
+ skill=0.60000002;
+ text="WestSlot14";
+ };
+ };
+ };
+ class Item14
+ {
+ side="WEST";
+ class Vehicles
+ {
+ items=1;
+ class Item0
+ {
+ position[]={2292.6414,515.05566,15294.806};
+ id=14;
+ side="WEST";
+ vehicle="FR_Corpsman";
+ player="PLAY CDG";
+ leader=1;
+ rank="LIEUTENANT";
+ skill=0.60000002;
+ text="WestSlot15";
+ };
+ };
+ };
+ class Item15
+ {
+ side="WEST";
+ class Vehicles
+ {
+ items=1;
+ class Item0
+ {
+ position[]={2294.2241,515.17865,15294.78};
+ id=15;
+ side="WEST";
+ vehicle="FR_Corpsman";
+ player="PLAY CDG";
+ leader=1;
+ rank="LIEUTENANT";
+ skill=0.60000002;
+ text="WestSlot16";
+ };
+ };
+ };
+ class Item16
+ {
+ side="EAST";
+ class Vehicles
+ {
+ items=1;
+ class Item0
+ {
+ position[]={36.459702,5.6554675,1591.312};
+ id=18;
+ side="EAST";
+ vehicle="RUS_Soldier1";
+ player="PLAY CDG";
+ leader=1;
+ rank="LIEUTENANT";
+ skill=0.60000002;
+ text="EastSlot1";
+ };
+ };
+ };
+ class Item17
+ {
+ side="EAST";
+ class Vehicles
+ {
+ items=1;
+ class Item0
+ {
+ position[]={39.564831,5.7037807,1591.311};
+ id=19;
+ side="EAST";
+ vehicle="RUS_Soldier1";
+ player="PLAY CDG";
+ leader=1;
+ rank="LIEUTENANT";
+ skill=0.60000002;
+ text="EastSlot2";
+ };
+ };
+ };
+ class Item18
+ {
+ side="EAST";
+ class Vehicles
+ {
+ items=1;
+ class Item0
+ {
+ position[]={42.77404,5.7508512,1591.3119};
+ id=20;
+ side="EAST";
+ vehicle="RUS_Soldier_TL";
+ player="PLAY CDG";
+ leader=1;
+ rank="LIEUTENANT";
+ skill=0.60000002;
+ text="EastSlot3";
+ };
+ };
+ };
+ class Item19
+ {
+ side="EAST";
+ class Vehicles
+ {
+ items=1;
+ class Item0
+ {
+ position[]={45.856258,5.7983971,1591.333};
+ id=21;
+ side="EAST";
+ vehicle="RUS_Soldier_TL";
+ player="PLAY CDG";
+ leader=1;
+ rank="LIEUTENANT";
+ skill=0.60000002;
+ text="EastSlot4";
+ };
+ };
+ };
+ class Item20
+ {
+ side="EAST";
+ class Vehicles
+ {
+ items=1;
+ class Item0
+ {
+ position[]={48.873554,5.8506479,1591.3148};
+ id=22;
+ side="EAST";
+ vehicle="RU_Soldier_Sniper";
+ player="PLAY CDG";
+ leader=1;
+ rank="LIEUTENANT";
+ skill=0.60000002;
+ text="EastSlot5";
+ };
+ };
+ };
+ class Item21
+ {
+ side="EAST";
+ class Vehicles
+ {
+ items=1;
+ class Item0
+ {
+ position[]={51.787445,5.9010229,1591.2653};
+ id=23;
+ side="EAST";
+ vehicle="RU_Soldier_Sniper";
+ player="PLAY CDG";
+ leader=1;
+ rank="LIEUTENANT";
+ skill=0.60000002;
+ text="EastSlot6";
+ };
+ };
+ };
+ class Item22
+ {
+ side="EAST";
+ class Vehicles
+ {
+ items=1;
+ class Item0
+ {
+ position[]={54.661957,5.9393201,1591.2661};
+ id=24;
+ side="EAST";
+ vehicle="MVD_Soldier_TL";
+ player="PLAY CDG";
+ leader=1;
+ rank="LIEUTENANT";
+ skill=0.60000002;
+ text="EastSlot7";
+ };
+ };
+ };
+ class Item23
+ {
+ side="EAST";
+ class Vehicles
+ {
+ items=1;
+ class Item0
+ {
+ position[]={57.64856,5.9752154,1591.2872};
+ id=25;
+ side="EAST";
+ vehicle="MVD_Soldier_TL";
+ player="PLAY CDG";
+ leader=1;
+ rank="LIEUTENANT";
+ skill=0.60000002;
+ text="EastSlot8";
+ };
+ };
+ };
+ class Item24
+ {
+ side="EAST";
+ class Vehicles
+ {
+ items=1;
+ class Item0
+ {
+ position[]={60.444607,6,1591.2405};
+ id=26;
+ side="EAST";
+ vehicle="MVD_Soldier_TL";
+ player="PLAY CDG";
+ leader=1;
+ rank="LIEUTENANT";
+ skill=0.60000002;
+ text="EastSlot9";
+ };
+ };
+ };
+ class Item25
+ {
+ side="EAST";
+ class Vehicles
+ {
+ items=1;
+ class Item0
+ {
+ position[]={63.239944,6,1591.2616};
+ id=27;
+ side="EAST";
+ vehicle="MVD_Soldier_TL";
+ player="PLAY CDG";
+ leader=1;
+ rank="LIEUTENANT";
+ skill=0.60000002;
+ text="EastSlot10";
+ };
+ };
+ };
+ class Item26
+ {
+ side="EAST";
+ class Vehicles
+ {
+ items=1;
+ class Item0
+ {
+ position[]={36.368946,5.646143,1588.4053};
+ id=28;
+ side="EAST";
+ vehicle="RUS_Commander";
+ player="PLAY CDG";
+ leader=1;
+ rank="LIEUTENANT";
+ skill=0.60000002;
+ text="EastSlot11";
+ };
+ };
+ };
+ class Item27
+ {
+ side="EAST";
+ class Vehicles
+ {
+ items=1;
+ class Item0
+ {
+ position[]={39.474075,5.6946979,1588.4043};
+ id=29;
+ side="EAST";
+ vehicle="RUS_Soldier3";
+ player="PLAY CDG";
+ leader=1;
+ rank="LIEUTENANT";
+ skill=0.60000002;
+ text="EastSlot12";
+ };
+ };
+ };
+ class Item28
+ {
+ side="EAST";
+ class Vehicles
+ {
+ items=1;
+ class Item0
+ {
+ position[]={42.683285,5.7417693,1588.4052};
+ id=30;
+ side="EAST";
+ vehicle="RU_Soldier_Medic";
+ player="PLAY CDG";
+ leader=1;
+ rank="LIEUTENANT";
+ skill=0.60000002;
+ text="EastSlot13";
+ };
+ };
+ };
+ class Item29
+ {
+ side="EAST";
+ class Vehicles
+ {
+ items=1;
+ class Item0
+ {
+ position[]={45.765503,5.7880516,1588.4263};
+ id=31;
+ side="EAST";
+ vehicle="RU_Soldier_Medic";
+ player="PLAY CDG";
+ leader=1;
+ rank="LIEUTENANT";
+ skill=0.60000002;
+ text="EastSlot14";
+ };
+ };
+ };
+ class Item30
+ {
+ side="EAST";
+ class Vehicles
+ {
+ items=1;
+ class Item0
+ {
+ position[]={48.782799,5.8392015,1588.4081};
+ id=32;
+ side="EAST";
+ vehicle="RU_Soldier_Medic";
+ player="PLAY CDG";
+ leader=1;
+ rank="LIEUTENANT";
+ skill=0.60000002;
+ text="EastSlot15";
+ };
+ };
+ };
+ class Item31
+ {
+ side="EAST";
+ class Vehicles
+ {
+ items=1;
+ class Item0
+ {
+ position[]={51.69669,5.8895102,1588.3585};
+ id=33;
+ side="EAST";
+ vehicle="RU_Soldier_Medic";
+ player="PLAY CDG";
+ leader=1;
+ rank="LIEUTENANT";
+ skill=0.60000002;
+ text="EastSlot16";
+ };
+ };
+ };
+ class Item32
+ {
+ side="LOGIC";
+ class Vehicles
+ {
+ items=1;
+ class Item0
+ {
+ position[]={11963.823,135.88225,13128.979};
+ id=34;
+ side="LOGIC";
+ vehicle="LocationLogic";
+ leader=1;
+ skill=0.60000002;
+ text="StartingLocation0";
+ };
+ };
+ };
+ class Item33
+ {
+ side="LOGIC";
+ class Vehicles
+ {
+ items=1;
+ class Item0
+ {
+ position[]={1083.4049,6.0097227,2519.5176};
+ id=35;
+ side="LOGIC";
+ vehicle="LocationLogic";
+ leader=1;
+ skill=0.60000002;
+ text="StartingLocation1";
+ };
+ };
+ };
+ class Item34
+ {
+ side="LOGIC";
+ class Vehicles
+ {
+ items=1;
+ class Item0
+ {
+ position[]={6666.6675,233.5717,4720.7339};
+ id=36;
+ side="LOGIC";
+ vehicle="LocationLogic";
+ leader=1;
+ skill=0.60000002;
+ text="StartingLocation2";
+ };
+ };
+ };
+ class Item35
+ {
+ side="LOGIC";
+ class Vehicles
+ {
+ items=1;
+ class Item0
+ {
+ position[]={6876.314,386.34677,11294.192};
+ id=37;
+ side="LOGIC";
+ vehicle="LocationLogic";
+ leader=1;
+ skill=0.60000002;
+ text="StartingLocation3";
+ };
+ };
+ };
+ class Item36
+ {
+ side="LOGIC";
+ class Vehicles
+ {
+ items=1;
+ class Item0
+ {
+ position[]={4650.9014,9,2501.761};
+ id=38;
+ side="LOGIC";
+ vehicle="LocationLogic";
+ leader=1;
+ skill=0.60000002;
+ text="StartingLocation4";
+ };
+ };
+ };
+ class Item37
+ {
+ side="LOGIC";
+ class Vehicles
+ {
+ items=1;
+ class Item0
+ {
+ position[]={10780.923,150.35269,9195.8301};
+ id=39;
+ side="LOGIC";
+ vehicle="LocationLogic";
+ leader=1;
+ skill=0.60000002;
+ text="StartingLocation5";
+ };
+ };
+ };
+ class Item38
+ {
+ side="LOGIC";
+ class Vehicles
+ {
+ items=1;
+ class Item0
+ {
+ position[]={9758.1689,177.75787,10540.879};
+ id=40;
+ side="LOGIC";
+ vehicle="LocationLogic";
+ leader=1;
+ skill=0.60000002;
+ text="StartingLocation6";
+ };
+ };
+ };
+ class Item39
+ {
+ side="LOGIC";
+ class Vehicles
+ {
+ items=1;
+ class Item0
+ {
+ position[]={6325.1528,353.62326,9114.8916};
+ id=41;
+ side="LOGIC";
+ vehicle="LocationLogic";
+ leader=1;
+ skill=0.60000002;
+ text="StartingLocation8";
+ };
+ };
+ };
+ class Item40
+ {
+ side="LOGIC";
+ class Vehicles
+ {
+ items=1;
+ class Item0
+ {
+ position[]={11461.945,317.29245,11343.255};
+ id=42;
+ side="LOGIC";
+ vehicle="LocationLogic";
+ leader=1;
+ skill=0.60000002;
+ text="StartingLocation9";
+ };
+ };
+ };
+ class Item41
+ {
+ side="LOGIC";
+ class Vehicles
+ {
+ items=1;
+ class Item0
+ {
+ position[]={8655.291,328.51883,8106.8887};
+ id=43;
+ side="LOGIC";
+ vehicle="LocationLogic";
+ leader=1;
+ skill=0.60000002;
+ text="StartingLocation10";
+ };
+ };
+ };
+ class Item42
+ {
+ side="LOGIC";
+ class Vehicles
+ {
+ items=1;
+ class Item0
+ {
+ position[]={12978.743,18.159849,5524.0752};
+ id=124;
+ side="LOGIC";
+ vehicle="LocationLogic";
+ leader=1;
+ skill=0.60000002;
+ text="StartingLocation11";
+ };
+ };
+ };
+ class Item43
+ {
+ side="LOGIC";
+ class Vehicles
+ {
+ items=1;
+ class Item0
+ {
+ position[]={11763.76,198.78548,4555.043};
+ id=125;
+ side="LOGIC";
+ vehicle="LocationLogic";
+ leader=1;
+ skill=0.60000002;
+ text="StartingLocation12";
+ };
+ };
+ };
+ class Item44
+ {
+ side="LOGIC";
+ class Vehicles
+ {
+ items=1;
+ class Item0
+ {
+ position[]={11382.65,221.27522,7532.8071};
+ id=126;
+ side="LOGIC";
+ vehicle="LocationLogic";
+ leader=1;
+ skill=0.60000002;
+ text="StartingLocation13";
+ };
+ };
+ };
+ class Item45
+ {
+ side="LOGIC";
+ class Vehicles
+ {
+ items=1;
+ class Item0
+ {
+ position[]={5443.1699,290.1987,6817.7754};
+ id=127;
+ side="LOGIC";
+ vehicle="LocationLogic";
+ leader=1;
+ skill=0.60000002;
+ text="StartingLocation14";
+ };
+ };
+ };
+ class Item46
+ {
+ side="LOGIC";
+ class Vehicles
+ {
+ items=1;
+ class Item0
+ {
+ position[]={1678.885,156.3257,5206.1582};
+ id=128;
+ side="LOGIC";
+ vehicle="LocationLogic";
+ leader=1;
+ skill=0.60000002;
+ text="StartingLocation15";
+ };
+ };
+ };
+ class Item47
+ {
+ side="LOGIC";
+ class Vehicles
+ {
+ items=1;
+ class Item0
+ {
+ position[]={7395.4814,216.56831,6290.5249};
+ id=129;
+ side="LOGIC";
+ vehicle="LocationLogic";
+ leader=1;
+ skill=0.60000002;
+ text="StartingLocation16";
+ };
+ };
+ };
+ class Item48
+ {
+ side="LOGIC";
+ class Vehicles
+ {
+ items=1;
+ class Item0
+ {
+ position[]={4926.1987,337.7739,7606.8779};
+ id=130;
+ side="LOGIC";
+ vehicle="LocationLogic";
+ leader=1;
+ skill=0.60000002;
+ text="StartingLocation17";
+ };
+ };
+ };
+ class Item49
+ {
+ side="LOGIC";
+ class Vehicles
+ {
+ items=1;
+ class Item0
+ {
+ position[]={5319.0029,181.44644,3931.7368};
+ id=131;
+ side="LOGIC";
+ vehicle="LocationLogic";
+ leader=1;
+ skill=0.60000002;
+ text="StartingLocation18";
+ };
+ };
+ };
+ class Item50
+ {
+ side="LOGIC";
+ class Vehicles
+ {
+ items=1;
+ class Item0
+ {
+ position[]={10032.929,175.17305,7190.2651};
+ id=132;
+ side="LOGIC";
+ vehicle="LocationLogic";
+ leader=1;
+ skill=0.60000002;
+ text="StartingLocation19";
+ };
+ };
+ };
+ class Item51
+ {
+ side="LOGIC";
+ class Vehicles
+ {
+ items=1;
+ class Item0
+ {
+ position[]={4129.5225,338.11948,11077.994};
+ id=133;
+ side="LOGIC";
+ vehicle="LocationLogic";
+ leader=1;
+ skill=0.60000002;
+ text="StartingLocation20";
+ };
+ };
+ };
+ class Item52
+ {
+ side="LOGIC";
+ class Vehicles
+ {
+ items=1;
+ class Item0
+ {
+ position[]={5837.6089,165.46283,12367.868};
+ id=134;
+ side="LOGIC";
+ vehicle="LocationLogic";
+ leader=1;
+ skill=0.60000002;
+ text="StartingLocation21";
+ };
+ };
+ };
+ class Item53
+ {
+ side="LOGIC";
+ class Vehicles
+ {
+ items=1;
+ class Item0
+ {
+ position[]={8496.5039,12.427315,2601.0928};
+ id=135;
+ side="LOGIC";
+ vehicle="LocationLogic";
+ leader=1;
+ skill=0.60000002;
+ text="StartingLocation22";
+ };
+ };
+ };
+ class Item54
+ {
+ side="LOGIC";
+ class Vehicles
+ {
+ items=1;
+ class Item0
+ {
+ position[]={12829.924,6.0127869,9822.5156};
+ id=136;
+ side="LOGIC";
+ vehicle="LocationLogic";
+ leader=1;
+ skill=0.60000002;
+ text="StartingLocation23";
+ };
+ };
+ };
+ class Item55
+ {
+ side="LOGIC";
+ class Vehicles
+ {
+ items=1;
+ class Item0
+ {
+ position[]={1924.5691,285.83875,9114.6436};
+ id=137;
+ side="LOGIC";
+ vehicle="LocationLogic";
+ leader=1;
+ skill=0.60000002;
+ text="StartingLocation24";
+ };
+ };
+ };
+ class Item56
+ {
+ side="LOGIC";
+ class Vehicles
+ {
+ items=1;
+ class Item0
+ {
+ position[]={10238.431,15.410649,2851.0569};
+ id=138;
+ side="LOGIC";
+ vehicle="LocationLogic";
+ leader=1;
+ skill=0.60000002;
+ text="StartingLocation25";
+ };
+ };
+ };
+ class Item57
+ {
+ side="LOGIC";
+ class Vehicles
+ {
+ items=1;
+ class Item0
+ {
+ position[]={9284.5176,293.72672,5867.835};
+ id=139;
+ side="LOGIC";
+ vehicle="LocationLogic";
+ leader=1;
+ skill=0.60000002;
+ text="StartingLocation26";
+ };
+ };
+ };
+ class Item58
+ {
+ side="LOGIC";
+ class Vehicles
+ {
+ items=1;
+ class Item0
+ {
+ position[]={2730.6619,136.32582,3229.6301};
+ id=140;
+ side="LOGIC";
+ vehicle="LocationLogic";
+ leader=1;
+ skill=0.60000002;
+ text="StartingLocation27";
+ };
+ };
+ };
+ class Item59
+ {
+ side="LOGIC";
+ class Vehicles
+ {
+ items=1;
+ class Item0
+ {
+ position[]={3342.7749,346.37994,6570.4565};
+ id=141;
+ side="LOGIC";
+ vehicle="LocationLogic";
+ leader=1;
+ skill=0.60000002;
+ text="StartingLocation28";
+ };
+ };
+ };
+ class Item60
+ {
+ side="LOGIC";
+ class Vehicles
+ {
+ items=1;
+ class Item0
+ {
+ position[]={13106.159,6.1624851,6965.1216};
+ id=142;
+ side="LOGIC";
+ vehicle="LocationLogic";
+ leader=1;
+ skill=0.60000002;
+ text="StartingLocation29";
+ };
+ };
+ };
+ class Item61
+ {
+ side="LOGIC";
+ class Vehicles
+ {
+ items=1;
+ class Item0
+ {
+ position[]={5120.106,0.14696747,463.94165};
+ id=143;
+ side="LOGIC";
+ vehicle="Logic";
+ leader=1;
+ skill=0.60000002;
+ text="WF_Logic";
+ init="this setVariable [""totalTowns"",43];this setVariable [""Towns_RemovedXSmall"",[""Sosnovka"",""Zelenogorsk"",""Dolina"",""StarySobor"",""Myshkino"",""Chernogorsk"",""Dubrovka"",""Pogorevka"",""Bor"",""Staroye"",""Pulkovo"",""Khelm"",""Kamyshovo"",""Pavlovo"",""Nadezhdino"",""Mogilevka"",""Vyshnoye"",""Berezino"",""Krasnostav"",""Gorka"",""Elektrozavodsk"",""Msta"",""Komarovo"",""Petrovka"",""Shakhovka"",""Prigorodki"",""Olsha"",""Orlovets"",""Nizhnoye"",""Solnichniy"",""Tulga"",""Kozlovka"",""Polana"",""Kamenka"",""Gvozdno"",""NovySobor"",""Pusta"",""Guglovo""]];this setVariable [""Towns_RemovedSmall"",[""Sosnovka"",""Zelenogorsk"",""Dolina"",""StarySobor"",""Lopatino"",""Myshkino"",""Chernogorsk"",""Pogorevka"",""Bor"",""Kabanino"",""Staroye"",""Pulkovo"",""Kamyshovo"",""Vybor"",""Pavlovo"",""Nadezhdino"",""Grishino"",""Mogilevka"",""Vyshnoye"",""Elektrozavodsk"",""Msta"",""Komarovo"",""Petrovka"",""Shakhovka"",""Prigorodki"",""Nizhnoye"",""Solnichniy"",""Tulga"",""Kozlovka"",""Pustoshka"",""Kamenka"",""NovySobor"",""Pusta"",""Guglovo""]];this setVariable [""Towns_RemovedMedium"",[""Dolina"",""Dubrovka"",""Bor"",""Staroye"",""Elektrozavodsk"",""Berezino"",""Krasnostav"",""Pulkovo"",""Khelm"",""Kamyshovo"",""Vyshnoye"",""Gorka"",""Msta"",""Petrovka"",""Shakhovka"",""Prigorodki"",""Olsha"",""Orlovets"",""Nizhnoye"",""Solnichniy"",""Tulga"",""Polana"",""Gvozdno"",""NovySobor"",""Pusta"",""Guglovo"",""Sosnovka""]];this setVariable [""Towns_RemovedLarge"",[""Bor"",""Pulkovo"",""Khelm"",""Msta"",""Shakhovka"",""Prigorodki"",""Olsha"",""Orlovets"",""Nizhnoye"",""Tulga"",""Kozlovka"",""Pustoshka"",""Kamenka"",""NovySobor"",""Sosnovka""]];nullReturn = [this] ExecVM ""Common\Init\Init_TownMode.sqf""";
+ };
+ };
+ };
+ class Item62
+ {
+ side="LOGIC";
+ class Vehicles
+ {
+ items=1;
+ class Item0
+ {
+ position[]={8201.3535,417.72763,9761.9395};
+ id=144;
+ side="LOGIC";
+ vehicle="LocationLogic";
+ leader=1;
+ skill=0.60000002;
+ text="StartingLocation7";
+ };
+ };
+ };
+ class Item63
+ {
+ side="LOGIC";
+ class Vehicles
+ {
+ items=1;
+ class Item0
+ {
+ position[]={5149.7075,0.37157005,464.13287};
+ id=228;
+ side="LOGIC";
+ vehicle="Logic";
+ leader=1;
+ skill=0.60000002;
+ text="RCoin";
+ };
+ };
+ };
+ class Item64
+ {
+ side="LOGIC";
+ class Vehicles
+ {
+ items=1;
+ class Item0
+ {
+ position[]={5134.2661,0.35102245,464.13287};
+ id=229;
+ side="LOGIC";
+ vehicle="Logic";
+ leader=1;
+ skill=0.60000002;
+ text="MCoin";
+ };
+ };
+ };
+ class Item65
+ {
+ side="LOGIC";
+ class Vehicles
+ {
+ items=1;
+ class Item0
+ {
+ position[]={5163.9917,0.26246798,464.27545};
+ id=230;
+ side="LOGIC";
+ vehicle="Logic";
+ leader=1;
+ skill=0.60000002;
+ text="UAVL";
+ };
+ };
+ };
+ class Item66
+ {
+ side="LOGIC";
+ class Vehicles
+ {
+ items=1;
+ class Item0
+ {
+ position[]={5164.1074,0.099566177,477.58484};
+ id=237;
+ side="LOGIC";
+ vehicle="FunctionsManager";
+ leader=1;
+ skill=0.60000002;
+ };
+ };
+ };
+ class Item67
+ {
+ side="LOGIC";
+ class Vehicles
+ {
+ items=1;
+ class Item0
+ {
+ position[]={5163.9712,0.26871869,490.29968};
+ id=238;
+ side="LOGIC";
+ vehicle="HighCommand";
+ leader=1;
+ skill=0.60000002;
+ text="HC";
+ init="this SetVariable [""addAllGroups"",false];";
+ };
+ };
+ };
+ class Item68
+ {
+ side="LOGIC";
+ class Vehicles
+ {
+ items=1;
+ class Item0
+ {
+ position[]={5408.0376,0.45808399,349.78986};
+ id=328;
+ side="LOGIC";
+ vehicle="ACE_AITalk_Logic";
+ leader=1;
+ lock="UNLOCKED";
+ skill=0.60000002;
+ };
+ };
+ };
+ class Item69
+ {
+ side="LOGIC";
+ class Vehicles
+ {
+ items=1;
+ class Item0
+ {
+ position[]={5344.1792,0.33804491,483.58673};
+ id=330;
+ side="LOGIC";
+ vehicle="ACE_CSW_AI";
+ leader=1;
+ lock="UNLOCKED";
+ skill=0.60000002;
+ };
+ };
+ };
+ class Item70
+ {
+ side="LOGIC";
+ class Vehicles
+ {
+ items=1;
+ class Item0
+ {
+ position[]={5412.5991,0.24247436,485.10822};
+ id=331;
+ side="LOGIC";
+ vehicle="ACE_ForceGroupMarkersOn_Logic";
+ leader=1;
+ lock="UNLOCKED";
+ skill=0.60000002;
+ };
+ };
+ };
+ class Item71
+ {
+ side="LOGIC";
+ class Vehicles
+ {
+ items=1;
+ class Item0
+ {
+ position[]={5403.4761,0.065649539,415.16974};
+ id=329;
+ side="LOGIC";
+ vehicle="ACE_Required_Logic";
+ leader=1;
+ lock="UNLOCKED";
+ skill=0.60000002;
+ };
+ };
+ };
+ class Item72
+ {
+ side="LOGIC";
+ class Vehicles
+ {
+ items=1;
+ class Item0
+ {
+ position[]={5345.6997,0.43284008,351.30939};
+ id=327;
+ side="LOGIC";
+ vehicle="ACE_RadioTalk_Logic";
+ leader=1;
+ lock="UNLOCKED";
+ skill=0.60000002;
+ };
+ };
+ };
+ };
+ class Vehicles
+ {
+ items=259;
+ class Item0
+ {
+ position[]={2279.6672,514.16913,15295.711};
+ id=16;
+ side="EMPTY";
+ vehicle="M1130_CV_EP1";
+ leader=1;
+ lock="LOCKED";
+ skill=0.60000002;
+ text="WestMHQ";
+ };
+ class Item1
+ {
+ position[]={32.080376,5.5757966,1589.9011};
+ id=17;
+ side="EMPTY";
+ vehicle="BTR90_HQ";
+ leader=1;
+ lock="LOCKED";
+ skill=0.60000002;
+ text="EastMHQ";
+ };
+ class Item2
+ {
+ position[]={4477.9771,297.82394,6309.0562};
+ id=44;
+ side="EMPTY";
+ vehicle="WarfareBDepot";
+ leader=1;
+ skill=0.60000002;
+ text="Pogorevka";
+ init="nullreturn = [this,""Pogorevka"",[""SmallTown"",""SmallTown2""]]ExecVM ""Server\Config\Config_Town.sqf""";
+ };
+ class Item3
+ {
+ position[]={4342.8047,302.37946,6531.9336};
+ azimut=35;
+ id=45;
+ side="EMPTY";
+ vehicle="WarfareBCamp";
+ leader=1;
+ skill=0.60000002;
+ text="PogorevkaCamp1";
+ init="nullreturn = [this,Pogorevka]ExecVM ""Common\Init\Init_Camp.sqf""";
+ };
+ class Item4
+ {
+ position[]={4421.9639,307.6821,6164.8999};
+ azimut=275;
+ id=46;
+ side="EMPTY";
+ vehicle="WarfareBCamp";
+ leader=1;
+ skill=0.60000002;
+ text="PogorevkaCamp2";
+ init="nullreturn = [this,Pogorevka]ExecVM ""Common\Init\Init_Camp.sqf""";
+ };
+ class Item5
+ {
+ position[]={2642.127,208.24202,5397.9873};
+ id=47;
+ side="EMPTY";
+ vehicle="WarfareBDepot";
+ leader=1;
+ skill=0.60000002;
+ text="Zelenogorsk";
+ init="nullreturn = [this,""Zelenogorsk"",[""HugeTown"",""HugeTown2""]]ExecVM ""Server\Config\Config_Town.sqf""";
+ };
+ class Item6
+ {
+ position[]={2946.9043,229.66312,5526.1582};
+ azimut=290;
+ id=48;
+ side="EMPTY";
+ vehicle="WarfareBCamp";
+ leader=1;
+ skill=0.60000002;
+ text="ZelenogorskCamp1";
+ init="nullreturn = [this,Zelenogorsk]ExecVM ""Common\Init\Init_Camp.sqf""";
+ };
+ class Item7
+ {
+ position[]={2642.2104,223.94844,5613.0103};
+ azimut=280;
+ id=49;
+ side="EMPTY";
+ vehicle="WarfareBCamp";
+ leader=1;
+ skill=0.60000002;
+ text="ZelenogorskCamp2";
+ init="nullreturn = [this,Zelenogorsk]ExecVM ""Common\Init\Init_Camp.sqf""";
+ };
+ class Item8
+ {
+ position[]={2632.8904,193.82336,5149.4673};
+ azimut=310;
+ id=50;
+ side="EMPTY";
+ vehicle="WarfareBCamp";
+ leader=1;
+ skill=0.60000002;
+ text="ZelenogorskCamp3";
+ init="nullreturn = [this,Zelenogorsk]ExecVM ""Common\Init\Init_Camp.sqf""";
+ };
+ class Item9
+ {
+ position[]={1915.0693,261,7439.3286};
+ azimut=340;
+ id=51;
+ side="EMPTY";
+ vehicle="WarfareBDepot";
+ leader=1;
+ skill=0.60000002;
+ text="Myshkino";
+ init="nullreturn = [this,""Myshkino"",[""SmallTown"",""SmallTown2"",""MediumTown""]]ExecVM ""Server\Config\Config_Town.sqf""";
+ };
+ class Item10
+ {
+ position[]={1886.7793,277.40427,7640.1333};
+ azimut=35;
+ id=52;
+ side="EMPTY";
+ vehicle="WarfareBCamp";
+ leader=1;
+ skill=0.60000002;
+ text="MyshkinoCamp1";
+ init="nullreturn = [this,Myshkino]ExecVM ""Common\Init\Init_Camp.sqf""";
+ };
+ class Item11
+ {
+ position[]={2139.9331,273.63467,7325.5557};
+ azimut=205;
+ id=53;
+ side="EMPTY";
+ vehicle="WarfareBCamp";
+ leader=1;
+ skill=0.60000002;
+ text="MyshkinoCamp2";
+ init="nullreturn = [this,Myshkino]ExecVM ""Common\Init\Init_Camp.sqf""";
+ };
+ class Item12
+ {
+ position[]={2786.8274,273.91406,9832.1201};
+ azimut=25;
+ id=54;
+ side="EMPTY";
+ vehicle="WarfareBDepot";
+ leader=1;
+ skill=0.60000002;
+ text="Lopatino";
+ init="nullreturn = [this,""Lopatino"",[""LargeTown"",""LargeTown2""]]ExecVM ""Server\Config\Config_Town.sqf""";
+ };
+ class Item13
+ {
+ position[]={2643.1428,262.41833,9830.417};
+ azimut=130;
+ id=55;
+ side="EMPTY";
+ vehicle="WarfareBCamp";
+ leader=1;
+ skill=0.60000002;
+ text="LopatinoCamp1";
+ init="nullreturn = [this,Lopatino]ExecVM ""Common\Init\Init_Camp.sqf""";
+ };
+ class Item14
+ {
+ position[]={2632.8035,274.38641,10100.606};
+ azimut=60;
+ id=56;
+ side="EMPTY";
+ vehicle="WarfareBCamp";
+ leader=1;
+ skill=0.60000002;
+ text="LopatinoCamp3";
+ init="nullreturn = [this,Lopatino]ExecVM ""Common\Init\Init_Camp.sqf""";
+ };
+ class Item15
+ {
+ position[]={2987.4236,288.27054,9993.3105};
+ azimut=170;
+ id=57;
+ side="EMPTY";
+ vehicle="WarfareBCamp";
+ leader=1;
+ skill=0.60000002;
+ text="LopatinoCamp2";
+ init="nullreturn = [this,Lopatino]ExecVM ""Common\Init\Init_Camp.sqf""";
+ };
+ class Item16
+ {
+ position[]={6221.5781,302.44672,7822.0952};
+ azimut=25;
+ id=58;
+ side="EMPTY";
+ vehicle="WarfareBDepot";
+ leader=1;
+ skill=0.60000002;
+ text="StarySobor";
+ init="nullreturn = [this,""Stary Sobor"",[""LargeTown"",""LargeTown2""]]ExecVM ""Server\Config\Config_Town.sqf""";
+ };
+ class Item17
+ {
+ position[]={5971.8433,311.85886,7662.7813};
+ azimut=130;
+ id=59;
+ side="EMPTY";
+ vehicle="WarfareBCamp";
+ leader=1;
+ skill=0.60000002;
+ text="StarySoborCamp1";
+ init="nullreturn = [this,StarySobor]ExecVM ""Common\Init\Init_Camp.sqf""";
+ };
+ class Item18
+ {
+ position[]={5920.0425,305.34766,7916.8018};
+ azimut=210;
+ id=60;
+ side="EMPTY";
+ vehicle="WarfareBCamp";
+ leader=1;
+ skill=0.60000002;
+ text="StarySoborCamp3";
+ init="nullreturn = [this,StarySobor]ExecVM ""Common\Init\Init_Camp.sqf""";
+ };
+ class Item19
+ {
+ position[]={6370.0352,288.08783,7553.3057};
+ azimut=325;
+ id=61;
+ side="EMPTY";
+ vehicle="WarfareBCamp";
+ leader=1;
+ skill=0.60000002;
+ text="StarySoborCamp2";
+ init="nullreturn = [this,StarySobor]ExecVM ""Common\Init\Init_Camp.sqf""";
+ };
+ class Item20
+ {
+ position[]={10060.962,245.03337,5439.7686};
+ azimut=25;
+ id=62;
+ side="EMPTY";
+ vehicle="WarfareBDepot";
+ leader=1;
+ skill=0.60000002;
+ text="Staroye";
+ init="nullreturn = [this,""Staroye"",[""LargeTown"",""LargeTown2""]]ExecVM ""Server\Config\Config_Town.sqf""";
+ };
+ class Item21
+ {
+ position[]={10023.556,261.80487,5721.707};
+ azimut=145;
+ id=63;
+ side="EMPTY";
+ vehicle="WarfareBCamp";
+ leader=1;
+ skill=0.60000002;
+ text="StaroyeCamp1";
+ init="nullreturn = [this,Staroye]ExecVM ""Common\Init\Init_Camp.sqf""";
+ };
+ class Item22
+ {
+ position[]={10196.152,228.03043,5214.835};
+ azimut=325;
+ id=64;
+ side="EMPTY";
+ vehicle="WarfareBCamp";
+ leader=1;
+ skill=0.60000002;
+ text="StaroyeCamp2";
+ init="nullreturn = [this,Staroye]ExecVM ""Common\Init\Init_Camp.sqf""";
+ };
+ class Item23
+ {
+ position[]={6832.8,0,2439.16}; //---{6837.5596,6,2429.0867};
+ azimut=51.3492; //---325;
+ id=65;
+ side="EMPTY";
+ vehicle="WarfareBDepot";
+ leader=1;
+ skill=0.60000002;
+ text="Chernogorsk";
+ init="nullreturn = [this,""Chernogorsk"",[""HugeTown"",""HugeTown2""]]ExecVM ""Server\Config\Config_Town.sqf""";
+ };
+ class Item24
+ {
+ position[]={7046.104,5.9788208,2677.2585};
+ azimut=140;
+ id=66;
+ side="EMPTY";
+ vehicle="WarfareBCamp";
+ leader=1;
+ skill=0.60000002;
+ text="ChernogorskCamp1";
+ init="nullreturn = [this,Chernogorsk]ExecVM ""Common\Init\Init_Camp.sqf""";
+ };
+ class Item25
+ {
+ position[]={6683.9048,6,2711.9219};
+ azimut=310;
+ id=67;
+ side="EMPTY";
+ vehicle="WarfareBCamp";
+ leader=1;
+ skill=0.60000002;
+ text="ChernogorskCamp2";
+ init="nullreturn = [this,Chernogorsk]ExecVM ""Common\Init\Init_Camp.sqf""";
+ };
+ class Item26
+ {
+ position[]={6629.7646,6,2481.8833};
+ azimut=310;
+ id=68;
+ side="EMPTY";
+ vehicle="WarfareBCamp";
+ leader=1;
+ skill=0.60000002;
+ text="ChernogorskCamp3";
+ init="nullreturn = [this,Chernogorsk]ExecVM ""Common\Init\Init_Camp.sqf""";
+ };
+ class Item27
+ {
+ position[]={3511.3979,7.3655467,2484.468};
+ azimut=340;
+ id=69;
+ side="EMPTY";
+ vehicle="WarfareBDepot";
+ leader=1;
+ skill=0.60000002;
+ text="Komarovo";
+ init="nullreturn = [this,""Komarovo"",[""MediumTown1Tank"",""MediumTown2Tank""]]ExecVM ""Server\Config\Config_Town.sqf""";
+ };
+ class Item28
+ {
+ position[]={3299.8735,42.496193,2550.9275};
+ azimut=125;
+ id=70;
+ side="EMPTY";
+ vehicle="WarfareBCamp";
+ leader=1;
+ skill=0.60000002;
+ text="KomarovoCamp1";
+ init="nullreturn = [this,Komarovo]ExecVM ""Common\Init\Init_Camp.sqf""";
+ };
+ class Item29
+ {
+ position[]={3812.8291,6.6377492,2537.2896};
+ azimut=210;
+ id=71;
+ side="EMPTY";
+ vehicle="WarfareBCamp";
+ leader=1;
+ skill=0.60000002;
+ text="KomarovoCamp2";
+ init="nullreturn = [this,Komarovo]ExecVM ""Common\Init\Init_Camp.sqf""";
+ };
+ class Item30
+ {
+ position[]={1754.4177,143.78271,3925.3511};
+ azimut=15;
+ id=72;
+ side="EMPTY";
+ vehicle="WarfareBDepot";
+ leader=1;
+ skill=0.60000002;
+ text="Pavlovo";
+ init="nullreturn = [this,""Pavlovo"",[""SmallTown"",""SmallTown2""]]ExecVM ""Server\Config\Config_Town.sqf""";
+ };
+ class Item31
+ {
+ position[]={1961.1923,144.21785,3876.0591};
+ azimut=15;
+ id=73;
+ side="EMPTY";
+ vehicle="WarfareBCamp";
+ leader=1;
+ skill=0.60000002;
+ text="PavlovoCamp1";
+ init="nullreturn = [this,Pavlovo]ExecVM ""Common\Init\Init_Camp.sqf""";
+ };
+ class Item32
+ {
+ position[]={1803.6259,156.66054,4096.1978};
+ azimut=215;
+ id=74;
+ side="EMPTY";
+ vehicle="WarfareBCamp";
+ leader=1;
+ skill=0.60000002;
+ text="PavlovoCamp2";
+ init="nullreturn = [this,Pavlovo]ExecVM ""Common\Init\Init_Camp.sqf""";
+ };
+ class Item33
+ {
+ position[]={3723.645,311.0553,8988.2559};
+ azimut=25;
+ id=75;
+ side="EMPTY";
+ vehicle="WarfareBDepot";
+ leader=1;
+ skill=0.60000002;
+ text="Vybor";
+ init="nullreturn = [this,""Vybor"",[""SmallTown"",""SmallTown2""]]ExecVM ""Server\Config\Config_Town.sqf""";
+ };
+ class Item34
+ {
+ position[]={3533.4512,310.28741,9096.6025};
+ azimut=130;
+ id=76;
+ side="EMPTY";
+ vehicle="WarfareBCamp";
+ leader=1;
+ skill=0.60000002;
+ text="VyborCamp1";
+ init="nullreturn = [this,Vybor]ExecVM ""Common\Init\Init_Camp.sqf""";
+ };
+ class Item35
+ {
+ position[]={4018.7769,316.40543,8812.6182};
+ azimut=15;
+ id=77;
+ side="EMPTY";
+ vehicle="WarfareBCamp";
+ leader=1;
+ skill=0.60000002;
+ text="VyborCamp2";
+ init="nullreturn = [this,Vybor]ExecVM ""Common\Init\Init_Camp.sqf""";
+ };
+ class Item36
+ {
+ position[]={10279.2,0,1969.84}; //---{10294.72,7.5709276,1966.49};
+ id=78;
+ side="EMPTY";
+ vehicle="WarfareBDepot";
+ leader=1;
+ skill=0.60000002;
+ text="Elektrozavodsk";
+ init="nullreturn = [this,""Elektrozavodsk"",[""HugeTown"",""HugeTown2""]]ExecVM ""Server\Config\Config_Town.sqf""";
+ };
+ class Item37
+ {
+ position[]={10080.383,6.0068431,1983.6292};
+ azimut=65;
+ id=79;
+ side="EMPTY";
+ vehicle="WarfareBCamp";
+ leader=1;
+ skill=0.60000002;
+ text="ElektrozavodskCamp1";
+ init="nullreturn = [this,Elektrozavodsk]ExecVM ""Common\Init\Init_Camp.sqf""";
+ };
+ class Item38
+ {
+ position[]={10515.144,6.4844017,2087.3098};
+ azimut=335;
+ id=80;
+ side="EMPTY";
+ vehicle="WarfareBCamp";
+ leader=1;
+ skill=0.60000002;
+ text="ElektrozavodskCamp2";
+ init="nullreturn = [this,Elektrozavodsk]ExecVM ""Common\Init\Init_Camp.sqf""";
+ };
+ class Item39
+ {
+ position[]={10251.672,5.5,2172.7104};
+ azimut=165;
+ id=81;
+ side="EMPTY";
+ vehicle="WarfareBCamp";
+ leader=1;
+ skill=0.60000002;
+ text="ElektrozavodskCamp3";
+ init="nullreturn = [this,Elektrozavodsk]ExecVM ""Common\Init\Init_Camp.sqf""";
+ };
+ class Item40
+ {
+ position[]={12124.9,0,9145.46}; //---{12139.822,51.275158,9112.7979};
+ azimut=42.9072; //---45;
+ id=82;
+ side="EMPTY";
+ vehicle="WarfareBDepot";
+ leader=1;
+ skill=0.60000002;
+ text="Berezino";
+ init="nullreturn = [this,""Berezino"",[""HugeTown"",""HugeTown2""]]ExecVM ""Server\Config\Config_Town.sqf""";
+ };
+ class Item41
+ {
+ position[]={12116.356,35.964066,9323.8252};
+ azimut=215;
+ id=83;
+ side="EMPTY";
+ vehicle="WarfareBCamp";
+ leader=1;
+ skill=0.60000002;
+ text="BerezinoCamp1";
+ init="nullreturn = [this,Berezino]ExecVM ""Common\Init\Init_Camp.sqf""";
+ };
+ class Item42
+ {
+ position[]={11907.419,69.18,8973.1328};
+ azimut=85;
+ id=84;
+ side="EMPTY";
+ vehicle="WarfareBCamp";
+ leader=1;
+ skill=0.60000002;
+ text="BerezinoCamp3";
+ init="nullreturn = [this,Berezino]ExecVM ""Common\Init\Init_Camp.sqf""";
+ };
+ class Item43
+ {
+ position[]={12289.691,34.194725,8982.9326};
+ azimut=35;
+ id=85;
+ side="EMPTY";
+ vehicle="WarfareBCamp";
+ leader=1;
+ skill=0.60000002;
+ text="BerezinoCamp2";
+ init="nullreturn = [this,Berezino]ExecVM ""Common\Init\Init_Camp.sqf""";
+ };
+ class Item44
+ {
+ position[]={10984.043,224.36505,12372.891};
+ id=86;
+ side="EMPTY";
+ vehicle="WarfareBDepot";
+ leader=1;
+ skill=0.60000002;
+ text="Krasnostav";
+ init="nullreturn = [this,""Krasnostav"",[""HugeTown"",""HugeTown2""]]ExecVM ""Server\Config\Config_Town.sqf""";
+ };
+ class Item45
+ {
+ position[]={11161.142,208.98,12375.062};
+ azimut=300;
+ id=87;
+ side="EMPTY";
+ vehicle="WarfareBCamp";
+ leader=1;
+ skill=0.60000002;
+ text="KrasnostavCamp1";
+ init="nullreturn = [this,Krasnostav]ExecVM ""Common\Init\Init_Camp.sqf""";
+ };
+ class Item46
+ {
+ position[]={10840.343,246.07083,12455.171};
+ azimut=95;
+ id=88;
+ side="EMPTY";
+ vehicle="WarfareBCamp";
+ leader=1;
+ skill=0.60000002;
+ text="KrasnostavCamp3";
+ init="nullreturn = [this,Krasnostav]ExecVM ""Common\Init\Init_Camp.sqf""";
+ };
+ class Item47
+ {
+ position[]={11063.167,211.19904,12237.583};
+ azimut=25;
+ id=89;
+ side="EMPTY";
+ vehicle="WarfareBCamp";
+ leader=1;
+ skill=0.60000002;
+ text="KrasnostavCamp2";
+ init="nullreturn = [this,Krasnostav]ExecVM ""Common\Init\Init_Camp.sqf""";
+ };
+ class Item48
+ {
+ position[]={9628.9951,300.89136,8866.2314};
+ azimut=25;
+ id=90;
+ side="EMPTY";
+ vehicle="WarfareBDepot";
+ leader=1;
+ skill=0.60000002;
+ text="Gorka";
+ init="nullreturn = [this,""Gorka"",[""LargeTown"",""LargeTown2""]]ExecVM ""Server\Config\Config_Town.sqf""";
+ };
+ class Item49
+ {
+ position[]={9470.6709,303.89478,8759.4014};
+ azimut=95;
+ id=91;
+ side="EMPTY";
+ vehicle="WarfareBCamp";
+ leader=1;
+ skill=0.60000002;
+ text="GorkaCamp1";
+ init="nullreturn = [this,Gorka]ExecVM ""Common\Init\Init_Camp.sqf""";
+ };
+ class Item50
+ {
+ position[]={9808.1191,290.45346,8822.7939};
+ azimut=5;
+ id=92;
+ side="EMPTY";
+ vehicle="WarfareBCamp";
+ leader=1;
+ skill=0.60000002;
+ text="GorkaCamp2";
+ init="nullreturn = [this,Gorka]ExecVM ""Common\Init\Init_Camp.sqf""";
+ };
+ class Item51
+ {
+ position[]={6075.9307,267.13733,10378.045};
+ azimut=25;
+ id=93;
+ side="EMPTY";
+ vehicle="WarfareBDepot";
+ leader=1;
+ skill=0.60000002;
+ text="Grishino";
+ init="nullreturn = [this,""Grishino"",[""LargeTown"",""LargeTown2""]]ExecVM ""Server\Config\Config_Town.sqf""";
+ };
+ class Item52
+ {
+ position[]={5941.4014,273.24481,10228.306};
+ azimut=130;
+ id=94;
+ side="EMPTY";
+ vehicle="WarfareBCamp";
+ leader=1;
+ skill=0.60000002;
+ text="GrishinoCamp1";
+ init="nullreturn = [this,Grishino]ExecVM ""Common\Init\Init_Camp.sqf""";
+ };
+ class Item53
+ {
+ position[]={6042.9541,267.01157,10542.833};
+ azimut=200;
+ id=95;
+ side="EMPTY";
+ vehicle="WarfareBCamp";
+ leader=1;
+ skill=0.60000002;
+ text="GrishinoCamp3";
+ init="nullreturn = [this,Grishino]ExecVM ""Common\Init\Init_Camp.sqf""";
+ };
+ class Item54
+ {
+ position[]={6328.2217,285.05475,10409.273};
+ azimut=300;
+ id=96;
+ side="EMPTY";
+ vehicle="WarfareBCamp";
+ leader=1;
+ skill=0.60000002;
+ text="GrishinoCamp2";
+ init="nullreturn = [this,Grishino]ExecVM ""Common\Init\Init_Camp.sqf""";
+ };
+ class Item55
+ {
+ position[]={6531.417,321.97882,6151.2778};
+ id=97;
+ side="EMPTY";
+ vehicle="WarfareBDepot";
+ leader=1;
+ skill=0.60000002;
+ text="Vyshnoye";
+ init="nullreturn = [this,""Vyshnoye"",[""SmallTown"",""SmallTown2""]]ExecVM ""Server\Config\Config_Town.sqf""";
+ };
+ class Item56
+ {
+ position[]={6379.3486,321.48126,6207.8149};
+ azimut=235;
+ id=98;
+ side="EMPTY";
+ vehicle="WarfareBCamp";
+ leader=1;
+ skill=0.60000002;
+ text="VyshnoyeCamp1";
+ init="nullreturn = [this,Vyshnoye]ExecVM ""Common\Init\Init_Camp.sqf""";
+ };
+ class Item57
+ {
+ position[]={6583.5454,319.47733,5979.9531};
+ azimut=240;
+ id=99;
+ side="EMPTY";
+ vehicle="WarfareBCamp";
+ leader=1;
+ skill=0.60000002;
+ text="VyshnoyeCamp2";
+ init="nullreturn = [this,Vyshnoye]ExecVM ""Common\Init\Init_Camp.sqf""";
+ };
+ class Item58
+ {
+ position[]={4982.8286,181.10001,12593.552};
+ id=100;
+ side="EMPTY";
+ vehicle="WarfareBDepot";
+ leader=1;
+ skill=0.60000002;
+ text="Petrovka";
+ init="nullreturn = [this,""Petrovka"",[""SmallTown"",""SmallTown2""]]ExecVM ""Server\Config\Config_Town.sqf""";
+ };
+ class Item59
+ {
+ position[]={4839.3828,191.32724,12522.885};
+ azimut=290;
+ id=101;
+ side="EMPTY";
+ vehicle="WarfareBCamp";
+ leader=1;
+ skill=0.60000002;
+ text="PetrovkaCamp1";
+ init="nullreturn = [this,Petrovka]ExecVM ""Common\Init\Init_Camp.sqf""";
+ };
+ class Item60
+ {
+ position[]={5038.2002,181.9904,12463.507};
+ azimut=205;
+ id=102;
+ side="EMPTY";
+ vehicle="WarfareBCamp";
+ leader=1;
+ skill=0.60000002;
+ text="PetrovkaCamp2";
+ init="nullreturn = [this,Petrovka]ExecVM ""Common\Init\Init_Camp.sqf""";
+ };
+ class Item61
+ {
+ position[]={9110.5088,224.0808,3808.729};
+ id=103;
+ side="EMPTY";
+ vehicle="WarfareBDepot";
+ leader=1;
+ skill=0.60000002;
+ text="Pusta";
+ init="nullreturn = [this,""Pusta"",[""SmallTown"",""SmallTown2""]]ExecVM ""Server\Config\Config_Town.sqf""";
+ };
+ class Item62
+ {
+ position[]={8987.0693,243.9704,3907.9685};
+ azimut=120;
+ id=104;
+ side="EMPTY";
+ vehicle="WarfareBCamp";
+ leader=1;
+ skill=0.60000002;
+ text="PustaCamp1";
+ init="nullreturn = [this,Pusta]ExecVM ""Common\Init\Init_Camp.sqf""";
+ };
+ class Item63
+ {
+ position[]={9174.21,212.59642,3664.9646};
+ azimut=45;
+ id=105;
+ side="EMPTY";
+ vehicle="WarfareBCamp";
+ leader=1;
+ skill=0.60000002;
+ text="PustaCamp2";
+ init="nullreturn = [this,Pusta]ExecVM ""Common\Init\Init_Camp.sqf""";
+ };
+ class Item64
+ {
+ position[]={11958.184,6.0472469,3523.6875};
+ azimut=350;
+ id=106;
+ side="EMPTY";
+ vehicle="WarfareBDepot";
+ leader=1;
+ skill=0.60000002;
+ text="Kamyshovo";
+ init="nullreturn = [this,""Kamyshovo"",[""MediumTown"",""MediumTown2""]]ExecVM ""Server\Config\Config_Town.sqf""";
+ };
+ class Item65
+ {
+ position[]={12167.021,5.694561,3533.7886};
+ azimut=185;
+ id=107;
+ side="EMPTY";
+ vehicle="WarfareBCamp";
+ leader=1;
+ skill=0.60000002;
+ text="KamyshovoCamp1";
+ init="nullreturn = [this,Kamyshovo]ExecVM ""Common\Init\Init_Camp.sqf""";
+ };
+ class Item66
+ {
+ position[]={11878.9,6.1340494,3477.5044};
+ azimut=255;
+ id=108;
+ side="EMPTY";
+ vehicle="WarfareBCamp";
+ leader=1;
+ skill=0.60000002;
+ text="KamyshovoCamp2";
+ init="nullreturn = [this,Kamyshovo]ExecVM ""Common\Init\Init_Camp.sqf""";
+ };
+ class Item67
+ {
+ position[]={13405.308,6.513433,6178.1831};
+ azimut=25;
+ id=109;
+ side="EMPTY";
+ vehicle="WarfareBDepot";
+ leader=1;
+ skill=0.60000002;
+ text="Solnichniy";
+ init="nullreturn = [this,""Solnichniy"",[""LargeTown"",""LargeTown2""]]ExecVM ""Server\Config\Config_Town.sqf""";
+ };
+ class Item68
+ {
+ position[]={13385.896,5.3937674,6338.4067};
+ azimut=190;
+ id=110;
+ side="EMPTY";
+ vehicle="WarfareBCamp";
+ leader=1;
+ skill=0.60000002;
+ text="SolnichniyCamp1";
+ init="nullreturn = [this,Solnichniy]ExecVM ""Common\Init\Init_Camp.sqf""";
+ };
+ class Item69
+ {
+ position[]={13417.353,5.8442068,6046.0645};
+ azimut=5;
+ id=111;
+ side="EMPTY";
+ vehicle="WarfareBCamp";
+ leader=1;
+ skill=0.60000002;
+ text="SolnichniyCamp2";
+ init="nullreturn = [this,Solnichniy]ExecVM ""Common\Init\Init_Camp.sqf""";
+ };
+ class Item70
+ {
+ position[]={11268.56,77.493439,6593.7051};
+ azimut=350;
+ id=112;
+ side="EMPTY";
+ vehicle="WarfareBDepot";
+ leader=1;
+ skill=0.60000002;
+ text="Dolina";
+ init="nullreturn = [this,""Dolina"",[""SmallTown"",""SmallTown2""]]ExecVM ""Server\Config\Config_Town.sqf""";
+ };
+ class Item71
+ {
+ position[]={11450.037,66.986862,6597.3062};
+ azimut=345;
+ id=113;
+ side="EMPTY";
+ vehicle="WarfareBCamp";
+ leader=1;
+ skill=0.60000002;
+ text="DolinaCamp1";
+ init="nullreturn = [this,Dolina]ExecVM ""Common\Init\Init_Camp.sqf""";
+ };
+ class Item72
+ {
+ position[]={11082.161,94.247612,6669.2539};
+ azimut=10;
+ id=114;
+ side="EMPTY";
+ vehicle="WarfareBCamp";
+ leader=1;
+ skill=0.60000002;
+ text="DolinaCamp2";
+ init="nullreturn = [this,Dolina]ExecVM ""Common\Init\Init_Camp.sqf""";
+ };
+ class Item73
+ {
+ position[]={8414.3311,355.53598,6738.1626};
+ azimut=15;
+ id=115;
+ side="EMPTY";
+ vehicle="WarfareBDepot";
+ leader=1;
+ skill=0.60000002;
+ text="Guglovo";
+ init="nullreturn = [this,""Guglovo"",[""SmallTown"",""SmallTown2""]]ExecVM ""Server\Config\Config_Town.sqf""";
+ };
+ class Item74
+ {
+ position[]={8594.7881,351.72009,6639.0508};
+ azimut=35;
+ id=116;
+ side="EMPTY";
+ vehicle="WarfareBCamp";
+ leader=1;
+ skill=0.60000002;
+ text="GuglovoCamp1";
+ init="nullreturn = [this,Guglovo]ExecVM ""Common\Init\Init_Camp.sqf""";
+ };
+ class Item75
+ {
+ position[]={8297.9277,354.79898,6852.6816};
+ azimut=65;
+ id=117;
+ side="EMPTY";
+ vehicle="WarfareBCamp";
+ leader=1;
+ skill=0.60000002;
+ text="GuglovoCamp2";
+ init="nullreturn = [this,Guglovo]ExecVM ""Common\Init\Init_Camp.sqf""";
+ };
+ class Item76
+ {
+ position[]={10492.2,0,9832.32}; //---{10498.486,112.32002,9823.6416};
+ azimut=24.1052; //---25;
+ id=118;
+ side="EMPTY";
+ vehicle="WarfareBDepot";
+ leader=1;
+ skill=0.60000002;
+ text="Dubrovka";
+ init="nullreturn = [this,""Dubrovka"",[""SmallTown"",""SmallTown2""]]ExecVM ""Server\Config\Config_Town.sqf""";
+ };
+ class Item77
+ {
+ position[]={10246.682,141.60332,9845.7695};
+ azimut=305;
+ id=119;
+ side="EMPTY";
+ vehicle="WarfareBCamp";
+ leader=1;
+ skill=0.60000002;
+ text="DubrovkaCamp1";
+ init="nullreturn = [this,Dubrovka]ExecVM ""Common\Init\Init_Camp.sqf""";
+ };
+ class Item78
+ {
+ position[]={10590.66,102.25282,9982.332};
+ azimut=130;
+ id=120;
+ side="EMPTY";
+ vehicle="WarfareBCamp";
+ leader=1;
+ skill=0.60000002;
+ text="DubrovkaCamp2";
+ init="nullreturn = [this,Dubrovka]ExecVM ""Common\Init\Init_Camp.sqf""";
+ };
+ class Item79
+ {
+ position[]={8638.666,185.90526,11945.961};
+ id=121;
+ side="EMPTY";
+ vehicle="WarfareBDepot";
+ leader=1;
+ skill=0.60000002;
+ text="Gvozdno";
+ init="nullreturn = [this,""Gvozdno"",[""SmallTown"",""SmallTown2""]]ExecVM ""Server\Config\Config_Town.sqf""";
+ };
+ class Item80
+ {
+ position[]={8525.1875,169.67285,12009.082};
+ azimut=130;
+ id=122;
+ side="EMPTY";
+ vehicle="WarfareBCamp";
+ leader=1;
+ skill=0.60000002;
+ text="GvozdnoCamp1";
+ init="nullreturn = [this,Gvozdno]ExecVM ""Common\Init\Init_Camp.sqf""";
+ };
+ class Item81
+ {
+ position[]={8693.1387,197.09631,11850.37};
+ azimut=290;
+ id=123;
+ side="EMPTY";
+ vehicle="WarfareBCamp";
+ leader=1;
+ skill=0.60000002;
+ text="GvozdnoCamp2";
+ init="nullreturn = [this,Gvozdno]ExecVM ""Common\Init\Init_Camp.sqf""";
+ };
+ class Item82
+ {
+ position[]={5423.4634,329.59909,8616.3135};
+ id=145;
+ side="EMPTY";
+ vehicle="WarfareBDepot";
+ leader=1;
+ skill=0.60000002;
+ text="Kabanino";
+ init="nullreturn = [this,""Kabanino"",[""MediumTown1Tank"",""MediumTown2Tank""]]ExecVM ""Server\Config\Config_Town.sqf""";
+ };
+ class Item83
+ {
+ position[]={5436.1904,335.728,8441.9199};
+ azimut=340;
+ id=146;
+ side="EMPTY";
+ vehicle="WarfareBCamp";
+ leader=1;
+ skill=0.60000002;
+ text="KabaninoCamp1";
+ init="nullreturn = [this,Kabanino]ExecVM ""Common\Init\Init_Camp.sqf""";
+ };
+ class Item84
+ {
+ position[]={5166.1211,344.93253,8631.6191};
+ azimut=105;
+ id=147;
+ side="EMPTY";
+ vehicle="WarfareBCamp";
+ leader=1;
+ skill=0.60000002;
+ text="KabaninoCamp2";
+ init="nullreturn = [this,Kabanino]ExecVM ""Common\Init\Init_Camp.sqf""";
+ };
+ class Item85
+ {
+ position[]={5923.6182,147.44853,4726.4121};
+ azimut=345;
+ id=148;
+ side="EMPTY";
+ vehicle="WarfareBDepot";
+ leader=1;
+ skill=0.60000002;
+ text="Nadezhdino";
+ init="nullreturn = [this,""Nadezhdino"",[""MediumTown1Tank"",""MediumTown2Tank""]]ExecVM ""Server\Config\Config_Town.sqf""";
+ };
+ class Item86
+ {
+ position[]={5801.4014,127.2731,4817.0259};
+ azimut=205;
+ id=149;
+ side="EMPTY";
+ vehicle="WarfareBCamp";
+ leader=1;
+ skill=0.60000002;
+ text="NadezhdinoCamp1";
+ init="nullreturn = [this,Nadezhdino]ExecVM ""Common\Init\Init_Camp.sqf""";
+ };
+ class Item87
+ {
+ position[]={5792.2573,122.04984,4638.3184};
+ azimut=270;
+ id=150;
+ side="EMPTY";
+ vehicle="WarfareBCamp";
+ leader=1;
+ skill=0.60000002;
+ text="NadezhdinoCamp2";
+ init="nullreturn = [this,Nadezhdino]ExecVM ""Common\Init\Init_Camp.sqf""";
+ };
+ class Item88
+ {
+ position[]={2656.9553,223.34067,5623.4517};
+ azimut=15;
+ id=151;
+ side="EMPTY";
+ vehicle="GUE_WarfareBMGNest_PK";
+ leader=1;
+ skill=0.60000002;
+ };
+ class Item89
+ {
+ position[]={2956.5398,231.42558,5487.0576};
+ azimut=70;
+ id=152;
+ side="EMPTY";
+ vehicle="GUE_WarfareBMGNest_PK";
+ leader=1;
+ skill=0.60000002;
+ };
+ class Item90
+ {
+ position[]={2562.8469,194,5052.2905};
+ azimut=225;
+ id=153;
+ side="EMPTY";
+ vehicle="GUE_WarfareBMGNest_PK";
+ leader=1;
+ skill=0.60000002;
+ };
+ class Item91
+ {
+ position[]={2154.7144,274.39597,7312.0205};
+ azimut=140;
+ id=154;
+ side="EMPTY";
+ vehicle="GUE_WarfareBMGNest_PK";
+ leader=1;
+ skill=0.60000002;
+ };
+ class Item92
+ {
+ position[]={1885.5209,279.63141,7660.9639};
+ id=155;
+ side="EMPTY";
+ vehicle="GUE_WarfareBMGNest_PK";
+ leader=1;
+ skill=0.60000002;
+ };
+ class Item93
+ {
+ position[]={2592.5486,261.30759,9843.8906};
+ azimut=200;
+ id=156;
+ side="EMPTY";
+ vehicle="GUE_WarfareBMGNest_PK";
+ leader=1;
+ skill=0.60000002;
+ };
+ class Item94
+ {
+ position[]={2598.762,277.28113,10155.888};
+ azimut=320;
+ id=157;
+ side="EMPTY";
+ vehicle="GUE_WarfareBMGNest_PK";
+ leader=1;
+ skill=0.60000002;
+ };
+ class Item95
+ {
+ position[]={3010.7478,289.86206,9996.3936};
+ azimut=80;
+ id=158;
+ side="EMPTY";
+ vehicle="GUE_WarfareBMGNest_PK";
+ leader=1;
+ skill=0.60000002;
+ };
+ class Item96
+ {
+ position[]={3556.1821,313.57275,9139.8643};
+ azimut=265;
+ id=159;
+ side="EMPTY";
+ vehicle="GUE_WarfareBMGNest_PK";
+ leader=1;
+ skill=0.60000002;
+ };
+ class Item97
+ {
+ position[]={4034.2031,316.94287,8808.5928};
+ azimut=110;
+ id=160;
+ side="EMPTY";
+ vehicle="GUE_WarfareBMGNest_PK";
+ leader=1;
+ skill=0.60000002;
+ };
+ class Item98
+ {
+ position[]={4252.5649,305.58783,6566.0864};
+ azimut=295;
+ id=161;
+ side="EMPTY";
+ vehicle="GUE_WarfareBMGNest_PK";
+ leader=1;
+ skill=0.60000002;
+ };
+ class Item99
+ {
+ position[]={4386.5073,309.58032,6089.9155};
+ azimut=175;
+ id=162;
+ side="EMPTY";
+ vehicle="GUE_WarfareBMGNest_PK";
+ leader=1;
+ skill=0.60000002;
+ };
+ class Item100
+ {
+ position[]={4661.6665,278.23395,6418.4136};
+ azimut=70;
+ id=163;
+ side="EMPTY";
+ vehicle="GUE_WarfareBMGNest_PK";
+ leader=1;
+ skill=0.60000002;
+ };
+ class Item101
+ {
+ position[]={1965.1675,141.55298,3822.8726};
+ azimut=100;
+ id=164;
+ side="EMPTY";
+ vehicle="GUE_WarfareBMGNest_PK";
+ leader=1;
+ skill=0.60000002;
+ };
+ class Item102
+ {
+ position[]={1771.4114,156.55231,4112.3765};
+ azimut=30;
+ id=165;
+ side="EMPTY";
+ vehicle="GUE_WarfareBMGNest_PK";
+ leader=1;
+ skill=0.60000002;
+ };
+ class Item103
+ {
+ position[]={3359.7708,32.18367,2555.9207};
+ azimut=270;
+ id=166;
+ side="EMPTY";
+ vehicle="GUE_WarfareBMGNest_PK";
+ leader=1;
+ skill=0.60000002;
+ };
+ class Item104
+ {
+ position[]={3767.8804,7.0188355,2553.386};
+ azimut=70;
+ id=167;
+ side="EMPTY";
+ vehicle="GUE_WarfareBMGNest_PK";
+ leader=1;
+ skill=0.60000002;
+ };
+ class Item105
+ {
+ position[]={6686.313,6,2500.1599};
+ azimut=305;
+ id=168;
+ side="EMPTY";
+ vehicle="GUE_WarfareBMGNest_PK";
+ leader=1;
+ skill=0.60000002;
+ };
+ class Item106
+ {
+ position[]={6568.3618,7.8389273,2474.0371};
+ azimut=250;
+ id=169;
+ side="EMPTY";
+ vehicle="GUE_WarfareBMGNest_PK";
+ leader=1;
+ skill=0.60000002;
+ };
+ class Item107
+ {
+ position[]={6832.2964,6,2323.9148};
+ azimut=250;
+ id=170;
+ side="EMPTY";
+ vehicle="GUE_WarfareBMGNest_PK";
+ leader=1;
+ skill=0.60000002;
+ };
+ class Item108
+ {
+ position[]={6911.9668,6.0127869,2412.1548};
+ azimut=45;
+ id=171;
+ side="EMPTY";
+ vehicle="GUE_WarfareBMGNest_PK";
+ leader=1;
+ skill=0.60000002;
+ };
+ class Item109
+ {
+ position[]={6955.9932,5.9788208,2597.6838};
+ azimut=45;
+ id=172;
+ side="EMPTY";
+ vehicle="GUE_WarfareBMGNest_PK";
+ leader=1;
+ skill=0.60000002;
+ };
+ class Item110
+ {
+ position[]={6764.4629,6,2683.9465};
+ azimut=310;
+ id=173;
+ side="EMPTY";
+ vehicle="GUE_WarfareBMGNest_PK";
+ leader=1;
+ skill=0.60000002;
+ };
+ class Item111
+ {
+ position[]={5855.0317,138.43744,4649.2466};
+ azimut=175;
+ id=174;
+ side="EMPTY";
+ vehicle="GUE_WarfareBMGNest_PK";
+ leader=1;
+ skill=0.60000002;
+ };
+ class Item112
+ {
+ position[]={5896.457,135.78566,4877.459};
+ azimut=325;
+ id=175;
+ side="EMPTY";
+ vehicle="GUE_WarfareBMGNest_PK";
+ leader=1;
+ skill=0.60000002;
+ };
+ class Item113
+ {
+ position[]={6623.5469,322.78128,5966.1338};
+ azimut=170;
+ id=176;
+ side="EMPTY";
+ vehicle="GUE_WarfareBMGNest_PK";
+ leader=1;
+ skill=0.60000002;
+ };
+ class Item114
+ {
+ position[]={6359.9312,321.06989,6225.2344};
+ azimut=315;
+ id=177;
+ side="EMPTY";
+ vehicle="GUE_WarfareBMGNest_PK";
+ leader=1;
+ skill=0.60000002;
+ };
+ class Item115
+ {
+ position[]={6410.7793,286.8154,7540.4082};
+ azimut=100;
+ id=178;
+ side="EMPTY";
+ vehicle="GUE_WarfareBMGNest_PK";
+ leader=1;
+ skill=0.60000002;
+ };
+ class Item116
+ {
+ position[]={5984.1846,312.14703,7627.3643};
+ azimut=225;
+ id=179;
+ side="EMPTY";
+ vehicle="GUE_WarfareBMGNest_PK";
+ leader=1;
+ skill=0.60000002;
+ };
+ class Item117
+ {
+ position[]={5932.1558,307.2363,8009.0234};
+ azimut=320;
+ id=180;
+ side="EMPTY";
+ vehicle="GUE_WarfareBMGNest_PK";
+ leader=1;
+ skill=0.60000002;
+ };
+ class Item118
+ {
+ position[]={5475.3853,336.78528,8384.624};
+ azimut=135;
+ id=181;
+ side="EMPTY";
+ vehicle="GUE_WarfareBMGNest_PK";
+ leader=1;
+ skill=0.60000002;
+ };
+ class Item119
+ {
+ position[]={5145.1694,345.64294,8632.4463};
+ azimut=280;
+ id=182;
+ side="EMPTY";
+ vehicle="GUE_WarfareBMGNest_PK";
+ leader=1;
+ skill=0.60000002;
+ };
+ class Item120
+ {
+ position[]={5165.0415,347.4971,8567.1895};
+ azimut=215;
+ id=183;
+ side="EMPTY";
+ vehicle="GUE_WarfareBMGNest_PK";
+ leader=1;
+ skill=0.60000002;
+ };
+ class Item121
+ {
+ position[]={5309.6318,337.56104,8750.918};
+ azimut=15;
+ id=184;
+ side="EMPTY";
+ vehicle="GUE_WarfareBMGNest_PK";
+ leader=1;
+ skill=0.60000002;
+ };
+ class Item122
+ {
+ position[]={6035.5381,277.37009,10244.18};
+ azimut=210;
+ id=185;
+ side="EMPTY";
+ vehicle="GUE_WarfareBMGNest_PK";
+ leader=1;
+ skill=0.60000002;
+ };
+ class Item123
+ {
+ position[]={5905.6406,269.04739,10310.101};
+ azimut=180;
+ id=186;
+ side="EMPTY";
+ vehicle="GUE_WarfareBMGNest_PK";
+ leader=1;
+ skill=0.60000002;
+ };
+ class Item124
+ {
+ position[]={6341.5581,286.47903,10397.969};
+ azimut=125;
+ id=187;
+ side="EMPTY";
+ vehicle="GUE_WarfareBMGNest_PK";
+ leader=1;
+ skill=0.60000002;
+ };
+ class Item125
+ {
+ position[]={6089.3013,260.62198,10579.352};
+ azimut=25;
+ id=188;
+ side="EMPTY";
+ vehicle="GUE_WarfareBMGNest_PK";
+ leader=1;
+ skill=0.60000002;
+ };
+ class Item126
+ {
+ position[]={6021.7593,267.01886,10548.622};
+ azimut=320;
+ id=189;
+ side="EMPTY";
+ vehicle="GUE_WarfareBMGNest_PK";
+ leader=1;
+ skill=0.60000002;
+ };
+ class Item127
+ {
+ position[]={5084.9106,181.93442,12465.762};
+ azimut=110;
+ id=190;
+ side="EMPTY";
+ vehicle="GUE_WarfareBMGNest_PK";
+ leader=1;
+ skill=0.60000002;
+ };
+ class Item128
+ {
+ position[]={4895.3877,183.689,12536.536};
+ azimut=240;
+ id=191;
+ side="EMPTY";
+ vehicle="GUE_WarfareBMGNest_PK";
+ leader=1;
+ skill=0.60000002;
+ };
+ class Item129
+ {
+ position[]={8516.0986,170.03969,11996.102};
+ azimut=315;
+ id=192;
+ side="EMPTY";
+ vehicle="GUE_WarfareBMGNest_PK";
+ leader=1;
+ skill=0.60000002;
+ };
+ class Item130
+ {
+ position[]={8706.501,198.77245,11831.329};
+ azimut=160;
+ id=193;
+ side="EMPTY";
+ vehicle="GUE_WarfareBMGNest_PK";
+ leader=1;
+ skill=0.60000002;
+ };
+ class Item131
+ {
+ position[]={8717.1934,197.90926,11853.479};
+ azimut=95;
+ id=194;
+ side="EMPTY";
+ vehicle="GUE_WarfareBMGNest_PK";
+ leader=1;
+ skill=0.60000002;
+ };
+ class Item132
+ {
+ position[]={8976.2217,247.39439,3923.4004};
+ azimut=320;
+ id=195;
+ side="EMPTY";
+ vehicle="GUE_WarfareBMGNest_PK";
+ leader=1;
+ skill=0.60000002;
+ };
+ class Item133
+ {
+ position[]={9180.0361,212.37088,3651.3535};
+ azimut=115;
+ id=196;
+ side="EMPTY";
+ vehicle="GUE_WarfareBMGNest_PK";
+ leader=1;
+ skill=0.60000002;
+ };
+ class Item134
+ {
+ position[]={9965.9805,6.1737323,2044.6128};
+ azimut=265;
+ id=197;
+ side="EMPTY";
+ vehicle="GUE_WarfareBMGNest_PK";
+ leader=1;
+ skill=0.60000002;
+ };
+ class Item135
+ {
+ position[]={10273.424,5.5,2163.7937};
+ azimut=90;
+ id=198;
+ side="EMPTY";
+ vehicle="GUE_WarfareBMGNest_PK";
+ leader=1;
+ skill=0.60000002;
+ };
+ class Item136
+ {
+ position[]={10484.84,6,2141.0793};
+ azimut=45;
+ id=199;
+ side="EMPTY";
+ vehicle="GUE_WarfareBMGNest_PK";
+ leader=1;
+ skill=0.60000002;
+ };
+ class Item137
+ {
+ position[]={10504.094,6.6875129,2002.3174};
+ azimut=325;
+ id=200;
+ side="EMPTY";
+ vehicle="GUE_WarfareBMGNest_PK";
+ leader=1;
+ skill=0.60000002;
+ };
+ class Item138
+ {
+ position[]={11855.327,6.1680822,3473.3455};
+ azimut=240;
+ id=201;
+ side="EMPTY";
+ vehicle="GUE_WarfareBMGNest_PK";
+ leader=1;
+ skill=0.60000002;
+ };
+ class Item139
+ {
+ position[]={12275.196,5.6228251,3530.1814};
+ azimut=85;
+ id=202;
+ side="EMPTY";
+ vehicle="GUE_WarfareBMGNest_PK";
+ leader=1;
+ skill=0.60000002;
+ };
+ class Item140
+ {
+ position[]={10172.329,228.76598,5179.2192};
+ azimut=110;
+ id=203;
+ side="EMPTY";
+ vehicle="GUE_WarfareBMGNest_PK";
+ leader=1;
+ skill=0.60000002;
+ };
+ class Item141
+ {
+ position[]={9984.4082,264.67838,5704.7271};
+ azimut=345;
+ id=204;
+ side="EMPTY";
+ vehicle="GUE_WarfareBMGNest_PK";
+ leader=1;
+ skill=0.60000002;
+ };
+ class Item142
+ {
+ position[]={10039.283,261.02878,5732.2744};
+ azimut=70;
+ id=205;
+ side="EMPTY";
+ vehicle="GUE_WarfareBMGNest_PK";
+ leader=1;
+ skill=0.60000002;
+ };
+ class Item143
+ {
+ position[]={8200.8682,355.81601,6894.5513};
+ azimut=305;
+ id=206;
+ side="EMPTY";
+ vehicle="GUE_WarfareBMGNest_PK";
+ leader=1;
+ skill=0.60000002;
+ };
+ class Item144
+ {
+ position[]={8580.6631,352.65054,6614.8564};
+ azimut=125;
+ id=207;
+ side="EMPTY";
+ vehicle="GUE_WarfareBMGNest_PK";
+ leader=1;
+ skill=0.60000002;
+ };
+ class Item145
+ {
+ position[]={11059.541,102.34061,6724.8613};
+ azimut=235;
+ id=208;
+ side="EMPTY";
+ vehicle="GUE_WarfareBMGNest_PK";
+ leader=1;
+ skill=0.60000002;
+ };
+ class Item146
+ {
+ position[]={11425.106,67.069527,6560.707};
+ azimut=80;
+ id=209;
+ side="EMPTY";
+ vehicle="GUE_WarfareBMGNest_PK";
+ leader=1;
+ skill=0.60000002;
+ };
+ class Item147
+ {
+ position[]={13433.517,5.7098341,5946.0361};
+ azimut=200;
+ id=210;
+ side="EMPTY";
+ vehicle="GUE_WarfareBMGNest_PK";
+ leader=1;
+ skill=0.60000002;
+ };
+ class Item148
+ {
+ position[]={13450.531,5.9046516,6391.6201};
+ azimut=350;
+ id=211;
+ side="EMPTY";
+ vehicle="GUE_WarfareBMGNest_PK";
+ leader=1;
+ skill=0.60000002;
+ };
+ class Item149
+ {
+ position[]={13177.125,6.8234382,6246.0068};
+ azimut=280;
+ id=212;
+ side="EMPTY";
+ vehicle="GUE_WarfareBMGNest_PK";
+ leader=1;
+ skill=0.60000002;
+ };
+ class Item150
+ {
+ position[]={9461.6299,303.37973,8741.4639};
+ azimut=220;
+ id=213;
+ side="EMPTY";
+ vehicle="GUE_WarfareBMGNest_PK";
+ leader=1;
+ skill=0.60000002;
+ };
+ class Item151
+ {
+ position[]={9825.6738,288.93936,8791.7705};
+ azimut=75;
+ id=214;
+ side="EMPTY";
+ vehicle="GUE_WarfareBMGNest_PK";
+ leader=1;
+ skill=0.60000002;
+ };
+ class Item152
+ {
+ position[]={9393.0752,309.3732,8818.7236};
+ azimut=300;
+ id=215;
+ side="EMPTY";
+ vehicle="GUE_WarfareBMGNest_PK";
+ leader=1;
+ skill=0.60000002;
+ };
+ class Item153
+ {
+ position[]={10256.854,140.20197,9856.584};
+ azimut=40;
+ id=216;
+ side="EMPTY";
+ vehicle="GUE_WarfareBMGNest_PK";
+ leader=1;
+ skill=0.60000002;
+ };
+ class Item154
+ {
+ position[]={10261.915,140.3914,9827.6611};
+ azimut=190;
+ id=217;
+ side="EMPTY";
+ vehicle="GUE_WarfareBMGNest_PK";
+ leader=1;
+ skill=0.60000002;
+ };
+ class Item155
+ {
+ position[]={10429.358,119.04407,10002.104};
+ azimut=35;
+ id=218;
+ side="EMPTY";
+ vehicle="GUE_WarfareBMGNest_PK";
+ leader=1;
+ skill=0.60000002;
+ };
+ class Item156
+ {
+ position[]={10730.882,86.171448,9986.8867};
+ azimut=85;
+ id=219;
+ side="EMPTY";
+ vehicle="GUE_WarfareBMGNest_PK";
+ leader=1;
+ skill=0.60000002;
+ };
+ class Item157
+ {
+ position[]={11974.398,69.222702,8911.3398};
+ azimut=190;
+ id=220;
+ side="EMPTY";
+ vehicle="GUE_WarfareBMGNest_PK";
+ leader=1;
+ skill=0.60000002;
+ };
+ class Item158
+ {
+ position[]={12134.267,33.56485,9351.9424};
+ azimut=35;
+ id=221;
+ side="EMPTY";
+ vehicle="GUE_WarfareBMGNest_PK";
+ leader=1;
+ skill=0.60000002;
+ };
+ class Item159
+ {
+ position[]={12312.726,35.272514,8958.9209};
+ azimut=135;
+ id=222;
+ side="EMPTY";
+ vehicle="GUE_WarfareBMGNest_PK";
+ leader=1;
+ skill=0.60000002;
+ };
+ class Item160
+ {
+ position[]={10744.05,251.46022,12414.791};
+ azimut=260;
+ id=223;
+ side="EMPTY";
+ vehicle="GUE_WarfareBMGNest_PK";
+ leader=1;
+ skill=0.60000002;
+ };
+ class Item161
+ {
+ position[]={11201.086,208.94792,12418.34};
+ azimut=15;
+ id=224;
+ side="EMPTY";
+ vehicle="GUE_WarfareBMGNest_PK";
+ leader=1;
+ skill=0.60000002;
+ };
+ class Item162
+ {
+ position[]={11222.013,191.23453,12173.338};
+ azimut=210;
+ id=225;
+ side="EMPTY";
+ vehicle="GUE_WarfareBMGNest_PK";
+ leader=1;
+ skill=0.60000002;
+ };
+ class Item163
+ {
+ position[]={11323.241,188.20815,12225.941};
+ azimut=100;
+ id=226;
+ side="EMPTY";
+ vehicle="GUE_WarfareBMGNest_PK";
+ leader=1;
+ skill=0.60000002;
+ };
+ class Item164
+ {
+ position[]={10238.308,5.5,2155.5852};
+ azimut=240;
+ id=227;
+ side="EMPTY";
+ vehicle="GUE_WarfareBMGNest_PK";
+ leader=1;
+ skill=0.60000002;
+ };
+ class Item165
+ {
+ position[]={10701.9,0,7983.48}; //---{10701.292,211.58905,7985.5234};
+ azimut=-54.5048; //---305;
+ id=231;
+ side="EMPTY";
+ vehicle="WarfareBDepot";
+ leader=1;
+ skill=0.60000002;
+ text="Polana";
+ init="nullreturn = [this,""Polana"",[""MediumTown1Tank"",""MediumTown2Tank""]]ExecVM ""Server\Config\Config_Town.sqf""";
+ };
+ class Item166
+ {
+ position[]={10516.181,188.16,7801.2822};
+ azimut=280;
+ id=232;
+ side="EMPTY";
+ vehicle="WarfareBCamp";
+ leader=1;
+ skill=0.60000002;
+ text="PolanaCamp2";
+ init="nullreturn = [this,Polana]ExecVM ""Common\Init\Init_Camp.sqf""";
+ };
+ class Item167
+ {
+ position[]={10824.133,238.7795,8244.373};
+ azimut=230;
+ id=233;
+ side="EMPTY";
+ vehicle="WarfareBCamp";
+ leader=1;
+ skill=0.60000002;
+ text="PolanaCamp1";
+ init="nullreturn = [this,Polana]ExecVM ""Common\Init\Init_Camp.sqf""";
+ };
+ class Item168
+ {
+ position[]={10812.589,239.69197,8274.9385};
+ azimut=280;
+ id=234;
+ side="EMPTY";
+ vehicle="GUE_WarfareBMGNest_PK";
+ leader=1;
+ skill=0.60000002;
+ };
+ class Item169
+ {
+ position[]={10526.605,187.2117,7755.1699};
+ azimut=215;
+ id=235;
+ side="EMPTY";
+ vehicle="GUE_WarfareBMGNest_PK";
+ leader=1;
+ skill=0.60000002;
+ };
+ class Item170
+ {
+ position[]={10849.211,238.23674,8228.9111};
+ azimut=165;
+ id=236;
+ side="EMPTY";
+ vehicle="GUE_WarfareBMGNest_PK";
+ leader=1;
+ skill=0.60000002;
+ };
+ class Item171
+ {
+ position[]={5773.1821,117.88012,4601.8726};
+ azimut=15;
+ id=239;
+ side="EMPTY";
+ vehicle="GUE_WarfareBMGNest_PK";
+ leader=1;
+ skill=0.60000002;
+ };
+ class Item172
+ {
+ position[]={5736.7017,146.98924,4873.5308};
+ azimut=290;
+ id=240;
+ side="EMPTY";
+ vehicle="GUE_WarfareBMGNest_PK";
+ leader=1;
+ skill=0.60000002;
+ };
+ class Item173
+ {
+ position[]={11812.229,158.98073,12623.386};
+ azimut=205;
+ id=241;
+ side="EMPTY";
+ vehicle="WarfareBAirport";
+ skill=0.60000002;
+ init="nullreturn = [this] ExecVM ""Common\Init\Init_Airfield.sqf""";
+ };
+ class Item174
+ {
+ position[]={4479.6255,339,10618.549};
+ azimut=330;
+ id=242;
+ side="EMPTY";
+ vehicle="WarfareBAirport";
+ skill=0.60000002;
+ init="nullreturn = [this] ExecVM ""Common\Init\Init_Airfield.sqf""";
+ };
+ class Item175
+ {
+ position[]={5050.3379,9.1279831,2411.165};
+ azimut=30;
+ id=243;
+ side="EMPTY";
+ vehicle="WarfareBAirport";
+ skill=0.60000002;
+ init="nullreturn = [this] ExecVM ""Common\Init\Init_Airfield.sqf""";
+ };
+ class Item176
+ {
+ position[]={3112.6897,298.98001,7961.2949};
+ azimut=25;
+ id=244;
+ side="EMPTY";
+ vehicle="WarfareBDepot";
+ leader=1;
+ skill=0.60000002;
+ text="Pustoshka";
+ init="nullreturn = [this,""Pustoshka"",[""MediumTown1Tank"",""MediumTown2Tank""]]ExecVM ""Server\Config\Config_Town.sqf""";
+ };
+ class Item177
+ {
+ position[]={2987.9055,314.37567,7831.6089};
+ azimut=285;
+ id=245;
+ side="EMPTY";
+ vehicle="WarfareBCamp";
+ leader=1;
+ skill=0.60000002;
+ text="PustoshkaCamp1";
+ init="nullreturn = [this,Pustoshka]ExecVM ""Common\Init\Init_Camp.sqf""";
+ };
+ class Item178
+ {
+ position[]={3279.7378,299.0307,7940.7886};
+ azimut=205;
+ id=246;
+ side="EMPTY";
+ vehicle="WarfareBCamp";
+ leader=1;
+ skill=0.60000002;
+ text="PustoshkaCamp2";
+ init="nullreturn = [this,Pustoshka]ExecVM ""Common\Init\Init_Camp.sqf""";
+ };
+ class Item179
+ {
+ position[]={3295.8926,299.38617,7919.8364};
+ azimut=150;
+ id=247;
+ side="EMPTY";
+ vehicle="GUE_WarfareBMGNest_PK";
+ leader=1;
+ skill=0.60000002;
+ };
+ class Item180
+ {
+ position[]={2986.7517,315.24902,7813.8906};
+ azimut=180;
+ id=248;
+ side="EMPTY";
+ vehicle="GUE_WarfareBMGNest_PK";
+ leader=1;
+ skill=0.60000002;
+ };
+ class Item181
+ {
+ position[]={3321.6089,298.70847,7948.2803};
+ azimut=90;
+ id=249;
+ side="EMPTY";
+ vehicle="GUE_WarfareBMGNest_PK";
+ leader=1;
+ skill=0.60000002;
+ };
+ class Item182
+ {
+ position[]={4457.563,229.88722,4580.709};
+ azimut=305;
+ id=250;
+ side="EMPTY";
+ vehicle="WarfareBDepot";
+ leader=1;
+ skill=0.60000002;
+ text="Kozlovka";
+ init="nullreturn = [this,""Kozlovka"",[""SmallTown"",""SmallTown2""]]ExecVM ""Server\Config\Config_Town.sqf""";
+ };
+ class Item183
+ {
+ position[]={4557.8823,222.60001,4385.165};
+ azimut=220;
+ id=251;
+ side="EMPTY";
+ vehicle="WarfareBCamp";
+ leader=1;
+ skill=0.60000002;
+ text="KozlovkaCamp1";
+ init="nullreturn = [this,Kozlovka]ExecVM ""Common\Init\Init_Camp.sqf""";
+ };
+ class Item184
+ {
+ position[]={4316.6958,247.55087,4802.0234};
+ azimut=45;
+ id=252;
+ side="EMPTY";
+ vehicle="WarfareBCamp";
+ leader=1;
+ skill=0.60000002;
+ text="KozlovkaCamp2";
+ init="nullreturn = [this,Kozlovka]ExecVM ""Common\Init\Init_Camp.sqf""";
+ };
+ class Item185
+ {
+ position[]={4569.6904,222.60001,4377.4248};
+ azimut=100;
+ id=253;
+ side="EMPTY";
+ vehicle="GUE_WarfareBMGNest_PK";
+ leader=1;
+ skill=0.60000002;
+ };
+ class Item186
+ {
+ position[]={4358.9995,251.28786,4798.6367};
+ azimut=275;
+ id=254;
+ side="EMPTY";
+ vehicle="GUE_WarfareBMGNest_PK";
+ leader=1;
+ skill=0.60000002;
+ };
+ class Item187
+ {
+ position[]={1827.3776,8.0775709,2260.3408};
+ azimut=160;
+ id=255;
+ side="EMPTY";
+ vehicle="WarfareBDepot";
+ leader=1;
+ skill=0.60000002;
+ text="Kamenka";
+ init="nullreturn = [this,""Kamenka"",[""MediumTown1Tank"",""MediumTown2Tank""]]ExecVM ""Server\Config\Config_Town.sqf""";
+ };
+ class Item188
+ {
+ position[]={1742.7869,18.160946,2356.759};
+ azimut=260;
+ id=256;
+ side="EMPTY";
+ vehicle="WarfareBCamp";
+ leader=1;
+ skill=0.60000002;
+ text="KamenkaCamp1";
+ init="nullreturn = [this,Kamenka]ExecVM ""Common\Init\Init_Camp.sqf""";
+ };
+ class Item189
+ {
+ position[]={1994.8879,6.1718187,2270.5286};
+ azimut=350;
+ id=257;
+ side="EMPTY";
+ vehicle="WarfareBCamp";
+ leader=1;
+ skill=0.60000002;
+ text="KamenkaCamp2";
+ init="nullreturn = [this,Kamenka]ExecVM ""Common\Init\Init_Camp.sqf""";
+ };
+ class Item190
+ {
+ position[]={1771.3765,19.086243,2373.1204};
+ azimut=345;
+ id=258;
+ side="EMPTY";
+ vehicle="GUE_WarfareBMGNest_PK";
+ leader=1;
+ skill=0.60000002;
+ };
+ class Item191
+ {
+ position[]={2043.0447,5.5421925,2269.5112};
+ azimut=90;
+ id=259;
+ side="EMPTY";
+ vehicle="GUE_WarfareBMGNest_PK";
+ leader=1;
+ skill=0.60000002;
+ };
+ class Item192
+ {
+ position[]={12784.364,166.83583,4473.6729};
+ azimut=15;
+ id=260;
+ side="EMPTY";
+ vehicle="WarfareBDepot";
+ leader=1;
+ skill=0.60000002;
+ text="Tulga";
+ init="nullreturn = [this,""Tulga"",[""SmallTown"",""SmallTown2""]]ExecVM ""Server\Config\Config_Town.sqf""";
+ };
+ class Item193
+ {
+ position[]={12538.741,172.83641,4573.0869};
+ azimut=245;
+ id=261;
+ side="EMPTY";
+ vehicle="WarfareBCamp";
+ leader=1;
+ skill=0.60000002;
+ text="TulgaCamp1";
+ init="nullreturn = [this,Tulga]ExecVM ""Common\Init\Init_Camp.sqf""";
+ };
+ class Item194
+ {
+ position[]={12583.03,181.8849,4384.1553};
+ azimut=105;
+ id=262;
+ side="EMPTY";
+ vehicle="WarfareBCamp";
+ leader=1;
+ skill=0.60000002;
+ text="TulgaCamp2";
+ init="nullreturn = [this,Tulga]ExecVM ""Common\Init\Init_Camp.sqf""";
+ };
+ class Item195
+ {
+ position[]={12556.558,169.11949,4576.9941};
+ azimut=30;
+ id=263;
+ side="EMPTY";
+ vehicle="GUE_WarfareBMGNest_PK";
+ leader=1;
+ skill=0.60000002;
+ };
+ class Item196
+ {
+ position[]={12574.517,181.41203,4402.7124};
+ azimut=280;
+ id=264;
+ side="EMPTY";
+ vehicle="GUE_WarfareBMGNest_PK";
+ leader=1;
+ skill=0.60000002;
+ };
+ class Item197
+ {
+ position[]={7476.7134,217.14667,5203.1504};
+ azimut=25;
+ id=265;
+ side="EMPTY";
+ vehicle="WarfareBDepot";
+ leader=1;
+ skill=0.60000002;
+ text="Mogilevka";
+ init="nullreturn = [this,""Mogilevka"",[""LargeTown"",""LargeTown2""]]ExecVM ""Server\Config\Config_Town.sqf""";
+ };
+ class Item198
+ {
+ position[]={7729.0181,226.78922,5256.0278};
+ azimut=340;
+ id=266;
+ side="EMPTY";
+ vehicle="WarfareBCamp";
+ leader=1;
+ skill=0.60000002;
+ text="MogilevkaCamp1";
+ init="nullreturn = [this,Mogilevka]ExecVM ""Common\Init\Init_Camp.sqf""";
+ };
+ class Item199
+ {
+ position[]={7414.8921,249.04007,5406.6094};
+ azimut=25;
+ id=267;
+ side="EMPTY";
+ vehicle="WarfareBCamp";
+ leader=1;
+ skill=0.60000002;
+ text="MogilevkaCamp3";
+ init="nullreturn = [this,Mogilevka]ExecVM ""Common\Init\Init_Camp.sqf""";
+ };
+ class Item200
+ {
+ position[]={7518.3579,209.6597,4963.4189};
+ azimut=295;
+ id=268;
+ side="EMPTY";
+ vehicle="WarfareBCamp";
+ leader=1;
+ skill=0.60000002;
+ text="MogilevkaCamp2";
+ init="nullreturn = [this,Mogilevka]ExecVM ""Common\Init\Init_Camp.sqf""";
+ };
+ class Item201
+ {
+ position[]={7510.6494,210.68295,4952.4609};
+ azimut=205;
+ id=269;
+ side="EMPTY";
+ vehicle="GUE_WarfareBMGNest_PK";
+ leader=1;
+ skill=0.60000002;
+ };
+ class Item202
+ {
+ position[]={7760.7852,227.05922,5275.6304};
+ azimut=25;
+ id=270;
+ side="EMPTY";
+ vehicle="GUE_WarfareBMGNest_PK";
+ leader=1;
+ skill=0.60000002;
+ };
+ class Item203
+ {
+ position[]={7375.707,249.79002,5402.1406};
+ azimut=310;
+ id=271;
+ side="EMPTY";
+ vehicle="GUE_WarfareBMGNest_PK";
+ leader=1;
+ skill=0.60000002;
+ };
+ class Item204
+ {
+ position[]={7556.1914,202.20407,4976.5605};
+ azimut=130;
+ id=272;
+ side="EMPTY";
+ vehicle="GUE_WarfareBMGNest_PK";
+ leader=1;
+ skill=0.60000002;
+ };
+ class Item205
+ {
+ position[]={7139.519,293.79648,7757.8052};
+ id=273;
+ side="EMPTY";
+ vehicle="WarfareBDepot";
+ leader=1;
+ skill=0.60000002;
+ text="NovySobor";
+ init="nullreturn = [this,""Novy Sobor"",[""MediumTown1Tank"",""MediumTown2Tank""]]ExecVM ""Server\Config\Config_Town.sqf""";
+ };
+ class Item206
+ {
+ position[]={7173.1924,272.33389,7420.2866};
+ azimut=30;
+ id=274;
+ side="EMPTY";
+ vehicle="WarfareBCamp";
+ leader=1;
+ skill=0.60000002;
+ text="NovySoborCamp1";
+ init="nullreturn = [this,NovySobor]ExecVM ""Common\Init\Init_Camp.sqf""";
+ };
+ class Item207
+ {
+ position[]={6941.3154,301.26715,7964.7813};
+ azimut=105;
+ id=275;
+ side="EMPTY";
+ vehicle="WarfareBCamp";
+ leader=1;
+ skill=0.60000002;
+ text="NovySoborCamp2";
+ init="nullreturn = [this,NovySobor]ExecVM ""Common\Init\Init_Camp.sqf""";
+ };
+ class Item208
+ {
+ position[]={7197.6812,274.8815,7429.1074};
+ azimut=215;
+ id=276;
+ side="EMPTY";
+ vehicle="GUE_WarfareBMGNest_PK";
+ leader=1;
+ skill=0.60000002;
+ };
+ class Item209
+ {
+ position[]={6911.0747,291.66565,7622.0991};
+ azimut=255;
+ id=277;
+ side="EMPTY";
+ vehicle="GUE_WarfareBMGNest_PK";
+ leader=1;
+ skill=0.60000002;
+ };
+ class Item210
+ {
+ position[]={6916.0254,300.71719,7959.5854};
+ azimut=40;
+ id=278;
+ side="EMPTY";
+ vehicle="GUE_WarfareBMGNest_PK";
+ leader=1;
+ skill=0.60000002;
+ };
+ class Item211
+ {
+ position[]={7373.3984,311.81244,7707.2095};
+ azimut=130;
+ id=279;
+ side="EMPTY";
+ vehicle="GUE_WarfareBMGNest_PK";
+ leader=1;
+ skill=0.60000002;
+ };
+ class Item212
+ {
+ position[]={8117.9443,5.4425077,3306.9819};
+ azimut=15;
+ id=280;
+ side="EMPTY";
+ vehicle="WarfareBDepot";
+ leader=1;
+ skill=0.60000002;
+ text="Prigorodki";
+ init="nullreturn = [this,""Prigorodki"",[""SmallTown"",""SmallTown2""]]ExecVM ""Server\Config\Config_Town.sqf""";
+ };
+ class Item213
+ {
+ position[]={8169.6846,6.0300684,3139.1702};
+ azimut=25;
+ id=281;
+ side="EMPTY";
+ vehicle="WarfareBCamp";
+ leader=1;
+ skill=0.60000002;
+ text="PrigorodkiCamp1";
+ init="nullreturn = [this,Prigorodki]ExecVM ""Common\Init\Init_Camp.sqf""";
+ };
+ class Item214
+ {
+ position[]={7861.9067,6,3450.6951};
+ azimut=350;
+ id=282;
+ side="EMPTY";
+ vehicle="WarfareBCamp";
+ leader=1;
+ skill=0.60000002;
+ text="PrigorodkiCamp2";
+ init="nullreturn = [this,Prigorodki]ExecVM ""Common\Init\Init_Camp.sqf""";
+ };
+ class Item215
+ {
+ position[]={8176.2959,6.8927927,3094.4827};
+ azimut=100;
+ id=283;
+ side="EMPTY";
+ vehicle="GUE_WarfareBMGNest_PK";
+ leader=1;
+ skill=0.60000002;
+ };
+ class Item216
+ {
+ position[]={12235.97,171.87889,7223.8545};
+ azimut=340;
+ id=284;
+ side="EMPTY";
+ vehicle="WarfareBDepot";
+ leader=1;
+ skill=0.60000002;
+ text="Orlovets";
+ init="nullreturn = [this,""Orlovets"",[""MediumTown1Tank"",""MediumTown2Tank""]]ExecVM ""Server\Config\Config_Town.sqf""";
+ };
+ class Item217
+ {
+ position[]={12322.195,163.03149,7401.9702};
+ azimut=265;
+ id=285;
+ side="EMPTY";
+ vehicle="WarfareBCamp";
+ leader=1;
+ skill=0.60000002;
+ text="OrlovetsCamp1";
+ init="nullreturn = [this,Orlovets]ExecVM ""Common\Init\Init_Camp.sqf""";
+ };
+ class Item218
+ {
+ position[]={11941.199,200.67831,7260.5981};
+ azimut=15;
+ id=286;
+ side="EMPTY";
+ vehicle="WarfareBCamp";
+ leader=1;
+ skill=0.60000002;
+ text="OrlovetsCamp2";
+ init="nullreturn = [this,Orlovets]ExecVM ""Common\Init\Init_Camp.sqf""";
+ };
+ class Item219
+ {
+ position[]={12334.661,160.71593,7419.187};
+ azimut=25;
+ id=287;
+ side="EMPTY";
+ vehicle="GUE_WarfareBMGNest_PK";
+ leader=1;
+ skill=0.60000002;
+ };
+ class Item220
+ {
+ position[]={11930.155,208.83669,7316.1221};
+ azimut=280;
+ id=288;
+ side="EMPTY";
+ vehicle="GUE_WarfareBMGNest_PK";
+ leader=1;
+ skill=0.60000002;
+ };
+ class Item221
+ {
+ position[]={12375.943,97.339798,10878.351};
+ azimut=25;
+ id=289;
+ side="EMPTY";
+ vehicle="WarfareBDepot";
+ leader=1;
+ skill=0.60000002;
+ text="Khelm";
+ init="nullreturn = [this,""Khelm"",[""SmallTown"",""SmallTown2""]]ExecVM ""Server\Config\Config_Town.sqf""";
+ };
+ class Item222
+ {
+ position[]={12285.411,91.976089,10660.653};
+ azimut=270;
+ id=290;
+ side="EMPTY";
+ vehicle="WarfareBCamp";
+ leader=1;
+ skill=0.60000002;
+ text="KhelmCamp1";
+ init="nullreturn = [this,Khelm]ExecVM ""Common\Init\Init_Camp.sqf""";
+ };
+ class Item223
+ {
+ position[]={12243.169,133.34204,11101.714};
+ azimut=145;
+ id=291;
+ side="EMPTY";
+ vehicle="WarfareBCamp";
+ leader=1;
+ skill=0.60000002;
+ text="KhelmCamp2";
+ init="nullreturn = [this,Khelm]ExecVM ""Common\Init\Init_Camp.sqf""";
+ };
+ class Item224
+ {
+ position[]={12325.303,87.428749,10659.196};
+ azimut=160;
+ id=292;
+ side="EMPTY";
+ vehicle="GUE_WarfareBMGNest_PK";
+ leader=1;
+ skill=0.60000002;
+ };
+ class Item225
+ {
+ position[]={13385.436,94,12856.22};
+ azimut=25;
+ id=293;
+ side="EMPTY";
+ vehicle="WarfareBDepot";
+ leader=1;
+ skill=0.60000002;
+ text="Olsha";
+ init="nullreturn = [this,""Olsha"",[""SmallTown"",""SmallTown2""]]ExecVM ""Server\Config\Config_Town.sqf""";
+ };
+ class Item226
+ {
+ position[]={13333.539,109.12685,12715.241};
+ azimut=285;
+ id=294;
+ side="EMPTY";
+ vehicle="WarfareBCamp";
+ leader=1;
+ skill=0.60000002;
+ text="OlshaCamp1";
+ init="nullreturn = [this,Olsha]ExecVM ""Common\Init\Init_Camp.sqf""";
+ };
+ class Item227
+ {
+ position[]={13555.185,66.984131,12785.729};
+ azimut=280;
+ id=295;
+ side="EMPTY";
+ vehicle="WarfareBCamp";
+ leader=1;
+ skill=0.60000002;
+ text="OlshaCamp2";
+ init="nullreturn = [this,Olsha]ExecVM ""Common\Init\Init_Camp.sqf""";
+ };
+ class Item228
+ {
+ position[]={13311.891,113.77165,12687.117};
+ azimut=210;
+ id=296;
+ side="EMPTY";
+ vehicle="GUE_WarfareBMGNest_PK";
+ leader=1;
+ skill=0.60000002;
+ };
+ class Item229
+ {
+ position[]={12809.699,7.1148314,8132.5991};
+ azimut=260;
+ id=297;
+ side="EMPTY";
+ vehicle="WarfareBDepot";
+ leader=1;
+ skill=0.60000002;
+ text="Nizhnoye";
+ init="nullreturn = [this,""Nizhnoye"",[""SmallTown"",""SmallTown2""]]ExecVM ""Server\Config\Config_Town.sqf""";
+ };
+ class Item230
+ {
+ position[]={13018.792,5.6323647,8074.4678};
+ azimut=265;
+ id=298;
+ side="EMPTY";
+ vehicle="WarfareBCamp";
+ leader=1;
+ skill=0.60000002;
+ text="NizhnoyeCamp1";
+ init="nullreturn = [this,Nizhnoye]ExecVM ""Common\Init\Init_Camp.sqf""";
+ };
+ class Item231
+ {
+ position[]={12747.567,5.6879368,8316.7725};
+ azimut=165;
+ id=299;
+ side="EMPTY";
+ vehicle="WarfareBCamp";
+ leader=1;
+ skill=0.60000002;
+ text="NizhnoyeCamp2";
+ init="nullreturn = [this,Nizhnoye]ExecVM ""Common\Init\Init_Camp.sqf""";
+ };
+ class Item232
+ {
+ position[]={13022.763,5.4643884,8063.1582};
+ azimut=160;
+ id=300;
+ side="EMPTY";
+ vehicle="GUE_WarfareBMGNest_PK";
+ leader=1;
+ skill=0.60000002;
+ };
+ class Item233
+ {
+ position[]={12729.633,6.3169508,8324.8906};
+ azimut=295;
+ id=301;
+ side="EMPTY";
+ vehicle="GUE_WarfareBMGNest_PK";
+ leader=1;
+ skill=0.60000002;
+ };
+ class Item234
+ {
+ position[]={12767.71,5.5052686,8315.9717};
+ azimut=65;
+ id=302;
+ side="EMPTY";
+ vehicle="GUE_WarfareBMGNest_PK";
+ leader=1;
+ skill=0.60000002;
+ };
+ class Item235
+ {
+ position[]={11394.385,254.25771,5511.1328};
+ azimut=15;
+ id=303;
+ side="EMPTY";
+ vehicle="WarfareBDepot";
+ leader=1;
+ skill=0.60000002;
+ text="Msta";
+ init="nullreturn = [this,""Msta"",[""SmallTown"",""SmallTown2""]]ExecVM ""Server\Config\Config_Town.sqf""";
+ };
+ class Item236
+ {
+ position[]={11687.854,217.61943,5518.542};
+ azimut=150;
+ id=304;
+ side="EMPTY";
+ vehicle="WarfareBCamp";
+ leader=1;
+ skill=0.60000002;
+ text="MstaCamp1";
+ init="nullreturn = [this,Msta]ExecVM ""Common\Init\Init_Camp.sqf""";
+ };
+ class Item237
+ {
+ position[]={11231.609,252.68831,5378.291};
+ azimut=100;
+ id=305;
+ side="EMPTY";
+ vehicle="WarfareBCamp";
+ leader=1;
+ skill=0.60000002;
+ text="MstaCamp2";
+ init="nullreturn = [this,Msta]ExecVM ""Common\Init\Init_Camp.sqf""";
+ };
+ class Item238
+ {
+ position[]={11665.507,223.49901,5561.5283};
+ azimut=70;
+ id=306;
+ side="EMPTY";
+ vehicle="GUE_WarfareBMGNest_PK";
+ leader=1;
+ skill=0.60000002;
+ };
+ class Item239
+ {
+ position[]={9734.7148,206.4473,6517.2739};
+ azimut=15;
+ id=307;
+ side="EMPTY";
+ vehicle="WarfareBDepot";
+ leader=1;
+ skill=0.60000002;
+ text="Shakhovka";
+ init="nullreturn = [this,""Shakhovka"",[""SmallTown"",""SmallTown2""]]ExecVM ""Server\Config\Config_Town.sqf""";
+ };
+ class Item240
+ {
+ position[]={9617.3994,245.20665,6383.999};
+ azimut=200;
+ id=308;
+ side="EMPTY";
+ vehicle="WarfareBCamp";
+ leader=1;
+ skill=0.60000002;
+ text="ShakhovkaCamp1";
+ init="nullreturn = [this,Shakhovka]ExecVM ""Common\Init\Init_Camp.sqf""";
+ };
+ class Item241
+ {
+ position[]={9504.1855,212.93596,6647.5747};
+ azimut=215;
+ id=309;
+ side="EMPTY";
+ vehicle="WarfareBCamp";
+ leader=1;
+ skill=0.60000002;
+ text="ShakhovkaCamp2";
+ init="nullreturn = [this,Shakhovka]ExecVM ""Common\Init\Init_Camp.sqf""";
+ };
+ class Item242
+ {
+ position[]={9626.7803,251.34454,6350.4707};
+ azimut=100;
+ id=310;
+ side="EMPTY";
+ vehicle="GUE_WarfareBMGNest_PK";
+ leader=1;
+ skill=0.60000002;
+ };
+ class Item243
+ {
+ position[]={9584.127,201.50307,6639.3198};
+ azimut=310;
+ id=311;
+ side="EMPTY";
+ vehicle="GUE_WarfareBMGNest_PK";
+ leader=1;
+ skill=0.60000002;
+ };
+ class Item244
+ {
+ position[]={3452.2764,186.3084,3910.7285};
+ azimut=15;
+ id=312;
+ side="EMPTY";
+ vehicle="WarfareBDepot";
+ leader=1;
+ skill=0.60000002;
+ text="Bor";
+ init="nullreturn = [this,""Bor"",[""SmallTown"",""SmallTown2""]]ExecVM ""Server\Config\Config_Town.sqf""";
+ };
+ class Item245
+ {
+ position[]={3710.6445,203.66833,3899.2817};
+ azimut=10;
+ id=313;
+ side="EMPTY";
+ vehicle="WarfareBCamp";
+ leader=1;
+ skill=0.60000002;
+ text="BorCamp1";
+ init="nullreturn = [this,Bor]ExecVM ""Common\Init\Init_Camp.sqf""";
+ };
+ class Item246
+ {
+ position[]={3279.7852,219.69963,4100.3281};
+ azimut=335;
+ id=314;
+ side="EMPTY";
+ vehicle="WarfareBCamp";
+ leader=1;
+ skill=0.60000002;
+ text="BorCamp2";
+ init="nullreturn = [this,Bor]ExecVM ""Common\Init\Init_Camp.sqf""";
+ };
+ class Item247
+ {
+ position[]={3740.313,201.7998,3864.7683};
+ azimut=125;
+ id=315;
+ side="EMPTY";
+ vehicle="GUE_WarfareBMGNest_PK";
+ leader=1;
+ skill=0.60000002;
+ };
+ class Item248
+ {
+ position[]={3272.3406,214.26984,4077.0986};
+ azimut=175;
+ id=316;
+ side="EMPTY";
+ vehicle="GUE_WarfareBMGNest_PK";
+ leader=1;
+ skill=0.60000002;
+ };
+ class Item249
+ {
+ position[]={5009.8774,317.54434,5599.2876};
+ azimut=45;
+ id=317;
+ side="EMPTY";
+ vehicle="WarfareBDepot";
+ leader=1;
+ skill=0.60000002;
+ text="Pulkovo";
+ init="nullreturn = [this,""Pulkovo"",[""SmallTown"",""SmallTown2""]]ExecVM ""Server\Config\Config_Town.sqf""";
+ };
+ class Item250
+ {
+ position[]={5243.1836,304.06631,5517.9722};
+ azimut=195;
+ id=318;
+ side="EMPTY";
+ vehicle="WarfareBCamp";
+ leader=1;
+ skill=0.60000002;
+ text="PulkovoCamp1";
+ init="nullreturn = [this,Pulkovo]ExecVM ""Common\Init\Init_Camp.sqf""";
+ };
+ class Item251
+ {
+ position[]={4799.2158,318.2601,5740.0073};
+ azimut=140;
+ id=319;
+ side="EMPTY";
+ vehicle="WarfareBCamp";
+ leader=1;
+ skill=0.60000002;
+ text="PulkovoCamp2";
+ init="nullreturn = [this,Pulkovo]ExecVM ""Common\Init\Init_Camp.sqf""";
+ };
+ class Item252
+ {
+ position[]={4763.6279,324.11133,5661.8052};
+ azimut=300;
+ id=320;
+ side="EMPTY";
+ vehicle="GUE_WarfareBMGNest_PK";
+ leader=1;
+ skill=0.60000002;
+ };
+ class Item253
+ {
+ position[]={4793.4536,315.43448,5773.6611};
+ id=321;
+ side="EMPTY";
+ vehicle="GUE_WarfareBMGNest_PK";
+ leader=1;
+ skill=0.60000002;
+ };
+ class Item254
+ {
+ position[]={2327.9868,319.28763,6359.3276};
+ azimut=325;
+ id=322;
+ side="EMPTY";
+ vehicle="WarfareBDepot";
+ leader=1;
+ skill=0.60000002;
+ text="Sosnovka";
+ init="nullreturn = [this,""Sosnovka"",[""SmallTown"",""SmallTown2"",""MediumTown""]]ExecVM ""Server\Config\Config_Town.sqf""";
+ };
+ class Item255
+ {
+ position[]={2521.0808,329.46924,6574.7651};
+ azimut=315;
+ id=323;
+ side="EMPTY";
+ vehicle="WarfareBCamp";
+ leader=1;
+ skill=0.60000002;
+ text="SosnovkaCamp1";
+ init="nullreturn = [this,Sosnovka]ExecVM ""Common\Init\Init_Camp.sqf""";
+ };
+ class Item256
+ {
+ position[]={2548.5371,283.32831,6237.2681};
+ azimut=260;
+ id=324;
+ side="EMPTY";
+ vehicle="WarfareBCamp";
+ leader=1;
+ skill=0.60000002;
+ text="SosnovkaCamp2";
+ init="nullreturn = [this,Sosnovka]ExecVM ""Common\Init\Init_Camp.sqf""";
+ };
+ class Item257
+ {
+ position[]={2459.7876,283.58783,6179.48};
+ azimut=140;
+ id=325;
+ side="EMPTY";
+ vehicle="GUE_WarfareBMGNest_PK";
+ leader=1;
+ skill=0.60000002;
+ };
+ class Item258
+ {
+ position[]={2538.7686,327.36826,6573.709};
+ azimut=50;
+ id=326;
+ side="EMPTY";
+ vehicle="GUE_WarfareBMGNest_PK";
+ leader=1;
+ skill=0.60000002;
+ };
+ };
+ class Markers
+ {
+ items=5;
+ class Item0
+ {
+ position[]={14155.423,17.164606,2797.7344};
+ name="WestTempRespawnMarker";
+ type="Empty";
+ };
+ class Item1
+ {
+ position[]={13510.148,64.293098,3362.6038};
+ name="EastTempRespawnMarker";
+ type="Empty";
+ };
+ class Item2
+ {
+ position[]={11811.422,158.98073,12623.79};
+ name="Airport1";
+ type="mil_triangle";
+ colorName="ColorBlue";
+ };
+ class Item3
+ {
+ position[]={4478.8188,339,10618.953};
+ name="Airport2";
+ type="mil_triangle";
+ colorName="ColorBlue";
+ };
+ class Item4
+ {
+ position[]={5050.3052,9.128233,2411.1838};
+ name="Airport3";
+ type="mil_triangle";
+ colorName="ColorBlue";
+ };
+ };
+};
+class Intro
+{
+ addOns[]=
+ {
+ "chernarus"
+ };
+ addOnsAuto[]=
+ {
+ "chernarus"
+ };
+ randomSeed=13267190;
+ class Intel
+ {
+ startWeather=0.25;
+ forecastWeather=0.25;
+ year=2008;
+ month=10;
+ day=11;
+ hour=9;
+ minute=20;
+ };
+};
+class OutroWin
+{
+ addOns[]=
+ {
+ "chernarus"
+ };
+ addOnsAuto[]=
+ {
+ "chernarus"
+ };
+ randomSeed=10462969;
+ class Intel
+ {
+ startWeather=0.25;
+ forecastWeather=0.25;
+ year=2008;
+ month=10;
+ day=11;
+ hour=9;
+ minute=20;
+ };
+};
+class OutroLoose
+{
+ addOns[]=
+ {
+ "chernarus"
+ };
+ addOnsAuto[]=
+ {
+ "chernarus"
+ };
+ randomSeed=12603217;
+ class Intel
+ {
+ startWeather=0.25;
+ forecastWeather=0.25;
+ year=2008;
+ month=10;
+ day=11;
+ hour=9;
+ minute=20;
+ };
+};
+
+
+
+
diff --git a/readme.nfo b/readme.nfo
new file mode 100644
index 0000000..476fa6f
--- /dev/null
+++ b/readme.nfo
@@ -0,0 +1,28 @@
+#############################################################################
+#############################################################################
+ __ __ __
+ / / /\ \ \__ _ _ __ / _| __ _ _ __ ___
+ \ \/ \/ / _` | '__| |_ / _` | '__/ _ \
+ \ /\ / (_| | | | _| (_| | | | __/
+ \/ \/ \__,_|_| |_| \__,_|_| \___|
+ _ _ _ _ _
+ | |__ ___ _ __ _ __ _ _ ___ __| (_) |_(_) ___ _ __
+ | '_ \ / _ \ '_ \| '_ \| | | | / _ \/ _` | | __| |/ _ \| '_ \
+ | |_) | __/ | | | | | | |_| | | __/ (_| | | |_| | (_) | | | |
+ |_.__/ \___|_| |_|_| |_|\__, | \___|\__,_|_|\__|_|\___/|_| |_|
+ |___/
+
+#############################################################################
+#############################################################################
+
+DOWNLOADS:
+ - http://dev-heaven.net/projects/warfare-be/files
+
+CHANGELOG:
+ - http://dev-heaven.net/projects/show/warfare-be
+
+WIKI:
+ - http://dev-heaven.net/projects/warfare-be/wiki
+
+CONTACT:
+ - benny_boy66@hotmail.fr \ No newline at end of file
diff --git a/stringtable.xml b/stringtable.xml
new file mode 100644
index 0000000..49d8892
--- /dev/null
+++ b/stringtable.xml
@@ -0,0 +1,3691 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project name="Arma2">
+ <Package name="CWarfare">
+ <Container name="WF">
+<!--ACTION Strings - ALL DONE-->
+ <Key ID="STR_WF_ACTION_DeployMASH">
+ <English>Deploy MASH</English>
+ <French>Déployer Hopital de Campagne</French>
+ <German>Feldlazarett aufbauen</German>
+ <Russian>Развернуть госпиталь</Russian>
+ <Italian>Monta ospedale da campo</Italian>
+ </Key>
+ <Key ID="STR_WF_ACTION_Lockpick">
+ <English>Lockpick</English>
+ <French>Crocheter</French>
+ <German>Schloss knacken</German>
+ <Russian>Открыть отмычкой</Russian>
+ <Italian>Apri Serratura</Italian>
+ </Key>
+ <Key ID="STR_WF_ACTION_Repair">
+ <English>Repair</English>
+ <French>Réparer</French>
+ <German>Reparieren</German>
+ <Russian>Ремонт</Russian>
+ <Italian>Ripara</Italian>
+ </Key>
+ <Key ID="STR_WF_ACTION_Spot">
+ <English>Spot</English>
+ <French>Repérer</French>
+ <German>Beobachten</German>
+ <Russian>Указать</Russian>
+ <Italian>Individua</Italian>
+ </Key>
+ <Key ID="STR_WF_ACTION_UndeployMASH">
+ <English>Pack MASH</English>
+ <French>Replier Hopital de Campagne</French>
+ <German>Pack MASH</German>
+ <Russian>Pack MASHь</Russian>
+ <Italian>Pack MASH</Italian>
+ </Key>
+
+<!--CHAT Strings - ALL DONE-->
+ <Key ID="STR_WF_CHAT_Award_Bounty">
+ <English>$%1 Received for neutralizing a %2.</English>
+ <French>$%1 Gagné pour la neutralisation d'un %2.</French>
+ <German>%2 neutralisiert! $%1 erhalten.</German>
+ <Russian>+$%1 за нейтрализацию %2.</Russian>
+ <Italian>$%1 Ricevuti per aver neutralizzato un %2.</Italian>
+ </Key>
+ <Key ID="STR_WF_CHAT_Award_Bounty_Assist">
+ <English>$%1 Received for the neutralization assistance of a %2.</English>
+ <French>$%1 Gagné pour l'assistance à la neutralisation d'un %2.</French>
+ <German>Für die Kampfunterstützung gegen %2 hast du $%1 erhalten.</German>
+ <Russian>$%1 Received for the neutralization assistance of a %2.</Russian>
+ <Italian>$%1 Received for the neutralization assistance of a %2.</Italian>
+ </Key>
+ <Key ID="STR_WF_CHAT_AI_Commander">
+ <English>AI Commander Selected!</English>
+ <French>Commandeur IA Sélectioné!</French>
+ <German>KI wurde zum Commander gewählt!</German>
+ <Russian>Командует ИИ!</Russian>
+ <Italian>Comandante IA Selezionato!</Italian>
+ </Key>
+ <Key ID="STR_WF_CHAT_Commander_Bounty_Town"><!--shared U-->
+ <English>Our team has captured %2. $%1 Commander-Bonus.</English>
+ <French>Our team has captured %2. $%1 Commander-Bonus.</French>
+ <German>Unser Team hat %2 erobert. $%1 Commander-Bonus.</German>
+ <Russian>Our team has captured %2. $%1 Commander-Bonus.</Russian>
+ <Italian>Our team has captured %2. $%1 Commander-Bonus.</Italian>
+ </Key>
+ <Key ID="STR_WF_CHAT_Camp_Captured">
+ <English>Our team has captured a camp at %1.</English>
+ <French>Un campement a été capturé à %1.</French>
+ <German>Unser Team hat ein Camp bei %1 eingenommen.</German>
+ <Russian>наша команда захватила лагерь в %1.</Russian>
+ <Italian>Il nostro fazione ha catturato un campo a %1.</Italian>
+ </Key>
+ <Key ID="STR_WF_CHAT_Camp_Captured_Bounty">
+ <English>Your Squad has captured a camp at %1. $%2 earned.</English>
+ <French>Votre équipe à capturé un campement à %1. Vous gagné $%2.</French>
+ <German>Dein Squad hat ein Camp bei %1 eingenommen. Du erhälst $%2.</German>
+ <Russian>+$%2 за захват лагеря в %1.</Russian>
+ <Italian>Il tuo Squad ha catturato un campo a %1. $%2 Guadagnati.</Italian>
+ </Key>
+ <Key ID="STR_WF_CHAT_FundsTransfer">
+ <English>You have received $%1 from %2.</English>
+ <French>Vous avez reçu $%1 de la part de %2.</French>
+ <German>Der Spieler %2 hat dir $%1 überwiesen.</German>
+ <Russian>Вы получили $%1 от %2.</Russian>
+ <Italian>Hai ricevuto $%1 da %2 ringrazialo.</Italian>
+ </Key>
+ <Key ID="STR_WF_CHAT_Gear_RespawnCharge">
+ <English>You were deducted from $%1 due to your gear</English>
+ <French>Vous avez été déduit de $%1 en raison de votre équipement</French>
+ <German>Dir werden $%1 für neue Ausrüstung abgezogen</German>
+ <Russian>У вас изъято $%1 за ваше снаряжение</Russian>
+ <Italian>You were deducted from $%1 due to your gear</Italian>
+ </Key>
+ <Key ID="STR_WF_CHAT_ICBM_Launch">
+ <English>WARNNING! An Intercontinental ballistic missile launch has been detected!</English>
+ <French>ATTENTION! Le lancement d'un Missile balistique intercontinental a été detecté!</French>
+ <German>WARNUNG! Der Abschuss einer Interkontinentalrakete wurde gemeldet!</German>
+ <Russian>ВНИМАНИЕ! Зафиксирован запуск ядерной ракеты!</Russian>
+ <Italian>ATTENZIONE! Un Missile Balistico intercontinentale è stato avvistato!</Italian>
+ </Key>
+ <Key ID="STR_WF_CHAT_Penalty">
+ <English>$%1 Lost for a civilian neutralization! Go to the ophthalmologist...</English>
+ <French>$%1 Perdu pour la neutralisation d'un civil! soyer prudent!</French>
+ <German>$%1 Strafe für die Tötung eines Zivilisten! Ab zum Augenarzt...</German>
+ <Russian>$%1 Потерянно за убийство гражданского! будьте осторожны!</Russian>
+ <Italian>$%1 Perduti per aver neutralizzato un civile! stai attento!</Italian>
+ </Key>
+ <Key ID="STR_WF_CHAT_PlayerCommander"><!--shared U-->
+ <English>You are the new Commander! Good luck!</English>
+ <French>Vous êtes le Commandeur! Bonne Chance!</French>
+ <German>Du bist der neue Commander! Viel Erfolg!</German>
+ <Russian>Вы Командующий!</Russian>
+ <Italian>Sei il Comandante!</Italian>
+ </Key>
+ <Key ID="STR_WF_CHAT_Structure_Sold">
+ <English>A "%1" structure has been sold!</English>
+ <French>&gt;Une structure de type "%1" à été vendu!</French>
+ <German>Das Gebäude "%1" wurde verkauft!</German>
+ <Russian>A "%1" строение проданно!</Russian>
+ <Italian>A "%1" structure has been sold!</Italian>
+ </Key>
+ <Key ID="STR_WF_CHAT_Structure_Sell">
+ <English>A "%1" structure is going to be sold in %2 seconds!</English>
+ <French>Une structure de type "%1" va être vendu dans %2 secondes!</French>
+ <German>Das Gebäude "%1" wird in %2 Sekunden verkauft!</German>
+ <Russian>A "%1" structure is going to be sold in %2 seconds!</Russian>
+ <Italian>A "%1" structure is going to be sold in %2 seconds!</Italian>
+ </Key>
+ <Key ID="STR_WF_CHAT_Secondary_Award">
+ <English>Your Squad has been awarded with %1%2 for the completion of a secondary objective.</English>
+ <French>Votre équipe à reçu %1%2 pour avoir completé un objectif secondaire.</French>
+ <German>Dein Squad wurde für den erfolgreichen Abschluss einer Nebenmission mit %1%2 belohnt.</German>
+ <Russian>Your Squad has been awarded with %1%2 for the completion of a secondary objective.</Russian>
+ <Italian>Your Squad has been awarded with %1%2 for the completion of a secondary objective.</Italian>
+ </Key>
+ <Key ID="STR_WF_CHAT_Salvaged_Unit">
+ <English>$%1 Received for salvaging a %2</English>
+ <French>Vous avez reçu $%1 pour le recyclage d'un %2.</French>
+ <German>$%1 erhalten für die Bergung von %2</German>
+ <Russian>$%1 Получено за утилизацию %2</Russian>
+ <Italian>$%1 Ricevuti recuperando i pezzi di un %2</Italian>
+ </Key>
+ <Key ID="STR_WF_CHAT_Town_Captured"><!--shared U-->
+ <English>%1 has been captured by %2 !</English>
+ <French>%1 a été capturé par l'équipe %2 !</French>
+ <German>Team %2 hat die Stadt %1 eingenommen!</German>
+ <Russian>%1 has been captured by %2 !</Russian>
+ <Italian>%1 has been captured by %2 !</Italian>
+ </Key>
+ <Key ID="STR_WF_CHAT_Town_Bounty_Full"><!--shared U-->
+ <English>Your Squad has captured %1. $%2 earned.</English>
+ <French>Votre équipe à capturé %1. Vous gagné $%2.</French>
+ <German>Dein Squad hat %1 eingenommen. Du hast $%2 verdient.</German>
+ <Russian>+$%2 за захват %1.</Russian>
+ <Italian>Il tuo Squad ha conquistato %1. $%2 Guadagnati.</Italian>
+ </Key>
+ <Key ID="STR_WF_CHAT_Town_Bounty_Assist"><!--shared U-->
+ <English>Your squad has assisted in capturing %1. $%2 earned.</English>
+ <French>Votre équipe à aidé à la capture de %1. Vous gagné $%2.</French>
+ <German>Dein Squad gab Unterstützung beim Einnehmen von %1. $%2 verdient.</German>
+ <Russian>+$%2 за помощь в захвате %1.</Russian>
+ <Italian>Il tuo Squad ha assistito alla cattura di %1. $%2 Guadagnati.</Italian>
+ </Key>
+ <Key ID="STR_WF_CHAT_Teamkill_Building">
+ <English>Player %1 (ID: %2) freaks out and rioted in Base (%3 has been destroyed)!</English>
+ <French>Player %1 (ID: %2) freaks out and rioted in Base (%3 has been destroyed)!</French>
+ <German>Der Spieler %1 (ID: %2) dreht hohl und randaliert in der Basis (%3 wurde bereits zerstört)!</German>
+ <Russian>Player %1 (ID: %2) freaks out and rioted in Base (%3 has been destroyed)!</Russian>
+ <Italian>Player %1 (ID: %2) freaks out and rioted in Base (%3 has been destroyed)!</Italian>
+ </Key>
+ <Key ID="STR_WF_CHAT_Teamswap"><!--shared U-->
+ <English>Player %1 (ID: %2) has teamswapped! (From %3 to %4)</English>
+ <French>Le joueur %1 (ID: %2) a changé d'équipe! (De %3 à %4)</French>
+ <German>Der Spieler %1 (ID: %2) hat das Team gewechselt! (von %3 nach %4)</German>
+ <Russian>Игрок %1 (ID: %2) сменил сторону! (с %3 на %4)</Russian>
+ <Italian>Il Giocatore %1 (ID: %2) ha cambiato squadra! (da %3 a %4)</Italian>
+ </Key>
+ <Key ID="STR_WF_CHAT_Teamkill">
+ <English>$%1 removed for a teamkill! go to the ophthalmologist...</English>
+ <French>$%1 Enlever pour un tir fratricide.</French>
+ <German>$%1 Strafe für einen Teamkill! Ab zum Augenarzt...</German>
+ <Russian>-$%1 за огонь по своим.</Russian>
+ <Italian>$%1 Rimossi per un Teamkill!</Italian>
+ </Key>
+ <Key ID="STR_WF_CHAT_TaskTO_Display">
+ <English>Your commander has ordered you to perform a "%1" order for %2!</English>
+ <French>Votre commandeur vous a donner l'ordre "%1" pour une durée de %2!</French>
+ <German>Dein Commander hat dir befohlen, einen "%1"-Befehl für %2 durchzuführen!</German>
+ <Russian>Ваш командир приказывает "%1" 2%!</Russian>
+ <Italian>Il tuo comandante ti ha ordinato di "%1" per una durata di %2!</Italian>
+ </Key>
+ <Key ID="STR_WF_CHAT_TaskTown_Display">
+ <English>Capture %1</English>
+ <French>Capturer %1</French>
+ <German>Erobere %1</German>
+ <Russian>Захватить %1</Russian>
+ <Italian>Catture %1</Italian>
+ </Key>
+ <Key ID="STR_WF_CHAT_Teamswap_Warnning">
+ <English>You will be sent back to the lobby for teamswapping. Please join your original team!</English>
+ <French>Vous allez être renvoyé vers l'écran de séléction des rôles pour avoir changé d'équipe. Veuillez rejoindre votre équipe d'origine!</French>
+ <German>Ein Teamwechsel ist nicht erlaubt. Bitte join dein ursprüngliches Team!</German>
+ <Russian>Вы будете возвращены в лобби за смену команды. Пожалуйста вернитесь в вашу команду!</Russian>
+ <Italian>You will be sent back to the lobby for teamswapping. Please join your original team!</Italian>
+ </Key>
+ <Key ID="STR_WF_CHAT_Upgrade_Complete_Message">
+ <English>%1 Upgrade completed, %1 is now at Level %2.</English>
+ <French>Amélioration %1 Complète, %1 est désormais au Niveau %2.</French>
+ <German>%1 wurde ausgebaut und hat jetzt Stufe %2 erreicht.</German>
+ <Russian>%1 модернизация завершена, достигнут уровень %2.</Russian>
+ <Italian>Aggiornamento %1 Completato, %1 è ora a Livello %2.</Italian>
+ </Key>
+ <Key ID="STR_WF_CHAT_VoteForNewCommander">
+ <English>%1 is the Commander.</English>
+ <French>%1 est le Commandeur.</French>
+ <German>%1 ist jetzt der Commander.</German>
+ <Russian>%1 командует.</Russian>
+ <Italian>%1 è il Comandante.</Italian>
+ </Key>
+
+<!--Command Menu - ALL DONE-->
+ <Key ID="STR_WF_COMMAND_All"><!--shared W-->
+ <English>All</English>
+ <French>Tous</French>
+ <German>Alle</German>
+ <Russian>Все</Russian>
+ <Italian>Tutti</Italian>
+ </Key>
+ <Key ID="STR_WF_COMMAND_AutoAI">
+ <English>Auto AI: Enable</English>
+ <French>AI Auto: Activée</French>
+ <German>AutoKI aktivieren</German>
+ <Russian>Авто ИИ: Вкл</Russian>
+ <Italian>AI Automatica: Abilitata</Italian>
+ </Key>
+ <Key ID="STR_WF_COMMAND_AutoAIOff">
+ <English>Auto AI: Disable</English>
+ <French>AI Auto: Désact.</French>
+ <German>AutoKI deaktivieren</German>
+ <Russian>Авто ИИ: Откл</Russian>
+ <Italian>AI Automatica: Disabilitata</Italian>
+ </Key>
+ <Key ID="STR_WF_COMMAND_Behavior"><!--shared W-->
+ <English>Behavior:</English>
+ <French>Comportement:</French>
+ <German>Verhalten:</German>
+ <Russian>Поведение:</Russian>
+ <Italian>Comportamento:</Italian>
+ </Key>
+ <Key ID="STR_WF_COMMAND_BuyType">
+ <English>Buy Types:</English>
+ <French>Type d'Achats:</French>
+ <German>Truppengattung:</German>
+ <Russian>Тип отряда:</Russian>
+ <Italian>Tipi di Acquisto:</Italian>
+ </Key>
+ <Key ID="STR_WF_COMMAND_CombatMode"><!--shared W-->
+ <English>Combat Mode:</English>
+ <French>Mode de combat:</French>
+ <German>Kampfmodus:</German>
+ <Russian>Режим боя:</Russian>
+ <Italian>Modalità di Combattimento:</Italian>
+ </Key>
+ <Key ID="STR_WF_COMMAND_Cash">
+ <English>Funds: $%1</English>
+ <French>Fonds: $%1</French>
+ <German>Kontostand: $%1</German>
+ <Russian>Деньги: $%1</Russian>
+ <Italian>Fondi: $%1</Italian>
+ </Key>
+ <Key ID="STR_WF_COMMAND_Defense"><!--shared W-->
+ <English>Defend</English>
+ <French>Défense</French>
+ <German>Verteidigung</German>
+ <Russian>Защита</Russian>
+ <Italian>Difendi</Italian>
+ </Key>
+ <Key ID="STR_WF_COMMAND_Formation">
+ <English>Formation:</English>
+ <French>Formation:</French>
+ <German>Formation:</German>
+ <Russian>Строй:</Russian>
+ <Italian>Formazione:</Italian>
+ </Key>
+ <Key ID="STR_WF_COMMAND_Mission">
+ <English>Mission Type</English>
+ <French>Type de Mission</French>
+ <German>Auftrag</German>
+ <Russian>Тип задания</Russian>
+ <Italian>Tipo di Missione</Italian>
+ </Key>
+ <Key ID="STR_WF_COMMAND_Move"><!--shared W-->
+ <English>Move</English>
+ <French>Déplacement</French>
+ <German>Bewegen</German>
+ <Russian>Передвижение</Russian>
+ <Italian>Muovi</Italian>
+ </Key>
+ <Key ID="STR_WF_COMMAND_Patrol"><!--shared W-->
+ <English>Patrol</English>
+ <French>Patrouiller</French>
+ <German>Patrouillieren</German>
+ <Russian>Патрулирование</Russian>
+ <Italian>Pattuglie</Italian>
+ </Key>
+ <Key ID="STR_WF_COMMAND_Respawn"><!--shared W-->
+ <English>Respawn</English>
+ <French>Réapparaitre</French>
+ <German>Respawnpunkt</German>
+ <Russian>Возрождение</Russian>
+ <Italian>Respawn</Italian>
+ </Key>
+ <Key ID="STR_WF_COMMAND_RespawnButton">
+ <English>Squad Respawn</English>
+ <French>Réapparition Equipe</French>
+ <German>Squad Respawn</German>
+ <Russian>Squad Respawn</Russian>
+ <Italian>Squad Respawn</Italian>
+ </Key>
+ <Key ID="STR_WF_COMMAND_SetBuyType">
+ <English>Set Buy Types</English>
+ <French>Définir Type d'Achats</French>
+ <German>Truppengattung des Squad festlegen</German>
+ <Russian>Установить тип отряда</Russian>
+ <Italian>Imposta tipo di acquisto</Italian>
+ </Key>
+ <Key ID="STR_WF_COMMAND_SetRespawn">
+ <English>Set Squad Respawn</English>
+ <French>Définir Point de Réapparition</French>
+ <German>Respawnpunkt des Squad festlegen</German>
+ <Russian>Set Squad Respawn</Russian>
+ <Italian>Set Squad Respawn</Italian>
+ </Key>
+ <Key ID="STR_WF_COMMAND_SetTeamProperties">
+ <English>Set Squad Properties</English>
+ <French>Définir Propriétés Equipe</French>
+ <German>Kampfverhalten des Squad festlegen</German>
+ <Russian>Set Squad Properties</Russian>
+ <Italian>Set Squad Properties</Italian>
+ </Key>
+ <Key ID="STR_WF_COMMAND_Speed">
+ <English>Speed:</English>
+ <French>Vitesse:</French>
+ <German>Geschwindigkeit:</German>
+ <Russian>Скорость:</Russian>
+ <Italian>Velocità:</Italian>
+ </Key>
+ <Key ID="STR_WF_COMMAND_SquadManagmentLabel">
+ <English>Squadmember Management</English>
+ <French>Management d'Equipiers</French>
+ <German>Squadmitglieder verwalten</German>
+ <Russian>Squadmember Management</Russian>
+ <Italian>Squadmember Management</Italian>
+ </Key>
+ <Key ID="STR_WF_COMMAND_SquadSettingsLabel"><!--shared W-->
+ <English>Squad Management</English>
+ <French>Management d'Equipes</French>
+ <German>Squadverwaltung</German>
+ <Russian>Squad Management</Russian>
+ <Italian>Squad Management</Italian>
+ </Key>
+ <Key ID="STR_WF_COMMAND_TakeTowns"><!--shared W-->
+ <English>Take Towns</English>
+ <French>Prendre Villes</French>
+ <German>Städte einnehmen</German>
+ <Russian>Захватывать города</Russian>
+ <Italian>Cattura Città</Italian>
+ </Key>
+ <Key ID="STR_WF_COMMAND_Tasks">
+ <English>Special Tasks</English>
+ <French>Tâches spécifiques</French>
+ <German>Spezialaufträge</German>
+ <Russian>Special Tasks</Russian>
+ <Italian>Special Tasks</Italian>
+ </Key>
+ <Key ID="STR_WF_COMMAND_TaskTO_Do">
+ <English>Task Type</English>
+ <French>Type de Tâche</French>
+ <German>Auftrag</German>
+ <Russian>Тип задачи</Russian>
+ <Italian>Tipi di Incarichi</Italian>
+ </Key>
+ <Key ID="STR_WF_COMMAND_TaskTO_Set">
+ <English>Send the order to the squad</English>
+ <French>Envoyer l'ordre à l'équipe</French>
+ <German>Spezialauftrag an Squad senden</German>
+ <Russian>Envoyer l'ordre à l'équipe</Russian>
+ <Italian>Envoyer l'ordre à l'équipe</Italian>
+ </Key>
+ <Key ID="STR_WF_COMMAND_TaskTO_Time">
+ <English>Task Duration</English>
+ <French>Durée de la Tâche</French>
+ <German>Auftragsdauer</German>
+ <Russian>Продолж. задачи</Russian>
+ <Italian>Durata Incarichi</Italian>
+ </Key>
+ <Key ID="STR_WF_COMMAND_UnflipButton">
+ <English>Unflip Vehicle</English>
+ <French>Retourner</French>
+ <German>Fahrzeug aufrichten</German>
+ <Russian>Перевернуть</Russian>
+ <Italian>Ribalta</Italian>
+ </Key>
+
+<!--EASA Menu - ALL DONE-->
+ <Key ID="STR_WF_EASA">
+ <English>Exchangeable Armament System</English>
+ <French>Système d'Echange d'Armement</French>
+ <German>Austauschbares Bewaffnungssystem</German>
+ <Russian>Система Смены Вооружения</Russian>
+ <Italian>Sistema di cambio Armamento</Italian>
+ </Key>
+
+<!--Economy Menu - ALL DONE-->
+ <Key ID="STR_WF_ECONOMY_DisbandWorker">
+ <English>Disband Worker</English>
+ <French>Supprimer Travailleur</French>
+ <German>Arbeiter entfernen</German>
+ <Russian>Disband Worker</Russian>
+ <Italian>Disband Worker</Italian>
+ </Key>
+ <Key ID="STR_WF_ECONOMY_HireWorker">
+ <English>Hire Worker</English>
+ <French>Engager Travailleur</French>
+ <German>Arbeiter anwerben</German>
+ <Russian>Нанять рабочего</Russian>
+ <Italian>Hire Worker</Italian>
+ </Key>
+ <Key ID="STR_WF_ECONOMY_Income_Sys"><!--shared W-->
+ <English>Income Distribution:</English>
+ <French>Distribution de Salaire:</French>
+ <German>Einkommensverteilung:</German>
+ <Russian>Income Distribution:</Russian>
+ <Italian>Income Distribution:</Italian>
+ </Key>
+ <Key ID="STR_WF_ECONOMY_Income_Sys_Com">
+ <English>Commander Income</English>
+ <French>Salaire Commandant</French>
+ <German>Einkommen für den Commander</German>
+ <Russian>Доход Командира</Russian>
+ <Italian>Commander Income</Italian>
+ </Key>
+ <Key ID="STR_WF_ECONOMY_Income_Sys_Ply">
+ <English>Squadleaders Income</English>
+ <French>Salaire Chef d'Equipe</French>
+ <German>Einkommen für die Squadleader</German>
+ <Russian>Squadleaders Income</Russian>
+ <Italian>Squadleaders Income</Italian>
+ </Key>
+ <Key ID="STR_WF_ECONOMY_SetIncome">
+ <English>Set Income Distribution</English>
+ <French>Définir le Salaire</French>
+ <German>Einkommensverteilung festlegen</German>
+ <Russian>Set Income Distribution</Russian>
+ <Italian>Set Income Distribution</Italian>
+ </Key>
+ <Key ID="STR_WF_ECONOMY_SellStructure">
+ <English>Sell Structure</English>
+ <French>Vendre Structure</French>
+ <German>Gebäude verkaufen</German>
+ <Russian>Продать постройку</Russian>
+ <Italian>Vendi Strutture</Italian>
+ </Key>
+ <Key ID="STR_WF_ECONOMY_Workers"><!--shared W-->
+ <English>HQ-Workers:</English>
+ <French>HQ-Travailleurs:</French>
+ <German>HQ-Arbeiter:</German>
+ <Russian>HQ-рабочие:</Russian>
+ <Italian>HQ-Workers:</Italian>
+ </Key>
+
+<!--END Strings - ALL DONE-->
+ <Key ID="STR_WF_END_Soldier_Lost">
+ <English>Soldiers Lost</English>
+ <French>Soldats Perdus</French>
+ <German>Soldaten verloren</German>
+ <Russian>Погибло солдат</Russian>
+ <Italian>Soldati Persi</Italian>
+ </Key>
+ <Key ID="STR_WF_END_Soldier_Recruited">
+ <English>Soldier Recruited</English>
+ <French>Soldats Recrutés</French>
+ <German>Soldaten rekrutiert</German>
+ <Russian>Мобилизовано солдат</Russian>
+ <Italian>Soldati Reclutati</Italian>
+ </Key>
+ <Key ID="STR_WF_END_Vehicle_Built">
+ <English>Vehicles Built</English>
+ <French>Véhicules Construits</French>
+ <German>Fahrzeuge gebaut</German>
+ <Russian>Техники построено</Russian>
+ <Italian>Veicoli Costruiti</Italian>
+ </Key>
+ <Key ID="STR_WF_END_Vehicle_Lost">
+ <English>Vehicles Lost</English>
+ <French>Véhicules Perdus</French>
+ <German>Fahrzeuge verloren</German>
+ <Russian>Техники потеряно</Russian>
+ <Italian>Veicoli Persi</Italian>
+ </Key>
+ <Key ID="STR_WF_END_Victory">
+ <English>%1 Team has won</English>
+ <French>L'équipe %1 a gagné</French>
+ <German>Team %1 hat gewonnen</German>
+ <Russian>%1 выиграл!</Russian>
+ <Italian>%1 ha Vinto!</Italian>
+ </Key>
+
+<!--BuyGear Menu - ALL DONE-->
+ <Key ID="STR_WF_GEAR_CostLabel">
+ <English>Cost:</English>
+ <French>Coût:</French>
+ <German>Kosten:</German>
+ <Russian>Цена:</Russian>
+ <Italian>Costo:</Italian>
+ </Key>
+ <Key ID="STR_WF_GEAR_Cost"><!--shared W-->
+ <English>$%1</English>
+ <French>$%1</French>
+ <German>$%1</German>
+ <Russian>$%1</Russian>
+ <Italian>$%1</Italian>
+ </Key>
+ <Key ID="STR_WF_GEAR_CashLabel"><!--shared W-->
+ <English>Funds:</English>
+ <French>Fonds:</French>
+ <German>Guthaben:</German>
+ <Russian>Деньги:</Russian>
+ <Italian>Fondi:</Italian>
+ </Key>
+ <Key ID="STR_WF_GEAR_MenuEquip">
+ <English>Equipements</English>
+ <French>Equipements</French>
+ <German>Ausrüstung</German>
+ <Russian>Снаряжение</Russian>
+ <Italian>Equipaggiamento</Italian>
+ </Key>
+ <Key ID="STR_WF_GEAR_SquadMember">
+ <English>Squadmember:</English>
+ <French>Equipier:</French>
+ <German>Squadmitglied:</German>
+ <Russian>Squadmember:</Russian>
+ <Italian>Squadmember:</Italian>
+ </Key>
+ <Key ID="STR_WF_Respawn_Cost">
+ <English>Respawn Cost: $ %1.</English>
+ <French>Respawn Coût: $ %1.</French>
+ <German>Respawn Kosten: $ %1.</German>
+ <Russian>Возрожд Цена: $ %1.</Russian>
+ <Italian>Respawn Costo: $ %1.</Italian>
+ </Key>
+ <Key ID="STR_WF_Countermeasures">
+ <English>Countermeasures</English>
+ <French>Contres Mesures</French>
+ <German>Täuschkörper</German>
+ <Russian>Контрмеры</Russian>
+ <Italian>Contromisure</Italian>
+ </Key>
+ <Key ID="STR_WF_GEAR_TemplateSave">
+ <English>Save Template</English>
+ <French>Sauvegarder Template</French>
+ <German>Template speichern</German>
+ <Russian>Save Template</Russian>
+ <Italian>Save Template</Italian>
+ </Key>
+
+<!--INFO Strings - ALL DONE-->
+ <Key ID="STR_WF_INFO_BaseArea_Reached">
+ <English>Information:\n\n You've reached the bases area limit, you can sell old buildings or build in an existing base area.</English>
+ <French>Information:\n\n La limite de bases est atteinte, il est possible de vendre des vieilles structures ou de construire dans une base existante.</French>
+ <German>Information:\n\n Die maximal erlaubte Anzahl an HQs wurde erreicht. Du kannst entweder alte Gebäude verkaufen oder in einer bereits bestehenden Base weiterbauen.</German>
+ <Russian>Информация:\n\n Количество районов для баз достигло предела, вы можете продать старые здания, или построить в районе существующей базы.</Russian>
+ <Italian>Informazioni:\n\n Hai raggiunto il limite di aree basi, puoi vendere le vecchie costruzioni o costruire in un area base esistente.</Italian>
+ </Key>
+ <Key ID="STR_WF_INFO_Camps_Purchase">
+ <English>&lt;t color='#F8D664'&gt;Information:&lt;/t&gt;&lt;br/&gt;&lt;br/&gt; Infantry may not be purchased while camps in the city are held by the enemy.</English>
+ <French>&lt;t color='#F8D664'&gt;Information:&lt;/t&gt;&lt;br/&gt;&lt;br/&gt; Il est impossible d'acheter de l'infantrie tant que l'ennemi détient un ou plusieurs camps.</French>
+ <German>&lt;t color='#F8D664'&gt;Information:&lt;/t&gt;&lt;br/&gt;&lt;br/&gt; Infantry may not be purchased while camps in the city are held by the enemy.</German>
+ <Russian>&lt;t color='#F8D664'&gt;Информация:&lt;/t&gt;&lt;br/&gt;&lt;br/&gt; Infantry may not be purchased while camps in the city are held by the enemy.</Russian>
+ <Italian>&lt;t color='#F8D664'&gt;Informazioni:&lt;/t&gt;&lt;br/&gt;&lt;br/&gt; Infantry may not be purchased while camps in the city are held by the enemy.</Italian>
+ </Key>
+ <Key ID="STR_WF_INFO_Hook_Manned">
+ <English>Information:\n\n Manned Vehicles cannot be hooked. Make sure that the vehicle is empty.</English>
+ <French>Information:\n\n Les véhicules avec équipage ne peuvent être accrochées. Assurez-vous que le véhicule est vide.</French>
+ <German>Information:\n\n Es können nur unbemannte Fahrzeuge an den Haken genommen werden. Versichere dich, dass das Fahrzeug leer ist und versuche es noch einmal.</German>
+ <Russian>Информация:\n\n Техника с юнитами не может перевозиться. Убедись что техника пуста.</Russian>
+ <Italian>Informazioni:\n\n I veicoli con a bordo personale non possono essere agganciati, assicurati che sia vuoto.</Italian>
+ </Key>
+ <Key ID="STR_WF_INFO_Lockpick_Failed">
+ <English>Information:\n\n You've failed to unlock the vehicle.</English>
+ <French>Information:\n\n Vous n'avez pas réussi à déverouiller le véhicule.</French>
+ <German>Information:\n\n Der Versuch, das Fahrzeug mit einem Dietrich zu öffnen ist fehlgeschlagen.\n\n Scheint, als wurde der Dietrich im Baumarkt gekauft, versuche es weiter.</German>
+ <Russian>Информация:\n\n Вам не удалось открыть транспорт отмычкой.</Russian>
+ <Italian>Informazioni:\n\n Non sei riuscito ad aprire il veicolo.</Italian>
+ </Key>
+ <Key ID="STR_WF_INFO_Lockpick_Succeed">
+ <English>Information:\n\n The vehicle has been successfully unlocked.</English>
+ <French>Information:\n\n Le véhicule à été déverouillé avec succès.</French>
+ <German>Information:\n\n Du hast das Fahrzeug mittels einem Dietrich erfolgreich geöffnet.</German>
+ <Russian>Информация:\n\n Транспорт успешно открыт отмычкой.</Russian>
+ <Italian>Informazioni:\n\n Sei riuscito ad aprire il veicolo.</Italian>
+ </Key>
+ <Key ID="STR_WF_INFO_Mission_Running">
+ <English>Information:\n\n You cannot take another mission while you already have one. Complete it or abort it first.</English>
+ <French>Information:\n\n Vous ne pouvez pas prendre une autre mission car il y a déjà une mission en cours. Terminée la ou abandonée la.</French>
+ <German>Information:\n\n Es ist nicht möglich einen anderen Auftrag zu wählen wenn dir bereits einer zugeordnet ist. Erfülle diesen zuerst oder stoppe den laufenden Auftrag und wähle dann eine neue Stadt als Ziel aus.</German>
+ <Russian>Информация:\n\n Вы не можете выбрать другое задание, не завершив или не отменив текущее.</Russian>
+ <Italian>Informazioni:\n\n Non puoi prendere un'altra missione se ne hai già un'altra, completala o abbandonala prima.</Italian>
+ </Key>
+ <Key ID="STR_WF_INFO_Mission_Abort">
+ <English>Information:\n\n Current Mission Aborted.</English>
+ <French>Information:\n\n Mission en cours Annulé.</French>
+ <German>Information:\n\n Der aktuelle Auftrag wurde abgebrochen.</German>
+ <Russian>Информация:\n\n Текущее задание отменено.</Russian>
+ <Italian>Informazioni:\n\n Missione Attuale Annullata.</Italian>
+ </Key>
+ <Key ID="STR_WF_INFO_NoArty"><!--need rework -0.71-->
+ <English>Information:\n\n You need at last one artillery in order to call a Fire Mission.</English>
+ <French>Information:\n\n Au moins une unité d'artillerie est nécessaire pour utiliser un Appuie Feu.</French>
+ <German>Information:\n\n Du benötigst mindestens eine Artillerie-Einheit, um einen Feuerbefehl erteilen zu können.\n\n Wenn du schon eine besitzt, versichere dich, dass du diese auch ausgewählt hast.</German>
+ <Russian>Информация:\n\n Для вызова артиллерии у Вас должна быть хотя бы одна арт. установка.</Russian>
+ <Italian>Informazioni:\n\n Hai bisogno di almeno un unità di artiglieria per chiamare il fuoco di soppressione.</Italian>
+ </Key>
+ <Key ID="STR_WF_INFO_Paratroop_Info">
+ <English>Information:\n\n An aerial unit has been called according to your order, it shall arrive here quite soon.</English>
+ <French>Information:\n\n Une unité aérienne a été assigner sur votre demande, elle sera la sous peut.</French>
+ <German>Information:\n\n Die angeforderten Fallschirmjäger sind auf dem Weg zur Absetzstelle.</German>
+ <Russian>Информация:\n\n По вашему приказу вызван десантный ЛА, он скоро прибудет на место.</Russian>
+ <Italian>Informazioni:\n\n Un unità aerea è stata assegnata su vostra richiesta, arriverà presto.</Italian>
+ </Key>
+ <Key ID="STR_WF_INFO_RespawnInfo">
+ <English>Information:\n\n You can select a respawn location by clicking on the map Yellow Circle.</English>
+ <French>Information:\n\n Il est possible de sélectionner un point de réapparation en cliquant sur les Cercles Jaunes de la carte.</French>
+ <German>Information:\n\n Wähle deinen Respawnpunkt in dem du auf einen der gelben Kreise klickst.</German>
+ <Russian>Информация:\n\n Вы можете выбрать место возрождения, кликнув по желтому кругу на карте.</Russian>
+ <Italian>Informazioni:\n\n Puoi selezionare un punto di riapparizione cliccando sui cerchi gialli nella mappa.</Italian>
+ </Key>
+ <Key ID="STR_WF_INFO_Repair_MHQ_BeingRepaired">
+ <English>Information:\n\n The MHQ is already being repaired.</English>
+ <French>Information:\n\n Le PC est déjà en cours de réparation.</French>
+ <German>Information:\n\n Das MHQ ist bereits repariert.</German>
+ <Russian>Информация:\n\n КШМ уже в ремонте.</Russian>
+ <Italian>Informazioni:\n\n The MHQ is already being repaired.</Italian>
+ </Key>
+ <Key ID="STR_WF_INFO_Repair_MHQ_Funds">
+ <English>Information:\n\n %1 %2 Needed in order to repair the MHQ.</English>
+ <French>Information:\n\n %1 %2 Manquant afin de réparer le PC.</French>
+ <German>Information:\n\n %1 %2 sind erforderlich um das MHQ zu reparieren.</German>
+ <Russian>Информация:\n\n %1 %2 необходимо для восстановления КШМ.</Russian>
+ <Italian>Informazioni:\n\n %1 %2 Needed in order to repair the MHQ.</Italian>
+ </Key>
+ <Key ID="STR_WF_INFO_Repair_MHQ_None"><!--need rework -0.71-->
+ <English>Information:\n\n There is no MHQ to repair around.</English>
+ <French>Information:\n\n Il n'y a aucun PC à réparer a proximité.</French>
+ <German>Information:\n\n Es ist kein MHQ in der Nähe das repariert werden muss.\n\n Verichere dich, dass der Reparatur LKW nah genug am MHQ steht.</German>
+ <Russian>Информация:\n\n There is no MHQ to repair around.</Russian>
+ <Italian>Informazioni:\n\n There is no MHQ to repair around.</Italian>
+ </Key>
+ <Key ID="STR_WF_INFO_Repair_MHQ_Repair">
+ <English>Information:\n\n The MHQ is being fixed...</English>
+ <French>Information:\n\n Le PC est en cours de réparation...</French>
+ <German>Information:\n\n Das MHQ wird repariert...</German>
+ <Russian>Информация:\n\n КШМ ремонтируется...</Russian>
+ <Italian>Informazioni:\n\n The MHQ is being fixed...</Italian>
+ </Key>
+ <Key ID="STR_WF_INFO_Supply_Deliver">
+ <English>Information:\n\n A Supply truck of your team has delivered supplies at %1, the supply value is now %2/%3. $%4. Gained during the delivery.</English>
+ <French>Information:\n\n Un Camion Logistique de votre équipe a livré de la logistique à %1, la valeur logistique est désormais de %2/%3. $%4. gagné lors de la livraison.</French>
+ <German>Information:\n\n Ein Versorgungs LKW deines Teams hat Nachschub zu %1 geliefert, neuer Stand: %2/%3. Du hast $%4 für die Lieferung erhalten.</German>
+ <Russian>Информация:\n\n Грузовик снабжения доставил 1% единиц припасов. Объем припасов %2/%3. $%4 Получено во время доставки.</Russian>
+ <Italian>Informazioni:\n\n Un Camion Supply del tuo Team ha consegnato a %1, il valore dei rifornimenti è ora %2/%3. $%4. Aumentati durante la consegna.</Italian>
+ </Key>
+ <Key ID="STR_WF_INFO_Supply_Equal">
+ <English>Information:\n\n A Supply truck of your team has delivered supplies at %1, the supply value is %2/%3.</English>
+ <French>Information:\n\n Un Camion Logistique de votre équipe a livré de la logistique à %1, la valeur logistique est de %2/%3.</French>
+ <German>Information:\n\n Ein Versorgungs LKW deines Teams hat Nachschub zu %1 geliefert, neuer Stand: %2/%3.</German>
+ <Russian>Информация:\n\n Грузовик снабжения доставил %1 единиц припасов, Объем припасов %2/%3.</Russian>
+ <Italian>Informazioni:\n\n Un Camion Supply del tuo Team ha consegnato a %1, il valore dei rifornimenti è ora %2/%3.</Italian>
+ </Key>
+ <Key ID="STR_WF_INFO_Supply_Full">
+ <English>Information:\n\n The Supply truck is fully loaded.</English>
+ <French>Information:\n\n Le Camion Logistique est chargé au maximum.</French>
+ <German>Information:\n\n Der Versorgungs LKW ist voll beladen.</German>
+ <Russian>Информация:\n\n Грузовик снабжения заполнен.</Russian>
+ <Italian>Informazioni:\n\n Il Camion Supply è completamente carico.</Italian>
+ </Key>
+ <Key ID="STR_WF_INFO_Supply_Status">
+ <English>Information:\n\n The Supply truck has %1 supplies in cargo.</English>
+ <French>Information:\n\n Le Camion Logistique dispose de %1 logistique en chargement.</French>
+ <German>Information:\n\n Der Versorgungs LKW hat %1 Einheiten geladen.</German>
+ <Russian>Информация:\n\n В грузовик снабжения загружено %1 единиц поставки.</Russian>
+ <Italian>Informazioni:\n\n Il Camion Supply ha caricato %1 Supply.</Italian>
+ </Key>
+ <Key ID="STR_WF_INFO_Spot_Info"><!--need rework -0.71-->
+ <English>Information:\n\n Spotting Ability require the use of binoculars.</English>
+ <French>Information:\n\n Le Repérage requiert l'utilisation d'une paire de jumelle.</French>
+ <German>Information:\n\n Zum Beobachten wird ein Fernglas benötigt!\n\n Über das Ausrüstungsmenü kannst du dir ein Fernglas kaufen.</German>
+ <Russian>Информация:\n\n Чтобы указать цель используйте бинокль.</Russian>
+ <Italian>Informazioni:\n\n Hai bisogno del binocolo per Individuare.</Italian>
+ </Key>
+ <Key ID="STR_WF_INFO_Upgrade_Start">
+ <English>Information:\n\n Starting %1 Upgrade.</English>
+ <French>Information:\n\n Amélioration %1 en cours.</French>
+ <German>Information:\n\n Der Ausbau für %1 wurde gestartet.</German>
+ <Russian>Информация:\n\n Начата модернизация: %1.</Russian>
+ <Italian>Informazioni:\n\n Aggiornamento %1 in corso.</Italian>
+ </Key>
+ <!--Info Strings (color) - ALL DONE-->
+ <Key ID="STR_WF_INFO_BuyEffective"><!--shared U-->
+ <English>&lt;t color='#F8D664'&gt;Information:&lt;/t&gt;&lt;br/&gt;&lt;br/&gt; Building &lt;t color='#85B5FA'&gt;%1&lt;/t&gt;.</English>
+ <French>&lt;t color='#F8D664'&gt;Information:&lt;/t&gt;&lt;br/&gt;&lt;br/&gt; &lt;t color='#85B5FA'&gt;%1&lt;/t&gt; en Production.</French>
+ <German>&lt;t color='#F8D664'&gt;Information:&lt;/t&gt;&lt;br/&gt;&lt;br/&gt; Dein &lt;t color='#85B5FA'&gt;%1&lt;/t&gt; wird gebaut.</German>
+ <Russian>&lt;t color='#F8D664'&gt;Информация:&lt;/t&gt;&lt;br/&gt;&lt;br/&gt; &lt;t color='#85B5FA'&gt;%1&lt;/t&gt; в производстве.</Russian>
+ <Italian>&lt;t color='#F8D664'&gt;Informazioni:&lt;/t&gt;&lt;br/&gt;&lt;br/&gt; &lt;t color='#85B5FA'&gt;%1&lt;/t&gt; In Costruzione.</Italian>
+ </Key>
+ <Key ID="STR_WF_INFO_Build_Complete">
+ <English>&lt;t color='#F8D664'&gt;Information:&lt;/t&gt;&lt;br/&gt;&lt;br/&gt; Your &lt;t color='#85B5FA'&gt;%1&lt;/t&gt; has arrived.</English>
+ <French>&lt;t color='#F8D664'&gt;Information:&lt;/t&gt;&lt;br/&gt;&lt;br/&gt; Votre &lt;t color='#85B5FA'&gt;%1&lt;/t&gt; est arrivé.</French>
+ <German>&lt;t color='#F8D664'&gt;Information:&lt;/t&gt;&lt;br/&gt;&lt;br/&gt; Dein &lt;t color='#85B5FA'&gt;%1&lt;/t&gt; ist angekommen.</German>
+ <Russian>&lt;t color='#F8D664'&gt;Информация:&lt;/t&gt;&lt;br/&gt;&lt;br/&gt; &lt;t color='#85B5FA'&gt;%1&lt;/t&gt; готов.</Russian>
+ <Italian>&lt;t color='#F8D664'&gt;Informazioni:&lt;/t&gt;&lt;br/&gt;&lt;br/&gt; il Tuo &lt;t color='#85B5FA'&gt;%1&lt;/t&gt; è arrivato.</Italian>
+ </Key>
+ <Key ID="STR_WF_INFO_EASA_Purchase">
+ <English>&lt;t color='#F8D664'&gt;Information:&lt;/t&gt;&lt;br/&gt;&lt;br/&gt; EASA Setup Purchased: &lt;t color='#85B5FA'&gt;%1&lt;/t&gt;.</English>
+ <French>&lt;t color='#F8D664'&gt;Information:&lt;/t&gt;&lt;br/&gt;&lt;br/&gt; Configuration EASA achetée: &lt;t color='#85B5FA'&gt;%1&lt;/t&gt;.</French>
+ <German>&lt;t color='#F8D664'&gt;Information:&lt;/t&gt;&lt;br/&gt;&lt;br/&gt; EASA Einstellung erworben: &lt;t color='#85B5FA'&gt;%1&lt;/t&gt;.</German>
+ <Russian>&lt;t color='#F8D664'&gt;Информация:&lt;/t&gt;&lt;br/&gt;&lt;br/&gt; Приобретен набор EASA: &lt;t color='#85B5FA'&gt;%1&lt;/t&gt;.</Russian>
+ <Italian>&lt;t color='#F8D664'&gt;Informazioni:&lt;/t&gt;&lt;br/&gt;&lt;br/&gt; EASA Setup Acquistato: &lt;t color='#85B5FA'&gt;%1&lt;/t&gt;.</Italian>
+ </Key>
+ <Key ID="STR_WF_INFO_Funds_Missing"><!--shared W-->
+ <English>&lt;t color='#F8D664'&gt;Information:&lt;/t&gt;&lt;br/&gt;&lt;br/&gt; You are currently missing $&lt;t color='#85B5FA'&gt;%1&lt;/t&gt; in order to buy: &lt;t color='#85B5FA'&gt;%2&lt;/t&gt;.</English>
+ <French>&lt;t color='#F8D664'&gt;Information:&lt;/t&gt;&lt;br/&gt;&lt;br/&gt; Il vous manque $&lt;t color='#85B5FA'&gt;%1&lt;/t&gt; pour acheter: &lt;t color='#85B5FA'&gt;%2&lt;/t&gt;.</French>
+ <German>&lt;t color='#F8D664'&gt;Information:&lt;/t&gt;&lt;br/&gt;&lt;br/&gt; Du hast nicht genug Geld!&lt;br/&gt;&lt;br/&gt;Dir fehlen $&lt;t color='#85B5FA'&gt;%1&lt;/t&gt; um &lt;t color='#85B5FA'&gt;%2&lt;/t&gt; kaufen zu können.</German>
+ <Russian>&lt;t color='#F8D664'&gt;Информация:&lt;/t&gt;&lt;br/&gt;&lt;br/&gt; Не хватает $&lt;t color='#85B5FA'&gt;%1&lt;/t&gt; для покупки: &lt;t color='#85B5FA'&gt;%2&lt;/t&gt;.</Russian>
+ <Italian>&lt;t color='#F8D664'&gt;Informazioni:&lt;/t&gt;&lt;br/&gt;&lt;br/&gt; Ti Mancano $&lt;t color='#85B5FA'&gt;%1&lt;/t&gt; per comprare: &lt;t color='#85B5FA'&gt;%2&lt;/t&gt;.</Italian>
+ </Key>
+ <Key ID="STR_WF_INFO_Funds_Missing_Gear"><!--shared U-->
+ <English>&lt;t color='#F8D664'&gt;Information:&lt;/t&gt;&lt;br/&gt;&lt;br/&gt; You are currently missing $&lt;t color='#85B5FA'&gt;%1&lt;/t&gt; in order to buy this loadout.</English>
+ <French>&lt;t color='#F8D664'&gt;Information:&lt;/t&gt;&lt;br/&gt;&lt;br/&gt; Il vous manque $&lt;t color='#85B5FA'&gt;%1&lt;/t&gt; pour acheter cette configuration d'équipement.</French>
+ <German>&lt;t color='#F8D664'&gt;Information:&lt;/t&gt;&lt;br/&gt;&lt;br/&gt; Du hast nicht genug Geld!&lt;br/&gt;&lt;br/&gt;Dir fehlen $&lt;t color='#85B5FA'&gt;%1&lt;/t&gt; um dir deine Ausrüstung kaufen zu können.</German>
+ <Russian>&lt;t color='#F8D664'&gt;Информация:&lt;/t&gt;&lt;br/&gt;&lt;br/&gt; Не хватает $&lt;t color='#85B5FA'&gt;%1&lt;/t&gt; для покупки снаряжения</Russian>
+ <Italian>&lt;t color='#F8D664'&gt;Informazioni:&lt;/t&gt;&lt;br/&gt;&lt;br/&gt; Ti Mancano $&lt;t color='#85B5FA'&gt;%1&lt;/t&gt; per comprare questo equipaggiamento.</Italian>
+ </Key>
+ <Key ID="STR_WF_INFO_Gear_AllowTwo"><!--shared U-->
+ <English>&lt;t color='#F8D664'&gt;Information:&lt;/t&gt;&lt;br/&gt;&lt;br/&gt; This weapon/loadout cannot be purchased due to your current loadout settings. &lt;br/&gt;&lt;br/&gt; (The &lt;t color='#85B5FA'&gt;Realistic Gear&lt;/t&gt; parameter prevent the use of heavy primary weapons with launchers or backpacks).</English>
+ <French>&lt;t color='#F8D664'&gt;Information:&lt;/t&gt;&lt;br/&gt;&lt;br/&gt; Cette arme ou ensemble d'équipement ne peut être acheter en raison de votre équipement courant (Le paramètre &lt;t color='#85B5FA'&gt; Equipement réalistique &lt;/t&gt; empêche l'utilisation d'armement lourd avec des lance-missiles ou des sac à dos).</French>
+ <German>&lt;t color='#F8D664'&gt;Information:&lt;/t&gt;&lt;br/&gt;&lt;br/&gt; Diese Waffe bzw. diese Ausrüstungszusammenstellung kann nicht gekauft werden.&lt;br/&gt;&lt;br/&gt;Der Parameter &lt;t color='#85B5FA'&gt;Realistische Ausrüstung&lt;/t&gt; verbietet die Verwendung von schweren Primärwaffen mit Raketenwerfern und/oder Rucksäcken.</German>
+ <Russian>&lt;t color='#F8D664'&gt;Информация:&lt;/t&gt;&lt;br/&gt;&lt;br/&gt; Это оружие/не может быть куплено из за настроек игры. &lt;br/&gt;&lt;br/&gt; (The &lt;t color='#85B5FA'&gt;Реалистичное оружие&lt;/t&gt; параметр использования тяжелого оружия с гранатометами или рюкзаками).</Russian>
+ <Italian>&lt;t color='#F8D664'&gt;Informazioni:&lt;/t&gt;&lt;br/&gt;&lt;br/&gt; Questo tipo di equipaggiamento non può essere acquistato a causa delle impostazioni attuali sull'armamento. &lt;br/&gt;&lt;br/&gt; (Il parametro &lt;t color='#85B5FA'&gt;Armamento Realistico&lt;/t&gt; impedisce l'uso di armi pesanti con lanciarazzi o zaini).</Italian>
+ </Key>
+ <Key ID="STR_WF_INFO_Healing">
+ <English>&lt;t color='#F8D664'&gt;Information:&lt;/t&gt;&lt;br/&gt;&lt;br/&gt; A &lt;t color='#85B5FA'&gt;%1&lt;/t&gt; is being healed. &lt;br/&gt;&lt;br/&gt;Please wait for &lt;t color='#85B5FA'&gt;%2&lt;/t&gt; seconds during the healing...</English>
+ <French>&lt;t color='#F8D664'&gt;Information:&lt;/t&gt;&lt;br/&gt;&lt;br/&gt; Un &lt;t color='#85B5FA'&gt;%1&lt;/t&gt; est en cours de soins. &lt;br/&gt;&lt;br/&gt;Veuillez attendre &lt;t color='#85B5FA'&gt;%2&lt;/t&gt; secondes durant les soins...</French>
+ <German>&lt;t color='#F8D664'&gt;Information:&lt;/t&gt;&lt;br/&gt;&lt;br/&gt; &lt;t color='#85B5FA'&gt;%1&lt;/t&gt; wird behandelt. &lt;br/&gt;&lt;br/&gt;Die Behandlung dauert &lt;t color='#85B5FA'&gt;%2&lt;/t&gt; Sekunden...</German>
+ <Russian>&lt;t color='#F8D664'&gt;Информация:&lt;/t&gt;&lt;br/&gt;&lt;br/&gt; A &lt;t color='#85B5FA'&gt;%1&lt;/t&gt; лечится. &lt;br/&gt;&lt;br/&gt;Пожалуйста подождите &lt;t color='#85B5FA'&gt;%2&lt;/t&gt; секунд для лечения...</Russian>
+ <Italian>&lt;t color='#F8D664'&gt;Informazioni:&lt;/t&gt;&lt;br/&gt;&lt;br/&gt; A &lt;t color='#85B5FA'&gt;%1&lt;/t&gt; is being healed. &lt;br/&gt;&lt;br/&gt;Please wait for &lt;t color='#85B5FA'&gt;%2&lt;/t&gt; seconds during the healing...</Italian>
+ </Key>
+ <Key ID="STR_WF_INFO_Heal_Failed">
+ <English>&lt;t color='#F8D664'&gt;Information:&lt;/t&gt;&lt;br/&gt;&lt;br/&gt; A &lt;t color='#85B5FA'&gt;%1&lt;/t&gt; has failed to be healed.</English>
+ <French>&lt;t color='#F8D664'&gt;Information:&lt;/t&gt;&lt;br/&gt;&lt;br/&gt; Un &lt;t color='#85B5FA'&gt;%1&lt;/t&gt; n'a pas été soigner.</French>
+ <German>&lt;t color='#F8D664'&gt;Information:&lt;/t&gt;&lt;br/&gt;&lt;br/&gt; Die Behandlung des &lt;t color='#85B5FA'&gt;%1&lt;/t&gt; ist fehlgeschlagen.</German>
+ <Russian>&lt;t color='#F8D664'&gt;Информация:&lt;/t&gt;&lt;br/&gt;&lt;br/&gt; &lt;t color='#85B5FA'&gt;%1&lt;/t&gt; не вылечен.</Russian>
+ <Italian>&lt;t color='#F8D664'&gt;Informazioni:&lt;/t&gt;&lt;br/&gt;&lt;br/&gt; A &lt;t color='#85B5FA'&gt;%1&lt;/t&gt; has failed to be healed.</Italian>
+ </Key>
+ <Key ID="STR_WF_INFO_Heal_Success">
+ <English>&lt;t color='#F8D664'&gt;Information:&lt;/t&gt;&lt;br/&gt;&lt;br/&gt; A &lt;t color='#85B5FA'&gt;%1&lt;/t&gt; has been successfully healed.</English>
+ <French>&lt;t color='#F8D664'&gt;Information:&lt;/t&gt;&lt;br/&gt;&lt;br/&gt; Un &lt;t color='#85B5FA'&gt;%1&lt;/t&gt; a été soigner.</French>
+ <German>&lt;t color='#F8D664'&gt;Information:&lt;/t&gt;&lt;br/&gt;&lt;br/&gt; Der &lt;t color='#85B5FA'&gt;%1&lt;/t&gt; wurde erfolgreich behandelt.</German>
+ <Russian>&lt;t color='#F8D664'&gt;Информация:&lt;/t&gt;&lt;br/&gt;&lt;br/&gt; A &lt;t color='#85B5FA'&gt;%1&lt;/t&gt; вылечен.</Russian>
+ <Italian>&lt;t color='#F8D664'&gt;Informazioni:&lt;/t&gt;&lt;br/&gt;&lt;br/&gt; A &lt;t color='#85B5FA'&gt;%1&lt;/t&gt; has been successfully healed.</Italian>
+ </Key>
+ <Key ID="STR_WF_INFO_MaxGroup"><!--shared U-->
+ <English>&lt;t color='#F8D664'&gt;Information:&lt;/t&gt;&lt;br/&gt;&lt;br/&gt; Units Limit reached (&lt;t color='#85B5FA'&gt;%1&lt;/t&gt; Units).</English>
+ <French>&lt;t color='#F8D664'&gt;Information:&lt;/t&gt;&lt;br/&gt;&lt;br/&gt; Maximum d'Unité atteint (&lt;t color='#85B5FA'&gt;%1&lt;/t&gt; Unités).</French>
+ <German>&lt;t color='#F8D664'&gt;Information:&lt;/t&gt;&lt;br/&gt;&lt;br/&gt; Das Einheiten-Limit wurde erreicht&lt;br /&gt;&lt;br /&gt; (max.&lt;t color='#85B5FA'&gt;%1&lt;/t&gt; Einheiten).</German>
+ <Russian>&lt;t color='#F8D664'&gt;Информация:&lt;/t&gt;&lt;br/&gt;&lt;br/&gt; Достигнут лимит отряда (&lt;t color='#85B5FA'&gt;%1&lt;/t&gt; человек).</Russian>
+ <Italian>&lt;t color='#F8D664'&gt;Informazioni:&lt;/t&gt;&lt;br/&gt;&lt;br/&gt; Limite Unità Raggiunto (&lt;t color='#85B5FA'&gt;%1&lt;/t&gt; Unità).</Italian>
+ </Key>
+ <Key ID="STR_WF_INFO_OffmapWarning">
+ <English>&lt;t color='#EB0606'&gt;Warning!&lt;/t&gt; &lt;br/&gt;&lt;br/&gt; You are leaving the battlefield!&lt;br/&gt;&lt;br/&gt; &lt;t color='#EB0606'&gt; %1 &lt;/t&gt; Seconds left.</English>
+ <French>&lt;t color='#EB0606'&gt;Attention!&lt;/t&gt; &lt;br/&gt;&lt;br/&gt; Vous quittez le champs de bataille!&lt;br/&gt;&lt;br/&gt; &lt;t color='#EB0606'&gt;%1&lt;/t&gt; Secondes restantes.</French>
+ <German>&lt;t color='#EB0606'&gt;Warnung!&lt;/t&gt; &lt;br/&gt;&lt;br/&gt; Du hast das Schlachtfeld verlassen!&lt;br/&gt;&lt;br/&gt; Du hast &lt;t color='#EB0606'&gt;%1&lt;/t&gt; Sekunden Zeit, um auf das Schlachtfeld zurückzukehren.</German>
+ <Russian>&lt;t color='#EB0606'&gt;Warning!&lt;/t&gt; &lt;br/&gt;&lt;br/&gt; Вы покинули поле битвы!Осталось &lt;br/&gt;&lt;br/&gt; &lt;t color='#EB0606'&gt;%1&lt;/t&gt; секунд до наказания.</Russian>
+ <Italian>&lt;t color='#EB0606'&gt;Warning!&lt;/t&gt; &lt;br/&gt;&lt;br/&gt; Stai lasciando il campo di battaglia!&lt;br/&gt;&lt;br/&gt; &lt;t color='#EB0606'&gt;%1&lt;/t&gt; Secondi rimasti.</Italian>
+ </Key>
+ <Key ID="STR_WF_INFO_Queu">
+ <English>&lt;t color='#F8D664'&gt;Information:&lt;/t&gt;&lt;br/&gt;&lt;br/&gt; &lt;t color='#85B5FA'&gt;%1&lt;/t&gt; Queued.</English>
+ <French>&lt;t color='#F8D664'&gt;Information:&lt;/t&gt;&lt;br/&gt;&lt;br/&gt; &lt;t color='#85B5FA'&gt;%1&lt;/t&gt; Mis en attente.</French>
+ <German>&lt;t color='#F8D664'&gt;Information:&lt;/t&gt;&lt;br/&gt;&lt;br/&gt; Dein &lt;t color='#85B5FA'&gt;%1&lt;/t&gt; befindet sich in der Warteschlange.</German>
+ <Russian>&lt;t color='#F8D664'&gt;Информация:&lt;/t&gt;&lt;br/&gt;&lt;br/&gt; &lt;t color='#85B5FA'&gt;%1&lt;/t&gt; на очереди.</Russian>
+ <Italian>&lt;t color='#F8D664'&gt;Informazioni:&lt;/t&gt;&lt;br/&gt;&lt;br/&gt; &lt;t color='#85B5FA'&gt;%1&lt;/t&gt; In Coda.</Italian>
+ </Key>
+ <Key ID="STR_WF_INFO_Queu_Max">
+ <English>&lt;t color='#F8D664'&gt;Information:&lt;/t&gt;&lt;br/&gt;&lt;br/&gt; The maximal queue has been reached for this factory (&lt;t color='#85B5FA'&gt;%1&lt;/t&gt;), please be patient.</English>
+ <French>&lt;t color='#F8D664'&gt;Information:&lt;/t&gt;&lt;br/&gt;&lt;br/&gt; La file d'attente maximale à été atteinte pour cette usine (&lt;t color='#85B5FA'&gt;%1&lt;/t&gt;), veuillez patienter.</French>
+ <German>&lt;t color='#F8D664'&gt;Information:&lt;/t&gt;&lt;br/&gt;&lt;br/&gt; Diese Fabrik hat das Limit für die Warteschlange erreicht (&lt;t color='#85B5FA'&gt;%1&lt;/t&gt;), könnte also ein wenig dauern.</German>
+ <Russian>&lt;t color='#F8D664'&gt;Информация:&lt;/t&gt;&lt;br/&gt;&lt;br/&gt; очередь завода достигла максимума (&lt;t color='#85B5FA'&gt;%1&lt;/t&gt;), пожалуйста подождите.</Russian>
+ <Italian>&lt;t color='#F8D664'&gt;Informazioni:&lt;/t&gt;&lt;br/&gt;&lt;br/&gt; The maximal queue has been reached for this factory (&lt;t color='#85B5FA'&gt;%1&lt;/t&gt;), please be patient.</Italian>
+ </Key>
+ <Key ID="STR_WF_INFO_Rearming">
+ <English>&lt;t color='#F8D664'&gt;Information:&lt;/t&gt;&lt;br/&gt;&lt;br/&gt; A &lt;t color='#85B5FA'&gt;%1&lt;/t&gt; is being rearmed. &lt;br/&gt;&lt;br/&gt;Please wait for &lt;t color='#85B5FA'&gt;%2&lt;/t&gt; seconds during the rearm process...</English>
+ <French>&lt;t color='#F8D664'&gt;Information:&lt;/t&gt;&lt;br/&gt;&lt;br/&gt; Un &lt;t color='#85B5FA'&gt;%1&lt;/t&gt; est en cours de réarmement. &lt;br/&gt;&lt;br/&gt;Veuillez attendre &lt;t color='#85B5FA'&gt;%2&lt;/t&gt; secondes durant la phase de réarmement...</French>
+ <German>&lt;t color='#F8D664'&gt;Information:&lt;/t&gt;&lt;br/&gt;&lt;br/&gt; &lt;t color='#85B5FA'&gt;%1&lt;/t&gt; wird aufmunitioniert. &lt;br/&gt;&lt;br/&gt;Das Aufmunitionieren dauert &lt;t color='#85B5FA'&gt;%2&lt;/t&gt; Sekunden...</German>
+ <Russian>&lt;t color='#F8D664'&gt;Информация:&lt;/t&gt;&lt;br/&gt;&lt;br/&gt; &lt;t color='#85B5FA'&gt;%1&lt;/t&gt; перевооружается. &lt;br/&gt;&lt;br/&gt;Ждите &lt;t color='#85B5FA'&gt;%2&lt;/t&gt; секунд для перезарядки...</Russian>
+ <Italian>&lt;t color='#F8D664'&gt;Informazioni:&lt;/t&gt;&lt;br/&gt;&lt;br/&gt; A &lt;t color='#85B5FA'&gt;%1&lt;/t&gt; riarmo in corso. &lt;br/&gt;&lt;br/&gt;Please wait for &lt;t color='#85B5FA'&gt;%2&lt;/t&gt; seconds during the rearm process...</Italian>
+ </Key>
+ <Key ID="STR_WF_INFO_Rearm_Failed">
+ <English>&lt;t color='#F8D664'&gt;Information:&lt;/t&gt;&lt;br/&gt;&lt;br/&gt; A &lt;t color='#85B5FA'&gt;%1&lt;/t&gt; has failed to be rearmed.</English>
+ <French>&lt;t color='#F8D664'&gt;Information:&lt;/t&gt;&lt;br/&gt;&lt;br/&gt; Un &lt;t color='#85B5FA'&gt;%1&lt;/t&gt; n'a pas été réarmé.</French>
+ <German>&lt;t color='#F8D664'&gt;Information:&lt;/t&gt;&lt;br/&gt;&lt;br/&gt; Das Aufmunitionieren von &lt;t color='#85B5FA'&gt;%1&lt;/t&gt; ist fehlgeschlagen.</German>
+ <Russian>&lt;t color='#F8D664'&gt;Информация:&lt;/t&gt;&lt;br/&gt;&lt;br/&gt; &lt;t color='#85B5FA'&gt;%1&lt;/t&gt; не перезаряжена.</Russian>
+ <Italian>&lt;t color='#F8D664'&gt;Informazioni:&lt;/t&gt;&lt;br/&gt;&lt;br/&gt; A &lt;t color='#85B5FA'&gt;%1&lt;/t&gt; riarmo fallito.</Italian>
+ </Key>
+ <Key ID="STR_WF_INFO_Rearm_Success">
+ <English>&lt;t color='#F8D664'&gt;Information:&lt;/t&gt;&lt;br/&gt;&lt;br/&gt; A &lt;t color='#85B5FA'&gt;%1&lt;/t&gt; has been rearmed.</English>
+ <French>&lt;t color='#F8D664'&gt;Information:&lt;/t&gt;&lt;br/&gt;&lt;br/&gt; Un &lt;t color='#85B5FA'&gt;%1&lt;/t&gt; a été réarmé.</French>
+ <German>&lt;t color='#F8D664'&gt;Information:&lt;/t&gt;&lt;br/&gt;&lt;br/&gt; &lt;t color='#85B5FA'&gt;%1&lt;/t&gt; wurde erfolgreich aufmunitioniert.</German>
+ <Russian>&lt;t color='#F8D664'&gt;Информация:&lt;/t&gt;&lt;br/&gt;&lt;br/&gt; &lt;t color='#85B5FA'&gt;%1&lt;/t&gt; перезаряжена.</Russian>
+ <Italian>&lt;t color='#F8D664'&gt;Informazioni:&lt;/t&gt;&lt;br/&gt;&lt;br/&gt; A &lt;t color='#85B5FA'&gt;%1&lt;/t&gt; è stato riarmato.</Italian>
+ </Key>
+ <Key ID="STR_WF_INFO_Refueling">
+ <English>&lt;t color='#F8D664'&gt;Information:&lt;/t&gt;&lt;br/&gt;&lt;br/&gt; A &lt;t color='#85B5FA'&gt;%1&lt;/t&gt; is being refueled. &lt;br/&gt;&lt;br/&gt;Please wait for &lt;t color='#85B5FA'&gt;%2&lt;/t&gt; seconds during the refuel process...</English>
+ <French>&lt;t color='#F8D664'&gt;Information:&lt;/t&gt;&lt;br/&gt;&lt;br/&gt; Un &lt;t color='#85B5FA'&gt;%1&lt;/t&gt; est en cours de ravitaillement. &lt;br/&gt;&lt;br/&gt;Veuillez attendre &lt;t color='#85B5FA'&gt;%2&lt;/t&gt; secondes durant la phase de ravitaillement...</French>
+ <German>&lt;t color='#F8D664'&gt;Information:&lt;/t&gt;&lt;br/&gt;&lt;br/&gt; &lt;t color='#85B5FA'&gt;%1&lt;/t&gt; wird aufgetankt. &lt;br/&gt;&lt;br/&gt;Die Betankung dauert &lt;t color='#85B5FA'&gt;%2&lt;/t&gt; Sekunden...</German>
+ <Russian>&lt;t color='#F8D664'&gt;Информация:&lt;/t&gt;&lt;br/&gt;&lt;br/&gt; &lt;t color='#85B5FA'&gt;%1&lt;/t&gt; заправляется. &lt;br/&gt;&lt;br/&gt;Пожалуйста ждите &lt;t color='#85B5FA'&gt;%2&lt;/t&gt; секунд для заправки...</Russian>
+ <Italian>&lt;t color='#F8D664'&gt;Informazioni:&lt;/t&gt;&lt;br/&gt;&lt;br/&gt; A &lt;t color='#85B5FA'&gt;%1&lt;/t&gt; rifornimento in corso. &lt;br/&gt;&lt;br/&gt;Please wait for &lt;t color='#85B5FA'&gt;%2&lt;/t&gt; seconds during the refuel process...</Italian>
+ </Key>
+ <Key ID="STR_WF_INFO_Refueling_Failed">
+ <English>&lt;t color='#F8D664'&gt;Information:&lt;/t&gt;&lt;br/&gt;&lt;br/&gt; A &lt;t color='#85B5FA'&gt;%1&lt;/t&gt; has failed to be refueled.</English>
+ <French>&lt;t color='#F8D664'&gt;Information:&lt;/t&gt;&lt;br/&gt;&lt;br/&gt; Un &lt;t color='#85B5FA'&gt;%1&lt;/t&gt; n'a pas été ravitaillé.</French>
+ <German>&lt;t color='#F8D664'&gt;Information:&lt;/t&gt;&lt;br/&gt;&lt;br/&gt; Die Betankung von &lt;t color='#85B5FA'&gt;%1&lt;/t&gt; ist fehlgeschlagen.</German>
+ <Russian>&lt;t color='#F8D664'&gt;Информация:&lt;/t&gt;&lt;br/&gt;&lt;br/&gt; &lt;t color='#85B5FA'&gt;%1&lt;/t&gt; обломись с заправкой.</Russian>
+ <Italian>&lt;t color='#F8D664'&gt;Informazioni:&lt;/t&gt;&lt;br/&gt;&lt;br/&gt; A &lt;t color='#85B5FA'&gt;%1&lt;/t&gt; rifornimento fallito.</Italian>
+ </Key>
+ <Key ID="STR_WF_INFO_Refueling_Success">
+ <English>&lt;t color='#F8D664'&gt;Information:&lt;/t&gt;&lt;br/&gt;&lt;br/&gt; A &lt;t color='#85B5FA'&gt;%1&lt;/t&gt; has been refueled.</English>
+ <French>&lt;t color='#F8D664'&gt;Information:&lt;/t&gt;&lt;br/&gt;&lt;br/&gt; Un &lt;t color='#85B5FA'&gt;%1&lt;/t&gt; a été ravitaillé.</French>
+ <German>&lt;t color='#F8D664'&gt;Information:&lt;/t&gt;&lt;br/&gt;&lt;br/&gt; Die Betankung von &lt;t color='#85B5FA'&gt;%1&lt;/t&gt; wurde erfolgreich abgeschlossen.</German>
+ <Russian>&lt;t color='#F8D664'&gt;Информация:&lt;/t&gt;&lt;br/&gt;&lt;br/&gt; &lt;t color='#85B5FA'&gt;%1&lt;/t&gt; полный бак.</Russian>
+ <Italian>&lt;t color='#F8D664'&gt;Informazioni:&lt;/t&gt;&lt;br/&gt;&lt;br/&gt; A &lt;t color='#85B5FA'&gt;%1&lt;/t&gt; è stato rifornito.</Italian>
+ </Key>
+ <Key ID="STR_WF_INFO_Repairing">
+ <English>&lt;t color='#F8D664'&gt;Information:&lt;/t&gt;&lt;br/&gt;&lt;br/&gt; A &lt;t color='#85B5FA'&gt;%1&lt;/t&gt; is being repaired. &lt;br/&gt;&lt;br/&gt;Please wait for &lt;t color='#85B5FA'&gt;%2&lt;/t&gt; seconds during the reparations...</English>
+ <French>&lt;t color='#F8D664'&gt;Information:&lt;/t&gt;&lt;br/&gt;&lt;br/&gt; Un &lt;t color='#85B5FA'&gt;%1&lt;/t&gt; est en cours de réparation. &lt;br/&gt;&lt;br/&gt;Veuillez attendre &lt;t color='#85B5FA'&gt;%2&lt;/t&gt; secondes durant les réparations...</French>
+ <German>&lt;t color='#F8D664'&gt;Information:&lt;/t&gt;&lt;br/&gt;&lt;br/&gt; &lt;t color='#85B5FA'&gt;%1&lt;/t&gt; wird repariert. &lt;br/&gt;&lt;br/&gt;Die Reparatur dauert &lt;t color='#85B5FA'&gt;%2&lt;/t&gt; Sekunden...</German>
+ <Russian>&lt;t color='#F8D664'&gt;Информация:&lt;/t&gt;&lt;br/&gt;&lt;br/&gt; &lt;t color='#85B5FA'&gt;%1&lt;/t&gt; ремонтируется. &lt;br/&gt;&lt;br/&gt;Ждите &lt;t color='#85B5FA'&gt;%2&lt;/t&gt; секунд для починки...</Russian>
+ <Italian>&lt;t color='#F8D664'&gt;Informazioni:&lt;/t&gt;&lt;br/&gt;&lt;br/&gt; A &lt;t color='#85B5FA'&gt;%1&lt;/t&gt; riparazione in corso. &lt;br/&gt;&lt;br/&gt;Please wait for &lt;t color='#85B5FA'&gt;%2&lt;/t&gt; secondi al termine della riparazione...</Italian>
+ </Key>
+ <Key ID="STR_WF_INFO_Repair_Failed">
+ <English>&lt;t color='#F8D664'&gt;Information:&lt;/t&gt;&lt;br/&gt;&lt;br/&gt; A &lt;t color='#85B5FA'&gt;%1&lt;/t&gt; has failed to be repaired.</English>
+ <French>&lt;t color='#F8D664'&gt;Information:&lt;/t&gt;&lt;br/&gt;&lt;br/&gt; Un &lt;t color='#85B5FA'&gt;%1&lt;/t&gt; n'a pas été reparé.</French>
+ <German>&lt;t color='#F8D664'&gt;Information:&lt;/t&gt;&lt;br/&gt;&lt;br/&gt; Die Reparatur von &lt;t color='#85B5FA'&gt;%1&lt;/t&gt; ist fehlgeschlagen.</German>
+ <Russian>&lt;t color='#F8D664'&gt;Информация:&lt;/t&gt;&lt;br/&gt;&lt;br/&gt; &lt;t color='#85B5FA'&gt;%1&lt;/t&gt; обломись с починкой.</Russian>
+ <Italian>&lt;t color='#F8D664'&gt;Informazioni:&lt;/t&gt;&lt;br/&gt;&lt;br/&gt; A &lt;t color='#85B5FA'&gt;%1&lt;/t&gt; riparazione fallita.</Italian>
+ </Key>
+ <Key ID="STR_WF_INFO_Repair_Success">
+ <English>&lt;t color='#F8D664'&gt;Information:&lt;/t&gt;&lt;br/&gt;&lt;br/&gt; A &lt;t color='#85B5FA'&gt;%1&lt;/t&gt; has been successfully repaired.</English>
+ <French>&lt;t color='#F8D664'&gt;Information:&lt;/t&gt;&lt;br/&gt;&lt;br/&gt; Un &lt;t color='#85B5FA'&gt;%1&lt;/t&gt; a été reparé.</French>
+ <German>&lt;t color='#F8D664'&gt;Information:&lt;/t&gt;&lt;br/&gt;&lt;br/&gt; Die Reparatur von &lt;t color='#85B5FA'&gt;%1&lt;/t&gt; wurde erfolgreich abgeschlossen.</German>
+ <Russian>&lt;t color='#F8D664'&gt;Информация:&lt;/t&gt;&lt;br/&gt;&lt;br/&gt; &lt;t color='#85B5FA'&gt;%1&lt;/t&gt; все путем.</Russian>
+ <Italian>&lt;t color='#F8D664'&gt;Informazioni:&lt;/t&gt;&lt;br/&gt;&lt;br/&gt; A &lt;t color='#85B5FA'&gt;%1&lt;/t&gt; è stato completamente riparato</Italian>
+ </Key>
+
+<!--Main Menu - ALL DONE-->
+ <Key ID="STR_WF_MAIN_CommandMenu"><!--shared U-->
+ <English>Command Center</English>
+ <French>Center de Commandement</French>
+ <German>Command Center</German>
+ <Russian>Command Center</Russian>
+ <Italian>Command Center</Italian>
+ </Key>
+ <Key ID="STR_WF_MAIN_EconomyMenu"><!--shared U-->
+ <English>Economy</English>
+ <French>Economie</French>
+ <German>Wirtschaft</German>
+ <Russian>Economy</Russian>
+ <Italian>Economy</Italian>
+ </Key>
+ <Key ID="STR_WF_MAIN_Purchase_Units"><!--shared U-->
+ <English>Purchase Units</English>
+ <French>Achat Unités</French>
+ <German>Einheiten kaufen</German>
+ <Russian>Отряды</Russian>
+ <Italian>Compra Unità</Italian>
+ </Key>
+ <Key ID="STR_WF_MAIN_Purchase_Gear"><!--shared U-->
+ <English>Purchase Gear</English>
+ <French>Achat Equipement</French>
+ <German>Ausrüstung kaufen</German>
+ <Russian>Снаряжение</Russian>
+ <Italian>Equipaggiamento</Italian>
+ </Key>
+ <Key ID="STR_WF_MAIN_ServicePoint"><!--shared W-->
+ <English>Service point</English>
+ <French>Point de service</French>
+ <German>Wartungsstation</German>
+ <Russian>Пункт обслуживания</Russian>
+ <Italian>Punto di servizio</Italian>
+ </Key>
+ <Key ID="STR_WF_MAIN_TeamMenu"><!--shared U-->
+ <English>Team</English>
+ <French>Equipe</French>
+ <German>Team</German>
+ <Russian>команда</Russian>
+ <Italian>Team</Italian>
+ </Key>
+ <Key ID="STR_WF_MAIN_TacticalMenu"><!--shared U-->
+ <English>Tactical Center</English>
+ <French>Centre Tactique</French>
+ <German>Tactical Center</German>
+ <Russian>Tactical Center</Russian>
+ <Italian>Tactical Center</Italian>
+ </Key>
+ <Key ID="STR_WF_MAIN_Uptime">
+ <English>Uptime: %1 days, %2 hours, %3 minutes, %4 seconds</English>
+ <French>Uptime: %1 jours, %2 heures, %3 minutes, %4 secondes</French>
+ <German>Spielzeit: %1 Tage, %2 Stunden, %3 Minuten, %4 Sekunden</German>
+ <Russian>Время работы: %1 день, %2 часов, %3 минут, %4 секунд</Russian>
+ <Italian>Uptime: %1 giorni, %2 ore, %3 minuti, %4 secondi</Italian>
+ </Key>
+ <Key ID="STR_WF_MAIN_UpgradeMenu"><!--shared U-->
+ <English>Factory Upgrade</English>
+ <French>Menu d'Amélioration</French>
+ <German>Fabrikausbau</German>
+ <Russian>Модернизация</Russian>
+ <Italian>Menu Aggiornamenti</Italian>
+ </Key>
+ <Key ID="STR_WF_MAIN_VotingMenu">
+ <English>Voting</English>
+ <French>Voting</French>
+ <German>Voting</German>
+ <Russian>Голосование</Russian>
+ <Italian>Voting</Italian>
+ </Key>
+
+<!--SUBMISSION Strings - ALL DONE-->
+ <Key ID="STR_WF_M_BASE_Attack_Description">
+ <English>One of our scout team has reported us that multiple resistance squads are heading toward our base.&lt;br/&gt;&lt;br/&gt;According to the report, theirs arrival is imminent, we will have to defend the base at all cost, HQ has ordered us to neutralize the threat even if the base is lost.&lt;br/&gt;&lt;br/&gt;</English>
+ <French>Une de nos équipes de reconnaissance nous a informé de l'arrivé de plusieurs escouades resistantes vers notre base.&lt;br/&gt;&lt;br/&gt;D'après le rapport officiel, leurs arrivées est imminente. Nous allons devoir défendre la base à tout prix, le QG nous a ordonné de neutraliser cette menace même si la base est perdue.&lt;br/&gt;&lt;br/&gt;</French>
+ <German>Eine unserer Aufklärungseinheit hat soeben berichtet, dass mehrere Einheiten des Widerstand, auf unser Hauptquartier zumaschieren.&lt;br/&gt;&lt;br/&gt;Dem Bericht zufolge, steht ihre Ankunft und ein damit verbundener Angriff unmittelbar bevor. Das Hauptquartier muss unter allen Umständen verteidigt und die Aggressoren eliminiert werden, koste es was es wolle.&lt;br/&gt;&lt;br/&gt;</German>
+ <Russian>Одна из наших разведкоманд сообщает о многочисленных отрядах сопротивления приближающихся к нашей базе.&lt;br/&gt;&lt;br/&gt;Из их доклада следует что нападение неизбежно, мы должны защитить базу любой ценой, штаб приказал нейтрализовать угрозу даже если база уничтожена.&lt;br/&gt;&lt;br/&gt;</Russian>
+ <Italian>One of our scout team has reported us that multiple resistance squads are heading toward our base.&lt;br/&gt;&lt;br/&gt;According to the report, theirs arrival is imminent, we will have to defend the base at all cost, HQ has ordered us to neutralize the threat even if the base is lost.&lt;br/&gt;&lt;br/&gt;</Italian>
+ </Key>
+ <Key ID="STR_WF_M_BASE_Attack"><!--shared U-->
+ <English>Defense: Base</English>
+ <French>Défense: Base</French>
+ <German>Verteidigung: HQ</German>
+ <Russian>Защитить Базу</Russian>
+ <Italian>Defense: Base</Italian>
+ </Key>
+ <Key ID="STR_WF_M_PLAYERS_Attack_Air"><!--shared U-->
+ <English>Search and Destroy: Vehicle</English>
+ <French>Recherche et Destruction: Véhicule</French>
+ <German>Search and Destroy: Luftangriff</German>
+ <Russian>Найти и уничтожить: Машина</Russian>
+ <Italian>Search and Destroy: Vehicle</Italian>
+ </Key>
+ <Key ID="STR_WF_M_PLAYERS_Attack_Air_Description">
+ <English>HQ warned us about an incomming mercenary helicopter hunting down our Squadleaders.&lt;br/&gt;&lt;br/&gt;Your mission is to locate and destroy that helicopter.&lt;br/&gt;&lt;br/&gt;</English>
+ <French>Le QG nous à alerté de l'arrivée d'un hélicoptère mercenaire chassant nos chefs d'équipes.&lt;br/&gt;&lt;br/&gt;Votre mission est de trouver et détruire cette hélicoptère.&lt;br/&gt;&lt;br/&gt;</French>
+ <German>Das Hauptquartier warnt vor einem feindlichen Hubschrauber, der Jagd auf unsere Squadleader macht.&lt;br/&gt;&lt;br/&gt;Die Mission ist es, den Hubschrauber zu lokalisieren und zu zerstören.&lt;br/&gt;&lt;br/&gt;</German>
+ <Russian>Штаб уведомил нас о приближающемся вертолете наемников,охотящимся на командиров отделений.&lt;br/&gt;&lt;br/&gt;Ваша задача - обнаружить и уничтожить вертолет.&lt;br/&gt;&lt;br/&gt;</Russian>
+ <Italian>HQ warned us about an incomming mercenary helicopter hunting down our Squadleaders.&lt;br/&gt;&lt;br/&gt;Your mission is to locate and destroy that helicopter.&lt;br/&gt;&lt;br/&gt;</Italian>
+ </Key>
+ <Key ID="STR_WF_M_TOWN_Attack"><!--shared U-->
+ <English>Defense: %1</English>
+ <French>Défense: %1</French>
+ <German>Verteidigung: %1</German>
+ <Russian>Защита: %1</Russian>
+ <Italian>Difesa: %1</Italian>
+ </Key>
+ <Key ID="STR_WF_M_TOWN_Attack_Description">
+ <English>Our intels has informed us that a resistance commander is planning an attack on &lt;marker name='%1Depot'&gt;%1&lt;marker&gt;.&lt;br/&gt;&lt;br/&gt;The attack will be launched soon, make sure to defend that town at all cost.&lt;br/&gt;&lt;br/&gt;A Search and Destroy mission will be necessary to complete %1 defense.&lt;br/&gt;&lt;br/&gt;</English>
+ <French>Nos renseignements nous indique qu'un commandant resistant plannifie d'attaquer &lt;marker name='%1Depot'&gt;%1&lt;marker&gt;.&lt;br/&gt;&lt;br/&gt; L'attaque doit avoir lieu bientôt, assurez-vous de défendre cette ville à tout prix.&lt;br/&gt;&lt;br/&gt;Une mission de Recherche et Destruction sera nécessaire finaliser la défense de %1.&lt;br/&gt;&lt;br/&gt;</French>
+ <German>Unser Geheimdienst hat Informationen, dass der Commander des Widerstands einen Angriff auf &lt;marker name='%1Depot'&gt;%1&lt;marker&gt;.&lt;br/&gt;&lt;br/&gt; plant. Der Angriff wird voraussichtlich in Kürze stattfinden. Verteidige die Stadt unter allen Umständen.&lt;br/&gt;&lt;br/&gt;Eine Search and Destroy Mission wird notwendig sein, um die Verteidigung von %1 sicherzustellen.&lt;br/&gt;&lt;br/&gt;</German>
+ <Russian>Наша разведка сообщила нам, что командующий силами сопротивления планирует нападение на &lt;marker name='%1Depot'&gt;%1&lt;marker&gt;.&lt;br/&gt;&lt;br/&gt; Наступление начнется скоро, будте уверены, этот город должен быть защищен любой ценой.&lt;br/&gt;&lt;br/&gt;Необходимо найти и уничтожить силы сопротивления %1 defense.&lt;br/&gt;&lt;br/&gt;</Russian>
+ <Italian>La nostra Inteligence ci ha informato che commando della resistenza sta pianificando un attacco a &lt;marker name='%1Depot'&gt;%1&lt;marker&gt;.&lt;br/&gt;&lt;br/&gt;L'attacco verra lanciato preso, assicurati di difentere questa città a tutti i costi.&lt;br/&gt;&lt;br/&gt;Una missione di ricerca e distruzione sarà necessaria per completare la difesa di %1.&lt;br/&gt;&lt;br/&gt;</Italian>
+ </Key>
+ <Key ID="STR_WF_M_UAV_RetrieveModule_Description">
+ <English>From what we've learned from our intels, an UAV has been shot down in this area, retrieving it's module is essential for our team as it contains critical intel about enemy forces. &lt;br/&gt;&lt;br/&gt;Once that your team has secured the crash site, we will send a team to retrieve the module, make sure to protect them.&lt;br/&gt;&lt;br/&gt;</English>
+ <French>D'après ce que nos renseignements nous ont appris, un Drone a été abattu dans cette zone, il est essentiel de recupérer son module en raison d'importants renseignements qu'il contient sur les forces enemies. &lt;br/&gt;&lt;br/&gt; Une fois le site du crash sécurisé, nous enverrons une équipe récuperer le module, assurez-vous de les protéger.&lt;br/&gt;&lt;br/&gt;</French>
+ <German>Von dem was wir von unserem Geheimdienst wissen, wurde in dieser Gegend ein UAV abgeschossen. Das UAV hat im Laufe seines Einsatzes sehr wichtige Informationen über die feindlichen Streitkräfte sammeln können, die für uns von strategischer Wichtigkeit sind. Deshalb hat die Bergung des Moduls oberste Priorität. &lt;br/&gt;&lt;br/&gt;Sobald die Absturzstelle gesichert wurde, werden wir einen Bergungstrupp aussenden, um das Modul zu bergen. Sichere die Absturzstelle, bis die Bergung abgeschlossen ist!&lt;br/&gt;&lt;br/&gt;</German>
+ <Russian>По данным нашей разведки БЛА был сбит в этом районе, нужно вернуть модуль БЛА так как он важен для нашей команды, поскольку содержит критически важные сведения о вражеских силах, &lt;br/&gt;&lt;br/&gt; Как только Ваша команда обнаружит место крушения, мы пошлем команду, чтобы извлечь модуль, позаботьтесь об их защите.&lt;br/&gt;&lt;br/&gt;</Russian>
+ <Italian>Da quello che abbiamo appreso dalla nostra Inteligence, un UAV è stato abbattuto in questa area, recuperare il suo modulo è essenziale per noi perchè contiene informazioni critiche sulle forze nemiche &lt;br/&gt;&lt;br/&gt; Una volta assicurata la zona dove è caduto, manderemo un team a recuperare il modulo, assicurati di proteggerlo.&lt;br/&gt;&lt;br/&gt;</Italian>
+ </Key>
+ <Key ID="STR_WF_M_UAV_RetrieveModule"><!--shared U-->
+ <English>Assist: UAV Module Retrieval</English>
+ <French>Assistance: Recupération Module Drone</French>
+ <German>Unterstützung: UAV-Modul bergen</German>
+ <Russian>Помощь: Поиск модуля БЛА</Russian>
+ <Italian>Assist: Recupero Modulo UAV</Italian>
+ </Key>
+
+<!--PARAMETER Strings - ALL DONE-->
+ <!--AI-->
+ <Key ID="STR_WF_PARAMETER_GroupSizeAI">
+ <English>AI: Group Size Squads (AI)</English>
+ <French>IA: Taille du Groupe (Equipes IA)</French>
+ <German>KI: Max. Größe für Squads (KI)</German>
+ <Russian>ИИ: Размер отряда</Russian>
+ <Italian>IA: Dimensione Gruppo (Squadre IA)</Italian>
+ </Key>
+ <Key ID="STR_WF_PARAMETER_GroupSizePlayer">
+ <English>AI: Group Size Squads (Player)</English>
+ <French>IA: Taille du Groupe (Joueur)</French>
+ <German>KI: Max. Größe für Squads (Spieler)</German>
+ <Russian>ИИ: Размер отряда (Игрок)</Russian>
+ <Italian>IA: Dimensione Gruppo (Giocatore)</Italian>
+ </Key>
+ <Key ID="STR_WF_PARAMETER_KeepAI">
+ <English>AI: Keep units on JIP</English>
+ <French>IA: Maintien des unités durant JIP</French>
+ <German>KI: Squads bei JIP beibehalten</German>
+ <Russian>ИИ: Сохранять состав отряда</Russian>
+ <Italian>IA: Mantieni unità durante JIP</Italian>
+ </Key>
+ <Key ID="STR_WF_PARAMETER_AI">
+ <English>AI: Squads</English>
+ <French>IA: Equipes</French>
+ <German>KI: Squads</German>
+ <Russian>ИИ: Отряды</Russian>
+ <Italian>IA: Squadre</Italian>
+ </Key>
+ <!--Artillery-->
+ <Key ID="STR_WF_PARAMETER_Arty">
+ <English>ARTILLERY: Calls</English>
+ <French>ARTILLERIE: Support</French>
+ <German>ARTILLERIE: Unterstützung</German>
+ <Russian>Артиллерия: Вызов арт.удара</Russian>
+ <Italian>Artiglieria</Italian>
+ </Key>
+ <Key ID="STR_WF_PARAMETER_ArtilleryComputer">
+ <English>ARTILLERY: Computer</English>
+ <French>ARTILLERIE: Ordinateur</French>
+ <German>ARTILLERIE: Computer</German>
+ <Russian>Артилерийский компютер</Russian>
+ <Italian>Artillery: Computer</Italian>
+ </Key>
+ <Key ID="STR_WF_PARAMETER_ArtilleryUI">
+ <English>ARTILLERY: Interface</English>
+ <French>ARTILLERIE: Interface</French>
+ <German>ARTILLERIE: Interface</German>
+ <Russian>Артиллерия: Интерфейс</Russian>
+ <Italian>Artiglieria: Interfaccia</Italian>
+ </Key>
+ <Key ID="STR_WF_PARAMETER_Artillery">
+ <English>ARTILLERY: Range</English>
+ <French>ARTILLERIE: Portée</French>
+ <German>ARTILLERIE: Reichweite</German>
+ <Russian>Артиллерия: Дальность</Russian>
+ <Italian>Artiglieria: Portata</Italian>
+ </Key>
+ <!--Base-->
+ <Key ID="STR_WF_PARAMETER_AICommander">
+ <English>BASE: Allow AI Commander</English>
+ <French>BASE: Allow IA Commander</French>
+ <German>BASE: KI-Commander erlauben</German>
+ <Russian>Base: Allow AI Commander</Russian>
+ <Italian>Base: Allow IA Commander</Italian>
+ </Key>
+ <Key ID="STR_WF_PARAMETER_Allies">
+ <English>BASE: Allies</English>
+ <French>BASE: Alliés</French>
+ <German>BASE: Alliierte Basis bei Spielstart für</German>
+ <Russian>База: Союзники</Russian>
+ <Italian>Base: Alleati</Italian>
+ </Key>
+ <Key ID="STR_WF_PARAMETER_AntiAirRadar">
+ <English>BASE: Anti-Air Radar</English>
+ <French>BASE: Radar Anti-Air</French>
+ <German>BASE: Luftraumüberwachungsradar</German>
+ <Russian>База: Радар ПВО</Russian>
+ <Italian>Base: Radar Anti Aereo</Italian>
+ </Key>
+ <Key ID="STR_WF_PARAMETER_BaseArea">
+ <English>BASE: Areas Limit</English>
+ <French>BASE: Limite de Zones</French>
+ <German>BASE: Anzahl limitieren</German>
+ <Russian>База: Ограничение районов</Russian>
+ <Italian>Base: Limite Area</Italian>
+ </Key>
+ <Key ID="STR_WF_PARAMETER_BaseArea_Limit">
+ <English>BASE: Limit</English>
+ <French>BASE: Limite</French>
+ <German>BASE: Limit</German>
+ <Russian>База: предел</Russian>
+ <Italian>Base: Limite</Italian>
+ </Key>
+ <Key ID="STR_WF_PARAMETER_AutoMannedDefense">
+ <English>BASE: Auto manned Defenses</English>
+ <French>BASE: Auto manned Defenses</French>
+ <German>BASE: Autom. bemannte Verteidigungsanlagen</German>
+ <Russian>База: Auto manned Defenses</Russian>
+ <Italian>Base: Auto manned Defenses</Italian>
+ </Key>
+ <Key ID="STR_WF_PARAMETER_AutoDefense_Range">
+ <English>BASE: Auto Defenses Range</English>
+ <French>BASE: Portée Défenses Auto</French>
+ <German>BASE: Autom. Verteidigungsradius</German>
+ <Russian>База: Область автоматической защиты</Russian>
+ <Italian>Base: Raggio Difese Automatiche</Italian>
+ </Key>
+ <Key ID="STR_WF_PARAMETER_BuildingsLimit">
+ <English>BASE: Buildings Limit (Servicepoint x2)</English>
+ <French>BASE: Limite Batiments (Servicepoint x2)</French>
+ <German>BASE: Gebäudelimit pro Base (Wartungsstation x2)</German>
+ <Russian>База: Лимит строений</Russian>
+ <Italian>Base: Limite Costruzioni</Italian>
+ </Key>
+ <Key ID="STR_WF_PARAMETER_ConstructionMode">
+ <English>BASE: Construction Mode</English>
+ <French>BASE: Mode de Construction</French>
+ <German>BASE: Aufbau erfolgt über</German>
+ <Russian>База: Режим Строительства</Russian>
+ <Italian>Base: Construction Mode</Italian>
+ </Key>
+ <Key ID="STR_WF_PARAMETER_DefensePlacement">
+ <English>BASE: Defenses Placement</English>
+ <French>BASE: Placement de Défenses</French>
+ <German>BASE: Aufbau der Verteidigungsanlagen</German>
+ <Russian>База: Размещение обороны</Russian>
+ <Italian>Base: Piazzamento Difese</Italian>
+ </Key>
+ <Key ID="STR_WF_PARAMETER_HQDeployCost">
+ <English>BASE: HQ Deployment Cost</English>
+ <French>BASE: Coût de deploiement HQ</French>
+ <German>BASE: Aufbaukosten (HQ)</German>
+ <Russian>База: Развертывание HQ</Russian>
+ <Italian>Base: Costo dispiegamento HQ</Italian>
+ </Key>
+ <Key ID="STR_WF_PARAMETER_HQDeployRange">
+ <English>BASE: HQ Deploy Range</English>
+ <French>BASE: Rayon de Deploiement du QG</French>
+ <German>BASE: Aufbaugebiet (Radius)</German>
+ <Russian>База: Штаб-Область развертывания</Russian>
+ <Italian>Base: HQ Deploy Range</Italian>
+ </Key>
+ <Key ID="STR_WF_PARAMETER_BasePatrols">
+ <English>BASE: Patrols</English>
+ <French>BASE: Patrouilles</French>
+ <German>BASE: Schutz-Patrouillen</German>
+ <Russian>База: Патрули</Russian>
+ <Italian>Base: Pattuglie</Italian>
+ </Key>
+ <Key ID="STR_WF_PARAMETER_SpawnSystemRestrict">
+ <English>BASE: Start Near towns</English>
+ <French>BASE: Placement près des Villes</French>
+ <German>BASE: In Stadtnähe bei Spielstart</German>
+ <Russian>База: Позиция около городов</Russian>
+ <Italian>Base: Inizio Città Vicine</Italian>
+ </Key>
+ <Key ID="STR_WF_PARAMETER_StartingDistance">
+ <English>BASE: Starting Distance</English>
+ <French>BASE: Distance de Démarrage</French>
+ <German>BASE: Distanz zum anderen Team bei Spielstart</German>
+ <Russian>База: Начальная дистанция</Russian>
+ <Italian>Base: Distanza Iniziale</Italian>
+ </Key>
+ <Key ID="STR_WF_PARAMETER_StartingLocations"><!--shared U-->
+ <English>BASE: Starting Locations</English>
+ <French>BASE: Position de Démarrage</French>
+ <German>BASE: Geographische Lage bei Spielstart</German>
+ <Russian>База: Позиция на старте</Russian>
+ <Italian>Base: Posizione Iniziale</Italian>
+ </Key>
+ <!--Economy-->
+ <Key ID="STR_WF_PARAMETER_Currency">
+ <English>ECONOMY: Currency</English>
+ <French>ECONOMIE: Monaie</French>
+ <German>ÖKONOMIE: Währungssystem</German>
+ <Russian>Экономика: Валюта</Russian>
+ <Italian>Economy: Currency</Italian>
+ </Key>
+ <Key ID="STR_WF_PARAMETER_IncomeInterval">
+ <English>ECONOMY: Income Interval</English>
+ <French>ECONOMIE: Intervalle de Rémunération</French>
+ <German>ÖKONOMIE: Einkommensinterval</German>
+ <Russian>Экономика: Интервал дохода</Russian>
+ <Italian>Economia: Intervallo Entrate</Italian>
+ </Key>
+ <Key ID="STR_WF_PARAMETER_IncomeSystem">
+ <English>ECONOMY: Income System</English>
+ <French>ECONOMIE: Système de Rémunération</French>
+ <German>ÖKONOMIE: Einkommenssystem</German>
+ <Russian>Экономика: Приход денег</Russian>
+ <Italian>Economia: Sistema Entrate</Italian>
+ </Key>
+ <Key ID="STR_WF_PARAMETER_Funds_East">
+ <English>ECONOMY: Starting Funds (East)</English>
+ <French>ECONOMIE: Fonds de départ (Est)</French>
+ <German>ÖKONOMIE: Startkapital für Spieler (Ostblock)</German>
+ <Russian>Экономика: Деньги на старте (Восток)</Russian>
+ <Italian>Economia: Fondi Iniziali (Est)</Italian>
+ </Key>
+ <Key ID="STR_WF_PARAMETER_Funds_West">
+ <English>ECONOMY: Starting Funds (West)</English>
+ <French>ECONOMIE: Fonds de départ (Ouest)</French>
+ <German>ÖKONOMIE: Startkapital für Spieler (Westmächte)</German>
+ <Russian>Экономика: Деньги на старте (Запад)</Russian>
+ <Italian>Economia: Fondi Iniziali (Ovest)</Italian>
+ </Key>
+ <Key ID="STR_WF_PARAMETER_Supply_East">
+ <English>ECONOMY: Starting Supply (East)</English>
+ <French>ECONOMIE: Logistique de départ (Est)</French>
+ <German>ÖKONOMIE: Start-Supply (Ostblock)</German>
+ <Russian>Экономика: Снабжение на старте (Восток)</Russian>
+ <Italian>Economia: Supply Iniziali (Est)</Italian>
+ </Key>
+ <Key ID="STR_WF_PARAMETER_Supply_West">
+ <English>ECONOMY: Starting Supply (West)</English>
+ <French>ECONOMIE: Logistique de départ (Ouest)</French>
+ <German>ÖKONOMIE: Start-Supply (Westmächte)</German>
+ <Russian>Экономика: Снабжение на старте (Запад)</Russian>
+ <Italian>Economia: Supply Iniziali (Ovest)</Italian>
+ </Key>
+ <Key ID="STR_WF_PARAMETER_SupplySystem">
+ <English>ECONOMY: Supply System</English>
+ <French>ECONOMIE: Système Logistique</French>
+ <German>ÖKONOMIE: Versorgungssystem erfolgt über</German>
+ <Russian>Экономика: Система снабжения</Russian>
+ <Italian>Economia: Sistema Supply</Italian>
+ </Key>
+ <!--Environment-->
+ <Key ID="STR_WF_PARAMETER_FastTime">
+ <English>ENVIRONMENT: Fast Time</English>
+ <French>ENVIRONEMENT: Temp Acceléré</French>
+ <German>UMWELT: Zeitraffer</German>
+ <Russian>Природа: Быстрое время</Russian>
+ <Italian>Ambiente: Tempo Accellerato</Italian>
+ </Key>
+ <Key ID="STR_WF_PARAMETER_TimeOfDay">
+ <English>ENVIRONMENT: Time of Day</English>
+ <French>ENVIRONEMENT: Heure de la Journée</French>
+ <German>UMWELT: Uhrzeit bei Spielstart</German>
+ <Russian>Природа: Время дня</Russian>
+ <Italian>Ambiente: Orario del giorno</Italian>
+ </Key>
+ <Key ID="STR_WF_PARAMETER_Weather">
+ <English>ENVIRONMENT: Weather</English>
+ <French>ENVIRONEMENT: Météo</French>
+ <German>UMWELT: Wetter</German>
+ <Russian>Природа: Погода</Russian>
+ <Italian>Ambiente: Meteo</Italian>
+ </Key>
+ <!--Extension-->
+ <Key ID="STR_WF_PARAMETER_BAF">
+ <English>EXTENSION: British Armed Forces</English>
+ <French>EXTENSION: British Armed Forces</French>
+ <German>ERWEITERUNG: British Armed Forces</German>
+ <Russian>Расширение: британские Вооруженные силы</Russian>
+ <Italian>Extension: British Armed Forces</Italian>
+ </Key>
+ <Key ID="STR_WF_PARAMETER_PMC">
+ <English>EXTENSION: Private Military Company</English>
+ <French>EXTENSION: Private Military Company</French>
+ <German>ERWEITERUNG: Private Military Company</German>
+ <Russian>Дополнение: Private Military Company</Russian>
+ <Italian>Extension: Private Military Company</Italian>
+ </Key>
+ <!--Gameplay-->
+ <Key ID="STR_WF_PARAMETER_Alice">
+ <English>GAMEPLAY: Ambient Civilians (ALICE)</English>
+ <French>JOUABILITÉ: Vie Civil (ALICE)</French>
+ <German>SPIEL: Zivilbevölkerung (ALICE)</German>
+ <Russian>Геймплей: Гражданское окружение (ALICE)</Russian>
+ <Italian>Gameplay: Ambient Civilians (ALICE)</Italian>
+ </Key>
+ <Key ID="STR_WF_PARAMETER_Hangars">
+ <English>GAMEPLAY: Airport Hangars</English>
+ <French>JOUABILITÉ: Hangars (Aéroport)</French>
+ <German>SPIEL: Flugzeugkauf bei Flugplatz/Hangar</German>
+ <Russian>Геймплей: Авиация в ангарах</Russian>
+ <Italian>Gameplay: Hangar</Italian>
+ </Key>
+ <Key ID="STR_WF_PARAMETER_BodiesTimeout">
+ <English>GAMEPLAY: Bodies deletion Delay</English>
+ <French>JOUABILITÉ: Délai de Suppression des Corps</French>
+ <German>SPIEL: Dauer für tote Spieler &amp; zerst. Fahrzeuge</German>
+ <Russian>Геймплей: Удалять трупы</Russian>
+ <Italian>Gameplay: Ritardo rimozione corpi</Italian>
+ </Key>
+ <Key ID="STR_WF_PARAMETER_VehicleDelay">
+ <English>GAMEPLAY: Empty Vehicles Lifespan</English>
+ <French>JOUABILITÉ: Durée de Vie des Véhicules Vide</French>
+ <German>SPIEL: Dauer für leere Fahrzeuge</German>
+ <Russian>Геймплей: Удалять пустой транспорт</Russian>
+ <Italian>Gameplay: Tempo di rimozione Veicoli Vuoti</Italian>
+ </Key>
+ <Key ID="STR_WF_PARAMETER_Extended_Inventory">
+ <English>GAMEPLAY: Realistic Equipment</English>
+ <French>JOUABILITÉ: Realistic Equipment</French>
+ <German>SPIEL: Realistische Ausrüstung</German>
+ <Russian>Геймплей: Realistic Equipment</Russian>
+ <Italian>Gameplay: Realistic Equipment</Italian>
+ </Key>
+ <Key ID="STR_WF_PARAMETER_FastTravel">
+ <English>GAMEPLAY: Fast Travel</English>
+ <French>JOUABILITÉ: Déplacement Rapide</French>
+ <German>SPIEL: Schnelles Reisen</German>
+ <Russian>Геймплей: Быстрое перемещение</Russian>
+ <Italian>Gameplay: Fast Travel</Italian>
+ </Key>
+ <Key ID="STR_WF_PARAMETER_FriendlyFire">
+ <English>GAMEPLAY: Friendly Fire (Buildings)</English>
+ <French>JOUABILITÉ: Tirs Fratricide (Bâtiments)</French>
+ <German>SPIEL: Friendly Fire zerstört Basisgebäude</German>
+ <Russian>Геймплей: Огонь по своим (Заводы)</Russian>
+ <Italian>Gameplay: Friendly Fire (Costruzioni)</Italian>
+ </Key>
+ <Key ID="STR_WF_PARAMETER_Grass">
+ <English>GAMEPLAY: Grass Distance</English>
+ <French>JOUABILITÉ: Distance Herbes</French>
+ <German>SPIEL: Grasdichte</German>
+ <Russian>Геймплей: Дистанция травы</Russian>
+ <Italian>Gameplay: Distanza Erba</Italian>
+ </Key>
+ <Key ID="STR_WF_PARAMETER_KickTeamswapper">
+ <English>GAMEPLAY: Kick Teamswappers</English>
+ <French>JOUABILITÉ: Ejéction Teamswappers</French>
+ <German>SPIEL: Kick bei Teamwechsel</German>
+ <Russian>Геймплей: Запретить смену стороны</Russian>
+ <Italian>Gameplay: Caccia Teamswappers</Italian>
+ </Key>
+ <Key ID="STR_WF_PARAMETER_LimitedBoundaries">
+ <English>GAMEPLAY: Limited Boundaries</English>
+ <French>JOUABILITÉ: Frontières Limitées</French>
+ <German>SPIEL: Karte begrenzen</German>
+ <Russian>Геймплей: Ограничение границ</Russian>
+ <Italian>Gameplay: Confini Limitati</Italian>
+ </Key>
+ <Key ID="STR_WF_PARAMETER_MandoMissiles">
+ <English>GAMEPLAY: Mando Missiles</English>
+ <French>JOUABILITÉ: Mando Missiles</French>
+ <German>SPIEL: Mando Missiles</German>
+ <Russian>Геймплей: Mando Missiles</Russian>
+ <Italian>Gameplay: Mando Missiles</Italian>
+ </Key>
+ <Key ID="STR_WF_PARAMETER_Coloration">
+ <English>GAMEPLAY: Map Coloration</English>
+ <French>JOUABILITÉ: Coloration de la Carte</French>
+ <German>SPIEL: Farbschema der Hauptkarte</German>
+ <Russian>Геймплей: Цветовая Схема Карты</Russian>
+ <Italian>Gameplay: Map Coloration</Italian>
+ </Key>
+ <Key ID="STR_WF_PARAMETER_MissileRange">
+ <English>GAMEPLAY: Missile Range Limitation</English>
+ <French>JOUABILITÉ: Limitation de la distance des Missiles.</French>
+ <German>SPIEL: Reichweite für Raketen begrenzen</German>
+ <Russian>Gameplay: Missile Range Limitation</Russian>
+ <Italian>Gameplay: Missile Range Limitation</Italian>
+ </Key>
+ <Key ID="STR_WF_PARAMETER_SecondaryMissions">
+ <English>GAMEPLAY: Secondary Missions</English>
+ <French>JOUABILITÉ: Missions Secondaire</French>
+ <German>SPIEL: Zufällige Nebenmissionen</German>
+ <Russian>Геймплей: Вторичные миссии</Russian>
+ <Italian>Gameplay: Missioni Secondarie</Italian>
+ </Key>
+ <Key ID="STR_WF_PARAMETER_ShowUID">
+ <English>GAMEPLAY: Show Player UID</English>
+ <French>JOUABILITÉ: Affichage ID Joueur</French>
+ <German>SPIEL: Spieler ID anzeigen</German>
+ <Russian>Геймплей: Показывать UID Игрока</Russian>
+ <Italian>Gameplay: Mostra UID Giocatore</Italian>
+ </Key>
+ <Key ID="STR_WF_PARAMETER_Specialization">
+ <English>GAMEPLAY: Specialization</English>
+ <French>JOUABILITÉ: Spécialisation</French>
+ <German>SPIEL: Spezielle Spielkonfiguration</German>
+ <Russian>Геймплей: Специализация</Russian>
+ <Italian>Gameplay: Specialization</Italian>
+ </Key>
+ <Key ID="STR_WF_PARAMETER_ThermalImaging">
+ <English>GAMEPLAY: Thermal Imaging</English>
+ <French>JOUABILITÉ: Images Thermique</French>
+ <German>SPIEL: Wärmebildkameras</German>
+ <Russian>Геймплей: ТВП</Russian>
+ <Italian>Gameplay: Thermal Imaging</Italian>
+ </Key>
+ <Key ID="STR_WF_PARAMETER_TrackAI">
+ <English>GAMEPLAY: Track AI on Map (yellow dots)</English>
+ <French>JOUABILITÉ: Affichage IA sur Carte (yellow dots)</French>
+ <German>SPIEL: KI auf der Karte anzeigen (gelbe Punkte)</German>
+ <Russian>Геймплей: Показывать ИИ на карте (yellow dots)</Russian>
+ <Italian>Gameplay: Segna IA sulla Mappa (yellow dots)</Italian>
+ </Key>
+ <Key ID="STR_WF_PARAMETER_TrackPlayers">
+ <English>GAMEPLAY: Track Players on Map</English>
+ <French>JOUABILITÉ: Affichage joueur sur Carte</French>
+ <German>SPIEL: Spieler auf der Karte anzeigen</German>
+ <Russian>Геймплей: Показывать игроков на карте</Russian>
+ <Italian>Gameplay: Segna Giocatori sulla Mappa</Italian>
+ </Key>
+ <Key ID="STR_WF_PARAMETER_Balance">
+ <English>GAMEPLAY: Units Balancing</English>
+ <French>JOUABILITÉ: Equilibrage Unitées</French>
+ <German>SPIEL: Balancing (veränderte Ausrüstung)</German>
+ <Russian>Геймплей: Баланс подразделений</Russian>
+ <Italian>Gameplay: Bilanciamento Unità</Italian>
+ </Key>
+ <Key ID="STR_WF_PARAMETER_UnitsBounty">
+ <English>GAMEPLAY: Units Bounty</English>
+ <French>JOUABILITÉ: Récompenses d'Unités (bounty)</French>
+ <German>SPIEL: Kopfgeld für getötete Feinde</German>
+ <Russian>Геймплей: Награда за убийство юнитов</Russian>
+ <Italian>Gameplay: Taglia Unità</Italian>
+ </Key>
+ <Key ID="STR_WF_PARAMETER_Upgrades_East">
+ <English>GAMEPLAY: Upgrades (East)</English>
+ <French>JOUABILITÉ: Améliorations (Est)</French>
+ <German>SPIEL: Upgradesystem (Ostblock)</German>
+ <Russian>Геймплей: Модернизация (Восток)</Russian>
+ <Italian>Gameplay: Aggiornamenti (Est)</Italian>
+ </Key>
+ <Key ID="STR_WF_PARAMETER_Upgrades_West">
+ <English>GAMEPLAY: Upgrades (West)</English>
+ <French>JOUABILITÉ: Améliorations (Ouest)</French>
+ <German>SPIEL: Upgradesystem (Westmächte)</German>
+ <Russian>Геймплей: Модернизация (Запад)</Russian>
+ <Italian>Gameplay: Aggiornamenti (Ovest)</Italian>
+ </Key>
+ <Key ID="STR_WF_PARAMETER_VictoryCondition">
+ <English>GAMEPLAY: Victory Condition</English>
+ <French>JOUABILITÉ: Condition de Victoire</French>
+ <German>SPIEL: Siegbedingung</German>
+ <Russian>Геймплей: Условие для победы</Russian>
+ <Italian>Gameplay: Condizioni di Vittoria</Italian>
+ </Key>
+ <Key ID="STR_WF_PARAMETER_ViewDistance">
+ <English>GAMEPLAY: View Distance</English>
+ <French>JOUABILITÉ: Distance de Vue</French>
+ <German>SPIEL: Max. Sichtweite</German>
+ <Russian>Геймплей: Дистанция видимости</Russian>
+ <Italian>Gameplay: View Distance</Italian>
+ </Key>
+ <!--Modul-->
+ <Key ID="STR_WF_PARAMETER_EASA">
+ <English>MODULE: EASA</English>
+ <French>MODULE: EASA</French>
+ <German>MODUL: Bewaffnungssystem (EASA)</German>
+ <Italian>Модуль: EASA</Italian>
+ <Russian>Модуль: EASA</Russian>
+ </Key>
+ <Key ID="STR_WF_PARAMETER_HighCommand">
+ <English>MODULE: High Command</English>
+ <French>MODULE: Haut-Commandement</French>
+ <German>MODUL: Oberbefehlshaber (HC)</German>
+ <Russian>Модуль: Верховное командование</Russian>
+ <Italian>Modulo: Alto Comando</Italian>
+ </Key>
+ <Key ID="STR_WF_PARAMETER_ICBM">
+ <English>MODULE: ICBM</English>
+ <French>MODULE: MBI</French>
+ <German>MODUL: Nuklearwaffen (ICBM)</German>
+ <Russian>Модуль: МБР</Russian>
+ <Italian>Modulo: Missile Nucleare</Italian>
+ </Key>
+ <Key ID="STR_WF_PARAMETER_ISIS">
+ <English>MODULE: Injury System (ISIS)</English>
+ <French>MODULE: Système de Blésurre (ISIS)</French>
+ <German>MODUL: Verletztungssystem (ISIS)</German>
+ <Russian>Модуль: Система ранений (ISIS)</Russian>
+ <Italian>Modulo: Injury System (ISIS)</Italian>
+ </Key>
+ <Key ID="STR_WF_PARAMETER_UPSMON">
+ <English>MODULE: UPSMON AI</English>
+ <French>MODULE: IA UPSMON</French>
+ <German>MODUL: UPSMON (KI)</German>
+ <Russian>Модуль: UPSMON AI</Russian>
+ <Italian>Modulo: UPSMON IA</Italian>
+ </Key>
+ <Key ID="STR_WF_PARAMETER_Clouds">
+ <English>MODULE: Volumetric Clouds</English>
+ <French>MODULE: Nuages Volumétriques</French>
+ <German>MODUL: Volumetrische Wolken</German>
+ <Russian>Модуль: Объемные облака</Russian>
+ <Italian>Modulo: Nuvole Volumetriche</Italian>
+ </Key>
+ <Key ID="STR_WF_PARAMETER_Countermeasures"><!---->
+ <English>MODULE: Countermeasures</English>
+ <French>MODULE: Contres Mesures</French>
+ <German>MODUL: Täuschkörper</German>
+ <Russian>Модуль: Контрмеры</Russian>
+ <Italian>Modulo: Contromisure</Italian>
+ </Key>
+ <!--Respawn-->
+ <Key ID="STR_WF_PARAMETER_Camp">
+ <English>RESPAWN: Camps</English>
+ <French>RÉAPPARITION: Camps</French>
+ <German>RESPAWN: Bei Camps</German>
+ <Russian>Возрожд: В лагерях</Russian>
+ <Italian>Respawn: Campi</Italian>
+ </Key>
+ <Key ID="STR_WF_PARAMETER_CampRespawnRule">
+ <English>RESPAWN: Enemy near</English>
+ <French>RÉAPPARATION: Enemy near</French>
+ <German>RESPAWN: Verhindert durch nahe Feinde</German>
+ <Russian>Возрожд: Враг рядом</Russian>
+ <Italian>Respawn: Nemici Vicini</Italian>
+ </Key>
+ <Key ID="STR_WF_PARAMETER_Respawn">
+ <English>RESPAWN: Delay</English>
+ <French>RÉAPPARITION: Délai</French>
+ <German>RESPAWN: Verzögerung</German>
+ <Russian>Возрожд: Время</Russian>
+ <Italian>Respawn: Ritardo</Italian>
+ </Key>
+ <Key ID="STR_WF_PARAMETER_Respawn_MASH">
+ <English>RESPAWN: MASH</English>
+ <French>RÉAPPARITION: Hôpital de Campagne</French>
+ <German>RESPAWN: Bei Feldlazarett</German>
+ <Russian>Возрожд: На госпитале</Russian>
+ <Italian>Respawn: Ospedale da Campo</Italian>
+ </Key>
+ <Key ID="STR_WF_PARAMETER_MobileRespawn">
+ <English>RESPAWN: Mobile</English>
+ <French>RÉAPPARITION: Mobile</French>
+ <German>RESPAWN: Mobil</German>
+ <Russian>Возрожд: Медицинская машина</Russian>
+ <Italian>Respawn: Mobile</Italian>
+ </Key>
+ <Key ID="STR_WF_PARAMETER_Respawn_Penalty">
+ <English>RESPAWN: Penalty</English>
+ <French>RÉAPPARITION: Pénalité</French>
+ <German>RESPAWN: Strafe</German>
+ <Russian>Возрождение: Штраф</Russian>
+ <Italian>Respawn: Penalità</Italian>
+ </Key>
+ <Key ID="STR_WF_PARAMETER_TownRespawnRange">
+ <English>RESPAWN: Towns Range</English>
+ <French>RÉAPPARITION: Distance Villes</French>
+ <German>RESPAWN: Stadtentfernung</German>
+ <Russian>Возрожд: Радиус в городе</Russian>
+ <Italian>Respawn: Raggio delle Città</Italian>
+ </Key>
+ <!--Handicap-->
+ <Key ID="STR_WF_PARAMETER_AdvancedAir">
+ <English>RESTRICTION: Advanced Aircraft</English>
+ <French>RÉSTRICTION: Aéronefs Avancées</French>
+ <German>HANDICAP: Luftstreitkräfte limitieren</German>
+ <Russian>Запрет: Тяжелая авиация</Russian>
+ <Italian>Restrizione: Velivoli Avanzati</Italian>
+ </Key>
+ <Key ID="STR_WF_PARAMETER_GearRestriction">
+ <English>RESTRICTION: Camp Gear</English>
+ <French>RÉSTRICTION: Equipements Camps</French>
+ <German>HANDICAP: Ausrüstungskauf bei Camp limitieren</German>
+ <Russian>Запрет: Покупка оружия в лагерях</Russian>
+ <Italian>Restrizioni: Equipaggiamento Campi</Italian>
+ </Key>
+ <Key ID="STR_WF_PARAMETER_Kamov">
+ <English>RESTRICTION: Kamov</English>
+ <French>RÉSTRICTION: Kamov</French>
+ <German>HANDICAP: Kamov (KA-52) verbieten</German>
+ <Russian>Запрет: КА-52</Russian>
+ <Italian>Restrizione: Kamov</Italian>
+ </Key>
+ <!--Towns-->
+ <Key ID="STR_WF_PARAMETER_TownsAmount"><!--shared U-->
+ <English>TOWNS: Amount</English>
+ <French>VILLES: Nombre</French>
+ <German>STÄDTE: Anzahl</German>
+ <Russian>Город: Количество</Russian>
+ <Italian>Città: Numero</Italian>
+ </Key>
+ <Key ID="STR_WF_PARAMETER_MaxResStriker">
+ <English>TOWNS: Assault Teams Max.</English>
+ <French>VILLES: Max. Equipe d'Assault</French>
+ <German>STÄDTE: Zufällige Widerstands-Einheiten</German>
+ <Russian>Город: Штурм. отряды кол-во</Russian>
+ <Italian>Città: Team di Assalto Massimi.</Italian>
+ </Key>
+ <Key ID="STR_WF_PARAMETER_TownsCamps">
+ <English>TOWNS: Camps</English>
+ <French>VILLES: Camps</French>
+ <German>STÄDTE: Camps</German>
+ <Russian>Город: Лагеря</Russian>
+ <Italian>Towns: Camps</Italian>
+ </Key>
+ <Key ID="STR_WF_PARAMETER_TownsGear">
+ <English>TOWNS: Equipment Purchase</English>
+ <French>VILLES: Achat d'Equipement</French>
+ <German>TOWNS: Equipment Purchase</German>
+ <Russian>TOWNS: Equipment Purchase</Russian>
+ <Italian>TOWNS: Equipment Purchase</Italian>
+ </Key>
+ <Key ID="STR_WF_PARAMETER_TownsCaptureMode">
+ <English>TOWNS: Capture Mode (Camps)</English>
+ <French>VILLES: Mode de Capture (Camps)</French>
+ <German>STÄDTE: Capture Modus (Camps)</German>
+ <Russian>Город: Способ захвата (Camps)</Russian>
+ <Italian>Città: Modalità Cattura (Camps)</Italian>
+ </Key>
+ <Key ID="STR_WF_PARAMETER_TownCivilians"><!--shared U-->
+ <English>TOWNS: Civilians</English>
+ <French>VILLES: Civils</French>
+ <German>STÄDTE: Zivilbevölkerung</German>
+ <Russian>Город: Гражданские</Russian>
+ <Italian>Città: Civili</Italian>
+ </Key>
+ <Key ID="STR_WF_PARAMETER_TownsConquestMode">
+ <English>TOWNS: Conquest Mode (Towns)</English>
+ <French>VILLES: Mode de Conquête (Towns)</French>
+ <German>STÄDTE: Conquest Modus (Städte)</German>
+ <Russian>Towns: Conquest Mode (Towns)</Russian>
+ <Italian>Towns: Conquest Mode (Towns)</Italian>
+ </Key>
+ <Key ID="STR_WF_PARAMETER_Occupation">
+ <English>TOWNS: Occupation</English>
+ <French>VILLES: Occupation</French>
+ <German>STÄDTE: Haben KI-Besatzung wenn erobert</German>
+ <Russian>Город: Захват</Russian>
+ <Italian>Città: Occupazione</Italian>
+ </Key>
+ <Key ID="STR_WF_PARAMETER_Difficulty_Occupation">
+ <English>TOWNS: Occupation Difficulty</English>
+ <French>VILLES: Difficulté d'Occupation</French>
+ <German>STÄDTE: KI-Besatzung (Schwierigkeit)</German>
+ <Russian>Город: Сложность захвата</Russian>
+ <Italian>Città: Difficoltà Occupazione</Italian>
+ </Key>
+ <Key ID="STR_WF_PARAMETER_Occupation_Type_East"><!--shared U-->
+ <English>TOWNS: Occupation Faction - East</English>
+ <French>VILLES: Faction d'Occupation Est</French>
+ <German>STÄDTE: Besatzer-Fraktion (Ostblock)</German>
+ <Russian>Город: Охраняющая Фракция - Восток</Russian>
+ <Italian>Towns: Occupation Faction - East</Italian>
+ </Key>
+ <Key ID="STR_WF_PARAMETER_Occupation_Type_West"><!--shared U-->
+ <English>TOWNS: Occupation Faction - West</English>
+ <French>VILLES: Faction d'Occupation Ouest</French>
+ <German>STÄDTE: Besatzer-Fraktion (Westmächte)</German>
+ <Russian>Город: Охраняющая Фракция - Запад</Russian>
+ <Italian>Towns: Occupation Faction - West</Italian>
+ </Key>
+ <Key ID="STR_WF_PARAMETER_Reinforcement_Occupation">
+ <English>TOWNS: Occupation Reinforcements</English>
+ <French>VILLES: Renforts d'Occupation</French>
+ <German>STÄDTE: KI-Besatzung ruft autom. Verstärkung</German>
+ <Russian>Город: Подкрепл. сил противника</Russian>
+ <Italian>Città: Rinforzi Occupazione</Italian>
+ </Key>
+ <Key ID="STR_WF_PARAMETER_MaxResPatrols">
+ <English>TOWNS: Patrols Max.</English>
+ <French>VILLES: Patrouilles</French>
+ <German>STÄDTE: Max. Patrouillen des Widerstand</German>
+ <Russian>Город: Патрули Сопротивл. кол-во</Russian>
+ <Italian>Città: Pattuglie Massime.</Italian>
+ </Key>
+ <Key ID="STR_WF_PARAMETER_TownProtectionRange">
+ <English>TOWNS: Protection Range</English>
+ <French>VILLES: Distance de protection</French>
+ <German>STÄDTE: MHQ-Verbot (Radius)</German>
+ <Russian>Город: Радиус защиты</Russian>
+ <Italian>Città: Raggio di Protezione</Italian>
+ </Key>
+ <Key ID="STR_WF_PARAMETER_TownsPurchaseMilita">
+ <English>TOWNS: Purchase Infantry</English>
+ <French>VILLES: Achat d'Infantrie</French>
+ <German>STÄDTE: Kauf von Infanterie möglich wenn erobert</German>
+ <Russian>Город: Покупка пехоты</Russian>
+ <Italian>Città: Compra Fanteria</Italian>
+ </Key>
+ <Key ID="STR_WF_PARAMETER_Resistance">
+ <English>TOWNS: Resistance</English>
+ <French>VILLES: Résistance</French>
+ <German>STÄDTE: (Neutrale) werden vom Widerstand kontrolliert</German>
+ <Russian>Город: Сопротивление</Russian>
+ <Italian>Città: Resistenza</Italian>
+ </Key>
+ <Key ID="STR_WF_PARAMETER_Difficulty_Resistance">
+ <English>TOWNS: Resistance Difficulty</English>
+ <French>VILLES: Difficulté de la Résistance</French>
+ <German>STÄDTE: Widerstand (Schwierigkeit)</German>
+ <Russian>Город: Сложность Сопротивл.</Russian>
+ <Italian>Città: Difficoltà Resistenza</Italian>
+ </Key>
+ <Key ID="STR_WF_PARAMETER_Reinforcement_Type"><!--shared U-->
+ <English>TOWNS: Resistance Faction</English>
+ <French>VILLES: Faction Résistante</French>
+ <German>STÄDTE: Widerstand (Fraktion)</German>
+ <Russian>Город: Фракция сопротивления</Russian>
+ <Italian>Towns: Fazione Resistenza</Italian>
+ </Key>
+ <Key ID="STR_WF_PARAMETER_Reinforcement_Resistance">
+ <English>TOWNS: Resistance Reinforcements</English>
+ <French>VILLES: Renforts Résistants</French>
+ <German>STÄDTE: Widerstand ruft autom. Verstärkung</German>
+ <Russian>Город: Подкрепл. сил Сопротивл.</Russian>
+ <Italian>Città: Rinforzi Resistenza</Italian>
+ </Key>
+ <Key ID="STR_WF_PARAMETER_Resistance_VehLock">
+ <English>TOWNS: Resistance Vehicle Lock</English>
+ <French>VILLES: Vérouillage Véhicle Résistance</French>
+ <German>STÄDTE: Fahrzeuge (Widerstand) sind verschlossen</German>
+ <Russian>Город: Техника сопротивления закрыта</Russian>
+ <Italian>Towns: Veicoli Resist. Chiusi</Italian>
+ </Key>
+ <Key ID="STR_WF_PARAMETER_StartingMode">
+ <English>TOWNS: Starting Mode</English>
+ <French>VILLES: Mode de démarrage</French>
+ <German>STÄDTE: Aufteilung bei Spielbeginn</German>
+ <Russian>Город: Начальные условия</Russian>
+ <Italian>Città: Modalità Iniziale</Italian>
+ </Key>
+ <!--Values-->
+ <Key ID="STR_WF_PARAMETER_Yes"><!--shared U-->
+ <English>Yes</English>
+ <French>Yes</French>
+ <German>Ja</German>
+ <Russian>Yes</Russian>
+ <Italian>Yes</Italian>
+ </Key>
+ <Key ID="STR_WF_PARAMETER_No"><!--shared U-->
+ <English>No</English>
+ <French>No</French>
+ <German>Nein</German>
+ <Russian>No</Russian>
+ <Italian>No</Italian>
+ </Key>
+ <Key ID="STR_WF_PARAMETER_All"><!--shared U-->
+ <English>All</English>
+ <French>Tous</French>
+ <German>Alle</German>
+ <Russian>Все</Russian>
+ <Italian>Tutti</Italian>
+ </Key>
+ <Key ID="STR_WF_Gear_RespawnCharge">
+ <English>You were deducted $%1 due to your gear</English>
+ <French>Vous avez été déduit de $%1. en raison de votre équipement</French>
+ <German>You were deducted from $%1. due to your gear</German>
+ <Russian>У вас изъято $%1. за ваше снаряжение</Russian>
+ <Italian>You were deducted $%1 due to your gear</Italian>
+ </Key>
+ <Key ID="STR_WF_PARAMETER_Aircraft">
+ <English>Aircraft (expensive Land Vehicles)</English>
+ <French>Aircraft (expensive Land Vehicles)</French>
+ <German>Luftstreitkräfte (Landfahrzeuge teurer)</German>
+ <Russian>Aircraft (expensive Land Vehicles)</Russian>
+ <Italian>Aircraft (expensive Land Vehicles)</Italian>
+ </Key>
+ <Key ID="STR_WF_PARAMETER_Automatic">
+ <English>Automatic</English>
+ <French>Automatique</French>
+ <German>Automatisch</German>
+ <Russian>Автоматически</Russian>
+ <Italian>Automatico</Italian>
+ </Key>
+ <Key ID="STR_WF_PARAMETER_Both">
+ <English>Both</English>
+ <French>Both</French>
+ <German>Beide</German>
+ <Russian>Both</Russian>
+ <Italian>Both</Italian>
+ </Key>
+ <Key ID="STR_WF_PARAMETER_CampSel">
+ <English>Camps</English>
+ <French>Camps</French>
+ <German>Camps</German>
+ <Russian>Camps</Russian>
+ <Italian>Camps</Italian>
+ </Key>
+ <Key ID="STR_WF_PARAMETER_CampnDepot">
+ <English>Camps and Depot</English>
+ <French>Camps et Dépôts</French>
+ <German>Camps and Depot</German>
+ <Russian>Camps and Depot</Russian>
+ <Italian>Camps and Depot</Italian>
+ </Key>
+ <Key ID="STR_WF_PARAMETER_Classic"><!--shared U-->
+ <English>Classic</English>
+ <French>Classique</French>
+ <German>Klassisch</German>
+ <Russian>Класический</Russian>
+ <Italian>Classica</Italian>
+ </Key>
+ <Key ID="STR_WF_PARAMETER_Collide"><!--with detection-->
+ <English>Collide detection enable</English>
+ <French>Detection de Collisions active</French>
+ <German>Kollisionsabfrage aktiviert</German>
+ <Russian>Collide detection enable</Russian>
+ <Italian>Collide detection enable</Italian>
+ </Key>
+ <Key ID="STR_WF_PARAMETER_Collide_No"><!--without detection-->
+ <English>Collide detection disable</English>
+ <French>Detection de Collisions Désactivée</French>
+ <German>Kollisionsabfrage deaktiviert</German>
+ <Russian>Collide detection disable</Russian>
+ <Italian>Collide detection disable</Italian>
+ </Key>
+ <Key ID="STR_WF_PARAMETER_Divided_Towns">
+ <English>Divided Towns</English>
+ <French>Villes Divisés</French>
+ <German>50:50</German>
+ <Russian>Разделения городов</Russian>
+ <Italian>Città Divise</Italian>
+ </Key>
+ <Key ID="STR_WF_PARAMETER_Default">
+ <English>Default</English>
+ <French>Défaut</French>
+ <German>Standard</German>
+ <Russian>По умолчанию</Russian>
+ <Italian>Default</Italian>
+ </Key>
+ <Key ID="STR_WF_PARAMETER_Depot">
+ <English>Depot</English>
+ <French>Dépôts</French>
+ <German>Depot</German>
+ <Russian>Depot</Russian>
+ <Italian>Depot</Italian>
+ </Key>
+ <Key ID="STR_WF_PARAMETER_Enabled_Upgrade"><!--artillery computer | map targeting-->
+ <English>Enabled with Upgrade</English>
+ <French>Activé avec Amélioration</French>
+ <German>Aktiviert mit Upgrade</German>
+ <Russian>Enabled with Upgrade</Russian>
+ <Italian>Enabled with Upgrade</Italian>
+ </Key>
+ <Key ID="STR_WF_PARAMETER_Extra_Small">
+ <English>Extra Small</English>
+ <French>Très Petit</French>
+ <German>Sehr wenig</German>
+ <Russian>Очень мало</Russian>
+ <Italian>Extra Piccolo</Italian>
+ </Key>
+ <Key ID="STR_WF_PARAMETER_Free">
+ <English>Free</English>
+ <French>Gratuit</French>
+ <German>Gratis</German>
+ <Russian>Свободные</Russian>
+ <Italian>Free</Italian>
+ </Key>
+ <Key ID="STR_WF_PARAMETER_Fee">
+ <English>Fee</English>
+ <French>Taxe</French>
+ <German>Gebühr</German>
+ <Russian>Плата</Russian>
+ <Italian>Tassa</Italian>
+ </Key>
+ <Key ID="STR_WF_PARAMETER_Full">
+ <English>Full</English>
+ <French>Complet</French>
+ <German>Alle</German>
+ <Russian>Полные</Russian>
+ <Italian>Full</Italian>
+ </Key>
+ <Key ID="STR_WF_PARAMETER_HQWorkers">
+ <English>HQ-Workers</English>
+ <French>HQ-Travailleurs</French>
+ <German>HQ-Arbeiter</German>
+ <Russian>HQ-рабочие</Russian>
+ <Italian>HQ-Workers</Italian>
+ </Key>
+ <Key ID="STR_WF_PARAMETER_Hard"><!--shared U-->
+ <English>Hard</English>
+ <French>Difficile</French>
+ <German>Schwer</German>
+ <Russian>Тяжелый</Russian>
+ <Italian>Difficile</Italian>
+ </Key>
+ <Key ID="STR_WF_PARAMETER_IncomeSystem_Full">
+ <English>Full</English>
+ <French>Plein</French>
+ <German>Voll (Bsp. 120SV = $1200/Teamplayer)</German>
+ <Russian>100%</Russian>
+ <Italian>Pieno</Italian>
+ </Key>
+ <Key ID="STR_WF_PARAMETER_IncomeSystem_Half">
+ <English>Half</English>
+ <French>Moitié</French>
+ <German>Halbiert (Bsp. 120SV = $600/Teamplayer)</German>
+ <Russian>50%</Russian>
+ <Italian>Metà</Italian>
+ </Key>
+ <Key ID="STR_WF_PARAMETER_Income_Sys_Param">
+ <English>Commander Income - Realistic System</English>
+ <French>Salaire Commandant - Système Réaliste</French>
+ <German>Commander-Einkommen - Realistisches System</German>
+ <Russian>Commander Income - Realistic System</Russian>
+ <Italian>Commander Income - Realistic System</Italian>
+ </Key>
+ <Key ID="STR_WF_PARAMETER_Income_Sys_Param_Full">
+ <English>Commander Income - Full Income System</English>
+ <French>Salaire Commandant - Système de Salaire Complet</French>
+ <German>Commander-Einkommen - Full Income System</German>
+ <Russian>Commander Income - Full Income System</Russian>
+ <Italian>Commander Income - Full Income System</Italian>
+ </Key>
+ <Key ID="STR_WF_PARAMETER_Infantry">
+ <English>Infantry (expensive Land/Air)</English>
+ <French>Infantry (expensive Land/Air)</French>
+ <German>Infanterie (Land/Luft teurer)</German>
+ <Russian>Infantry (expensive Land/Air)</Russian>
+ <Italian>Infantry (expensive Land/Air)</Italian>
+ </Key>
+ <Key ID="STR_WF_PARAMETER_Impossible"><!--shared U-->
+ <English>Impossible</English>
+ <French>Impossible</French>
+ <German>Sehr schwer</German>
+ <Russian>Невозможно</Russian>
+ <Italian>Impossibile</Italian>
+ </Key>
+ <Key ID="STR_WF_PARAMETER_Large">
+ <English>Large</English>
+ <French>Grand</French>
+ <German>Viel</German>
+ <Russian>Большой</Russian>
+ <Italian>Grande</Italian>
+ </Key>
+ <Key ID="STR_WF_PARAMETER_LandVehicles">
+ <English>Land Vehicles (expensive Aircraft)</English>
+ <French>Land Vehicles (expensive Aircraft)</French>
+ <German>Landfahrzeuge (Luftstreitkräfte teurer)</German>
+ <Russian>Land Vehicles (expensive Aircraft)</Russian>
+ <Italian>Land Vehicles (expensive Aircraft)</Italian>
+ </Key>
+ <Key ID="STR_WF_PARAMETER_Light"><!--shared U-->
+ <English>Light</English>
+ <French>Léger</French>
+ <German>Leicht</German>
+ <Russian>Легкий</Russian>
+ <Italian>Leggero</Italian>
+ </Key>
+ <Key ID="STR_WF_Loading">
+ <English>Loading (may take a few minutes)</English>
+ <French>Chargement (plusiers minutes)</French>
+ <German>Loading (may take a few minutes)</German>
+ <Russian>Загрузка (may take a few minutes)</Russian>
+ <Italian>Loading (may take a few minutes)</Italian>
+ </Key>
+ <Key ID="STR_WF_Lock">
+ <English>Lock</English>
+ <French>Verrouiller</French>
+ <German>Abschliessen</German>
+ <Russian>Запереть</Russian>
+ <Italian>Chiudi</Italian>
+ </Key>
+ <Key ID="STR_WF_Lock_MHQ">
+ <English>Lock MHQ</English>
+ <French>Verrouiller PC</French>
+ <German>MHQ abschliessen</German>
+ <Russian>Запереть ШТАБ</Russian>
+ <Italian>Chiudi MHQ</Italian>
+ </Key>
+ <Key ID="STR_WF_Long">
+ <English>Long</English>
+ <French>Longue</French>
+ <German>Weit</German>
+ <Russian>Большая</Russian>
+ <Italian>Lungo</Italian>
+ </Key>
+ <Key ID="STR_WF_PARAMETER_Leader">
+ <English>Leaders</English>
+ <French>Chefs d'Equipes</French>
+ <German>Squadleader</German>
+ <Russian>Командиры</Russian>
+ <Italian>Leaders</Italian>
+ </Key>
+ <Key ID="STR_WF_PARAMETER_Medium"><!--shared U-->
+ <English>Medium</English>
+ <French>Moyen</French>
+ <German>Mittel</German>
+ <Russian>Средний</Russian>
+ <Italian>Medio</Italian>
+ </Key>
+ <Key ID="STR_WF_PARAMETER_Money_Supply">
+ <English>Money and Supply</English>
+ <French>Argent et Logistique</French>
+ <German>Geld + Supply</German>
+ <Russian>Деньги и снабжение</Russian>
+ <Italian>Money and Supply</Italian>
+ </Key>
+ <Key ID="STR_WF_PARAMETER_Money"><!--shared U-->
+ <English>Money</English>
+ <French>Argent</French>
+ <German>Geld</German>
+ <Russian>Деньги</Russian>
+ <Italian>Money</Italian>
+ </Key>
+ <Key ID="STR_WF_PARAMETER_NATO_Coloration">
+ <English>NATO Coloration</English>
+ <French>Coloration NATO</French>
+ <German>NATO Farben</German>
+ <Russian>Схема НАТО</Russian>
+ <Italian>NATO Coloration</Italian>
+ </Key>
+ <Key ID="STR_WF_PARAMETER_Nearby_Town">
+ <English>Nearby Towns</English>
+ <French>Villes Voisines</French>
+ <German>Benachbarte Städte</German>
+ <Russian>Близлежащие города</Russian>
+ <Italian>Città Vicine</Italian>
+ </Key>
+ <Key ID="STR_WF_PARAMETER_None"><!--shared U-->
+ <English>None</English>
+ <French>Aucun</French>
+ <German>Keine</German>
+ <Russian>Ни одного</Russian>
+ <Italian>Niente</Italian>
+ </Key>
+ <Key ID="STR_WF_PARAMETER_Parameters">
+ <English>Game parameters</English>
+ <French>Game parameters</French>
+ <German>Spielparameter</German>
+ <Russian>Game parameters</Russian>
+ <Italian>Game parameters</Italian>
+ </Key>
+ <Key ID="STR_WF_PARAMETER_Respawn_CampsRule_WestEast"><!--shared U-->
+ <English>West | East</English>
+ <French>Ouest | Est</French>
+ <German>Westmächte | Ostblock</German>
+ <Russian>Запад | Восток</Russian>
+ <Italian>Ovest | Est</Italian>
+ </Key>
+ <Key ID="STR_WF_PARAMETER_Respawn_CampsRule_WestEastRes"><!--shared U-->
+ <English>West | East | Resistance</English>
+ <French>Ouest | Est | Résistance</French>
+ <German>Westmächte | Ostblock | Widerstand</German>
+ <Russian>Запад | Восток | Сопротивление</Russian>
+ <Italian>Ovest | Est | Resistenza</Italian>
+ </Key>
+ <Key ID="STR_WF_PARAMETER_Respawn_Defender">
+ <English>Occupation Only</English>
+ <French>Occupation Seulement</French>
+ <German>Nur als Besatzungsmacht möglich</German>
+ <Russian>Только окупация</Russian>
+ <Italian>Solo Occupazione</Italian>
+ </Key>
+ <Key ID="STR_WF_PARAMETER_Respawn_CampsNearby">
+ <English>Nearby Camps</English>
+ <French>Camps à Proximité</French>
+ <German>In der Nähe liegende</German>
+ <Russian>Близлежащие лагеря</Russian>
+ <Italian>Campi Vicini</Italian>
+ </Key>
+ <Key ID="STR_WF_PARAMETER_Respawn_Penalty_Full">
+ <English>Gear Price</English>
+ <French>Prix Equipement</French>
+ <German>Voller Ausrüstungspreis</German>
+ <Russian>Стоимость снаряжения</Russian>
+ <Italian>Prezzo Equipaggiamento</Italian>
+ </Key>
+ <Key ID="STR_WF_PARAMETER_Respawn_Penalty_Mobile">
+ <English>Gear Price on Mobile Respawn</English>
+ <French>Prix Equipement lors de Réapparition Mobile</French>
+ <German>Voller Ausrüstungspreis bei mobilem Respawn</German>
+ <Russian>Стоимость снаражения на моб.респауне</Russian>
+ <Italian>Gear Price on Mobile Respawn</Italian>
+ </Key>
+ <Key ID="STR_WF_PARAMETER_Respawn_Penalty_OneFourth">
+ <English>Gear Price 1/4</English>
+ <French>Prix Equipement 1/4</French>
+ <German>1/4 des Ausrüstungspreis</German>
+ <Russian>1/4 стоимости снаряжения</Russian>
+ <Italian>Prezzo Equipaggiamento 1/4</Italian>
+ </Key>
+ <Key ID="STR_WF_PARAMETER_Respawn_Penalty_OneHalf">
+ <English>Gear Price 1/2</English>
+ <French>Prix Equipement 1/2</French>
+ <German>1/2 des Ausrüstungspreis</German>
+ <Russian>1/2 стоимости снаражения</Russian>
+ <Italian>Prezzo Equipaggiamento 1/2</Italian>
+ </Key>
+ <Key ID="STR_WF_PARAMETER_Respawn_Penalty_Remove">
+ <English>Default Gear</English>
+ <French>Equipement par Défaut</French>
+ <German>Respawn mit Standardausrüstung</German>
+ <Russian>Cнаряжения по умолчанию</Russian>
+ <Italian>Equipaggiamento Default</Italian>
+ </Key>
+ <Key ID="STR_WF_PARAMETER_Restriction_Air_H">
+ <English>Helicopters</English>
+ <French>Hélicoptères</French>
+ <German>Nur Hubschrauber</German>
+ <Russian>Вертолеты</Russian>
+ <Italian>Helicopters</Italian>
+ </Key>
+ <Key ID="STR_WF_PARAMETER_Restriction_Air_HTransport">
+ <English>Transport Helicopters</English>
+ <French>Hélicoptères de Transport</French>
+ <German>Nur Transporthubschrauber</German>
+ <Russian>Транспортные вертолеты</Russian>
+ <Italian>Transport Helicopters</Italian>
+ </Key>
+ <Key ID="STR_WF_PARAMETER_Side_East"><!--shared W-->
+ <English>East</English>
+ <French>Est</French>
+ <German>Ostblock</German>
+ <Russian>Восток</Russian>
+ <Italian>Est</Italian>
+ </Key>
+ <Key ID="STR_WF_PARAMETER_Side_West"><!--shared W-->
+ <English>West</English>
+ <French>Ouest</French>
+ <German>Westmächte</German>
+ <Russian>Запад</Russian>
+ <Italian>Ovest</Italian>
+ </Key>
+ <Key ID="STR_WF_PARAMETER_Short">
+ <English>Short</English>
+ <French>Courte</French>
+ <German>Kurz</German>
+ <Russian>Малая</Russian>
+ <Italian>Corto</Italian>
+ </Key>
+ <Key ID="STR_WF_PARAMETER_SupplySystem_Truck">
+ <English>Trucks</English>
+ <French>Camions</French>
+ <German>Lastwagen</German>
+ <Russian>Грузовики</Russian>
+ <Italian>Camion</Italian>
+ </Key>
+ <Key ID="STR_WF_PARAMETER_StartingLocations_Random"><!--shared U-->
+ <English>Random</English>
+ <French>Aléatoire</French>
+ <German>Zufällig</German>
+ <Russian>Случайно</Russian>
+ <Italian>Casuale</Italian>
+ </Key>
+ <Key ID="STR_WF_PARAMETER_StartingLocations_WestNorth">
+ <English>West = North | East = South</English>
+ <French>Ouest N | Est S</French>
+ <German>Westmächte = Norden | Ostblock = Süden</German>
+ <Russian>Запад С | Восток Ю</Russian>
+ <Italian>Ovest N | Est S</Italian>
+ </Key>
+ <Key ID="STR_WF_PARAMETER_StartingLocations_WestSouth">
+ <English>West = South | East = North</English>
+ <French>Ouest S | Est N</French>
+ <German>Westmächte = Süden | Ostblock = Norden</German>
+ <Russian>Запад Ю | Восток С</Russian>
+ <Italian>Ovest S | Est N </Italian>
+ </Key>
+ <Key ID="STR_WF_PARAMETER_Small">
+ <English>Small</English>
+ <French>Petit</French>
+ <German>Wenig</German>
+ <Russian>Маленький</Russian>
+ <Italian>Piccolo</Italian>
+ </Key>
+ <Key ID="STR_WF_PARAMETER_TownsCaptureMode_AllCamps">
+ <English>All Camps are Required</English>
+ <French>Tous les camp sont Nécessaire</French>
+ <German>Alle Camps der Stadt notwendig</German>
+ <Russian>Все Лагеря Требуются</Russian>
+ <Italian>Tutti i campi richiesti</Italian>
+ </Key>
+ <Key ID="STR_WF_PARAMETER_TownsCaptureMode_Threshold">
+ <English>Units Threshold</English>
+ <French>Seuil d'Unités</French>
+ <German>Camp-Verhältnis (Bsp. 2/3)</German>
+ <Russian>Количество юнитов</Russian>
+ <Italian>Soglia Unità</Italian>
+ </Key>
+ <Key ID="STR_WF_PARAMETER_Territorial">
+ <English>Territorial</English>
+ <French>Térritorial</French>
+ <German>Territorial</German>
+ <Russian>Territorial</Russian>
+ <Italian>Territorial</Italian>
+ </Key>
+ <Key ID="STR_WF_PARAMETER_Time"><!--shared U-->
+ <English>Time</English>
+ <French>Temps</French>
+ <German>Zeit</German>
+ <Russian>Время</Russian>
+ <Italian>A Tempo</Italian>
+ </Key>
+ <Key ID="STR_WF_PARAMETER_Victory_Annihilation">
+ <English>Annihilation</English>
+ <French>Annihilation</French>
+ <German>Totale Vernichtung</German>
+ <Russian>Уничтожение</Russian>
+ <Italian>Annihilation</Italian>
+ </Key>
+ <Key ID="STR_WF_PARAMETER_Victory_Assassination">
+ <English>Assassination</English>
+ <French>Assassination</French>
+ <German>Attentat (HQ zerst. + alle Städte)</German>
+ <Russian>Убийство</Russian>
+ <Italian>Assassination</Italian>
+ </Key>
+ <Key ID="STR_WF_PARAMETER_Victory_Supremacy">
+ <English>Supremacy</English>
+ <French>Suprémacie</French>
+ <German>Übermacht (alle Fabriken zerst. + alle Städte)</German>
+ <Russian>Превосходство</Russian>
+ <Italian>Supremacy</Italian>
+ </Key>
+ <Key ID="STR_WF_PARAMETER_Victory_Towns">
+ <English>Towns</English>
+ <French>Villes</French>
+ <German>Städte (alle Städte)</German>
+ <Russian>Города</Russian>
+ <Italian>Città</Italian>
+ </Key>
+ <Key ID="STR_WF_PARAMETER_Vehicles">
+ <English>Vehicles</English>
+ <French>Véhicules</French>
+ <German>Nur für Fahrzeuge</German>
+ <Russian>машины</Russian>
+ <Italian>Vehicles</Italian>
+ </Key>
+ <Key ID="STR_WF_PARAMETER_Weather_Clear">
+ <English>Clear</English>
+ <French>Clair</French>
+ <German>Klar</German>
+ <Russian>Чисто</Russian>
+ <Italian>Sereno</Italian>
+ </Key>
+ <Key ID="STR_WF_PARAMETER_Weather_Cloudy">
+ <English>Cloudy</English>
+ <French>Nuageux</French>
+ <German>Bewölkt</German>
+ <Russian>Облачно</Russian>
+ <Italian>Nuovoloso</Italian>
+ </Key>
+ <Key ID="STR_WF_PARAMETER_Weather_Dynamic">
+ <English>Dynamic</English>
+ <French>Dynamique</French>
+ <German>Dynamisch</German>
+ <Russian>Динамично</Russian>
+ <Italian>Dinamiche</Italian>
+ </Key>
+ <Key ID="STR_WF_PARAMETER_Weather_Rainy">
+ <English>Rainy</English>
+ <French>Pluvieux</French>
+ <German>Regnerisch</German>
+ <Russian>Дождливая</Russian>
+ <Italian>Piovoso</Italian>
+ </Key>
+ <Key ID="STR_WF_PARAMETER_Weapons">
+ <English>Weapons</English>
+ <French>Armes</French>
+ <German>Nur für Waffen</German>
+ <Russian>Вооружение</Russian>
+ <Italian>Armi</Italian>
+ </Key>
+
+<!--Respawn Menu - ALL DONE-->
+ <Key ID="STR_WF_RESPAWN_GearDefault">
+ <English>Default Gear</English>
+ <French>Equip. par Défaut</French>
+ <German>Standardausrüstung</German>
+ <Russian>Default Gear</Russian>
+ <Italian>Default Gear</Italian>
+ </Key>
+ <Key ID="STR_WF_RESPAWN_GearCurrent">
+ <English>Keep current Gear</English>
+ <French>Conserver Equip.</French>
+ <German>Ausrüstung beibehalten</German>
+ <Russian>Keep current Gear</Russian>
+ <Italian>Keep current Gear</Italian>
+ </Key>
+ <Key ID="STR_WF_RESPAWN_Preload">
+ <English>Preloading the environment...</English>
+ <French>Pré-chargement de l'environnement...</French>
+ <German>Preloading aktiv...</German>
+ <Russian>Загрузка окружения...</Russian>
+ <Italian>Preloading the environment...</Italian>
+ </Key>
+ <Key ID="STR_WF_RESPAWN_PreloadYes">
+ <English>Preloading on</English>
+ <French>Préchargement on</French>
+ <German>Preloading an</German>
+ <Russian>Preloading on</Russian>
+ <Italian>Preloading on</Italian>
+ </Key>
+ <Key ID="STR_WF_RESPAWN_PreloadNo">
+ <English>Preloading off</English>
+ <French>Préchargement off</French>
+ <German>Preloading aus</German>
+ <Russian>Preloading off</Russian>
+ <Italian>Preloading off</Italian>
+ </Key>
+ <Key ID="STR_WF_RESPAWN_Status">
+ <English>Respawning in %1 Seconds at %2...</English>
+ <French>Réapparation dans %1 Secondes à %2...</French>
+ <German>Respawn bei %2 in %1 Sekunden...</German>
+ <Russian>Возрождение через %1 секунд на %2...</Russian>
+ <Italian>Rinascerai in %1 Secondi a: %2...</Italian>
+ </Key>
+ <Key ID="STR_WF_RESPAWN_Title">
+ <English>Respawn</English>
+ <French>Réapparition</French>
+ <German>Respawn</German>
+ <Russian>возрождения</Russian>
+ <Italian>Respawn</Italian>
+ </Key>
+
+<!--Service Menu - ALL DONE-->
+ <Key ID="STR_WF_SERVICE_EASA">
+ <English>Exchangeable Armament System (EASA)</English>
+ <French>Système d'Echange d'Armement (EASA)</French>
+ <German>Bewaffnungssystem (EASA)</German>
+ <Russian>Система Смены Вооружения (EASA)</Russian>
+ <Italian>Sistema di cambio Armamento (EASA)</Italian>
+ </Key>
+ <Key ID="STR_WF_SERVICE_Heal">
+ <English>Heal</English>
+ <French>Soins</French>
+ <German>Heilen</German>
+ <Russian>Вылечить</Russian>
+ <Italian>Medicazione</Italian>
+ </Key>
+ <Key ID="STR_WF_SERVICE_Rearm">
+ <English>Rearm</English>
+ <French>Réarmer</French>
+ <German>Aufmunitionieren</German>
+ <Russian>Перезарядить</Russian>
+ <Italian>Riarma</Italian>
+ </Key>
+ <Key ID="STR_WF_SERVICE_Refuel">
+ <English>Refuel</English>
+ <French>Ravitailler</French>
+ <German>Auftanken</German>
+ <Russian>Заправить</Russian>
+ <Italian>Rifornimento</Italian>
+ </Key>
+ <Key ID="STR_WF_SERVICE_Repair">
+ <English>Repair</English>
+ <French>Réparer</French>
+ <German>Reparieren</German>
+ <Russian>Ремонт</Russian>
+ <Italian>Ripara</Italian>
+ </Key>
+
+<!--Tactical Menu - ALL DONE-->
+ <Key ID="STR_WF_TACTICAL_ArtilleryStatus">
+ <English>Status:</English>
+ <French>Etat:</French>
+ <German>Status:</German>
+ <Russian>Статус:</Russian>
+ <Italian>Stato:</Italian>
+ </Key>
+ <Key ID="STR_WF_TACTICAL_ArtilleryRadius">
+ <English>Target-Radius:</English>
+ <French>Radius de la cible:</French>
+ <German>Zielradius:</German>
+ <Russian>Target-Radius:</Russian>
+ <Italian>Target-Radius:</Italian>
+ </Key>
+ <Key ID="STR_WF_TACTICAL_ArtilleryOverview">
+ <English>Artillery Overview</English>
+ <French>Vue d'ensemble - Artillerie</French>
+ <German>Artillerieübersicht</German>
+ <Russian>Artillery Overview</Russian>
+ <Italian>Artillery Overview</Italian>
+ </Key>
+ <Key ID="STR_WF_TACTICAL_ArtillerySetFireMission">
+ <English>Set Fire Mission</English>
+ <French>Définir Appuie Feu</French>
+ <German>Zielposition setzen</German>
+ <Russian>Назначить арт. цель</Russian>
+ <Italian>Imposta Fuoco di Sbarramento</Italian>
+ </Key>
+ <Key ID="STR_WF_TACTICAL_ArtilleryCallFireMission">
+ <English>Call Fire Mission</English>
+ <French>Appel Appuie Feu</French>
+ <German>Feuerbefehl erteilen</German>
+ <Russian>Вызвать арт. удар</Russian>
+ <Italian>Richiedi Fuoco di Sbarramento</Italian>
+ </Key>
+ <Key ID="STR_WF_TACTICAL_Artillery"><!--shared U-->
+ <English>Artillery:</English>
+ <French>Artillerie:</French>
+ <German>Artillerie:</German>
+ <Russian>Артиллерия:</Russian>
+ <Italian>Artiglieria</Italian>
+ </Key>
+ <Key ID="STR_WF_TACTICAL_ArtilleryMinimapInfo">
+ <English>An Artillery Minimap display fitler has been toggled</English>
+ <French>Un filtre d'affichage de l'artillerie sur la carte à été activer</French>
+ <German>Der Grafikfilter für die Artillerie-Karte wurde geändert</German>
+ <Russian>Режим фильтра на артиллерийском дисплее был сменен</Russian>
+ <Italian>An Artillery Minimap display fitler has been toggled</Italian>
+ </Key>
+ <Key ID="STR_WF_TACTICAL_ArtilleryInRange">
+ <English>Range OK</English>
+ <French>A portée</French>
+ <German>Reichweite OK</German>
+ <Russian>Range OK</Russian>
+ <Italian>Range OK</Italian>
+ </Key>
+ <Key ID="STR_WF_TACTICAL_ArtilleryOutOfRange">
+ <English>Out of Range</English>
+ <French>Hors de Portée</French>
+ <German>Zielposition zu weit</German>
+ <Russian>Out of Range</Russian>
+ <Italian>Out of Range</Italian>
+ </Key>
+ <Key ID="STR_WF_TACTICAL_ArtilleryRangeTooClose">
+ <English>Too Close</English>
+ <French>Trop Près</French>
+ <German>Zielposition zu nah</German>
+ <Russian>Too Close</Russian>
+ <Italian>Too Close</Italian>
+ </Key>
+ <Key ID="STR_WF_TACTICAL_Available">
+ <English>Available</English>
+ <French>Disponible</French>
+ <German>Verfügbar</German>
+ <Russian>Доступно</Russian>
+ <Italian>Disponibile</Italian>
+ </Key>
+ <Key ID="STR_WF_TACTICAL_ClickOnMap"><!--shared U-->
+ <English>Click on the map to activate the selected action</English>
+ <French>Cliquer sur la carte pour activer l'action séléctionnée.</French>
+ <German>Klick auf die Karte um die gewünschte Aktion auszuführen</German>
+ <Russian>Click on the map to activate the selected action</Russian>
+ <Italian>Click on the map to activate the selected action</Italian>
+ </Key>
+ <Key ID="STR_WF_TACTICAL_FastTravel"><!--shared W-->
+ <English>Fast Travel</English>
+ <French>Déplacement Rapide</French>
+ <German>Schnelles Reisen</German>
+ <Russian>Быстрое перемещение</Russian>
+ <Italian>Fast Travel</Italian>
+ </Key>
+ <Key ID="STR_WF_TACTICAL_ParadropAmmo">
+ <English>Paradrop - Ammunition</English>
+ <French>Parachutage - Munitions</French>
+ <German>Abwurf - Munition</German>
+ <Russian>Сброс - Аммуниция</Russian>
+ <Italian>Paradrop - Ammunition</Italian>
+ </Key>
+ <Key ID="STR_WF_TACTICAL_ParadropVehicle">
+ <English>Paradrop - Vehicle</English>
+ <French>Parachutage - Véhicule</French>
+ <German>Abwurf - Fahrzeug</German>
+ <Russian>Сброс - Машина</Russian>
+ <Italian>Paradrop - Vehicle</Italian>
+ </Key>
+ <Key ID="STR_WF_TACTICAL_Paratroop"><!--shared W-->
+ <English>Paratroops</English>
+ <French>Parachutistes</French>
+ <German>Fallschirmjäger</German>
+ <Russian>Десант</Russian>
+ <Italian>Paracadutisti</Italian>
+ </Key>
+ <Key ID="STR_WF_TACTICAL_Paradrop"><!--shared W-->
+ <English>Paradrop</English>
+ <French>Parachutage</French>
+ <German>Abwurf</German>
+ <Russian>Высадка десанта</Russian>
+ <Italian>Paradrop</Italian>
+ </Key>
+ <Key ID="STR_WF_TACTICAL_Price">
+ <English>Price:</English>
+ <French>Prix:</French>
+ <German>Kosten:</German>
+ <Russian>Цена:</Russian>
+ <Italian>Prezzo:</Italian>
+ </Key>
+ <Key ID="STR_WF_TACTICAL_RequestButton">
+ <English>Request</English>
+ <French>Demander</French>
+ <German>Anfordern</German>
+ <Russian>запрос</Russian>
+ <Italian>Request</Italian>
+ </Key>
+ <Key ID="STR_WF_TACTICAL_Support">
+ <English>Support:</English>
+ <French>Support:</French>
+ <German>Unterstützung:</German>
+ <Russian>Support:</Russian>
+ <Italian>Support:</Italian>
+ </Key>
+ <Key ID="STR_WF_Purchase">
+ <English>Buy</English>
+ <French>Achat</French>
+ <German>Kaufen</German>
+ <Russian>Купить</Russian>
+ <Italian>Compra</Italian>
+ </Key>
+ <Key ID="STR_WF_Preload">
+ <English>Preloading the environment... be patient...</English>
+ <French>Pré-chargement de l'environnement... soyez patient...</French>
+ <German>Preloading the environment... be patient...</German>
+ <Russian>Загрузка окружения... пожалуйста подождите...</Russian>
+ <Italian>Preloading the environment... be patient...</Italian>
+ </Key>
+ <Key ID="STR_WF_TACTICAL_UnitCam">
+ <English>Unit Camera</English>
+ <French>Camera Unité</French>
+ <German>Einheitenkamera</German>
+ <Russian>Unit Camera</Russian>
+ <Italian>Unit Camera</Italian>
+ </Key>
+ <Key ID="STR_WF_TACTICAL_UAV">
+ <English>UAV - Deploy</English>
+ <French>Drone - Déployer</French>
+ <German>UAV - Einsetzen</German>
+ <Russian>БЛА - развернуть</Russian>
+ <Italian>UAV - Deploy</Italian>
+ </Key>
+ <Key ID="STR_WF_TACTICAL_UAVDestroy">
+ <English>UAV - Destroy</English>
+ <French>Drone - Détruire</French>
+ <German>UAV - Zerstören</German>
+ <Russian>БЛА - уничтожить</Russian>
+ <Italian>UAV - Destroy</Italian>
+ </Key>
+ <Key ID="STR_WF_TACTICAL_UAVRemoteControl">
+ <English>UAV - Remote Control</English>
+ <French>Drone - Contrôle à Distance</French>
+ <German>UAV - Remote Control</German>
+ <Russian>БЛА - удаленный доступ</Russian>
+ <Italian>UAV - Remote Control</Italian>
+ </Key>
+
+<!--Team Menu - ALL DONE-->
+ <Key ID="STR_WF_TEAM_DisbandLabel">
+ <English>Squad AI:</English>
+ <French>Membre IA:</French>
+ <German>Squad KI:</German>
+ <Russian>Squad AI:</Russian>
+ <Italian>Squad AI:</Italian>
+ </Key>
+ <Key ID="STR_WF_TEAM_DisbandButton"><!--shared U-->
+ <English>AI Disband</English>
+ <French>Dissoudre IA</French>
+ <German>KI entfernen</German>
+ <Russian>AI Демобилизовать</Russian>
+ <Italian>AI Smobilita</Italian>
+ </Key>
+ <Key ID="STR_WF_TEAM_GraphicFilterLabel">
+ <English>Graphic-Filter:</English>
+ <French>Filtre Graphique:</French>
+ <German>Grafikfilter:</German>
+ <Russian>Graphic-Filter:</Russian>
+ <Italian>Graphic-Filter:</Italian>
+ </Key>
+ <Key ID="STR_WF_TEAM_MoneyTransferLabel">
+ <English>Money Transfer:</English>
+ <French>Transfert de fond:</French>
+ <German>Geldtransfer:</German>
+ <Russian>Money Transfer:</Russian>
+ <Italian>Money Transfer:</Italian>
+ </Key>
+ <Key ID="STR_WF_TEAM_MoneyTransfer"><!--shared U-->
+ <English>Funds Transfer: $%1</English>
+ <French>Transfert de fonds: $%1</French>
+ <German>Geldmenge: $%1</German>
+ <Russian>Денежный перевод: $%1</Russian>
+ <Italian>Trasferimento Fondi: $%1</Italian>
+ </Key>
+ <Key ID="STR_WF_TEAM_TerrainGridLabel"><!--shared U-->
+ <English>Terrain Grid: %1</English>
+ <French>Grille de Terrain: %1</French>
+ <German>Gelände-Detailstufe: %1</German>
+ <Russian>Детализация земли: %1</Russian>
+ <Italian>Griglia Terreno: %1</Italian>
+ </Key>
+ <Key ID="STR_WF_TEAM_TransferButton">
+ <English>Transfer Money</English>
+ <French>Transfert</French>
+ <German>Geld zusenden</German>
+ <Russian>Перевести деньги</Russian>
+ <Italian>Trasferisci</Italian>
+ </Key>
+ <Key ID="STR_WF_TEAM_VideoOptionsLabel">
+ <English>Video-Options:</English>
+ <French>Options vidéos:</French>
+ <German>Grafikoptionen:</German>
+ <Russian>Video-Options:</Russian>
+ <Italian>Video-Options:</Italian>
+ </Key>
+ <Key ID="STR_WF_TEAM_ViewDistanceLabel"><!--shared U-->
+ <English>View Distance: %1m</English>
+ <French>Distance d'affichage: %1m</French>
+ <German>Gelände-Sichtweite: %1m</German>
+ <Russian>Дальность видимости: %1</Russian>
+ <Italian>Distanza Visiva: %1m</Italian>
+ </Key>
+
+<!--TOOLTIP Strings - ALL DONE-->
+ <Key ID="STR_WF_TOOLTIP_ArtilleryToggle">
+ <English>This icon allows you to toggle between the different artillery display mode on the map</English>
+ <French>Cet icône vous permet de changer le mode d'affichage de l'artillerie sur la carte</French>
+ <German>Hier kannst du den Grafikfilter der Artillerie-Karte ändern</German>
+ <Russian>Эта кнопка позволит вам переключать различные режимы отображения артиллерии на карте</Russian>
+ <Italian>This icon allows you to toggle between the different artillery display mode on the map</Italian>
+ </Key>
+ <Key ID="STR_WF_TOOLTIP_BackButton">
+ <English>Back</English>
+ <French>Retour</French>
+ <German>Zurück</German>
+ <Russian>Back</Russian>
+ <Italian>Back</Italian>
+ </Key>
+ <Key ID="STR_WF_TOOLTIP_Backpack">
+ <English>Backpack Management (Require a backpack)</English>
+ <French>Equipement: Management de Sac à dos (Requiert un sac)</French>
+ <German>Rucksackinhalt verwalten (Rucksack muss gekauft sein)</German>
+ <Russian>Backpack Management (Требуется рюкзак)</Russian>
+ <Italian>Gestisci Zaino (Richiede uno zaino)</Italian>
+ </Key>
+ <Key ID="STR_WF_TOOLTIP_Buy_Commander">
+ <English>Vehicle Commander</English>
+ <French>Commandant du Véhicule</French>
+ <German>Fahrzeug-Kommandant</German>
+ <Russian>Vehicle Commander</Russian>
+ <Italian>Vehicle Commander</Italian>
+ </Key>
+ <Key ID="STR_WF_TOOLTIP_Buy_Driver">
+ <English>Driver</English>
+ <French>Conducteur</French>
+ <German>Fahrer</German>
+ <Russian>Driver</Russian>
+ <Italian>Driver</Italian>
+ </Key>
+ <Key ID="STR_WF_TOOLTIP_Buy_Extra">
+ <English>Vehicle Special crew</English>
+ <French>Equipage spécial du Véhicule</French>
+ <German>Zusätzliche Fahrzeugbesatzung</German>
+ <Russian>Vehicle Special crew</Russian>
+ <Italian>Vehicle Special crew</Italian>
+ </Key>
+ <Key ID="STR_WF_TOOLTIP_Buy_Gunner">
+ <English>Gunner</English>
+ <French>Tireur</French>
+ <German>Boardschütze</German>
+ <Russian>Gunner</Russian>
+ <Italian>Gunner</Italian>
+ </Key>
+ <Key ID="STR_WF_TOOLTIP_Buy_Locked">
+ <English>Vehicle lock</English>
+ <French>Vérouillage du Véhicule</French>
+ <German>Fahrzeug beim Kauf abgeschlossen</German>
+ <Russian>Vehicle lock</Russian>
+ <Italian>Vehicle lock</Italian>
+ </Key>
+ <Key ID="STR_WF_TOOLTIP_CloseButton">
+ <English>Close</English>
+ <French>Fermer</French>
+ <German>Schließen</German>
+ <Russian>Close</Russian>
+ <Italian>Close</Italian>
+ </Key>
+ <Key ID="STR_WF_TOOLTIP_CommandMenu_Commandteam">
+ <English>Allows the commander to handle Squads, Squadmember and Special Tasks</English>
+ <French>permet au commandant de gérer les Equipes et leur membres ainsi que les Tâches Spécifiques</French>
+ <German>Als Commander kannst du die Squads, Squadmitglieder und Spezialaufträge verwalten</German>
+ <Russian>Allows the commander to handle Squads, Squadmember and Special Tasks</Russian>
+ <Italian>Allows the commander to handle Squads, Squadmember and Special Tasks</Italian>
+ </Key>
+ <Key ID="STR_WF_TOOLTIP_CommandMenu_Commander_Menu">
+ <English>Allows the commander to handle the income distribution and HQ-workers</English>
+ <French>Permet au commandant de gérer les revenues et les travailleurs.</French>
+ <German>Als Commander kannst du die Einkommensverteilung und HQ-Arbeiter verwalten</German>
+ <Russian>Allows the commander to handle the income distribution and HQ-workers</Russian>
+ <Italian>Allows the commander to handle the income distribution and HQ-workers</Italian>
+ </Key>
+ <Key ID="STR_WF_TOOLTIP_CommandMenu_SpecialMenu">
+ <English>Artillery, Ammo/Vehicle-drop, Paratroop, UnitCam, FastTravel, UAV and ICBM</English>
+ <French>Artillerie, Parachutage de Munitions/Véhicule, Parachutistes, Caméra d'unité, Déplacement Rapide, Drone et MBI</French>
+ <German>Artillerie, Munition/Fahrzeug-Abwurf, Fallschirmjäger, Einheitenkamera, Schnelles-Reisen, UAV und ICBM</German>
+ <Russian>Artillery, Ammo/Vehicle-drop, Paratroop, UnitCam, FastTravel, UAV and ICBM</Russian>
+ <Italian>Artillery, Ammo/Vehicle-drop, Paratroop, UnitCam, FastTravel, UAV and ICBM</Italian>
+ </Key>
+ <Key ID="STR_WF_TOOLTIP_CommandMenu_SupportMenu">
+ <English>Rearm, Refuel, Repair, Heal and EASA</English>
+ <French>Munitions, Essence, Réparation et Soins sont disponible ainsi que la liste des Paramètres et le Module EASA</French>
+ <German>Aufmunitionieren, Auftanken, Reparaturen, Verwundete heilen und Bewaffnungssystem (EASA)</German>
+ <Russian>Rearm, Refuel, Repair, Heal and EASA</Russian>
+ <Italian>Rearm, Refuel, Repair, Heal and EASA</Italian>
+ </Key>
+ <Key ID="STR_WF_TOOLTIP_CommandMenu_Upgrade_Menu">
+ <English>Allows the commander to handle the factory enhancements</English>
+ <French>En tant que commandant, il est possible de réaliser diverses améliorations</French>
+ <German>Als Commander kannst du den Fabrikausbau verwalten</German>
+ <Russian>Allows the commander to handle the factory expansion</Russian>
+ <Italian>Allows the commander to handle the factory expansion</Italian>
+ </Key>
+ <Key ID="STR_WF_TOOLTIP_FilterButtonAll">
+ <English>All Weapons</English>
+ <French>Toute les armes</French>
+ <German>Alle Waffen</German>
+ <Russian>All Weapons</Russian>
+ <Italian>All Weapons</Italian>
+ </Key>
+ <Key ID="STR_WF_TOOLTIP_FilterButtonMisc">
+ <English>Miscellaneous Weapon and Accessories</English>
+ <French>Armes et accèsoire divers</French>
+ <German>Sonstige Waffen und Zubehör</German>
+ <Russian>Miscellaneous Weapon and Accessories</Russian>
+ <Italian>Miscellaneous Weapon and Accessories</Italian>
+ </Key>
+ <Key ID="STR_WF_TOOLTIP_FilterButtonPrimary">
+ <English>Assaultrifles, MGs, Sniperrifle</English>
+ <French>Fusils d'assault, mitrailleuse, snipers</French>
+ <German>Sturmgewehre, MGs, Scharfschützengewehre</German>
+ <Russian>Assaultrifles, MGs, Sniperrifle</Russian>
+ <Italian>Assaultrifles, MGs, Sniperrifle</Italian>
+ </Key>
+ <Key ID="STR_WF_TOOLTIP_FilterButtonSecondary">
+ <English>Missilelauncher, Backpacks, Bags, Lasermarker</English>
+ <French>Lance-missiles, Sac à dos, Désignateur laser, tout y est!</French>
+ <German>Raketenwerfer, Rucksäcke, Taschen, Lasermarker</German>
+ <Russian>Missilelauncher, Backpacks, Bags, Lasermarker</Russian>
+ <Italian>Missilelauncher, Backpacks, Bags, Lasermarker</Italian>
+ </Key>
+ <Key ID="STR_WF_TOOLTIP_FilterButtonSidearm">
+ <English>Handgun</English>
+ <French>Pistolés</French>
+ <German>Handfeuerwaffen</German>
+ <Russian>Handgun</Russian>
+ <Italian>Handgun</Italian>
+ </Key>
+ <Key ID="STR_WF_TOOLTIP_FilterButtonTemplate">
+ <English>Weapontemplates</English>
+ <French>Templates d'équipement</French>
+ <German>Waffentemplates</German>
+ <Russian>Weapontemplates</Russian>
+ <Italian>Weapontemplates</Italian>
+ </Key>
+ <Key ID="STR_WF_TOOLTIP_GearClear">
+ <English>Clear the current loadout</English>
+ <French>Effacer l'équipement présent</French>
+ <German>Aktuelle Ausrüstung entfernen</German>
+ <Russian>Очистить текущее снаряжение</Russian>
+ <Italian>Annulla il carico attuale</Italian>
+ </Key>
+ <Key ID="STR_WF_TOOLTIP_GearReload">
+ <English>Reload the previous loadout</English>
+ <French>Charger l'équipement précédent</French>
+ <German>Vorherige Ausrüstung laden</German>
+ <Russian>Вернуть предыдущее снаряжение</Russian>
+ <Italian>Ricarica precedente</Italian>
+ </Key>
+ <Key ID="STR_WF_TOOLTIP_HeadbugFix">
+ <English>Fix Headbug</English>
+ <French>Règler Headbug</French>
+ <German>Headbug beheben</German>
+ <Russian>Исправить баг головы</Russian>
+ <Italian>Fix Headbug</Italian>
+ </Key>
+ <Key ID="STR_WF_TOOLTIP_MainMenu_Purchase_Gear">
+ <English>Weapon, Ammonition, Backpacks, Bags and Misc</English>
+ <French>Armes, Munitions, Sacs et Divers</French>
+ <German>Waffen, Munition, Rucksäcke, Taschen und Sonstiges</German>
+ <Russian>Weapon, Ammonition, Backpacks, Bags and Misc</Russian>
+ <Italian>Weapon, Ammonition, Backpacks, Bags and Misc</Italian>
+ </Key>
+ <Key ID="STR_WF_TOOLTIP_MainMenu_Purchase_Units">
+ <English>Infantry, Vehicles and Aircraft</English>
+ <French>Infantrie, Vehicules et Aéronefs</French>
+ <German>Infanterie, Landfahrzeuge, Hubschrauber und Flugzeuge</German>
+ <Russian>Infantry, Vehicles and Aircraft</Russian>
+ <Italian>Infantry, Vehicles and Aircraft</Italian>
+ </Key>
+ <Key ID="STR_WF_TOOLTIP_MainMenu_TeamMenu">
+ <English>Distance View/Details, Money Transfer and KI-Member</English>
+ <French>Distance d'affichage/Détails, Transfert de fond et Management d'IA</French>
+ <German>Gelände-Sichtweite, Gelände-Details, Geldtransfer und KI-Mitglieder</German>
+ <Russian>Distance View/Details, Money Transfer and KI-Member</Russian>
+ <Italian>Distance View/Details, Money Transfer and KI-Member</Italian>
+ </Key>
+ <Key ID="STR_WF_TOOLTIP_MainMenu_VoteForCommander">
+ <English>Vote for a new Commander</English>
+ <French>Vote pour l'éléction d'un nouveau commandant</French>
+ <German>Abstimmung über einen neuen Commander</German>
+ <Russian>Vote for a new Commander</Russian>
+ <Italian>Vote for a new Commander</Italian>
+ </Key>
+ <Key ID="STR_WF_TOOLTIP_Parameter">
+ <English>Show game parameters</English>
+ <French>Afficher les paramètres courant</French>
+ <German>Spielparameter anzeigen</German>
+ <Russian>Show game parameters</Russian>
+ <Italian>Show game parameters</Italian>
+ </Key>
+ <Key ID="STR_WF_TOOLTIP_Preload">
+ <English>Enable or Disable the Environment Preloading</English>
+ <French>Activer ou Désactivé le préchargement de l'environnement</French>
+ <German>Preloading für Spielwelt aktivieren oder deaktivieren</German>
+ <Russian>Enable or Disable the Environment Preloading</Russian>
+ <Italian>Enable or Disable the Environment Preloading</Italian>
+ </Key>
+ <Key ID="STR_WF_TOOLTIP_RespawnDefault">
+ <English>Toggle between the default and current gear</English>
+ <French>Intervetir entre le kit par défaut et le kit courrant</French>
+ <German>Auswahl zwischen Standardausrüstung und aktueller Ausrüstung</German>
+ <Russian>Toggle between the default and current gear</Russian>
+ <Italian>Toggle between the default and current gear</Italian>
+ </Key>
+ <Key ID="STR_WF_TOOLTIP_RespawnST">
+ <English>Respawn stucked Supply Trucks. ATTENTION => ALL Trucks will be destroyed!</English>
+ <French>Réapparition des camions de ravitaillement. ATTENTION => tous les camions seront détruit!</French>
+ <German>Respawn der feststeckenden Versorgungs-LKW`s. ACHTUNG => ALLE LKW`s werden dabei zerstört!</German>
+ <Russian>Respawn stucked Supply Trucks. ATTENTION => ALL Trucks will be destroyed!</Russian>
+ <Italian>Respawn stucked Supply Trucks. ATTENTION => ALL Trucks will be destroyed!</Italian>
+ </Key>
+ <Key ID="STR_WF_TOOLTIP_TeamOrders_Con1">
+ <English>Squad Managment</English>
+ <French>Managment d'Equipe</French>
+ <German>Squadverwaltung</German>
+ <Russian>Squad Managment</Russian>
+ <Italian>Squad Managment</Italian>
+ </Key>
+ <Key ID="STR_WF_TOOLTIP_TeamOrders_Con2">
+ <English>Special Tasks</English>
+ <French>Tâches Spéciales</French>
+ <German>Spezialaufträge</German>
+ <Russian>Special Tasks</Russian>
+ <Italian>Special Tasks</Italian>
+ </Key>
+ <Key ID="STR_WF_TOOLTIP_TeamOrders_Con3">
+ <English>Squadmember Managment</English>
+ <French>Managment Equipiers</French>
+ <German>Squadmitglieder verwalten</German>
+ <Russian>Squadmember Managment</Russian>
+ <Italian>Squadmember Managment</Italian>
+ </Key>
+ <Key ID="STR_WF_TOOLTIP_Unflip">
+ <English>Unflip Vehicle</English>
+ <French>Retourner</French>
+ <German>Umgefallenes Fahrzeug aufrichten</German>
+ <Russian>Перевернуть</Russian>
+ <Italian>Ribalta</Italian>
+ </Key>
+ <Key ID="STR_WF_TOOLTIP_UnitPurchase_Con1">
+ <English>Purchase Infantry</English>
+ <French>Achat d'Infantrie</French>
+ <German>Infanterie-Einheiten kaufen</German>
+ <Russian>Purchase Infantry</Russian>
+ <Italian>Purchase Infantry</Italian>
+ </Key>
+ <Key ID="STR_WF_TOOLTIP_UnitPurchase_Con2">
+ <English>Purchase light Vehicles (Hmmwv, Truck, Motorcycle, Bike, Boat ect.)</English>
+ <French>Achat de véhicules légers (Hmmwv, Camions, Moto, Vélo, Bateaux ect.)</French>
+ <German>Leichte Fahrzeuge kaufen (Jeeps, LKWs, Motorräder, Fahrräder, Boote usw.)</German>
+ <Russian>Purchase light Vehicles (Hmmwv, Truck, Motorcycle, Bike, Boat ect.)</Russian>
+ <Italian>Purchase light Vehicles (Hmmwv, Truck, Motorcycle, Bike, Boat ect.)</Italian>
+ </Key>
+ <Key ID="STR_WF_TOOLTIP_UnitPurchase_Con3">
+ <English>Purchase heavy Vehicles (Tanks, Artillery ect.)</English>
+ <French>Achat de véhicules lourd (Tanks, Artilleries ect.)</French>
+ <German>Schwere Fahrzeuge kaufen (Panzer, Artillerie usw.)</German>
+ <Russian>Purchase heavy Vehicles (Tanks, Artillery ect.)</Russian>
+ <Italian>Purchase heavy Vehicles (Tanks, Artillery ect.)</Italian>
+ </Key>
+ <Key ID="STR_WF_TOOLTIP_UnitPurchase_Con4">
+ <English>Purchase Aircarft (Gunship, Helicopter,Plane)</English>
+ <French>Achat d'aéronefs (Hélicoptères, Avions)</French>
+ <German>Lufteinheiten kaufen (Hubschrauber, Flugzeuge)</German>
+ <Russian>Purchase Aircarft (Gunship, Helicopter,Plane)</Russian>
+ <Italian>Purchase Aircarft (Gunship, Helicopter,Plane)</Italian>
+ </Key>
+ <Key ID="STR_WF_TOOLTIP_UnitPurchase_Con5">
+ <English>Airport / Hangar</English>
+ <French>Achat d'avions (Hangar)</French>
+ <German>Bei Flugplätzen/Hangar Flugzeuge kaufen</German>
+ <Russian>Airport / Hangar</Russian>
+ <Italian>Airport / Hangar</Italian>
+ </Key>
+ <Key ID="STR_WF_TOOLTIP_UnitPurchase_Con6">
+ <English>Buy Units on a conquered Depot</English>
+ <French>Achat à partir du Dépot</French>
+ <German>Bei erobertem Depot Einheiten kaufen</German>
+ <Russian>Buy Units on a conquered Depot</Russian>
+ <Italian>Buy Units on a conquered Depot</Italian>
+ </Key>
+
+<!--BuyUnits Menu - ALL DONE-->
+ <Key ID="STR_WF_UNITS_ArmorLabel">
+ <English>Armor</English>
+ <French>Blindage</French>
+ <German>Panzerung</German>
+ <Russian>Броня</Russian>
+ <Italian>Armatura</Italian>
+ </Key>
+ <Key ID="STR_WF_UNITS_Cash">
+ <English>Money: $%1</English>
+ <French>Argent: $%1</French>
+ <German>Guthaben: $%1</German>
+ <Russian>Деньги: $%1</Russian>
+ <Italian>Money: $%1</Italian>
+ </Key>
+ <Key ID="STR_WF_UNITS_DurationLabel">
+ <English>Construction Time</English>
+ <French>Temps de construction</French>
+ <German>Bauzeit</German>
+ <Russian>Construction Time</Russian>
+ <Italian>Construction Time</Italian>
+ </Key>
+ <Key ID="STR_WF_UNITS_FactionChoiceLabel">
+ <English>Faction selection</English>
+ <French>Selection Faction</French>
+ <German>Armeeauswahl</German>
+ <Russian>Faction selection</Russian>
+ <Italian>Faction selection</Italian>
+ </Key>
+ <Key ID="STR_WF_UNITS_FactionLabel">
+ <English>Faction</English>
+ <French>Faction</French>
+ <German>Armee</German>
+ <Russian>Faction</Russian>
+ <Italian>Faction</Italian>
+ </Key>
+ <Key ID="STR_WF_UNITS_Factory">
+ <English>Factory:</English>
+ <French>Usine:</French>
+ <German>Fabrik:</German>
+ <Russian>Завод:</Russian>
+ <Italian>Fabrica:</Italian>
+ </Key>
+ <Key ID="STR_WF_UNITS_InformationLabel">
+ <English>Information:</English>
+ <French>Information:</French>
+ <German>Information:</German>
+ <Russian>Информация:</Russian>
+ <Italian>Informazioni:</Italian>
+ </Key>
+ <Key ID="STR_WF_UNITS_MaxSpeedLabel">
+ <English>Maximum Speed</English>
+ <French>Vitesse Maximale</French>
+ <German>Höchstgeschwindigkeit</German>
+ <Russian>Максимальная скорость</Russian>
+ <Italian>Massima Velocità</Italian>
+ </Key>
+ <Key ID="STR_WF_UNITS_Magazines">
+ <English>Ammunition</English>
+ <French>Munitions</French>
+ <German>Munition</German>
+ <Russian>Ammunition</Russian>
+ <Italian>Ammunition</Italian>
+ </Key>
+ <Key ID="STR_WF_UNITS_QueuedLabel">
+ <English>Factory Queue: %1</English>
+ <French>Queu de fabrication: %1</French>
+ <German>Warteschlange: %1</German>
+ <Russian>Очередь завода: %1</Russian>
+ <Italian>Coda Produzione:</Italian>
+ </Key>
+ <Key ID="STR_WF_UNITS_SkillLabel">
+ <English>Skill/Suitability</English>
+ <French>Habilité/Efficacité</French>
+ <German>Skill/Eignung</German>
+ <Russian>Skill/Suitability</Russian>
+ <Italian>Skill/Suitability</Italian>
+ </Key>
+ <Key ID="STR_WF_UNITS_TransportCabilityLabel">
+ <English>Transport Capacity</English>
+ <French>Capacité de transport</French>
+ <German>Transportkapazität</German>
+ <Russian>Вместимость транспорта</Russian>
+ <Italian>Transport Capacity</Italian>
+ </Key>
+ <Key ID="STR_WF_UNITS_Weapons">
+ <English>Gear</English>
+ <French>Equipement</French>
+ <German>Ausrüstung</German>
+ <Russian>Gear</Russian>
+ <Italian>Gear</Italian>
+ </Key>
+
+<!--Upgrade Menu - ALL DONE-->
+ <Key ID="STR_WF_UPGRADE_ArtilleryAmmo">
+ <English>Artillery Ammunition</English>
+ <French>Munition d'Artillerie</French>
+ <German>Artilleriemunition</German>
+ <Russian>Артиллерийская Амуниция</Russian>
+ <Italian>Munizioni Artiglieria</Italian>
+ </Key>
+ <Key ID="STR_WF_UPGRADE_Airlift"><!--shared U-->
+ <English>Airlift</English>
+ <French>Transport Aérien</French>
+ <German>Lufttransport</German>
+ <Russian>Авиатранспортировка</Russian>
+ <Italian>Trasporto Aereo</Italian>
+ </Key>
+ <Key ID="STR_WF_UPGRADE_AlreadyRunning">
+ <English>An Upgrade is already running</English>
+ <French>Une Amélioration est déjà en cours</French>
+ <German>Ein anderer Ausbau läuft bereits</German>
+ <Russian>Модернизация уже проводится.</Russian>
+ <Italian>Un Aggiornamento è già in corso</Italian>
+ </Key>
+ <Key ID="STR_WF_UPGRADE_ArtilleryUpgrade"><!--shared U-->
+ <English>Artillery Reloading</English>
+ <French>Rech. Artillerie</French>
+ <German>Artillerienachladezeit</German>
+ <Russian>Перезарядка артиллерии</Russian>
+ <Italian>Tempi riarmo Artiglieria</Italian>
+ </Key>
+ <Key ID="STR_WF_UPGRADE_Condition">
+ <English>This upgrade requires a parameter to be enabled</English>
+ <French>Cette Amélioration nécessite l'activation d'un paramètre</French>
+ <German>Dieses Upgrade wurde per Parameter deaktiviert</German>
+ <Russian>Эта модернизация должна быть разрешена в настройках миссии</Russian>
+ <Italian>Questo aggiornamento ha bisogno di essere abilitato</Italian>
+ </Key>
+ <Key ID="STR_WF_UPGRADE_Cost"><!--shared U-->
+ <English>Cost: %1</English>
+ <French>Coût: %1</French>
+ <German>Kosten: %1</German>
+ <Russian>Цена: %1</Russian>
+ <Italian>Costo: %1</Italian>
+ </Key>
+ <Key ID="STR_WF_UPGRADE_Countermeasures"><!--shared U-->
+ <English>Countermeasures</English>
+ <French>Contres Mesures</French>
+ <German>Täuschkörper</German>
+ <Russian>Контрмеры</Russian>
+ <Italian>Contromisure</Italian>
+ </Key>
+ <Key ID="STR_WF_UPGRADE_Dependent">
+ <English>This upgrade requires the %1 upgrade at level %2</English>
+ <French>Cette amélioration requiert que l'amélioration %1 soit au niveau %2</French>
+ <German>Für diese Upgrade muss %1 die Stufe %2 erreicht haben</German>
+ <Russian>Требуется предварительная модернизация %1 до уровня %2</Russian>
+ <Italian>Questo aggiornamento richiede l'aggiornamento %1 al livello %2</Italian>
+ </Key>
+ <Key ID="STR_WF_UPGRADE_Duration">
+ <English>Build Time: %1</English>
+ <French>Build Time: %1</French>
+ <German>Bauzeit: %1</German>
+ <Russian>Build Time: %1</Russian>
+ <Italian>Build Time: %1</Italian>
+ </Key>
+ <Key ID="STR_WF_UPGRADE_Gear"><!--shared U-->
+ <English>Gear</English>
+ <French>Equipement</French>
+ <German>Ausrüstung</German>
+ <Russian>Снаряжение</Russian>
+ <Italian>Equipaggiamento</Italian>
+ </Key>
+ <Key ID="STR_WF_UPGRADE_Level"><!--shared U-->
+ <English>Current Level: %1</English>
+ <French>Niveau Actuel: %1</French>
+ <German>Aktuelle Stufe: %1</German>
+ <Russian>Уровень: %1</Russian>
+ <Italian>Livello Attuale: %1</Italian>
+ </Key>
+ <Key ID="STR_WF_UPGRADE_Maximum">
+ <English>Upgrade Level Limit reached</English>
+ <French>Niveau d'Amélioration maximal atteint</French>
+ <German>Die maximale Ausbaustufe ist erreicht</German>
+ <Russian>Достигнут предельный уровень модернизации</Russian>
+ <Italian>Limite Livello Aggiornamenti raggiunto</Italian>
+ </Key>
+ <Key ID="STR_WF_UPGRADE_RunningInfo">
+ <English>Upgrade in Progress</English>
+ <French>Amélioration en Cours</French>
+ <German>Der Ausbau läuft auf Hochtouren</German>
+ <Russian>Проводится модернизация</Russian>
+ <Italian>Upgrade in Progress</Italian>
+ </Key>
+ <Key ID="STR_WF_UPGRADE_RespawnRange">
+ <English>Ambulance Range</English>
+ <French>Porté d'Ambulance</French>
+ <German>Ambulanzreichweite</German>
+ <Russian>Радиус возрождения на мед. машинке</Russian>
+ <Italian>Raggio Ambulanza</Italian>
+ </Key>
+ <Key ID="STR_WF_UPGRADE_Supply"><!--shared W-->
+ <English>Supply</English>
+ <French>Logistique</French>
+ <German>Versorgung</German>
+ <Russian>Снабжение</Russian>
+ <Italian>Supply</Italian>
+ </Key>
+ <!--Description Array-->
+ <Key ID="STR_WF_UPGRADE_Description"><!--shared U-->
+ <English>Description:</English>
+ <French>Description:</French>
+ <German>Beschreibung:</German>
+ <Russian>Description:</Russian>
+ <Italian>Description:</Italian>
+ </Key>
+ <!--Barracks-->
+ <Key ID="STR_WF_UPGRADE_barracks_Desc">
+ <English>This upgrade unlocks infantry units.&lt;br/&gt;&lt;br/&gt;This allows the team to buy better infantry units at the Barracks.</English>
+ <French>This upgrade unlocks infantry units.&lt;br/&gt;&lt;br/&gt;This allows the team to buy better infantry units at the Barracks.</French>
+ <German>Dieses Upgrade verbessert die Infanterie.&lt;br/&gt;&lt;br/&gt;Dadurch kann das Team bessere Infanterie-Einheiten bei der Kaserne kaufen.</German>
+ <Russian>This upgrade unlocks infantry units.&lt;br/&gt;&lt;br/&gt;This allows the team to buy better infantry units at the Barracks.</Russian>
+ <Italian>This upgrade unlocks infantry units.&lt;br/&gt;&lt;br/&gt;This allows the team to buy better infantry units at the Barracks.</Italian>
+ </Key>
+ <Key ID="STR_WF_UPGRADE_FastTravel_Desc">
+ <English>This upgrade unlocks Fast Travel.&lt;br/&gt;&lt;br/&gt;Allows the use of Fast Traveling from the Tactical Center.</English>
+ <French>This upgrade unlocks Fast Travel.&lt;br/&gt;&lt;br/&gt;Allows the use of Fast Traveling from the Tactical Center.</French>
+ <German>Dieses Upgrade schaltet Schnelles Reisen frei.&lt;br/&gt;&lt;br/&gt;Damit kann das Team über das Tactical Center, Schnelles Reisen anfordern.</German>
+ <Russian>This upgrade unlocks Fast Travel.&lt;br/&gt;&lt;br/&gt;Allows the use of Fast Traveling from the Tactical Center.</Russian>
+ <Italian>This upgrade unlocks Fast Travel.&lt;br/&gt;&lt;br/&gt;Allows the use of Fast Traveling from the Tactical Center.</Italian>
+ </Key>
+ <Key ID="STR_WF_UPGRADE_Gear_Desc">
+ <English>This upgrade unlocks weapons and gear.&lt;br/&gt;&lt;br/&gt;This allows the team to buy better weapons and gear at the Barracks.</English>
+ <French>This upgrade unlocks weapons and gear.&lt;br/&gt;&lt;br/&gt;This allows the team to buy better weapons and gear at the Barracks.</French>
+ <German>Dieses Upgrade verbessert die Waffen und Ausrüstung.&lt;br/&gt;&lt;br/&gt;Dadurch kann das Team bessere Waffen und Ausrüstung bei der Kaserne kaufen.</German>
+ <Russian>This upgrade unlocks weapons and gear.&lt;br/&gt;&lt;br/&gt;This allows the team to buy better weapons and gear at the Barracks.</Russian>
+ <Italian>This upgrade unlocks weapons and gear.&lt;br/&gt;&lt;br/&gt;This allows the team to buy better weapons and gear at the Barracks.</Italian>
+ </Key>
+ <Key ID="STR_WF_UPGRADE_Ammo_Desc">
+ <English>This upgrade unlocks ammo and ordinance.&lt;br/&gt;&lt;br/&gt;This allows the commander to place ammo and ordinance crates from the construction menu.</English>
+ <French>This upgrade unlocks ammo and ordinance.&lt;br/&gt;&lt;br/&gt;This allows the commander to place ammo and ordinance crates from the construction menu.</French>
+ <German>Dieses Upgrade schaltet Munition frei.&lt;br/&gt;&lt;br/&gt;Damit ist der Commander in der Lage, über das Konstruktionsmenü, Munition und Spezialmunition in der Basis zu platzieren.</German>
+ <Russian>This upgrade unlocks ammo and ordinance.&lt;br/&gt;&lt;br/&gt;This allows the commander to place ammo and ordinance crates from the construction menu.</Russian>
+ <Italian>This upgrade unlocks ammo and ordinance.&lt;br/&gt;&lt;br/&gt;This allows the commander to place ammo and ordinance crates from the construction menu.</Italian>
+ </Key>
+ <!--Light-Factory-->
+ <Key ID="STR_WF_UPGRADE_lightfactory_Desc">
+ <English>This upgrade unlocks light vehicles.&lt;br/&gt;&lt;br/&gt;This allows the team to buy better vehicles at the Light Factory.</English>
+ <French>This upgrade unlocks light vehicles.&lt;br/&gt;&lt;br/&gt;This allows the team to buy better vehicles at the Light Factory.</French>
+ <German>Dieses Upgrade verbessert die leichten Fahrzeuge.&lt;br/&gt;&lt;br/&gt;Dadurch kann das Team bessere Fahrzeuge bei der Fabrik kaufen.</German>
+ <Russian>This upgrade unlocks light vehicles.&lt;br/&gt;&lt;br/&gt;This allows the team to buy better vehicles at the Light Factory.</Russian>
+ <Italian>This upgrade unlocks light vehicles.&lt;br/&gt;&lt;br/&gt;This allows the team to buy better vehicles at the Light Factory.</Italian>
+ </Key>
+ <Key ID="STR_WF_UPGRADE_Supply_Desc">
+ <English>Multiplier to increase supply income.&lt;br/&gt;&lt;br/&gt; - Multi of Supply per Min:&lt;br/&gt; Level 0-2 = x1 / x2 / x3&lt;br/&gt; - Supplies per Truck Load:&lt;br/&gt; Level 0-2 = 5 / 7 / 10</English>
+ <French>Multiplier to increase supply income.&lt;br/&gt;&lt;br/&gt; - Multi of Supply per Min:&lt;br/&gt; Level 0-2 = x1 / x2 / x3&lt;br/&gt; - Supplies per Truck Load:&lt;br/&gt; Level 0-2 = 5 / 7 / 10</French>
+ <German>Multiplikator um das Supply-Einkommen zu erhöhen.&lt;br/&gt;&lt;br/&gt; - Multi für Supply pro Min:&lt;br/&gt; Stufe 0-2 = x1 / x2 / x3&lt;br/&gt; - Supplies pro LKW-Ladung:&lt;br/&gt; Stufe 0-2 = 5 / 7 / 10</German>
+ <Russian>Multiplier to increase supply income.&lt;br/&gt;&lt;br/&gt; - Multi of Supply per Min:&lt;br/&gt; Level 0-2 = x1 / x2 / x3&lt;br/&gt; - Supplies per Truck Load:&lt;br/&gt; Level 0-2 = 5 / 7 / 10</Russian>
+ <Italian>Multiplier to increase supply income.&lt;br/&gt;&lt;br/&gt; - Multi of Supply per Min:&lt;br/&gt; Level 0-2 = x1 / x2 / x3&lt;br/&gt; - Supplies per Truck Load:&lt;br/&gt; Level 0-2 = 5 / 7 / 10</Italian>
+ </Key>
+ <Key ID="STR_WF_UPGRADE_RespawnRange_Desc">
+ <English>Increases the mobile spawn respawn distance.&lt;br/&gt; - Maximum distance:&lt;br/&gt; Level 0 = 250m&lt;br/&gt; Level 1 = 350m&lt;br/&gt; Level 2 = 500m</English>
+ <French>Increases the mobile spawn respawn distance.&lt;br/&gt; - Maximum distance:&lt;br/&gt; Level 0 = 250m&lt;br/&gt; Level 1 = 350m&lt;br/&gt; Level 2 = 500m</French>
+ <German>Erhöht die Reichweite, in der das Team die Ambulanz zum Respawn benutzen kann.&lt;br/&gt; - Maximale Entfernung:&lt;br/&gt; Stufe 0 = 250m&lt;br/&gt; Stufe 1 = 350m&lt;br/&gt; Stufe 2 = 500m</German>
+ <Russian>Increases the mobile spawn respawn distance.&lt;br/&gt; - Maximum distance:&lt;br/&gt; Level 0 = 250m&lt;br/&gt; Level 1 = 350m&lt;br/&gt; Level 2 = 500m</Russian>
+ <Italian>Increases the mobile spawn respawn distance.&lt;br/&gt; - Maximum distance:&lt;br/&gt; Level 0 = 250m&lt;br/&gt; Level 1 = 350m&lt;br/&gt; Level 2 = 500m</Italian>
+ </Key>
+ <!--Heavy-Factory-->
+ <Key ID="STR_WF_UPGRADE_heavyfactory_Desc">
+ <English>This upgrade unlocks heavy vehicles.&lt;br/&gt;&lt;br/&gt;This allows the team to buy better vehicles at the Heavy Factory.</English>
+ <French>This upgrade unlocks heavy vehicles.&lt;br/&gt;&lt;br/&gt;This allows the team to buy better vehicles at the Heavy Factory.</French>
+ <German>Dieses Upgrade verbessert die schweren Fahrzeuge.&lt;br/&gt;&lt;br/&gt;Dadurch kann das Team bessere Fahrzeuge bei der Fabrik kaufen.</German>
+ <Russian>This upgrade unlocks heavy vehicles.&lt;br/&gt;&lt;br/&gt;This allows the team to buy better vehicles at the Heavy Factory.</Russian>
+ <Italian>This upgrade unlocks heavy vehicles.&lt;br/&gt;&lt;br/&gt;This allows the team to buy better vehicles at the Heavy Factory.</Italian>
+ </Key>
+ <Key ID="STR_WF_UPGRADE_ArtilleryUpgrade_Desc">
+ <English>This upgrade decreases the cooldown time of artillery missions called via the Tactical Center.&lt;br/&gt; - Cooldown:&lt;br/&gt; Level 0 = 300 seconds&lt;br/&gt; Level 1 = 250 seconds&lt;br/&gt; Level 2 = 200 seconds&lt;br/&gt; Level 3 = 150 seconds</English>
+ <French>This upgrade decreases the cooldown time of artillery missions called via the Tactical Center.&lt;br/&gt; - Cooldown:&lt;br/&gt; Level 0 = 300 seconds&lt;br/&gt; Level 1 = 250 seconds&lt;br/&gt; Level 2 = 200 seconds&lt;br/&gt; Level 3 = 150 seconds</French>
+ <German>Dieses Upgrade verringert die Nachladezeit der Artillerie im Tactical Center.&lt;br/&gt; - Nachladezeit:&lt;br/&gt; Stufe 0 = 300 Sekunden&lt;br/&gt; Stufe 1 = 250 Sekunden&lt;br/&gt; Stufe 2 = 200 Sekunden&lt;br/&gt; Stufe 3 = 150 Sekunden</German>
+ <Russian>This upgrade decreases the cooldown time of artillery missions called via the Tactical Center.&lt;br/&gt; - Cooldown:&lt;br/&gt; Level 0 = 300 seconds&lt;br/&gt; Level 1 = 250 seconds&lt;br/&gt; Level 2 = 200 seconds&lt;br/&gt; Level 3 = 150 seconds</Russian>
+ <Italian>This upgrade decreases the cooldown time of artillery missions called via the Tactical Center.&lt;br/&gt; - Cooldown:&lt;br/&gt; Level 0 = 300 seconds&lt;br/&gt; Level 1 = 250 seconds&lt;br/&gt; Level 2 = 200 seconds&lt;br/&gt; Level 3 = 150 seconds</Italian>
+ </Key>
+ <Key ID="STR_WF_UPGRADE_ArtilleryAmmo_Desc">
+ <English>This upgrade unlocks new ammunition for artillery pieces.&lt;br/&gt;&lt;br/&gt;This allows the artillery-units to fire improved ammunition.</English>
+ <French>This upgrade unlocks new ammunition for artillery pieces.&lt;br/&gt;&lt;br/&gt;This allows the artillery-units to fire improved ammunition.</French>
+ <German>Dieses Upgrade schaltet neue Munition für die Artillerie frei.&lt;br/&gt;&lt;br/&gt;Dadurch können die Artillerie-Einheiten verbesserte Munition verschießen.</German>
+ <Russian>This upgrade unlocks new ammunition for artillery pieces.&lt;br/&gt;&lt;br/&gt;This allows the artillery-units to fire improved ammunition.</Russian>
+ <Italian>This upgrade unlocks new ammunition for artillery pieces.&lt;br/&gt;&lt;br/&gt;This allows the artillery-units to fire improved ammunition.</Italian>
+ </Key>
+ <!--Air-Factory-->
+ <Key ID="STR_WF_UPGRADE_aircraftfactory_Desc">
+ <English>This upgrade unlocks aircrafts.&lt;br/&gt;&lt;br/&gt;This allows the team to buy better aircraft at the Aircraft Factory and Airport Hangars.</English>
+ <French>This upgrade unlocks aircrafts.&lt;br/&gt;&lt;br/&gt;This allows the team to buy better aircraft at the Aircraft Factory and Airport Hangars.</French>
+ <German>Dieses Upgrade vebessert die Luftstreitkräfte.&lt;br/&gt;&lt;br/&gt;Dadurch kann das Team bessere Luftstreitkräfte bei der Fabrik und auch bei Flugplätzen/Hangars kaufen.</German>
+ <Russian>This upgrade unlocks aircrafts.&lt;br/&gt;&lt;br/&gt;This allows the team to buy better aircraft at the Aircraft Factory and Airport Hangars.</Russian>
+ <Italian>This upgrade unlocks aircrafts.&lt;br/&gt;&lt;br/&gt;This allows the team to buy better aircraft at the Aircraft Factory and Airport Hangars.</Italian>
+ </Key>
+ <Key ID="STR_WF_UPGRADE_Airlift_Desc">
+ <English>This upgrade unlocks airlifting.&lt;br/&gt;&lt;br/&gt;This upgrade is a requirement for teams that want to use Airlifting.</English>
+ <French>This upgrade unlocks airlifting.&lt;br/&gt;&lt;br/&gt;This upgrade is a requirement for teams that want to use Airlifting.</French>
+ <German>Dieses Upgrade schaltet den Abwurf frei.&lt;br/&gt;&lt;br/&gt;Ist die Voraussetzung dafür, damit das Team über das Tactical Center einen Abwurf anfordern kann.</German>
+ <Russian>This upgrade unlocks airlifting.&lt;br/&gt;&lt;br/&gt;This upgrade is a requirement for teams that want to use Airlifting.</Russian>
+ <Italian>This upgrade unlocks airlifting.&lt;br/&gt;&lt;br/&gt;This upgrade is a requirement for teams that want to use Airlifting.</Italian>
+ </Key>
+ <Key ID="STR_WF_UPGRADE_Paradrop_Desc">
+ <English>This upgrade unlocks supply paradrop.&lt;br/&gt;&lt;br/&gt;This allows the team to call a vehicle or ammo paradrop from the Tactical Center.</English>
+ <French>This upgrade unlocks supply paradrop.&lt;br/&gt;&lt;br/&gt;This allows the team to call a vehicle or ammo paradrop from the Tactical Center.</French>
+ <German>Dieses Upgrade schaltet den Abwurf frei.&lt;br/&gt;&lt;br/&gt;Dadurch kann das Team über das Tactical Center einen Abwurf (Fahrzeug / Munition) anfordern.</German>
+ <Russian>This upgrade unlocks supply paradrop.&lt;br/&gt;&lt;br/&gt;This allows the team to call a vehicle or ammo paradrop from the Tactical Center.</Russian>
+ <Italian>This upgrade unlocks supply paradrop.&lt;br/&gt;&lt;br/&gt;This allows the team to call a vehicle or ammo paradrop from the Tactical Center.</Italian>
+ </Key>
+ <Key ID="STR_WF_UPGRADE_Paratroop_Desc">
+ <English>This upgrade unlocks paratroop.&lt;br/&gt;&lt;br/&gt;This allows the team to call paratroop drops from the Tactical Center.</English>
+ <French>This upgrade unlocks paratroop.&lt;br/&gt;&lt;br/&gt;This allows the team to call paratroop drops from the Tactical Center.</French>
+ <German>Dieses Upgrade schaltet die Fallschrimjäger frei.&lt;br/&gt;&lt;br/&gt;Dadurch kann das Team über das Tactical Center, Fallschirmjäger zur Unterstützung anfordern.</German>
+ <Russian>This upgrade unlocks paratroop.&lt;br/&gt;&lt;br/&gt;This allows the team to call paratroop drops from the Tactical Center.</Russian>
+ <Italian>This upgrade unlocks paratroop.&lt;br/&gt;&lt;br/&gt;This allows the team to call paratroop drops from the Tactical Center.</Italian>
+ </Key>
+ <Key ID="STR_WF_UPGRADE_UAV_Desc">
+ <English>This upgrade unlocks UAV.&lt;br/&gt;&lt;br/&gt;This allows the team to buy a UAV from the Tactical Center.</English>
+ <French>This upgrade unlocks UAV.&lt;br/&gt;&lt;br/&gt;This allows the team to buy a UAV from the Tactical Center.</French>
+ <German>Dieses Upgrade schaltet das UAV frei.&lt;br/&gt;&lt;br/&gt;Dadurch kann das Team über das Tactical Center, UAV-unterstützung anfordern.</German>
+ <Russian>This upgrade unlocks UAV.&lt;br/&gt;&lt;br/&gt;This allows the team to buy a UAV from the Tactical Center.</Russian>
+ <Italian>This upgrade unlocks UAV.&lt;br/&gt;&lt;br/&gt;This allows the team to buy a UAV from the Tactical Center.</Italian>
+ </Key>
+ <Key ID="STR_WF_UPGRADE_Countermeasures_Desc">
+ <English>This upgrade unlocks countermeasures.&lt;br/&gt;&lt;br/&gt;This allows the use of defensive countermeasures (flares) on aircraft.&lt;br/&gt;&lt;br/&gt;Only available in Vanilla!</English>
+ <French>This upgrade unlocks countermeasures.&lt;br/&gt;&lt;br/&gt;This allows the use of defensive countermeasures (flares) on aircraft.&lt;br/&gt;&lt;br/&gt;Only available in Vanilla!</French>
+ <German>Dieses Upgrade schaltet die Täuschkörper frei.&lt;br/&gt;&lt;br/&gt;Dadurch können Täuschkörper (Flares) bei den Luftstreikräften benutzt werden.&lt;br/&gt;&lt;br/&gt;Nur in Vanilla verfügbar!</German>
+ <Russian>This upgrade unlocks countermeasures.&lt;br/&gt;&lt;br/&gt;This allows the use of defensive countermeasures (flares) on aircraft.&lt;br/&gt;&lt;br/&gt;Only available in Vanilla!</Russian>
+ <Italian>This upgrade unlocks countermeasures.&lt;br/&gt;&lt;br/&gt;This allows the use of defensive countermeasures (flares) on aircraft.&lt;br/&gt;&lt;br/&gt;Only available in Vanilla!</Italian>
+ </Key>
+ <Key ID="STR_WF_UPGRADE_ICBM_Desc">
+ <English>This upgrade unlocks ICBM.&lt;br/&gt;&lt;br/&gt;This allows the team to buy an ICBM from the Tactical Center.&lt;br/&gt;&lt;br/&gt;Maximum pain for our good friends.</English>
+ <French>This upgrade unlocks ICBM.&lt;br/&gt;&lt;br/&gt;This allows the team to buy an ICBM from the Tactical Center.&lt;br/&gt;&lt;br/&gt;Maximum pain for our good friends.</French>
+ <German>Dieses Upgrade schaltet die ICBM frei.&lt;br/&gt;&lt;br/&gt;Dadurch kann das Team über das Tactical Center die ICBM kaufen.&lt;br/&gt;&lt;br/&gt;Maximaler Schmerz für unsere Freunde.</German>
+ <Russian>This upgrade unlocks ICBM.&lt;br/&gt;&lt;br/&gt;This allows the team to buy an ICBM from the Tactical Center.&lt;br/&gt;&lt;br/&gt;Maximum pain for our good friends.</Russian>
+ <Italian>This upgrade unlocks ICBM.&lt;br/&gt;&lt;br/&gt;This allows the team to buy an ICBM from the Tactical Center.&lt;br/&gt;&lt;br/&gt;Maximum pain for our good friends.</Italian>
+ </Key>
+ <Key ID="STR_WF_UPGRADE_EASA_Desc">
+ <English>This upgrade unlocks EASA.&lt;br/&gt;&lt;br/&gt;This allows the team using EASA to change the primary loadout of aircraft.&lt;br/&gt; - Bomb&lt;br/&gt; - AT Guided Missile&lt;br/&gt; - AA Guided Missile</English>
+ <French>This upgrade unlocks EASA.&lt;br/&gt;&lt;br/&gt;This allows the team using EASA to change the primary loadout of aircraft.&lt;br/&gt; - Bomb&lt;br/&gt; - AT Guided Missile&lt;br/&gt; - AA Guided Missile</French>
+ <German>Dieses Upgrade schaltet EASA frei.&lt;br/&gt;&lt;br/&gt;Dadurch kann das Team die Bewaffnung der Luftstreitkräfte austauschen.&lt;br/&gt; - Bomben&lt;br/&gt; - gelenkte AntiTank-Raketen&lt;br/&gt; - gelenkte AntiAir-Raketen</German>
+ <Russian>This upgrade unlocks EASA.&lt;br/&gt;&lt;br/&gt;This allows the team using EASA to change the primary loadout of aircraft.&lt;br/&gt; - Bomb&lt;br/&gt; - AT Guided Missile&lt;br/&gt; - AA Guided Missile</Russian>
+ <Italian>This upgrade unlocks EASA.&lt;br/&gt;&lt;br/&gt;This allows the team using EASA to change the primary loadout of aircraft.&lt;br/&gt; - Bomb&lt;br/&gt; - AT Guided Missile&lt;br/&gt; - AA Guided Missile</Italian>
+ </Key>
+
+
+<!--UnitCamera Menu - ALL DONE-->
+ <Key ID="STR_WF_UNITCAM_CamMode">
+ <English>Camera mode:</English>
+ <French>Camera mode:</French>
+ <German>Kameramodus:</German>
+ <Russian>Camera mode:</Russian>
+ <Italian>Camera mode:</Italian>
+ </Key>
+ <Key ID="STR_WF_UNITCAM_SquadKI">
+ <English>Squadmember (KI):</English>
+ <French>Equipier (KI):</French>
+ <German>Squadmitglieder (KI):</German>
+ <Russian>Squadmember (KI):</Russian>
+ <Italian>Squadmember (KI):</Italian>
+ </Key>
+
+<!--Voting Menu - ALL DONE-->
+ <Key ID="STR_WF_VOTING_PopUpOnButton"><!--shared U-->
+ <English>Vote-PopUp activate</English>
+ <French>Vote-PopUp activé</French>
+ <German>Vote-PopUp aktivieren</German>
+ <Russian>Vote-PopUp activate</Russian>
+ <Italian>Vote-PopUp activate</Italian>
+ </Key>
+ <Key ID="STR_WF_VOTING_PopUpOffButton"><!--shared U-->
+ <English>Vote-PopUp disable</English>
+ <French>Vote-PopUp désactivé</French>
+ <German>Vote-PopUp deaktivieren</German>
+ <Russian>Vote-PopUp disable</Russian>
+ <Italian>Vote-PopUp disable</Italian>
+ </Key>
+ <Key ID="STR_WF_VOTING_TimeLeft">
+ <English>Time</English>
+ <French>Temps</French>
+ <German>Zeit</German>
+ <Russian>Time</Russian>
+ <Italian>Time</Italian>
+ </Key>
+ <Key ID="STR_WF_VOTING_Title">
+ <English>Commander Vote</English>
+ <French>Vote Commandant</French>
+ <German>Commander Vote</German>
+ <Russian>Commander Vote</Russian>
+ <Italian>Commander Vote</Italian>
+ </Key>
+
+<!--LOADINGSCREEN - ALL DONE-->
+ <Key ID="STR_WF_Loading"><!--shared W-->
+ <English>Receiving</English>
+ <French>Chargement</French>
+ <German>Empfange</German>
+ <Russian>Загрузка</Russian>
+ <Italian>Loading</Italian>
+ </Key>
+
+<!--GLOBAL Strings (shared) - ALL DONE-->
+ <Key ID="STR_WF_Ammo"><!--shared W-->
+ <English>Ammunition</English>
+ <French>Munitions</French>
+ <German>Munition</German>
+ <Russian>Боеприпасы</Russian>
+ <Italian>Munizioni</Italian>
+ </Key>
+ <Key ID="STR_WF_Disabled"><!--shared W-->
+ <English>Disabled</English>
+ <French>Désactivé</French>
+ <German>Deaktiviert</German>
+ <Russian>Отключить</Russian>
+ <Italian>Disabilitato</Italian>
+ </Key>
+ <Key ID="STR_WF_Enabled"><!--shared W-->
+ <English>Enabled</English>
+ <French>Activé</French>
+ <German>Aktiviert</German>
+ <Russian>Включить</Russian>
+ <Italian>Abilitato</Italian>
+ </Key>
+ <Key ID="STR_WF_Purchase"><!--shared U-->
+ <English>Buy</English>
+ <French>Achat</French>
+ <German>Kaufen</German>
+ <Russian>Купить</Russian>
+ <Italian>Compra</Italian>
+ </Key>
+ <Key ID="STR_WF_Income"><!--shared W-->
+ <English>Income: $%1 ($%2/Min)</English>
+ <French>Salaire: $%1 ($%2/Min)</French>
+ <German>Einkommen: $%1 ($%2/Min)</German>
+ <Russian>Наличные: $%1 ($%2/мин)</Russian>
+ <Italian>Entrate: $%1 ($%2/Min)</Italian>
+ </Key>
+ <Key ID="STR_WF_ICBM"><!--shared W-->
+ <English>ICBM</English>
+ <French>MBI</French>
+ <German>ICBM</German>
+ <Russian>МБР</Russian>
+ <Italian>ICBM</Italian>
+ </Key>
+ <Key ID="STR_WF_Price"><!--shared W-->
+ <English>Price</English>
+ <French>Prix</French>
+ <German>Kosten</German>
+ <Russian>Цена</Russian>
+ <Italian>Prezzo</Italian>
+ </Key>
+ <Key ID="STR_WF_SupportMenu"><!--shared U-->
+ <English>Service Point</English>
+ <French>Menu de Soutien</French>
+ <German>Wartungsstation</German>
+ <Russian>Меню поддержки</Russian>
+ <Italian>Menu Supporto</Italian>
+ </Key>
+ <Key ID="STR_WF_Seconds"><!--shared W-->
+ <English>Seconds</English>
+ <French>Secondes</French>
+ <German>Sekunden</German>
+ <Russian>Секунды</Russian>
+ <Italian>Secondi</Italian>
+ </Key>
+
+<!--COIN Strings - ALL DONE-->
+ <Key ID="STR_WF_AircraftFactory"><!--shared W-->
+ <English>Aircraft Factory</English>
+ <French>Usine aviation</French>
+ <German>Lufteinheiten-Fabrik</German>
+ <Russian>Авиазавод</Russian>
+ <Italian>Fabbrica velivoli</Italian>
+ </Key>
+ <Key ID="STR_WF_CommandCenter"><!--shared W-->
+ <English>Command Center</English>
+ <French>Centre de Commandement</French>
+ <German>Befehlsstelle</German>
+ <Russian>Командный центр</Russian>
+ <Italian>Centro di Comando</Italian>
+ </Key>
+ <Key ID="STR_WF_CommandCenter_RU"><!--shared W-->
+ <English>Command Center (RU)</English>
+ <French>Centre de Commandement (RU)</French>
+ <German>Befehlsstelle (RU)</German>
+ <Russian>Командный центр (РФ)</Russian>
+ <Italian>Centro di Comando (RU)</Italian>
+ </Key>
+ <Key ID="STR_WF_CommandCenter_USMC"><!--shared W-->
+ <English>Command Center (USMC)</English>
+ <French>Centre de Commandement (USMC)</French>
+ <German>Befehlsstelle (USMC)</German>
+ <Russian>Командный центр (США)</Russian>
+ <Italian>Centro di Comando (USMC)</Italian>
+ </Key>
+ <Key ID="STR_WF_Fortification">
+ <English>Fortification</English>
+ <French>Fortification</French>
+ <German>Feldbefestigungen</German>
+ <Russian>Укрепления</Russian>
+ <Italian>Fortificazione</Italian>
+ </Key>
+ <Key ID="STR_WF_Strategic">
+ <English>Strategic</English>
+ <French>Stratégique</French>
+ <German>Strategische Anlagen</German>
+ <Russian>Стратегические</Russian>
+ <Italian>Strategico</Italian>
+ </Key>
+ <Key ID="STR_WF_AutoDefense">
+ <English>Auto Defenses</English>
+ <French>Defenses Auto</French>
+ <German>Auto Verteidigung</German>
+ <Russian>Auto Defenses</Russian>
+ <Italian>Auto Defenses</Italian>
+ </Key>
+ <Key ID="STR_WF_On">
+ <English>On</English>
+ <French>On</French>
+ <German>An</German>
+ <Russian>On</Russian>
+ <Italian>On</Italian>
+ </Key>
+ <Key ID="STR_WF_Off">
+ <English>Off</English>
+ <French>Off</French>
+ <German>Aus</German>
+ <Russian>Off</Russian>
+ <Italian>Off</Italian>
+ </Key>
+
+<!--WF Options - ALL DONE-->
+ <Key ID="STR_WF_BuildMenu"><!--shared W-->
+ <English>Construction Menu</English>
+ <French>Menu de Construction</French>
+ <German>Konstruktionsmenü</German>
+ <Russian>меню строительства</Russian>
+ <Italian>Menu Costruzione</Italian>
+ </Key>
+ <Key ID="STR_WF_BuildMenu_Repair"><!--shared U-->
+ <English>Construction Menu (Repair Truck)</English>
+ <French>Menu de Construction (Camion de Réparation)</French>
+ <German>Konstruktionsmenü (Reparatur LKW)</German>
+ <Russian>меню строительства (Рем. грузовик)</Russian>
+ <Italian>Menu Costruzione (Camion Riparazioni)</Italian>
+ </Key>
+ <Key ID="STR_WF_Cargo_Eject">
+ <English>Eject Cargo / jump</English>
+ <French>Ejection de la cargaison / sauter</French>
+ <German>Fracht abwerfen / abspringen lassen</German>
+ <Russian>Eject Cargo / jump</Russian>
+ <Italian>Eject Cargo / jump</Italian>
+ </Key>
+ <Key ID="STR_WF_Lift"><!--shared W-->
+ <English>Attach (Vehicle)</English>
+ <French>Attacher (Véhicule)</French>
+ <German>Befestigen (Fahrzeug)</German>
+ <Russian>Прицепить (Транспорт)</Russian>
+ <Italian>Aggancia (Veicolo)</Italian>
+ </Key>
+ <Key ID="STR_WF_Lift_Detach">
+ <English>Detach (Vehicle)</English>
+ <French>Détacher (Véhicule)</French>
+ <German>Lösen (Fahrzeug)</German>
+ <Russian>Отцепить (Транспорт)</Russian>
+ <Italian>Sgancia (Veicolo)</Italian>
+ </Key>
+ <Key ID="STR_WF_Lock">
+ <English>Lock</English>
+ <French>Verrouiller</French>
+ <German>Abschließen</German>
+ <Russian>Запереть</Russian>
+ <Italian>Chiudi</Italian>
+ </Key>
+ <Key ID="STR_WF_Lock_MHQ">
+ <English>Lock MHQ</English>
+ <French>Verrouiller PC</French>
+ <German>MHQ abschließen</German>
+ <Russian>Запереть ШТАБ</Russian>
+ <Italian>Chiudi MHQ</Italian>
+ </Key>
+ <Key ID="STR_WF_Options"><!--shared W-->
+ <English>>> WF Menu</English>
+ <French>>> WF Menu</French>
+ <German>>> WF Menü</German>
+ <Russian>>> WF Menu</Russian>
+ <Italian>>> WF Menu</Italian>
+ </Key>
+ <Key ID="STR_WF_Push">
+ <English>Push (Vehicle)</English>
+ <French>Pousser (Véhicule)</French>
+ <German>Anschieben (Fahrzeug)</German>
+ <Russian>Толкнуть (Транспорт)</Russian>
+ <Italian>Spingi (Veicolo)</Italian>
+ </Key>
+ <Key ID="STR_WF_Repair_MHQ">
+ <English>Repair (MHQ)</English>
+ <French>Réparation (PC)</French>
+ <German>Reparatur (MHQ)</German>
+ <Russian>Восстановить (КШМ)</Russian>
+ <Italian>Riparazione (MHQ)</Italian>
+ </Key>
+ <Key ID="STR_WF_TaxiReverse">
+ <English>Taxi Reverse</English>
+ <French>Marche Arrière</French>
+ <German>Rückwärts fahren</German>
+ <Russian>Задний Ход</Russian>
+ <Italian>Retromarcia</Italian>
+ </Key>
+ <Key ID="STR_WF_Unlock">
+ <English>Unlock</English>
+ <French>Déverrouiller</French>
+ <German>Aufschließen</German>
+ <Russian>Открыть</Russian>
+ <Italian>Apri</Italian>
+ </Key>
+ <Key ID="STR_WF_Unlock_MHQ"><!--shared W-->
+ <English>Unlock MHQ</English>
+ <French>Déverrouiller PC</French>
+ <German>MHQ aufschließen</German>
+ <Russian>Открыть ШТАБ</Russian>
+ <Italian>Apri MHQ</Italian>
+ </Key>
+
+<!--MAP Description - ALL DONE-->
+ <Key ID="STR_WF_TaskTown"><!--shared U-->
+ <English>Capturing &lt;marker name='%1Depot'&gt;%1&lt;marker&gt; is essential to our team, neutralizing &lt;marker name='%1Depot'&gt;%1&lt;marker&gt; Depot will ensure it's capture.&lt;br/&gt;&lt;br/&gt;</English>
+ <French>Capturer &lt;marker name='%1Depot'&gt;%1&lt;marker&gt; est éssentiel à notre équipe, neutraliser le Dépot de &lt;marker name='%1Depot'&gt;%1&lt;marker&gt; pour procéder à la capture.&lt;br/&gt;&lt;br/&gt;</French>
+ <German>Die Ortschaft &lt;marker name='%1Depot'&gt;%1&lt;marker&gt; zu erobern, ist für unser Team von großer Wichtigkeit!&lt;br /&gt;Neutralisiere den Feind und besetze das zentrale Depot, um somit die Stadt einzunehmen.&lt;br/&gt;&lt;br/&gt;</German>
+ <Russian>Захват &lt;marker name='%1Depot'&gt;%1&lt;marker&gt; имеет большое значение для нас. Захватите бункер в центре для захвата города.&lt;br/&gt;&lt;br/&gt;</Russian>
+ <Italian>Conquistare &lt;marker name='%1Depot'&gt;%1&lt;marker&gt; è fondamentale per il nostro Team, neutralizza il deposito di &lt;marker name='%1Depot'&gt;%1&lt;marker&gt; per catturarlo.&lt;br/&gt;&lt;br/&gt;</Italian>
+ </Key>
+ <Key ID="STR_WF_TaskTown_Complete"><!--shared U-->
+ <English>&lt;marker name='%1Depot'&gt;%1&lt;marker&gt; has been captured by our team, Defending &lt;marker name='%1Depot'&gt;%1&lt;marker&gt; Depot and Camps might be necessary to prevent enemies from taking it.</English>
+ <French>Notre équipe à capturé &lt;marker name='%1Depot'&gt;%1&lt;marker&gt;, la défense du Dépot de &lt;marker name='%1Depot'&gt;%1&lt;marker&gt; et de ses Camps sera peut être nécessaire pour empêcher l'énemie de s'en emparer.</French>
+ <German>Die Ortschaft &lt;marker name='%1Depot'&gt;%1&lt;marker&gt; wurde von unserem Team eingenommen.&lt;br /&gt;Um sie zu halten, müssen das Depot und die Camps von &lt;marker name='%1Depot'&gt;%1&lt;marker&gt; unter allen Umständen verteidigt werden. Der Feind darf keine Chance bekommen, den Ort zurückzuerobern!</German>
+ <Russian>&lt;цель='%1Depot'&gt;%1&lt;marker&gt; было захвачено вашей командой, Защитите &lt;marker name='%1Depot'&gt;%1&lt;marker&gt; контролировать склад и лагеря необходимо для контроля города.</Russian>
+ <Italian>&lt;marker name='%1Depot'&gt;%1&lt;marker&gt; è stato catturata dal tuo team, difendere &lt;marker name='%1Depot'&gt;%1&lt;marker&gt; Depositi e Campi è essere necessario per evitare che vengano catturati dai nemici.</Italian>
+ </Key>
+
+<!--UNSORT - ALL DONE-->
+ <Key ID="STR_WF_AI"><!--shared W-->
+ <English>AI Commander</English>
+ <French>AI Commander</French>
+ <German>KI Commander</German>
+ <Russian>ИИ Commander</Russian>
+ <Italian>AI Commander</Italian>
+ </Key>
+ <Key ID="STR_WF_Commander"><!--shared U-->
+ <English>Commander: %1</English>
+ <French>Commandant: %1</French>
+ <German>Commander: %1</German>
+ <Russian>Командир: %1</Russian>
+ <Italian>Comandante: %1.</Italian>
+ </Key>
+ <Key ID="STR_WF_CurrentMission"><!--shared U-->
+ <English>Current Mission: %1</English>
+ <French>Mission en cours: %1</French>
+ <German>Aktueller Auftrag: %1</German>
+ <Russian>Текущее задание: %1</Russian>
+ <Italian>Missione attuale: %1</Italian>
+ </Key>
+ <Key ID="STR_WF_Side_Resistance">
+ <English>Resistance</English>
+ <French>Résistance</French>
+ <German>Widerstand</German>
+ <Russian>Сопротивление</Russian>
+ <Italian>Resistenza</Italian>
+ </Key>
+ <Key ID="STR_WF_Minefield"><!--shared W-->
+ <English>Minefield</English>
+ <French>Champs de Mines</French>
+ <German>Minenfeld</German>
+ <Russian>Минное поле</Russian>
+ <Italian>Campo Minato</Italian>
+ </Key>
+ <Key ID="STR_WF_ArtilleryNest">
+ <English>Earthen artillery nest</English>
+ <French>Nid artil. terre</French>
+ <German>Erd-Artilleriestellung</German>
+ <Russian>Окоп артиллерии</Russian>
+ <Italian>Nido mitragliatrici di terra</Italian>
+ </Key>
+<!--outdated stuff -
+ <Key ID="STR_WF_Mission_Description"><!--check--
+ <English>After selecting a mission, you will have to capture the Town Depot of the selected town, don't forget that capturing the camps around the depot will give you a respawn possibility in this town.</English>
+ <French>Après avoir acceptée une mission, vous devez capturer le Dépot de la ville, capturer les camps autours de celui-ci aiderons à sa capture.</French>
+ <German>Nachdem du einen Auftrag angenommen hast, musst du die Stadt einnehmen. Begebe dich dazu zum Depot (der große Bunker oder Turm in der Stadtmitte). Nehme vorher jedoch mindestens ein Camp ein, denn dort kannst du dann wieder einsteigen (Respawn), sofern diese Option aktiviert ist</German>
+ <Russian>После выбора задания вам необходимо захватить склад города. Захват лагерей поможет в захвате города.</Russian>
+ <Italian>Dopo aver selezionato una missione, dovrai catturare il Deposito Centrale della Città selezionata, non dimenticare che catturare i campi intorno al deposito ti daranno una possibilità di respawn nella città.</Italian>
+ </Key>
+ <Key ID="STR_WF_CommandMenu"><!--check--
+ <English>Commanding</English>
+ <French>Commandemment</French>
+ <German>Kommandieren</German>
+ <Russian>Командование</Russian>
+ <Italian>Menu Comando</Italian>
+ </Key>
+ <Key ID="STR_WF_Gear_Label"><!--check--
+ <English>Gear Menu:</English>
+ <French>Menu d'Equipement:</French>
+ <German>Ausrüstung:</German>
+ <Russian>Меню покупки снаряжения:</Russian>
+ <Italian>Equipaggiamento:</Italian>
+ </Key>
+ <Key ID="STR_WF_Mission_Information"><!--check--
+ <English>Mission Information:</English>
+ <French>Information Mission:</French>
+ <German>Auftragsinformation:</German>
+ <Russian>Информация о задании:</Russian>
+ <Italian>Informazioni Missione:</Italian>
+ </Key>
+ <Key ID="STR_WF_HeadbugFix"><!--check--
+ <English>Fix Headbug</English>
+ <French>Règler Headbug</French>
+ <German>Headbug beheben</German>
+ <Russian>Исправить баг головы</Russian>
+ <Italian>Fix Headbug</Italian>
+ </Key>
+ <Key ID="STR_WF_CurrentCost"><!--check--
+ <English>Current Cost: $%1.</English>
+ <French>Coût Actuel: $%1.</French>
+ <German>Bisherige Kosten: $%1</German>
+ <Russian>Цена: $%1.</Russian>
+ <Italian>Costo Attuale: $%1.</Italian>
+ </Key>
+ <Key ID="STR_WF_Upgrade"><!--check--
+ <English>Upgrade</English>
+ <French>Amélioration</French>
+ <German>Verbessern</German>
+ <Russian>Модернизация</Russian>
+ <Italian>Aggiornamento</Italian>
+ </Key>
+ <Key ID="STR_WF_RespawnST"><!--check--
+ <English>Respawn Supply Truck</English>
+ <French>Réapparition Cam Log</French>
+ <German>Versorgungs-LKW respawn</German>
+ <Russian>Возродить грузовики снаб</Russian>
+ <Italian>Respawn Camion Supply</Italian>
+ </Key>
+ <Key ID="STR_WF_PARAMETER_ResistancePatrol"><!--check--
+ <English>Towns: Patrols</English>
+ <French>Villes: Patrouilles</French>
+ <German>Stadt: Patrouillen (Widerstand)</German>
+ <Russian>Город: Патрули Сопротивл.</Russian>
+ <Italian>Towns: Pattuglie</Italian>
+ </Key>
+ <Key ID="STR_WF_PARAMETER_ResistanceStriker"><!--check--
+ <English>Towns: Assault Teams</English>
+ <French>Villes: Equipes d'assault</French>
+ <German>Stadt: Angriffsteams (Widerstand)</German>
+ <Russian>Город: Штурм. отряды Сопротивл.</Russian>
+ <Italian>Città: Pattuglie</Italian>
+ </Key>
+ <Key ID="STR_WF_TOOLTIP_MainMenu_CommandMenu">
+ <English>Teamorder, Special-Menu, Factory-Upgrades, Economy and Support</English>
+ <French>Ordres d'équipe, Menu Spécial, Améliorations, Economie et Support.</French>
+ <German>Command Center, Spezial-Menü, Fabrikausbau, Finanzen und Versorgung</German>
+ <Russian>Teamorder, Special-Menu, Factory-Upgrades, Economy and Support</Russian>
+ <Italian>Teamorder, Special-Menu, Factory-Upgrades, Economy and Support</Italian>
+ </Key>
+ <Key ID="STR_WF_Abort"><!--shared--
+ <English>Abort</English>
+ <French>Annuler</French>
+ <German>Abbrechen</German>
+ <Russian>Отменить</Russian>
+ <Italian>Annulla</Italian>
+ </Key>
+ <Key ID="STR_WF_Accept"><!--shared--
+ <English>Accept</English>
+ <French>Accépter</French>
+ <German>Akzeptieren</German>
+ <Russian>Подтвердить</Russian>
+ <Italian>Accetta</Italian>
+ </Key>
+ <Key ID="STR_WF_CHAT_Camp_Captured_Enemy"><!--chat--
+ <English>The enemy has captured a camp at %1.</English>
+ <French>L'énemie à capturé un campement à %1.</French>
+ <German>Der Feind hat ein Camp bei %1 überrannt.</German>
+ <Russian>Противник захватил лагерь в %1.</Russian>
+ <Italian>Il nemico ha catturato un campo a %1.</Italian>
+ </Key>
+-->
+ <Key ID="STR_WF_Magazines">
+ <English>Magazines</English>
+ <French>Magazines</French>
+ <German>Magazines</German>
+ <Russian>Magazines</Russian>
+ <Italian>Magazines</Italian>
+ </Key>
+ <Key ID="STR_WF_Ruck_Space_Free">
+ <English>Ruck: %1cc free</English>
+ <French>Ruck: %1cc free</French>
+ <German>Ruck: %1cc free</German>
+ <Russian>Ruck: %1cc free</Russian>
+ <Italian>Ruck: %1cc free</Italian>
+ </Key>
+ <Key ID="STR_WF_Base_Only">
+ <English>Base Only</English>
+ <French>Base Only</French>
+ <German>Base Only</German>
+ <Russian>Base Only</Russian>
+ <Italian>Base Only</Italian>
+ </Key>
+ <Key ID="STR_WF_Base_And_Towns">
+ <English>Base And Friendly Towns</English>
+ <French>Base And Friendly Towns</French>
+ <German>Base And Friendly Towns</German>
+ <Russian>Base And Friendly Towns</Russian>
+ <Italian>Base And Friendly Towns</Italian>
+ </Key>
+ <Key ID="STR_WF_Gameplay_DefenseAmmo">
+ <English>Gameplay: Defense Auto Reload</English>
+ <French>Gameplay: Defense Auto Reload</French>
+ <German>Gameplay: Defense Auto Reload</German>
+ <Russian>Gameplay: Defense Auto Reload</Russian>
+ <Italian>Gameplay: Defense Auto Reload</Italian>
+ </Key>
+ <Key ID="STR_WF_Gameplay_AceWounds">
+ <English>Gameplay: ACE Wounds</English>
+ <French>Gameplay: ACE Wounds</French>
+ <German>Gameplay: ACE Wounds</German>
+ <Russian>Gameplay: ACE Wounds</Russian>
+ <Italian>Gameplay: ACE Wounds</Italian>
+ </Key>
+ </Container>
+ </Package>
+</Project> \ No newline at end of file
diff --git a/version.sqf b/version.sqf
new file mode 100644
index 0000000..b47d2b5
--- /dev/null
+++ b/version.sqf
@@ -0,0 +1,32 @@
+/*
+ Description:
+ Define which 'part' to run.
+*/
+
+/* DEBUG */
+//#define WF_DEBUG 1
+
+/* Gameplay: Change the overall camo */
+//#define WF_CAMO 1
+
+/* Gamemode to run */
+#define COMBINEDOPS 1
+//#define VANILLA 1
+//#define ARROWHEAD 1
+
+/* ACE enabled */
+#define ACE 1
+
+/* Description.ext Specific */
+#define WF_MAXPLAYERS 32
+#define WF_MISSIONNAME "Warfare BE 2.071 CO ACE [Chux 1.8] - Chernarus"
+#define WF_RESPAWNDELAY 2
+
+/* MySQL Support */
+//#define MYSQL 1
+
+/* Load Screen (OA/CO) */
+#ifndef VANILLA
+ //#define WF_LOADSCREEN "ca\Missions_e\MPScenarios\MPE_MountainWarfare.Takistan\loading_mpwarfare_co.paa"
+ #define WF_LOADSCREEN __EVAL(["ca\Missions_e\campaign\missions\CE7B_PhoenixOp.Takistan\img\loading08_phoenixop_co.paa","ca\Missions_e\campaign\missions\CE7A_FinishingTouch.Takistan\img\loading08_finishingtouch_co.paa","ca\Missions_e\campaign\missions\CE6_EyeOfTheHurricane.Zargabad\img\loading07_co.paa","ca\Missions_e\campaign\missions\CE5B_FromHell.Takistan\img\loading06_fromhell_co.paa","ca\Missions_e\campaign\missions\CE5A_Sandstorm.Takistan\img\loading06_sandstorm_co.paa","ca\Missions_e\campaign\missions\CE4_OpenSeason.Takistan\img\loading05_co.paa","ca\Missions_e\campaign\missions\CE3_ColtanBlues.Takistan\img\loading04_co.paa","ca\Missions_e\campaign\missions\CE2_Pathfinder.Takistan\img\loading03_co.paa","ca\Missions_e\campaign\missions\CE1_GoodMorningTStan.Takistan\img\loading02_goodmorning_co.paa","ca\Missions_e\campaign\missions\CE0_Backstab.Zargabad\img\loading01_co.paa","ca\Missions_e\scenarios\SPE1_Jackal.Takistan\loading_jackal_co.paa","ca\Missions_e\scenarios\SPE1_Vehicles_US.Takistan\loading_showus_co.paa","ca\Missions_e\scenarios\SPE1_Vehicles_TKG.Zargabad\loading_showgue_co.paa","ca\Missions_e\scenarios\SPE1_Vehicles_TKA.Zargabad\loading_showtk_co.paa","ca\Missions_e\scenarios\SPE1_Vehicles_Civilian.Zargabad\loading_showciv_co.paa","ca\Missions_e\scenarios\SPE1_Vehicles_Allies.Takistan\loading_shownato_co.paa","ca\Missions_e\scenarios\SPE1_SteelPanthers.Takistan\loading_steelpanthers_co.paa","ca\Missions_e\scenarios\SPE1_OneShotOneKill.Takistan\loading_oneshotonekill_co.paa","ca\Missions_e\scenarios\SPE1_Littlebird.Takistan\loading_littlebird_co.paa","ca\Missions_e\scenarios\SPE1_LaserShow.Takistan\loading_lasershow_co.paa","ca\Missions_e\scenarios\SPE1_HikeInTheHills.Takistan\loading_hikeinthehills_co.paa","ca\Missions_e\scenarios\SPE1_DeathFromAbove.Takistan\loading_deathfromabove_co.paa","ca\Missions_e\scenarios\SPE1_Benchmark1.Takistan\loading_benchmark_co.paa","ca\Missions_e\MPScenarios\MPE1_Dogfighters.Takistan\loading_mpdogfight_co.paa","ca\Missions_e\MPScenarios\MPE_MountainWarfare.Takistan\loading_mpwarfare_co.paa","ca\Missions_e\MPScenarios\MPE_SectorControl.Zargabad\img\loading_mpsectorcontrol_co.paa"] select round random 25)
+#endif