Jump to content

Recommended Posts

6Z8cd90.pngAfoWj1x.jpgnyzre3b.jpgGH9oLdW.png

1ZNKXbl.png

GF Building Replacement Script - Mod

by

 

GEORGE FLOROS [GR]

 

 

Description:

GF Building Replacement Script - Mod , replace the buildings with your desired.
You are free to do anything but i would like to give me Credits for this!
Simple and easy to use and adapt .
Have Fun !


Installation / Usage:

For usage instructions and information of how to use the GF Building Replacement Script - Mod please refer to the included documentation and/or example mission.
Place in your mission the files . There is everything included , in the initServer.sqf  , to copy paste in your mission .

 

https://community.bistudio.com/wiki/SQF_syntax
Don't try to open this with the simple notepad.
For everything that is with comment  //  in front  or between /*
means that it is disabled , so there is no need to delete the extra lines.

You can open this ex:
with notepad++
https://notepad-plus-plus.org/

ArmA 3 | Notepad ++ SQF tutorial
https://www.youtube.com/watch?v=aI5P7gp3x90

and also use the extra pluggins
(this way will be better , it will give also some certain colours to be able to detect ex. problems )
http://www.armaholic.com/page.php?id=8680

or use any other program for editing .

For the Compilation List of my GF Scripts , you can search in:
https://forums.bohemia.net/forums/topic/215850-compilation-list-of-my-gf-scripts/

BI Forum Ravage Club Owner :
https://forums.bohemia.net/clubs/73-bi-forum-ravage-club/


Notes:

GF Building Replacement Script - Mod , replace the map's buildings with your desired.
It is also included a mod version , posible to unpack and edit.


Credits and Thanks to :

Thanks to All script contributors
Thanks to everyone who tries to do the best for this game!
Thanks to BIS for such a great platform .
Thanks to BIS Community and BIS Community Forums .
Thanks to Armaholic Community and Forums .


Changelog:

 

v2.0
Added a distance check and blacklist zones
Added more options

 

v1.0

 

Forum topic:
- Armaholic forums http://www.armaholic.com/forums.php?m=posts&q=40364

 

 

Armaholic

GF Building Replacement Script - Mod

 

On 2/19/2019 at 2:21 PM, GEORGE FLOROS GR said:

One thing  that i have forgot totally to mention generally ,

is that it can be used as well for a certain location , maybe in a point of interest , because right now it's set to change the whole map.

 

In order to make a change , this is what needs to be edited :

 

GF_Building_Replacement_init.sqf


GF_Building_Replacement_centerPosition = getArray(configFile >> "CfgWorlds" >> worldName >> "centerPosition");
GF_Building_Replacement_array = nearestTerrainObjects [GF_Building_Replacement_centerPosition, ["house"], worldsize];

This can be changed , by the included examples:

https://community.bistudio.com/wiki/nearestTerrainObjects

  • Like 5
  • Thanks 2

Share this post


Link to post
Share on other sites
1 hour ago, yanoukovytsch said:

Hi George, thanks, I was wondering for this kind of scripts for a mission ^^

 

Thanks yanoukovytsch !

 

I'll be waiting then for a post of your mission here !

  • Like 1

Share this post


Link to post
Share on other sites
56 minutes ago, fat_lurch said:

Very cool, GF!

 

Thank you very much fat_lurch !

 

I am preparing also a Vegetation replacement !

I don't know still if the grass is possible to change though , if anyone knows !

 

This WIP Script - Mod will have also presets , in order to be able to select like , custom , winter , jungle , cold environment etc.

  • Like 1

Share this post


Link to post
Share on other sites

Although to be honest I cannot see how editors will use the above script  :scratchchin:

the WIP Script you mentioned will be really nice if a winter add-on free vanilla map was made available :sun:

 

Hmm there must be an editing idea that I have missed.. 

  • Like 1

Share this post


