Jump to content
  • 0

Vehicles spawning too much?


Rick

Question

So before anyone tells me to look at the max vehicles setting in the init.sqf it's at 300, yet the vehicles in our server have been spawning everywhere! We're now at 2280 vehicles and counting, keeps getting higher every day, we have an array of extra custom scripts but none effecting vehicles (Besides towing). Anyone got any ideas as to what's doing this?

Link to comment
Share on other sites

Recommended Posts

  • 0

Check your server's RPT file. On start up it states how many new vehicles will be spawned in. You could add diag_log lines too in your server_monitor.sqf to check how many the server is pulling back from the db etc. What about all the vehicles that are bought and then left behind? are they getting cleaned up? or are you simply just getting new spawns constantly?

Link to comment
Share on other sites

  • 0

ok i did but i still dont see anything wrong

 

this what i have as settings on init.sqf

// DayZ Epoch config
// Dayz Epoch Spawn Config
spawnShoremode 			= 0; 		// Default = 1 (on shore)
spawnArea			= 1500; 	// Default = 1500
dayz_paraSpawn 			= false;	// Default = false
/////////////////////////////////////////////////////////////////////////
// Dayz Epoch SetMax Config
MaxHeliCrashes			= 5; 		// Default = 5
MaxVehicleLimit 		= 700; 		// Default = 50
MaxDynamicDebris 		= 100; 		// Default = 100
dayz_maxLocalZombies 		= 100; 		// Default = 30
dayz_maxAnimals 		= 8; 		// Default: 8
/////////////////////////////////////////////////////////////////////////
// Dayz Epoch Map Config
dayz_MapArea 			= 14000; 	// Default = 10000
dze_buildinglimit 		= 10000;	// Default = 50
DZE_BuildOnRoads 		= true; 	// Default: False
dayz_sellDistance_vehicle 	= 10; 		// Default: 10
dayz_sellDistance_boat 		= 30; 		// Default: 30
dayz_sellDistance_air 		= 40; 		// Default: 40
dayz_minpos 			= -1; 
dayz_maxpos 			= 16000;
/////////////////////////////////////////////////////////////////////////
// Dayz Epoch other Config
DZE_DeathMsgGlobal 		= true;		// Default = false
dayz_zedsAttackVehicles 	= false;
OldHeliCrash 			= true;
dayz_tameDogs 			= true;
DynamicVehicleDamageLow 	= 0; 		// Default: 0
DynamicVehicleDamageHigh 	= 100; 		// Default: 100
/////////////////////////////////////////////////////////////////////////

Here is my dynamic_vehicles.sqf

http://pastebin.com/YFzMeNeA

Link to comment
Share on other sites

  • 0

The server_monitor.sqf file manages the spawning of vehicles for the server.

    //  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!";
    };

As you can see it should be setting the value based on the vehicles on the server as well as the MaxVehicleLimit.

 

If you still think its broken add this after it so you can check the logs for info.

diag_log (format["Total Vehicles: %1", _totalvehicles]);
diag_log (format["Max Vehicles: %1", MaxVehicleLimit]);
diag_log (format["Vehicles to Spawn: %1", _vehLimit]);

Then check your server's rpt file after the restart and see the values it spits out.

Link to comment
Share on other sites

  • 0

We see it too. It's not happening constantly, there is certainly some sort of triggering event. The servers will roll along just fine them for some reason it starts spawning vehicles each restart. Had well over 3000 at one point. Manually hammered them back but it recurs again eventually.

Link to comment
Share on other sites

  • 0
19:41:00 "HIVE: Vehicle Spawn limit reached!"

19:41:00 "Total Vehicles: 847"

19:41:00 "Max Vehicles: 300"

19:41:00 "Vehicles to Spawn: -547"

19:41:00 "HIVE: Spawning # of Debris: 500"

19:41:00 "HIVE: Spawning # of Ammo Boxes: 3"

19:41:00 "HIVE: Spawning # of Veins: 50"

19:41:00 "Total Number of spawn locations 5"

19:41:00 "DEBUG: Too many at [10396.2,2748.49]"

19:41:00 "EPOCH EVENTS INIT"

19:41:08 "DEBUG: Too many at [12114.9,8996.44]"

19:41:09 "DEBUG: Too many at [4352.9,4610.09]"

 

 

