To many vehicles of the same sort (limit_max not working)

XAM

New Member
Hi,
I have a problem causing my server to spawn to many of the same vehicle. It's ignoring the limit_max setting under `vehicle` in the database.

For example, if I have 5 different spawn points for the UH1H_DZ with a spawn chance of 0.80 on every spawn. Then put limit_max to 1, it will still spawn more then 1 UH1H_DZ.

What am I doing wrong here?
 
If I understand you correctly the vehicle chance index is based on a percentage of the probability where 1 = 100%, 0.8=80%, or 0.08 = 8% chance of the particular vehicle type of spawning. So by jacking up to 1 you have made a 100% probability that UH1 will spawn
 
If I understand you correctly the vehicle chance index is based on a percentage of the probability where 1 = 100%, 0.8=80%, or 0.08 = 8% chance of the particular vehicle type of spawning. So by jacking up to 1 you have made a 100% probability that UH1 will spawn
The spawn chance of the UH1 is 80%, with a limit_max of 1. So there should only be 1 up at any moment, but it isn't.

I thought this was fixed? Are you using the latest vehicle spawn script?
According to DayZ.ST they are using the latest.
 
My UH1 limits seem to be working normally.

Did you spawn your other UH1's before you put the max limit at 1? And is your minimum set at 0?
 
My UH1 limits seem to be working normally.

Did you spawn your other UH1's before you put the max limit at 1? And is your minimum set at 0?
This is on every vehicle. And I've tried deleting every vehicle before spamming the spawn script. And after I've spammed it, there's always some vehicle that has spawned more times than what limit_max is set to on that specific vehicle.
It is NOT ignoring the normal vehicle max though. The one that controls how many vehicles total that can be spawned.
 
I think it's same on my server...
I've added manually some spawn spots for some vehicles in the database.

But for example:
*Mi17_DZ has 3 spawn spots - limit_min=0 limit_max=1 - chance on every spawn spot = 0.300
> actually 2 Mi17_DZ on the map
*UH1H_DZ has 9 spawn spots - limit_min=0 limit_max=1 - chance on every spawn spot = 0.250
> actually 2 UH1H_DZ on the map
 
I think it's same on my server...
I've added manually some spawn spots for some vehicles in the database.

But for example:
*Mi17_DZ has 3 spawn spots - limit_min=0 limit_max=1 - chance on every spawn spot = 0.300
> actually 2 Mi17_DZ on the map
*UH1H_DZ has 9 spawn spots - limit_min=0 limit_max=1 - chance on every spawn spot = 0.250
> actually 2 UH1H_DZ on the map
Where are you hosting at?
 
You didn't mention if you had a minimum number set. I had heard a rumor that the "limit_min" doesn't work the way we think it does, but no one went into any detail on it.

Maybe it adds the limit_min to your limit_max? So if limit_min = 1 and limit_max = 1, really turns out to make 2 total?

It appears duluc is spawning 1 more than his maximum, so in any case reducing it by 1 should help. XAM is yours also 1 more than your maximum?
 
@Draxanoth: limit_min=0 limit_max=1
@XAM: host at home on a dedicated server (DIY :p)
I took a peek in the newest db_spawn_vehicles.pl. I see this on line 208:

next unless ($count <= $vehicle->{limit_max});

I'm totally foreign to SQL, but I think that needs to be < instead of <=. Otherwise if it's equal to your max, I think it runs the next insert, resulting in a +1 over the max number. I'll test it when I get home.

I thought mine was working correctly, but I must have missed the +1 thinking it was ignoring the limit altogether for XAM.
 
I took a peek in the newest db_spawn_vehicles.pl. I see this on line 208:

next unless ($count <= $vehicle->{limit_max});

I'm totally foreign to SQL, but I think that needs to be < instead of <=. Otherwise if it's equal to your max, I think it runs the next insert, resulting in a +1 over the max number. I'll test it when I get home.

I thought mine was working correctly, but I must have missed the +1 thinking it was ignoring the limit altogether for XAM.
You're correct. They should remove the '=' part as it will continue even though limit_max has been met.
 
Back
Top