Jump to content
  • 0

Too many Vehicles are spawning


CommanderWolf

Question

19 answers to this question

Recommended Posts

  • 0

you need to delete old vehicles from database, then dynamic vehicles will kick in with your new value

 

to do it safely, look for vehicles without player IDs to them (value 0) as well as empty inventory. Always double check vehicle name before deleting so you don't delete bases

 

HeidiSQL filter:

`CharacterID` LIKE '%0%' AND `Inventory` LIKE '%[]%' 

requirements: common sense

Link to comment
Share on other sites

  • 0

I was thinking fresh server. He put vehicles limit to 300 in init.sqf and it spawns 1500 on first start up. If that's the case then do as I said remove vehicles from dynamic_vehicles.sqf then delete all vehicles on map and restart server.

 

If that's not the case and your server has been up for day(s) or month(s) with players in it and vehicles have hit 1500 on map then do as raymix says.

Link to comment
Share on other sites

  • 0

Well what's the case fresh server or have there been players that have vehicles?

 

If its fresh a fresh server then open HeidiSQL and right click the objects table and click empty table, click ok then remove/lower the numbers in the dynamic_vehicles.sqf and restart your server.

 

If you have players and don't want them to lose there base/vehicles then click objects table then data tab. Sort by Character ID then Inventory.

 

Everything with Character ID of 0 and Inventory of [[[],[]],[[],[]],[[],[]]] means that it's empty and not keyed. Just be sure to not delete any base objects.

 

Or just run this in a query for the table object data

 

This will delete all non keyed and empty inventory vehicles.

DELETE FROM Object_DATA WHERE CharacterID = 0 AND (Inventory = '[[[],[]],[[],[]],[[],[]]]' OR Inventory = '[]')

This will delete all non keyed vehicles that haven't been updated in 5 days (by a player) and has empty inventory. You can change the 5 to any number of days.

DELETE FROM `Object_DATA` WHERE `LastUpdated` < DATE_SUB(CURRENT_TIMESTAMP, INTERVAL 5 DAY) AND CharacterID = 0 AND (Inventory = '[[[],[]],[[],[]],[[],[]]]' OR Inventory = '[]')

Also run this to delete destroyed vehicles

DELETE FROM Object_DATA WHERE Damage = 1

I have not made these. Just pieced them together and tested it on one of my test servers.

 

BE SURE TO BACK UP THE DATA BASE BEFORE RUNNING ANY OF THESE JUST INCASE.

Link to comment
Share on other sites

  • 0

its 341(1139)

That's a fairly normal amount of vehicles. You don't have much to worry about. I like to them around 300(1000) but the second number in () can get 1500+ easy with the first number being under 300 when enough players are building a base and lost of AI missions/players in the server.

 

oh lol is there any way to reset my dynamic vehicles?

You can take the vehicle list from one of the other maps. Say you are using chernarus map. The dynamic vehicles for say lingor and utes maps are the same for epoch. Here is a simple list you can use that's default for chernarus.