Had to manually remove vehicles without touching other people's vehicle was a pain.

Link to comment
Share on other sites

  • 0

I'm having the same issue. My init.sqf defines Max Vehicles as 200.

 

Here's a snip of my RPT.

 

18:31:03 "HIVE: found 1453 objects"
18:31:03 "HIVE: Commence Object Streaming..."
18:31:08 "HIVE: got 481 Epoch Objects and 972 Vehicles"
18:31:11 "Res3tting B!S effects..."
18:31:16 class HitPoints::HitLF2Wheel not found in policecar
18:31:16 class HitPoints::HitRF2Wheel not found in policecar
18:31:16 class HitPoints::HitLMWheel not found in policecar
18:31:16 class HitPoints::HitRMWheel not found in policecar
18:32:10 "HIVE: Vehicle Spawn limit reached!"
18:32:10 "HIVE: Spawning # of Debris: 100"
18:32:10 "HIVE: Spawning # of Ammo Boxes: 3"
18:32:10 "HIVE: Spawning # of Veins: 50"
18:32:10 "Initializing DZAI version 1.9.7 using base path \z\addons\dayz_server\DZAI."
 
So if my max is 200 how the hell am I getting 972? My server is low pop, no way that's all from people buying.
Link to comment
Share on other sites

  • 0

I've seen this too on my servers and I have a theory about it. I think there are times when the server auto restarts and doesn't load the DB correctly. The server then thinks "Oh shit, we don't have any vehicles" and so it spawns a batch of fresh ones. The next restart the DB correctly syncs and the ones generated from last reset are incorporated into the total, causing the increase. If you look at your DB I'll bet there are a bunch of vehicles with the same created on date for no reason ;)  If so that's likely your answer.

Link to comment
Share on other sites

  • 0

I've seen this too on my servers and I have a theory about it. I think there are times when the server auto restarts and doesn't load the DB correctly. The server then thinks "Oh shit, we don't have any vehicles" and so it spawns a batch of fresh ones. The next restart the DB correctly syncs and the ones generated from last reset are incorporated into the total, causing the increase. If you look at your DB I'll bet there are a bunch of vehicles with the same created on date for no reason ;)  If so that's likely your answer.

 

This is certainly a possibility. I've had two reported cases of my server not loading the DB, where players came on and all of the objects were gone. Both were fixed by subsequent restarts. I would have assumed that any changes made after would have been lost when the database connected properly on the next restart, but perhaps that is not the case. The vehicle issue was not reported until after the first broken restart was reported, and neither were reported until after the last patch.

 

Can anyone help me figure out a clean way to remove all of the vehicles that are not owned? Is there an easy way to properly identify that? I've tried before I found that vehicles I thought were unowned were actually just sitting at people's bases.

Link to comment
Share on other sites

  • 0

If you sort your DB by LastUpdated you'll likely see several groupings of vehicles. That's how I figured out that it's probably the DB not loading on me.

 

Just use that as a selection point and ensure none of them have inventory. If none do then that was one of your (likely) bad DB loads and those vehicles are safe to remove en mass.

Link to comment
Share on other sites

  • 0

So I did that, purged a ton of vehicles, and restarted my server, then checked my RPT file to see how I'd done. Something is still goofy though. My init limits the vehicle count to 200, but I saw this:

 

14:37:18 "HIVE: Starting"
14:37:18 "HIVE: trying to get objects"
14:37:18 "HIVE: found 861 objects"
14:37:18 "HIVE: Commence Object Streaming..."
14:37:19 "HIVE: got 480 Epoch Objects and 381 Vehicles"
 
14:37:53 "HIVE: Spawning # of Vehicles: 29"
14:37:53 "HIVE: Spawning # of Debris: 100"
14:37:53 "HIVE: Spawning # of Ammo Boxes: 3"
14:37:53 "HIVE: Spawning # of Veins: 50"
 
If i'm set to 200 and I had 381 why did it spawn 29 more?
Link to comment
Share on other sites

  • 0

I restarted again and got this:

 

14:46:58 "HIVE: got 480 Epoch Objects and 398 Vehicles"
14:47:33 "HIVE: Spawning # of Vehicles: 12"
14:47:33 "HIVE: Spawning # of Debris: 100"
14:47:33 "HIVE: Spawning # of Ammo Boxes: 3"
14:47:33 "HIVE: Spawning # of Veins: 50"
 