Link to post
Share on other sites
1 hour ago, JohnKalo said:

Although to be honest I cannot see how editors will use the above script  :scratchchin:

 

Thank you very much John !  :thumbs-up:

 

You can use this script in order to use also exta buildings , like for example Fallujha map with RSO buildings etc.

Generally it will be a whole different map , each time you run this script.

 

The WIP Vegetation Replacement Scipt- Mod , is about replacing trees and bushes , i haven't found if it's possible to do the same with the grass , it will replace automatically the vegetation of any map with the desired , like from CUP and any other mod , map etc that includes vegetation.

So it's not a free addon script.

  • Like 1

Share this post


Link to post
Share on other sites
4 hours ago, GEORGE FLOROS GR said:

The WIP Vegetation Replacement Scipt- Mod

 

Some pics here :

 

This is Stratis map with Winter Presets.

The vegetation is from CUP mod :

5W7oZy9.png

UL2Lgc2.png

Ant6ANl.png

wMen2rF.jpg

kyCgEdI.jpg

  • Like 2

Share this post


Link to post
Share on other sites

George, this is great stuff.  I'm going to try it out on the South Asia map (from Take on Helicopters) where there are hundreds of unenterable or pre-Arma rendition buildings that have enterable versions that could replace them.

  • Thanks 1

Share this post


Link to post
Share on other sites
1 hour ago, SwissArmy1984 said:

I'm going to try it out on the South Asia map (from Take on Helicopters)

 

Hello there SwissArmy1984 and thank you very much !

 

That's really a great idea and i hope it will go well !

 

I will be waiting for some pics and Footage if it's possible !

Post also here if you want please :

 

Maybe you should check if @opteryx building's & RSO  are fitting there !

 

Check and play a little bit with the script , because i have set this to detect and replace , every building with 4 Building positions in cluded in the model .

So you might need to adjust this as well !

 

 

Share this post


Link to post
Share on other sites

One thing  that i have forgot totally to mention generally ,

is that it can be used as well for a certain location , maybe in a point of interest , because right now it's set to change the whole map.

 

In order to make a change , this is what needs to be edited :

 

GF_Building_Replacement_init.sqf

GF_Building_Replacement_centerPosition = getArray(configFile >> "CfgWorlds" >> worldName >> "centerPosition");
GF_Building_Replacement_array = nearestTerrainObjects [GF_Building_Replacement_centerPosition, ["house"], worldsize];

This can be changed , by the included examples:

https://community.bistudio.com/wiki/nearestTerrainObjects

Share this post


Link to post
Share on other sites

Hey GF, I have a few questions I am hoping you can answer.  I am creating a survival mulitplayer ravage mission for my arma group on PKL and was looking at using some of your scripts.

 

- What is the performance impact after the Change Building Script has been run? Example, mission loads and script runs which replaces all PKL buildings with Tanoa buildings.  Performance is impacted at the start while replacement occurs and then is performance back to normal?

 

- I am looking at using either the Ravage loot/furniture modules or your auto loot script.  Will your auto loot script or ravage modules place loot after the building replacement script has been run?

 

- The mission will be run over a few weeks and I wanted to use the inbuilt ravage mp persistence plus another script to save the players buildings/boxes etc. Will the building replacement script run at the start of the mission everytime I boot it up or will it already be saved from when I previously ran it?

 

I do have some more questions, but I can not remember what they are atm and I am at work.

 

Peace.

  • Like 1

Share this post


Link to post
Share on other sites
5 minutes ago, TPM_Aus said:

Performance

 

The performance is certainly be way different according to the pc specs and even different from local j]host to dedicated.

There will be differences about the selected map and the buildings maybe.

The best option should be testing !

You can also reverse the code , from the excluded building list and change only the buildings that you want.

You can also change only a certain area.

 

The loot script will work also but the best should be to wait the one script to finish and then start the next one.

 