AllowedVehiclesList = [

["AH6X_DZ",3],

["AN2_DZ",3],

["ArmoredSUV_PMC_DZE",1],

["ATV_CZ_EP1",3],

["ATV_US_EP1",3],

["C130J_US_EP1_DZ",1],

["car_hatchback",3],

["car_sedan",3],

["CH_47F_EP1_DZE",1],

["CSJ_GyroC",3],

["CSJ_GyroCover",3],

["CSJ_GyroP",3],

["datsun1_civil_1_open",3],

["datsun1_civil_2_covered",3],

["datsun1_civil_3_open",3],

["Fishing_Boat",3],

["GAZ_Vodnik_DZE",1],

["GAZ_Vodnik_MedEvac",1],

["GLT_M300_LT",3],

["GLT_M300_ST",3],

["GNT_C185",1],

["GNT_C185C",1],

["GNT_C185R",1],

["GNT_C185U",1],

["hilux1_civil_1_open",3],

["hilux1_civil_2_covered",3],

["hilux1_civil_3_open_EP1",3],

["HMMWV_Ambulance",1],

["HMMWV_Ambulance_CZ_DES_EP1",1],

["HMMWV_DES_EP1",3],

["HMMWV_DZ",3],

["HMMWV_M1035_DES_EP1",1],

["HMMWV_M1151_M2_CZ_DES_EP1_DZE",1],

["HMMWV_M998A2_SOV_DES_EP1_DZE",1],

["Ikarus",3],

["Ikarus_TK_CIV_EP1",3],

["JetSkiYanahui_Case_Blue",1],

["JetSkiYanahui_Case_Green",1],

["JetSkiYanahui_Case_Red",1],

["JetSkiYanahui_Case_Yellow",1],

["Kamaz",3],

["KamazRefuel_DZ",1],

["Lada1",3],

["Lada1_TK_CIV_EP1",3],

["Lada2",3],

["Lada2_TK_CIV_EP1",3],

["LadaLM",3],

["LandRover_CZ_EP1",3],

["LandRover_MG_TK_EP1_DZE",1],

["LandRover_Special_CZ_EP1_DZE",1],

["LandRover_TK_CIV_EP1",3],

["M1030_US_DES_EP1",3],

["MH6J_DZ",3],

["Mi17_Civilian_DZ",3],

["Mi17_DZE",3],

["MMT_Civ",6],

["MtvrRefuel_DES_EP1_DZ",1],

["MTVR_DES_EP1",3],

["MV22_DZ",1],

["Offroad_DSHKM_Gue_DZE",3],

["Old_bike_TK_INS_EP1",3],

["Old_moto_TK_Civ_EP1",3],

["PBX",3],

["Pickup_PK_GUE_DZE",3],

["Pickup_PK_INS_DZE",3],

["Pickup_PK_TK_GUE_EP1_DZE",3],

["RHIB",3],

["S1203_ambulance_EP1",3],

["S1203_TK_CIV_EP1",3],

["Skoda",3],

["SkodaBlue",3],

["SkodaGreen",3],

["SkodaRed",3],

["Smallboat_1",3],

["Smallboat_2",3],

["SUV_Blue",1],

["SUV_Camo",1],

["SUV_Charcoal",1],

["SUV_Green",1],

["SUV_Orange",1],

["SUV_Pink",1],

["SUV_Red",1],

["SUV_Silver",1],

["SUV_TK_CIV_EP1",1],

["SUV_White",1],

["SUV_Yellow",1],

["tractor",3],

["TT650_Civ",3],

["TT650_Ins",3],

["TT650_TK_CIV_EP1",3],

["UAZ_CDF",3],

["UAZ_INS",3],

["UAZ_MG_TK_EP1_DZE",3],

["UAZ_RU",3],

["UAZ_Unarmed_TK_CIV_EP1",3],

["UAZ_Unarmed_TK_EP1",3],

["UAZ_Unarmed_UN_EP1",3],

["UH1H_DZE",2],

["UH1Y_DZE",2],

["UH60M_EP1_DZE",1],

["UralRefuel_TK_EP1_DZ",1],

["Ural_CDF",3],

["Ural_TK_CIV_EP1",3],

["Ural_UN_EP1",3],

["V3S_Open_TK_CIV_EP1",3],

["V3S_Open_TK_EP1",3],

["V3S_Refuel_TK_GUE_EP1_DZ",1],

["VolhaLimo_TK_CIV_EP1",3],

["Volha_1_TK_CIV_EP1",3],

["Volha_2_TK_CIV_EP1",3],

["VWGolf",3],

["Zodiac",3],

["CH53_DZE",1]

];

 

And again ALWAYS back up files before you make changes. It's good practice.

Link to comment
Share on other sites

  • 0

I'm having the same problem... vehicles just keep spawning.  I have my max vehicles set to 200 and my dynamic_vehicle_sqf totals to 367 ( so I get some variation in the mix of spawned-in vehicles).  But my Infistar admin debug monitor reads 244(299).  And every fifteen minutes or so, a new vehicle spawns in somewhere.  What could be overriding my max vehicles and what is the significance of the two different numbers in the monitor?  

 

When I watch my map to see how vehicles are spawning in, the already spawned-in vehicles flash as if the database is cycling through the vehicles every few seconds refreshing them.  I have added in the static spawn location script from Judge Bread to help even out the distribution of vehicles.

 

I've gone in and totally emptied the objects table in the database and it makes no difference.  In a short time, I've exceeded the max vehicles.  I'm the only one on the server since it is my test server.  I haven't spawned in any vehicles manually or bought any from any traders.  Any ideas?

 

Thanks,

Bob

Link to comment
Share on other sites

  • 0

Syco, I've emptied the table numerous times on my test server.   I'm the only one on it and haven't purchased any vehicles.  Every time I empty the table, vehicles just keep spawning.  But it does seem to have kind of stabilized at around 300.  Sometimes it's a little higher.  

 

As I had said before, I have my max vehicles set to 200 and my dynamic_vehicle_sqf totals to 367.   But my Infistar admin debug monitor reads 244(299).  What is the 244 vs 299? They both can't be the vehicle count!   

 

The other thing I'm getting complaints of on my main server is that player vehicles (either that they purchased or found) will on occasion disappear.  It's almost as if the server is continuing to spawn in vehicles but deletes existing ones to fit them into some phantom max number.  I have no direct evidence of this through the logs.  Just observations.

 

I'm at at total loss even where to look at this point. 

Link to comment
Share on other sites

  • 0

Syco, I've emptied the table numerous times on my test server.   I'm the only one on it and haven't purchased any vehicles.  Every time I empty the table, vehicles just keep spawning.  But it does seem to have kind of stabilized at around 300.  Sometimes it's a little higher.  

 

As I had said before, I have my max vehicles set to 200 and my dynamic_vehicle_sqf totals to 367.   But my Infistar admin debug monitor reads 244(299).  What is the 244 vs 299? They both can't be the vehicle count!   

 

