Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- file: chernarus_replace.sqf
- Original Script Here: http://forums.bistudio.com/showthread.php?190404-Chernarus-Takistan
- Script edited by jakehekesfists[dmd] 08/05/2015
- -rev 2.4b (for Arma III)
- 11/10/2016 Updated for A3 Exile w/ CUP Terrains - 21DMD Zerkforge edit
- 28/11/2016 (ANNOYING SHIT ARRAY REMOVAL + GLOBAL SIM DISABLE ON REPLACED BUILDINGS FOR HOPEFULLY BETTER PERFORMANCE)
- 29/11/2016
- * Code Streamline & pushback replaces set.
- * disable global sim on all map objects except lamps.
- * hideObjectGlobal used on Server, no longer need anything to run on client
- 04/12/2016
- * fuel pumps require simulation to auto refuel - fixed (add classes to _DMD_FuelPumps array if using non-chernarus map)
- */
- if (isServer) then {
- private _DMD_CloseHouse = [
- // DELETE ONLY
- "CUP_A2_boots_ep1","CUP_A2_drevo_hromada","CUP_A2_haystack","CUP_A2_metalcase_01","CUP_A2_metalcase_02","CUP_A2_woodpile","Land_fuel_tank_small","Land_Hut06","Land_Ind_BoardsPack1","Land_Ind_BoardsPack2","Land_Ind_Timbers","Land_Kontejner","Land_loco_742_blue","Land_Misc_GContainer_Big","Land_Nasypka","Land_seno_balik","Land_Shed_M01","Land_Shed_M02","Land_Shed_M03","Land_Shed_W03","Land_SignB_Hotel_CZ2","Land_SignB_PostOffice","Land_SignB_Pub_CZ2","Land_SignB_Pub_CZ3","Land_SignB_Pub_RU3","Land_Sign_Bar_RU","Land_Tec","Land_wagon_box",
- // REPLACE
- "Land_A_Office02","Land_Church_01","Land_Ind_SawMill","Land_Church_02","Land_Church_02a","Land_HouseV2_01A","Land_HouseV2_01B","Land_HouseV2_02_Interier","Land_HouseV2_03","Land_HouseV2_03B","Land_HouseV2_04_interier","Land_HouseV2_05","Land_HouseV_1I1","Land_HouseV_1I2","Land_HouseV_1I3","Land_HouseV_1L2","Land_HouseV_1L1","Land_HouseV_1T","Land_HouseV_2I","Land_HouseV_2L","Land_houseV_2T1","Land_houseV_2T2","Land_HouseV_3I1","Land_HouseV_3I2","Land_HouseV_3I3","Land_HouseV_3I4","Land_Ind_Workshop01_03","Land_Mil_Barracks","Land_Mil_Barracks_L","Land_Mil_Guardhouse","Land_Misc_WaterStation","Land_Shed_W4","Land_Shed_W02"
- ];
- /*
- to display object IDs in 3Den editor, execute the code below and exit back into the editor.
- do3DENAction "ToggleMapIDs";
- */
- // the _DMD_AnnoyingShit array will remove some random benches, junk piles & other assorted items around chernarus. edit it however you see fit
- // List of Locations and Map IDs to remove
- // format [[_position],OBJID]
- private _DMD_AnnoyingShit = [
- [[8672,2467,0],357998],[[8672,2467,0],357948],[[8672,2467,0],358030],[[8672,2425,0],358098],[[8672,2425,0],358099],[[8672,2425,0],358074],[[9423,8929,0],244751],[[9423,8929,0],244752],[[9423,8929,0],244744],[[9423,8929,0],244746],[[9423,8929,0],244747],[[9423,8929,0],244749],[[9423,8929,0],244750],[[9423,8929,0],244753],[[9423,8929,0],244754],[[9423,8929,0],244755],[[9423,8929,0],244756],[[9423,8929,0],244757],[[9423,8929,0],244758],[[9423,8929,0],244759],[[9423,8929,0],244745],[[9423,8929,0],244743],[[9423,8929,0],244742],[[12016,9078,0],262014],[[12016,9078,0],262127],[[12016,9078,0],262126],[[12016,9078,0],262522],[[12016,9078,0],262196],[[12016,9078,0],261912],[[12016,9078,0],262527],[[12016,9078,0],262159],[[12016,9078,0],262160],[[12016,9078,0],262161],[[12016,9078,0],262162],[[12016,9078,0],262163],[[12016,9078,0],262164],[[12016,9078,0],262165],[[12016,9078,0],262166],[[12016,9078,0],262158],[[12016,9078,0],262167],[[12016,9078,0],262168],[[12016,9078,0],963460],[[6203,10405,0],993525],[[6203,10405,0],993526],[[10371,7427,0],275286],[[10371,7427,0],275287],[[10371,7427,0],275293],[[10453,8894,0],249766],[[6726,9263,0],965108],[[6726,9263,0],965159],[[6726,9263,0],965069],[[6726,9263,0],965070],[[6726,9263,0],965169],[[6726,9263,0],965190],[[6726,9263,0],965167],[[6726,9263,0],965166],[[6726,9263,0],965127],[[6820,2777,0],966603],[[6820,2777,0],966594],[[6820,2777,0],966502],[[6820,2777,0],966631],[[6820,2777,0],966554],[[6820,2777,0],966513],[[6820,2777,0],966504],[[6820,2777,0],966555],[[6820,2777,0],966605],[[6820,2777,0],966604],[[6820,2777,0],966514],[[6820,2777,0],966606],[[6820,2777,0],966556],[[4564,9595,0],145259],[[4564,9595,0],145260]
- ];
- /* Buildings to Replace */
- // Format: [[Building to Replace],[Replacement Building]]
- private _DMD_Replacement_List = [
- [["Land_HouseV_1I2"],["Land_i_Stone_Shed_V3_F"]],
- [["Land_Ind_SawMill"],["Land_dp_mainFactory_F"]],
- [["Land_HouseV_1I1"],["Land_i_House_Small_02_V1_F"]],
- [["Land_Shed_W4"],["Land_Slum_House03_F"]],
- [["Land_HouseV_1I3"],["Land_i_House_Small_03_V1_F"]],
- [["Land_HouseV_1L2"],["Land_i_House_Big_02_V1_F"]],
- [["Land_Misc_WaterStation"],["Land_ReservoirTank_V1_F"]],
- [["Land_HouseV_2I"],["Land_i_House_Big_01_V3_F"]],
- [["Land_Mil_Barracks_L"],["Land_Cargo_HQ_V1_F"]],
- [["Land_Mil_Barracks"],["Land_Unfinished_building_01_F"]],
- [["Land_A_Office02"],["Land_Offices_01_V1_F"]],
- [["Land_Ind_Workshop01_03"],["Land_Ind_Workshop01_04"]],
- [["Land_Shed_W02"],["Land_Slum_House01_F"]],
- [["Land_HouseV_3I3"],["Land_i_Shop_01_V1_F"]],
- [["Land_HouseV_3I1"],["Land_i_Shop_01_V2_F"]],
- [["Land_HouseV_3I4"],["Land_i_Shop_02_V1_F"]],
- [["Land_HouseV_3I2"],["Land_i_Shop_02_V3_F"]],
- [["Land_HouseV_1L1"],["Land_i_Stone_HouseBig_V2_F"]],
- [["Land_houseV_2T1"],["Land_i_Stone_HouseBig_V3_F"]],
- [["Land_houseV_2T2"],["Land_i_Stone_HouseSmall_V1_F"]],
- [["Land_HouseV_1T"],["Land_i_Stone_HouseSmall_V1_F"]],
- [["Land_HouseV_2L"],["Land_cwa_ryb_domek"]],
- [["Land_HouseV2_03B"],["Land_i_Stone_HouseSmall_V3_F"]],
- [["Land_HouseV2_01A"],["CUP_A1_Cihlovej_dum_in"]],
- [["Land_HouseV2_01B"],["Land_i_House_Small_01_V3_F"]],
- [["Land_HouseV2_03"],["Land_i_House_Big_01_V3_F"]],
- [["Land_HouseV2_02_Interier"],["Land_i_House_Big_02_V2_dam_F"]],
- [["Land_HouseV2_04_interier"],["Land_i_Shop_01_V3_dam_F"]],
- [["Land_HouseV2_05"],["Land_CarService_F"]],
- [["Land_Church_01"],["Land_Chapel_V1_F"]],
- [["Land_Church_02"],["Land_Chapel_V1_F"]],
- [["Land_Church_02a"],["Land_Chapel_V1_F"]],
- [["Land_Mil_Guardhouse"],["Land_Cargo_Tower_V1_No5_F"]]
- ];
- private _FFA_LHOUSEV = [];
- private _FFA_HOUSES = [];
- private _DMD_FuelPumps = ["Land_A_FuelStation_Feed"];
- _FFA_LHOUSEV = nearestObjects [getArray(configFile >> "CfgWorlds" >> worldName >> "centerPosition"),["ALL"],15000];
- for "_i" from 0 to (count _FFA_LHOUSEV)-1 do {
- private _housev = _FFA_LHOUSEV select _i;
- if !(_housev isKindOf "Lamps_Base_F") then { _housev enableSimulationGlobal false; };
- if ((typeOf _housev) in _DMD_FuelPumps) then { _housev enableSimulationGlobal true; };
- if ((typeOf _housev) in _DMD_CloseHouse) then { _FFA_HOUSES pushback _housev; };
- };
- for "_i" from 0 to (count _FFA_HOUSES)-1 do {
- private _nBuilding = _FFA_HOUSES select _i;
- private _dirVector = vectorDir _nBuilding;
- private _objVector = vectorUp _nBuilding;
- private _worldPos = ASLtoATL getPosASL _nBuilding;
- _nBuilding hideObjectGlobal true;
- deleteVehicle _nBuilding;
- _type = "x";
- call {
- { if ((typeof _nbuilding) in (_x select 0)) exitWith { _type = (_x select 1) select 0; }; } forEach _DMD_Replacement_List;
- };
- if !(_type isEqualTo "x") then {
- private _house = createVehicle [_type, _worldPos, [], 0, "CAN_COLLIDE"];
- _house setVectorDirAndUp [ _dirVector, _objVector];
- _house enableSimulationGlobal false;
- };
- };
- {
- private _posX = _x select 0;
- private _objX = _x select 1;
- private _delObj1 = (_posX nearestObject _objX);
- deleteVehicle _delObj1;
- _delObj1 hideObjectGlobal true;
- } foreach _DMD_AnnoyingShit;
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement