Jump to content
pognivet

Chernarus With Building Interiors [Script]

Recommended Posts

dont know where else to post this, but i felt that i should because other people like me would want it.

 

it replaces some of the buildings on chernarus with ones from arma 3.

 

i take no credit for this. the only reason i am posting it is because i dont think people know about it and i think its a very valuable script. it took me a long time to dig it up.

 

it was originally made by a russian guy named dimon (https://forums.bistudio.com/user/781732-dimon/) for another purpose, then it was edited by jakehekesfists at exilemod.com, and now i have edited it.

 

i have taken out all the weird buildings that were only put there for looting in dayz such as the little house made out of a cargo container. i have tried to make sure that everything looks organic and nothing clips into the roads or through fences too badly. some buildings such as the churches and barracks are left intact to maintain a consistent theme. my main goal was to have as many walkable interiors as possible while still maintaining the overall feel of chernarus.

 

You need AiA terrain pack.

http://www.armaholic.com/page.php?id=26682

 

Copy paste this and save it as "buildingReplacement.sqf" in your mission directory:

/* 
	Original Script Here: 
	http://forums.bistudio.com/showthread.php?190404-Chernarus-Takistan 

	Script edited by jakehekesfists[dmd] 08/05/15
	-rev 2.1a (for Arma III) 	
	Replacement buildings for use with ArmaIII Assets | AIA Chernarus Terrain. 	
	if you use this script ensure you include the default altis loot positions along with the cherno loot positions. 	
*/

FFA_CLOSEHOUSE = ["Land_HouseV_2L","Land_HouseV_3I3","Land_HouseV_3I1","Land_HouseV_3I4","Land_HouseV_3I2","Land_HouseV_1L1","Land_houseV_2T1","Land_houseV_2T2","Land_HouseV_1T","Land_HouseV2_03B","Land_HouseV2_03","Land_HouseV2_01A","Land_HouseV2_01B","Land_HouseV2_02_Interier","Land_HouseV2_04_interier","Land_HouseV2_05","Land_Ind_SawMill","Land_Ind_Workshop01_03","Land_HouseV_1I2","Land_HouseV_1I1","Land_HouseV_1L2","Land_Misc_WaterStation","Land_HouseV_2I","Land_A_Office02","Land_Komin"];

_godModeBuildings = false; // set true if you want to make these replacement buildings have god mode. 

if (isServer) then 
{
	/* Objects & Buildings to Delete */
//	_dmdDeleteThis=[["Land_SignB_Pub_CZ3","Land_SignB_Pub_RU3","Land_Sign_Bar_RU","Land_SignB_PostOffice","Land_Tec"],[""]];
	/* Buildings to Replace */
	_dmdRep0001=[["Land_HouseV_1I2"],["Land_i_Stone_Shed_V3_F"]];
	_dmdRep0002=[["Land_Ind_SawMill"],["Land_dp_mainFactory_F"]];
	_dmdRep0003=[["Land_HouseV_1I1"],["Land_i_House_Small_02_V1_F"]];
//	_dmdRep0005=[["Land_Shed_W4"],["Land_Slum_House03_F"]];
	//_dmdRep0006=[["Land_HouseV_1I3"],["Land_i_House_Small_03_V1_dam_f"]];
	_dmdRep0006=[["Land_HouseV_1I3"],["Land_i_House_Small_03_V1_F"]];
	_dmdRep0007=[["Land_HouseV_1L2"],["Land_i_House_Big_02_V1_F"]];
	_dmdRep0008=[["Land_Misc_WaterStation"],["Land_ReservoirTank_V1_F"]];
//	_dmdRep0009=[["Land_Farm_WTower"],["Land_R_Minaret"]];
	_dmdRep0010=[["Land_HouseV_2I"],["Land_i_House_Big_01_V3_F"]];
//	_dmdRep0011=[["Land_Mil_Barracks_L"],["Land_Cargo_HQ_V1_F"]];
//	_dmdRep0012=[["Land_Mil_Barracks"],["Land_Unfinished_building_01_F"]];
//	_dmdRep0013=[["Land_Mil_House"],["Land_MilOffices_V1_F"]];
	_dmdRep0014=[["Land_A_Office02"],["Land_Offices_01_V1_F"]];
	_dmdRep0015=[["Land_Ind_Workshop01_03"],["Land_Ind_Workshop01_04"]];	
//	_dmdRep0016=[["Land_Shed_W02"],["Land_Slum_House01_F"]];
//	_dmdRep0017=[["Land_Shed_W03"],["Land_cargo_house_slum_F"]];
	_dmdRep0018=[["Land_HouseV_3I3"],["Land_i_Shop_01_V1_F"]];
	_dmdRep0019=[["Land_HouseV_3I1"],["Land_i_Shop_01_V2_F"]];
	_dmdRep0020=[["Land_HouseV_3I4"],["Land_i_Shop_02_V1_F"]];
	_dmdRep0021=[["Land_HouseV_3I2"],["Land_i_Shop_02_V3_F"]];
	_dmdRep0022=[["Land_HouseV_1L1"],["Land_i_Stone_HouseBig_V2_F"]];	
	_dmdRep0023=[["Land_houseV_2T1"],["Land_i_Stone_HouseBig_V3_F"]];
	_dmdRep0024=[["Land_houseV_2T2"],["Land_i_Stone_HouseSmall_V1_F"]];	
	_dmdRep0025=[["Land_HouseV_1T"],["Land_i_Stone_HouseSmall_V1_F"]];	
	_dmdRep0026=[["Land_HouseV_2L"],["Land_i_Stone_Shed_V1_dam_F"]];	
	_dmdRep0027=[["Land_HouseV2_03B"],["Land_i_Stone_HouseSmall_V3_F"]];
	_dmdRep0028=[["Land_HouseV2_01A"],["Land_d_House_Big_02_V1_F"]];
	_dmdRep0029=[["Land_HouseV2_01B"],["Land_i_House_Small_01_V3_F"]];	
	_dmdRep0030=[["Land_HouseV2_03"],["Land_i_House_Big_01_V3_F"]];	
	_dmdRep0031=[["Land_HouseV2_02_Interier"],["Land_i_House_Big_02_V2_dam_F"]];
	_dmdRep0032=[["Land_HouseV2_04_interier"],["Land_i_Shop_01_V3_dam_F"]];
	_dmdRep0033=[["Land_HouseV2_05"],["Land_u_Shop_01_V1_F"]];	
//	_dmdRep0034=[["Land_Church_02","Land_Church_02a","Land_Church_01"],["Land_Chapel_V1_F"]];
//	_dmdRep0035=[["Land_Mil_Guardhouse"],["Land_Cargo_Tower_V1_No5_F"]];
	_dmdRep0036=[["Land_Komin"],["Land_ReservoirTower_F"]];

	
	_FFA_LHOUSEV=[];
	_FFA_HOUSES=[];

	if (worldName == "chernarus") then 
	{ 
 		_FFA_LHOUSEV=nearestObjects [getArray(configFile >> "CfgWorlds" >> worldName >> "centerPosition"),["house"],15000];
		for "_i" from 0 to (count _FFA_LHOUSEV)-1 do
		{
			_housev=_FFA_LHOUSEV select _i;
			if ((typeof _housev) in FFA_CLOSEHOUSE) then 
			{
				_FFA_HOUSES set [count _FFA_HOUSES,_housev];
			};
		};
		
		for "_i" from 0 to (count _FFA_HOUSES)-1 do
		{
			_nBuilding =_FFA_HOUSES select _i;
			_dirVector = vectorDir _nBuilding;
			_objVector = vectorUp _nBuilding;
			_pos = ASLtoATL getPosASL _nBuilding;
			_nBuilding hideObject true;
			deleteVehicle _nBuilding;
			
			_type="";
			call{
				if ((typeof _nBuilding) in (_dmdDeleteThis select 0)) exitwith {_type="";};
				
				if ((typeof _nBuilding) in (_dmdRep0001 select 0)) exitwith {_type=(_dmdRep0001 select 1) select 0;};
				if ((typeof _nBuilding) in (_dmdRep0002 select 0)) exitwith {_type=(_dmdRep0002 select 1) select 0;};
				if ((typeof _nBuilding) in (_dmdRep0003 select 0)) exitwith {_type=(_dmdRep0003 select 1) select 0;};
				if ((typeof _nBuilding) in (_dmdRep0005 select 0)) exitwith {_type=(_dmdRep0005 select 1) select 0;};
//				if ((typeof _nBuilding) in (_dmdRep0006 select 0)) exitwith {_type=(_dmdRep0006 select 1) select 0;};
				if ((typeof _nBuilding) in (_dmdRep0007 select 0)) exitwith {_type=(_dmdRep0007 select 1) select 0;};
				if ((typeof _nBuilding) in (_dmdRep0008 select 0)) exitwith {_type=(_dmdRep0008 select 1) select 0;};
//				if ((typeof _nBuilding) in (_dmdRep0009 select 0)) exitwith {_type=(_dmdRep0009 select 1) select 0;};
				if ((typeof _nBuilding) in (_dmdRep0010 select 0)) exitwith {_type=(_dmdRep0010 select 1) select 0;};
//				if ((typeof _nBuilding) in (_dmdRep0011 select 0)) exitwith {_type=(_dmdRep0011 select 1) select 0;};
//				if ((typeof _nBuilding) in (_dmdRep0012 select 0)) exitwith {_type=(_dmdRep0012 select 1) select 0;};
//				if ((typeof _nBuilding) in (_dmdRep0013 select 0)) exitwith {_type=(_dmdRep0013 select 1) select 0;};
				if ((typeof _nBuilding) in (_dmdRep0014 select 0)) exitwith {_type=(_dmdRep0014 select 1) select 0;};				
				if ((typeof _nBuilding) in (_dmdRep0016 select 0)) exitwith {_type=(_dmdRep0016 select 1) select 0;};
				if ((typeof _nBuilding) in (_dmdRep0017 select 0)) exitwith {_type=(_dmdRep0017 select 1) select 0;};
				if ((typeof _nBuilding) in (_dmdRep0018 select 0)) exitwith {_type=(_dmdRep0018 select 1) select 0;};
				if ((typeof _nBuilding) in (_dmdRep0019 select 0)) exitwith {_type=(_dmdRep0019 select 1) select 0;};
				if ((typeof _nBuilding) in (_dmdRep0020 select 0)) exitwith {_type=(_dmdRep0020 select 1) select 0;};
				if ((typeof _nBuilding) in (_dmdRep0021 select 0)) exitwith {_type=(_dmdRep0021 select 1) select 0;};
				if ((typeof _nBuilding) in (_dmdRep0022 select 0)) exitwith {_type=(_dmdRep0022 select 1) select 0;};				
				if ((typeof _nBuilding) in (_dmdRep0023 select 0)) exitwith {_type=(_dmdRep0023 select 1) select 0;};
				if ((typeof _nBuilding) in (_dmdRep0024 select 0)) exitwith {_type=(_dmdRep0024 select 1) select 0;};				
				if ((typeof _nBuilding) in (_dmdRep0025 select 0)) exitwith {_type=(_dmdRep0025 select 1) select 0;};				
				if ((typeof _nBuilding) in (_dmdRep0026 select 0)) exitwith {_type=(_dmdRep0026 select 1) select 0;};				
				if ((typeof _nBuilding) in (_dmdRep0027 select 0)) exitwith {_type=(_dmdRep0027 select 1) select 0;};
				if ((typeof _nBuilding) in (_dmdRep0028 select 0)) exitwith {_type=(_dmdRep0028 select 1) select 0;};
				if ((typeof _nBuilding) in (_dmdRep0029 select 0)) exitwith {_type=(_dmdRep0029 select 1) select 0;};
				if ((typeof _nBuilding) in (_dmdRep0030 select 0)) exitwith {_type=(_dmdRep0030 select 1) select 0;};
				if ((typeof _nBuilding) in (_dmdRep0031 select 0)) exitwith {_type=(_dmdRep0031 select 1) select 0;};
				if ((typeof _nBuilding) in (_dmdRep0032 select 0)) exitwith {_type=(_dmdRep0032 select 1) select 0;};
				if ((typeof _nBuilding) in (_dmdRep0033 select 0)) exitwith {_type=(_dmdRep0033 select 1) select 0;};				
//				if ((typeof _nBuilding) in (_dmdRep0034 select 0)) exitwith {_type=(_dmdRep0034 select 1) select 0;};
//				if ((typeof _nBuilding) in (_dmdRep0035 select 0)) exitwith {_type=(_dmdRep0035 select 1) select 0;};
				if ((typeof _nBuilding) in (_dmdRep0036 select 0)) exitwith {_type=(_dmdRep0036 select 1) select 0;};
			};
			_house = createVehicle [_type, _pos, [], 0, "CAN_COLLIDE"];
			_house setVectorDirAndUp [ _dirVector, _objVector];
			
			if (_godModeBuildings) then {_house addEventHandler ["HandleDamage", {false}];};
		};
	};
};

if(!isServer || local player)then
{
	waitUntil{(player==player)};
	waitUntil{alive player};
	waitUntil{local player};
 	if (worldName == "chernarus") then 
	{ 
		_FFA_CHOUSEV=[];
		_FFA_CHOUSEV=nearestObjects [getArray(configFile >> "CfgWorlds" >> worldName >> "centerPosition"),["house"],15000];
		for "_i" from 0 to (count _FFA_CHOUSEV)-1 do
		{
			_housev=_FFA_CHOUSEV select _i;
			if ((typeof _housev) in FFA_CLOSEHOUSE) then 
			{
				_housev hideObject true;
				deleteVehicle _housev;
			};
		};
	};
};

Place this at the bottom of init.sqf:

#include "scripts\buildingReplacement.sqf"

if you notice anything out of place feel free to change it yourself or tell me and ill change it

  • Like 2

Share this post


Link to post
Share on other sites

Technically, because its a script, it should belong in the Missions section....but it would get lost there within the hundreds of "HELP ME!" threads. (Perhaps a script-snippet-release section, bohemia?)

 

I've given this script a shot, it has far less clipping issues than I expected...ofcourse there are some areas where buildings are partially on the road or a lantern stuck in the building, but it's pretty decent.

 

Personally I do think the A3 buildings stand out a lot.....For me it ruins most towns' appearances, BUT, the fact the buildings are all enterable is great for loot-based missions or perhaps some MOUT/CQB on Chernarus.

 

Kind regards,

Sanchez

Share this post


Link to post
Share on other sites

I do believe I've seen script releases in the mod section before. Even if it strictly needs to be a mod then you can just package it up.

Share this post


Link to post
Share on other sites

Definitely. Releasing stand-alone script-snippets in this category is the best for now.....as there is no snippet section ;)