So obviously it's trying to spawn 410 vehicles. If my ini is set to 200, any idea where it could be getting that number from?
Link to comment
Share on other sites

  • 0

Please can someone find a fix for this! It's insane.

 

Anyone know how to seperate the vehicles from the actual objects and have them in there own seperate table. because i don't want to run an SQL command like remove after 5 days ect and have it delete base parts?

 

Thanks

Link to comment
Share on other sites

  • 0

I'm going through same problem. Havn't found a solution yet either. And if I run delete all vehicles with no inventory. It also deletes base items , like cinder block walls /doors and even some wood items. Does anyone know of a DB event that would only do vehicles and not base building items?

 

 I'm wondering if it's an addon , that we all might have in common on our servers.

Link to comment
Share on other sites

  • 0

Just didn't want this to die. I'm still experiencing bouts of this, has anyone found anything out? I cleared ALL of my unkeyed vehicles last week and I'm back to 1300+ again and still climbing. I think I'm going to run a command every two days to remove all vehicles spawned but untouched. This will keep the server shaken up but ought to beat back the spam vehicle count from getting out of hand.

Link to comment
Share on other sites

  • 0

So, i have also been getting the same issues as others here. 

 

21:01:30 "HIVE: got 2178 Epoch Objects and 1366 Vehicles" 04/07/2014

 

0:02:50 "HIVE: got 2160 Epoch Objects and 1567 Vehicles" 04/10/2014

 

I checked my in game admin debug and i get 600+(800+). My max vehicles are 400. For me it seems to happen every Wednesday in the morning. 

 

Most of my players have vodniks and just go around ramming every car they see, thus blowing them up. 

Below is my cleanup I've gathered from other posters on this site and from other sources. Seems to work ok after a few days and we are back to normal. Not sure if it helps anybody or if it's correct, but haven't noticed any issues with it. 

 

Would be nice to control it but i haven't noticed it get over 700 fresh spawn, yet. 

 

I will try the server_monitor diag_log to get a better reading, thank you for that advise. 

 

My game addons: http://epochmod.com/forum/index.php?/topic/8028-gameface-dayz-epoch-panthera-1042

 

SET sql_safe_updates=0;
DROP EVENT IF EXISTS unlockAbandonedVehicles;
CREATE EVENT unlockAbandonedVehicles
ON SCHEDULE EVERY 1 DAY
COMMENT 'Unlocks vehicles that have been abandoned'
DO
update object_data set characterid = 0 
where 
LastUpdated < date_sub(current_timestamp, interval 7 day) and 
Datestamp < date_sub(current_timestamp, interval 7 day) and 
CharacterID > 0 and 
Classname not in ("VaultStorage","LockboxStorage","VaultStorageLocked","LockboxStorageLocked","WoodShack_DZ","StorageShed_DZ","TentStorageDomed","TentStorageDomed2","TentStorage")  AND 
Inventory <> '[]' and Inventory is not null;
SET sql_safe_updates=0;
DROP EVENT IF EXISTS removeAbandonedVehicles;
CREATE EVENT removeAbandonedVehicles
ON SCHEDULE EVERY 1 DAY
COMMENT 'Removes vehicles that have been abandoned'
DO
DELETE FROM object_data 
WHERE LastUpdated < DATE_SUB(CURRENT_TIMESTAMP, INTERVAL 10 DAY) AND 
Datestamp < DATE_SUB(CURRENT_TIMESTAMP, INTERVAL 10 DAY) AND 
CharacterID > 0 AND
Classname NOT IN ("VaultStorage","LockboxStorage","VaultStorageLocked","LockboxStorageLocked","WoodShack_DZ","StorageShed_DZ","TentStorageDomed","TentStorageDomed2","TentStorage")  AND 
Inventory <> '[]' AND Inventory IS NOT NULL;
SET sql_safe_updates=0;
DROP EVENT IF EXISTS removeDamagedVehicles;
CREATE EVENT removeDamagedVehicles
ON SCHEDULE EVERY 1 DAY
COMMENT 'Removes destroyed vehicles from the database'
DO
DELETE FROM object_data WHERE Damage = 1;
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...