Jump to content

Recommended Posts

?imw=5000&imh=5000&ima=fit&impolicy=Lett
?imw=5000&imh=5000&ima=fit&impolicy=Lett
?imw=5000&imh=5000&ima=fit&impolicy=Lett

uses a object called 'towerSt'. ... anything you got in your mods will go... so in general... they tend to give out funny sizes... 
also...im aint that good with the boundingBoxReal function or dimensions given... for ie... the planes or helis don't always make sense as width and they'll just spawn on each a bit>>>
I tried to mess with it and this what i got... still tho... some things still run into each other... or just explode from bad moddin

Also... I'm gunna make the code run much faster by using loadFile functions to just pullback texts and append to arrays... sometime soon I guess. 

using 4gb of VRAM and 3.5GHZ and 16GB RAM takes about 4 mins

Spoiler

 	_gats = [] ;   
  
 	_gats =  "true" configClasses (configFile >> "CfgVehicles" ) ;   
 	_countEnt = count _gats ;   
   
 	_dogs = [] ;   
  
	 _scan = 'bin\config.bin/CfgVehicles/' ;  
 	_countScan = count _scan ;  
 	_type = _scan ;   
 	for [{ _p = 0 }, { _p < _countEnt  }, { _p = _p + 1 }] do   
 	{   
   
 		 _foolu = _gats select _p ;    
  		_strag = (str _foolu) ;   
  		_donk = _strag find _scan  ;   
  		 if(_donk != -1) then   
   		 {   
    			 _dogs pushBack _foolu ;   
  		 };   
 	};   
   
   
 	_countDogs = count _dogs ;    
 	_passers = []  ;   
   
 	for [{ _p = 0 }, { _p < _countDogs }, { _p = _p + 1 }] do   
 	{   
  		_stol = _dogs select _p ;   
  		_stool = (str _stol) ;   
    
     
  		_newBoyC = count _stool ;   
  		_newBoyC = _newBoyC - _countScan ;  
  		_newBoyC = _newBoyC  ;  
  
  		_donker = _stool select [ _countScan , _newBoyC ] ;   
   
    
   		_passers pushBack _donker ;    
   
 	};   
   
  
  
 
 	_wasted = [] ;  
 	_wasted2 = [] ;  
 	_wasted3 = [] ; 
 	for [{ _g = 0 }, { _g < _countDogs }, { _g = _g + 1 }] do   
 	{   
  		sloty = _passers select _g ;   
  		_configs = configProperties [configFile >> "CfgVehicles" >> sloty ];  
  		_configs2 =  getNumber (configFile >> "CfgVehicles" >> sloty >> "fuelCapacity" ) ;  
  		_configs3 = getText (configFile >> "CfgVehicles" >> sloty >> "_generalMacro" ) ;
 		_wasted pushBack _configs ;  
  		_wasted2 pushBack _configs2 ;  
  		_wasted3 pushBack _configs3 ;  
 	};  
   
 	_spotty = _wasted select 0 ;  


 
	_fuul = [] ;  

 	for [{ _v = 0 }, { _v < _countDogs }, { _v = _v + 1 }] do   
 	{ 
 		_slotzz = _passers select _v ;   
 		_slotzv = _wasted2 select _v ;

 		_scanz = '1' ;
 		_spoz = (str _slotzv ); 
 		_donkz = _spoz find _scanz ;

 
 		if( _slotzv > 0) then 
 		{ 
  			_fuul pushBack _slotzz ; 

 		}; 
  
 	}; 
 

	
	copyToClipboard (str _fuul ) ; 

	_countTankX = count ( _fuul ) ;
	_treesW = 0 ;
	_treesL = 0 ;
	_rackX = _treesW ; 
	_rackY =  _treesL ; 

	_racks = _rackX * _rackY ; 
	_bumper = 1 ; 
	

	_markST = getPos towerSt;

	whax =   0 ;     
	whay =   0 ;       
	whaz =   0 ;

	

	
	rackBumpX = 2 ;
	rackBumpY = 2 ;
	

	
	whax = ( _markST select 0 ) ;
	whay = ( _markST select 1 )  ;
	whay = whay - 100 ; 
	
	halfX = rackBumpX / 2 ;
	halfY = rackBumpY / 2 ;
	whaLoc = whax ;
	whaLocY = whay ;
	halfDog =  2 ;
	
	_blame = "" ;
	_blame2 = "" ;
	_blameX = "" ;
	_blameX2 = "" ;

	_longs = [] ;

	_positionRemainY = [(whax),(whay),(whaz)] ;
	_positionRemainX = [(whax),(whay),(whaz)] ;
	_positionsXY = [] ; 
	
	lastW = 0 ;
	lastL = 0 ; 
	lastWx = 0 ;
	lastLx = 0 ;
	rowPing = 0 ;

	hint("loop layer starting") ;

	_dimenzOf = [] ;
	_dimenzRow = [] ;
	
	bumperSpot = 0 ;	

	_stringTesting = "" ;	
	
	for [{private _gh = 0 }, { _gh < _countTankX }, { _gh = _gh + 1 }] do
	{	
		bumperSpot = -1 ;
		
		_shells = 0 ; 
		_moments = []  ;
		slotG = _fuul select _gh ; 
		_inPar = _fuul select _gh ;
		_fun = (str _inPar) ;

		_configGM = getText (configFile >> "CfgVehicles" >> slotG >> "editorSubcategory" ) ;
		_configXM = getText (configFile >> "CfgVehicles" >> slotG >> "_generalMacro" ) ;
		_blame = _configGM ;
		_blamer = _blame2  ;
		_blame2 = _blame ;
		_blameX = _configXM ;
		_blameXr = _blameX2  ;
		_blameX2 = _blameX ;
		_welp = _blame find _blamer ;	
		if(_welp < 0 ) then
		{
			_gelp = _blameX find _blameXr ;		
			if( _gelp < 0  ) then
			{
				if(_gh  != 0) then
				{
					bumperSpot = _gh ;
					
					_shells = _gelp ; 
					_dimenzRow pushBack _gh ; 
				};
			};
		} ;
		
		private _posNews = [(0),(0),(0)] ;
		private _blamz = "obj"+ (str _gh)  ;
		private _blamor = _blamz;

		_blamz = createVehicle [_inPar,_posNews ,[],0,"CAN_COLLIDE"];
		private _dimenz = boundingBoxReal _blamz ;

		//https://community.bistudio.com/wiki/sizeOf
		//vs. using boundingBox or BoundingBoxReal
		// real which causes a lot of zeros to be read off as size


		_blamz enableSimulation false ;
		_blamz allowDamage false ;
		_blamz hideObject true ;
		 
		private _z1 = _dimenz select 0;
		private _z2 = _dimenz select 1;

		private _zW = abs ((_z2 select 0) - (_z1 select 0));
		private _zL = abs ((_z2 select 1) - (_z1 select 1));
		private _zH = abs ((_z2 select 2) - (_z1 select 2));

		_moments pushBack _blamor ;
		_moments pushBack _inPar ; 
		_moments pushBack _zW ;
		_moments pushBack _zL ;
		_moments pushBack _zH ;
		_moments pushBack bumperSpot ; 
		_moments pushBack _shells ; 
	
		_dimenzOf pushBack _moments ; 
		_stringTesting = _stringTesting + _blamor + " " + _inPar  + " " + (str _zW) + " " + (str _zL) + " " + (str _zH) + " " + (str bumperSpot) + " " + (str _shells) + " \n" ; 
		//deleteVehicle _blamz ;

	};


	hint (str _stringTesting) ;
	copyToClipBoard (str _stringTesting) ; 
	_blame = "" ;
	_blame2 = "" ;
	_blameX = "" ;
	_blameX2 = "" ;

	_lessThanCount = _countTankX - 1 ;
	startMark = 0 ;
	rememberMark = 0 ;
	
	 

	
	hint ( str(whax) + "\n" + str(whay) ) ;
	
	sleep 10 ;

	whacx = 0 ;
	whacy = 0 ;
	knox  = 0;
	knoy = 0; 
	knoz = 0;
	hint (str _dimenzRow) ;
	sleep 4 ;
	for [{private _po= 0 }, { _po< _countTankX }, { _po= _po+ 1 }] do
	{
			
			hint ( str(whax) + "123\n" + str(whay) ) ;
			//sleep 5 ;
			whacx = whax + 0  ;
			hint("wtf") ; 
			//sleep 2 ;
			whacy = (whay) + 0 ;
			hint("wtf2") ; 
			//sleep 5 ;
			objNumbez = "" ;
			objNamez = "" ;
			tw = 0 ;
			tl = 0 ;
			th = 0 ;
			private _objNext = 0 ;
			private _rowIsNext = 0 ;

			_party = _dimenzOf select _po;  

			objNumbez = _party select 0  ;
			objNamez = _party select 1 ; //literal strings up to here
			tw = _party select 2 ; //all strings pass here from numbers
			tl = _party select 3 ;
			th = _party select 4 ;
			_objNext = _party select 5 ;
			//_rowIsNext = _party select 6 ;
			
				
			private _posNex = [(whacx),(whacy),(whaz)] ;
			private _funGuy = objNumbez + "x" ; 
			hint (str(_funGuy)) ;
			//sleep 4 ; 
			 
			_bop = _po; 
			_bopo = _lessThanCount ;
			
			if ( _bop != _bopo ) then
			{
				
				_fu = (_bop) + 1 ;
				_goers = ( _dimenzOf select _fu) ;

				_rowIsNext = _goers select 6 ; 
				_objNext = _goers select 5 ;
				hint(str _goers) ; 
				//sleep 4 ;
				
				
			};
			
			
			_gonerz = [] ; 
			_gonerz = _dimenzOf select _po ;
			_gz = _gonerz select 3 ;
			if( _rowIsNext < 0 && _bop != _bopo) then
			{
				
				startMark = rememberMark ;
				rememberMark = _po; 

				hint("row is next...\n" + (str startmark) + " as start mark\n" + (str rememberMark) + " as r mark...") ;
				//sleep 3 ; 
				//alternatively i could just add the max width to the array for the end... but o well
				_lidx = [] ;
				_lidx2 = [] ;

				private _nextRowStart = 0 ;
				private _nextRowStart = _po  + 1 ;
				private _nextRowEnd = 0 ; 
				

				
				
				
				
				private _yougotit = _dimenzRow find _nextRowStart  ;
				hint ("_yougotit = " + (str _yougotit)) ;
				//sleep 2; 
				if(  _yougotit > 0 ) then
				{
					if( _po != 0) then 
					{
	
						nextGet = 0 ;
						nextGet = _yougotit + 1 ;
						nexter = _dimenzRow select nextGet ; 
						_nextRowEnd = nexter ;
						hint ("_nextRowEnd  = " + (str _nextRowEnd ) + "_nextRowStart  = " + (str _nextRowStart )) ;
						//sleep 2;
					}; 
				};

				private _combx = 0 ;
				_combx =  _nextRowEnd - (_nextRowStart) ;
				hint ("_combx = " + (str _combx )) ;
				//sleep 2;
				private _maxLidx2 =  0 ;
				if ( _combx > 0 ) then 
				{ 
					hint("combx loop") ;
					//sleep 2 ;
					for [{private _gq = _nextRowStart }, { _gq <= _nextRowEnd }, { _gq = _gq + 1 }] do
					{
						_gonet = [] ; 	
						_gonet = _dimenzOf select _gq ;
					
						_gb = _gonet select 3 ;
						_lidx2  pushBack _gb ; 

					};

					_maxLidx2 =  selectMax _lidx2 ;
				};
				              
				
				
				

				

				

				for [{private _gf = startMark  }, { _gf <= rememberMark }, { _gf = _gf + 1 }] do
				{
					_goners = [] ; 
					_goners = _dimenzOf select _gf ;
					
					_gl = _goners select 3 ;
					_lidx  pushBack _gl ; 
					
				};
				 
				private _maxLidx = selectMax _lidx ;
				

				hint(str( _lidx  ));
				//sleep 3; 
				
				//_maxLidx2 = 0 ;
				hint("max Y is " + (str _maxLidx) ) ;
				//sleep 3; 
				if ( _gz != 0) then
				{
					
					_maxLidx = _maxLidx / 2 ;
					_maxLidx2 = _maxLidx2 / 2 ;
					mucky = rackBumpY + _maxLidx  ;
					mucky = mucky + (_maxLidx2) ;
					whay = whay - mucky ;
					whax = whaLoc ; 
					
				};
				
				
			};

			_inParts = _fuul select _po;
			_funs = (str _inParts ) ;

			private _blarz = (str _po ) + "obj";
			if ( _gz != 0) then
			{	
				private _nextWid = 0 ;
				_blarz = createVehicle [ _inParts , _posNex ,[],0,"CAN_COLLIDE"];
				_blarz enableSimulation false ;
				spaceW = tw ; 
				spaceW = spaceW ;
				if( _rowIsNext > 0) then
				{
					bumpPo = _po + 1 ;
					_gon = [] ; 
					_gon = _dimenzOf select bumpPo  ;
					
					_goo = _goo select 2 ;
					_nextWid = _goo ;
					_nextWid = _nextWid  ;
				};
				spaceW = spaceW + rackBumpX + _nextWid  ;

				whax =   whax + spaceW ;

			};
			

			
 

			//_positionsXY pushBack _posNex ; 

			
	};

	hint("done with it") ;
	
			
/*
_allWidths = [] ; 
	{
		_cherry = [_x] select 0 ; 
		_allWidths pushBack _cherry ; 
	} forEach _positionsXY ;

	maxWidest = selectMax _allWidths ;
	spotter = _allWidths find maxWidest ;
	_positionRemainX = _positionsXY select spotter ;
	marky setPos _positionRemainY ; 
	bobby setPos _positionRemainX ;
*/
	
Edited by bLAcKmAgE87
  • Like 1
  • Confused 1

Share this post


Link to post
Share on other sites

?imw=5000&imh=5000&ima=fit&impolicy=LettNOTICE IN THIS SHOT: NO PROPERTY DIFFERENCES ASSUMED. NO CENTER OF FIELD, ROW, OR COLUMN GIVEN. 

 

Edited by bLAcKmAgE87

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

×