Share this post


Link to post
Share on other sites

Technically, because its a script, it should belong in the Missions section....but it would get lost there within the hundreds of "HELP ME!" threads. (Perhaps a script-snippet-release section, bohemia?)

 

I've given this script a shot, it has far less clipping issues than I expected...ofcourse there are some areas where buildings are partially on the road or a lantern stuck in the building, but it's pretty decent.

 

Personally I do think the A3 buildings stand out a lot.....For me it ruins most towns' appearances, BUT, the fact the buildings are all enterable is great for loot-based missions or perhaps some MOUT/CQB on Chernarus.

 

Kind regards,

Sanchez

yea i agree. theres a lot of specific architecture in chernarus that makes it feel like STALKER, all the small cabin-like dwellings that are so prevalent in the slavic countries i hear. i originally edited this script to be used in a mission that simulated bosnia where there are more stone structures and spanish tile roofing not unheard of. if you need to tweak this for your own mission all you need to do is find the classname for the buildings that you want to keep. delete that from the FFA_CLOSEHOUSE array. then scroll down and comment the lines that contain that buildings classname and the corresponding dmdrep line. like if you dont want it to replace the watertowers just ctrl+f "waterstation". delete it from FFA_CLOSEHOUSE then:

 

//_dmdRep0008=[["Land_Misc_WaterStation"],["Land_ReservoirTank_V1_F"]];

 

scroll down to the bottom almost

 

//if ((typeof _nBuilding) in (_dmdRep0008 select 0)) exitwith {_type=(_dmdRep0008 select 1) select 0;};

 

then they wont be replaced.

 

if you want to delete the buildings without adding in anything new just comment out the lines but dont delete the classname from FFA_CLOSEHOUSE. then it will be just empty ground where the building used to be. you could probably even use custom buildings as replacements, but im not sure how to facilitate such a thing.

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×