13 minutes ago, TPM_Aus said:

- The mission will be run over a few weeks and I wanted to use the inbuilt ravage mp persistence plus another script to save the players buildings/boxes etc. Will the building replacement script run at the start of the mission everytime I boot it up or will it already be saved from when I previously ran it?

no idea , probably yes.

I don't play that much or at all to be honest so you should test as well !

Share this post


Link to post
Share on other sites

First up, this is amazing.  There are only 1155 buildings, so replacing them with the script doesn't seem to cause any performance issues on my PC.  However, I would like to blacklist some areas, is this easily possible by adding an area marker on the map in the editor and then adding a few lines to your script?

Edit: I have also tried understanding the:

GF_Building_Replacement_centerPosition = getArray(configFile >> "CfgWorlds" >> worldName >> "centerPosition");
GF_Building_Replacement_array = nearestTerrainObjects [GF_Building_Replacement_centerPosition, ["house"], worldsize];

But I don't get it sorry.
 

  • Thanks 1

Share this post


Link to post
Share on other sites
16 minutes ago, TPM_Aus said:

to blacklist some areas,

 

I was just adding a script to check distances in my auto Loot script and this script will be included in the future to a lot of my scripts , to set everything more simple.

 

So in order to add this script,

 

let me check it a little bit and i will add the code below.

Here is the script by the way:

 

GF_Distance_Check.sqf

Spoiler




//________________	Author : GEORGE FLOROS [GR]	___________	28.03.19	___________


/*
________________	GF Auto Loot Script - Mod	________________

https://forums.bohemia.net/forums/topic/220701-gf-auto-loot-script-mod/

Please keep the Credits or add them to your Diary

https://community.bistudio.com/wiki/SQF_syntax
Don't try to open this with the simple notepad.
For everything that is with comment  //  in front  or between /*
means that it is disabled , so there is no need to delete the extra lines.

You can open this ex:
with notepad++
https://notepad-plus-plus.org/

ArmA 3 | Notepad ++ SQF tutorial
https://www.youtube.com/watch?v=aI5P7gp3x90

and also use the extra pluggins
(this way will be better , it will give also some certain colors to be able to detect ex. problems )
http://www.armaholic.com/page.php?id=8680

or use any other program for editing .

For the Compilation List of my GF Scripts , you can search in:
https://forums.bohemia.net/forums/topic/215850-compilation-list-of-my-gf-scripts/

BI Forum Ravage Club Owner :
https://forums.bohemia.net/clubs/73-bi-forum-ravage-club/
*/


diag_log "//________________ GF_AL_Distance_Check initializing ________________";

//______________________	Blacklist Zones	______________________	
/*
Add here and below , your Blacklist Zones ( if you want more ) , 
these are included in the 3D editor to copy paste to your mission.
If you don't want them , dont copy them in your mission.
*/


GF_AL_Blacklist_Zone_1 = getMarkerPos "GF_AL_Blacklist_Zone_1";	
GF_AL_Blacklist_Zone_2 = getMarkerPos "GF_AL_Blacklist_Zone_2";
GF_AL_Blacklist_Zone_3 = getMarkerPos "GF_AL_Blacklist_Zone_3";
GF_AL_Blacklist_Zone_4 = getMarkerPos "GF_AL_Blacklist_Zone_4";
GF_AL_Blacklist_Zone_5 = getMarkerPos "GF_AL_Blacklist_Zone_5";




//______________________	GF_AL_Distance_Check	______________________	