The other thing I'm getting complaints of on my main server is that player vehicles (either that they purchased or found) will on occasion disappear.  It's almost as if the server is continuing to spawn in vehicles but deletes existing ones to fit them into some phantom max number.  I have no direct evidence of this through the logs.  Just observations.

 

I'm at at total loss even where to look at this point. 

 

Is this test server a copy paste of your live server? Do you have any custom loot crates/custom bases like warehouses or AI missions that would be spawning?

 

The 244 is the amount of vehicles on the map that can be driven by a player. The 299 is everything that is considered a vehicle by arma oa. If you build a door then put a lock on it you will see the number in ( ) go up by one as a locked door is considered a vehicle.

 

If any of these numbers are going up with you not doing anything it is almost always going to be some kind of mission or heli crash site. Vehicles that players can drive will only be spawned in when the server starts up or by a mission system. You can empty the object table then restart the server. Join the server and after you are in-game look at your RPT.log and you will see a lot of hive publishes.

 

Chances are your server is not eating your players vehicles. Maybe they are getting blown up or someone is using a hotwire kit on them.

 

Maybe this "static spawn location script from Judge Bread" is your problem? I never use stuff like this as i always do it myself.

 

One thing to check is inside dayz_server\system\server_monitor.sqf  and search for MaxVehicleLimit

 

You should find two blocks that look like this

 

if(isnil "MaxVehicleLimit") then {

MaxVehicleLimit = 50;

};

 

and

 

if (_hiveLoaded) then {

  _vehLimit = MaxVehicleLimit - _totalvehicles;

  if(_vehLimit > 0) then {

   diag_log ("HIVE: Spawning # of Vehicles: " + str(_vehLimit));

   for "_x" from 1 to _vehLimit do {

    [] spawn spawn_vehicles;

   };

  } else {

   diag_log "HIVE: Vehicle Spawn limit reached!";

  };

};

 

Your blocks should be the same.

 

Maybe you are getting more than 200 vehicles because there are so many spawn point for the map from the "Judge Bread" script. I think default setting is MaxVehicleLimit = 300; and that is what i run and have no problems at all.

 

On my live cherno server my vehicle count is 358(1449) with just over 10k objects in the object_table. The number in ( ) will always be much larger.

Link to comment
Share on other sites

  • 0
On my live cherno server my vehicle count is 358(1449) with just over 10k objects in the object_table. The number in ( ) will always be much larger.

 

If you're using InfiSTAR Admin Debug, be advised, that

 

358 is the Count of all alive Vehicles from the Kind of "Ship", "Air" and "LandVehicle" - This includes Locked Vehicles, that have been spawned.

 

(1449) is the return of "vehicles", which includes stuff like WeaponHolders (Loot that spawned on Ground), locked vehicles, open vehicles, sometimes even Map Additions.

 

if (_hiveLoaded) then {
		//  spawn_vehicles
		_vehLimit = MaxVehicleLimit - _totalvehicles;
		if(_vehLimit > 0) then {
			diag_log ("HIVE: Spawning # of Vehicles: " + str(_vehLimit));
			for "_x" from 1 to _vehLimit do {
				[] spawn spawn_vehicles;
			};
		} else {
			diag_log "HIVE: Vehicle Spawn limit reached!";
		};
	};

This is processed AFTER the Objects and Vehicles from database are Spawned. It will check the total amount of Vehicles, that already spawned.

 

Now if you want to check only Vehicles that are not locked

Find private []; and add into the array:

_dynamicCounter

Find:

_totalvehicles = 0;	

and change:

_totalvehicles = 0;	
_dynamicCounter = 0;

Find:

_totalvehicles = _totalvehicles + 1;

and change:

_totalvehicles = _totalvehicles + 1;
		if (_ownerID == "0" && !(_object isKindOf "Bicycle")) then {
			_dynamicCounter = _dynamicCounter + 1;
		};

Now you have a counter for server spawned Vehicles, that are not locked and you could change the Check like so:

if (_hiveLoaded) then {
		//  spawn_vehicles
		_vehLimit = MaxVehicleLimit - _dynamicCounter;
		if(_vehLimit > 0) then {
			diag_log ("HIVE: Spawning # of Vehicles: " + str(_vehLimit));
			for "_x" from 1 to _vehLimit do {
				[] spawn spawn_vehicles;
			};
		} else {
			diag_log "HIVE: Vehicle Spawn limit reached!";
		};
	};

To prevent server from creating errors, might also add another check:

if (_hiveLoaded) then {
		//  spawn_vehicles
		if !(_dynamicCounter > MaxVehicleLimit) then {
			_vehLimit = MaxVehicleLimit - _dynamicCounter;
			if(_vehLimit > 0) then {
				diag_log ("HIVE: Spawning # of Vehicles: " + str(_vehLimit));
				for "_x" from 1 to _vehLimit do {
					[] spawn spawn_vehicles;
				};
			} else {
				diag_log "HIVE: Vehicle Spawn limit reached!";
			};
		} else {
			diag_log "HIVE: Vehicle Spawn limit reached!";
		};
	};
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Advertisement
  • Discord

×
×
  • Create New...