GF_AL_Distance_Check = {


_Pos = _this select 0;
GF_AL_Distance_Check_initialized = false;

if (isMultiplayer) then {	


if (		
	//________________	Add Blacklist Distance from all Players	________________
	({_x distance _Pos > GF_AL_Distance}count GF_AL_allPlayers > 0)
	
	//________________	Add here your Blacklist Zones ( for more )	________________
	&& ((_Pos distance GF_AL_Blacklist_Zone_1) > GF_AL_Blacklist_Zone_distance) 
	&& ((_Pos distance GF_AL_Blacklist_Zone_2) > GF_AL_Blacklist_Zone_distance)
	&& ((_Pos distance GF_AL_Blacklist_Zone_3) > GF_AL_Blacklist_Zone_distance) 
	&& ((_Pos distance GF_AL_Blacklist_Zone_4) > GF_AL_Blacklist_Zone_distance) 
	&& ((_Pos distance GF_AL_Blacklist_Zone_5) > GF_AL_Blacklist_Zone_distance) 
	
	) then {
	GF_AL_Distance_Check_Ok = true;
	GF_AL_Distance_Check_initialized = true;
	
	}else{	
	GF_AL_Distance_Check_Ok = false;
	GF_AL_Distance_Check_initialized = true;	
	};


		}else{

	//___________________	SP	___________________
	
	if (		
	//________________	Add Blacklist Distance from all Players	________________
	((_Pos distance player) > GF_AL_Distance)
	
	//________________	Add here your Blacklist Zones ( for more )	________________
	&& ((_Pos distance GF_AL_Blacklist_Zone_1) > GF_AL_Blacklist_Zone_distance) 
	&& ((_Pos distance GF_AL_Blacklist_Zone_2) > GF_AL_Blacklist_Zone_distance)
	&& ((_Pos distance GF_AL_Blacklist_Zone_3) > GF_AL_Blacklist_Zone_distance) 
	&& ((_Pos distance GF_AL_Blacklist_Zone_4) > GF_AL_Blacklist_Zone_distance) 
	&& ((_Pos distance GF_AL_Blacklist_Zone_5) > GF_AL_Blacklist_Zone_distance) 
	
	) then {
	GF_AL_Distance_Check_Ok = true;
	GF_AL_Distance_Check_initialized = true;

	}else{
	GF_AL_Distance_Check_Ok = false;
	GF_AL_Distance_Check_initialized = true;
	};
	
	};	
};


diag_log "//______________________ GF_AL_Distance_Check initialized	___________________";

 

 

  • Like 1

Share this post


Link to post
Share on other sites

Awesome, I will wait like a little kid on Christmas day😄

 

sHIgoQB.jpg

1sXMN3T.jpg

SfMVuz4.jpg

 

  • Haha 1

Share this post


Link to post
Share on other sites
1 hour ago, TPM_Aus said:

I will wait like a little kid on Christmas day😄

 

Changelog:

v2.0
Added a distance check and blacklist zones
Added more options

 

#Temporary link

https://ufile.io/nuwv6

  • Like 1

Share this post


Link to post
Share on other sites
1 hour ago, TPM_Aus said:

Awesome

 

Nice pictures !  :thumbs-up:

Share this post


Link to post
Share on other sites
7 minutes ago, GEORGE FLOROS GR said:

 

Changelog:

v2.0
Added a distance check and blacklist zones
Added more options

 

https://ufile.io/nuwv6

What distance around the markers does it add the blacklist zone to?

  • Like 1

Share this post


Link to post
Share on other sites
Just now, TPM_Aus said:

What distance

 

Yes !

These are the extra options :

GF_BR_buildingPositions						= 4;		//	Only the buildings with >4 buildingPositions will change
GF_BR_Blacklist_Zone_distance				= 1000;		//	Add here the distance from the Blacklist Zones
GF_BR_Distance								= 200;		//	Add here the distance from players
GF_Building_Disable_Simulation 				= false;

 

Share this post


Link to post
Share on other sites
Posted (edited)

Disregard, found it.

 

Edit: Darn it,  you are to quick for me, lol.

Edited by TPM_Aus
  • Haha 1

Share this post


Link to post
Share on other sites

Thanks !

I was thinking about it , when i saw the roads!

It must be good right ?

I think i need to check it !

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

×